From 24d9d0e4372c1bd2bbc4815bcc2fe60f74b93c71 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 18 Mar 2025 23:21:23 +0100 Subject: [PATCH 01/34] fix(deps): update dependency mathjs to v14 (#6130) --- packages/google-cloud-automl/samples/package.json | 2 +- packages/google-cloud-language/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-automl/samples/package.json b/packages/google-cloud-automl/samples/package.json index 2efc2223558..203bc3f2d5a 100644 --- a/packages/google-cloud-automl/samples/package.json +++ b/packages/google-cloud-automl/samples/package.json @@ -18,7 +18,7 @@ "dependencies": { "@google-cloud/automl": "^5.0.0", "csv": "^6.0.0", - "mathjs": "^12.0.0", + "mathjs": "^14.0.0", "yargs": "^17.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 63f40053cb5..3955784d58c 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/automl": "^4.0.0", - "mathjs": "^12.0.0", + "mathjs": "^14.0.0", "@google-cloud/language": "^7.0.0", "@google-cloud/storage": "^7.0.0", "yargs": "^17.0.0" From 6f0340dc21027b6c66bcf77e8cb1cd30fc7d4ea3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:22:02 -0700 Subject: [PATCH 02/34] feat: [storage] Add Anywhere cache control APIs (#6151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add Anywhere cache control APIs docs: Added comments for Anywhere cache messages PiperOrigin-RevId: 736168602 Source-Link: https://github.com/googleapis/googleapis/commit/1f01eefb40000d70b0c58314709af1d4f8222cc0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e687c8953cf088e4b39397e33af6e2238e1720aa Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXN0b3JhZ2UtY29udHJvbC8uT3dsQm90LnlhbWwiLCJoIjoiZTY4N2M4OTUzY2YwODhlNGIzOTM5N2UzM2FmNmUyMjM4ZTE3MjBhYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-storage-control/README.md | 4 +- .../google-storage-control/protos/protos.json | 3 - .../src/v2/storage_control_client.ts | 299 +++++++++++++++++- packages/google-storage-control/tsconfig.json | 2 +- 4 files changed, 291 insertions(+), 17 deletions(-) diff --git a/packages/google-storage-control/README.md b/packages/google-storage-control/README.md index d8a095a738b..7fe2d66b53b 100644 --- a/packages/google-storage-control/README.md +++ b/packages/google-storage-control/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Storage API API][enable_api]. -1. [Set up authentication][auth] so you can access the +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -142,4 +142,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=storage.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-storage-control/protos/protos.json b/packages/google-storage-control/protos/protos.json index f5d3eae34a0..8f47e4c386d 100644 --- a/packages/google-storage-control/protos/protos.json +++ b/packages/google-storage-control/protos/protos.json @@ -1,7 +1,4 @@ { - "options": { - "syntax": "proto3" - }, "nested": { "google": { "nested": { diff --git a/packages/google-storage-control/src/v2/storage_control_client.ts b/packages/google-storage-control/src/v2/storage_control_client.ts index e69d86b003e..262332e0119 100644 --- a/packages/google-storage-control/src/v2/storage_control_client.ts +++ b/packages/google-storage-control/src/v2/storage_control_client.ts @@ -31,6 +31,7 @@ import type { import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging} from 'google-gax'; /** * Client JSON configuration object, loaded from @@ -55,6 +56,8 @@ export class StorageControlClient { private _defaults: {[method: string]: gax.CallSettings}; private _universeDomain: string; private _servicePath: string; + private _log = logging.log('storage-control'); + auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -90,7 +93,7 @@ export class StorageControlClient { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. @@ -561,7 +564,33 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.createFolder(request, options, callback); + this._log.info('createFolder request %j', request); + const wrappedCallback: + | Callback< + protos.google.storage.control.v2.IFolder, + | protos.google.storage.control.v2.ICreateFolderRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createFolder response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createFolder(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.storage.control.v2.IFolder, + protos.google.storage.control.v2.ICreateFolderRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createFolder response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Permanently deletes an empty folder. This operation is only applicable to a @@ -670,7 +699,33 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.deleteFolder(request, options, callback); + this._log.info('deleteFolder request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.storage.control.v2.IDeleteFolderRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteFolder response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteFolder(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.storage.control.v2.IDeleteFolderRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteFolder response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Returns metadata for the specified folder. This operation is only @@ -777,7 +832,31 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.getFolder(request, options, callback); + this._log.info('getFolder request %j', request); + const wrappedCallback: + | Callback< + protos.google.storage.control.v2.IFolder, + protos.google.storage.control.v2.IGetFolderRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFolder response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getFolder(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.storage.control.v2.IFolder, + protos.google.storage.control.v2.IGetFolderRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getFolder response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Returns the storage layout configuration for a given bucket. @@ -888,7 +967,33 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.getStorageLayout(request, options, callback); + this._log.info('getStorageLayout request %j', request); + const wrappedCallback: + | Callback< + protos.google.storage.control.v2.IStorageLayout, + | protos.google.storage.control.v2.IGetStorageLayoutRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getStorageLayout response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getStorageLayout(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.storage.control.v2.IStorageLayout, + protos.google.storage.control.v2.IGetStorageLayoutRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getStorageLayout response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Creates a new managed folder. @@ -1001,7 +1106,36 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.createManagedFolder(request, options, callback); + this._log.info('createManagedFolder request %j', request); + const wrappedCallback: + | Callback< + protos.google.storage.control.v2.IManagedFolder, + | protos.google.storage.control.v2.ICreateManagedFolderRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createManagedFolder response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createManagedFolder(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.storage.control.v2.IManagedFolder, + ( + | protos.google.storage.control.v2.ICreateManagedFolderRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('createManagedFolder response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Permanently deletes an empty managed folder. @@ -1121,7 +1255,36 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.deleteManagedFolder(request, options, callback); + this._log.info('deleteManagedFolder request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.storage.control.v2.IDeleteManagedFolderRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteManagedFolder response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteManagedFolder(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.storage.control.v2.IDeleteManagedFolderRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteManagedFolder response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Returns metadata for the specified managed folder. @@ -1236,7 +1399,33 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.getManagedFolder(request, options, callback); + this._log.info('getManagedFolder request %j', request); + const wrappedCallback: + | Callback< + protos.google.storage.control.v2.IManagedFolder, + | protos.google.storage.control.v2.IGetManagedFolderRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getManagedFolder response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getManagedFolder(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.storage.control.v2.IManagedFolder, + protos.google.storage.control.v2.IGetManagedFolderRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getManagedFolder response %j', response); + return [response, options, rawResponse]; + } + ); } /** @@ -1369,7 +1558,37 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.renameFolder(request, options, callback); + const wrappedCallback: + | Callback< + LROperation< + protos.google.storage.control.v2.IFolder, + protos.google.storage.control.v2.IRenameFolderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('renameFolder response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('renameFolder request %j', request); + return this.innerApiCalls + .renameFolder(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.storage.control.v2.IFolder, + protos.google.storage.control.v2.IRenameFolderMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('renameFolder response %j', rawResponse); + return [response, rawResponse, _]; + } + ); } /** * Check the status of the long running operation returned by `renameFolder()`. @@ -1390,6 +1609,7 @@ export class StorageControlClient { protos.google.storage.control.v2.RenameFolderMetadata > > { + this._log.info('renameFolder long-running'); const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( {name} @@ -1527,7 +1747,33 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.listFolders(request, options, callback); + const wrappedCallback: + | PaginationCallback< + protos.google.storage.control.v2.IListFoldersRequest, + | protos.google.storage.control.v2.IListFoldersResponse + | null + | undefined, + protos.google.storage.control.v2.IFolder + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFolders values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFolders request %j', request); + return this.innerApiCalls + .listFolders(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.storage.control.v2.IFolder[], + protos.google.storage.control.v2.IListFoldersRequest | null, + protos.google.storage.control.v2.IListFoldersResponse, + ]) => { + this._log.info('listFolders values %j', response); + return [response, input, output]; + } + ); } /** @@ -1598,6 +1844,7 @@ export class StorageControlClient { const defaultCallSettings = this._defaults['listFolders']; const callSettings = defaultCallSettings.merge(options); this.initialize(); + this._log.info('listFolders stream %j', request); return this.descriptors.page.listFolders.createStream( this.innerApiCalls.listFolders as GaxCall, request, @@ -1676,6 +1923,7 @@ export class StorageControlClient { const defaultCallSettings = this._defaults['listFolders']; const callSettings = defaultCallSettings.merge(options); this.initialize(); + this._log.info('listFolders iterate %j', request); return this.descriptors.page.listFolders.asyncIterate( this.innerApiCalls['listFolders'] as GaxCall, request as {}, @@ -1797,7 +2045,33 @@ export class StorageControlClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); - return this.innerApiCalls.listManagedFolders(request, options, callback); + const wrappedCallback: + | PaginationCallback< + protos.google.storage.control.v2.IListManagedFoldersRequest, + | protos.google.storage.control.v2.IListManagedFoldersResponse + | null + | undefined, + protos.google.storage.control.v2.IManagedFolder + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listManagedFolders values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listManagedFolders request %j', request); + return this.innerApiCalls + .listManagedFolders(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.storage.control.v2.IManagedFolder[], + protos.google.storage.control.v2.IListManagedFoldersRequest | null, + protos.google.storage.control.v2.IListManagedFoldersResponse, + ]) => { + this._log.info('listManagedFolders values %j', response); + return [response, input, output]; + } + ); } /** @@ -1856,6 +2130,7 @@ export class StorageControlClient { const defaultCallSettings = this._defaults['listManagedFolders']; const callSettings = defaultCallSettings.merge(options); this.initialize(); + this._log.info('listManagedFolders stream %j', request); return this.descriptors.page.listManagedFolders.createStream( this.innerApiCalls.listManagedFolders as GaxCall, request, @@ -1922,6 +2197,7 @@ export class StorageControlClient { const defaultCallSettings = this._defaults['listManagedFolders']; const callSettings = defaultCallSettings.merge(options); this.initialize(); + this._log.info('listManagedFolders iterate %j', request); return this.descriptors.page.listManagedFolders.asyncIterate( this.innerApiCalls['listManagedFolders'] as GaxCall, request as {}, @@ -2363,6 +2639,7 @@ export class StorageControlClient { close(): Promise { if (this.storageControlStub && !this._terminated) { return this.storageControlStub.then(stub => { + this._log.info('ending gRPC channel'); this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-storage-control/tsconfig.json b/packages/google-storage-control/tsconfig.json index 8c2c889a70c..860d6bf027b 100644 --- a/packages/google-storage-control/tsconfig.json +++ b/packages/google-storage-control/tsconfig.json @@ -18,4 +18,4 @@ "src/**/*.json", "protos/protos.json" ] -} \ No newline at end of file +} From cf561061ead8557fe41b6458ddf2778ced92b36d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:22:38 -0700 Subject: [PATCH 03/34] feat: [merchantapi] Add AutomaticImprovements service (#6153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add AutomaticImprovements service PiperOrigin-RevId: 736530762 Source-Link: https://github.com/googleapis/googleapis/commit/fa2198128e162a80ff7ea56d46ef0b254af4980b Source-Link: https://github.com/googleapis/googleapis-gen/commit/13d6f213b5083773e7566b7d6c0ab1d4dedfa7bc Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLy5Pd2xCb3QueWFtbCIsImgiOiIxM2Q2ZjIxM2I1MDgzNzczZTc1NjZiN2Q2YzBhYjFkNGRlZGZhN2JjIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../README.md | 2 + .../v1beta/automaticimprovements.proto | 260 ++ .../protos/protos.d.ts | 950 +++++++ .../protos/protos.js | 2209 +++++++++++++++++ .../protos/protos.json | 290 +++ .../samples/README.md | 36 + ...ents_service.get_automatic_improvements.js | 62 + ...s_service.update_automatic_improvements.js | 74 + ...gle.shopping.merchant.accounts.v1beta.json | 84 + .../src/index.ts | 6 + .../v1beta/account_issue_service_client.ts | 28 + .../account_issue_service_proto_list.json | 1 + .../src/v1beta/account_tax_service_client.ts | 28 + .../account_tax_service_proto_list.json | 1 + .../src/v1beta/accounts_service_client.ts | 28 + .../v1beta/accounts_service_proto_list.json | 1 + .../autofeed_settings_service_client.ts | 28 + .../autofeed_settings_service_proto_list.json | 1 + .../automatic_improvements_service_client.ts | 1210 +++++++++ ...ic_improvements_service_client_config.json | 48 + ...matic_improvements_service_proto_list.json | 25 + .../business_identity_service_client.ts | 28 + .../business_identity_service_proto_list.json | 1 + .../v1beta/business_info_service_client.ts | 28 + .../business_info_service_proto_list.json | 1 + .../email_preferences_service_client.ts | 28 + .../email_preferences_service_proto_list.json | 1 + .../src/v1beta/gapic_metadata.json | 34 + .../src/v1beta/homepage_service_client.ts | 28 + .../v1beta/homepage_service_proto_list.json | 1 + .../src/v1beta/index.ts | 1 + .../online_return_policy_service_client.ts | 28 + ...line_return_policy_service_proto_list.json | 1 + .../src/v1beta/programs_service_client.ts | 28 + .../v1beta/programs_service_proto_list.json | 1 + .../src/v1beta/regions_service_client.ts | 28 + .../v1beta/regions_service_proto_list.json | 1 + .../shipping_settings_service_client.ts | 28 + .../shipping_settings_service_proto_list.json | 1 + ..._service_agreement_state_service_client.ts | 28 + ...ce_agreement_state_service_proto_list.json | 1 + .../v1beta/terms_of_service_service_client.ts | 28 + .../terms_of_service_service_proto_list.json | 1 + .../src/v1beta/user_service_client.ts | 28 + .../src/v1beta/user_service_proto_list.json | 1 + .../system-test/fixtures/sample/src/index.js | 2 + .../system-test/fixtures/sample/src/index.ts | 12 + .../gapic_account_issue_service_v1beta.ts | 46 + .../test/gapic_account_tax_service_v1beta.ts | 47 + .../test/gapic_accounts_service_v1beta.ts | 45 + .../gapic_autofeed_settings_service_v1beta.ts | 46 + ...c_automatic_improvements_service_v1beta.ts | 1367 ++++++++++ .../gapic_business_identity_service_v1beta.ts | 46 + .../gapic_business_info_service_v1beta.ts | 46 + .../gapic_email_preferences_service_v1beta.ts | 46 + .../test/gapic_homepage_service_v1beta.ts | 45 + ...pic_online_return_policy_service_v1beta.ts | 48 + .../test/gapic_programs_service_v1beta.ts | 45 + .../test/gapic_regions_service_v1beta.ts | 45 + .../gapic_shipping_settings_service_v1beta.ts | 46 + ..._service_agreement_state_service_v1beta.ts | 48 + .../gapic_terms_of_service_service_v1beta.ts | 46 + .../test/gapic_user_service_v1beta.ts | 45 + 63 files changed, 7797 insertions(+) create mode 100644 packages/google-shopping-merchant-accounts/protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto create mode 100644 packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js create mode 100644 packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js create mode 100644 packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts create mode 100644 packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client_config.json create mode 100644 packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_proto_list.json create mode 100644 packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts diff --git a/packages/google-shopping-merchant-accounts/README.md b/packages/google-shopping-merchant-accounts/README.md index c274264d305..da3ac7d5fe8 100644 --- a/packages/google-shopping-merchant-accounts/README.md +++ b/packages/google-shopping-merchant-accounts/README.md @@ -126,6 +126,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Accounts_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/accounts_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/accounts_service.update_account.js,packages/google-shopping-merchant-accounts/samples/README.md) | | Autofeed_settings_service.get_autofeed_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/autofeed_settings_service.get_autofeed_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/autofeed_settings_service.get_autofeed_settings.js,packages/google-shopping-merchant-accounts/samples/README.md) | | Autofeed_settings_service.update_autofeed_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/autofeed_settings_service.update_autofeed_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/autofeed_settings_service.update_autofeed_settings.js,packages/google-shopping-merchant-accounts/samples/README.md) | +| Automatic_improvements_service.get_automatic_improvements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js,packages/google-shopping-merchant-accounts/samples/README.md) | +| Automatic_improvements_service.update_automatic_improvements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js,packages/google-shopping-merchant-accounts/samples/README.md) | | Business_identity_service.get_business_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/business_identity_service.get_business_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/business_identity_service.get_business_identity.js,packages/google-shopping-merchant-accounts/samples/README.md) | | Business_identity_service.update_business_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/business_identity_service.update_business_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/business_identity_service.update_business_identity.js,packages/google-shopping-merchant-accounts/samples/README.md) | | Business_info_service.get_business_info | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/business_info_service.get_business_info.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/business_info_service.get_business_info.js,packages/google-shopping-merchant-accounts/samples/README.md) | diff --git a/packages/google-shopping-merchant-accounts/protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto b/packages/google-shopping-merchant-accounts/protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto new file mode 100644 index 00000000000..8cba2cbfa1d --- /dev/null +++ b/packages/google-shopping-merchant-accounts/protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto @@ -0,0 +1,260 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.shopping.merchant.accounts.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb"; +option java_multiple_files = true; +option java_outer_classname = "AutomaticImprovementsProto"; +option java_package = "com.google.shopping.merchant.accounts.v1beta"; + +// Service to manage the automatic improvements of an account. The automatic +// improvements of the account can be used to automatically update products, +// improve images and shipping. +service AutomaticImprovementsService { + option (google.api.default_host) = "merchantapi.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content"; + + // Retrieves the automatic improvements of an account. + rpc GetAutomaticImprovements(GetAutomaticImprovementsRequest) + returns (AutomaticImprovements) { + option (google.api.http) = { + get: "/accounts/v1beta/{name=accounts/*/automaticImprovements}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the automatic improvements of an account. + rpc UpdateAutomaticImprovements(UpdateAutomaticImprovementsRequest) + returns (AutomaticImprovements) { + option (google.api.http) = { + patch: "/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}" + body: "automatic_improvements" + }; + option (google.api.method_signature) = "automatic_improvements,update_mask"; + } +} + +// Collection of information related to the [automatic +// improvements](https://developers.google.com/shopping-content/guides/automatic-improvements) +// of an account. +message AutomaticImprovements { + option (google.api.resource) = { + type: "merchantapi.googleapis.com/AutomaticImprovements" + pattern: "accounts/{account}/automaticImprovements" + plural: "automaticImprovements" + singular: "automaticImprovements" + }; + + // Identifier. The resource name of the automatic improvements. + // Format: `accounts/{account}/automaticImprovements`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Turning on [item + // updates](https://support.google.com/merchants/answer/3246284) allows + // Google to automatically update items for you. When item updates are on, + // Google uses the structured data markup on the website and advanced data + // extractors to update the price and availability of the items. When the item + // updates are off, items with mismatched data aren't shown. + // This field is only updated (cleared) if provided in the update mask. + optional AutomaticItemUpdates item_updates = 2; + + // This improvement will attempt to automatically correct submitted images if + // they don't meet the [image + // requirements](https://support.google.com/merchants/answer/6324350), for + // example, removing overlays. If successful, the image will be replaced and + // approved. This improvement is only applied to images of disapproved offers. + // For more information see: [Automatic image + // improvements](https://support.google.com/merchants/answer/9242973) + // This field is only updated (cleared) if provided in the update mask. + optional AutomaticImageImprovements image_improvements = 3; + + // Not available for MCAs + // [accounts](https://support.google.com/merchants/answer/188487). By turning + // on [automatic shipping + // improvements](https://support.google.com/merchants/answer/10027038), + // you are allowing Google to improve the accuracy of your delivery times + // shown to shoppers using Google. More accurate delivery times, especially + // when faster, typically lead to better conversion rates. Google will improve + // your estimated delivery times based on various factors: + // * Delivery address of an order + // * Current handling time and shipping time settings + // * Estimated weekdays or business days + // * Parcel tracking data + // This field is only updated (cleared) if provided in the update mask. + optional AutomaticShippingImprovements shipping_improvements = 4; +} + +// Turning on [item +// updates](https://support.google.com/merchants/answer/3246284) allows +// Google to automatically update items for you. When item updates are on, +// Google uses the structured data markup on the website and advanced data +// extractors to update the price and availability of the items. When the item +// updates are off, items with mismatched data aren't shown. +message AutomaticItemUpdates { + // Settings for the Automatic Item Updates. + message ItemUpdatesAccountLevelSettings { + // If price updates are enabled, Google always updates the active price with + // the crawled information. + optional bool allow_price_updates = 1; + + // If availability updates are enabled, any previous availability values + // get overwritten if Google finds an out-of-stock annotation on the offer's + // page. + // If additionally `allow_strict_availability_updates` field is set to + // true, values get overwritten if Google finds an in-stock annotation on + // the offer’s page. + optional bool allow_availability_updates = 2; + + // If `allow_availability_updates` is enabled, items are automatically + // updated in all your Shopping target countries. By default, availability + // updates will only be applied to items that are 'out of stock' on your + // website but 'in stock' on Shopping. Set this to true to also update items + // that are 'in stock' on your website, but 'out of stock' on Google + // Shopping. In order for this field to have an effect, you must also set + // `allow_availability_updates`. + optional bool allow_strict_availability_updates = 3; + + // If condition updates are enabled, Google always updates item condition + // with the condition detected from the details of your product. + optional bool allow_condition_updates = 4; + } + + // Optional. Determines which attributes of the items should be automatically + // updated. If this field is not present and provided in the update mask, then + // the settings will be deleted. If there are no settings for subaccount, they + // are inherited from aggregator. + ItemUpdatesAccountLevelSettings account_item_updates_settings = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The effective value of allow_price_updates. + // If account_item_updates_settings is present, then this value is the same. + // Otherwise, it represents the inherited value of the parent account. + // The default value is true if no settings are present. + // Read-only. + bool effective_allow_price_updates = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective value of allow_availability_updates. + // If account_item_updates_settings is present, then this value is the same. + // Otherwise, it represents the inherited value of the parent account. + // The default value is true if no settings are present. + // Read-only. + bool effective_allow_availability_updates = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective value of + // allow_strict_availability_updates. + // If account_item_updates_settings is present, then this value is the same. + // Otherwise, it represents the inherited value of the parent account. + // The default value is true if no settings are present. + // Read-only. + bool effective_allow_strict_availability_updates = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective value of allow_condition_updates. + // If account_item_updates_settings is present, then this value is the same. + // Otherwise, it represents the inherited value of the parent account. + // The default value is true if no settings are present. + // Read-only. + bool effective_allow_condition_updates = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This improvement will attempt to automatically correct submitted images if +// they don't meet the [image +// requirements](https://support.google.com/merchants/answer/6324350), for +// example, removing overlays. If successful, the image will be replaced and +// approved. This improvement is only applied to images of disapproved offers. +// For more information see: [Automatic image +// improvements](https://support.google.com/merchants/answer/9242973) +message AutomaticImageImprovements { + // Settings for the Automatic Image Improvements. + message ImageImprovementsAccountLevelSettings { + // Enables automatic image improvements. + optional bool allow_automatic_image_improvements = 1; + } + + // Optional. Determines how the images should be automatically updated. + // If this field is not present and provided in the update mask, then the + // settings will be deleted. If there are no settings for subaccount, they are + // inherited from aggregator. + optional ImageImprovementsAccountLevelSettings + account_image_improvements_settings = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The effective value of allow_automatic_image_improvements. + // If account_image_improvements_settings is present, then this value is the + // same. Otherwise, it represents the inherited value of the parent account. + // Read-only. + bool effective_allow_automatic_image_improvements = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Not available for MCAs +// [accounts](https://support.google.com/merchants/answer/188487). By turning on +// [automatic shipping +// improvements](https://support.google.com/merchants/answer/10027038), +// you are allowing Google to improve the accuracy of your delivery times shown +// to shoppers using Google. More accurate delivery times, especially when +// faster, typically lead to better conversion rates. Google will improve your +// estimated delivery times based on various factors: +// * Delivery address of an order +// * Current handling time and shipping time settings +// * Estimated weekdays or business days +// * Parcel tracking data +message AutomaticShippingImprovements { + // Enables automatic shipping improvements. + optional bool allow_shipping_improvements = 1; +} + +// Request message for the `GetAutomaticImprovements` method. +message GetAutomaticImprovementsRequest { + // Required. The resource name of the automatic improvements. + // Format: `accounts/{account}/automaticImprovements` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "merchantapi.googleapis.com/AutomaticImprovements" + } + ]; +} + +// Request message for the `UpdateAutomaticImprovements` method. +message UpdateAutomaticImprovementsRequest { + // Required. The new version of the automatic imrovements. + AutomaticImprovements automatic_improvements = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. List of fields being updated. + // The following fields are supported (in both `snake_case` and + // `lowerCamelCase`): + // + // - `item_updates` + // - `item_updates.account_level_settings` + // - `image_improvements` + // - `image_improvements.account_level_settings` + // - `shipping_improvements` + // - `shipping_improvements.allow_shipping_improvements` + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-shopping-merchant-accounts/protos/protos.d.ts b/packages/google-shopping-merchant-accounts/protos/protos.d.ts index 9e5c4a63855..c00bf8d07be 100644 --- a/packages/google-shopping-merchant-accounts/protos/protos.d.ts +++ b/packages/google-shopping-merchant-accounts/protos/protos.d.ts @@ -4184,6 +4184,956 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Represents an AutomaticImprovementsService */ + class AutomaticImprovementsService extends $protobuf.rpc.Service { + + /** + * Constructs a new AutomaticImprovementsService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new AutomaticImprovementsService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AutomaticImprovementsService; + + /** + * Calls GetAutomaticImprovements. + * @param request GetAutomaticImprovementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutomaticImprovements + */ + public getAutomaticImprovements(request: google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest, callback: google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovementsCallback): void; + + /** + * Calls GetAutomaticImprovements. + * @param request GetAutomaticImprovementsRequest message or plain object + * @returns Promise + */ + public getAutomaticImprovements(request: google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest): Promise; + + /** + * Calls UpdateAutomaticImprovements. + * @param request UpdateAutomaticImprovementsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutomaticImprovements + */ + public updateAutomaticImprovements(request: google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest, callback: google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovementsCallback): void; + + /** + * Calls UpdateAutomaticImprovements. + * @param request UpdateAutomaticImprovementsRequest message or plain object + * @returns Promise + */ + public updateAutomaticImprovements(request: google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest): Promise; + } + + namespace AutomaticImprovementsService { + + /** + * Callback as used by {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService|getAutomaticImprovements}. + * @param error Error, if any + * @param [response] AutomaticImprovements + */ + type GetAutomaticImprovementsCallback = (error: (Error|null), response?: google.shopping.merchant.accounts.v1beta.AutomaticImprovements) => void; + + /** + * Callback as used by {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService|updateAutomaticImprovements}. + * @param error Error, if any + * @param [response] AutomaticImprovements + */ + type UpdateAutomaticImprovementsCallback = (error: (Error|null), response?: google.shopping.merchant.accounts.v1beta.AutomaticImprovements) => void; + } + + /** Properties of an AutomaticImprovements. */ + interface IAutomaticImprovements { + + /** AutomaticImprovements name */ + name?: (string|null); + + /** AutomaticImprovements itemUpdates */ + itemUpdates?: (google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates|null); + + /** AutomaticImprovements imageImprovements */ + imageImprovements?: (google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements|null); + + /** AutomaticImprovements shippingImprovements */ + shippingImprovements?: (google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements|null); + } + + /** Represents an AutomaticImprovements. */ + class AutomaticImprovements implements IAutomaticImprovements { + + /** + * Constructs a new AutomaticImprovements. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticImprovements); + + /** AutomaticImprovements name. */ + public name: string; + + /** AutomaticImprovements itemUpdates. */ + public itemUpdates?: (google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates|null); + + /** AutomaticImprovements imageImprovements. */ + public imageImprovements?: (google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements|null); + + /** AutomaticImprovements shippingImprovements. */ + public shippingImprovements?: (google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements|null); + + /** AutomaticImprovements _itemUpdates. */ + public _itemUpdates?: "itemUpdates"; + + /** AutomaticImprovements _imageImprovements. */ + public _imageImprovements?: "imageImprovements"; + + /** AutomaticImprovements _shippingImprovements. */ + public _shippingImprovements?: "shippingImprovements"; + + /** + * Creates a new AutomaticImprovements instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomaticImprovements instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticImprovements): google.shopping.merchant.accounts.v1beta.AutomaticImprovements; + + /** + * Encodes the specified AutomaticImprovements message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovements.verify|verify} messages. + * @param message AutomaticImprovements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomaticImprovements message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovements.verify|verify} messages. + * @param message AutomaticImprovements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomaticImprovements message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomaticImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.AutomaticImprovements; + + /** + * Decodes an AutomaticImprovements message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomaticImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.AutomaticImprovements; + + /** + * Verifies an AutomaticImprovements message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomaticImprovements message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomaticImprovements + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.AutomaticImprovements; + + /** + * Creates a plain object from an AutomaticImprovements message. Also converts values to other types if specified. + * @param message AutomaticImprovements + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.AutomaticImprovements, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomaticImprovements to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomaticImprovements + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutomaticItemUpdates. */ + interface IAutomaticItemUpdates { + + /** AutomaticItemUpdates accountItemUpdatesSettings */ + accountItemUpdatesSettings?: (google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings|null); + + /** AutomaticItemUpdates effectiveAllowPriceUpdates */ + effectiveAllowPriceUpdates?: (boolean|null); + + /** AutomaticItemUpdates effectiveAllowAvailabilityUpdates */ + effectiveAllowAvailabilityUpdates?: (boolean|null); + + /** AutomaticItemUpdates effectiveAllowStrictAvailabilityUpdates */ + effectiveAllowStrictAvailabilityUpdates?: (boolean|null); + + /** AutomaticItemUpdates effectiveAllowConditionUpdates */ + effectiveAllowConditionUpdates?: (boolean|null); + } + + /** Represents an AutomaticItemUpdates. */ + class AutomaticItemUpdates implements IAutomaticItemUpdates { + + /** + * Constructs a new AutomaticItemUpdates. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates); + + /** AutomaticItemUpdates accountItemUpdatesSettings. */ + public accountItemUpdatesSettings?: (google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings|null); + + /** AutomaticItemUpdates effectiveAllowPriceUpdates. */ + public effectiveAllowPriceUpdates: boolean; + + /** AutomaticItemUpdates effectiveAllowAvailabilityUpdates. */ + public effectiveAllowAvailabilityUpdates: boolean; + + /** AutomaticItemUpdates effectiveAllowStrictAvailabilityUpdates. */ + public effectiveAllowStrictAvailabilityUpdates: boolean; + + /** AutomaticItemUpdates effectiveAllowConditionUpdates. */ + public effectiveAllowConditionUpdates: boolean; + + /** + * Creates a new AutomaticItemUpdates instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomaticItemUpdates instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates; + + /** + * Encodes the specified AutomaticItemUpdates message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.verify|verify} messages. + * @param message AutomaticItemUpdates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomaticItemUpdates message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.verify|verify} messages. + * @param message AutomaticItemUpdates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomaticItemUpdates message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomaticItemUpdates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates; + + /** + * Decodes an AutomaticItemUpdates message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomaticItemUpdates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates; + + /** + * Verifies an AutomaticItemUpdates message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomaticItemUpdates message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomaticItemUpdates + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates; + + /** + * Creates a plain object from an AutomaticItemUpdates message. Also converts values to other types if specified. + * @param message AutomaticItemUpdates + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomaticItemUpdates to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomaticItemUpdates + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutomaticItemUpdates { + + /** Properties of an ItemUpdatesAccountLevelSettings. */ + interface IItemUpdatesAccountLevelSettings { + + /** ItemUpdatesAccountLevelSettings allowPriceUpdates */ + allowPriceUpdates?: (boolean|null); + + /** ItemUpdatesAccountLevelSettings allowAvailabilityUpdates */ + allowAvailabilityUpdates?: (boolean|null); + + /** ItemUpdatesAccountLevelSettings allowStrictAvailabilityUpdates */ + allowStrictAvailabilityUpdates?: (boolean|null); + + /** ItemUpdatesAccountLevelSettings allowConditionUpdates */ + allowConditionUpdates?: (boolean|null); + } + + /** Represents an ItemUpdatesAccountLevelSettings. */ + class ItemUpdatesAccountLevelSettings implements IItemUpdatesAccountLevelSettings { + + /** + * Constructs a new ItemUpdatesAccountLevelSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings); + + /** ItemUpdatesAccountLevelSettings allowPriceUpdates. */ + public allowPriceUpdates?: (boolean|null); + + /** ItemUpdatesAccountLevelSettings allowAvailabilityUpdates. */ + public allowAvailabilityUpdates?: (boolean|null); + + /** ItemUpdatesAccountLevelSettings allowStrictAvailabilityUpdates. */ + public allowStrictAvailabilityUpdates?: (boolean|null); + + /** ItemUpdatesAccountLevelSettings allowConditionUpdates. */ + public allowConditionUpdates?: (boolean|null); + + /** ItemUpdatesAccountLevelSettings _allowPriceUpdates. */ + public _allowPriceUpdates?: "allowPriceUpdates"; + + /** ItemUpdatesAccountLevelSettings _allowAvailabilityUpdates. */ + public _allowAvailabilityUpdates?: "allowAvailabilityUpdates"; + + /** ItemUpdatesAccountLevelSettings _allowStrictAvailabilityUpdates. */ + public _allowStrictAvailabilityUpdates?: "allowStrictAvailabilityUpdates"; + + /** ItemUpdatesAccountLevelSettings _allowConditionUpdates. */ + public _allowConditionUpdates?: "allowConditionUpdates"; + + /** + * Creates a new ItemUpdatesAccountLevelSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ItemUpdatesAccountLevelSettings instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings; + + /** + * Encodes the specified ItemUpdatesAccountLevelSettings message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.verify|verify} messages. + * @param message ItemUpdatesAccountLevelSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ItemUpdatesAccountLevelSettings message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.verify|verify} messages. + * @param message ItemUpdatesAccountLevelSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ItemUpdatesAccountLevelSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ItemUpdatesAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings; + + /** + * Decodes an ItemUpdatesAccountLevelSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ItemUpdatesAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings; + + /** + * Verifies an ItemUpdatesAccountLevelSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ItemUpdatesAccountLevelSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ItemUpdatesAccountLevelSettings + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings; + + /** + * Creates a plain object from an ItemUpdatesAccountLevelSettings message. Also converts values to other types if specified. + * @param message ItemUpdatesAccountLevelSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ItemUpdatesAccountLevelSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ItemUpdatesAccountLevelSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AutomaticImageImprovements. */ + interface IAutomaticImageImprovements { + + /** AutomaticImageImprovements accountImageImprovementsSettings */ + accountImageImprovementsSettings?: (google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings|null); + + /** AutomaticImageImprovements effectiveAllowAutomaticImageImprovements */ + effectiveAllowAutomaticImageImprovements?: (boolean|null); + } + + /** Represents an AutomaticImageImprovements. */ + class AutomaticImageImprovements implements IAutomaticImageImprovements { + + /** + * Constructs a new AutomaticImageImprovements. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements); + + /** AutomaticImageImprovements accountImageImprovementsSettings. */ + public accountImageImprovementsSettings?: (google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings|null); + + /** AutomaticImageImprovements effectiveAllowAutomaticImageImprovements. */ + public effectiveAllowAutomaticImageImprovements: boolean; + + /** AutomaticImageImprovements _accountImageImprovementsSettings. */ + public _accountImageImprovementsSettings?: "accountImageImprovementsSettings"; + + /** + * Creates a new AutomaticImageImprovements instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomaticImageImprovements instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements; + + /** + * Encodes the specified AutomaticImageImprovements message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.verify|verify} messages. + * @param message AutomaticImageImprovements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomaticImageImprovements message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.verify|verify} messages. + * @param message AutomaticImageImprovements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomaticImageImprovements message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomaticImageImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements; + + /** + * Decodes an AutomaticImageImprovements message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomaticImageImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements; + + /** + * Verifies an AutomaticImageImprovements message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomaticImageImprovements message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomaticImageImprovements + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements; + + /** + * Creates a plain object from an AutomaticImageImprovements message. Also converts values to other types if specified. + * @param message AutomaticImageImprovements + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomaticImageImprovements to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomaticImageImprovements + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutomaticImageImprovements { + + /** Properties of an ImageImprovementsAccountLevelSettings. */ + interface IImageImprovementsAccountLevelSettings { + + /** ImageImprovementsAccountLevelSettings allowAutomaticImageImprovements */ + allowAutomaticImageImprovements?: (boolean|null); + } + + /** Represents an ImageImprovementsAccountLevelSettings. */ + class ImageImprovementsAccountLevelSettings implements IImageImprovementsAccountLevelSettings { + + /** + * Constructs a new ImageImprovementsAccountLevelSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings); + + /** ImageImprovementsAccountLevelSettings allowAutomaticImageImprovements. */ + public allowAutomaticImageImprovements?: (boolean|null); + + /** ImageImprovementsAccountLevelSettings _allowAutomaticImageImprovements. */ + public _allowAutomaticImageImprovements?: "allowAutomaticImageImprovements"; + + /** + * Creates a new ImageImprovementsAccountLevelSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageImprovementsAccountLevelSettings instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings; + + /** + * Encodes the specified ImageImprovementsAccountLevelSettings message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.verify|verify} messages. + * @param message ImageImprovementsAccountLevelSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageImprovementsAccountLevelSettings message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.verify|verify} messages. + * @param message ImageImprovementsAccountLevelSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageImprovementsAccountLevelSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageImprovementsAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings; + + /** + * Decodes an ImageImprovementsAccountLevelSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageImprovementsAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings; + + /** + * Verifies an ImageImprovementsAccountLevelSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageImprovementsAccountLevelSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageImprovementsAccountLevelSettings + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings; + + /** + * Creates a plain object from an ImageImprovementsAccountLevelSettings message. Also converts values to other types if specified. + * @param message ImageImprovementsAccountLevelSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageImprovementsAccountLevelSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageImprovementsAccountLevelSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AutomaticShippingImprovements. */ + interface IAutomaticShippingImprovements { + + /** AutomaticShippingImprovements allowShippingImprovements */ + allowShippingImprovements?: (boolean|null); + } + + /** Represents an AutomaticShippingImprovements. */ + class AutomaticShippingImprovements implements IAutomaticShippingImprovements { + + /** + * Constructs a new AutomaticShippingImprovements. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements); + + /** AutomaticShippingImprovements allowShippingImprovements. */ + public allowShippingImprovements?: (boolean|null); + + /** AutomaticShippingImprovements _allowShippingImprovements. */ + public _allowShippingImprovements?: "allowShippingImprovements"; + + /** + * Creates a new AutomaticShippingImprovements instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomaticShippingImprovements instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements): google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements; + + /** + * Encodes the specified AutomaticShippingImprovements message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.verify|verify} messages. + * @param message AutomaticShippingImprovements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomaticShippingImprovements message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.verify|verify} messages. + * @param message AutomaticShippingImprovements message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomaticShippingImprovements message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomaticShippingImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements; + + /** + * Decodes an AutomaticShippingImprovements message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomaticShippingImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements; + + /** + * Verifies an AutomaticShippingImprovements message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomaticShippingImprovements message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomaticShippingImprovements + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements; + + /** + * Creates a plain object from an AutomaticShippingImprovements message. Also converts values to other types if specified. + * @param message AutomaticShippingImprovements + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomaticShippingImprovements to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomaticShippingImprovements + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAutomaticImprovementsRequest. */ + interface IGetAutomaticImprovementsRequest { + + /** GetAutomaticImprovementsRequest name */ + name?: (string|null); + } + + /** Represents a GetAutomaticImprovementsRequest. */ + class GetAutomaticImprovementsRequest implements IGetAutomaticImprovementsRequest { + + /** + * Constructs a new GetAutomaticImprovementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest); + + /** GetAutomaticImprovementsRequest name. */ + public name: string; + + /** + * Creates a new GetAutomaticImprovementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAutomaticImprovementsRequest instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest): google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest; + + /** + * Encodes the specified GetAutomaticImprovementsRequest message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest.verify|verify} messages. + * @param message GetAutomaticImprovementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAutomaticImprovementsRequest message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest.verify|verify} messages. + * @param message GetAutomaticImprovementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAutomaticImprovementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest; + + /** + * Decodes a GetAutomaticImprovementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest; + + /** + * Verifies a GetAutomaticImprovementsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAutomaticImprovementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAutomaticImprovementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest; + + /** + * Creates a plain object from a GetAutomaticImprovementsRequest message. Also converts values to other types if specified. + * @param message GetAutomaticImprovementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAutomaticImprovementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAutomaticImprovementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAutomaticImprovementsRequest. */ + interface IUpdateAutomaticImprovementsRequest { + + /** UpdateAutomaticImprovementsRequest automaticImprovements */ + automaticImprovements?: (google.shopping.merchant.accounts.v1beta.IAutomaticImprovements|null); + + /** UpdateAutomaticImprovementsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateAutomaticImprovementsRequest. */ + class UpdateAutomaticImprovementsRequest implements IUpdateAutomaticImprovementsRequest { + + /** + * Constructs a new UpdateAutomaticImprovementsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest); + + /** UpdateAutomaticImprovementsRequest automaticImprovements. */ + public automaticImprovements?: (google.shopping.merchant.accounts.v1beta.IAutomaticImprovements|null); + + /** UpdateAutomaticImprovementsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateAutomaticImprovementsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAutomaticImprovementsRequest instance + */ + public static create(properties?: google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest): google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest; + + /** + * Encodes the specified UpdateAutomaticImprovementsRequest message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest.verify|verify} messages. + * @param message UpdateAutomaticImprovementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAutomaticImprovementsRequest message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest.verify|verify} messages. + * @param message UpdateAutomaticImprovementsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAutomaticImprovementsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest; + + /** + * Decodes an UpdateAutomaticImprovementsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest; + + /** + * Verifies an UpdateAutomaticImprovementsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAutomaticImprovementsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAutomaticImprovementsRequest + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest; + + /** + * Creates a plain object from an UpdateAutomaticImprovementsRequest message. Also converts values to other types if specified. + * @param message UpdateAutomaticImprovementsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAutomaticImprovementsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAutomaticImprovementsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents a BusinessIdentityService */ class BusinessIdentityService extends $protobuf.rpc.Service { diff --git a/packages/google-shopping-merchant-accounts/protos/protos.js b/packages/google-shopping-merchant-accounts/protos/protos.js index 5a02126faf7..f95c5e8fbd8 100644 --- a/packages/google-shopping-merchant-accounts/protos/protos.js +++ b/packages/google-shopping-merchant-accounts/protos/protos.js @@ -9704,6 +9704,2215 @@ return UpdateAutofeedSettingsRequest; })(); + v1beta.AutomaticImprovementsService = (function() { + + /** + * Constructs a new AutomaticImprovementsService service. + * @memberof google.shopping.merchant.accounts.v1beta + * @classdesc Represents an AutomaticImprovementsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function AutomaticImprovementsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AutomaticImprovementsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AutomaticImprovementsService; + + /** + * Creates new AutomaticImprovementsService service using the specified rpc implementation. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AutomaticImprovementsService} RPC service. Useful where requests and/or responses are streamed. + */ + AutomaticImprovementsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService|getAutomaticImprovements}. + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService + * @typedef GetAutomaticImprovementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} [response] AutomaticImprovements + */ + + /** + * Calls GetAutomaticImprovements. + * @function getAutomaticImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService + * @instance + * @param {google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest} request GetAutomaticImprovementsRequest message or plain object + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovementsCallback} callback Node-style callback called with the error, if any, and AutomaticImprovements + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AutomaticImprovementsService.prototype.getAutomaticImprovements = function getAutomaticImprovements(request, callback) { + return this.rpcCall(getAutomaticImprovements, $root.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest, $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements, request, callback); + }, "name", { value: "GetAutomaticImprovements" }); + + /** + * Calls GetAutomaticImprovements. + * @function getAutomaticImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService + * @instance + * @param {google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest} request GetAutomaticImprovementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService|updateAutomaticImprovements}. + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService + * @typedef UpdateAutomaticImprovementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} [response] AutomaticImprovements + */ + + /** + * Calls UpdateAutomaticImprovements. + * @function updateAutomaticImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService + * @instance + * @param {google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest} request UpdateAutomaticImprovementsRequest message or plain object + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovementsCallback} callback Node-style callback called with the error, if any, and AutomaticImprovements + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AutomaticImprovementsService.prototype.updateAutomaticImprovements = function updateAutomaticImprovements(request, callback) { + return this.rpcCall(updateAutomaticImprovements, $root.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest, $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements, request, callback); + }, "name", { value: "UpdateAutomaticImprovements" }); + + /** + * Calls UpdateAutomaticImprovements. + * @function updateAutomaticImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService + * @instance + * @param {google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest} request UpdateAutomaticImprovementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AutomaticImprovementsService; + })(); + + v1beta.AutomaticImprovements = (function() { + + /** + * Properties of an AutomaticImprovements. + * @memberof google.shopping.merchant.accounts.v1beta + * @interface IAutomaticImprovements + * @property {string|null} [name] AutomaticImprovements name + * @property {google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates|null} [itemUpdates] AutomaticImprovements itemUpdates + * @property {google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements|null} [imageImprovements] AutomaticImprovements imageImprovements + * @property {google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements|null} [shippingImprovements] AutomaticImprovements shippingImprovements + */ + + /** + * Constructs a new AutomaticImprovements. + * @memberof google.shopping.merchant.accounts.v1beta + * @classdesc Represents an AutomaticImprovements. + * @implements IAutomaticImprovements + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImprovements=} [properties] Properties to set + */ + function AutomaticImprovements(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutomaticImprovements name. + * @member {string} name + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + */ + AutomaticImprovements.prototype.name = ""; + + /** + * AutomaticImprovements itemUpdates. + * @member {google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates|null|undefined} itemUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + */ + AutomaticImprovements.prototype.itemUpdates = null; + + /** + * AutomaticImprovements imageImprovements. + * @member {google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements|null|undefined} imageImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + */ + AutomaticImprovements.prototype.imageImprovements = null; + + /** + * AutomaticImprovements shippingImprovements. + * @member {google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements|null|undefined} shippingImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + */ + AutomaticImprovements.prototype.shippingImprovements = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutomaticImprovements _itemUpdates. + * @member {"itemUpdates"|undefined} _itemUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + */ + Object.defineProperty(AutomaticImprovements.prototype, "_itemUpdates", { + get: $util.oneOfGetter($oneOfFields = ["itemUpdates"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AutomaticImprovements _imageImprovements. + * @member {"imageImprovements"|undefined} _imageImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + */ + Object.defineProperty(AutomaticImprovements.prototype, "_imageImprovements", { + get: $util.oneOfGetter($oneOfFields = ["imageImprovements"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AutomaticImprovements _shippingImprovements. + * @member {"shippingImprovements"|undefined} _shippingImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + */ + Object.defineProperty(AutomaticImprovements.prototype, "_shippingImprovements", { + get: $util.oneOfGetter($oneOfFields = ["shippingImprovements"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutomaticImprovements instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImprovements=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} AutomaticImprovements instance + */ + AutomaticImprovements.create = function create(properties) { + return new AutomaticImprovements(properties); + }; + + /** + * Encodes the specified AutomaticImprovements message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovements.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImprovements} message AutomaticImprovements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticImprovements.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.itemUpdates != null && Object.hasOwnProperty.call(message, "itemUpdates")) + $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.encode(message.itemUpdates, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageImprovements != null && Object.hasOwnProperty.call(message, "imageImprovements")) + $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.encode(message.imageImprovements, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.shippingImprovements != null && Object.hasOwnProperty.call(message, "shippingImprovements")) + $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.encode(message.shippingImprovements, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AutomaticImprovements message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImprovements.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImprovements} message AutomaticImprovements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticImprovements.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomaticImprovements message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} AutomaticImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticImprovements.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.itemUpdates = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.decode(reader, reader.uint32()); + break; + } + case 3: { + message.imageImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.decode(reader, reader.uint32()); + break; + } + case 4: { + message.shippingImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomaticImprovements message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} AutomaticImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticImprovements.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomaticImprovements message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomaticImprovements.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.itemUpdates != null && message.hasOwnProperty("itemUpdates")) { + properties._itemUpdates = 1; + { + var error = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.verify(message.itemUpdates); + if (error) + return "itemUpdates." + error; + } + } + if (message.imageImprovements != null && message.hasOwnProperty("imageImprovements")) { + properties._imageImprovements = 1; + { + var error = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.verify(message.imageImprovements); + if (error) + return "imageImprovements." + error; + } + } + if (message.shippingImprovements != null && message.hasOwnProperty("shippingImprovements")) { + properties._shippingImprovements = 1; + { + var error = $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.verify(message.shippingImprovements); + if (error) + return "shippingImprovements." + error; + } + } + return null; + }; + + /** + * Creates an AutomaticImprovements message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} AutomaticImprovements + */ + AutomaticImprovements.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements(); + if (object.name != null) + message.name = String(object.name); + if (object.itemUpdates != null) { + if (typeof object.itemUpdates !== "object") + throw TypeError(".google.shopping.merchant.accounts.v1beta.AutomaticImprovements.itemUpdates: object expected"); + message.itemUpdates = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.fromObject(object.itemUpdates); + } + if (object.imageImprovements != null) { + if (typeof object.imageImprovements !== "object") + throw TypeError(".google.shopping.merchant.accounts.v1beta.AutomaticImprovements.imageImprovements: object expected"); + message.imageImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.fromObject(object.imageImprovements); + } + if (object.shippingImprovements != null) { + if (typeof object.shippingImprovements !== "object") + throw TypeError(".google.shopping.merchant.accounts.v1beta.AutomaticImprovements.shippingImprovements: object expected"); + message.shippingImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.fromObject(object.shippingImprovements); + } + return message; + }; + + /** + * Creates a plain object from an AutomaticImprovements message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} message AutomaticImprovements + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomaticImprovements.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.itemUpdates != null && message.hasOwnProperty("itemUpdates")) { + object.itemUpdates = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.toObject(message.itemUpdates, options); + if (options.oneofs) + object._itemUpdates = "itemUpdates"; + } + if (message.imageImprovements != null && message.hasOwnProperty("imageImprovements")) { + object.imageImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.toObject(message.imageImprovements, options); + if (options.oneofs) + object._imageImprovements = "imageImprovements"; + } + if (message.shippingImprovements != null && message.hasOwnProperty("shippingImprovements")) { + object.shippingImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.toObject(message.shippingImprovements, options); + if (options.oneofs) + object._shippingImprovements = "shippingImprovements"; + } + return object; + }; + + /** + * Converts this AutomaticImprovements to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @instance + * @returns {Object.} JSON object + */ + AutomaticImprovements.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomaticImprovements + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImprovements + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomaticImprovements.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.AutomaticImprovements"; + }; + + return AutomaticImprovements; + })(); + + v1beta.AutomaticItemUpdates = (function() { + + /** + * Properties of an AutomaticItemUpdates. + * @memberof google.shopping.merchant.accounts.v1beta + * @interface IAutomaticItemUpdates + * @property {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings|null} [accountItemUpdatesSettings] AutomaticItemUpdates accountItemUpdatesSettings + * @property {boolean|null} [effectiveAllowPriceUpdates] AutomaticItemUpdates effectiveAllowPriceUpdates + * @property {boolean|null} [effectiveAllowAvailabilityUpdates] AutomaticItemUpdates effectiveAllowAvailabilityUpdates + * @property {boolean|null} [effectiveAllowStrictAvailabilityUpdates] AutomaticItemUpdates effectiveAllowStrictAvailabilityUpdates + * @property {boolean|null} [effectiveAllowConditionUpdates] AutomaticItemUpdates effectiveAllowConditionUpdates + */ + + /** + * Constructs a new AutomaticItemUpdates. + * @memberof google.shopping.merchant.accounts.v1beta + * @classdesc Represents an AutomaticItemUpdates. + * @implements IAutomaticItemUpdates + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates=} [properties] Properties to set + */ + function AutomaticItemUpdates(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutomaticItemUpdates accountItemUpdatesSettings. + * @member {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings|null|undefined} accountItemUpdatesSettings + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @instance + */ + AutomaticItemUpdates.prototype.accountItemUpdatesSettings = null; + + /** + * AutomaticItemUpdates effectiveAllowPriceUpdates. + * @member {boolean} effectiveAllowPriceUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @instance + */ + AutomaticItemUpdates.prototype.effectiveAllowPriceUpdates = false; + + /** + * AutomaticItemUpdates effectiveAllowAvailabilityUpdates. + * @member {boolean} effectiveAllowAvailabilityUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @instance + */ + AutomaticItemUpdates.prototype.effectiveAllowAvailabilityUpdates = false; + + /** + * AutomaticItemUpdates effectiveAllowStrictAvailabilityUpdates. + * @member {boolean} effectiveAllowStrictAvailabilityUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @instance + */ + AutomaticItemUpdates.prototype.effectiveAllowStrictAvailabilityUpdates = false; + + /** + * AutomaticItemUpdates effectiveAllowConditionUpdates. + * @member {boolean} effectiveAllowConditionUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @instance + */ + AutomaticItemUpdates.prototype.effectiveAllowConditionUpdates = false; + + /** + * Creates a new AutomaticItemUpdates instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates} AutomaticItemUpdates instance + */ + AutomaticItemUpdates.create = function create(properties) { + return new AutomaticItemUpdates(properties); + }; + + /** + * Encodes the specified AutomaticItemUpdates message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates} message AutomaticItemUpdates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticItemUpdates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountItemUpdatesSettings != null && Object.hasOwnProperty.call(message, "accountItemUpdatesSettings")) + $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.encode(message.accountItemUpdatesSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.effectiveAllowPriceUpdates != null && Object.hasOwnProperty.call(message, "effectiveAllowPriceUpdates")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.effectiveAllowPriceUpdates); + if (message.effectiveAllowAvailabilityUpdates != null && Object.hasOwnProperty.call(message, "effectiveAllowAvailabilityUpdates")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.effectiveAllowAvailabilityUpdates); + if (message.effectiveAllowStrictAvailabilityUpdates != null && Object.hasOwnProperty.call(message, "effectiveAllowStrictAvailabilityUpdates")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.effectiveAllowStrictAvailabilityUpdates); + if (message.effectiveAllowConditionUpdates != null && Object.hasOwnProperty.call(message, "effectiveAllowConditionUpdates")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.effectiveAllowConditionUpdates); + return writer; + }; + + /** + * Encodes the specified AutomaticItemUpdates message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticItemUpdates} message AutomaticItemUpdates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticItemUpdates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomaticItemUpdates message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates} AutomaticItemUpdates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticItemUpdates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accountItemUpdatesSettings = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.effectiveAllowPriceUpdates = reader.bool(); + break; + } + case 3: { + message.effectiveAllowAvailabilityUpdates = reader.bool(); + break; + } + case 4: { + message.effectiveAllowStrictAvailabilityUpdates = reader.bool(); + break; + } + case 5: { + message.effectiveAllowConditionUpdates = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomaticItemUpdates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates} AutomaticItemUpdates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticItemUpdates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomaticItemUpdates message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomaticItemUpdates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accountItemUpdatesSettings != null && message.hasOwnProperty("accountItemUpdatesSettings")) { + var error = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.verify(message.accountItemUpdatesSettings); + if (error) + return "accountItemUpdatesSettings." + error; + } + if (message.effectiveAllowPriceUpdates != null && message.hasOwnProperty("effectiveAllowPriceUpdates")) + if (typeof message.effectiveAllowPriceUpdates !== "boolean") + return "effectiveAllowPriceUpdates: boolean expected"; + if (message.effectiveAllowAvailabilityUpdates != null && message.hasOwnProperty("effectiveAllowAvailabilityUpdates")) + if (typeof message.effectiveAllowAvailabilityUpdates !== "boolean") + return "effectiveAllowAvailabilityUpdates: boolean expected"; + if (message.effectiveAllowStrictAvailabilityUpdates != null && message.hasOwnProperty("effectiveAllowStrictAvailabilityUpdates")) + if (typeof message.effectiveAllowStrictAvailabilityUpdates !== "boolean") + return "effectiveAllowStrictAvailabilityUpdates: boolean expected"; + if (message.effectiveAllowConditionUpdates != null && message.hasOwnProperty("effectiveAllowConditionUpdates")) + if (typeof message.effectiveAllowConditionUpdates !== "boolean") + return "effectiveAllowConditionUpdates: boolean expected"; + return null; + }; + + /** + * Creates an AutomaticItemUpdates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates} AutomaticItemUpdates + */ + AutomaticItemUpdates.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates(); + if (object.accountItemUpdatesSettings != null) { + if (typeof object.accountItemUpdatesSettings !== "object") + throw TypeError(".google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.accountItemUpdatesSettings: object expected"); + message.accountItemUpdatesSettings = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.fromObject(object.accountItemUpdatesSettings); + } + if (object.effectiveAllowPriceUpdates != null) + message.effectiveAllowPriceUpdates = Boolean(object.effectiveAllowPriceUpdates); + if (object.effectiveAllowAvailabilityUpdates != null) + message.effectiveAllowAvailabilityUpdates = Boolean(object.effectiveAllowAvailabilityUpdates); + if (object.effectiveAllowStrictAvailabilityUpdates != null) + message.effectiveAllowStrictAvailabilityUpdates = Boolean(object.effectiveAllowStrictAvailabilityUpdates); + if (object.effectiveAllowConditionUpdates != null) + message.effectiveAllowConditionUpdates = Boolean(object.effectiveAllowConditionUpdates); + return message; + }; + + /** + * Creates a plain object from an AutomaticItemUpdates message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates} message AutomaticItemUpdates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomaticItemUpdates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.accountItemUpdatesSettings = null; + object.effectiveAllowPriceUpdates = false; + object.effectiveAllowAvailabilityUpdates = false; + object.effectiveAllowStrictAvailabilityUpdates = false; + object.effectiveAllowConditionUpdates = false; + } + if (message.accountItemUpdatesSettings != null && message.hasOwnProperty("accountItemUpdatesSettings")) + object.accountItemUpdatesSettings = $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.toObject(message.accountItemUpdatesSettings, options); + if (message.effectiveAllowPriceUpdates != null && message.hasOwnProperty("effectiveAllowPriceUpdates")) + object.effectiveAllowPriceUpdates = message.effectiveAllowPriceUpdates; + if (message.effectiveAllowAvailabilityUpdates != null && message.hasOwnProperty("effectiveAllowAvailabilityUpdates")) + object.effectiveAllowAvailabilityUpdates = message.effectiveAllowAvailabilityUpdates; + if (message.effectiveAllowStrictAvailabilityUpdates != null && message.hasOwnProperty("effectiveAllowStrictAvailabilityUpdates")) + object.effectiveAllowStrictAvailabilityUpdates = message.effectiveAllowStrictAvailabilityUpdates; + if (message.effectiveAllowConditionUpdates != null && message.hasOwnProperty("effectiveAllowConditionUpdates")) + object.effectiveAllowConditionUpdates = message.effectiveAllowConditionUpdates; + return object; + }; + + /** + * Converts this AutomaticItemUpdates to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @instance + * @returns {Object.} JSON object + */ + AutomaticItemUpdates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomaticItemUpdates + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomaticItemUpdates.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates"; + }; + + AutomaticItemUpdates.ItemUpdatesAccountLevelSettings = (function() { + + /** + * Properties of an ItemUpdatesAccountLevelSettings. + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @interface IItemUpdatesAccountLevelSettings + * @property {boolean|null} [allowPriceUpdates] ItemUpdatesAccountLevelSettings allowPriceUpdates + * @property {boolean|null} [allowAvailabilityUpdates] ItemUpdatesAccountLevelSettings allowAvailabilityUpdates + * @property {boolean|null} [allowStrictAvailabilityUpdates] ItemUpdatesAccountLevelSettings allowStrictAvailabilityUpdates + * @property {boolean|null} [allowConditionUpdates] ItemUpdatesAccountLevelSettings allowConditionUpdates + */ + + /** + * Constructs a new ItemUpdatesAccountLevelSettings. + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates + * @classdesc Represents an ItemUpdatesAccountLevelSettings. + * @implements IItemUpdatesAccountLevelSettings + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings=} [properties] Properties to set + */ + function ItemUpdatesAccountLevelSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ItemUpdatesAccountLevelSettings allowPriceUpdates. + * @member {boolean|null|undefined} allowPriceUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + ItemUpdatesAccountLevelSettings.prototype.allowPriceUpdates = null; + + /** + * ItemUpdatesAccountLevelSettings allowAvailabilityUpdates. + * @member {boolean|null|undefined} allowAvailabilityUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + ItemUpdatesAccountLevelSettings.prototype.allowAvailabilityUpdates = null; + + /** + * ItemUpdatesAccountLevelSettings allowStrictAvailabilityUpdates. + * @member {boolean|null|undefined} allowStrictAvailabilityUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + ItemUpdatesAccountLevelSettings.prototype.allowStrictAvailabilityUpdates = null; + + /** + * ItemUpdatesAccountLevelSettings allowConditionUpdates. + * @member {boolean|null|undefined} allowConditionUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + ItemUpdatesAccountLevelSettings.prototype.allowConditionUpdates = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ItemUpdatesAccountLevelSettings _allowPriceUpdates. + * @member {"allowPriceUpdates"|undefined} _allowPriceUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + Object.defineProperty(ItemUpdatesAccountLevelSettings.prototype, "_allowPriceUpdates", { + get: $util.oneOfGetter($oneOfFields = ["allowPriceUpdates"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ItemUpdatesAccountLevelSettings _allowAvailabilityUpdates. + * @member {"allowAvailabilityUpdates"|undefined} _allowAvailabilityUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + Object.defineProperty(ItemUpdatesAccountLevelSettings.prototype, "_allowAvailabilityUpdates", { + get: $util.oneOfGetter($oneOfFields = ["allowAvailabilityUpdates"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ItemUpdatesAccountLevelSettings _allowStrictAvailabilityUpdates. + * @member {"allowStrictAvailabilityUpdates"|undefined} _allowStrictAvailabilityUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + Object.defineProperty(ItemUpdatesAccountLevelSettings.prototype, "_allowStrictAvailabilityUpdates", { + get: $util.oneOfGetter($oneOfFields = ["allowStrictAvailabilityUpdates"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ItemUpdatesAccountLevelSettings _allowConditionUpdates. + * @member {"allowConditionUpdates"|undefined} _allowConditionUpdates + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + */ + Object.defineProperty(ItemUpdatesAccountLevelSettings.prototype, "_allowConditionUpdates", { + get: $util.oneOfGetter($oneOfFields = ["allowConditionUpdates"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ItemUpdatesAccountLevelSettings instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings} ItemUpdatesAccountLevelSettings instance + */ + ItemUpdatesAccountLevelSettings.create = function create(properties) { + return new ItemUpdatesAccountLevelSettings(properties); + }; + + /** + * Encodes the specified ItemUpdatesAccountLevelSettings message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings} message ItemUpdatesAccountLevelSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ItemUpdatesAccountLevelSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowPriceUpdates != null && Object.hasOwnProperty.call(message, "allowPriceUpdates")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowPriceUpdates); + if (message.allowAvailabilityUpdates != null && Object.hasOwnProperty.call(message, "allowAvailabilityUpdates")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAvailabilityUpdates); + if (message.allowStrictAvailabilityUpdates != null && Object.hasOwnProperty.call(message, "allowStrictAvailabilityUpdates")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowStrictAvailabilityUpdates); + if (message.allowConditionUpdates != null && Object.hasOwnProperty.call(message, "allowConditionUpdates")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowConditionUpdates); + return writer; + }; + + /** + * Encodes the specified ItemUpdatesAccountLevelSettings message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.IItemUpdatesAccountLevelSettings} message ItemUpdatesAccountLevelSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ItemUpdatesAccountLevelSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ItemUpdatesAccountLevelSettings message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings} ItemUpdatesAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ItemUpdatesAccountLevelSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowPriceUpdates = reader.bool(); + break; + } + case 2: { + message.allowAvailabilityUpdates = reader.bool(); + break; + } + case 3: { + message.allowStrictAvailabilityUpdates = reader.bool(); + break; + } + case 4: { + message.allowConditionUpdates = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ItemUpdatesAccountLevelSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings} ItemUpdatesAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ItemUpdatesAccountLevelSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ItemUpdatesAccountLevelSettings message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ItemUpdatesAccountLevelSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowPriceUpdates != null && message.hasOwnProperty("allowPriceUpdates")) { + properties._allowPriceUpdates = 1; + if (typeof message.allowPriceUpdates !== "boolean") + return "allowPriceUpdates: boolean expected"; + } + if (message.allowAvailabilityUpdates != null && message.hasOwnProperty("allowAvailabilityUpdates")) { + properties._allowAvailabilityUpdates = 1; + if (typeof message.allowAvailabilityUpdates !== "boolean") + return "allowAvailabilityUpdates: boolean expected"; + } + if (message.allowStrictAvailabilityUpdates != null && message.hasOwnProperty("allowStrictAvailabilityUpdates")) { + properties._allowStrictAvailabilityUpdates = 1; + if (typeof message.allowStrictAvailabilityUpdates !== "boolean") + return "allowStrictAvailabilityUpdates: boolean expected"; + } + if (message.allowConditionUpdates != null && message.hasOwnProperty("allowConditionUpdates")) { + properties._allowConditionUpdates = 1; + if (typeof message.allowConditionUpdates !== "boolean") + return "allowConditionUpdates: boolean expected"; + } + return null; + }; + + /** + * Creates an ItemUpdatesAccountLevelSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings} ItemUpdatesAccountLevelSettings + */ + ItemUpdatesAccountLevelSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings(); + if (object.allowPriceUpdates != null) + message.allowPriceUpdates = Boolean(object.allowPriceUpdates); + if (object.allowAvailabilityUpdates != null) + message.allowAvailabilityUpdates = Boolean(object.allowAvailabilityUpdates); + if (object.allowStrictAvailabilityUpdates != null) + message.allowStrictAvailabilityUpdates = Boolean(object.allowStrictAvailabilityUpdates); + if (object.allowConditionUpdates != null) + message.allowConditionUpdates = Boolean(object.allowConditionUpdates); + return message; + }; + + /** + * Creates a plain object from an ItemUpdatesAccountLevelSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings} message ItemUpdatesAccountLevelSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ItemUpdatesAccountLevelSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowPriceUpdates != null && message.hasOwnProperty("allowPriceUpdates")) { + object.allowPriceUpdates = message.allowPriceUpdates; + if (options.oneofs) + object._allowPriceUpdates = "allowPriceUpdates"; + } + if (message.allowAvailabilityUpdates != null && message.hasOwnProperty("allowAvailabilityUpdates")) { + object.allowAvailabilityUpdates = message.allowAvailabilityUpdates; + if (options.oneofs) + object._allowAvailabilityUpdates = "allowAvailabilityUpdates"; + } + if (message.allowStrictAvailabilityUpdates != null && message.hasOwnProperty("allowStrictAvailabilityUpdates")) { + object.allowStrictAvailabilityUpdates = message.allowStrictAvailabilityUpdates; + if (options.oneofs) + object._allowStrictAvailabilityUpdates = "allowStrictAvailabilityUpdates"; + } + if (message.allowConditionUpdates != null && message.hasOwnProperty("allowConditionUpdates")) { + object.allowConditionUpdates = message.allowConditionUpdates; + if (options.oneofs) + object._allowConditionUpdates = "allowConditionUpdates"; + } + return object; + }; + + /** + * Converts this ItemUpdatesAccountLevelSettings to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @instance + * @returns {Object.} JSON object + */ + ItemUpdatesAccountLevelSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ItemUpdatesAccountLevelSettings + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ItemUpdatesAccountLevelSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.AutomaticItemUpdates.ItemUpdatesAccountLevelSettings"; + }; + + return ItemUpdatesAccountLevelSettings; + })(); + + return AutomaticItemUpdates; + })(); + + v1beta.AutomaticImageImprovements = (function() { + + /** + * Properties of an AutomaticImageImprovements. + * @memberof google.shopping.merchant.accounts.v1beta + * @interface IAutomaticImageImprovements + * @property {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings|null} [accountImageImprovementsSettings] AutomaticImageImprovements accountImageImprovementsSettings + * @property {boolean|null} [effectiveAllowAutomaticImageImprovements] AutomaticImageImprovements effectiveAllowAutomaticImageImprovements + */ + + /** + * Constructs a new AutomaticImageImprovements. + * @memberof google.shopping.merchant.accounts.v1beta + * @classdesc Represents an AutomaticImageImprovements. + * @implements IAutomaticImageImprovements + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements=} [properties] Properties to set + */ + function AutomaticImageImprovements(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutomaticImageImprovements accountImageImprovementsSettings. + * @member {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings|null|undefined} accountImageImprovementsSettings + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @instance + */ + AutomaticImageImprovements.prototype.accountImageImprovementsSettings = null; + + /** + * AutomaticImageImprovements effectiveAllowAutomaticImageImprovements. + * @member {boolean} effectiveAllowAutomaticImageImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @instance + */ + AutomaticImageImprovements.prototype.effectiveAllowAutomaticImageImprovements = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutomaticImageImprovements _accountImageImprovementsSettings. + * @member {"accountImageImprovementsSettings"|undefined} _accountImageImprovementsSettings + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @instance + */ + Object.defineProperty(AutomaticImageImprovements.prototype, "_accountImageImprovementsSettings", { + get: $util.oneOfGetter($oneOfFields = ["accountImageImprovementsSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutomaticImageImprovements instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements} AutomaticImageImprovements instance + */ + AutomaticImageImprovements.create = function create(properties) { + return new AutomaticImageImprovements(properties); + }; + + /** + * Encodes the specified AutomaticImageImprovements message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements} message AutomaticImageImprovements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticImageImprovements.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountImageImprovementsSettings != null && Object.hasOwnProperty.call(message, "accountImageImprovementsSettings")) + $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.encode(message.accountImageImprovementsSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.effectiveAllowAutomaticImageImprovements != null && Object.hasOwnProperty.call(message, "effectiveAllowAutomaticImageImprovements")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.effectiveAllowAutomaticImageImprovements); + return writer; + }; + + /** + * Encodes the specified AutomaticImageImprovements message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticImageImprovements} message AutomaticImageImprovements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticImageImprovements.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomaticImageImprovements message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements} AutomaticImageImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticImageImprovements.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accountImageImprovementsSettings = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.effectiveAllowAutomaticImageImprovements = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomaticImageImprovements message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements} AutomaticImageImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticImageImprovements.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomaticImageImprovements message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomaticImageImprovements.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.accountImageImprovementsSettings != null && message.hasOwnProperty("accountImageImprovementsSettings")) { + properties._accountImageImprovementsSettings = 1; + { + var error = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.verify(message.accountImageImprovementsSettings); + if (error) + return "accountImageImprovementsSettings." + error; + } + } + if (message.effectiveAllowAutomaticImageImprovements != null && message.hasOwnProperty("effectiveAllowAutomaticImageImprovements")) + if (typeof message.effectiveAllowAutomaticImageImprovements !== "boolean") + return "effectiveAllowAutomaticImageImprovements: boolean expected"; + return null; + }; + + /** + * Creates an AutomaticImageImprovements message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements} AutomaticImageImprovements + */ + AutomaticImageImprovements.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements(); + if (object.accountImageImprovementsSettings != null) { + if (typeof object.accountImageImprovementsSettings !== "object") + throw TypeError(".google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.accountImageImprovementsSettings: object expected"); + message.accountImageImprovementsSettings = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.fromObject(object.accountImageImprovementsSettings); + } + if (object.effectiveAllowAutomaticImageImprovements != null) + message.effectiveAllowAutomaticImageImprovements = Boolean(object.effectiveAllowAutomaticImageImprovements); + return message; + }; + + /** + * Creates a plain object from an AutomaticImageImprovements message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements} message AutomaticImageImprovements + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomaticImageImprovements.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.effectiveAllowAutomaticImageImprovements = false; + if (message.accountImageImprovementsSettings != null && message.hasOwnProperty("accountImageImprovementsSettings")) { + object.accountImageImprovementsSettings = $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.toObject(message.accountImageImprovementsSettings, options); + if (options.oneofs) + object._accountImageImprovementsSettings = "accountImageImprovementsSettings"; + } + if (message.effectiveAllowAutomaticImageImprovements != null && message.hasOwnProperty("effectiveAllowAutomaticImageImprovements")) + object.effectiveAllowAutomaticImageImprovements = message.effectiveAllowAutomaticImageImprovements; + return object; + }; + + /** + * Converts this AutomaticImageImprovements to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @instance + * @returns {Object.} JSON object + */ + AutomaticImageImprovements.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomaticImageImprovements + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomaticImageImprovements.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements"; + }; + + AutomaticImageImprovements.ImageImprovementsAccountLevelSettings = (function() { + + /** + * Properties of an ImageImprovementsAccountLevelSettings. + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @interface IImageImprovementsAccountLevelSettings + * @property {boolean|null} [allowAutomaticImageImprovements] ImageImprovementsAccountLevelSettings allowAutomaticImageImprovements + */ + + /** + * Constructs a new ImageImprovementsAccountLevelSettings. + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements + * @classdesc Represents an ImageImprovementsAccountLevelSettings. + * @implements IImageImprovementsAccountLevelSettings + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings=} [properties] Properties to set + */ + function ImageImprovementsAccountLevelSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageImprovementsAccountLevelSettings allowAutomaticImageImprovements. + * @member {boolean|null|undefined} allowAutomaticImageImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @instance + */ + ImageImprovementsAccountLevelSettings.prototype.allowAutomaticImageImprovements = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImageImprovementsAccountLevelSettings _allowAutomaticImageImprovements. + * @member {"allowAutomaticImageImprovements"|undefined} _allowAutomaticImageImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @instance + */ + Object.defineProperty(ImageImprovementsAccountLevelSettings.prototype, "_allowAutomaticImageImprovements", { + get: $util.oneOfGetter($oneOfFields = ["allowAutomaticImageImprovements"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageImprovementsAccountLevelSettings instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings} ImageImprovementsAccountLevelSettings instance + */ + ImageImprovementsAccountLevelSettings.create = function create(properties) { + return new ImageImprovementsAccountLevelSettings(properties); + }; + + /** + * Encodes the specified ImageImprovementsAccountLevelSettings message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings} message ImageImprovementsAccountLevelSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageImprovementsAccountLevelSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAutomaticImageImprovements != null && Object.hasOwnProperty.call(message, "allowAutomaticImageImprovements")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowAutomaticImageImprovements); + return writer; + }; + + /** + * Encodes the specified ImageImprovementsAccountLevelSettings message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.IImageImprovementsAccountLevelSettings} message ImageImprovementsAccountLevelSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageImprovementsAccountLevelSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageImprovementsAccountLevelSettings message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings} ImageImprovementsAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageImprovementsAccountLevelSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowAutomaticImageImprovements = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageImprovementsAccountLevelSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings} ImageImprovementsAccountLevelSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageImprovementsAccountLevelSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageImprovementsAccountLevelSettings message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageImprovementsAccountLevelSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowAutomaticImageImprovements != null && message.hasOwnProperty("allowAutomaticImageImprovements")) { + properties._allowAutomaticImageImprovements = 1; + if (typeof message.allowAutomaticImageImprovements !== "boolean") + return "allowAutomaticImageImprovements: boolean expected"; + } + return null; + }; + + /** + * Creates an ImageImprovementsAccountLevelSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings} ImageImprovementsAccountLevelSettings + */ + ImageImprovementsAccountLevelSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings(); + if (object.allowAutomaticImageImprovements != null) + message.allowAutomaticImageImprovements = Boolean(object.allowAutomaticImageImprovements); + return message; + }; + + /** + * Creates a plain object from an ImageImprovementsAccountLevelSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings} message ImageImprovementsAccountLevelSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageImprovementsAccountLevelSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowAutomaticImageImprovements != null && message.hasOwnProperty("allowAutomaticImageImprovements")) { + object.allowAutomaticImageImprovements = message.allowAutomaticImageImprovements; + if (options.oneofs) + object._allowAutomaticImageImprovements = "allowAutomaticImageImprovements"; + } + return object; + }; + + /** + * Converts this ImageImprovementsAccountLevelSettings to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @instance + * @returns {Object.} JSON object + */ + ImageImprovementsAccountLevelSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageImprovementsAccountLevelSettings + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageImprovementsAccountLevelSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.AutomaticImageImprovements.ImageImprovementsAccountLevelSettings"; + }; + + return ImageImprovementsAccountLevelSettings; + })(); + + return AutomaticImageImprovements; + })(); + + v1beta.AutomaticShippingImprovements = (function() { + + /** + * Properties of an AutomaticShippingImprovements. + * @memberof google.shopping.merchant.accounts.v1beta + * @interface IAutomaticShippingImprovements + * @property {boolean|null} [allowShippingImprovements] AutomaticShippingImprovements allowShippingImprovements + */ + + /** + * Constructs a new AutomaticShippingImprovements. + * @memberof google.shopping.merchant.accounts.v1beta + * @classdesc Represents an AutomaticShippingImprovements. + * @implements IAutomaticShippingImprovements + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements=} [properties] Properties to set + */ + function AutomaticShippingImprovements(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutomaticShippingImprovements allowShippingImprovements. + * @member {boolean|null|undefined} allowShippingImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @instance + */ + AutomaticShippingImprovements.prototype.allowShippingImprovements = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutomaticShippingImprovements _allowShippingImprovements. + * @member {"allowShippingImprovements"|undefined} _allowShippingImprovements + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @instance + */ + Object.defineProperty(AutomaticShippingImprovements.prototype, "_allowShippingImprovements", { + get: $util.oneOfGetter($oneOfFields = ["allowShippingImprovements"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutomaticShippingImprovements instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements} AutomaticShippingImprovements instance + */ + AutomaticShippingImprovements.create = function create(properties) { + return new AutomaticShippingImprovements(properties); + }; + + /** + * Encodes the specified AutomaticShippingImprovements message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements} message AutomaticShippingImprovements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticShippingImprovements.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowShippingImprovements != null && Object.hasOwnProperty.call(message, "allowShippingImprovements")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowShippingImprovements); + return writer; + }; + + /** + * Encodes the specified AutomaticShippingImprovements message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.IAutomaticShippingImprovements} message AutomaticShippingImprovements message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomaticShippingImprovements.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomaticShippingImprovements message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements} AutomaticShippingImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticShippingImprovements.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowShippingImprovements = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomaticShippingImprovements message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements} AutomaticShippingImprovements + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomaticShippingImprovements.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomaticShippingImprovements message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomaticShippingImprovements.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowShippingImprovements != null && message.hasOwnProperty("allowShippingImprovements")) { + properties._allowShippingImprovements = 1; + if (typeof message.allowShippingImprovements !== "boolean") + return "allowShippingImprovements: boolean expected"; + } + return null; + }; + + /** + * Creates an AutomaticShippingImprovements message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements} AutomaticShippingImprovements + */ + AutomaticShippingImprovements.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements(); + if (object.allowShippingImprovements != null) + message.allowShippingImprovements = Boolean(object.allowShippingImprovements); + return message; + }; + + /** + * Creates a plain object from an AutomaticShippingImprovements message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements} message AutomaticShippingImprovements + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomaticShippingImprovements.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowShippingImprovements != null && message.hasOwnProperty("allowShippingImprovements")) { + object.allowShippingImprovements = message.allowShippingImprovements; + if (options.oneofs) + object._allowShippingImprovements = "allowShippingImprovements"; + } + return object; + }; + + /** + * Converts this AutomaticShippingImprovements to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @instance + * @returns {Object.} JSON object + */ + AutomaticShippingImprovements.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomaticShippingImprovements + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomaticShippingImprovements.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.AutomaticShippingImprovements"; + }; + + return AutomaticShippingImprovements; + })(); + + v1beta.GetAutomaticImprovementsRequest = (function() { + + /** + * Properties of a GetAutomaticImprovementsRequest. + * @memberof google.shopping.merchant.accounts.v1beta + * @interface IGetAutomaticImprovementsRequest + * @property {string|null} [name] GetAutomaticImprovementsRequest name + */ + + /** + * Constructs a new GetAutomaticImprovementsRequest. + * @memberof google.shopping.merchant.accounts.v1beta + * @classdesc Represents a GetAutomaticImprovementsRequest. + * @implements IGetAutomaticImprovementsRequest + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest=} [properties] Properties to set + */ + function GetAutomaticImprovementsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAutomaticImprovementsRequest name. + * @member {string} name + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @instance + */ + GetAutomaticImprovementsRequest.prototype.name = ""; + + /** + * Creates a new GetAutomaticImprovementsRequest instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest} GetAutomaticImprovementsRequest instance + */ + GetAutomaticImprovementsRequest.create = function create(properties) { + return new GetAutomaticImprovementsRequest(properties); + }; + + /** + * Encodes the specified GetAutomaticImprovementsRequest message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest} message GetAutomaticImprovementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAutomaticImprovementsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetAutomaticImprovementsRequest message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest} message GetAutomaticImprovementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAutomaticImprovementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAutomaticImprovementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest} GetAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAutomaticImprovementsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAutomaticImprovementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest} GetAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAutomaticImprovementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAutomaticImprovementsRequest message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAutomaticImprovementsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetAutomaticImprovementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest} GetAutomaticImprovementsRequest + */ + GetAutomaticImprovementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAutomaticImprovementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest} message GetAutomaticImprovementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAutomaticImprovementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetAutomaticImprovementsRequest to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @instance + * @returns {Object.} JSON object + */ + GetAutomaticImprovementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAutomaticImprovementsRequest + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAutomaticImprovementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest"; + }; + + return GetAutomaticImprovementsRequest; + })(); + + v1beta.UpdateAutomaticImprovementsRequest = (function() { + + /** + * Properties of an UpdateAutomaticImprovementsRequest. + * @memberof google.shopping.merchant.accounts.v1beta + * @interface IUpdateAutomaticImprovementsRequest + * @property {google.shopping.merchant.accounts.v1beta.IAutomaticImprovements|null} [automaticImprovements] UpdateAutomaticImprovementsRequest automaticImprovements + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAutomaticImprovementsRequest updateMask + */ + + /** + * Constructs a new UpdateAutomaticImprovementsRequest. + * @memberof google.shopping.merchant.accounts.v1beta + * @classdesc Represents an UpdateAutomaticImprovementsRequest. + * @implements IUpdateAutomaticImprovementsRequest + * @constructor + * @param {google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest=} [properties] Properties to set + */ + function UpdateAutomaticImprovementsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAutomaticImprovementsRequest automaticImprovements. + * @member {google.shopping.merchant.accounts.v1beta.IAutomaticImprovements|null|undefined} automaticImprovements + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @instance + */ + UpdateAutomaticImprovementsRequest.prototype.automaticImprovements = null; + + /** + * UpdateAutomaticImprovementsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @instance + */ + UpdateAutomaticImprovementsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAutomaticImprovementsRequest instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest=} [properties] Properties to set + * @returns {google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest} UpdateAutomaticImprovementsRequest instance + */ + UpdateAutomaticImprovementsRequest.create = function create(properties) { + return new UpdateAutomaticImprovementsRequest(properties); + }; + + /** + * Encodes the specified UpdateAutomaticImprovementsRequest message. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest} message UpdateAutomaticImprovementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAutomaticImprovementsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.automaticImprovements != null && Object.hasOwnProperty.call(message, "automaticImprovements")) + $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements.encode(message.automaticImprovements, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateAutomaticImprovementsRequest message, length delimited. Does not implicitly {@link google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest} message UpdateAutomaticImprovementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAutomaticImprovementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAutomaticImprovementsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest} UpdateAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAutomaticImprovementsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.automaticImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAutomaticImprovementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest} UpdateAutomaticImprovementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAutomaticImprovementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAutomaticImprovementsRequest message. + * @function verify + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAutomaticImprovementsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.automaticImprovements != null && message.hasOwnProperty("automaticImprovements")) { + var error = $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements.verify(message.automaticImprovements); + if (error) + return "automaticImprovements." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateAutomaticImprovementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest} UpdateAutomaticImprovementsRequest + */ + UpdateAutomaticImprovementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest) + return object; + var message = new $root.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest(); + if (object.automaticImprovements != null) { + if (typeof object.automaticImprovements !== "object") + throw TypeError(".google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest.automaticImprovements: object expected"); + message.automaticImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements.fromObject(object.automaticImprovements); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAutomaticImprovementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest} message UpdateAutomaticImprovementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAutomaticImprovementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.automaticImprovements = null; + object.updateMask = null; + } + if (message.automaticImprovements != null && message.hasOwnProperty("automaticImprovements")) + object.automaticImprovements = $root.google.shopping.merchant.accounts.v1beta.AutomaticImprovements.toObject(message.automaticImprovements, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateAutomaticImprovementsRequest to JSON. + * @function toJSON + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAutomaticImprovementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAutomaticImprovementsRequest + * @function getTypeUrl + * @memberof google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAutomaticImprovementsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest"; + }; + + return UpdateAutomaticImprovementsRequest; + })(); + v1beta.BusinessIdentityService = (function() { /** diff --git a/packages/google-shopping-merchant-accounts/protos/protos.json b/packages/google-shopping-merchant-accounts/protos/protos.json index 8cbb8d053ee..fb482cf918d 100644 --- a/packages/google-shopping-merchant-accounts/protos/protos.json +++ b/packages/google-shopping-merchant-accounts/protos/protos.json @@ -1154,6 +1154,296 @@ } } }, + "AutomaticImprovementsService": { + "options": { + "(google.api.default_host)": "merchantapi.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/content" + }, + "methods": { + "GetAutomaticImprovements": { + "requestType": "GetAutomaticImprovementsRequest", + "responseType": "AutomaticImprovements", + "options": { + "(google.api.http).get": "/accounts/v1beta/{name=accounts/*/automaticImprovements}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/accounts/v1beta/{name=accounts/*/automaticImprovements}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAutomaticImprovements": { + "requestType": "UpdateAutomaticImprovementsRequest", + "responseType": "AutomaticImprovements", + "options": { + "(google.api.http).patch": "/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}", + "(google.api.http).body": "automatic_improvements", + "(google.api.method_signature)": "automatic_improvements,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/accounts/v1beta/{automatic_improvements.name=accounts/*/automaticImprovements}", + "body": "automatic_improvements" + } + }, + { + "(google.api.method_signature)": "automatic_improvements,update_mask" + } + ] + } + } + }, + "AutomaticImprovements": { + "options": { + "(google.api.resource).type": "merchantapi.googleapis.com/AutomaticImprovements", + "(google.api.resource).pattern": "accounts/{account}/automaticImprovements", + "(google.api.resource).plural": "automaticImprovements", + "(google.api.resource).singular": "automaticImprovements" + }, + "oneofs": { + "_itemUpdates": { + "oneof": [ + "itemUpdates" + ] + }, + "_imageImprovements": { + "oneof": [ + "imageImprovements" + ] + }, + "_shippingImprovements": { + "oneof": [ + "shippingImprovements" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "itemUpdates": { + "type": "AutomaticItemUpdates", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "imageImprovements": { + "type": "AutomaticImageImprovements", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "shippingImprovements": { + "type": "AutomaticShippingImprovements", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "AutomaticItemUpdates": { + "fields": { + "accountItemUpdatesSettings": { + "type": "ItemUpdatesAccountLevelSettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "effectiveAllowPriceUpdates": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveAllowAvailabilityUpdates": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveAllowStrictAvailabilityUpdates": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveAllowConditionUpdates": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ItemUpdatesAccountLevelSettings": { + "oneofs": { + "_allowPriceUpdates": { + "oneof": [ + "allowPriceUpdates" + ] + }, + "_allowAvailabilityUpdates": { + "oneof": [ + "allowAvailabilityUpdates" + ] + }, + "_allowStrictAvailabilityUpdates": { + "oneof": [ + "allowStrictAvailabilityUpdates" + ] + }, + "_allowConditionUpdates": { + "oneof": [ + "allowConditionUpdates" + ] + } + }, + "fields": { + "allowPriceUpdates": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "allowAvailabilityUpdates": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "allowStrictAvailabilityUpdates": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "allowConditionUpdates": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "AutomaticImageImprovements": { + "oneofs": { + "_accountImageImprovementsSettings": { + "oneof": [ + "accountImageImprovementsSettings" + ] + } + }, + "fields": { + "accountImageImprovementsSettings": { + "type": "ImageImprovementsAccountLevelSettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "effectiveAllowAutomaticImageImprovements": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ImageImprovementsAccountLevelSettings": { + "oneofs": { + "_allowAutomaticImageImprovements": { + "oneof": [ + "allowAutomaticImageImprovements" + ] + } + }, + "fields": { + "allowAutomaticImageImprovements": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "AutomaticShippingImprovements": { + "oneofs": { + "_allowShippingImprovements": { + "oneof": [ + "allowShippingImprovements" + ] + } + }, + "fields": { + "allowShippingImprovements": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, + "GetAutomaticImprovementsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "merchantapi.googleapis.com/AutomaticImprovements" + } + } + } + }, + "UpdateAutomaticImprovementsRequest": { + "fields": { + "automaticImprovements": { + "type": "AutomaticImprovements", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "BusinessIdentityService": { "options": { "(google.api.default_host)": "merchantapi.googleapis.com", diff --git a/packages/google-shopping-merchant-accounts/samples/README.md b/packages/google-shopping-merchant-accounts/samples/README.md index c05737ac0a8..9d90c584e00 100644 --- a/packages/google-shopping-merchant-accounts/samples/README.md +++ b/packages/google-shopping-merchant-accounts/samples/README.md @@ -24,6 +24,8 @@ * [Accounts_service.update_account](#accounts_service.update_account) * [Autofeed_settings_service.get_autofeed_settings](#autofeed_settings_service.get_autofeed_settings) * [Autofeed_settings_service.update_autofeed_settings](#autofeed_settings_service.update_autofeed_settings) + * [Automatic_improvements_service.get_automatic_improvements](#automatic_improvements_service.get_automatic_improvements) + * [Automatic_improvements_service.update_automatic_improvements](#automatic_improvements_service.update_automatic_improvements) * [Business_identity_service.get_business_identity](#business_identity_service.get_business_identity) * [Business_identity_service.update_business_identity](#business_identity_service.update_business_identity) * [Business_info_service.get_business_info](#business_info_service.get_business_info) @@ -278,6 +280,40 @@ __Usage:__ +### Automatic_improvements_service.get_automatic_improvements + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js,samples/README.md) + +__Usage:__ + + +`node packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js` + + +----- + + + + +### Automatic_improvements_service.update_automatic_improvements + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js,samples/README.md) + +__Usage:__ + + +`node packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js` + + +----- + + + + ### Business_identity_service.get_business_identity View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-accounts/samples/generated/v1beta/business_identity_service.get_business_identity.js). diff --git a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js new file mode 100644 index 00000000000..1d37985171e --- /dev/null +++ b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_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. + */ + /** + * Required. The resource name of the automatic improvements. + * Format: `accounts/{account}/automaticImprovements` + */ + // const name = 'abc123' + + // Imports the Accounts library + const {AutomaticImprovementsServiceClient} = require('@google-shopping/accounts').v1beta; + + // Instantiates a client + const accountsClient = new AutomaticImprovementsServiceClient(); + + async function callGetAutomaticImprovements() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await accountsClient.getAutomaticImprovements(request); + console.log(response); + } + + callGetAutomaticImprovements(); + // [END merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js new file mode 100644 index 00000000000..e4bea5051c1 --- /dev/null +++ b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js @@ -0,0 +1,74 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(automaticImprovements, updateMask) { + // [START merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_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. + */ + /** + * Required. The new version of the automatic imrovements. + */ + // const automaticImprovements = {} + /** + * Required. List of fields being updated. + * The following fields are supported (in both `snake_case` and + * `lowerCamelCase`): + * - `item_updates` + * - `item_updates.account_level_settings` + * - `image_improvements` + * - `image_improvements.account_level_settings` + * - `shipping_improvements` + * - `shipping_improvements.allow_shipping_improvements` + */ + // const updateMask = {} + + // Imports the Accounts library + const {AutomaticImprovementsServiceClient} = require('@google-shopping/accounts').v1beta; + + // Instantiates a client + const accountsClient = new AutomaticImprovementsServiceClient(); + + async function callUpdateAutomaticImprovements() { + // Construct request + const request = { + automaticImprovements, + updateMask, + }; + + // Run request + const response = await accountsClient.updateAutomaticImprovements(request); + console.log(response); + } + + callUpdateAutomaticImprovements(); + // [END merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json index bfd16ea1162..ea8062b1c16 100644 --- a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -559,6 +559,90 @@ } } }, + { + "regionTag": "merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_async", + "title": "AccountIssueService getAutomaticImprovements Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the automatic improvements of an account.", + "canonical": true, + "file": "automatic_improvements_service.get_automatic_improvements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAutomaticImprovements", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovements", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.shopping.merchant.accounts.v1beta.AutomaticImprovements", + "client": { + "shortName": "AutomaticImprovementsServiceClient", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsServiceClient" + }, + "method": { + "shortName": "GetAutomaticImprovements", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.GetAutomaticImprovements", + "service": { + "shortName": "AutomaticImprovementsService", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" + } + } + } + }, + { + "regionTag": "merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_async", + "title": "AccountIssueService updateAutomaticImprovements Sample", + "origin": "API_DEFINITION", + "description": " Updates the automatic improvements of an account.", + "canonical": true, + "file": "automatic_improvements_service.update_automatic_improvements.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAutomaticImprovements", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovements", + "async": true, + "parameters": [ + { + "name": "automatic_improvements", + "type": ".google.shopping.merchant.accounts.v1beta.AutomaticImprovements" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.shopping.merchant.accounts.v1beta.AutomaticImprovements", + "client": { + "shortName": "AutomaticImprovementsServiceClient", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsServiceClient" + }, + "method": { + "shortName": "UpdateAutomaticImprovements", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService.UpdateAutomaticImprovements", + "service": { + "shortName": "AutomaticImprovementsService", + "fullName": "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService" + } + } + } + }, { "regionTag": "merchantapi_v1beta_generated_BusinessIdentityService_GetBusinessIdentity_async", "title": "AccountIssueService getBusinessIdentity Sample", diff --git a/packages/google-shopping-merchant-accounts/src/index.ts b/packages/google-shopping-merchant-accounts/src/index.ts index 71a7d20e785..dbfc56ccf26 100644 --- a/packages/google-shopping-merchant-accounts/src/index.ts +++ b/packages/google-shopping-merchant-accounts/src/index.ts @@ -26,6 +26,10 @@ const AccountTaxServiceClient = v1beta.AccountTaxServiceClient; type AccountTaxServiceClient = v1beta.AccountTaxServiceClient; const AutofeedSettingsServiceClient = v1beta.AutofeedSettingsServiceClient; type AutofeedSettingsServiceClient = v1beta.AutofeedSettingsServiceClient; +const AutomaticImprovementsServiceClient = + v1beta.AutomaticImprovementsServiceClient; +type AutomaticImprovementsServiceClient = + v1beta.AutomaticImprovementsServiceClient; const BusinessIdentityServiceClient = v1beta.BusinessIdentityServiceClient; type BusinessIdentityServiceClient = v1beta.BusinessIdentityServiceClient; const BusinessInfoServiceClient = v1beta.BusinessInfoServiceClient; @@ -57,6 +61,7 @@ export { AccountsServiceClient, AccountTaxServiceClient, AutofeedSettingsServiceClient, + AutomaticImprovementsServiceClient, BusinessIdentityServiceClient, BusinessInfoServiceClient, EmailPreferencesServiceClient, @@ -75,6 +80,7 @@ export default { AccountsServiceClient, AccountTaxServiceClient, AutofeedSettingsServiceClient, + AutomaticImprovementsServiceClient, BusinessIdentityServiceClient, BusinessInfoServiceClient, EmailPreferencesServiceClient, diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts index a45dc13d871..e4e0c4ea4f4 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts @@ -214,6 +214,9 @@ export class AccountIssueServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -815,6 +818,31 @@ export class AccountIssueServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts index 2cabc4fabaf..1171872366f 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts @@ -218,6 +218,9 @@ export class AccountTaxServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -1036,6 +1039,31 @@ export class AccountTaxServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts index 4733b12f6d0..9fc7e6a924e 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts @@ -214,6 +214,9 @@ export class AccountsServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -1562,6 +1565,31 @@ export class AccountsServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts index 1993e9f33a6..087ad63a55f 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts @@ -214,6 +214,9 @@ export class AutofeedSettingsServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -798,6 +801,31 @@ export class AutofeedSettingsServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts new file mode 100644 index 00000000000..e9757f24e01 --- /dev/null +++ b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts @@ -0,0 +1,1210 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/automatic_improvements_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './automatic_improvements_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service to manage the automatic improvements of an account. The automatic + * improvements of the account can be used to automatically update products, + * improve images and shipping. + * @class + * @memberof v1beta + */ +export class AutomaticImprovementsServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('accounts'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + automaticImprovementsServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AutomaticImprovementsServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AutomaticImprovementsServiceClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof AutomaticImprovementsServiceClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'merchantapi.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + accountPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}' + ), + accountIssuePathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/issues/{issue}' + ), + accountTaxPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/accounttax/{tax}' + ), + autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/autofeedSettings' + ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), + businessIdentityPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/businessIdentity' + ), + businessInfoPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/businessInfo' + ), + emailPreferencesPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/users/{email}/emailPreferences' + ), + homepagePathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/homepage' + ), + onlineReturnPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/onlineReturnPolicies/{return_policy}' + ), + programPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/programs/{program}' + ), + regionPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/regions/{region}' + ), + shippingSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/shippingSettings' + ), + termsOfServicePathTemplate: new this._gaxModule.PathTemplate( + 'termsOfService/{version}' + ), + termsOfServiceAgreementStatePathTemplate: + new this._gaxModule.PathTemplate( + 'accounts/{account}/termsOfServiceAgreementStates/{identifier}' + ), + userPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/users/{email}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.automaticImprovementsServiceStub) { + return this.automaticImprovementsServiceStub; + } + + // Put together the "service stub" for + // google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService. + this.automaticImprovementsServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.shopping.merchant.accounts.v1beta + .AutomaticImprovementsService, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const automaticImprovementsServiceStubMethods = [ + 'getAutomaticImprovements', + 'updateAutomaticImprovements', + ]; + for (const methodName of automaticImprovementsServiceStubMethods) { + const callPromise = this.automaticImprovementsServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.automaticImprovementsServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'merchantapi.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'merchantapi.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/content']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Retrieves the automatic improvements of an account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the automatic improvements. + * Format: `accounts/{account}/automaticImprovements` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.shopping.merchant.accounts.v1beta.AutomaticImprovements|AutomaticImprovements}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/automatic_improvements_service.get_automatic_improvements.js + * region_tag:merchantapi_v1beta_generated_AutomaticImprovementsService_GetAutomaticImprovements_async + */ + getAutomaticImprovements( + request?: protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + ( + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | undefined + ), + {} | undefined, + ] + >; + getAutomaticImprovements( + request: protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest, + options: CallOptions, + callback: Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAutomaticImprovements( + request: protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest, + callback: Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAutomaticImprovements( + request?: protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + ( + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('getAutomaticImprovements request %j', request); + const wrappedCallback: + | Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAutomaticImprovements response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getAutomaticImprovements(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + ( + | protos.google.shopping.merchant.accounts.v1beta.IGetAutomaticImprovementsRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getAutomaticImprovements response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Updates the automatic improvements of an account. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.shopping.merchant.accounts.v1beta.AutomaticImprovements} request.automaticImprovements + * Required. The new version of the automatic imrovements. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. List of fields being updated. + * The following fields are supported (in both `snake_case` and + * `lowerCamelCase`): + * + * - `item_updates` + * - `item_updates.account_level_settings` + * - `image_improvements` + * - `image_improvements.account_level_settings` + * - `shipping_improvements` + * - `shipping_improvements.allow_shipping_improvements` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.shopping.merchant.accounts.v1beta.AutomaticImprovements|AutomaticImprovements}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/automatic_improvements_service.update_automatic_improvements.js + * region_tag:merchantapi_v1beta_generated_AutomaticImprovementsService_UpdateAutomaticImprovements_async + */ + updateAutomaticImprovements( + request?: protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + ( + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | undefined + ), + {} | undefined, + ] + >; + updateAutomaticImprovements( + request: protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest, + options: CallOptions, + callback: Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAutomaticImprovements( + request: protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest, + callback: Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAutomaticImprovements( + request?: protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + ( + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'automatic_improvements.name': + request.automaticImprovements!.name ?? '', + }); + this.initialize(); + this._log.info('updateAutomaticImprovements request %j', request); + const wrappedCallback: + | Callback< + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateAutomaticImprovements response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateAutomaticImprovements(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements, + ( + | protos.google.shopping.merchant.accounts.v1beta.IUpdateAutomaticImprovementsRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('updateAutomaticImprovements response %j', response); + return [response, options, rawResponse]; + } + ); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified account resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + accountPath(account: string) { + return this.pathTemplates.accountPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from Account resource. + * + * @param {string} accountName + * A fully-qualified path representing Account resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountName(accountName: string) { + return this.pathTemplates.accountPathTemplate.match(accountName).account; + } + + /** + * Return a fully-qualified accountIssue resource name string. + * + * @param {string} account + * @param {string} issue + * @returns {string} Resource name string. + */ + accountIssuePath(account: string, issue: string) { + return this.pathTemplates.accountIssuePathTemplate.render({ + account: account, + issue: issue, + }); + } + + /** + * Parse the account from AccountIssue resource. + * + * @param {string} accountIssueName + * A fully-qualified path representing AccountIssue resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountIssueName(accountIssueName: string) { + return this.pathTemplates.accountIssuePathTemplate.match(accountIssueName) + .account; + } + + /** + * Parse the issue from AccountIssue resource. + * + * @param {string} accountIssueName + * A fully-qualified path representing AccountIssue resource. + * @returns {string} A string representing the issue. + */ + matchIssueFromAccountIssueName(accountIssueName: string) { + return this.pathTemplates.accountIssuePathTemplate.match(accountIssueName) + .issue; + } + + /** + * Return a fully-qualified accountTax resource name string. + * + * @param {string} account + * @param {string} tax + * @returns {string} Resource name string. + */ + accountTaxPath(account: string, tax: string) { + return this.pathTemplates.accountTaxPathTemplate.render({ + account: account, + tax: tax, + }); + } + + /** + * Parse the account from AccountTax resource. + * + * @param {string} accountTaxName + * A fully-qualified path representing AccountTax resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountTaxName(accountTaxName: string) { + return this.pathTemplates.accountTaxPathTemplate.match(accountTaxName) + .account; + } + + /** + * Parse the tax from AccountTax resource. + * + * @param {string} accountTaxName + * A fully-qualified path representing AccountTax resource. + * @returns {string} A string representing the tax. + */ + matchTaxFromAccountTaxName(accountTaxName: string) { + return this.pathTemplates.accountTaxPathTemplate.match(accountTaxName).tax; + } + + /** + * Return a fully-qualified autofeedSettings resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + autofeedSettingsPath(account: string) { + return this.pathTemplates.autofeedSettingsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutofeedSettings resource. + * + * @param {string} autofeedSettingsName + * A fully-qualified path representing AutofeedSettings resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutofeedSettingsName(autofeedSettingsName: string) { + return this.pathTemplates.autofeedSettingsPathTemplate.match( + autofeedSettingsName + ).account; + } + + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + + /** + * Return a fully-qualified businessIdentity resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + businessIdentityPath(account: string) { + return this.pathTemplates.businessIdentityPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from BusinessIdentity resource. + * + * @param {string} businessIdentityName + * A fully-qualified path representing BusinessIdentity resource. + * @returns {string} A string representing the account. + */ + matchAccountFromBusinessIdentityName(businessIdentityName: string) { + return this.pathTemplates.businessIdentityPathTemplate.match( + businessIdentityName + ).account; + } + + /** + * Return a fully-qualified businessInfo resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + businessInfoPath(account: string) { + return this.pathTemplates.businessInfoPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from BusinessInfo resource. + * + * @param {string} businessInfoName + * A fully-qualified path representing BusinessInfo resource. + * @returns {string} A string representing the account. + */ + matchAccountFromBusinessInfoName(businessInfoName: string) { + return this.pathTemplates.businessInfoPathTemplate.match(businessInfoName) + .account; + } + + /** + * Return a fully-qualified emailPreferences resource name string. + * + * @param {string} account + * @param {string} email + * @returns {string} Resource name string. + */ + emailPreferencesPath(account: string, email: string) { + return this.pathTemplates.emailPreferencesPathTemplate.render({ + account: account, + email: email, + }); + } + + /** + * Parse the account from EmailPreferences resource. + * + * @param {string} emailPreferencesName + * A fully-qualified path representing EmailPreferences resource. + * @returns {string} A string representing the account. + */ + matchAccountFromEmailPreferencesName(emailPreferencesName: string) { + return this.pathTemplates.emailPreferencesPathTemplate.match( + emailPreferencesName + ).account; + } + + /** + * Parse the email from EmailPreferences resource. + * + * @param {string} emailPreferencesName + * A fully-qualified path representing EmailPreferences resource. + * @returns {string} A string representing the email. + */ + matchEmailFromEmailPreferencesName(emailPreferencesName: string) { + return this.pathTemplates.emailPreferencesPathTemplate.match( + emailPreferencesName + ).email; + } + + /** + * Return a fully-qualified homepage resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + homepagePath(account: string) { + return this.pathTemplates.homepagePathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from Homepage resource. + * + * @param {string} homepageName + * A fully-qualified path representing Homepage resource. + * @returns {string} A string representing the account. + */ + matchAccountFromHomepageName(homepageName: string) { + return this.pathTemplates.homepagePathTemplate.match(homepageName).account; + } + + /** + * Return a fully-qualified onlineReturnPolicy resource name string. + * + * @param {string} account + * @param {string} return_policy + * @returns {string} Resource name string. + */ + onlineReturnPolicyPath(account: string, returnPolicy: string) { + return this.pathTemplates.onlineReturnPolicyPathTemplate.render({ + account: account, + return_policy: returnPolicy, + }); + } + + /** + * Parse the account from OnlineReturnPolicy resource. + * + * @param {string} onlineReturnPolicyName + * A fully-qualified path representing OnlineReturnPolicy resource. + * @returns {string} A string representing the account. + */ + matchAccountFromOnlineReturnPolicyName(onlineReturnPolicyName: string) { + return this.pathTemplates.onlineReturnPolicyPathTemplate.match( + onlineReturnPolicyName + ).account; + } + + /** + * Parse the return_policy from OnlineReturnPolicy resource. + * + * @param {string} onlineReturnPolicyName + * A fully-qualified path representing OnlineReturnPolicy resource. + * @returns {string} A string representing the return_policy. + */ + matchReturnPolicyFromOnlineReturnPolicyName(onlineReturnPolicyName: string) { + return this.pathTemplates.onlineReturnPolicyPathTemplate.match( + onlineReturnPolicyName + ).return_policy; + } + + /** + * Return a fully-qualified program resource name string. + * + * @param {string} account + * @param {string} program + * @returns {string} Resource name string. + */ + programPath(account: string, program: string) { + return this.pathTemplates.programPathTemplate.render({ + account: account, + program: program, + }); + } + + /** + * Parse the account from Program resource. + * + * @param {string} programName + * A fully-qualified path representing Program resource. + * @returns {string} A string representing the account. + */ + matchAccountFromProgramName(programName: string) { + return this.pathTemplates.programPathTemplate.match(programName).account; + } + + /** + * Parse the program from Program resource. + * + * @param {string} programName + * A fully-qualified path representing Program resource. + * @returns {string} A string representing the program. + */ + matchProgramFromProgramName(programName: string) { + return this.pathTemplates.programPathTemplate.match(programName).program; + } + + /** + * Return a fully-qualified region resource name string. + * + * @param {string} account + * @param {string} region + * @returns {string} Resource name string. + */ + regionPath(account: string, region: string) { + return this.pathTemplates.regionPathTemplate.render({ + account: account, + region: region, + }); + } + + /** + * Parse the account from Region resource. + * + * @param {string} regionName + * A fully-qualified path representing Region resource. + * @returns {string} A string representing the account. + */ + matchAccountFromRegionName(regionName: string) { + return this.pathTemplates.regionPathTemplate.match(regionName).account; + } + + /** + * Parse the region from Region resource. + * + * @param {string} regionName + * A fully-qualified path representing Region resource. + * @returns {string} A string representing the region. + */ + matchRegionFromRegionName(regionName: string) { + return this.pathTemplates.regionPathTemplate.match(regionName).region; + } + + /** + * Return a fully-qualified shippingSettings resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + shippingSettingsPath(account: string) { + return this.pathTemplates.shippingSettingsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from ShippingSettings resource. + * + * @param {string} shippingSettingsName + * A fully-qualified path representing ShippingSettings resource. + * @returns {string} A string representing the account. + */ + matchAccountFromShippingSettingsName(shippingSettingsName: string) { + return this.pathTemplates.shippingSettingsPathTemplate.match( + shippingSettingsName + ).account; + } + + /** + * Return a fully-qualified termsOfService resource name string. + * + * @param {string} version + * @returns {string} Resource name string. + */ + termsOfServicePath(version: string) { + return this.pathTemplates.termsOfServicePathTemplate.render({ + version: version, + }); + } + + /** + * Parse the version from TermsOfService resource. + * + * @param {string} termsOfServiceName + * A fully-qualified path representing TermsOfService resource. + * @returns {string} A string representing the version. + */ + matchVersionFromTermsOfServiceName(termsOfServiceName: string) { + return this.pathTemplates.termsOfServicePathTemplate.match( + termsOfServiceName + ).version; + } + + /** + * Return a fully-qualified termsOfServiceAgreementState resource name string. + * + * @param {string} account + * @param {string} identifier + * @returns {string} Resource name string. + */ + termsOfServiceAgreementStatePath(account: string, identifier: string) { + return this.pathTemplates.termsOfServiceAgreementStatePathTemplate.render({ + account: account, + identifier: identifier, + }); + } + + /** + * Parse the account from TermsOfServiceAgreementState resource. + * + * @param {string} termsOfServiceAgreementStateName + * A fully-qualified path representing TermsOfServiceAgreementState resource. + * @returns {string} A string representing the account. + */ + matchAccountFromTermsOfServiceAgreementStateName( + termsOfServiceAgreementStateName: string + ) { + return this.pathTemplates.termsOfServiceAgreementStatePathTemplate.match( + termsOfServiceAgreementStateName + ).account; + } + + /** + * Parse the identifier from TermsOfServiceAgreementState resource. + * + * @param {string} termsOfServiceAgreementStateName + * A fully-qualified path representing TermsOfServiceAgreementState resource. + * @returns {string} A string representing the identifier. + */ + matchIdentifierFromTermsOfServiceAgreementStateName( + termsOfServiceAgreementStateName: string + ) { + return this.pathTemplates.termsOfServiceAgreementStatePathTemplate.match( + termsOfServiceAgreementStateName + ).identifier; + } + + /** + * Return a fully-qualified user resource name string. + * + * @param {string} account + * @param {string} email + * @returns {string} Resource name string. + */ + userPath(account: string, email: string) { + return this.pathTemplates.userPathTemplate.render({ + account: account, + email: email, + }); + } + + /** + * Parse the account from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the account. + */ + matchAccountFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).account; + } + + /** + * Parse the email from User resource. + * + * @param {string} userName + * A fully-qualified path representing User resource. + * @returns {string} A string representing the email. + */ + matchEmailFromUserName(userName: string) { + return this.pathTemplates.userPathTemplate.match(userName).email; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.automaticImprovementsServiceStub && !this._terminated) { + return this.automaticImprovementsServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client_config.json b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client_config.json new file mode 100644 index 00000000000..258dea52086 --- /dev/null +++ b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client_config.json @@ -0,0 +1,48 @@ +{ + "interfaces": { + "google.shopping.merchant.accounts.v1beta.AutomaticImprovementsService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAutomaticImprovements": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateAutomaticImprovements": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_proto_list.json new file mode 100644 index 00000000000..9147d1133ac --- /dev/null +++ b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_proto_list.json @@ -0,0 +1,25 @@ +[ + "../../protos/google/shopping/merchant/accounts/v1beta/accessright.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/account_tax.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/accountissue.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/emailpreferences.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/homepage.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/online_return_policy.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/programs.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/regions.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/shippingsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/tax_rule.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/termsofservice.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/termsofservicekind.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/user.proto", + "../../protos/google/shopping/type/types.proto" +] diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts index 477c4af4e43..8363edbef10 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts @@ -214,6 +214,9 @@ export class BusinessIdentityServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -799,6 +802,31 @@ export class BusinessIdentityServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts index db6ed018ae2..5c1e235eb60 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts @@ -212,6 +212,9 @@ export class BusinessInfoServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -797,6 +800,31 @@ export class BusinessInfoServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts index aa871146350..ecfc2322388 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts @@ -216,6 +216,9 @@ export class EmailPreferencesServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -813,6 +816,31 @@ export class EmailPreferencesServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/gapic_metadata.json b/packages/google-shopping-merchant-accounts/src/v1beta/gapic_metadata.json index effe3375d06..25aae806c96 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/gapic_metadata.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/gapic_metadata.json @@ -197,6 +197,40 @@ } } }, + "AutomaticImprovementsService": { + "clients": { + "grpc": { + "libraryClient": "AutomaticImprovementsServiceClient", + "rpcs": { + "GetAutomaticImprovements": { + "methods": [ + "getAutomaticImprovements" + ] + }, + "UpdateAutomaticImprovements": { + "methods": [ + "updateAutomaticImprovements" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AutomaticImprovementsServiceClient", + "rpcs": { + "GetAutomaticImprovements": { + "methods": [ + "getAutomaticImprovements" + ] + }, + "UpdateAutomaticImprovements": { + "methods": [ + "updateAutomaticImprovements" + ] + } + } + } + } + }, "BusinessIdentityService": { "clients": { "grpc": { diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts index f5fe195fb84..d0fcb3f7b7b 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts @@ -212,6 +212,9 @@ export class HomepageServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -1063,6 +1066,31 @@ export class HomepageServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/index.ts b/packages/google-shopping-merchant-accounts/src/v1beta/index.ts index b884cfd5e10..8469ce06aaa 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/index.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/index.ts @@ -20,6 +20,7 @@ export {AccountIssueServiceClient} from './account_issue_service_client'; export {AccountsServiceClient} from './accounts_service_client'; export {AccountTaxServiceClient} from './account_tax_service_client'; export {AutofeedSettingsServiceClient} from './autofeed_settings_service_client'; +export {AutomaticImprovementsServiceClient} from './automatic_improvements_service_client'; export {BusinessIdentityServiceClient} from './business_identity_service_client'; export {BusinessInfoServiceClient} from './business_info_service_client'; export {EmailPreferencesServiceClient} from './email_preferences_service_client'; diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts index 8e5e5aaaa92..6e9d8d5f621 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts @@ -219,6 +219,9 @@ export class OnlineReturnPolicyServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -937,6 +940,31 @@ export class OnlineReturnPolicyServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts index 6c29ad9a3b1..24574d47324 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts @@ -224,6 +224,9 @@ export class ProgramsServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -1174,6 +1177,31 @@ export class ProgramsServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts index b2b841b4232..553aaf47aa0 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts @@ -218,6 +218,9 @@ export class RegionsServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -1316,6 +1319,31 @@ export class RegionsServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts index 840e36438c2..1aa67da1af2 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts @@ -214,6 +214,9 @@ export class ShippingSettingsServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -800,6 +803,31 @@ export class ShippingSettingsServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts index dcca823ff11..bdd63d5ce1f 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts @@ -213,6 +213,9 @@ export class TermsOfServiceAgreementStateServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -816,6 +819,31 @@ export class TermsOfServiceAgreementStateServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts index 3bf6dd5cf5b..dd0915e0e19 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts @@ -213,6 +213,9 @@ export class TermsOfServiceServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -929,6 +932,31 @@ export class TermsOfServiceServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts index 313ff7f0c00..8078f61b043 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts @@ -214,6 +214,9 @@ export class UserServiceClient { autofeedSettingsPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/autofeedSettings' ), + automaticImprovementsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/automaticImprovements' + ), businessIdentityPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/businessIdentity' ), @@ -1317,6 +1320,31 @@ export class UserServiceClient { ).account; } + /** + * Return a fully-qualified automaticImprovements resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + automaticImprovementsPath(account: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from AutomaticImprovements resource. + * + * @param {string} automaticImprovementsName + * A fully-qualified path representing AutomaticImprovements resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAutomaticImprovementsName(automaticImprovementsName: string) { + return this.pathTemplates.automaticImprovementsPathTemplate.match( + automaticImprovementsName + ).account; + } + /** * Return a fully-qualified businessIdentity resource name string. * diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/user_service_proto_list.json b/packages/google-shopping-merchant-accounts/src/v1beta/user_service_proto_list.json index 28ca4b888d3..9147d1133ac 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/user_service_proto_list.json +++ b/packages/google-shopping-merchant-accounts/src/v1beta/user_service_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/shopping/merchant/accounts/v1beta/accounts.proto", "../../protos/google/shopping/merchant/accounts/v1beta/accountservices.proto", "../../protos/google/shopping/merchant/accounts/v1beta/autofeedsettings.proto", + "../../protos/google/shopping/merchant/accounts/v1beta/automaticimprovements.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessidentity.proto", "../../protos/google/shopping/merchant/accounts/v1beta/businessinfo.proto", "../../protos/google/shopping/merchant/accounts/v1beta/customerservice.proto", diff --git a/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.js b/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.js index ab44a5e4246..a6590e5f3a2 100644 --- a/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.js +++ b/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.js @@ -25,6 +25,8 @@ function main() { const accountTaxServiceClient = new accounts.AccountTaxServiceClient(); const autofeedSettingsServiceClient = new accounts.AutofeedSettingsServiceClient(); + const automaticImprovementsServiceClient = + new accounts.AutomaticImprovementsServiceClient(); const businessIdentityServiceClient = new accounts.BusinessIdentityServiceClient(); const businessInfoServiceClient = new accounts.BusinessInfoServiceClient(); diff --git a/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.ts b/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.ts index dbf5643b53b..3f509b03477 100644 --- a/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.ts +++ b/packages/google-shopping-merchant-accounts/system-test/fixtures/sample/src/index.ts @@ -21,6 +21,7 @@ import { AccountsServiceClient, AccountTaxServiceClient, AutofeedSettingsServiceClient, + AutomaticImprovementsServiceClient, BusinessIdentityServiceClient, BusinessInfoServiceClient, EmailPreferencesServiceClient, @@ -51,6 +52,11 @@ function doStuffWithAutofeedSettingsServiceClient( ) { client.close(); } +function doStuffWithAutomaticImprovementsServiceClient( + client: AutomaticImprovementsServiceClient +) { + client.close(); +} function doStuffWithBusinessIdentityServiceClient( client: BusinessIdentityServiceClient ) { @@ -113,6 +119,12 @@ function main() { const autofeedSettingsServiceClient = new AutofeedSettingsServiceClient(); doStuffWithAutofeedSettingsServiceClient(autofeedSettingsServiceClient); // check that the client instance can be created + const automaticImprovementsServiceClient = + new AutomaticImprovementsServiceClient(); + doStuffWithAutomaticImprovementsServiceClient( + automaticImprovementsServiceClient + ); + // check that the client instance can be created const businessIdentityServiceClient = new BusinessIdentityServiceClient(); doStuffWithBusinessIdentityServiceClient(businessIdentityServiceClient); // check that the client instance can be created diff --git a/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts index 6e45a2590de..3a5a1d525d3 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts @@ -845,6 +845,52 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new accountissueserviceModule.v1beta.AccountIssueServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts index 2d8cf5eb8de..2c4d1e23d89 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts @@ -1137,6 +1137,53 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = new accounttaxserviceModule.v1beta.AccountTaxServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts index 4eb9bb61ce7..f5c9912a419 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts @@ -1546,6 +1546,51 @@ describe('v1beta.AccountsServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = new accountsserviceModule.v1beta.AccountsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts index 4d71bdeef13..b5064941c31 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts @@ -720,6 +720,52 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new autofeedsettingsserviceModule.v1beta.AutofeedSettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts new file mode 100644 index 00000000000..e9ab313b36f --- /dev/null +++ b/packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts @@ -0,0 +1,1367 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as automaticimprovementsserviceModule from '../src'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1beta.AutomaticImprovementsServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'merchantapi.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + automaticimprovementsserviceModule.v1beta + .AutomaticImprovementsServiceClient.servicePath; + assert.strictEqual(servicePath, 'merchantapi.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + automaticimprovementsserviceModule.v1beta + .AutomaticImprovementsServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'merchantapi.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + {universeDomain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'merchantapi.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + {universe_domain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'merchantapi.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'merchantapi.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + {universeDomain: 'configured.example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'merchantapi.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + {universe_domain: 'example.com', universeDomain: 'example.net'} + ); + }); + }); + + it('has port', () => { + const port = + automaticimprovementsserviceModule.v1beta + .AutomaticImprovementsServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.automaticImprovementsServiceStub, undefined); + await client.initialize(); + assert(client.automaticImprovementsServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.automaticImprovementsServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.automaticImprovementsServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + 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 automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + 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('getAutomaticImprovements', () => { + it('invokes getAutomaticImprovements without error', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.AutomaticImprovements() + ); + client.innerApiCalls.getAutomaticImprovements = + stubSimpleCall(expectedResponse); + const [response] = await client.getAutomaticImprovements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAutomaticImprovements as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutomaticImprovements as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomaticImprovements without error using callback', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.AutomaticImprovements() + ); + client.innerApiCalls.getAutomaticImprovements = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAutomaticImprovements( + request, + ( + err?: Error | null, + result?: protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAutomaticImprovements as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutomaticImprovements as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomaticImprovements with error', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAutomaticImprovements = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getAutomaticImprovements(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getAutomaticImprovements as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutomaticImprovements as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomaticImprovements with closed client', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getAutomaticImprovements(request), + expectedError + ); + }); + }); + + describe('updateAutomaticImprovements', () => { + it('invokes updateAutomaticImprovements without error', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() + ); + request.automaticImprovements ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest', + ['automaticImprovements', 'name'] + ); + request.automaticImprovements.name = defaultValue1; + const expectedHeaderRequestParams = `automatic_improvements.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.AutomaticImprovements() + ); + client.innerApiCalls.updateAutomaticImprovements = + stubSimpleCall(expectedResponse); + const [response] = await client.updateAutomaticImprovements(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAutomaticImprovements as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutomaticImprovements as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomaticImprovements without error using callback', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() + ); + request.automaticImprovements ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest', + ['automaticImprovements', 'name'] + ); + request.automaticImprovements.name = defaultValue1; + const expectedHeaderRequestParams = `automatic_improvements.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.AutomaticImprovements() + ); + client.innerApiCalls.updateAutomaticImprovements = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAutomaticImprovements( + request, + ( + err?: Error | null, + result?: protos.google.shopping.merchant.accounts.v1beta.IAutomaticImprovements | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAutomaticImprovements as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutomaticImprovements as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomaticImprovements with error', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() + ); + request.automaticImprovements ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest', + ['automaticImprovements', 'name'] + ); + request.automaticImprovements.name = defaultValue1; + const expectedHeaderRequestParams = `automatic_improvements.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutomaticImprovements = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateAutomaticImprovements(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateAutomaticImprovements as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutomaticImprovements as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomaticImprovements with closed client', async () => { + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() + ); + request.automaticImprovements ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest', + ['automaticImprovements', 'name'] + ); + request.automaticImprovements.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateAutomaticImprovements(request), + expectedError + ); + }); + }); + + describe('Path templates', () => { + describe('account', () => { + const fakePath = '/rendered/path/account'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.accountPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountPath', () => { + const result = client.accountPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAccountName', () => { + const result = client.matchAccountFromAccountName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('accountIssue', () => { + const fakePath = '/rendered/path/accountIssue'; + const expectedParameters = { + account: 'accountValue', + issue: 'issueValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.accountIssuePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountIssuePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountIssuePath', () => { + const result = client.accountIssuePath('accountValue', 'issueValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountIssuePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAccountIssueName', () => { + const result = client.matchAccountFromAccountIssueName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.accountIssuePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIssueFromAccountIssueName', () => { + const result = client.matchIssueFromAccountIssueName(fakePath); + assert.strictEqual(result, 'issueValue'); + assert( + (client.pathTemplates.accountIssuePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('accountTax', () => { + const fakePath = '/rendered/path/accountTax'; + const expectedParameters = { + account: 'accountValue', + tax: 'taxValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.accountTaxPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountTaxPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountTaxPath', () => { + const result = client.accountTaxPath('accountValue', 'taxValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountTaxPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAccountTaxName', () => { + const result = client.matchAccountFromAccountTaxName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.accountTaxPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaxFromAccountTaxName', () => { + const result = client.matchTaxFromAccountTaxName(fakePath); + assert.strictEqual(result, 'taxValue'); + assert( + (client.pathTemplates.accountTaxPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('autofeedSettings', () => { + const fakePath = '/rendered/path/autofeedSettings'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.autofeedSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.autofeedSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('autofeedSettingsPath', () => { + const result = client.autofeedSettingsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.autofeedSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutofeedSettingsName', () => { + const result = client.matchAccountFromAutofeedSettingsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.autofeedSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('businessIdentity', () => { + const fakePath = '/rendered/path/businessIdentity'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.businessIdentityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.businessIdentityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('businessIdentityPath', () => { + const result = client.businessIdentityPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.businessIdentityPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromBusinessIdentityName', () => { + const result = client.matchAccountFromBusinessIdentityName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.businessIdentityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('businessInfo', () => { + const fakePath = '/rendered/path/businessInfo'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.businessInfoPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.businessInfoPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('businessInfoPath', () => { + const result = client.businessInfoPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.businessInfoPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromBusinessInfoName', () => { + const result = client.matchAccountFromBusinessInfoName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.businessInfoPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('emailPreferences', () => { + const fakePath = '/rendered/path/emailPreferences'; + const expectedParameters = { + account: 'accountValue', + email: 'emailValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.emailPreferencesPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.emailPreferencesPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('emailPreferencesPath', () => { + const result = client.emailPreferencesPath( + 'accountValue', + 'emailValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.emailPreferencesPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromEmailPreferencesName', () => { + const result = client.matchAccountFromEmailPreferencesName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.emailPreferencesPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEmailFromEmailPreferencesName', () => { + const result = client.matchEmailFromEmailPreferencesName(fakePath); + assert.strictEqual(result, 'emailValue'); + assert( + (client.pathTemplates.emailPreferencesPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('homepage', () => { + const fakePath = '/rendered/path/homepage'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.homepagePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.homepagePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('homepagePath', () => { + const result = client.homepagePath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.homepagePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromHomepageName', () => { + const result = client.matchAccountFromHomepageName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.homepagePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('onlineReturnPolicy', () => { + const fakePath = '/rendered/path/onlineReturnPolicy'; + const expectedParameters = { + account: 'accountValue', + return_policy: 'returnPolicyValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.onlineReturnPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('onlineReturnPolicyPath', () => { + const result = client.onlineReturnPolicyPath( + 'accountValue', + 'returnPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.onlineReturnPolicyPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromOnlineReturnPolicyName', () => { + const result = client.matchAccountFromOnlineReturnPolicyName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.onlineReturnPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReturnPolicyFromOnlineReturnPolicyName', () => { + const result = + client.matchReturnPolicyFromOnlineReturnPolicyName(fakePath); + assert.strictEqual(result, 'returnPolicyValue'); + assert( + ( + client.pathTemplates.onlineReturnPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('program', () => { + const fakePath = '/rendered/path/program'; + const expectedParameters = { + account: 'accountValue', + program: 'programValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.programPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.programPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('programPath', () => { + const result = client.programPath('accountValue', 'programValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.programPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromProgramName', () => { + const result = client.matchAccountFromProgramName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.programPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchProgramFromProgramName', () => { + const result = client.matchProgramFromProgramName(fakePath); + assert.strictEqual(result, 'programValue'); + assert( + (client.pathTemplates.programPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('region', () => { + const fakePath = '/rendered/path/region'; + const expectedParameters = { + account: 'accountValue', + region: 'regionValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.regionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.regionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('regionPath', () => { + const result = client.regionPath('accountValue', 'regionValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.regionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromRegionName', () => { + const result = client.matchAccountFromRegionName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.regionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRegionFromRegionName', () => { + const result = client.matchRegionFromRegionName(fakePath); + assert.strictEqual(result, 'regionValue'); + assert( + (client.pathTemplates.regionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('shippingSettings', () => { + const fakePath = '/rendered/path/shippingSettings'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.shippingSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.shippingSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('shippingSettingsPath', () => { + const result = client.shippingSettingsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.shippingSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromShippingSettingsName', () => { + const result = client.matchAccountFromShippingSettingsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.shippingSettingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('termsOfService', () => { + const fakePath = '/rendered/path/termsOfService'; + const expectedParameters = { + version: 'versionValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.termsOfServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.termsOfServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('termsOfServicePath', () => { + const result = client.termsOfServicePath('versionValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.termsOfServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchVersionFromTermsOfServiceName', () => { + const result = client.matchVersionFromTermsOfServiceName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.termsOfServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('termsOfServiceAgreementState', () => { + const fakePath = '/rendered/path/termsOfServiceAgreementState'; + const expectedParameters = { + account: 'accountValue', + identifier: 'identifierValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('termsOfServiceAgreementStatePath', () => { + const result = client.termsOfServiceAgreementStatePath( + 'accountValue', + 'identifierValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.termsOfServiceAgreementStatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromTermsOfServiceAgreementStateName', () => { + const result = + client.matchAccountFromTermsOfServiceAgreementStateName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.termsOfServiceAgreementStatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIdentifierFromTermsOfServiceAgreementStateName', () => { + const result = + client.matchIdentifierFromTermsOfServiceAgreementStateName(fakePath); + assert.strictEqual(result, 'identifierValue'); + assert( + ( + client.pathTemplates.termsOfServiceAgreementStatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('user', () => { + const fakePath = '/rendered/path/user'; + const expectedParameters = { + account: 'accountValue', + email: 'emailValue', + }; + const client = + new automaticimprovementsserviceModule.v1beta.AutomaticImprovementsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.userPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.userPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('userPath', () => { + const result = client.userPath('accountValue', 'emailValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.userPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromUserName', () => { + const result = client.matchAccountFromUserName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEmailFromUserName', () => { + const result = client.matchEmailFromUserName(fakePath); + assert.strictEqual(result, 'emailValue'); + assert( + (client.pathTemplates.userPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts index f2ac7fedb05..2ea76ded030 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts @@ -720,6 +720,52 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new businessidentityserviceModule.v1beta.BusinessIdentityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts index 7713d20f820..5255b86f20b 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts @@ -713,6 +713,52 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new businessinfoserviceModule.v1beta.BusinessInfoServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts index 350258108e4..d3e2ebcf7e3 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts @@ -720,6 +720,52 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new emailpreferencesserviceModule.v1beta.EmailPreferencesServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts index 4e163cb99a4..510502c3893 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts @@ -945,6 +945,51 @@ describe('v1beta.HomepageServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = new homepageserviceModule.v1beta.HomepageServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts index 7c61d893a5a..bc8d3e5c803 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts @@ -1052,6 +1052,54 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new onlinereturnpolicyserviceModule.v1beta.OnlineReturnPolicyServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts index cafd5c3b519..a6aed506cc9 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts @@ -1211,6 +1211,51 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = new programsserviceModule.v1beta.ProgramsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts index 0980ad47684..146f8d27981 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts @@ -1343,6 +1343,51 @@ describe('v1beta.RegionsServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = new regionsserviceModule.v1beta.RegionsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts index 9d6bf96fa01..64473be2903 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts @@ -716,6 +716,52 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new shippingsettingsserviceModule.v1beta.ShippingSettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts index c9c525cc2e6..ae2c8ee74ad 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts @@ -771,6 +771,54 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new termsofserviceagreementstateserviceModule.v1beta.TermsOfServiceAgreementStateServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts index 9f99e396c0f..d3d81754eb5 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts @@ -803,6 +803,52 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new termsofserviceserviceModule.v1beta.TermsOfServiceServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { diff --git a/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts index 851e1ca9129..802e178ee63 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts @@ -1334,6 +1334,51 @@ describe('v1beta.UserServiceClient', () => { }); }); + describe('automaticImprovements', () => { + const fakePath = '/rendered/path/automaticImprovements'; + const expectedParameters = { + account: 'accountValue', + }; + const client = new userserviceModule.v1beta.UserServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automaticImprovementsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automaticImprovementsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automaticImprovementsPath', () => { + const result = client.automaticImprovementsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAutomaticImprovementsName', () => { + const result = + client.matchAccountFromAutomaticImprovementsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.automaticImprovementsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('businessIdentity', () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { From 153866c5ec36b7c7740b77d6a1a18b89afccb9f8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:23:00 -0700 Subject: [PATCH 04/34] feat: [merchantapi] Add a new destinations field (#6154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add a new destinations field docs: A comment for field `promotion_data_source` in message `.google.shopping.merchant.datasources.v1beta.DataSource` is changed docs: A comment for field `channel` in message `.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource` is changed PiperOrigin-RevId: 736533159 Source-Link: https://github.com/googleapis/googleapis/commit/b2fc92c85219ec4283b877abdfef688269d26e8a Source-Link: https://github.com/googleapis/googleapis-gen/commit/112b55ab5ae499895e88439b0f86e88054c7db2e Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFzb3VyY2VzLy5Pd2xCb3QueWFtbCIsImgiOiIxMTJiNTVhYjVhZTQ5OTg5NWU4ODQzOWIwZjg2ZTg4MDU0YzdkYjJlIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../datasources/v1beta/datasources.proto | 5 +- .../datasources/v1beta/datasourcetypes.proto | 48 +- .../protos/google/shopping/type/types.proto | 193 ++ .../protos/protos.d.ts | 782 +++++++ .../protos/protos.js | 1843 ++++++++++++++++- .../protos/protos.json | 193 ++ .../data_sources_service_proto_list.json | 3 +- .../file_uploads_service_proto_list.json | 3 +- 8 files changed, 3062 insertions(+), 8 deletions(-) create mode 100644 packages/google-shopping-merchant-datasources/protos/google/shopping/type/types.proto diff --git a/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasources.proto b/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasources.proto index 642a872b598..6010fa9fa30 100644 --- a/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasources.proto +++ b/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasources.proto @@ -167,9 +167,8 @@ message DataSource { // source. RegionalInventoryDataSource regional_inventory_data_source = 7; - // The - // [promotion](https://support.google.com/merchants/answer/2906014) data - // source. + // The [promotion](https://support.google.com/merchants/answer/2906014) + // data source. PromotionDataSource promotion_data_source = 8; // The [product diff --git a/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto b/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto index a20763c05bb..a68bbc505c2 100644 --- a/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto +++ b/packages/google-shopping-merchant-datasources/protos/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.shopping.merchant.datasources.v1beta; import "google/api/field_behavior.proto"; +import "google/shopping/type/types.proto"; option csharp_namespace = "Google.Shopping.Merchant.DataSources.V1Beta"; option go_package = "cloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb;datasourcespb"; @@ -54,6 +55,29 @@ message PrimaryProductDataSource { [(google.api.field_behavior) = REQUIRED]; } + // Destinations also known as [Marketing + // methods](https://support.google.com/merchants/answer/15130232) selections. + message Destination { + // The state of the destination. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // Indicates that the destination is enabled. + ENABLED = 1; + + // Indicates that the destination is disabled. + DISABLED = 2; + } + + // [Marketing methods](https://support.google.com/merchants/answer/15130232) + // (also known as destination) selections. + google.shopping.type.Destination.DestinationEnum destination = 1; + + // The state of the destination. + State state = 2; + } + // Data Source Channel. // // Channel is used to distinguish between data sources for different product @@ -74,9 +98,9 @@ message PrimaryProductDataSource { PRODUCTS = 3; } - // Required. Immutable. Specifies the type of data source channel. + // Optional. Immutable. Specifies the type of data source channel. Channel channel = 3 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = IMMUTABLE ]; @@ -123,6 +147,26 @@ message PrimaryProductDataSource { // Optional. Default rule management of the data source. If set, the linked // data sources will be replaced. DefaultRule default_rule = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of destinations describing where products of the data + // source can be shown. + // + // When retrieving the data source, the list contains all the destinations + // that can be used for the data source, including the ones that are disabled + // for the data source but enabled for the account. + // + // Only destinations that are enabled on the account, for example through + // program participation, can be enabled on the data source. + // + // If unset, during creation, the destinations will be inherited based on the + // account level program participation. + // + // If set, during creation or update, the data source will be set only for the + // specified destinations. + // + // Updating this field requires at least one destination. + repeated Destination destinations = 10 + [(google.api.field_behavior) = OPTIONAL]; } // The supplemental data source for local and online products. After creation, diff --git a/packages/google-shopping-merchant-datasources/protos/google/shopping/type/types.proto b/packages/google-shopping-merchant-datasources/protos/google/shopping/type/types.proto new file mode 100644 index 00000000000..641bcf066cb --- /dev/null +++ b/packages/google-shopping-merchant-datasources/protos/google/shopping/type/types.proto @@ -0,0 +1,193 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.shopping.type; + +option csharp_namespace = "Google.Shopping.Type"; +option go_package = "cloud.google.com/go/shopping/type/typepb;typepb"; +option java_multiple_files = true; +option java_outer_classname = "TypesProto"; +option java_package = "com.google.shopping.type"; + +// The weight represented as the value in string and the unit. +message Weight { + // The weight unit. + enum WeightUnit { + // unit unspecified + WEIGHT_UNIT_UNSPECIFIED = 0; + + // lb unit. + POUND = 1; + + // kg unit. + KILOGRAM = 2; + } + + // Required. The weight represented as a number in micros (1 million micros is + // an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + // micros). + // This field can also be set as infinity by setting to -1. + // This field only support -1 and positive value. + optional int64 amount_micros = 1; + + // Required. The weight unit. + // Acceptable values are: kg and lb + WeightUnit unit = 2; +} + +// The price represented as a number and currency. +message Price { + // The price represented as a number in micros (1 million micros is an + // equivalent to one's currency standard unit, for example, 1 USD = 1000000 + // micros). + optional int64 amount_micros = 1; + + // The currency of the price using three-letter acronyms according to [ISO + // 4217](http://en.wikipedia.org/wiki/ISO_4217). + optional string currency_code = 2; +} + +// A message that represents custom attributes. Exactly one of `value` or +// `group_values` must not be empty. +message CustomAttribute { + // The name of the attribute. + optional string name = 1; + + // The value of the attribute. If `value` is not empty, `group_values` must be + // empty. + optional string value = 2; + + // Subattributes within this attribute group. If + // `group_values` is not empty, `value` must be empty. + repeated CustomAttribute group_values = 3; +} + +// Destinations available for a product. +// +// Destinations are used in Merchant Center to allow you to control where the +// products from your data feed should be displayed. +// +message Destination { + // Destination values. + enum DestinationEnum { + // Not specified. + DESTINATION_ENUM_UNSPECIFIED = 0; + + // [Shopping ads](https://support.google.com/google-ads/answer/2454022). + SHOPPING_ADS = 1; + + // [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 2; + + // [Local inventory + // ads](https://support.google.com/merchants/answer/3057972). + LOCAL_INVENTORY_ADS = 3; + + // [Free listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 4; + + // [Free local product + // listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 5; + + // [YouTube Shopping](https://support.google.com/merchants/answer/12362804). + YOUTUBE_SHOPPING = 6; + } +} + +// Reporting contexts that your account and product issues apply to. +// +// Reporting contexts are groups of surfaces and formats for product results on +// Google. They can represent the entire destination (for example, [Shopping +// ads](https://support.google.com/merchants/answer/6149970)) or a subset of +// formats within a destination (for example, [Demand Gen +// ads](https://support.google.com/merchants/answer/13389785)). +// +message ReportingContext { + // Reporting context values. + enum ReportingContextEnum { + // Not specified. + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0; + + // [Shopping ads](https://support.google.com/merchants/answer/6149970). + SHOPPING_ADS = 1; + + // Deprecated: Use `DEMAND_GEN_ADS` instead. + // [Discovery and Demand Gen + // ads](https://support.google.com/merchants/answer/13389785). + DISCOVERY_ADS = 2 [deprecated = true]; + + // [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS = 13; + + // [Demand Gen ads on Discover + // surface](https://support.google.com/merchants/answer/13389785). + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14; + + // [Video ads](https://support.google.com/google-ads/answer/6340491). + VIDEO_ADS = 3; + + // [Display ads](https://support.google.com/merchants/answer/6069387). + DISPLAY_ADS = 4; + + // [Local inventory + // ads](https://support.google.com/merchants/answer/3271956). + LOCAL_INVENTORY_ADS = 5; + + // [Vehicle inventory + // ads](https://support.google.com/merchants/answer/11544533). + VEHICLE_INVENTORY_ADS = 6; + + // [Free product + // listings](https://support.google.com/merchants/answer/9199328). + FREE_LISTINGS = 7; + + // [Free local product + // listings](https://support.google.com/merchants/answer/9825611). + FREE_LOCAL_LISTINGS = 8; + + // [Free local vehicle + // listings](https://support.google.com/merchants/answer/11544533). + FREE_LOCAL_VEHICLE_LISTINGS = 9; + + // [YouTube + // Shopping](https://support.google.com/merchants/answer/13478370). + YOUTUBE_SHOPPING = 10; + + // [Cloud retail](https://cloud.google.com/solutions/retail). + CLOUD_RETAIL = 11; + + // [Local cloud retail](https://cloud.google.com/solutions/retail). + LOCAL_CLOUD_RETAIL = 12; + } +} + +// [Channel](https://support.google.com/merchants/answer/7361332) of a product. +// +// Channel is used to distinguish between online and local products. +message Channel { + // Channel values. + enum ChannelEnum { + // Not specified. + CHANNEL_ENUM_UNSPECIFIED = 0; + + // Online product. + ONLINE = 1; + + // Local product. + LOCAL = 2; + } +} diff --git a/packages/google-shopping-merchant-datasources/protos/protos.d.ts b/packages/google-shopping-merchant-datasources/protos/protos.d.ts index 9eda3e0d2a9..6ead19bc01b 100644 --- a/packages/google-shopping-merchant-datasources/protos/protos.d.ts +++ b/packages/google-shopping-merchant-datasources/protos/protos.d.ts @@ -1083,6 +1083,9 @@ export namespace google { /** PrimaryProductDataSource defaultRule */ defaultRule?: (google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDefaultRule|null); + + /** PrimaryProductDataSource destinations */ + destinations?: (google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination[]|null); } /** Represents a PrimaryProductDataSource. */ @@ -1109,6 +1112,9 @@ export namespace google { /** PrimaryProductDataSource defaultRule. */ public defaultRule?: (google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDefaultRule|null); + /** PrimaryProductDataSource destinations. */ + public destinations: google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination[]; + /** PrimaryProductDataSource _feedLabel. */ public _feedLabel?: "feedLabel"; @@ -1292,6 +1298,119 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a Destination. */ + interface IDestination { + + /** Destination destination */ + destination?: (google.shopping.type.Destination.DestinationEnum|keyof typeof google.shopping.type.Destination.DestinationEnum|null); + + /** Destination state */ + state?: (google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State|keyof typeof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State|null); + } + + /** Represents a Destination. */ + class Destination implements IDestination { + + /** + * Constructs a new Destination. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination); + + /** Destination destination. */ + public destination: (google.shopping.type.Destination.DestinationEnum|keyof typeof google.shopping.type.Destination.DestinationEnum); + + /** Destination state. */ + public state: (google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State|keyof typeof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State); + + /** + * Creates a new Destination instance using the specified properties. + * @param [properties] Properties to set + * @returns Destination instance + */ + public static create(properties?: google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination): google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination; + + /** + * Verifies a Destination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Destination + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @param message Destination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Destination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Destination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Destination { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + } + /** Channel enum. */ enum Channel { CHANNEL_UNSPECIFIED = 0, @@ -2726,6 +2845,669 @@ export namespace google { } } } + + /** Namespace type. */ + namespace type { + + /** Properties of a Weight. */ + interface IWeight { + + /** Weight amountMicros */ + amountMicros?: (number|Long|string|null); + + /** Weight unit */ + unit?: (google.shopping.type.Weight.WeightUnit|keyof typeof google.shopping.type.Weight.WeightUnit|null); + } + + /** Represents a Weight. */ + class Weight implements IWeight { + + /** + * Constructs a new Weight. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.type.IWeight); + + /** Weight amountMicros. */ + public amountMicros?: (number|Long|string|null); + + /** Weight unit. */ + public unit: (google.shopping.type.Weight.WeightUnit|keyof typeof google.shopping.type.Weight.WeightUnit); + + /** Weight _amountMicros. */ + public _amountMicros?: "amountMicros"; + + /** + * Creates a new Weight instance using the specified properties. + * @param [properties] Properties to set + * @returns Weight instance + */ + public static create(properties?: google.shopping.type.IWeight): google.shopping.type.Weight; + + /** + * Encodes the specified Weight message. Does not implicitly {@link google.shopping.type.Weight.verify|verify} messages. + * @param message Weight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.type.IWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Weight message, length delimited. Does not implicitly {@link google.shopping.type.Weight.verify|verify} messages. + * @param message Weight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.type.IWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Weight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Weight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.type.Weight; + + /** + * Decodes a Weight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Weight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.type.Weight; + + /** + * Verifies a Weight message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Weight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Weight + */ + public static fromObject(object: { [k: string]: any }): google.shopping.type.Weight; + + /** + * Creates a plain object from a Weight message. Also converts values to other types if specified. + * @param message Weight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.type.Weight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Weight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Weight + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Weight { + + /** WeightUnit enum. */ + enum WeightUnit { + WEIGHT_UNIT_UNSPECIFIED = 0, + POUND = 1, + KILOGRAM = 2 + } + } + + /** Properties of a Price. */ + interface IPrice { + + /** Price amountMicros */ + amountMicros?: (number|Long|string|null); + + /** Price currencyCode */ + currencyCode?: (string|null); + } + + /** Represents a Price. */ + class Price implements IPrice { + + /** + * Constructs a new Price. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.type.IPrice); + + /** Price amountMicros. */ + public amountMicros?: (number|Long|string|null); + + /** Price currencyCode. */ + public currencyCode?: (string|null); + + /** Price _amountMicros. */ + public _amountMicros?: "amountMicros"; + + /** Price _currencyCode. */ + public _currencyCode?: "currencyCode"; + + /** + * Creates a new Price instance using the specified properties. + * @param [properties] Properties to set + * @returns Price instance + */ + public static create(properties?: google.shopping.type.IPrice): google.shopping.type.Price; + + /** + * Encodes the specified Price message. Does not implicitly {@link google.shopping.type.Price.verify|verify} messages. + * @param message Price message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.type.IPrice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Price message, length delimited. Does not implicitly {@link google.shopping.type.Price.verify|verify} messages. + * @param message Price message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.type.IPrice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Price message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Price + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.type.Price; + + /** + * Decodes a Price message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Price + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.type.Price; + + /** + * Verifies a Price message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Price message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Price + */ + public static fromObject(object: { [k: string]: any }): google.shopping.type.Price; + + /** + * Creates a plain object from a Price message. Also converts values to other types if specified. + * @param message Price + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.type.Price, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Price to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Price + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomAttribute. */ + interface ICustomAttribute { + + /** CustomAttribute name */ + name?: (string|null); + + /** CustomAttribute value */ + value?: (string|null); + + /** CustomAttribute groupValues */ + groupValues?: (google.shopping.type.ICustomAttribute[]|null); + } + + /** Represents a CustomAttribute. */ + class CustomAttribute implements ICustomAttribute { + + /** + * Constructs a new CustomAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.type.ICustomAttribute); + + /** CustomAttribute name. */ + public name?: (string|null); + + /** CustomAttribute value. */ + public value?: (string|null); + + /** CustomAttribute groupValues. */ + public groupValues: google.shopping.type.ICustomAttribute[]; + + /** CustomAttribute _name. */ + public _name?: "name"; + + /** CustomAttribute _value. */ + public _value?: "value"; + + /** + * Creates a new CustomAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomAttribute instance + */ + public static create(properties?: google.shopping.type.ICustomAttribute): google.shopping.type.CustomAttribute; + + /** + * Encodes the specified CustomAttribute message. Does not implicitly {@link google.shopping.type.CustomAttribute.verify|verify} messages. + * @param message CustomAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.type.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.shopping.type.CustomAttribute.verify|verify} messages. + * @param message CustomAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.type.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.type.CustomAttribute; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.type.CustomAttribute; + + /** + * Verifies a CustomAttribute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomAttribute + */ + public static fromObject(object: { [k: string]: any }): google.shopping.type.CustomAttribute; + + /** + * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * @param message CustomAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.type.CustomAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomAttribute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomAttribute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Destination. */ + interface IDestination { + } + + /** Represents a Destination. */ + class Destination implements IDestination { + + /** + * Constructs a new Destination. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.type.IDestination); + + /** + * Creates a new Destination instance using the specified properties. + * @param [properties] Properties to set + * @returns Destination instance + */ + public static create(properties?: google.shopping.type.IDestination): google.shopping.type.Destination; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.shopping.type.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.type.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.shopping.type.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.type.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.type.Destination; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.type.Destination; + + /** + * Verifies a Destination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Destination + */ + public static fromObject(object: { [k: string]: any }): google.shopping.type.Destination; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @param message Destination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.type.Destination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Destination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Destination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Destination { + + /** DestinationEnum enum. */ + enum DestinationEnum { + DESTINATION_ENUM_UNSPECIFIED = 0, + SHOPPING_ADS = 1, + DISPLAY_ADS = 2, + LOCAL_INVENTORY_ADS = 3, + FREE_LISTINGS = 4, + FREE_LOCAL_LISTINGS = 5, + YOUTUBE_SHOPPING = 6 + } + } + + /** Properties of a ReportingContext. */ + interface IReportingContext { + } + + /** Represents a ReportingContext. */ + class ReportingContext implements IReportingContext { + + /** + * Constructs a new ReportingContext. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.type.IReportingContext); + + /** + * Creates a new ReportingContext instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportingContext instance + */ + public static create(properties?: google.shopping.type.IReportingContext): google.shopping.type.ReportingContext; + + /** + * Encodes the specified ReportingContext message. Does not implicitly {@link google.shopping.type.ReportingContext.verify|verify} messages. + * @param message ReportingContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.type.IReportingContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportingContext message, length delimited. Does not implicitly {@link google.shopping.type.ReportingContext.verify|verify} messages. + * @param message ReportingContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.type.IReportingContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportingContext message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportingContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.type.ReportingContext; + + /** + * Decodes a ReportingContext message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportingContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.type.ReportingContext; + + /** + * Verifies a ReportingContext message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportingContext message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportingContext + */ + public static fromObject(object: { [k: string]: any }): google.shopping.type.ReportingContext; + + /** + * Creates a plain object from a ReportingContext message. Also converts values to other types if specified. + * @param message ReportingContext + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.type.ReportingContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportingContext to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportingContext + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportingContext { + + /** ReportingContextEnum enum. */ + enum ReportingContextEnum { + REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0, + SHOPPING_ADS = 1, + DISCOVERY_ADS = 2, + DEMAND_GEN_ADS = 13, + DEMAND_GEN_ADS_DISCOVER_SURFACE = 14, + VIDEO_ADS = 3, + DISPLAY_ADS = 4, + LOCAL_INVENTORY_ADS = 5, + VEHICLE_INVENTORY_ADS = 6, + FREE_LISTINGS = 7, + FREE_LOCAL_LISTINGS = 8, + FREE_LOCAL_VEHICLE_LISTINGS = 9, + YOUTUBE_SHOPPING = 10, + CLOUD_RETAIL = 11, + LOCAL_CLOUD_RETAIL = 12 + } + } + + /** Properties of a Channel. */ + interface IChannel { + } + + /** Represents a Channel. */ + class Channel implements IChannel { + + /** + * Constructs a new Channel. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.type.IChannel); + + /** + * Creates a new Channel instance using the specified properties. + * @param [properties] Properties to set + * @returns Channel instance + */ + public static create(properties?: google.shopping.type.IChannel): google.shopping.type.Channel; + + /** + * Encodes the specified Channel message. Does not implicitly {@link google.shopping.type.Channel.verify|verify} messages. + * @param message Channel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.type.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Channel message, length delimited. Does not implicitly {@link google.shopping.type.Channel.verify|verify} messages. + * @param message Channel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.type.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Channel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.type.Channel; + + /** + * Decodes a Channel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.type.Channel; + + /** + * Verifies a Channel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Channel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Channel + */ + public static fromObject(object: { [k: string]: any }): google.shopping.type.Channel; + + /** + * Creates a plain object from a Channel message. Also converts values to other types if specified. + * @param message Channel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.type.Channel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Channel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Channel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Channel { + + /** ChannelEnum enum. */ + enum ChannelEnum { + CHANNEL_ENUM_UNSPECIFIED = 0, + ONLINE = 1, + LOCAL = 2 + } + } + } } /** Namespace api. */ diff --git a/packages/google-shopping-merchant-datasources/protos/protos.js b/packages/google-shopping-merchant-datasources/protos/protos.js index 400c90e5874..f4f9bb4a46c 100644 --- a/packages/google-shopping-merchant-datasources/protos/protos.js +++ b/packages/google-shopping-merchant-datasources/protos/protos.js @@ -2522,6 +2522,7 @@ * @property {string|null} [contentLanguage] PrimaryProductDataSource contentLanguage * @property {Array.|null} [countries] PrimaryProductDataSource countries * @property {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDefaultRule|null} [defaultRule] PrimaryProductDataSource defaultRule + * @property {Array.|null} [destinations] PrimaryProductDataSource destinations */ /** @@ -2534,6 +2535,7 @@ */ function PrimaryProductDataSource(properties) { this.countries = []; + this.destinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2580,6 +2582,14 @@ */ PrimaryProductDataSource.prototype.defaultRule = null; + /** + * PrimaryProductDataSource destinations. + * @member {Array.} destinations + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource + * @instance + */ + PrimaryProductDataSource.prototype.destinations = $util.emptyArray; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2640,6 +2650,9 @@ writer.uint32(/* id 6, wireType 2 =*/50).string(message.countries[i]); if (message.defaultRule != null && Object.hasOwnProperty.call(message, "defaultRule")) $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRule.encode(message.defaultRule, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.destinations != null && message.destinations.length) + for (var i = 0; i < message.destinations.length; ++i) + $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.encode(message.destinations[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -2696,6 +2709,12 @@ message.defaultRule = $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRule.decode(reader, reader.uint32()); break; } + case 10: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + message.destinations.push($root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -2764,6 +2783,15 @@ if (error) return "defaultRule." + error; } + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) { + var error = $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.verify(message.destinations[i]); + if (error) + return "destinations." + error; + } + } return null; }; @@ -2819,6 +2847,16 @@ throw TypeError(".google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.defaultRule: object expected"); message.defaultRule = $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRule.fromObject(object.defaultRule); } + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) { + if (typeof object.destinations[i] !== "object") + throw TypeError(".google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.destinations: object expected"); + message.destinations[i] = $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.fromObject(object.destinations[i]); + } + } return message; }; @@ -2835,8 +2873,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.countries = []; + object.destinations = []; + } if (options.defaults) { object.channel = options.enums === String ? "CHANNEL_UNSPECIFIED" : 0; object.defaultRule = null; @@ -2860,6 +2900,11 @@ } if (message.defaultRule != null && message.hasOwnProperty("defaultRule")) object.defaultRule = $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRule.toObject(message.defaultRule, options); + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.toObject(message.destinations[j], options); + } return object; }; @@ -3113,6 +3158,317 @@ return DefaultRule; })(); + PrimaryProductDataSource.Destination = (function() { + + /** + * Properties of a Destination. + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource + * @interface IDestination + * @property {google.shopping.type.Destination.DestinationEnum|null} [destination] Destination destination + * @property {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State|null} [state] Destination state + */ + + /** + * Constructs a new Destination. + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource + * @classdesc Represents a Destination. + * @implements IDestination + * @constructor + * @param {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination=} [properties] Properties to set + */ + function Destination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Destination destination. + * @member {google.shopping.type.Destination.DestinationEnum} destination + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @instance + */ + Destination.prototype.destination = 0; + + /** + * Destination state. + * @member {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State} state + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @instance + */ + Destination.prototype.state = 0; + + /** + * Creates a new Destination instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination=} [properties] Properties to set + * @returns {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination} Destination instance + */ + Destination.create = function create(properties) { + return new Destination(properties); + }; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.destination); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + return writer; + }; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.destination = reader.int32(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Destination message. + * @function verify + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Destination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + switch (message.destination) { + default: + return "destination: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination} Destination + */ + Destination.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination) + return object; + var message = new $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination(); + switch (object.destination) { + default: + if (typeof object.destination === "number") { + message.destination = object.destination; + break; + } + break; + case "DESTINATION_ENUM_UNSPECIFIED": + case 0: + message.destination = 0; + break; + case "SHOPPING_ADS": + case 1: + message.destination = 1; + break; + case "DISPLAY_ADS": + case 2: + message.destination = 2; + break; + case "LOCAL_INVENTORY_ADS": + case 3: + message.destination = 3; + break; + case "FREE_LISTINGS": + case 4: + message.destination = 4; + break; + case "FREE_LOCAL_LISTINGS": + case 5: + message.destination = 5; + break; + case "YOUTUBE_SHOPPING": + case 6: + message.destination = 6; + break; + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ENABLED": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination} message Destination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Destination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.destination = options.enums === String ? "DESTINATION_ENUM_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = options.enums === String ? $root.google.shopping.type.Destination.DestinationEnum[message.destination] === undefined ? message.destination : $root.google.shopping.type.Destination.DestinationEnum[message.destination] : message.destination; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State[message.state] === undefined ? message.state : $root.google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State[message.state] : message.state; + return object; + }; + + /** + * Converts this Destination to JSON. + * @function toJSON + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @instance + * @returns {Object.} JSON object + */ + Destination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Destination + * @function getTypeUrl + * @memberof google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination"; + }; + + /** + * State enum. + * @name google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Destination.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + Destination.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + return Destination; + })(); + /** * Channel enum. * @name google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.Channel @@ -6687,6 +7043,1491 @@ return merchant; })(); + shopping.type = (function() { + + /** + * Namespace type. + * @memberof google.shopping + * @namespace + */ + var type = {}; + + type.Weight = (function() { + + /** + * Properties of a Weight. + * @memberof google.shopping.type + * @interface IWeight + * @property {number|Long|null} [amountMicros] Weight amountMicros + * @property {google.shopping.type.Weight.WeightUnit|null} [unit] Weight unit + */ + + /** + * Constructs a new Weight. + * @memberof google.shopping.type + * @classdesc Represents a Weight. + * @implements IWeight + * @constructor + * @param {google.shopping.type.IWeight=} [properties] Properties to set + */ + function Weight(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Weight amountMicros. + * @member {number|Long|null|undefined} amountMicros + * @memberof google.shopping.type.Weight + * @instance + */ + Weight.prototype.amountMicros = null; + + /** + * Weight unit. + * @member {google.shopping.type.Weight.WeightUnit} unit + * @memberof google.shopping.type.Weight + * @instance + */ + Weight.prototype.unit = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Weight _amountMicros. + * @member {"amountMicros"|undefined} _amountMicros + * @memberof google.shopping.type.Weight + * @instance + */ + Object.defineProperty(Weight.prototype, "_amountMicros", { + get: $util.oneOfGetter($oneOfFields = ["amountMicros"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Weight instance using the specified properties. + * @function create + * @memberof google.shopping.type.Weight + * @static + * @param {google.shopping.type.IWeight=} [properties] Properties to set + * @returns {google.shopping.type.Weight} Weight instance + */ + Weight.create = function create(properties) { + return new Weight(properties); + }; + + /** + * Encodes the specified Weight message. Does not implicitly {@link google.shopping.type.Weight.verify|verify} messages. + * @function encode + * @memberof google.shopping.type.Weight + * @static + * @param {google.shopping.type.IWeight} message Weight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Weight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amountMicros != null && Object.hasOwnProperty.call(message, "amountMicros")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.amountMicros); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.unit); + return writer; + }; + + /** + * Encodes the specified Weight message, length delimited. Does not implicitly {@link google.shopping.type.Weight.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.type.Weight + * @static + * @param {google.shopping.type.IWeight} message Weight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Weight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Weight message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.type.Weight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.type.Weight} Weight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Weight.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.type.Weight(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.amountMicros = reader.int64(); + break; + } + case 2: { + message.unit = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Weight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.type.Weight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.type.Weight} Weight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Weight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Weight message. + * @function verify + * @memberof google.shopping.type.Weight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Weight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.amountMicros != null && message.hasOwnProperty("amountMicros")) { + properties._amountMicros = 1; + if (!$util.isInteger(message.amountMicros) && !(message.amountMicros && $util.isInteger(message.amountMicros.low) && $util.isInteger(message.amountMicros.high))) + return "amountMicros: integer|Long expected"; + } + if (message.unit != null && message.hasOwnProperty("unit")) + switch (message.unit) { + default: + return "unit: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Weight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.type.Weight + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.type.Weight} Weight + */ + Weight.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.type.Weight) + return object; + var message = new $root.google.shopping.type.Weight(); + if (object.amountMicros != null) + if ($util.Long) + (message.amountMicros = $util.Long.fromValue(object.amountMicros)).unsigned = false; + else if (typeof object.amountMicros === "string") + message.amountMicros = parseInt(object.amountMicros, 10); + else if (typeof object.amountMicros === "number") + message.amountMicros = object.amountMicros; + else if (typeof object.amountMicros === "object") + message.amountMicros = new $util.LongBits(object.amountMicros.low >>> 0, object.amountMicros.high >>> 0).toNumber(); + switch (object.unit) { + default: + if (typeof object.unit === "number") { + message.unit = object.unit; + break; + } + break; + case "WEIGHT_UNIT_UNSPECIFIED": + case 0: + message.unit = 0; + break; + case "POUND": + case 1: + message.unit = 1; + break; + case "KILOGRAM": + case 2: + message.unit = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Weight message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.type.Weight + * @static + * @param {google.shopping.type.Weight} message Weight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Weight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.unit = options.enums === String ? "WEIGHT_UNIT_UNSPECIFIED" : 0; + if (message.amountMicros != null && message.hasOwnProperty("amountMicros")) { + if (typeof message.amountMicros === "number") + object.amountMicros = options.longs === String ? String(message.amountMicros) : message.amountMicros; + else + object.amountMicros = options.longs === String ? $util.Long.prototype.toString.call(message.amountMicros) : options.longs === Number ? new $util.LongBits(message.amountMicros.low >>> 0, message.amountMicros.high >>> 0).toNumber() : message.amountMicros; + if (options.oneofs) + object._amountMicros = "amountMicros"; + } + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = options.enums === String ? $root.google.shopping.type.Weight.WeightUnit[message.unit] === undefined ? message.unit : $root.google.shopping.type.Weight.WeightUnit[message.unit] : message.unit; + return object; + }; + + /** + * Converts this Weight to JSON. + * @function toJSON + * @memberof google.shopping.type.Weight + * @instance + * @returns {Object.} JSON object + */ + Weight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Weight + * @function getTypeUrl + * @memberof google.shopping.type.Weight + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Weight.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.type.Weight"; + }; + + /** + * WeightUnit enum. + * @name google.shopping.type.Weight.WeightUnit + * @enum {number} + * @property {number} WEIGHT_UNIT_UNSPECIFIED=0 WEIGHT_UNIT_UNSPECIFIED value + * @property {number} POUND=1 POUND value + * @property {number} KILOGRAM=2 KILOGRAM value + */ + Weight.WeightUnit = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEIGHT_UNIT_UNSPECIFIED"] = 0; + values[valuesById[1] = "POUND"] = 1; + values[valuesById[2] = "KILOGRAM"] = 2; + return values; + })(); + + return Weight; + })(); + + type.Price = (function() { + + /** + * Properties of a Price. + * @memberof google.shopping.type + * @interface IPrice + * @property {number|Long|null} [amountMicros] Price amountMicros + * @property {string|null} [currencyCode] Price currencyCode + */ + + /** + * Constructs a new Price. + * @memberof google.shopping.type + * @classdesc Represents a Price. + * @implements IPrice + * @constructor + * @param {google.shopping.type.IPrice=} [properties] Properties to set + */ + function Price(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Price amountMicros. + * @member {number|Long|null|undefined} amountMicros + * @memberof google.shopping.type.Price + * @instance + */ + Price.prototype.amountMicros = null; + + /** + * Price currencyCode. + * @member {string|null|undefined} currencyCode + * @memberof google.shopping.type.Price + * @instance + */ + Price.prototype.currencyCode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Price _amountMicros. + * @member {"amountMicros"|undefined} _amountMicros + * @memberof google.shopping.type.Price + * @instance + */ + Object.defineProperty(Price.prototype, "_amountMicros", { + get: $util.oneOfGetter($oneOfFields = ["amountMicros"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Price _currencyCode. + * @member {"currencyCode"|undefined} _currencyCode + * @memberof google.shopping.type.Price + * @instance + */ + Object.defineProperty(Price.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Price instance using the specified properties. + * @function create + * @memberof google.shopping.type.Price + * @static + * @param {google.shopping.type.IPrice=} [properties] Properties to set + * @returns {google.shopping.type.Price} Price instance + */ + Price.create = function create(properties) { + return new Price(properties); + }; + + /** + * Encodes the specified Price message. Does not implicitly {@link google.shopping.type.Price.verify|verify} messages. + * @function encode + * @memberof google.shopping.type.Price + * @static + * @param {google.shopping.type.IPrice} message Price message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Price.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amountMicros != null && Object.hasOwnProperty.call(message, "amountMicros")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.amountMicros); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.currencyCode); + return writer; + }; + + /** + * Encodes the specified Price message, length delimited. Does not implicitly {@link google.shopping.type.Price.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.type.Price + * @static + * @param {google.shopping.type.IPrice} message Price message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Price.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Price message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.type.Price + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.type.Price} Price + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Price.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.type.Price(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.amountMicros = reader.int64(); + break; + } + case 2: { + message.currencyCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Price message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.type.Price + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.type.Price} Price + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Price.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Price message. + * @function verify + * @memberof google.shopping.type.Price + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Price.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.amountMicros != null && message.hasOwnProperty("amountMicros")) { + properties._amountMicros = 1; + if (!$util.isInteger(message.amountMicros) && !(message.amountMicros && $util.isInteger(message.amountMicros.low) && $util.isInteger(message.amountMicros.high))) + return "amountMicros: integer|Long expected"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + } + return null; + }; + + /** + * Creates a Price message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.type.Price + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.type.Price} Price + */ + Price.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.type.Price) + return object; + var message = new $root.google.shopping.type.Price(); + if (object.amountMicros != null) + if ($util.Long) + (message.amountMicros = $util.Long.fromValue(object.amountMicros)).unsigned = false; + else if (typeof object.amountMicros === "string") + message.amountMicros = parseInt(object.amountMicros, 10); + else if (typeof object.amountMicros === "number") + message.amountMicros = object.amountMicros; + else if (typeof object.amountMicros === "object") + message.amountMicros = new $util.LongBits(object.amountMicros.low >>> 0, object.amountMicros.high >>> 0).toNumber(); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + return message; + }; + + /** + * Creates a plain object from a Price message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.type.Price + * @static + * @param {google.shopping.type.Price} message Price + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Price.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.amountMicros != null && message.hasOwnProperty("amountMicros")) { + if (typeof message.amountMicros === "number") + object.amountMicros = options.longs === String ? String(message.amountMicros) : message.amountMicros; + else + object.amountMicros = options.longs === String ? $util.Long.prototype.toString.call(message.amountMicros) : options.longs === Number ? new $util.LongBits(message.amountMicros.low >>> 0, message.amountMicros.high >>> 0).toNumber() : message.amountMicros; + if (options.oneofs) + object._amountMicros = "amountMicros"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } + return object; + }; + + /** + * Converts this Price to JSON. + * @function toJSON + * @memberof google.shopping.type.Price + * @instance + * @returns {Object.} JSON object + */ + Price.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Price + * @function getTypeUrl + * @memberof google.shopping.type.Price + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Price.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.type.Price"; + }; + + return Price; + })(); + + type.CustomAttribute = (function() { + + /** + * Properties of a CustomAttribute. + * @memberof google.shopping.type + * @interface ICustomAttribute + * @property {string|null} [name] CustomAttribute name + * @property {string|null} [value] CustomAttribute value + * @property {Array.|null} [groupValues] CustomAttribute groupValues + */ + + /** + * Constructs a new CustomAttribute. + * @memberof google.shopping.type + * @classdesc Represents a CustomAttribute. + * @implements ICustomAttribute + * @constructor + * @param {google.shopping.type.ICustomAttribute=} [properties] Properties to set + */ + function CustomAttribute(properties) { + this.groupValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomAttribute name. + * @member {string|null|undefined} name + * @memberof google.shopping.type.CustomAttribute + * @instance + */ + CustomAttribute.prototype.name = null; + + /** + * CustomAttribute value. + * @member {string|null|undefined} value + * @memberof google.shopping.type.CustomAttribute + * @instance + */ + CustomAttribute.prototype.value = null; + + /** + * CustomAttribute groupValues. + * @member {Array.} groupValues + * @memberof google.shopping.type.CustomAttribute + * @instance + */ + CustomAttribute.prototype.groupValues = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomAttribute _name. + * @member {"name"|undefined} _name + * @memberof google.shopping.type.CustomAttribute + * @instance + */ + Object.defineProperty(CustomAttribute.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CustomAttribute _value. + * @member {"value"|undefined} _value + * @memberof google.shopping.type.CustomAttribute + * @instance + */ + Object.defineProperty(CustomAttribute.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomAttribute instance using the specified properties. + * @function create + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {google.shopping.type.ICustomAttribute=} [properties] Properties to set + * @returns {google.shopping.type.CustomAttribute} CustomAttribute instance + */ + CustomAttribute.create = function create(properties) { + return new CustomAttribute(properties); + }; + + /** + * Encodes the specified CustomAttribute message. Does not implicitly {@link google.shopping.type.CustomAttribute.verify|verify} messages. + * @function encode + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {google.shopping.type.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.groupValues != null && message.groupValues.length) + for (var i = 0; i < message.groupValues.length; ++i) + $root.google.shopping.type.CustomAttribute.encode(message.groupValues[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.shopping.type.CustomAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {google.shopping.type.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.type.CustomAttribute} CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.type.CustomAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + if (!(message.groupValues && message.groupValues.length)) + message.groupValues = []; + message.groupValues.push($root.google.shopping.type.CustomAttribute.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.type.CustomAttribute} CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomAttribute message. + * @function verify + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + if (message.groupValues != null && message.hasOwnProperty("groupValues")) { + if (!Array.isArray(message.groupValues)) + return "groupValues: array expected"; + for (var i = 0; i < message.groupValues.length; ++i) { + var error = $root.google.shopping.type.CustomAttribute.verify(message.groupValues[i]); + if (error) + return "groupValues." + error; + } + } + return null; + }; + + /** + * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.type.CustomAttribute} CustomAttribute + */ + CustomAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.type.CustomAttribute) + return object; + var message = new $root.google.shopping.type.CustomAttribute(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) + message.value = String(object.value); + if (object.groupValues) { + if (!Array.isArray(object.groupValues)) + throw TypeError(".google.shopping.type.CustomAttribute.groupValues: array expected"); + message.groupValues = []; + for (var i = 0; i < object.groupValues.length; ++i) { + if (typeof object.groupValues[i] !== "object") + throw TypeError(".google.shopping.type.CustomAttribute.groupValues: object expected"); + message.groupValues[i] = $root.google.shopping.type.CustomAttribute.fromObject(object.groupValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {google.shopping.type.CustomAttribute} message CustomAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupValues = []; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; + } + if (message.groupValues && message.groupValues.length) { + object.groupValues = []; + for (var j = 0; j < message.groupValues.length; ++j) + object.groupValues[j] = $root.google.shopping.type.CustomAttribute.toObject(message.groupValues[j], options); + } + return object; + }; + + /** + * Converts this CustomAttribute to JSON. + * @function toJSON + * @memberof google.shopping.type.CustomAttribute + * @instance + * @returns {Object.} JSON object + */ + CustomAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomAttribute + * @function getTypeUrl + * @memberof google.shopping.type.CustomAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.type.CustomAttribute"; + }; + + return CustomAttribute; + })(); + + type.Destination = (function() { + + /** + * Properties of a Destination. + * @memberof google.shopping.type + * @interface IDestination + */ + + /** + * Constructs a new Destination. + * @memberof google.shopping.type + * @classdesc Represents a Destination. + * @implements IDestination + * @constructor + * @param {google.shopping.type.IDestination=} [properties] Properties to set + */ + function Destination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Destination instance using the specified properties. + * @function create + * @memberof google.shopping.type.Destination + * @static + * @param {google.shopping.type.IDestination=} [properties] Properties to set + * @returns {google.shopping.type.Destination} Destination instance + */ + Destination.create = function create(properties) { + return new Destination(properties); + }; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.shopping.type.Destination.verify|verify} messages. + * @function encode + * @memberof google.shopping.type.Destination + * @static + * @param {google.shopping.type.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.shopping.type.Destination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.type.Destination + * @static + * @param {google.shopping.type.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.type.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.type.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.type.Destination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.type.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.type.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Destination message. + * @function verify + * @memberof google.shopping.type.Destination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Destination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.type.Destination + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.type.Destination} Destination + */ + Destination.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.type.Destination) + return object; + return new $root.google.shopping.type.Destination(); + }; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.type.Destination + * @static + * @param {google.shopping.type.Destination} message Destination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Destination.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Destination to JSON. + * @function toJSON + * @memberof google.shopping.type.Destination + * @instance + * @returns {Object.} JSON object + */ + Destination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Destination + * @function getTypeUrl + * @memberof google.shopping.type.Destination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.type.Destination"; + }; + + /** + * DestinationEnum enum. + * @name google.shopping.type.Destination.DestinationEnum + * @enum {number} + * @property {number} DESTINATION_ENUM_UNSPECIFIED=0 DESTINATION_ENUM_UNSPECIFIED value + * @property {number} SHOPPING_ADS=1 SHOPPING_ADS value + * @property {number} DISPLAY_ADS=2 DISPLAY_ADS value + * @property {number} LOCAL_INVENTORY_ADS=3 LOCAL_INVENTORY_ADS value + * @property {number} FREE_LISTINGS=4 FREE_LISTINGS value + * @property {number} FREE_LOCAL_LISTINGS=5 FREE_LOCAL_LISTINGS value + * @property {number} YOUTUBE_SHOPPING=6 YOUTUBE_SHOPPING value + */ + Destination.DestinationEnum = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DESTINATION_ENUM_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHOPPING_ADS"] = 1; + values[valuesById[2] = "DISPLAY_ADS"] = 2; + values[valuesById[3] = "LOCAL_INVENTORY_ADS"] = 3; + values[valuesById[4] = "FREE_LISTINGS"] = 4; + values[valuesById[5] = "FREE_LOCAL_LISTINGS"] = 5; + values[valuesById[6] = "YOUTUBE_SHOPPING"] = 6; + return values; + })(); + + return Destination; + })(); + + type.ReportingContext = (function() { + + /** + * Properties of a ReportingContext. + * @memberof google.shopping.type + * @interface IReportingContext + */ + + /** + * Constructs a new ReportingContext. + * @memberof google.shopping.type + * @classdesc Represents a ReportingContext. + * @implements IReportingContext + * @constructor + * @param {google.shopping.type.IReportingContext=} [properties] Properties to set + */ + function ReportingContext(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ReportingContext instance using the specified properties. + * @function create + * @memberof google.shopping.type.ReportingContext + * @static + * @param {google.shopping.type.IReportingContext=} [properties] Properties to set + * @returns {google.shopping.type.ReportingContext} ReportingContext instance + */ + ReportingContext.create = function create(properties) { + return new ReportingContext(properties); + }; + + /** + * Encodes the specified ReportingContext message. Does not implicitly {@link google.shopping.type.ReportingContext.verify|verify} messages. + * @function encode + * @memberof google.shopping.type.ReportingContext + * @static + * @param {google.shopping.type.IReportingContext} message ReportingContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportingContext.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReportingContext message, length delimited. Does not implicitly {@link google.shopping.type.ReportingContext.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.type.ReportingContext + * @static + * @param {google.shopping.type.IReportingContext} message ReportingContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportingContext.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportingContext message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.type.ReportingContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.type.ReportingContext} ReportingContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportingContext.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.type.ReportingContext(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportingContext message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.type.ReportingContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.type.ReportingContext} ReportingContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportingContext.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportingContext message. + * @function verify + * @memberof google.shopping.type.ReportingContext + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportingContext.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReportingContext message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.type.ReportingContext + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.type.ReportingContext} ReportingContext + */ + ReportingContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.type.ReportingContext) + return object; + return new $root.google.shopping.type.ReportingContext(); + }; + + /** + * Creates a plain object from a ReportingContext message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.type.ReportingContext + * @static + * @param {google.shopping.type.ReportingContext} message ReportingContext + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportingContext.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReportingContext to JSON. + * @function toJSON + * @memberof google.shopping.type.ReportingContext + * @instance + * @returns {Object.} JSON object + */ + ReportingContext.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportingContext + * @function getTypeUrl + * @memberof google.shopping.type.ReportingContext + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportingContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.type.ReportingContext"; + }; + + /** + * ReportingContextEnum enum. + * @name google.shopping.type.ReportingContext.ReportingContextEnum + * @enum {number} + * @property {number} REPORTING_CONTEXT_ENUM_UNSPECIFIED=0 REPORTING_CONTEXT_ENUM_UNSPECIFIED value + * @property {number} SHOPPING_ADS=1 SHOPPING_ADS value + * @property {number} DISCOVERY_ADS=2 DISCOVERY_ADS value + * @property {number} DEMAND_GEN_ADS=13 DEMAND_GEN_ADS value + * @property {number} DEMAND_GEN_ADS_DISCOVER_SURFACE=14 DEMAND_GEN_ADS_DISCOVER_SURFACE value + * @property {number} VIDEO_ADS=3 VIDEO_ADS value + * @property {number} DISPLAY_ADS=4 DISPLAY_ADS value + * @property {number} LOCAL_INVENTORY_ADS=5 LOCAL_INVENTORY_ADS value + * @property {number} VEHICLE_INVENTORY_ADS=6 VEHICLE_INVENTORY_ADS value + * @property {number} FREE_LISTINGS=7 FREE_LISTINGS value + * @property {number} FREE_LOCAL_LISTINGS=8 FREE_LOCAL_LISTINGS value + * @property {number} FREE_LOCAL_VEHICLE_LISTINGS=9 FREE_LOCAL_VEHICLE_LISTINGS value + * @property {number} YOUTUBE_SHOPPING=10 YOUTUBE_SHOPPING value + * @property {number} CLOUD_RETAIL=11 CLOUD_RETAIL value + * @property {number} LOCAL_CLOUD_RETAIL=12 LOCAL_CLOUD_RETAIL value + */ + ReportingContext.ReportingContextEnum = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPORTING_CONTEXT_ENUM_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHOPPING_ADS"] = 1; + values[valuesById[2] = "DISCOVERY_ADS"] = 2; + values[valuesById[13] = "DEMAND_GEN_ADS"] = 13; + values[valuesById[14] = "DEMAND_GEN_ADS_DISCOVER_SURFACE"] = 14; + values[valuesById[3] = "VIDEO_ADS"] = 3; + values[valuesById[4] = "DISPLAY_ADS"] = 4; + values[valuesById[5] = "LOCAL_INVENTORY_ADS"] = 5; + values[valuesById[6] = "VEHICLE_INVENTORY_ADS"] = 6; + values[valuesById[7] = "FREE_LISTINGS"] = 7; + values[valuesById[8] = "FREE_LOCAL_LISTINGS"] = 8; + values[valuesById[9] = "FREE_LOCAL_VEHICLE_LISTINGS"] = 9; + values[valuesById[10] = "YOUTUBE_SHOPPING"] = 10; + values[valuesById[11] = "CLOUD_RETAIL"] = 11; + values[valuesById[12] = "LOCAL_CLOUD_RETAIL"] = 12; + return values; + })(); + + return ReportingContext; + })(); + + type.Channel = (function() { + + /** + * Properties of a Channel. + * @memberof google.shopping.type + * @interface IChannel + */ + + /** + * Constructs a new Channel. + * @memberof google.shopping.type + * @classdesc Represents a Channel. + * @implements IChannel + * @constructor + * @param {google.shopping.type.IChannel=} [properties] Properties to set + */ + function Channel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Channel instance using the specified properties. + * @function create + * @memberof google.shopping.type.Channel + * @static + * @param {google.shopping.type.IChannel=} [properties] Properties to set + * @returns {google.shopping.type.Channel} Channel instance + */ + Channel.create = function create(properties) { + return new Channel(properties); + }; + + /** + * Encodes the specified Channel message. Does not implicitly {@link google.shopping.type.Channel.verify|verify} messages. + * @function encode + * @memberof google.shopping.type.Channel + * @static + * @param {google.shopping.type.IChannel} message Channel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Channel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Channel message, length delimited. Does not implicitly {@link google.shopping.type.Channel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.type.Channel + * @static + * @param {google.shopping.type.IChannel} message Channel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Channel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Channel message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.type.Channel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.type.Channel} Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Channel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.type.Channel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Channel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.type.Channel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.type.Channel} Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Channel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Channel message. + * @function verify + * @memberof google.shopping.type.Channel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Channel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Channel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.type.Channel + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.type.Channel} Channel + */ + Channel.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.type.Channel) + return object; + return new $root.google.shopping.type.Channel(); + }; + + /** + * Creates a plain object from a Channel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.type.Channel + * @static + * @param {google.shopping.type.Channel} message Channel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Channel.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Channel to JSON. + * @function toJSON + * @memberof google.shopping.type.Channel + * @instance + * @returns {Object.} JSON object + */ + Channel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Channel + * @function getTypeUrl + * @memberof google.shopping.type.Channel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Channel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.type.Channel"; + }; + + /** + * ChannelEnum enum. + * @name google.shopping.type.Channel.ChannelEnum + * @enum {number} + * @property {number} CHANNEL_ENUM_UNSPECIFIED=0 CHANNEL_ENUM_UNSPECIFIED value + * @property {number} ONLINE=1 ONLINE value + * @property {number} LOCAL=2 LOCAL value + */ + Channel.ChannelEnum = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANNEL_ENUM_UNSPECIFIED"] = 0; + values[valuesById[1] = "ONLINE"] = 1; + values[valuesById[2] = "LOCAL"] = 2; + return values; + })(); + + return Channel; + })(); + + return type; + })(); + return shopping; })(); diff --git a/packages/google-shopping-merchant-datasources/protos/protos.json b/packages/google-shopping-merchant-datasources/protos/protos.json index 279a2cee355..4553927bf50 100644 --- a/packages/google-shopping-merchant-datasources/protos/protos.json +++ b/packages/google-shopping-merchant-datasources/protos/protos.json @@ -399,6 +399,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "destinations": { + "rule": "repeated", + "type": "Destination", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -414,6 +422,27 @@ } } }, + "Destination": { + "fields": { + "destination": { + "type": "google.shopping.type.Destination.DestinationEnum", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + } + } + }, "Channel": { "values": { "CHANNEL_UNSPECIFIED": 0, @@ -842,6 +871,170 @@ } } } + }, + "type": { + "options": { + "csharp_namespace": "Google.Shopping.Type", + "go_package": "cloud.google.com/go/shopping/type/typepb;typepb", + "java_multiple_files": true, + "java_outer_classname": "TypesProto", + "java_package": "com.google.shopping.type" + }, + "nested": { + "Weight": { + "oneofs": { + "_amountMicros": { + "oneof": [ + "amountMicros" + ] + } + }, + "fields": { + "amountMicros": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "unit": { + "type": "WeightUnit", + "id": 2 + } + }, + "nested": { + "WeightUnit": { + "values": { + "WEIGHT_UNIT_UNSPECIFIED": 0, + "POUND": 1, + "KILOGRAM": 2 + } + } + } + }, + "Price": { + "oneofs": { + "_amountMicros": { + "oneof": [ + "amountMicros" + ] + }, + "_currencyCode": { + "oneof": [ + "currencyCode" + ] + } + }, + "fields": { + "amountMicros": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "currencyCode": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "CustomAttribute": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "_value": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "groupValues": { + "rule": "repeated", + "type": "CustomAttribute", + "id": 3 + } + } + }, + "Destination": { + "fields": {}, + "nested": { + "DestinationEnum": { + "values": { + "DESTINATION_ENUM_UNSPECIFIED": 0, + "SHOPPING_ADS": 1, + "DISPLAY_ADS": 2, + "LOCAL_INVENTORY_ADS": 3, + "FREE_LISTINGS": 4, + "FREE_LOCAL_LISTINGS": 5, + "YOUTUBE_SHOPPING": 6 + } + } + } + }, + "ReportingContext": { + "fields": {}, + "nested": { + "ReportingContextEnum": { + "valuesOptions": { + "DISCOVERY_ADS": { + "deprecated": true + } + }, + "values": { + "REPORTING_CONTEXT_ENUM_UNSPECIFIED": 0, + "SHOPPING_ADS": 1, + "DISCOVERY_ADS": 2, + "DEMAND_GEN_ADS": 13, + "DEMAND_GEN_ADS_DISCOVER_SURFACE": 14, + "VIDEO_ADS": 3, + "DISPLAY_ADS": 4, + "LOCAL_INVENTORY_ADS": 5, + "VEHICLE_INVENTORY_ADS": 6, + "FREE_LISTINGS": 7, + "FREE_LOCAL_LISTINGS": 8, + "FREE_LOCAL_VEHICLE_LISTINGS": 9, + "YOUTUBE_SHOPPING": 10, + "CLOUD_RETAIL": 11, + "LOCAL_CLOUD_RETAIL": 12 + } + } + } + }, + "Channel": { + "fields": {}, + "nested": { + "ChannelEnum": { + "values": { + "CHANNEL_ENUM_UNSPECIFIED": 0, + "ONLINE": 1, + "LOCAL": 2 + } + } + } + } + } } } }, diff --git a/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_proto_list.json b/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_proto_list.json index 160a6e19791..ee2608469a3 100644 --- a/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_proto_list.json +++ b/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_proto_list.json @@ -2,5 +2,6 @@ "../../protos/google/shopping/merchant/datasources/v1beta/datasources.proto", "../../protos/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto", "../../protos/google/shopping/merchant/datasources/v1beta/fileinputs.proto", - "../../protos/google/shopping/merchant/datasources/v1beta/fileuploads.proto" + "../../protos/google/shopping/merchant/datasources/v1beta/fileuploads.proto", + "../../protos/google/shopping/type/types.proto" ] diff --git a/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_proto_list.json b/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_proto_list.json index 160a6e19791..ee2608469a3 100644 --- a/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_proto_list.json +++ b/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_proto_list.json @@ -2,5 +2,6 @@ "../../protos/google/shopping/merchant/datasources/v1beta/datasources.proto", "../../protos/google/shopping/merchant/datasources/v1beta/datasourcetypes.proto", "../../protos/google/shopping/merchant/datasources/v1beta/fileinputs.proto", - "../../protos/google/shopping/merchant/datasources/v1beta/fileuploads.proto" + "../../protos/google/shopping/merchant/datasources/v1beta/fileuploads.proto", + "../../protos/google/shopping/type/types.proto" ] From dfab9f0902564fee15fdcff914851ebab07c4c9d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:23:51 -0700 Subject: [PATCH 05/34] feat: [compute] Update Compute Engine API to revision 20250302 (#987) (#6155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update Compute Engine API to revision 20250302 (#987) Source-Link: https://github.com/googleapis/googleapis/commit/2753fe1683a42442aa7a4b778c416c886a647fe6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8472eebaa2103cb1e2786eb11e3464dd5ea74223 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbXB1dGUvLk93bEJvdC55YW1sIiwiaCI6Ijg0NzJlZWJhYTIxMDNjYjFlMjc4NmViMTFlMzQ2NGRkNWVhNzQyMjMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-compute/README.md | 1 + .../google/cloud/compute/v1/compute.proto | 216 +- .../google-cloud-compute/protos/protos.d.ts | 1033 ++++++- .../google-cloud-compute/protos/protos.js | 2665 ++++++++++++++++- .../google-cloud-compute/protos/protos.json | 415 ++- .../google-cloud-compute/samples/README.md | 18 + .../v1/instances.report_host_as_faulty.js | 80 + ...ppet_metadata_google.cloud.compute.v1.json | 56 + .../src/v1/gapic_metadata.json | 10 + .../src/v1/instances_client.ts | 141 + .../src/v1/instances_client_config.json | 4 + .../test/gapic_instances_v1.ts | 171 ++ 12 files changed, 4799 insertions(+), 11 deletions(-) create mode 100644 packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js diff --git a/packages/google-cloud-compute/README.md b/packages/google-cloud-compute/README.md index 4fa9585b74e..368e0f19e3d 100644 --- a/packages/google-cloud-compute/README.md +++ b/packages/google-cloud-compute/README.md @@ -327,6 +327,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Instances.list_referrers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.list_referrers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.list_referrers.js,packages/google-cloud-compute/samples/README.md) | | Instances.perform_maintenance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.perform_maintenance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.perform_maintenance.js,packages/google-cloud-compute/samples/README.md) | | Instances.remove_resource_policies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.remove_resource_policies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.remove_resource_policies.js,packages/google-cloud-compute/samples/README.md) | +| Instances.report_host_as_faulty | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js,packages/google-cloud-compute/samples/README.md) | | Instances.reset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.reset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.reset.js,packages/google-cloud-compute/samples/README.md) | | Instances.resume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.resume.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.resume.js,packages/google-cloud-compute/samples/README.md) | | Instances.send_diagnostic_interrupt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.send_diagnostic_interrupt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.send_diagnostic_interrupt.js,packages/google-cloud-compute/samples/README.md) | diff --git a/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto b/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto index db6c5181399..10923ddbadd 100644 --- a/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto +++ b/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto @@ -14,7 +14,7 @@ // Generated by the disco-to-proto3-converter. DO NOT EDIT! // Source Discovery file: compute.v1.json -// Source file revision: 20250211 +// Source file revision: 20250302 // API name: compute // API version: v1 @@ -2362,6 +2362,29 @@ message AllocationAggregateReservationReservedResourceInfoAccelerator { } +// +message AllocationReservationSharingPolicy { + // Sharing config for all Google Cloud services. + enum ServiceShareType { + // A value indicating that the enum field is not set. + UNDEFINED_SERVICE_SHARE_TYPE = 0; + + // Allow all Google Cloud managed services to share reservations. + ALLOW_ALL = 475536235; + + // [Default] Disallow sharing with all Google Cloud services. + DISALLOW_ALL = 277786301; + + SERVICE_SHARE_TYPE_UNSPECIFIED = 279057148; + + } + + // Sharing config for all Google Cloud services. + // Check the ServiceShareType enum for the list of possible values. + optional string service_share_type = 514508644; + +} + // [Output Only] Contains output only fields. message AllocationResourceStatus { // Allocation Properties of this reservation. @@ -2374,6 +2397,9 @@ message AllocationResourceStatusSpecificSKUAllocation { // ID of the instance template used to populate reservation properties. optional string source_instance_template_id = 111196154; + // Per service utilization breakdown. The Key is the Google Cloud managed service name. + map utilizations = 402495121; + } // @@ -3250,6 +3276,9 @@ message Backend { // Balance based on the number of simultaneous connections. CONNECTION = 246311646; + // Based on custom defined and reported metrics. + CUSTOM_METRICS = 331575765; + // Balance based on requests per second (RPS). RATE = 2508000; @@ -3281,6 +3310,9 @@ message Backend { // A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs. optional float capacity_scaler = 315958157; + // List of custom metrics that are used for CUSTOM_METRICS BalancingMode. + repeated BackendCustomMetric custom_metrics = 429453813; + // An optional description of this resource. Provide this property when you create the resource. optional string description = 422937596; @@ -3489,6 +3521,19 @@ message BackendBucketUsedBy { } +// Custom Metrics are used for CUSTOM_METRICS balancing_mode. +message BackendCustomMetric { + // If true, the metric data is collected and reported to Cloud Monitoring, but is not used for load balancing. + optional bool dry_run = 323854839; + + // Optional parameter to define a target utilization for the Custom Metrics balancing mode. The valid range is [0.0, 1.0]. + optional float max_utilization = 148192199; + + // Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + optional string name = 3373707; + +} + // Represents a Backend Service resource. A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly. Backend services in Google Compute Engine can be either regionally or globally scoped. * [Global](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) * [Regional](https://cloud.google.com/compute/docs/reference/rest/v1/regionBackendServices) For more information, see Backend Services. message BackendService { // Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. @@ -3575,6 +3620,9 @@ message BackendService { // Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing. WEIGHTED_MAGLEV = 254930962; + // Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields. + WEIGHTED_ROUND_ROBIN = 5584977; + } // The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. @@ -3666,6 +3714,9 @@ message BackendService { // [Output Only] Creation timestamp in RFC3339 text format. optional string creation_timestamp = 30525366; + // List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy. + repeated BackendServiceCustomMetric custom_metrics = 429453813; + // Headers that the load balancer adds to proxied requests. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers). repeated string custom_request_headers = 27977992; @@ -3922,6 +3973,16 @@ message BackendServiceConnectionTrackingPolicy { } +// Custom Metrics are used for WEIGHTED_ROUND_ROBIN locality_lb_policy. +message BackendServiceCustomMetric { + // If true, the metric data is not used for load balancing. + optional bool dry_run = 323854839; + + // Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED. + optional string name = 3373707; + +} + // For load balancers that have configurable failover: [Internal passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). On failover or failback, this field indicates whether connection draining will be honored. Google Cloud has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). message BackendServiceFailoverPolicy { // This can be set to true only if the protocol is TCP. The default is false. @@ -4069,6 +4130,9 @@ message BackendServiceLocalityLoadBalancingPolicyConfigPolicy { // Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weighted based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This option is only supported in Network Load Balancing. WEIGHTED_MAGLEV = 254930962; + // Per-endpoint weighted round-robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field X-Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the backends[].customMetrics fields. + WEIGHTED_ROUND_ROBIN = 5584977; + } // The name of a locality load-balancing policy. Valid values include ROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information about these values, see the description of localityLbPolicy. Do not specify the same policy more than once for a backend. If you do, the configuration is rejected. @@ -4815,6 +4879,8 @@ message Commitment { MEMORY_OPTIMIZED_M3 = 276301372; + MEMORY_OPTIMIZED_M4 = 276301373; + MEMORY_OPTIMIZED_X4_16TB = 183089120; MEMORY_OPTIMIZED_X4_24TB = 183116989; @@ -13731,6 +13797,9 @@ message InstanceGroupManager { // [Output Only] The URL of the region where the managed instance group resides (for regional resources). optional string region = 138946292; + // Resource policies for this managed instance group. + optional InstanceGroupManagerResourcePolicies resource_policies = 22220385; + // [Output Only] Reserved for future use. optional bool satisfies_pzi = 480964257; @@ -14037,6 +14106,13 @@ message InstanceGroupManagerResizeRequestsListResponse { } +// +message InstanceGroupManagerResourcePolicies { + // The URL of the workload policy that is specified for this managed instance group. It can be a full or partial URL. For example, the following are all valid URLs to a workload policy: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy + optional string workload_policy = 114721530; + +} + // message InstanceGroupManagerStandbyPolicy { // Defines how a MIG resumes or starts VMs from a standby pool when the group scales out. The default mode is `MANUAL`. @@ -14984,6 +15060,58 @@ message InstancesRemoveResourcePoliciesRequest { } +// +message InstancesReportHostAsFaultyRequest { + // The disruption schedule for the VM. Default to IMMEDIATE. + enum DisruptionSchedule { + // A value indicating that the enum field is not set. + UNDEFINED_DISRUPTION_SCHEDULE = 0; + + // Not used. Required as per aip/126. + DISRUPTION_SCHEDULE_UNSPECIFIED = 332543835; + + // Delay disruption for caller control. Will be default soon. + FUTURE = 474513859; + + // Default value. Disrupt the VM immediately. + IMMEDIATE = 152881041; + + } + + // The disruption schedule for the VM. Default to IMMEDIATE. + // Check the DisruptionSchedule enum for the list of possible values. + optional string disruption_schedule = 95871619; + + repeated InstancesReportHostAsFaultyRequestFaultReason fault_reasons = 168056210; + +} + +// +message InstancesReportHostAsFaultyRequestFaultReason { + // + enum Behavior { + // A value indicating that the enum field is not set. + UNDEFINED_BEHAVIOR = 0; + + // Public reportable behaviors + BEHAVIOR_UNSPECIFIED = 85734570; + + PERFORMANCE = 135701520; + + SILENT_DATA_CORRUPTION = 111360678; + + UNRECOVERABLE_GPU_ERROR = 363710747; + + } + + // + // Check the Behavior enum for the list of possible values. + optional string behavior = 437170770; + + optional string description = 422937596; + +} + // message InstancesScopedList { // [Output Only] A list of instances contained in this scope. @@ -24690,6 +24818,9 @@ message PublicDelegatedPrefix { // The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes. EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356; + // The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes. + EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284; + } // [Output Only] The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is active. - `DELETING` The public delegated prefix is being deprovsioned. @@ -24830,6 +24961,9 @@ message PublicDelegatedPrefixPublicDelegatedSubPrefix { // The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes. EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356; + // The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes. + EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284; + } // [Output Only] The status of the sub public delegated prefix. @@ -26348,6 +26482,31 @@ message RemoveRuleSecurityPolicyRequest { } +// A request message for Instances.ReportHostAsFaulty. See the method description for details. +message ReportHostAsFaultyInstanceRequest { + // Name of the instance scoping this request. + string instance = 18257045 [(google.api.field_behavior) = REQUIRED]; + + // The body resource for this request + InstancesReportHostAsFaultyRequest instances_report_host_as_faulty_request_resource = 494094886 [(google.api.field_behavior) = REQUIRED]; + + // Project ID for this request. + string project = 227560217 [ + (google.api.field_behavior) = REQUIRED, + (google.cloud.operation_request_field) = "project" + ]; + + // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + optional string request_id = 37109963; + + // The name of the zone for this request. + string zone = 3744684 [ + (google.api.field_behavior) = REQUIRED, + (google.cloud.operation_request_field) = "zone" + ]; + +} + // A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow. message RequestMirrorPolicy { // The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service. @@ -26399,6 +26558,9 @@ message Reservation { // The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. optional string name = 3373707; + // Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services. + optional AllocationReservationSharingPolicy reservation_sharing_policy = 205970120; + // Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation. map resource_policies = 22220385; @@ -27044,12 +27206,31 @@ message ResourceStatus { // [Output Only] The precise location of your instance within the zone's data center, including the block, sub-block, and host. The field is formatted as follows: blockId/subBlockId/hostId. optional string physical_host = 464370704; + // [Output Only] A series of fields containing the global name of the Compute Engine cluster, as well as the ID of the block, sub-block, and host on which the running instance is located. + optional ResourceStatusPhysicalHostTopology physical_host_topology = 390842814; + optional ResourceStatusScheduling scheduling = 386688404; optional UpcomingMaintenance upcoming_maintenance = 227348592; } +// Represents the physical host topology of the host on which the VM is running. +message ResourceStatusPhysicalHostTopology { + // [Output Only] The ID of the block in which the running instance is located. Instances within the same block experience low network latency. + optional string block = 93832333; + + // [Output Only] The global name of the Compute Engine cluster where the running instance is located. + optional string cluster = 335221242; + + // [Output Only] The ID of the host on which the running instance is located. Instances on the same host experience the lowest possible network latency. + optional string host = 3208616; + + // [Output Only] The ID of the sub-block in which the running instance is located. Instances in the same sub-block experience lower network latency than instances in the same block. + optional string subblock = 70446669; + +} + // message ResourceStatusScheduling { // Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance. @@ -28482,6 +28663,9 @@ message Scheduling { // A value indicating that the enum field is not set. UNDEFINED_PROVISIONING_MODEL = 0; + // Bound to the lifecycle of the reservation in which it is provisioned. + RESERVATION_BOUND = 293538571; + // Heavily discounted, no guaranteed runtime. SPOT = 2552066; @@ -33018,6 +33202,17 @@ message Subnetwork { } + // [Output Only] Possible endpoints of this subnetwork. It can be one of the following: - VM_ONLY: The subnetwork can be used for creating instances and IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 ranges from a public delegated prefix and cannot be used to create NetLb. - VM_AND_FR: The subnetwork can be used for creating both VM instances and Forwarding Rules. It can also be used to reserve IPv6 addresses with both VM and FR endpoint types. Such a subnetwork gets its IPv6 range from Google IP Pool directly. + enum Ipv6GceEndpoint { + // A value indicating that the enum field is not set. + UNDEFINED_IPV6_GCE_ENDPOINT = 0; + + VM_AND_FR = 41830108; + + VM_ONLY = 236773428; + + } + // This field is for internal use. This field can be both set at resource creation time and updated using patch. enum PrivateIpv6GoogleAccess { // A value indicating that the enum field is not set. @@ -33136,6 +33331,9 @@ message Subnetwork { // The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in the Valid ranges list. The range can be expanded after creation using expandIpCidrRange. optional string ip_cidr_range = 98117322; + // Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in EXTERNAL_IPV6_SUBNETWORK_CREATION mode. Use one of the following formats to specify a sub-PDP when creating a dual stack subnetwork with external access using BYOIP: - Full resource URL, as in https://www.googleapis.com/compute/v1/projects/projectId/regions/region /publicDelegatedPrefixes/sub-pdp-name - Partial URL, as in - projects/projectId/regions/region/publicDelegatedPrefixes/ sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name + optional string ip_collection = 176818358; + // The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. // Check the Ipv6AccessType enum for the list of possible values. optional string ipv6_access_type = 504658653; @@ -33143,6 +33341,10 @@ message Subnetwork { // [Output Only] This field is for internal use. optional string ipv6_cidr_range = 273141258; + // [Output Only] Possible endpoints of this subnetwork. It can be one of the following: - VM_ONLY: The subnetwork can be used for creating instances and IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 ranges from a public delegated prefix and cannot be used to create NetLb. - VM_AND_FR: The subnetwork can be used for creating both VM instances and Forwarding Rules. It can also be used to reserve IPv6 addresses with both VM and FR endpoint types. Such a subnetwork gets its IPv6 range from Google IP Pool directly. + // Check the Ipv6GceEndpoint enum for the list of possible values. + optional string ipv6_gce_endpoint = 320382307; + // [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. optional string kind = 3292052; @@ -33776,7 +33978,7 @@ message TargetHttpsProxy { // [Output Only] Server-defined URL for the resource. optional string self_link = 456214797; - // Optional. A URL referring to a networksecurity.ServerTlsPolicy resource that describes how the proxy should authenticate inbound traffic. serverTlsPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL or EXTERNAL_MANAGED. For details which ServerTlsPolicy resources are accepted with INTERNAL_SELF_MANAGED and which with EXTERNAL, EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy documentation. If left blank, communications are not encrypted. + // Optional. A URL referring to a networksecurity.ServerTlsPolicy resource that describes how the proxy should authenticate inbound traffic. serverTlsPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL or EXTERNAL_MANAGED or INTERNAL_MANAGED. It also applies to a regional TargetHttpsProxy attached to regional forwardingRules with the loadBalancingScheme set to EXTERNAL_MANAGED or INTERNAL_MANAGED. For details which ServerTlsPolicy resources are accepted with INTERNAL_SELF_MANAGED and which with EXTERNAL, INTERNAL_MANAGED, EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy documentation. If left blank, communications are not encrypted. optional string server_tls_policy = 295825266; // URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. SslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED. The URLs should refer to a SSL Certificate resource or Certificate Manager Certificate resource. Mixing Classic Certificates and Certificate Manager Certificates is not allowed. Certificate Manager Certificates must include the certificatemanager API namespace. Using Certificate Manager Certificates in this field is not supported by Global external Application Load Balancer or Classic Application Load Balancer, use certificate_map instead. Currently, you may specify up to 15 Classic SSL Certificates or up to 100 Certificate Manager Certificates. Certificate Manager Certificates accepted formats are: - //certificatemanager.googleapis.com/projects/{project}/locations/{ location}/certificates/{resourceName}. - https://certificatemanager.googleapis.com/v1alpha1/projects/{project }/locations/{location}/certificates/{resourceName}. @@ -39310,6 +39512,16 @@ service Instances { option (google.cloud.operation_service) = "ZoneOperations"; } + // Mark the host as faulty and try to restart the instance on a new host. + rpc ReportHostAsFaulty(ReportHostAsFaultyInstanceRequest) returns (Operation) { + option (google.api.http) = { + body: "instances_report_host_as_faulty_request_resource" + post: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty" + }; + option (google.api.method_signature) = "project,zone,instance,instances_report_host_as_faulty_request_resource"; + option (google.cloud.operation_service) = "ZoneOperations"; + } + // Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance. rpc Reset(ResetInstanceRequest) returns (Operation) { option (google.api.http) = { diff --git a/packages/google-cloud-compute/protos/protos.d.ts b/packages/google-cloud-compute/protos/protos.d.ts index a6d73e90f6d..893f06a55ec 100644 --- a/packages/google-cloud-compute/protos/protos.d.ts +++ b/packages/google-cloud-compute/protos/protos.d.ts @@ -12424,6 +12424,117 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AllocationReservationSharingPolicy. */ + interface IAllocationReservationSharingPolicy { + + /** AllocationReservationSharingPolicy serviceShareType */ + serviceShareType?: (string|null); + } + + /** Represents an AllocationReservationSharingPolicy. */ + class AllocationReservationSharingPolicy implements IAllocationReservationSharingPolicy { + + /** + * Constructs a new AllocationReservationSharingPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IAllocationReservationSharingPolicy); + + /** AllocationReservationSharingPolicy serviceShareType. */ + public serviceShareType?: (string|null); + + /** AllocationReservationSharingPolicy _serviceShareType. */ + public _serviceShareType?: "serviceShareType"; + + /** + * Creates a new AllocationReservationSharingPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns AllocationReservationSharingPolicy instance + */ + public static create(properties?: google.cloud.compute.v1.IAllocationReservationSharingPolicy): google.cloud.compute.v1.AllocationReservationSharingPolicy; + + /** + * Encodes the specified AllocationReservationSharingPolicy message. Does not implicitly {@link google.cloud.compute.v1.AllocationReservationSharingPolicy.verify|verify} messages. + * @param message AllocationReservationSharingPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IAllocationReservationSharingPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllocationReservationSharingPolicy message, length delimited. Does not implicitly {@link google.cloud.compute.v1.AllocationReservationSharingPolicy.verify|verify} messages. + * @param message AllocationReservationSharingPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IAllocationReservationSharingPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllocationReservationSharingPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllocationReservationSharingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.AllocationReservationSharingPolicy; + + /** + * Decodes an AllocationReservationSharingPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllocationReservationSharingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.AllocationReservationSharingPolicy; + + /** + * Verifies an AllocationReservationSharingPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllocationReservationSharingPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllocationReservationSharingPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.AllocationReservationSharingPolicy; + + /** + * Creates a plain object from an AllocationReservationSharingPolicy message. Also converts values to other types if specified. + * @param message AllocationReservationSharingPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.AllocationReservationSharingPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllocationReservationSharingPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllocationReservationSharingPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AllocationReservationSharingPolicy { + + /** ServiceShareType enum. */ + enum ServiceShareType { + UNDEFINED_SERVICE_SHARE_TYPE = 0, + ALLOW_ALL = 475536235, + DISALLOW_ALL = 277786301, + SERVICE_SHARE_TYPE_UNSPECIFIED = 279057148 + } + } + /** Properties of an AllocationResourceStatus. */ interface IAllocationResourceStatus { @@ -12529,6 +12640,9 @@ export namespace google { /** AllocationResourceStatusSpecificSKUAllocation sourceInstanceTemplateId */ sourceInstanceTemplateId?: (string|null); + + /** AllocationResourceStatusSpecificSKUAllocation utilizations */ + utilizations?: ({ [k: string]: (number|Long|string) }|null); } /** Represents an AllocationResourceStatusSpecificSKUAllocation. */ @@ -12543,6 +12657,9 @@ export namespace google { /** AllocationResourceStatusSpecificSKUAllocation sourceInstanceTemplateId. */ public sourceInstanceTemplateId?: (string|null); + /** AllocationResourceStatusSpecificSKUAllocation utilizations. */ + public utilizations: { [k: string]: (number|Long|string) }; + /** AllocationResourceStatusSpecificSKUAllocation _sourceInstanceTemplateId. */ public _sourceInstanceTemplateId?: "sourceInstanceTemplateId"; @@ -16428,6 +16545,9 @@ export namespace google { /** Backend capacityScaler */ capacityScaler?: (number|null); + /** Backend customMetrics */ + customMetrics?: (google.cloud.compute.v1.IBackendCustomMetric[]|null); + /** Backend description */ description?: (string|null); @@ -16477,6 +16597,9 @@ export namespace google { /** Backend capacityScaler. */ public capacityScaler?: (number|null); + /** Backend customMetrics. */ + public customMetrics: google.cloud.compute.v1.IBackendCustomMetric[]; + /** Backend description. */ public description?: (string|null); @@ -16633,6 +16756,7 @@ export namespace google { enum BalancingMode { UNDEFINED_BALANCING_MODE = 0, CONNECTION = 246311646, + CUSTOM_METRICS = 331575765, RATE = 2508000, UTILIZATION = 157008386 } @@ -17614,6 +17738,124 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BackendCustomMetric. */ + interface IBackendCustomMetric { + + /** BackendCustomMetric dryRun */ + dryRun?: (boolean|null); + + /** BackendCustomMetric maxUtilization */ + maxUtilization?: (number|null); + + /** BackendCustomMetric name */ + name?: (string|null); + } + + /** Represents a BackendCustomMetric. */ + class BackendCustomMetric implements IBackendCustomMetric { + + /** + * Constructs a new BackendCustomMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IBackendCustomMetric); + + /** BackendCustomMetric dryRun. */ + public dryRun?: (boolean|null); + + /** BackendCustomMetric maxUtilization. */ + public maxUtilization?: (number|null); + + /** BackendCustomMetric name. */ + public name?: (string|null); + + /** BackendCustomMetric _dryRun. */ + public _dryRun?: "dryRun"; + + /** BackendCustomMetric _maxUtilization. */ + public _maxUtilization?: "maxUtilization"; + + /** BackendCustomMetric _name. */ + public _name?: "name"; + + /** + * Creates a new BackendCustomMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns BackendCustomMetric instance + */ + public static create(properties?: google.cloud.compute.v1.IBackendCustomMetric): google.cloud.compute.v1.BackendCustomMetric; + + /** + * Encodes the specified BackendCustomMetric message. Does not implicitly {@link google.cloud.compute.v1.BackendCustomMetric.verify|verify} messages. + * @param message BackendCustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IBackendCustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackendCustomMetric message, length delimited. Does not implicitly {@link google.cloud.compute.v1.BackendCustomMetric.verify|verify} messages. + * @param message BackendCustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IBackendCustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackendCustomMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackendCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.BackendCustomMetric; + + /** + * Decodes a BackendCustomMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackendCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.BackendCustomMetric; + + /** + * Verifies a BackendCustomMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackendCustomMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackendCustomMetric + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.BackendCustomMetric; + + /** + * Creates a plain object from a BackendCustomMetric message. Also converts values to other types if specified. + * @param message BackendCustomMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.BackendCustomMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackendCustomMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackendCustomMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a BackendService. */ interface IBackendService { @@ -17644,6 +17886,9 @@ export namespace google { /** BackendService creationTimestamp */ creationTimestamp?: (string|null); + /** BackendService customMetrics */ + customMetrics?: (google.cloud.compute.v1.IBackendServiceCustomMetric[]|null); + /** BackendService customRequestHeaders */ customRequestHeaders?: (string[]|null); @@ -17786,6 +18031,9 @@ export namespace google { /** BackendService creationTimestamp. */ public creationTimestamp?: (string|null); + /** BackendService customMetrics. */ + public customMetrics: google.cloud.compute.v1.IBackendServiceCustomMetric[]; + /** BackendService customRequestHeaders. */ public customRequestHeaders: string[]; @@ -18116,7 +18364,8 @@ export namespace google { RANDOM = 262527171, RING_HASH = 432795069, ROUND_ROBIN = 153895801, - WEIGHTED_MAGLEV = 254930962 + WEIGHTED_MAGLEV = 254930962, + WEIGHTED_ROUND_ROBIN = 5584977 } /** Protocol enum. */ @@ -18852,6 +19101,115 @@ export namespace google { } } + /** Properties of a BackendServiceCustomMetric. */ + interface IBackendServiceCustomMetric { + + /** BackendServiceCustomMetric dryRun */ + dryRun?: (boolean|null); + + /** BackendServiceCustomMetric name */ + name?: (string|null); + } + + /** Represents a BackendServiceCustomMetric. */ + class BackendServiceCustomMetric implements IBackendServiceCustomMetric { + + /** + * Constructs a new BackendServiceCustomMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IBackendServiceCustomMetric); + + /** BackendServiceCustomMetric dryRun. */ + public dryRun?: (boolean|null); + + /** BackendServiceCustomMetric name. */ + public name?: (string|null); + + /** BackendServiceCustomMetric _dryRun. */ + public _dryRun?: "dryRun"; + + /** BackendServiceCustomMetric _name. */ + public _name?: "name"; + + /** + * Creates a new BackendServiceCustomMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns BackendServiceCustomMetric instance + */ + public static create(properties?: google.cloud.compute.v1.IBackendServiceCustomMetric): google.cloud.compute.v1.BackendServiceCustomMetric; + + /** + * Encodes the specified BackendServiceCustomMetric message. Does not implicitly {@link google.cloud.compute.v1.BackendServiceCustomMetric.verify|verify} messages. + * @param message BackendServiceCustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IBackendServiceCustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackendServiceCustomMetric message, length delimited. Does not implicitly {@link google.cloud.compute.v1.BackendServiceCustomMetric.verify|verify} messages. + * @param message BackendServiceCustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IBackendServiceCustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackendServiceCustomMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackendServiceCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.BackendServiceCustomMetric; + + /** + * Decodes a BackendServiceCustomMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackendServiceCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.BackendServiceCustomMetric; + + /** + * Verifies a BackendServiceCustomMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackendServiceCustomMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackendServiceCustomMetric + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.BackendServiceCustomMetric; + + /** + * Creates a plain object from a BackendServiceCustomMetric message. Also converts values to other types if specified. + * @param message BackendServiceCustomMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.BackendServiceCustomMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackendServiceCustomMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackendServiceCustomMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a BackendServiceFailoverPolicy. */ interface IBackendServiceFailoverPolicy { @@ -19941,7 +20299,8 @@ export namespace google { RANDOM = 262527171, RING_HASH = 432795069, ROUND_ROBIN = 153895801, - WEIGHTED_MAGLEV = 254930962 + WEIGHTED_MAGLEV = 254930962, + WEIGHTED_ROUND_ROBIN = 5584977 } } @@ -23671,6 +24030,7 @@ export namespace google { GRAPHICS_OPTIMIZED = 68500563, MEMORY_OPTIMIZED = 281753417, MEMORY_OPTIMIZED_M3 = 276301372, + MEMORY_OPTIMIZED_M4 = 276301373, MEMORY_OPTIMIZED_X4_16TB = 183089120, MEMORY_OPTIMIZED_X4_24TB = 183116989, MEMORY_OPTIMIZED_X4_32TB = 183144858, @@ -78471,6 +78831,9 @@ export namespace google { /** InstanceGroupManager region */ region?: (string|null); + /** InstanceGroupManager resourcePolicies */ + resourcePolicies?: (google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies|null); + /** InstanceGroupManager satisfiesPzi */ satisfiesPzi?: (boolean|null); @@ -78574,6 +78937,9 @@ export namespace google { /** InstanceGroupManager region. */ public region?: (string|null); + /** InstanceGroupManager resourcePolicies. */ + public resourcePolicies?: (google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies|null); + /** InstanceGroupManager satisfiesPzi. */ public satisfiesPzi?: (boolean|null); @@ -78661,6 +79027,9 @@ export namespace google { /** InstanceGroupManager _region. */ public _region?: "region"; + /** InstanceGroupManager _resourcePolicies. */ + public _resourcePolicies?: "resourcePolicies"; + /** InstanceGroupManager _satisfiesPzi. */ public _satisfiesPzi?: "satisfiesPzi"; @@ -80382,6 +80751,106 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an InstanceGroupManagerResourcePolicies. */ + interface IInstanceGroupManagerResourcePolicies { + + /** InstanceGroupManagerResourcePolicies workloadPolicy */ + workloadPolicy?: (string|null); + } + + /** Represents an InstanceGroupManagerResourcePolicies. */ + class InstanceGroupManagerResourcePolicies implements IInstanceGroupManagerResourcePolicies { + + /** + * Constructs a new InstanceGroupManagerResourcePolicies. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies); + + /** InstanceGroupManagerResourcePolicies workloadPolicy. */ + public workloadPolicy?: (string|null); + + /** InstanceGroupManagerResourcePolicies _workloadPolicy. */ + public _workloadPolicy?: "workloadPolicy"; + + /** + * Creates a new InstanceGroupManagerResourcePolicies instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceGroupManagerResourcePolicies instance + */ + public static create(properties?: google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies): google.cloud.compute.v1.InstanceGroupManagerResourcePolicies; + + /** + * Encodes the specified InstanceGroupManagerResourcePolicies message. Does not implicitly {@link google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.verify|verify} messages. + * @param message InstanceGroupManagerResourcePolicies message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceGroupManagerResourcePolicies message, length delimited. Does not implicitly {@link google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.verify|verify} messages. + * @param message InstanceGroupManagerResourcePolicies message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceGroupManagerResourcePolicies message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceGroupManagerResourcePolicies + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.InstanceGroupManagerResourcePolicies; + + /** + * Decodes an InstanceGroupManagerResourcePolicies message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceGroupManagerResourcePolicies + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.InstanceGroupManagerResourcePolicies; + + /** + * Verifies an InstanceGroupManagerResourcePolicies message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceGroupManagerResourcePolicies message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceGroupManagerResourcePolicies + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.InstanceGroupManagerResourcePolicies; + + /** + * Creates a plain object from an InstanceGroupManagerResourcePolicies message. Also converts values to other types if specified. + * @param message InstanceGroupManagerResourcePolicies + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.InstanceGroupManagerResourcePolicies, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceGroupManagerResourcePolicies to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceGroupManagerResourcePolicies + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an InstanceGroupManagerStandbyPolicy. */ interface IInstanceGroupManagerStandbyPolicy { @@ -86716,6 +87185,244 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an InstancesReportHostAsFaultyRequest. */ + interface IInstancesReportHostAsFaultyRequest { + + /** InstancesReportHostAsFaultyRequest disruptionSchedule */ + disruptionSchedule?: (string|null); + + /** InstancesReportHostAsFaultyRequest faultReasons */ + faultReasons?: (google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason[]|null); + } + + /** Represents an InstancesReportHostAsFaultyRequest. */ + class InstancesReportHostAsFaultyRequest implements IInstancesReportHostAsFaultyRequest { + + /** + * Constructs a new InstancesReportHostAsFaultyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest); + + /** InstancesReportHostAsFaultyRequest disruptionSchedule. */ + public disruptionSchedule?: (string|null); + + /** InstancesReportHostAsFaultyRequest faultReasons. */ + public faultReasons: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason[]; + + /** InstancesReportHostAsFaultyRequest _disruptionSchedule. */ + public _disruptionSchedule?: "disruptionSchedule"; + + /** + * Creates a new InstancesReportHostAsFaultyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InstancesReportHostAsFaultyRequest instance + */ + public static create(properties?: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest): google.cloud.compute.v1.InstancesReportHostAsFaultyRequest; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequest message. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.verify|verify} messages. + * @param message InstancesReportHostAsFaultyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequest message, length delimited. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.verify|verify} messages. + * @param message InstancesReportHostAsFaultyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstancesReportHostAsFaultyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstancesReportHostAsFaultyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.InstancesReportHostAsFaultyRequest; + + /** + * Decodes an InstancesReportHostAsFaultyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstancesReportHostAsFaultyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.InstancesReportHostAsFaultyRequest; + + /** + * Verifies an InstancesReportHostAsFaultyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstancesReportHostAsFaultyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstancesReportHostAsFaultyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.InstancesReportHostAsFaultyRequest; + + /** + * Creates a plain object from an InstancesReportHostAsFaultyRequest message. Also converts values to other types if specified. + * @param message InstancesReportHostAsFaultyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.InstancesReportHostAsFaultyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstancesReportHostAsFaultyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstancesReportHostAsFaultyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InstancesReportHostAsFaultyRequest { + + /** DisruptionSchedule enum. */ + enum DisruptionSchedule { + UNDEFINED_DISRUPTION_SCHEDULE = 0, + DISRUPTION_SCHEDULE_UNSPECIFIED = 332543835, + FUTURE = 474513859, + IMMEDIATE = 152881041 + } + } + + /** Properties of an InstancesReportHostAsFaultyRequestFaultReason. */ + interface IInstancesReportHostAsFaultyRequestFaultReason { + + /** InstancesReportHostAsFaultyRequestFaultReason behavior */ + behavior?: (string|null); + + /** InstancesReportHostAsFaultyRequestFaultReason description */ + description?: (string|null); + } + + /** Represents an InstancesReportHostAsFaultyRequestFaultReason. */ + class InstancesReportHostAsFaultyRequestFaultReason implements IInstancesReportHostAsFaultyRequestFaultReason { + + /** + * Constructs a new InstancesReportHostAsFaultyRequestFaultReason. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason); + + /** InstancesReportHostAsFaultyRequestFaultReason behavior. */ + public behavior?: (string|null); + + /** InstancesReportHostAsFaultyRequestFaultReason description. */ + public description?: (string|null); + + /** InstancesReportHostAsFaultyRequestFaultReason _behavior. */ + public _behavior?: "behavior"; + + /** InstancesReportHostAsFaultyRequestFaultReason _description. */ + public _description?: "description"; + + /** + * Creates a new InstancesReportHostAsFaultyRequestFaultReason instance using the specified properties. + * @param [properties] Properties to set + * @returns InstancesReportHostAsFaultyRequestFaultReason instance + */ + public static create(properties?: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason): google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequestFaultReason message. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.verify|verify} messages. + * @param message InstancesReportHostAsFaultyRequestFaultReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequestFaultReason message, length delimited. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.verify|verify} messages. + * @param message InstancesReportHostAsFaultyRequestFaultReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstancesReportHostAsFaultyRequestFaultReason message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstancesReportHostAsFaultyRequestFaultReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason; + + /** + * Decodes an InstancesReportHostAsFaultyRequestFaultReason message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstancesReportHostAsFaultyRequestFaultReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason; + + /** + * Verifies an InstancesReportHostAsFaultyRequestFaultReason message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstancesReportHostAsFaultyRequestFaultReason message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstancesReportHostAsFaultyRequestFaultReason + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason; + + /** + * Creates a plain object from an InstancesReportHostAsFaultyRequestFaultReason message. Also converts values to other types if specified. + * @param message InstancesReportHostAsFaultyRequestFaultReason + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstancesReportHostAsFaultyRequestFaultReason to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstancesReportHostAsFaultyRequestFaultReason + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InstancesReportHostAsFaultyRequestFaultReason { + + /** Behavior enum. */ + enum Behavior { + UNDEFINED_BEHAVIOR = 0, + BEHAVIOR_UNSPECIFIED = 85734570, + PERFORMANCE = 135701520, + SILENT_DATA_CORRUPTION = 111360678, + UNRECOVERABLE_GPU_ERROR = 363710747 + } + } + /** Properties of an InstancesScopedList. */ interface IInstancesScopedList { @@ -136841,7 +137548,8 @@ export namespace google { enum Mode { UNDEFINED_MODE = 0, DELEGATION = 264149288, - EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356 + EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356, + EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284 } /** Status enum. */ @@ -137324,7 +138032,8 @@ export namespace google { enum Mode { UNDEFINED_MODE = 0, DELEGATION = 264149288, - EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356 + EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356, + EXTERNAL_IPV6_SUBNETWORK_CREATION = 61198284 } /** Status enum. */ @@ -144900,6 +145609,130 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ReportHostAsFaultyInstanceRequest. */ + interface IReportHostAsFaultyInstanceRequest { + + /** ReportHostAsFaultyInstanceRequest instance */ + instance?: (string|null); + + /** ReportHostAsFaultyInstanceRequest instancesReportHostAsFaultyRequestResource */ + instancesReportHostAsFaultyRequestResource?: (google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest|null); + + /** ReportHostAsFaultyInstanceRequest project */ + project?: (string|null); + + /** ReportHostAsFaultyInstanceRequest requestId */ + requestId?: (string|null); + + /** ReportHostAsFaultyInstanceRequest zone */ + zone?: (string|null); + } + + /** Represents a ReportHostAsFaultyInstanceRequest. */ + class ReportHostAsFaultyInstanceRequest implements IReportHostAsFaultyInstanceRequest { + + /** + * Constructs a new ReportHostAsFaultyInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest); + + /** ReportHostAsFaultyInstanceRequest instance. */ + public instance: string; + + /** ReportHostAsFaultyInstanceRequest instancesReportHostAsFaultyRequestResource. */ + public instancesReportHostAsFaultyRequestResource?: (google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest|null); + + /** ReportHostAsFaultyInstanceRequest project. */ + public project: string; + + /** ReportHostAsFaultyInstanceRequest requestId. */ + public requestId?: (string|null); + + /** ReportHostAsFaultyInstanceRequest zone. */ + public zone: string; + + /** ReportHostAsFaultyInstanceRequest _requestId. */ + public _requestId?: "requestId"; + + /** + * Creates a new ReportHostAsFaultyInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportHostAsFaultyInstanceRequest instance + */ + public static create(properties?: google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest): google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest; + + /** + * Encodes the specified ReportHostAsFaultyInstanceRequest message. Does not implicitly {@link google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest.verify|verify} messages. + * @param message ReportHostAsFaultyInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportHostAsFaultyInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest.verify|verify} messages. + * @param message ReportHostAsFaultyInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportHostAsFaultyInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportHostAsFaultyInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest; + + /** + * Decodes a ReportHostAsFaultyInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportHostAsFaultyInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest; + + /** + * Verifies a ReportHostAsFaultyInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReportHostAsFaultyInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportHostAsFaultyInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest; + + /** + * Creates a plain object from a ReportHostAsFaultyInstanceRequest message. Also converts values to other types if specified. + * @param message ReportHostAsFaultyInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportHostAsFaultyInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportHostAsFaultyInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a RequestMirrorPolicy. */ interface IRequestMirrorPolicy { @@ -145024,6 +145857,9 @@ export namespace google { /** Reservation name */ name?: (string|null); + /** Reservation reservationSharingPolicy */ + reservationSharingPolicy?: (google.cloud.compute.v1.IAllocationReservationSharingPolicy|null); + /** Reservation resourcePolicies */ resourcePolicies?: ({ [k: string]: string }|null); @@ -145082,6 +145918,9 @@ export namespace google { /** Reservation name. */ public name?: (string|null); + /** Reservation reservationSharingPolicy. */ + public reservationSharingPolicy?: (google.cloud.compute.v1.IAllocationReservationSharingPolicy|null); + /** Reservation resourcePolicies. */ public resourcePolicies: { [k: string]: string }; @@ -145130,6 +145969,9 @@ export namespace google { /** Reservation _name. */ public _name?: "name"; + /** Reservation _reservationSharingPolicy. */ + public _reservationSharingPolicy?: "reservationSharingPolicy"; + /** Reservation _resourceStatus. */ public _resourceStatus?: "resourceStatus"; @@ -149086,6 +149928,9 @@ export namespace google { /** ResourceStatus physicalHost */ physicalHost?: (string|null); + /** ResourceStatus physicalHostTopology */ + physicalHostTopology?: (google.cloud.compute.v1.IResourceStatusPhysicalHostTopology|null); + /** ResourceStatus scheduling */ scheduling?: (google.cloud.compute.v1.IResourceStatusScheduling|null); @@ -149105,6 +149950,9 @@ export namespace google { /** ResourceStatus physicalHost. */ public physicalHost?: (string|null); + /** ResourceStatus physicalHostTopology. */ + public physicalHostTopology?: (google.cloud.compute.v1.IResourceStatusPhysicalHostTopology|null); + /** ResourceStatus scheduling. */ public scheduling?: (google.cloud.compute.v1.IResourceStatusScheduling|null); @@ -149114,6 +149962,9 @@ export namespace google { /** ResourceStatus _physicalHost. */ public _physicalHost?: "physicalHost"; + /** ResourceStatus _physicalHostTopology. */ + public _physicalHostTopology?: "physicalHostTopology"; + /** ResourceStatus _scheduling. */ public _scheduling?: "scheduling"; @@ -149198,6 +150049,133 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ResourceStatusPhysicalHostTopology. */ + interface IResourceStatusPhysicalHostTopology { + + /** ResourceStatusPhysicalHostTopology block */ + block?: (string|null); + + /** ResourceStatusPhysicalHostTopology cluster */ + cluster?: (string|null); + + /** ResourceStatusPhysicalHostTopology host */ + host?: (string|null); + + /** ResourceStatusPhysicalHostTopology subblock */ + subblock?: (string|null); + } + + /** Represents a ResourceStatusPhysicalHostTopology. */ + class ResourceStatusPhysicalHostTopology implements IResourceStatusPhysicalHostTopology { + + /** + * Constructs a new ResourceStatusPhysicalHostTopology. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IResourceStatusPhysicalHostTopology); + + /** ResourceStatusPhysicalHostTopology block. */ + public block?: (string|null); + + /** ResourceStatusPhysicalHostTopology cluster. */ + public cluster?: (string|null); + + /** ResourceStatusPhysicalHostTopology host. */ + public host?: (string|null); + + /** ResourceStatusPhysicalHostTopology subblock. */ + public subblock?: (string|null); + + /** ResourceStatusPhysicalHostTopology _block. */ + public _block?: "block"; + + /** ResourceStatusPhysicalHostTopology _cluster. */ + public _cluster?: "cluster"; + + /** ResourceStatusPhysicalHostTopology _host. */ + public _host?: "host"; + + /** ResourceStatusPhysicalHostTopology _subblock. */ + public _subblock?: "subblock"; + + /** + * Creates a new ResourceStatusPhysicalHostTopology instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceStatusPhysicalHostTopology instance + */ + public static create(properties?: google.cloud.compute.v1.IResourceStatusPhysicalHostTopology): google.cloud.compute.v1.ResourceStatusPhysicalHostTopology; + + /** + * Encodes the specified ResourceStatusPhysicalHostTopology message. Does not implicitly {@link google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.verify|verify} messages. + * @param message ResourceStatusPhysicalHostTopology message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IResourceStatusPhysicalHostTopology, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceStatusPhysicalHostTopology message, length delimited. Does not implicitly {@link google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.verify|verify} messages. + * @param message ResourceStatusPhysicalHostTopology message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IResourceStatusPhysicalHostTopology, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceStatusPhysicalHostTopology message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceStatusPhysicalHostTopology + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.ResourceStatusPhysicalHostTopology; + + /** + * Decodes a ResourceStatusPhysicalHostTopology message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceStatusPhysicalHostTopology + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.ResourceStatusPhysicalHostTopology; + + /** + * Verifies a ResourceStatusPhysicalHostTopology message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceStatusPhysicalHostTopology message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceStatusPhysicalHostTopology + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.ResourceStatusPhysicalHostTopology; + + /** + * Creates a plain object from a ResourceStatusPhysicalHostTopology message. Also converts values to other types if specified. + * @param message ResourceStatusPhysicalHostTopology + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.ResourceStatusPhysicalHostTopology, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceStatusPhysicalHostTopology to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceStatusPhysicalHostTopology + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ResourceStatusScheduling. */ interface IResourceStatusScheduling { @@ -155284,6 +156262,7 @@ export namespace google { /** ProvisioningModel enum. */ enum ProvisioningModel { UNDEFINED_PROVISIONING_MODEL = 0, + RESERVATION_BOUND = 293538571, SPOT = 2552066, STANDARD = 484642493 } @@ -180521,12 +181500,18 @@ export namespace google { /** Subnetwork ipCidrRange */ ipCidrRange?: (string|null); + /** Subnetwork ipCollection */ + ipCollection?: (string|null); + /** Subnetwork ipv6AccessType */ ipv6AccessType?: (string|null); /** Subnetwork ipv6CidrRange */ ipv6CidrRange?: (string|null); + /** Subnetwork ipv6GceEndpoint */ + ipv6GceEndpoint?: (string|null); + /** Subnetwork kind */ kind?: (string|null); @@ -180606,12 +181591,18 @@ export namespace google { /** Subnetwork ipCidrRange. */ public ipCidrRange?: (string|null); + /** Subnetwork ipCollection. */ + public ipCollection?: (string|null); + /** Subnetwork ipv6AccessType. */ public ipv6AccessType?: (string|null); /** Subnetwork ipv6CidrRange. */ public ipv6CidrRange?: (string|null); + /** Subnetwork ipv6GceEndpoint. */ + public ipv6GceEndpoint?: (string|null); + /** Subnetwork kind. */ public kind?: (string|null); @@ -180681,12 +181672,18 @@ export namespace google { /** Subnetwork _ipCidrRange. */ public _ipCidrRange?: "ipCidrRange"; + /** Subnetwork _ipCollection. */ + public _ipCollection?: "ipCollection"; + /** Subnetwork _ipv6AccessType. */ public _ipv6AccessType?: "ipv6AccessType"; /** Subnetwork _ipv6CidrRange. */ public _ipv6CidrRange?: "ipv6CidrRange"; + /** Subnetwork _ipv6GceEndpoint. */ + public _ipv6GceEndpoint?: "ipv6GceEndpoint"; + /** Subnetwork _kind. */ public _kind?: "kind"; @@ -180814,6 +181811,13 @@ export namespace google { UNSPECIFIED_IPV6_ACCESS_TYPE = 313080613 } + /** Ipv6GceEndpoint enum. */ + enum Ipv6GceEndpoint { + UNDEFINED_IPV6_GCE_ENDPOINT = 0, + VM_AND_FR = 41830108, + VM_ONLY = 236773428 + } + /** PrivateIpv6GoogleAccess enum. */ enum PrivateIpv6GoogleAccess { UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS = 0, @@ -207506,6 +208510,20 @@ export namespace google { */ public removeResourcePolicies(request: google.cloud.compute.v1.IRemoveResourcePoliciesInstanceRequest): Promise; + /** + * Calls ReportHostAsFaulty. + * @param request ReportHostAsFaultyInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public reportHostAsFaulty(request: google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest, callback: google.cloud.compute.v1.Instances.ReportHostAsFaultyCallback): void; + + /** + * Calls ReportHostAsFaulty. + * @param request ReportHostAsFaultyInstanceRequest message or plain object + * @returns Promise + */ + public reportHostAsFaulty(request: google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest): Promise; + /** * Calls Reset. * @param request ResetInstanceRequest message or plain object @@ -208041,6 +209059,13 @@ export namespace google { */ type RemoveResourcePoliciesCallback = (error: (Error|null), response?: google.cloud.compute.v1.Operation) => void; + /** + * Callback as used by {@link google.cloud.compute.v1.Instances|reportHostAsFaulty}. + * @param error Error, if any + * @param [response] Operation + */ + type ReportHostAsFaultyCallback = (error: (Error|null), response?: google.cloud.compute.v1.Operation) => void; + /** * Callback as used by {@link google.cloud.compute.v1.Instances|reset}. * @param error Error, if any diff --git a/packages/google-cloud-compute/protos/protos.js b/packages/google-cloud-compute/protos/protos.js index 670b2d36bd8..41ae0d1aade 100644 --- a/packages/google-cloud-compute/protos/protos.js +++ b/packages/google-cloud-compute/protos/protos.js @@ -35971,6 +35971,245 @@ return AllocationAggregateReservationReservedResourceInfoAccelerator; })(); + v1.AllocationReservationSharingPolicy = (function() { + + /** + * Properties of an AllocationReservationSharingPolicy. + * @memberof google.cloud.compute.v1 + * @interface IAllocationReservationSharingPolicy + * @property {string|null} [serviceShareType] AllocationReservationSharingPolicy serviceShareType + */ + + /** + * Constructs a new AllocationReservationSharingPolicy. + * @memberof google.cloud.compute.v1 + * @classdesc Represents an AllocationReservationSharingPolicy. + * @implements IAllocationReservationSharingPolicy + * @constructor + * @param {google.cloud.compute.v1.IAllocationReservationSharingPolicy=} [properties] Properties to set + */ + function AllocationReservationSharingPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllocationReservationSharingPolicy serviceShareType. + * @member {string|null|undefined} serviceShareType + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @instance + */ + AllocationReservationSharingPolicy.prototype.serviceShareType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AllocationReservationSharingPolicy _serviceShareType. + * @member {"serviceShareType"|undefined} _serviceShareType + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @instance + */ + Object.defineProperty(AllocationReservationSharingPolicy.prototype, "_serviceShareType", { + get: $util.oneOfGetter($oneOfFields = ["serviceShareType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AllocationReservationSharingPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {google.cloud.compute.v1.IAllocationReservationSharingPolicy=} [properties] Properties to set + * @returns {google.cloud.compute.v1.AllocationReservationSharingPolicy} AllocationReservationSharingPolicy instance + */ + AllocationReservationSharingPolicy.create = function create(properties) { + return new AllocationReservationSharingPolicy(properties); + }; + + /** + * Encodes the specified AllocationReservationSharingPolicy message. Does not implicitly {@link google.cloud.compute.v1.AllocationReservationSharingPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {google.cloud.compute.v1.IAllocationReservationSharingPolicy} message AllocationReservationSharingPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationReservationSharingPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceShareType != null && Object.hasOwnProperty.call(message, "serviceShareType")) + writer.uint32(/* id 514508644, wireType 2 =*/4116069154).string(message.serviceShareType); + return writer; + }; + + /** + * Encodes the specified AllocationReservationSharingPolicy message, length delimited. Does not implicitly {@link google.cloud.compute.v1.AllocationReservationSharingPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {google.cloud.compute.v1.IAllocationReservationSharingPolicy} message AllocationReservationSharingPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationReservationSharingPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllocationReservationSharingPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.AllocationReservationSharingPolicy} AllocationReservationSharingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationReservationSharingPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.AllocationReservationSharingPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 514508644: { + message.serviceShareType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllocationReservationSharingPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.AllocationReservationSharingPolicy} AllocationReservationSharingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationReservationSharingPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllocationReservationSharingPolicy message. + * @function verify + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllocationReservationSharingPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.serviceShareType != null && message.hasOwnProperty("serviceShareType")) { + properties._serviceShareType = 1; + if (!$util.isString(message.serviceShareType)) + return "serviceShareType: string expected"; + } + return null; + }; + + /** + * Creates an AllocationReservationSharingPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.AllocationReservationSharingPolicy} AllocationReservationSharingPolicy + */ + AllocationReservationSharingPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.AllocationReservationSharingPolicy) + return object; + var message = new $root.google.cloud.compute.v1.AllocationReservationSharingPolicy(); + if (object.serviceShareType != null) + message.serviceShareType = String(object.serviceShareType); + return message; + }; + + /** + * Creates a plain object from an AllocationReservationSharingPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {google.cloud.compute.v1.AllocationReservationSharingPolicy} message AllocationReservationSharingPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllocationReservationSharingPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.serviceShareType != null && message.hasOwnProperty("serviceShareType")) { + object.serviceShareType = message.serviceShareType; + if (options.oneofs) + object._serviceShareType = "serviceShareType"; + } + return object; + }; + + /** + * Converts this AllocationReservationSharingPolicy to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @instance + * @returns {Object.} JSON object + */ + AllocationReservationSharingPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllocationReservationSharingPolicy + * @function getTypeUrl + * @memberof google.cloud.compute.v1.AllocationReservationSharingPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllocationReservationSharingPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.AllocationReservationSharingPolicy"; + }; + + /** + * ServiceShareType enum. + * @name google.cloud.compute.v1.AllocationReservationSharingPolicy.ServiceShareType + * @enum {number} + * @property {number} UNDEFINED_SERVICE_SHARE_TYPE=0 UNDEFINED_SERVICE_SHARE_TYPE value + * @property {number} ALLOW_ALL=475536235 ALLOW_ALL value + * @property {number} DISALLOW_ALL=277786301 DISALLOW_ALL value + * @property {number} SERVICE_SHARE_TYPE_UNSPECIFIED=279057148 SERVICE_SHARE_TYPE_UNSPECIFIED value + */ + AllocationReservationSharingPolicy.ServiceShareType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNDEFINED_SERVICE_SHARE_TYPE"] = 0; + values[valuesById[475536235] = "ALLOW_ALL"] = 475536235; + values[valuesById[277786301] = "DISALLOW_ALL"] = 277786301; + values[valuesById[279057148] = "SERVICE_SHARE_TYPE_UNSPECIFIED"] = 279057148; + return values; + })(); + + return AllocationReservationSharingPolicy; + })(); + v1.AllocationResourceStatus = (function() { /** @@ -36205,6 +36444,7 @@ * @memberof google.cloud.compute.v1 * @interface IAllocationResourceStatusSpecificSKUAllocation * @property {string|null} [sourceInstanceTemplateId] AllocationResourceStatusSpecificSKUAllocation sourceInstanceTemplateId + * @property {Object.|null} [utilizations] AllocationResourceStatusSpecificSKUAllocation utilizations */ /** @@ -36216,6 +36456,7 @@ * @param {google.cloud.compute.v1.IAllocationResourceStatusSpecificSKUAllocation=} [properties] Properties to set */ function AllocationResourceStatusSpecificSKUAllocation(properties) { + this.utilizations = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36230,6 +36471,14 @@ */ AllocationResourceStatusSpecificSKUAllocation.prototype.sourceInstanceTemplateId = null; + /** + * AllocationResourceStatusSpecificSKUAllocation utilizations. + * @member {Object.} utilizations + * @memberof google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation + * @instance + */ + AllocationResourceStatusSpecificSKUAllocation.prototype.utilizations = $util.emptyObject; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -36270,6 +36519,9 @@ writer = $Writer.create(); if (message.sourceInstanceTemplateId != null && Object.hasOwnProperty.call(message, "sourceInstanceTemplateId")) writer.uint32(/* id 111196154, wireType 2 =*/889569234).string(message.sourceInstanceTemplateId); + if (message.utilizations != null && Object.hasOwnProperty.call(message, "utilizations")) + for (var keys = Object.keys(message.utilizations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 402495121, wireType 2 =*/3219960970).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int64(message.utilizations[keys[i]]).ldelim(); return writer; }; @@ -36300,7 +36552,7 @@ AllocationResourceStatusSpecificSKUAllocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -36308,6 +36560,29 @@ message.sourceInstanceTemplateId = reader.string(); break; } + case 402495121: { + if (message.utilizations === $util.emptyObject) + message.utilizations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int64(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.utilizations[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -36349,6 +36624,14 @@ if (!$util.isString(message.sourceInstanceTemplateId)) return "sourceInstanceTemplateId: string expected"; } + if (message.utilizations != null && message.hasOwnProperty("utilizations")) { + if (!$util.isObject(message.utilizations)) + return "utilizations: object expected"; + var key = Object.keys(message.utilizations); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.utilizations[key[i]]) && !(message.utilizations[key[i]] && $util.isInteger(message.utilizations[key[i]].low) && $util.isInteger(message.utilizations[key[i]].high))) + return "utilizations: integer|Long{k:string} expected"; + } return null; }; @@ -36366,6 +36649,20 @@ var message = new $root.google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation(); if (object.sourceInstanceTemplateId != null) message.sourceInstanceTemplateId = String(object.sourceInstanceTemplateId); + if (object.utilizations) { + if (typeof object.utilizations !== "object") + throw TypeError(".google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation.utilizations: object expected"); + message.utilizations = {}; + for (var keys = Object.keys(object.utilizations), i = 0; i < keys.length; ++i) + if ($util.Long) + (message.utilizations[keys[i]] = $util.Long.fromValue(object.utilizations[keys[i]])).unsigned = false; + else if (typeof object.utilizations[keys[i]] === "string") + message.utilizations[keys[i]] = parseInt(object.utilizations[keys[i]], 10); + else if (typeof object.utilizations[keys[i]] === "number") + message.utilizations[keys[i]] = object.utilizations[keys[i]]; + else if (typeof object.utilizations[keys[i]] === "object") + message.utilizations[keys[i]] = new $util.LongBits(object.utilizations[keys[i]].low >>> 0, object.utilizations[keys[i]].high >>> 0).toNumber(); + } return message; }; @@ -36382,11 +36679,22 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.utilizations = {}; if (message.sourceInstanceTemplateId != null && message.hasOwnProperty("sourceInstanceTemplateId")) { object.sourceInstanceTemplateId = message.sourceInstanceTemplateId; if (options.oneofs) object._sourceInstanceTemplateId = "sourceInstanceTemplateId"; } + var keys2; + if (message.utilizations && (keys2 = Object.keys(message.utilizations)).length) { + object.utilizations = {}; + for (var j = 0; j < keys2.length; ++j) + if (typeof message.utilizations[keys2[j]] === "number") + object.utilizations[keys2[j]] = options.longs === String ? String(message.utilizations[keys2[j]]) : message.utilizations[keys2[j]]; + else + object.utilizations[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.utilizations[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.utilizations[keys2[j]].low >>> 0, message.utilizations[keys2[j]].high >>> 0).toNumber() : message.utilizations[keys2[j]]; + } return object; }; @@ -47260,6 +47568,7 @@ * @interface IBackend * @property {string|null} [balancingMode] Backend balancingMode * @property {number|null} [capacityScaler] Backend capacityScaler + * @property {Array.|null} [customMetrics] Backend customMetrics * @property {string|null} [description] Backend description * @property {boolean|null} [failover] Backend failover * @property {string|null} [group] Backend group @@ -47282,6 +47591,7 @@ * @param {google.cloud.compute.v1.IBackend=} [properties] Properties to set */ function Backend(properties) { + this.customMetrics = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47304,6 +47614,14 @@ */ Backend.prototype.capacityScaler = null; + /** + * Backend customMetrics. + * @member {Array.} customMetrics + * @memberof google.cloud.compute.v1.Backend + * @instance + */ + Backend.prototype.customMetrics = $util.emptyArray; + /** * Backend description. * @member {string|null|undefined} description @@ -47586,6 +47904,9 @@ writer.uint32(/* id 408035035, wireType 0 =*/3264280280).int32(message.maxRate); if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 422937596, wireType 2 =*/3383500770).string(message.description); + if (message.customMetrics != null && message.customMetrics.length) + for (var i = 0; i < message.customMetrics.length; ++i) + $root.google.cloud.compute.v1.BackendCustomMetric.encode(message.customMetrics[i], writer.uint32(/* id 429453813, wireType 2 =*/3435630506).fork()).ldelim(); if (message.balancingMode != null && Object.hasOwnProperty.call(message, "balancingMode")) writer.uint32(/* id 430286217, wireType 2 =*/3442289738).string(message.balancingMode); return writer; @@ -47630,6 +47951,12 @@ message.capacityScaler = reader.float(); break; } + case 429453813: { + if (!(message.customMetrics && message.customMetrics.length)) + message.customMetrics = []; + message.customMetrics.push($root.google.cloud.compute.v1.BackendCustomMetric.decode(reader, reader.uint32())); + break; + } case 422937596: { message.description = reader.string(); break; @@ -47720,6 +48047,15 @@ if (typeof message.capacityScaler !== "number") return "capacityScaler: number expected"; } + if (message.customMetrics != null && message.hasOwnProperty("customMetrics")) { + if (!Array.isArray(message.customMetrics)) + return "customMetrics: array expected"; + for (var i = 0; i < message.customMetrics.length; ++i) { + var error = $root.google.cloud.compute.v1.BackendCustomMetric.verify(message.customMetrics[i]); + if (error) + return "customMetrics." + error; + } + } if (message.description != null && message.hasOwnProperty("description")) { properties._description = 1; if (!$util.isString(message.description)) @@ -47794,6 +48130,16 @@ message.balancingMode = String(object.balancingMode); if (object.capacityScaler != null) message.capacityScaler = Number(object.capacityScaler); + if (object.customMetrics) { + if (!Array.isArray(object.customMetrics)) + throw TypeError(".google.cloud.compute.v1.Backend.customMetrics: array expected"); + message.customMetrics = []; + for (var i = 0; i < object.customMetrics.length; ++i) { + if (typeof object.customMetrics[i] !== "object") + throw TypeError(".google.cloud.compute.v1.Backend.customMetrics: object expected"); + message.customMetrics[i] = $root.google.cloud.compute.v1.BackendCustomMetric.fromObject(object.customMetrics[i]); + } + } if (object.description != null) message.description = String(object.description); if (object.failover != null) @@ -47832,6 +48178,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.customMetrics = []; if (message.maxRatePerInstance != null && message.hasOwnProperty("maxRatePerInstance")) { object.maxRatePerInstance = options.json && !isFinite(message.maxRatePerInstance) ? String(message.maxRatePerInstance) : message.maxRatePerInstance; if (options.oneofs) @@ -47892,6 +48240,11 @@ if (options.oneofs) object._description = "description"; } + if (message.customMetrics && message.customMetrics.length) { + object.customMetrics = []; + for (var j = 0; j < message.customMetrics.length; ++j) + object.customMetrics[j] = $root.google.cloud.compute.v1.BackendCustomMetric.toObject(message.customMetrics[j], options); + } if (message.balancingMode != null && message.hasOwnProperty("balancingMode")) { object.balancingMode = message.balancingMode; if (options.oneofs) @@ -47932,6 +48285,7 @@ * @enum {number} * @property {number} UNDEFINED_BALANCING_MODE=0 UNDEFINED_BALANCING_MODE value * @property {number} CONNECTION=246311646 CONNECTION value + * @property {number} CUSTOM_METRICS=331575765 CUSTOM_METRICS value * @property {number} RATE=2508000 RATE value * @property {number} UTILIZATION=157008386 UTILIZATION value */ @@ -47939,6 +48293,7 @@ var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNDEFINED_BALANCING_MODE"] = 0; values[valuesById[246311646] = "CONNECTION"] = 246311646; + values[valuesById[331575765] = "CUSTOM_METRICS"] = 331575765; values[valuesById[2508000] = "RATE"] = 2508000; values[valuesById[157008386] = "UTILIZATION"] = 157008386; return values; @@ -50757,6 +51112,303 @@ return BackendBucketUsedBy; })(); + v1.BackendCustomMetric = (function() { + + /** + * Properties of a BackendCustomMetric. + * @memberof google.cloud.compute.v1 + * @interface IBackendCustomMetric + * @property {boolean|null} [dryRun] BackendCustomMetric dryRun + * @property {number|null} [maxUtilization] BackendCustomMetric maxUtilization + * @property {string|null} [name] BackendCustomMetric name + */ + + /** + * Constructs a new BackendCustomMetric. + * @memberof google.cloud.compute.v1 + * @classdesc Represents a BackendCustomMetric. + * @implements IBackendCustomMetric + * @constructor + * @param {google.cloud.compute.v1.IBackendCustomMetric=} [properties] Properties to set + */ + function BackendCustomMetric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackendCustomMetric dryRun. + * @member {boolean|null|undefined} dryRun + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @instance + */ + BackendCustomMetric.prototype.dryRun = null; + + /** + * BackendCustomMetric maxUtilization. + * @member {number|null|undefined} maxUtilization + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @instance + */ + BackendCustomMetric.prototype.maxUtilization = null; + + /** + * BackendCustomMetric name. + * @member {string|null|undefined} name + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @instance + */ + BackendCustomMetric.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackendCustomMetric _dryRun. + * @member {"dryRun"|undefined} _dryRun + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @instance + */ + Object.defineProperty(BackendCustomMetric.prototype, "_dryRun", { + get: $util.oneOfGetter($oneOfFields = ["dryRun"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackendCustomMetric _maxUtilization. + * @member {"maxUtilization"|undefined} _maxUtilization + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @instance + */ + Object.defineProperty(BackendCustomMetric.prototype, "_maxUtilization", { + get: $util.oneOfGetter($oneOfFields = ["maxUtilization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackendCustomMetric _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @instance + */ + Object.defineProperty(BackendCustomMetric.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackendCustomMetric instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {google.cloud.compute.v1.IBackendCustomMetric=} [properties] Properties to set + * @returns {google.cloud.compute.v1.BackendCustomMetric} BackendCustomMetric instance + */ + BackendCustomMetric.create = function create(properties) { + return new BackendCustomMetric(properties); + }; + + /** + * Encodes the specified BackendCustomMetric message. Does not implicitly {@link google.cloud.compute.v1.BackendCustomMetric.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {google.cloud.compute.v1.IBackendCustomMetric} message BackendCustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendCustomMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3373707, wireType 2 =*/26989658).string(message.name); + if (message.maxUtilization != null && Object.hasOwnProperty.call(message, "maxUtilization")) + writer.uint32(/* id 148192199, wireType 5 =*/1185537597).float(message.maxUtilization); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 323854839, wireType 0 =*/2590838712).bool(message.dryRun); + return writer; + }; + + /** + * Encodes the specified BackendCustomMetric message, length delimited. Does not implicitly {@link google.cloud.compute.v1.BackendCustomMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {google.cloud.compute.v1.IBackendCustomMetric} message BackendCustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendCustomMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackendCustomMetric message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.BackendCustomMetric} BackendCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendCustomMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.BackendCustomMetric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 323854839: { + message.dryRun = reader.bool(); + break; + } + case 148192199: { + message.maxUtilization = reader.float(); + break; + } + case 3373707: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackendCustomMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.BackendCustomMetric} BackendCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendCustomMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackendCustomMetric message. + * @function verify + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackendCustomMetric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) { + properties._dryRun = 1; + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + } + if (message.maxUtilization != null && message.hasOwnProperty("maxUtilization")) { + properties._maxUtilization = 1; + if (typeof message.maxUtilization !== "number") + return "maxUtilization: number expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + return null; + }; + + /** + * Creates a BackendCustomMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.BackendCustomMetric} BackendCustomMetric + */ + BackendCustomMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.BackendCustomMetric) + return object; + var message = new $root.google.cloud.compute.v1.BackendCustomMetric(); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.maxUtilization != null) + message.maxUtilization = Number(object.maxUtilization); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a BackendCustomMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {google.cloud.compute.v1.BackendCustomMetric} message BackendCustomMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackendCustomMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.maxUtilization != null && message.hasOwnProperty("maxUtilization")) { + object.maxUtilization = options.json && !isFinite(message.maxUtilization) ? String(message.maxUtilization) : message.maxUtilization; + if (options.oneofs) + object._maxUtilization = "maxUtilization"; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) { + object.dryRun = message.dryRun; + if (options.oneofs) + object._dryRun = "dryRun"; + } + return object; + }; + + /** + * Converts this BackendCustomMetric to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @instance + * @returns {Object.} JSON object + */ + BackendCustomMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackendCustomMetric + * @function getTypeUrl + * @memberof google.cloud.compute.v1.BackendCustomMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackendCustomMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.BackendCustomMetric"; + }; + + return BackendCustomMetric; + })(); + v1.BackendService = (function() { /** @@ -50772,6 +51424,7 @@ * @property {google.cloud.compute.v1.IBackendServiceConnectionTrackingPolicy|null} [connectionTrackingPolicy] BackendService connectionTrackingPolicy * @property {google.cloud.compute.v1.IConsistentHashLoadBalancerSettings|null} [consistentHash] BackendService consistentHash * @property {string|null} [creationTimestamp] BackendService creationTimestamp + * @property {Array.|null} [customMetrics] BackendService customMetrics * @property {Array.|null} [customRequestHeaders] BackendService customRequestHeaders * @property {Array.|null} [customResponseHeaders] BackendService customResponseHeaders * @property {string|null} [description] BackendService description @@ -50819,6 +51472,7 @@ */ function BackendService(properties) { this.backends = []; + this.customMetrics = []; this.customRequestHeaders = []; this.customResponseHeaders = []; this.healthChecks = []; @@ -50904,6 +51558,14 @@ */ BackendService.prototype.creationTimestamp = null; + /** + * BackendService customMetrics. + * @member {Array.} customMetrics + * @memberof google.cloud.compute.v1.BackendService + * @instance + */ + BackendService.prototype.customMetrics = $util.emptyArray; + /** * BackendService customRequestHeaders. * @member {Array.} customRequestHeaders @@ -51687,6 +52349,9 @@ $root.google.cloud.compute.v1.CircuitBreakers.encode(message.circuitBreakers, writer.uint32(/* id 421340061, wireType 2 =*/3370720490).fork()).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 422937596, wireType 2 =*/3383500770).string(message.description); + if (message.customMetrics != null && message.customMetrics.length) + for (var i = 0; i < message.customMetrics.length; ++i) + $root.google.cloud.compute.v1.BackendServiceCustomMetric.encode(message.customMetrics[i], writer.uint32(/* id 429453813, wireType 2 =*/3435630506).fork()).ldelim(); if (message.healthChecks != null && message.healthChecks.length) for (var i = 0; i < message.healthChecks.length; ++i) writer.uint32(/* id 448370606, wireType 2 =*/3586964850).string(message.healthChecks[i]); @@ -51775,6 +52440,12 @@ message.creationTimestamp = reader.string(); break; } + case 429453813: { + if (!(message.customMetrics && message.customMetrics.length)) + message.customMetrics = []; + message.customMetrics.push($root.google.cloud.compute.v1.BackendServiceCustomMetric.decode(reader, reader.uint32())); + break; + } case 27977992: { if (!(message.customRequestHeaders && message.customRequestHeaders.length)) message.customRequestHeaders = []; @@ -52046,6 +52717,15 @@ if (!$util.isString(message.creationTimestamp)) return "creationTimestamp: string expected"; } + if (message.customMetrics != null && message.hasOwnProperty("customMetrics")) { + if (!Array.isArray(message.customMetrics)) + return "customMetrics: array expected"; + for (var i = 0; i < message.customMetrics.length; ++i) { + var error = $root.google.cloud.compute.v1.BackendServiceCustomMetric.verify(message.customMetrics[i]); + if (error) + return "customMetrics." + error; + } + } if (message.customRequestHeaders != null && message.hasOwnProperty("customRequestHeaders")) { if (!Array.isArray(message.customRequestHeaders)) return "customRequestHeaders: array expected"; @@ -52320,6 +53000,16 @@ } if (object.creationTimestamp != null) message.creationTimestamp = String(object.creationTimestamp); + if (object.customMetrics) { + if (!Array.isArray(object.customMetrics)) + throw TypeError(".google.cloud.compute.v1.BackendService.customMetrics: array expected"); + message.customMetrics = []; + for (var i = 0; i < object.customMetrics.length; ++i) { + if (typeof object.customMetrics[i] !== "object") + throw TypeError(".google.cloud.compute.v1.BackendService.customMetrics: object expected"); + message.customMetrics[i] = $root.google.cloud.compute.v1.BackendServiceCustomMetric.fromObject(object.customMetrics[i]); + } + } if (object.customRequestHeaders) { if (!Array.isArray(object.customRequestHeaders)) throw TypeError(".google.cloud.compute.v1.BackendService.customRequestHeaders: array expected"); @@ -52484,6 +53174,7 @@ object.localityLbPolicies = []; object.customResponseHeaders = []; object.usedBy = []; + object.customMetrics = []; object.healthChecks = []; object.backends = []; } @@ -52678,6 +53369,11 @@ if (options.oneofs) object._description = "description"; } + if (message.customMetrics && message.customMetrics.length) { + object.customMetrics = []; + for (var j = 0; j < message.customMetrics.length; ++j) + object.customMetrics[j] = $root.google.cloud.compute.v1.BackendServiceCustomMetric.toObject(message.customMetrics[j], options); + } if (message.healthChecks && message.healthChecks.length) { object.healthChecks = []; for (var j = 0; j < message.healthChecks.length; ++j) @@ -52815,6 +53511,7 @@ * @property {number} RING_HASH=432795069 RING_HASH value * @property {number} ROUND_ROBIN=153895801 ROUND_ROBIN value * @property {number} WEIGHTED_MAGLEV=254930962 WEIGHTED_MAGLEV value + * @property {number} WEIGHTED_ROUND_ROBIN=5584977 WEIGHTED_ROUND_ROBIN value */ BackendService.LocalityLbPolicy = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -52827,6 +53524,7 @@ values[valuesById[432795069] = "RING_HASH"] = 432795069; values[valuesById[153895801] = "ROUND_ROBIN"] = 153895801; values[valuesById[254930962] = "WEIGHTED_MAGLEV"] = 254930962; + values[valuesById[5584977] = "WEIGHTED_ROUND_ROBIN"] = 5584977; return values; })(); @@ -54917,6 +55615,265 @@ return BackendServiceConnectionTrackingPolicy; })(); + v1.BackendServiceCustomMetric = (function() { + + /** + * Properties of a BackendServiceCustomMetric. + * @memberof google.cloud.compute.v1 + * @interface IBackendServiceCustomMetric + * @property {boolean|null} [dryRun] BackendServiceCustomMetric dryRun + * @property {string|null} [name] BackendServiceCustomMetric name + */ + + /** + * Constructs a new BackendServiceCustomMetric. + * @memberof google.cloud.compute.v1 + * @classdesc Represents a BackendServiceCustomMetric. + * @implements IBackendServiceCustomMetric + * @constructor + * @param {google.cloud.compute.v1.IBackendServiceCustomMetric=} [properties] Properties to set + */ + function BackendServiceCustomMetric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackendServiceCustomMetric dryRun. + * @member {boolean|null|undefined} dryRun + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @instance + */ + BackendServiceCustomMetric.prototype.dryRun = null; + + /** + * BackendServiceCustomMetric name. + * @member {string|null|undefined} name + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @instance + */ + BackendServiceCustomMetric.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackendServiceCustomMetric _dryRun. + * @member {"dryRun"|undefined} _dryRun + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @instance + */ + Object.defineProperty(BackendServiceCustomMetric.prototype, "_dryRun", { + get: $util.oneOfGetter($oneOfFields = ["dryRun"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackendServiceCustomMetric _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @instance + */ + Object.defineProperty(BackendServiceCustomMetric.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackendServiceCustomMetric instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {google.cloud.compute.v1.IBackendServiceCustomMetric=} [properties] Properties to set + * @returns {google.cloud.compute.v1.BackendServiceCustomMetric} BackendServiceCustomMetric instance + */ + BackendServiceCustomMetric.create = function create(properties) { + return new BackendServiceCustomMetric(properties); + }; + + /** + * Encodes the specified BackendServiceCustomMetric message. Does not implicitly {@link google.cloud.compute.v1.BackendServiceCustomMetric.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {google.cloud.compute.v1.IBackendServiceCustomMetric} message BackendServiceCustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendServiceCustomMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3373707, wireType 2 =*/26989658).string(message.name); + if (message.dryRun != null && Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 323854839, wireType 0 =*/2590838712).bool(message.dryRun); + return writer; + }; + + /** + * Encodes the specified BackendServiceCustomMetric message, length delimited. Does not implicitly {@link google.cloud.compute.v1.BackendServiceCustomMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {google.cloud.compute.v1.IBackendServiceCustomMetric} message BackendServiceCustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackendServiceCustomMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackendServiceCustomMetric message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.BackendServiceCustomMetric} BackendServiceCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendServiceCustomMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.BackendServiceCustomMetric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 323854839: { + message.dryRun = reader.bool(); + break; + } + case 3373707: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackendServiceCustomMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.BackendServiceCustomMetric} BackendServiceCustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackendServiceCustomMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackendServiceCustomMetric message. + * @function verify + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackendServiceCustomMetric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dryRun != null && message.hasOwnProperty("dryRun")) { + properties._dryRun = 1; + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + return null; + }; + + /** + * Creates a BackendServiceCustomMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.BackendServiceCustomMetric} BackendServiceCustomMetric + */ + BackendServiceCustomMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.BackendServiceCustomMetric) + return object; + var message = new $root.google.cloud.compute.v1.BackendServiceCustomMetric(); + if (object.dryRun != null) + message.dryRun = Boolean(object.dryRun); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a BackendServiceCustomMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {google.cloud.compute.v1.BackendServiceCustomMetric} message BackendServiceCustomMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackendServiceCustomMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.dryRun != null && message.hasOwnProperty("dryRun")) { + object.dryRun = message.dryRun; + if (options.oneofs) + object._dryRun = "dryRun"; + } + return object; + }; + + /** + * Converts this BackendServiceCustomMetric to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @instance + * @returns {Object.} JSON object + */ + BackendServiceCustomMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackendServiceCustomMetric + * @function getTypeUrl + * @memberof google.cloud.compute.v1.BackendServiceCustomMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackendServiceCustomMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.BackendServiceCustomMetric"; + }; + + return BackendServiceCustomMetric; + })(); + v1.BackendServiceFailoverPolicy = (function() { /** @@ -57786,6 +58743,7 @@ * @property {number} RING_HASH=432795069 RING_HASH value * @property {number} ROUND_ROBIN=153895801 ROUND_ROBIN value * @property {number} WEIGHTED_MAGLEV=254930962 WEIGHTED_MAGLEV value + * @property {number} WEIGHTED_ROUND_ROBIN=5584977 WEIGHTED_ROUND_ROBIN value */ BackendServiceLocalityLoadBalancingPolicyConfigPolicy.Name = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -57798,6 +58756,7 @@ values[valuesById[432795069] = "RING_HASH"] = 432795069; values[valuesById[153895801] = "ROUND_ROBIN"] = 153895801; values[valuesById[254930962] = "WEIGHTED_MAGLEV"] = 254930962; + values[valuesById[5584977] = "WEIGHTED_ROUND_ROBIN"] = 5584977; return values; })(); @@ -68093,6 +69052,7 @@ * @property {number} GRAPHICS_OPTIMIZED=68500563 GRAPHICS_OPTIMIZED value * @property {number} MEMORY_OPTIMIZED=281753417 MEMORY_OPTIMIZED value * @property {number} MEMORY_OPTIMIZED_M3=276301372 MEMORY_OPTIMIZED_M3 value + * @property {number} MEMORY_OPTIMIZED_M4=276301373 MEMORY_OPTIMIZED_M4 value * @property {number} MEMORY_OPTIMIZED_X4_16TB=183089120 MEMORY_OPTIMIZED_X4_16TB value * @property {number} MEMORY_OPTIMIZED_X4_24TB=183116989 MEMORY_OPTIMIZED_X4_24TB value * @property {number} MEMORY_OPTIMIZED_X4_32TB=183144858 MEMORY_OPTIMIZED_X4_32TB value @@ -68122,6 +69082,7 @@ values[valuesById[68500563] = "GRAPHICS_OPTIMIZED"] = 68500563; values[valuesById[281753417] = "MEMORY_OPTIMIZED"] = 281753417; values[valuesById[276301372] = "MEMORY_OPTIMIZED_M3"] = 276301372; + values[valuesById[276301373] = "MEMORY_OPTIMIZED_M4"] = 276301373; values[valuesById[183089120] = "MEMORY_OPTIMIZED_X4_16TB"] = 183089120; values[valuesById[183116989] = "MEMORY_OPTIMIZED_X4_24TB"] = 183116989; values[valuesById[183144858] = "MEMORY_OPTIMIZED_X4_32TB"] = 183144858; @@ -208994,6 +209955,7 @@ * @property {string|null} [name] InstanceGroupManager name * @property {Array.|null} [namedPorts] InstanceGroupManager namedPorts * @property {string|null} [region] InstanceGroupManager region + * @property {google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies|null} [resourcePolicies] InstanceGroupManager resourcePolicies * @property {boolean|null} [satisfiesPzi] InstanceGroupManager satisfiesPzi * @property {boolean|null} [satisfiesPzs] InstanceGroupManager satisfiesPzs * @property {string|null} [selfLink] InstanceGroupManager selfLink @@ -209172,6 +210134,14 @@ */ InstanceGroupManager.prototype.region = null; + /** + * InstanceGroupManager resourcePolicies. + * @member {google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies|null|undefined} resourcePolicies + * @memberof google.cloud.compute.v1.InstanceGroupManager + * @instance + */ + InstanceGroupManager.prototype.resourcePolicies = null; + /** * InstanceGroupManager satisfiesPzi. * @member {boolean|null|undefined} satisfiesPzi @@ -209455,6 +210425,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * InstanceGroupManager _resourcePolicies. + * @member {"resourcePolicies"|undefined} _resourcePolicies + * @memberof google.cloud.compute.v1.InstanceGroupManager + * @instance + */ + Object.defineProperty(InstanceGroupManager.prototype, "_resourcePolicies", { + get: $util.oneOfGetter($oneOfFields = ["resourcePolicies"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * InstanceGroupManager _satisfiesPzi. * @member {"satisfiesPzi"|undefined} _satisfiesPzi @@ -209610,6 +210591,8 @@ writer.uint32(/* id 3373707, wireType 2 =*/26989658).string(message.name); if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) writer.uint32(/* id 3744684, wireType 2 =*/29957474).string(message.zone); + if (message.resourcePolicies != null && Object.hasOwnProperty.call(message, "resourcePolicies")) + $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.encode(message.resourcePolicies, writer.uint32(/* id 22220385, wireType 2 =*/177763082).fork()).ldelim(); if (message.instanceFlexibilityPolicy != null && Object.hasOwnProperty.call(message, "instanceFlexibilityPolicy")) $root.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicy.encode(message.instanceFlexibilityPolicy, writer.uint32(/* id 26937090, wireType 2 =*/215496722).fork()).ldelim(); if (message.creationTimestamp != null && Object.hasOwnProperty.call(message, "creationTimestamp")) @@ -209776,6 +210759,10 @@ message.region = reader.string(); break; } + case 22220385: { + message.resourcePolicies = $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.decode(reader, reader.uint32()); + break; + } case 480964257: { message.satisfiesPzi = reader.bool(); break; @@ -209981,6 +210968,14 @@ if (!$util.isString(message.region)) return "region: string expected"; } + if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { + properties._resourcePolicies = 1; + { + var error = $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.verify(message.resourcePolicies); + if (error) + return "resourcePolicies." + error; + } + } if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { properties._satisfiesPzi = 1; if (typeof message.satisfiesPzi !== "boolean") @@ -210153,6 +211148,11 @@ } if (object.region != null) message.region = String(object.region); + if (object.resourcePolicies != null) { + if (typeof object.resourcePolicies !== "object") + throw TypeError(".google.cloud.compute.v1.InstanceGroupManager.resourcePolicies: object expected"); + message.resourcePolicies = $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.fromObject(object.resourcePolicies); + } if (object.satisfiesPzi != null) message.satisfiesPzi = Boolean(object.satisfiesPzi); if (object.satisfiesPzs != null) @@ -210254,6 +211254,11 @@ if (options.oneofs) object._zone = "zone"; } + if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { + object.resourcePolicies = $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.toObject(message.resourcePolicies, options); + if (options.oneofs) + object._resourcePolicies = "resourcePolicies"; + } if (message.instanceFlexibilityPolicy != null && message.hasOwnProperty("instanceFlexibilityPolicy")) { object.instanceFlexibilityPolicy = $root.google.cloud.compute.v1.InstanceGroupManagerInstanceFlexibilityPolicy.toObject(message.instanceFlexibilityPolicy, options); if (options.oneofs) @@ -214908,6 +215913,227 @@ return InstanceGroupManagerResizeRequestsListResponse; })(); + v1.InstanceGroupManagerResourcePolicies = (function() { + + /** + * Properties of an InstanceGroupManagerResourcePolicies. + * @memberof google.cloud.compute.v1 + * @interface IInstanceGroupManagerResourcePolicies + * @property {string|null} [workloadPolicy] InstanceGroupManagerResourcePolicies workloadPolicy + */ + + /** + * Constructs a new InstanceGroupManagerResourcePolicies. + * @memberof google.cloud.compute.v1 + * @classdesc Represents an InstanceGroupManagerResourcePolicies. + * @implements IInstanceGroupManagerResourcePolicies + * @constructor + * @param {google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies=} [properties] Properties to set + */ + function InstanceGroupManagerResourcePolicies(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceGroupManagerResourcePolicies workloadPolicy. + * @member {string|null|undefined} workloadPolicy + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @instance + */ + InstanceGroupManagerResourcePolicies.prototype.workloadPolicy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InstanceGroupManagerResourcePolicies _workloadPolicy. + * @member {"workloadPolicy"|undefined} _workloadPolicy + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @instance + */ + Object.defineProperty(InstanceGroupManagerResourcePolicies.prototype, "_workloadPolicy", { + get: $util.oneOfGetter($oneOfFields = ["workloadPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InstanceGroupManagerResourcePolicies instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies=} [properties] Properties to set + * @returns {google.cloud.compute.v1.InstanceGroupManagerResourcePolicies} InstanceGroupManagerResourcePolicies instance + */ + InstanceGroupManagerResourcePolicies.create = function create(properties) { + return new InstanceGroupManagerResourcePolicies(properties); + }; + + /** + * Encodes the specified InstanceGroupManagerResourcePolicies message. Does not implicitly {@link google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies} message InstanceGroupManagerResourcePolicies message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceGroupManagerResourcePolicies.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workloadPolicy != null && Object.hasOwnProperty.call(message, "workloadPolicy")) + writer.uint32(/* id 114721530, wireType 2 =*/917772242).string(message.workloadPolicy); + return writer; + }; + + /** + * Encodes the specified InstanceGroupManagerResourcePolicies message, length delimited. Does not implicitly {@link google.cloud.compute.v1.InstanceGroupManagerResourcePolicies.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {google.cloud.compute.v1.IInstanceGroupManagerResourcePolicies} message InstanceGroupManagerResourcePolicies message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceGroupManagerResourcePolicies.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceGroupManagerResourcePolicies message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.InstanceGroupManagerResourcePolicies} InstanceGroupManagerResourcePolicies + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceGroupManagerResourcePolicies.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 114721530: { + message.workloadPolicy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceGroupManagerResourcePolicies message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.InstanceGroupManagerResourcePolicies} InstanceGroupManagerResourcePolicies + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceGroupManagerResourcePolicies.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceGroupManagerResourcePolicies message. + * @function verify + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceGroupManagerResourcePolicies.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.workloadPolicy != null && message.hasOwnProperty("workloadPolicy")) { + properties._workloadPolicy = 1; + if (!$util.isString(message.workloadPolicy)) + return "workloadPolicy: string expected"; + } + return null; + }; + + /** + * Creates an InstanceGroupManagerResourcePolicies message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.InstanceGroupManagerResourcePolicies} InstanceGroupManagerResourcePolicies + */ + InstanceGroupManagerResourcePolicies.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies) + return object; + var message = new $root.google.cloud.compute.v1.InstanceGroupManagerResourcePolicies(); + if (object.workloadPolicy != null) + message.workloadPolicy = String(object.workloadPolicy); + return message; + }; + + /** + * Creates a plain object from an InstanceGroupManagerResourcePolicies message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {google.cloud.compute.v1.InstanceGroupManagerResourcePolicies} message InstanceGroupManagerResourcePolicies + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceGroupManagerResourcePolicies.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.workloadPolicy != null && message.hasOwnProperty("workloadPolicy")) { + object.workloadPolicy = message.workloadPolicy; + if (options.oneofs) + object._workloadPolicy = "workloadPolicy"; + } + return object; + }; + + /** + * Converts this InstanceGroupManagerResourcePolicies to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @instance + * @returns {Object.} JSON object + */ + InstanceGroupManagerResourcePolicies.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceGroupManagerResourcePolicies + * @function getTypeUrl + * @memberof google.cloud.compute.v1.InstanceGroupManagerResourcePolicies + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceGroupManagerResourcePolicies.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.InstanceGroupManagerResourcePolicies"; + }; + + return InstanceGroupManagerResourcePolicies; + })(); + v1.InstanceGroupManagerStandbyPolicy = (function() { /** @@ -231550,6 +232776,569 @@ return InstancesRemoveResourcePoliciesRequest; })(); + v1.InstancesReportHostAsFaultyRequest = (function() { + + /** + * Properties of an InstancesReportHostAsFaultyRequest. + * @memberof google.cloud.compute.v1 + * @interface IInstancesReportHostAsFaultyRequest + * @property {string|null} [disruptionSchedule] InstancesReportHostAsFaultyRequest disruptionSchedule + * @property {Array.|null} [faultReasons] InstancesReportHostAsFaultyRequest faultReasons + */ + + /** + * Constructs a new InstancesReportHostAsFaultyRequest. + * @memberof google.cloud.compute.v1 + * @classdesc Represents an InstancesReportHostAsFaultyRequest. + * @implements IInstancesReportHostAsFaultyRequest + * @constructor + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest=} [properties] Properties to set + */ + function InstancesReportHostAsFaultyRequest(properties) { + this.faultReasons = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstancesReportHostAsFaultyRequest disruptionSchedule. + * @member {string|null|undefined} disruptionSchedule + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @instance + */ + InstancesReportHostAsFaultyRequest.prototype.disruptionSchedule = null; + + /** + * InstancesReportHostAsFaultyRequest faultReasons. + * @member {Array.} faultReasons + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @instance + */ + InstancesReportHostAsFaultyRequest.prototype.faultReasons = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InstancesReportHostAsFaultyRequest _disruptionSchedule. + * @member {"disruptionSchedule"|undefined} _disruptionSchedule + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @instance + */ + Object.defineProperty(InstancesReportHostAsFaultyRequest.prototype, "_disruptionSchedule", { + get: $util.oneOfGetter($oneOfFields = ["disruptionSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InstancesReportHostAsFaultyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest=} [properties] Properties to set + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequest} InstancesReportHostAsFaultyRequest instance + */ + InstancesReportHostAsFaultyRequest.create = function create(properties) { + return new InstancesReportHostAsFaultyRequest(properties); + }; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequest message. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest} message InstancesReportHostAsFaultyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstancesReportHostAsFaultyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disruptionSchedule != null && Object.hasOwnProperty.call(message, "disruptionSchedule")) + writer.uint32(/* id 95871619, wireType 2 =*/766972954).string(message.disruptionSchedule); + if (message.faultReasons != null && message.faultReasons.length) + for (var i = 0; i < message.faultReasons.length; ++i) + $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.encode(message.faultReasons[i], writer.uint32(/* id 168056210, wireType 2 =*/1344449682).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequest message, length delimited. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest} message InstancesReportHostAsFaultyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstancesReportHostAsFaultyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstancesReportHostAsFaultyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequest} InstancesReportHostAsFaultyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstancesReportHostAsFaultyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 95871619: { + message.disruptionSchedule = reader.string(); + break; + } + case 168056210: { + if (!(message.faultReasons && message.faultReasons.length)) + message.faultReasons = []; + message.faultReasons.push($root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstancesReportHostAsFaultyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequest} InstancesReportHostAsFaultyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstancesReportHostAsFaultyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstancesReportHostAsFaultyRequest message. + * @function verify + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstancesReportHostAsFaultyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.disruptionSchedule != null && message.hasOwnProperty("disruptionSchedule")) { + properties._disruptionSchedule = 1; + if (!$util.isString(message.disruptionSchedule)) + return "disruptionSchedule: string expected"; + } + if (message.faultReasons != null && message.hasOwnProperty("faultReasons")) { + if (!Array.isArray(message.faultReasons)) + return "faultReasons: array expected"; + for (var i = 0; i < message.faultReasons.length; ++i) { + var error = $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.verify(message.faultReasons[i]); + if (error) + return "faultReasons." + error; + } + } + return null; + }; + + /** + * Creates an InstancesReportHostAsFaultyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequest} InstancesReportHostAsFaultyRequest + */ + InstancesReportHostAsFaultyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest) + return object; + var message = new $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest(); + if (object.disruptionSchedule != null) + message.disruptionSchedule = String(object.disruptionSchedule); + if (object.faultReasons) { + if (!Array.isArray(object.faultReasons)) + throw TypeError(".google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.faultReasons: array expected"); + message.faultReasons = []; + for (var i = 0; i < object.faultReasons.length; ++i) { + if (typeof object.faultReasons[i] !== "object") + throw TypeError(".google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.faultReasons: object expected"); + message.faultReasons[i] = $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.fromObject(object.faultReasons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InstancesReportHostAsFaultyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {google.cloud.compute.v1.InstancesReportHostAsFaultyRequest} message InstancesReportHostAsFaultyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstancesReportHostAsFaultyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.faultReasons = []; + if (message.disruptionSchedule != null && message.hasOwnProperty("disruptionSchedule")) { + object.disruptionSchedule = message.disruptionSchedule; + if (options.oneofs) + object._disruptionSchedule = "disruptionSchedule"; + } + if (message.faultReasons && message.faultReasons.length) { + object.faultReasons = []; + for (var j = 0; j < message.faultReasons.length; ++j) + object.faultReasons[j] = $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.toObject(message.faultReasons[j], options); + } + return object; + }; + + /** + * Converts this InstancesReportHostAsFaultyRequest to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @instance + * @returns {Object.} JSON object + */ + InstancesReportHostAsFaultyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstancesReportHostAsFaultyRequest + * @function getTypeUrl + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstancesReportHostAsFaultyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.InstancesReportHostAsFaultyRequest"; + }; + + /** + * DisruptionSchedule enum. + * @name google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.DisruptionSchedule + * @enum {number} + * @property {number} UNDEFINED_DISRUPTION_SCHEDULE=0 UNDEFINED_DISRUPTION_SCHEDULE value + * @property {number} DISRUPTION_SCHEDULE_UNSPECIFIED=332543835 DISRUPTION_SCHEDULE_UNSPECIFIED value + * @property {number} FUTURE=474513859 FUTURE value + * @property {number} IMMEDIATE=152881041 IMMEDIATE value + */ + InstancesReportHostAsFaultyRequest.DisruptionSchedule = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNDEFINED_DISRUPTION_SCHEDULE"] = 0; + values[valuesById[332543835] = "DISRUPTION_SCHEDULE_UNSPECIFIED"] = 332543835; + values[valuesById[474513859] = "FUTURE"] = 474513859; + values[valuesById[152881041] = "IMMEDIATE"] = 152881041; + return values; + })(); + + return InstancesReportHostAsFaultyRequest; + })(); + + v1.InstancesReportHostAsFaultyRequestFaultReason = (function() { + + /** + * Properties of an InstancesReportHostAsFaultyRequestFaultReason. + * @memberof google.cloud.compute.v1 + * @interface IInstancesReportHostAsFaultyRequestFaultReason + * @property {string|null} [behavior] InstancesReportHostAsFaultyRequestFaultReason behavior + * @property {string|null} [description] InstancesReportHostAsFaultyRequestFaultReason description + */ + + /** + * Constructs a new InstancesReportHostAsFaultyRequestFaultReason. + * @memberof google.cloud.compute.v1 + * @classdesc Represents an InstancesReportHostAsFaultyRequestFaultReason. + * @implements IInstancesReportHostAsFaultyRequestFaultReason + * @constructor + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason=} [properties] Properties to set + */ + function InstancesReportHostAsFaultyRequestFaultReason(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstancesReportHostAsFaultyRequestFaultReason behavior. + * @member {string|null|undefined} behavior + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @instance + */ + InstancesReportHostAsFaultyRequestFaultReason.prototype.behavior = null; + + /** + * InstancesReportHostAsFaultyRequestFaultReason description. + * @member {string|null|undefined} description + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @instance + */ + InstancesReportHostAsFaultyRequestFaultReason.prototype.description = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InstancesReportHostAsFaultyRequestFaultReason _behavior. + * @member {"behavior"|undefined} _behavior + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @instance + */ + Object.defineProperty(InstancesReportHostAsFaultyRequestFaultReason.prototype, "_behavior", { + get: $util.oneOfGetter($oneOfFields = ["behavior"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InstancesReportHostAsFaultyRequestFaultReason _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @instance + */ + Object.defineProperty(InstancesReportHostAsFaultyRequestFaultReason.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InstancesReportHostAsFaultyRequestFaultReason instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason=} [properties] Properties to set + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason} InstancesReportHostAsFaultyRequestFaultReason instance + */ + InstancesReportHostAsFaultyRequestFaultReason.create = function create(properties) { + return new InstancesReportHostAsFaultyRequestFaultReason(properties); + }; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequestFaultReason message. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason} message InstancesReportHostAsFaultyRequestFaultReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstancesReportHostAsFaultyRequestFaultReason.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 422937596, wireType 2 =*/3383500770).string(message.description); + if (message.behavior != null && Object.hasOwnProperty.call(message, "behavior")) + writer.uint32(/* id 437170770, wireType 2 =*/3497366162).string(message.behavior); + return writer; + }; + + /** + * Encodes the specified InstancesReportHostAsFaultyRequestFaultReason message, length delimited. Does not implicitly {@link google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequestFaultReason} message InstancesReportHostAsFaultyRequestFaultReason message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstancesReportHostAsFaultyRequestFaultReason.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstancesReportHostAsFaultyRequestFaultReason message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason} InstancesReportHostAsFaultyRequestFaultReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstancesReportHostAsFaultyRequestFaultReason.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 437170770: { + message.behavior = reader.string(); + break; + } + case 422937596: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstancesReportHostAsFaultyRequestFaultReason message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason} InstancesReportHostAsFaultyRequestFaultReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstancesReportHostAsFaultyRequestFaultReason.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstancesReportHostAsFaultyRequestFaultReason message. + * @function verify + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstancesReportHostAsFaultyRequestFaultReason.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.behavior != null && message.hasOwnProperty("behavior")) { + properties._behavior = 1; + if (!$util.isString(message.behavior)) + return "behavior: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + return null; + }; + + /** + * Creates an InstancesReportHostAsFaultyRequestFaultReason message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason} InstancesReportHostAsFaultyRequestFaultReason + */ + InstancesReportHostAsFaultyRequestFaultReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason) + return object; + var message = new $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason(); + if (object.behavior != null) + message.behavior = String(object.behavior); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an InstancesReportHostAsFaultyRequestFaultReason message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason} message InstancesReportHostAsFaultyRequestFaultReason + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstancesReportHostAsFaultyRequestFaultReason.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.behavior != null && message.hasOwnProperty("behavior")) { + object.behavior = message.behavior; + if (options.oneofs) + object._behavior = "behavior"; + } + return object; + }; + + /** + * Converts this InstancesReportHostAsFaultyRequestFaultReason to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @instance + * @returns {Object.} JSON object + */ + InstancesReportHostAsFaultyRequestFaultReason.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstancesReportHostAsFaultyRequestFaultReason + * @function getTypeUrl + * @memberof google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstancesReportHostAsFaultyRequestFaultReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason"; + }; + + /** + * Behavior enum. + * @name google.cloud.compute.v1.InstancesReportHostAsFaultyRequestFaultReason.Behavior + * @enum {number} + * @property {number} UNDEFINED_BEHAVIOR=0 UNDEFINED_BEHAVIOR value + * @property {number} BEHAVIOR_UNSPECIFIED=85734570 BEHAVIOR_UNSPECIFIED value + * @property {number} PERFORMANCE=135701520 PERFORMANCE value + * @property {number} SILENT_DATA_CORRUPTION=111360678 SILENT_DATA_CORRUPTION value + * @property {number} UNRECOVERABLE_GPU_ERROR=363710747 UNRECOVERABLE_GPU_ERROR value + */ + InstancesReportHostAsFaultyRequestFaultReason.Behavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNDEFINED_BEHAVIOR"] = 0; + values[valuesById[85734570] = "BEHAVIOR_UNSPECIFIED"] = 85734570; + values[valuesById[135701520] = "PERFORMANCE"] = 135701520; + values[valuesById[111360678] = "SILENT_DATA_CORRUPTION"] = 111360678; + values[valuesById[363710747] = "UNRECOVERABLE_GPU_ERROR"] = 363710747; + return values; + })(); + + return InstancesReportHostAsFaultyRequestFaultReason; + })(); + v1.InstancesScopedList = (function() { /** @@ -373318,12 +375107,14 @@ * @property {number} UNDEFINED_MODE=0 UNDEFINED_MODE value * @property {number} DELEGATION=264149288 DELEGATION value * @property {number} EXTERNAL_IPV6_FORWARDING_RULE_CREATION=398684356 EXTERNAL_IPV6_FORWARDING_RULE_CREATION value + * @property {number} EXTERNAL_IPV6_SUBNETWORK_CREATION=61198284 EXTERNAL_IPV6_SUBNETWORK_CREATION value */ PublicDelegatedPrefix.Mode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNDEFINED_MODE"] = 0; values[valuesById[264149288] = "DELEGATION"] = 264149288; values[valuesById[398684356] = "EXTERNAL_IPV6_FORWARDING_RULE_CREATION"] = 398684356; + values[valuesById[61198284] = "EXTERNAL_IPV6_SUBNETWORK_CREATION"] = 61198284; return values; })(); @@ -374792,12 +376583,14 @@ * @property {number} UNDEFINED_MODE=0 UNDEFINED_MODE value * @property {number} DELEGATION=264149288 DELEGATION value * @property {number} EXTERNAL_IPV6_FORWARDING_RULE_CREATION=398684356 EXTERNAL_IPV6_FORWARDING_RULE_CREATION value + * @property {number} EXTERNAL_IPV6_SUBNETWORK_CREATION=61198284 EXTERNAL_IPV6_SUBNETWORK_CREATION value */ PublicDelegatedPrefixPublicDelegatedSubPrefix.Mode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNDEFINED_MODE"] = 0; values[valuesById[264149288] = "DELEGATION"] = 264149288; values[valuesById[398684356] = "EXTERNAL_IPV6_FORWARDING_RULE_CREATION"] = 398684356; + values[valuesById[61198284] = "EXTERNAL_IPV6_SUBNETWORK_CREATION"] = 61198284; return values; })(); @@ -394157,6 +395950,326 @@ return RemoveRuleSecurityPolicyRequest; })(); + v1.ReportHostAsFaultyInstanceRequest = (function() { + + /** + * Properties of a ReportHostAsFaultyInstanceRequest. + * @memberof google.cloud.compute.v1 + * @interface IReportHostAsFaultyInstanceRequest + * @property {string|null} [instance] ReportHostAsFaultyInstanceRequest instance + * @property {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest|null} [instancesReportHostAsFaultyRequestResource] ReportHostAsFaultyInstanceRequest instancesReportHostAsFaultyRequestResource + * @property {string|null} [project] ReportHostAsFaultyInstanceRequest project + * @property {string|null} [requestId] ReportHostAsFaultyInstanceRequest requestId + * @property {string|null} [zone] ReportHostAsFaultyInstanceRequest zone + */ + + /** + * Constructs a new ReportHostAsFaultyInstanceRequest. + * @memberof google.cloud.compute.v1 + * @classdesc Represents a ReportHostAsFaultyInstanceRequest. + * @implements IReportHostAsFaultyInstanceRequest + * @constructor + * @param {google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest=} [properties] Properties to set + */ + function ReportHostAsFaultyInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReportHostAsFaultyInstanceRequest instance. + * @member {string} instance + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @instance + */ + ReportHostAsFaultyInstanceRequest.prototype.instance = ""; + + /** + * ReportHostAsFaultyInstanceRequest instancesReportHostAsFaultyRequestResource. + * @member {google.cloud.compute.v1.IInstancesReportHostAsFaultyRequest|null|undefined} instancesReportHostAsFaultyRequestResource + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @instance + */ + ReportHostAsFaultyInstanceRequest.prototype.instancesReportHostAsFaultyRequestResource = null; + + /** + * ReportHostAsFaultyInstanceRequest project. + * @member {string} project + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @instance + */ + ReportHostAsFaultyInstanceRequest.prototype.project = ""; + + /** + * ReportHostAsFaultyInstanceRequest requestId. + * @member {string|null|undefined} requestId + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @instance + */ + ReportHostAsFaultyInstanceRequest.prototype.requestId = null; + + /** + * ReportHostAsFaultyInstanceRequest zone. + * @member {string} zone + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @instance + */ + ReportHostAsFaultyInstanceRequest.prototype.zone = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReportHostAsFaultyInstanceRequest _requestId. + * @member {"requestId"|undefined} _requestId + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @instance + */ + Object.defineProperty(ReportHostAsFaultyInstanceRequest.prototype, "_requestId", { + get: $util.oneOfGetter($oneOfFields = ["requestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportHostAsFaultyInstanceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest=} [properties] Properties to set + * @returns {google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest} ReportHostAsFaultyInstanceRequest instance + */ + ReportHostAsFaultyInstanceRequest.create = function create(properties) { + return new ReportHostAsFaultyInstanceRequest(properties); + }; + + /** + * Encodes the specified ReportHostAsFaultyInstanceRequest message. Does not implicitly {@link google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest} message ReportHostAsFaultyInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportHostAsFaultyInstanceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 3744684, wireType 2 =*/29957474).string(message.zone); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 18257045, wireType 2 =*/146056362).string(message.instance); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 37109963, wireType 2 =*/296879706).string(message.requestId); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 227560217, wireType 2 =*/1820481738).string(message.project); + if (message.instancesReportHostAsFaultyRequestResource != null && Object.hasOwnProperty.call(message, "instancesReportHostAsFaultyRequestResource")) + $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.encode(message.instancesReportHostAsFaultyRequestResource, writer.uint32(/* id 494094886, wireType 2 =*/3952759090).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReportHostAsFaultyInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest} message ReportHostAsFaultyInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportHostAsFaultyInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportHostAsFaultyInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest} ReportHostAsFaultyInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportHostAsFaultyInstanceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 18257045: { + message.instance = reader.string(); + break; + } + case 494094886: { + message.instancesReportHostAsFaultyRequestResource = $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.decode(reader, reader.uint32()); + break; + } + case 227560217: { + message.project = reader.string(); + break; + } + case 37109963: { + message.requestId = reader.string(); + break; + } + case 3744684: { + message.zone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportHostAsFaultyInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest} ReportHostAsFaultyInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportHostAsFaultyInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportHostAsFaultyInstanceRequest message. + * @function verify + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportHostAsFaultyInstanceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.instancesReportHostAsFaultyRequestResource != null && message.hasOwnProperty("instancesReportHostAsFaultyRequestResource")) { + var error = $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.verify(message.instancesReportHostAsFaultyRequestResource); + if (error) + return "instancesReportHostAsFaultyRequestResource." + error; + } + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) { + properties._requestId = 1; + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + } + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + return null; + }; + + /** + * Creates a ReportHostAsFaultyInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest} ReportHostAsFaultyInstanceRequest + */ + ReportHostAsFaultyInstanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest) + return object; + var message = new $root.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest(); + if (object.instance != null) + message.instance = String(object.instance); + if (object.instancesReportHostAsFaultyRequestResource != null) { + if (typeof object.instancesReportHostAsFaultyRequestResource !== "object") + throw TypeError(".google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest.instancesReportHostAsFaultyRequestResource: object expected"); + message.instancesReportHostAsFaultyRequestResource = $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.fromObject(object.instancesReportHostAsFaultyRequestResource); + } + if (object.project != null) + message.project = String(object.project); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.zone != null) + message.zone = String(object.zone); + return message; + }; + + /** + * Creates a plain object from a ReportHostAsFaultyInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest} message ReportHostAsFaultyInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportHostAsFaultyInstanceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.zone = ""; + object.instance = ""; + object.project = ""; + object.instancesReportHostAsFaultyRequestResource = null; + } + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.requestId != null && message.hasOwnProperty("requestId")) { + object.requestId = message.requestId; + if (options.oneofs) + object._requestId = "requestId"; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.instancesReportHostAsFaultyRequestResource != null && message.hasOwnProperty("instancesReportHostAsFaultyRequestResource")) + object.instancesReportHostAsFaultyRequestResource = $root.google.cloud.compute.v1.InstancesReportHostAsFaultyRequest.toObject(message.instancesReportHostAsFaultyRequestResource, options); + return object; + }; + + /** + * Converts this ReportHostAsFaultyInstanceRequest to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + ReportHostAsFaultyInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportHostAsFaultyInstanceRequest + * @function getTypeUrl + * @memberof google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportHostAsFaultyInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest"; + }; + + return ReportHostAsFaultyInstanceRequest; + })(); + v1.RequestMirrorPolicy = (function() { /** @@ -394391,6 +396504,7 @@ * @property {number|Long|null} [id] Reservation id * @property {string|null} [kind] Reservation kind * @property {string|null} [name] Reservation name + * @property {google.cloud.compute.v1.IAllocationReservationSharingPolicy|null} [reservationSharingPolicy] Reservation reservationSharingPolicy * @property {Object.|null} [resourcePolicies] Reservation resourcePolicies * @property {google.cloud.compute.v1.IAllocationResourceStatus|null} [resourceStatus] Reservation resourceStatus * @property {boolean|null} [satisfiesPzs] Reservation satisfiesPzs @@ -394474,6 +396588,14 @@ */ Reservation.prototype.name = null; + /** + * Reservation reservationSharingPolicy. + * @member {google.cloud.compute.v1.IAllocationReservationSharingPolicy|null|undefined} reservationSharingPolicy + * @memberof google.cloud.compute.v1.Reservation + * @instance + */ + Reservation.prototype.reservationSharingPolicy = null; + /** * Reservation resourcePolicies. * @member {Object.} resourcePolicies @@ -394626,6 +396748,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Reservation _reservationSharingPolicy. + * @member {"reservationSharingPolicy"|undefined} _reservationSharingPolicy + * @memberof google.cloud.compute.v1.Reservation + * @instance + */ + Object.defineProperty(Reservation.prototype, "_reservationSharingPolicy", { + get: $util.oneOfGetter($oneOfFields = ["reservationSharingPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Reservation _resourceStatus. * @member {"resourceStatus"|undefined} _resourceStatus @@ -394753,6 +396886,8 @@ writer.uint32(/* id 30525366, wireType 2 =*/244202930).string(message.creationTimestamp); if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 181260274, wireType 2 =*/1450082194).string(message.status); + if (message.reservationSharingPolicy != null && Object.hasOwnProperty.call(message, "reservationSharingPolicy")) + $root.google.cloud.compute.v1.AllocationReservationSharingPolicy.encode(message.reservationSharingPolicy, writer.uint32(/* id 205970120, wireType 2 =*/1647760962).fork()).ldelim(); if (message.specificReservationRequired != null && Object.hasOwnProperty.call(message, "specificReservationRequired")) writer.uint32(/* id 226550687, wireType 0 =*/1812405496).bool(message.specificReservationRequired); if (message.resourceStatus != null && Object.hasOwnProperty.call(message, "resourceStatus")) @@ -394833,6 +396968,10 @@ message.name = reader.string(); break; } + case 205970120: { + message.reservationSharingPolicy = $root.google.cloud.compute.v1.AllocationReservationSharingPolicy.decode(reader, reader.uint32()); + break; + } case 22220385: { if (message.resourcePolicies === $util.emptyObject) message.resourcePolicies = {}; @@ -394962,6 +397101,14 @@ if (!$util.isString(message.name)) return "name: string expected"; } + if (message.reservationSharingPolicy != null && message.hasOwnProperty("reservationSharingPolicy")) { + properties._reservationSharingPolicy = 1; + { + var error = $root.google.cloud.compute.v1.AllocationReservationSharingPolicy.verify(message.reservationSharingPolicy); + if (error) + return "reservationSharingPolicy." + error; + } + } if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { if (!$util.isObject(message.resourcePolicies)) return "resourcePolicies: object expected"; @@ -395058,6 +397205,11 @@ message.kind = String(object.kind); if (object.name != null) message.name = String(object.name); + if (object.reservationSharingPolicy != null) { + if (typeof object.reservationSharingPolicy !== "object") + throw TypeError(".google.cloud.compute.v1.Reservation.reservationSharingPolicy: object expected"); + message.reservationSharingPolicy = $root.google.cloud.compute.v1.AllocationReservationSharingPolicy.fromObject(object.reservationSharingPolicy); + } if (object.resourcePolicies) { if (typeof object.resourcePolicies !== "object") throw TypeError(".google.cloud.compute.v1.Reservation.resourcePolicies: object expected"); @@ -395147,6 +397299,11 @@ if (options.oneofs) object._status = "status"; } + if (message.reservationSharingPolicy != null && message.hasOwnProperty("reservationSharingPolicy")) { + object.reservationSharingPolicy = $root.google.cloud.compute.v1.AllocationReservationSharingPolicy.toObject(message.reservationSharingPolicy, options); + if (options.oneofs) + object._reservationSharingPolicy = "reservationSharingPolicy"; + } if (message.specificReservationRequired != null && message.hasOwnProperty("specificReservationRequired")) { object.specificReservationRequired = message.specificReservationRequired; if (options.oneofs) @@ -405400,6 +407557,7 @@ * @memberof google.cloud.compute.v1 * @interface IResourceStatus * @property {string|null} [physicalHost] ResourceStatus physicalHost + * @property {google.cloud.compute.v1.IResourceStatusPhysicalHostTopology|null} [physicalHostTopology] ResourceStatus physicalHostTopology * @property {google.cloud.compute.v1.IResourceStatusScheduling|null} [scheduling] ResourceStatus scheduling * @property {google.cloud.compute.v1.IUpcomingMaintenance|null} [upcomingMaintenance] ResourceStatus upcomingMaintenance */ @@ -405427,6 +407585,14 @@ */ ResourceStatus.prototype.physicalHost = null; + /** + * ResourceStatus physicalHostTopology. + * @member {google.cloud.compute.v1.IResourceStatusPhysicalHostTopology|null|undefined} physicalHostTopology + * @memberof google.cloud.compute.v1.ResourceStatus + * @instance + */ + ResourceStatus.prototype.physicalHostTopology = null; + /** * ResourceStatus scheduling. * @member {google.cloud.compute.v1.IResourceStatusScheduling|null|undefined} scheduling @@ -405457,6 +407623,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * ResourceStatus _physicalHostTopology. + * @member {"physicalHostTopology"|undefined} _physicalHostTopology + * @memberof google.cloud.compute.v1.ResourceStatus + * @instance + */ + Object.defineProperty(ResourceStatus.prototype, "_physicalHostTopology", { + get: $util.oneOfGetter($oneOfFields = ["physicalHostTopology"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * ResourceStatus _scheduling. * @member {"scheduling"|undefined} _scheduling @@ -405507,6 +407684,8 @@ $root.google.cloud.compute.v1.UpcomingMaintenance.encode(message.upcomingMaintenance, writer.uint32(/* id 227348592, wireType 2 =*/1818788738).fork()).ldelim(); if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) $root.google.cloud.compute.v1.ResourceStatusScheduling.encode(message.scheduling, writer.uint32(/* id 386688404, wireType 2 =*/3093507234).fork()).ldelim(); + if (message.physicalHostTopology != null && Object.hasOwnProperty.call(message, "physicalHostTopology")) + $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.encode(message.physicalHostTopology, writer.uint32(/* id 390842814, wireType 2 =*/3126742514).fork()).ldelim(); if (message.physicalHost != null && Object.hasOwnProperty.call(message, "physicalHost")) writer.uint32(/* id 464370704, wireType 2 =*/3714965634).string(message.physicalHost); return writer; @@ -405547,6 +407726,10 @@ message.physicalHost = reader.string(); break; } + case 390842814: { + message.physicalHostTopology = $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.decode(reader, reader.uint32()); + break; + } case 386688404: { message.scheduling = $root.google.cloud.compute.v1.ResourceStatusScheduling.decode(reader, reader.uint32()); break; @@ -405596,6 +407779,14 @@ if (!$util.isString(message.physicalHost)) return "physicalHost: string expected"; } + if (message.physicalHostTopology != null && message.hasOwnProperty("physicalHostTopology")) { + properties._physicalHostTopology = 1; + { + var error = $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.verify(message.physicalHostTopology); + if (error) + return "physicalHostTopology." + error; + } + } if (message.scheduling != null && message.hasOwnProperty("scheduling")) { properties._scheduling = 1; { @@ -405629,6 +407820,11 @@ var message = new $root.google.cloud.compute.v1.ResourceStatus(); if (object.physicalHost != null) message.physicalHost = String(object.physicalHost); + if (object.physicalHostTopology != null) { + if (typeof object.physicalHostTopology !== "object") + throw TypeError(".google.cloud.compute.v1.ResourceStatus.physicalHostTopology: object expected"); + message.physicalHostTopology = $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.fromObject(object.physicalHostTopology); + } if (object.scheduling != null) { if (typeof object.scheduling !== "object") throw TypeError(".google.cloud.compute.v1.ResourceStatus.scheduling: object expected"); @@ -405665,6 +407861,11 @@ if (options.oneofs) object._scheduling = "scheduling"; } + if (message.physicalHostTopology != null && message.hasOwnProperty("physicalHostTopology")) { + object.physicalHostTopology = $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.toObject(message.physicalHostTopology, options); + if (options.oneofs) + object._physicalHostTopology = "physicalHostTopology"; + } if (message.physicalHost != null && message.hasOwnProperty("physicalHost")) { object.physicalHost = message.physicalHost; if (options.oneofs) @@ -405702,6 +407903,341 @@ return ResourceStatus; })(); + v1.ResourceStatusPhysicalHostTopology = (function() { + + /** + * Properties of a ResourceStatusPhysicalHostTopology. + * @memberof google.cloud.compute.v1 + * @interface IResourceStatusPhysicalHostTopology + * @property {string|null} [block] ResourceStatusPhysicalHostTopology block + * @property {string|null} [cluster] ResourceStatusPhysicalHostTopology cluster + * @property {string|null} [host] ResourceStatusPhysicalHostTopology host + * @property {string|null} [subblock] ResourceStatusPhysicalHostTopology subblock + */ + + /** + * Constructs a new ResourceStatusPhysicalHostTopology. + * @memberof google.cloud.compute.v1 + * @classdesc Represents a ResourceStatusPhysicalHostTopology. + * @implements IResourceStatusPhysicalHostTopology + * @constructor + * @param {google.cloud.compute.v1.IResourceStatusPhysicalHostTopology=} [properties] Properties to set + */ + function ResourceStatusPhysicalHostTopology(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceStatusPhysicalHostTopology block. + * @member {string|null|undefined} block + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + ResourceStatusPhysicalHostTopology.prototype.block = null; + + /** + * ResourceStatusPhysicalHostTopology cluster. + * @member {string|null|undefined} cluster + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + ResourceStatusPhysicalHostTopology.prototype.cluster = null; + + /** + * ResourceStatusPhysicalHostTopology host. + * @member {string|null|undefined} host + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + ResourceStatusPhysicalHostTopology.prototype.host = null; + + /** + * ResourceStatusPhysicalHostTopology subblock. + * @member {string|null|undefined} subblock + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + ResourceStatusPhysicalHostTopology.prototype.subblock = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResourceStatusPhysicalHostTopology _block. + * @member {"block"|undefined} _block + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + Object.defineProperty(ResourceStatusPhysicalHostTopology.prototype, "_block", { + get: $util.oneOfGetter($oneOfFields = ["block"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ResourceStatusPhysicalHostTopology _cluster. + * @member {"cluster"|undefined} _cluster + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + Object.defineProperty(ResourceStatusPhysicalHostTopology.prototype, "_cluster", { + get: $util.oneOfGetter($oneOfFields = ["cluster"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ResourceStatusPhysicalHostTopology _host. + * @member {"host"|undefined} _host + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + Object.defineProperty(ResourceStatusPhysicalHostTopology.prototype, "_host", { + get: $util.oneOfGetter($oneOfFields = ["host"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ResourceStatusPhysicalHostTopology _subblock. + * @member {"subblock"|undefined} _subblock + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + */ + Object.defineProperty(ResourceStatusPhysicalHostTopology.prototype, "_subblock", { + get: $util.oneOfGetter($oneOfFields = ["subblock"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResourceStatusPhysicalHostTopology instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {google.cloud.compute.v1.IResourceStatusPhysicalHostTopology=} [properties] Properties to set + * @returns {google.cloud.compute.v1.ResourceStatusPhysicalHostTopology} ResourceStatusPhysicalHostTopology instance + */ + ResourceStatusPhysicalHostTopology.create = function create(properties) { + return new ResourceStatusPhysicalHostTopology(properties); + }; + + /** + * Encodes the specified ResourceStatusPhysicalHostTopology message. Does not implicitly {@link google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {google.cloud.compute.v1.IResourceStatusPhysicalHostTopology} message ResourceStatusPhysicalHostTopology message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatusPhysicalHostTopology.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.host != null && Object.hasOwnProperty.call(message, "host")) + writer.uint32(/* id 3208616, wireType 2 =*/25668930).string(message.host); + if (message.subblock != null && Object.hasOwnProperty.call(message, "subblock")) + writer.uint32(/* id 70446669, wireType 2 =*/563573354).string(message.subblock); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 93832333, wireType 2 =*/750658666).string(message.block); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 335221242, wireType 2 =*/2681769938).string(message.cluster); + return writer; + }; + + /** + * Encodes the specified ResourceStatusPhysicalHostTopology message, length delimited. Does not implicitly {@link google.cloud.compute.v1.ResourceStatusPhysicalHostTopology.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {google.cloud.compute.v1.IResourceStatusPhysicalHostTopology} message ResourceStatusPhysicalHostTopology message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatusPhysicalHostTopology.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceStatusPhysicalHostTopology message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.ResourceStatusPhysicalHostTopology} ResourceStatusPhysicalHostTopology + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatusPhysicalHostTopology.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 93832333: { + message.block = reader.string(); + break; + } + case 335221242: { + message.cluster = reader.string(); + break; + } + case 3208616: { + message.host = reader.string(); + break; + } + case 70446669: { + message.subblock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceStatusPhysicalHostTopology message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.ResourceStatusPhysicalHostTopology} ResourceStatusPhysicalHostTopology + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatusPhysicalHostTopology.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceStatusPhysicalHostTopology message. + * @function verify + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceStatusPhysicalHostTopology.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.block != null && message.hasOwnProperty("block")) { + properties._block = 1; + if (!$util.isString(message.block)) + return "block: string expected"; + } + if (message.cluster != null && message.hasOwnProperty("cluster")) { + properties._cluster = 1; + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + } + if (message.host != null && message.hasOwnProperty("host")) { + properties._host = 1; + if (!$util.isString(message.host)) + return "host: string expected"; + } + if (message.subblock != null && message.hasOwnProperty("subblock")) { + properties._subblock = 1; + if (!$util.isString(message.subblock)) + return "subblock: string expected"; + } + return null; + }; + + /** + * Creates a ResourceStatusPhysicalHostTopology message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.ResourceStatusPhysicalHostTopology} ResourceStatusPhysicalHostTopology + */ + ResourceStatusPhysicalHostTopology.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology) + return object; + var message = new $root.google.cloud.compute.v1.ResourceStatusPhysicalHostTopology(); + if (object.block != null) + message.block = String(object.block); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.host != null) + message.host = String(object.host); + if (object.subblock != null) + message.subblock = String(object.subblock); + return message; + }; + + /** + * Creates a plain object from a ResourceStatusPhysicalHostTopology message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {google.cloud.compute.v1.ResourceStatusPhysicalHostTopology} message ResourceStatusPhysicalHostTopology + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceStatusPhysicalHostTopology.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.host != null && message.hasOwnProperty("host")) { + object.host = message.host; + if (options.oneofs) + object._host = "host"; + } + if (message.subblock != null && message.hasOwnProperty("subblock")) { + object.subblock = message.subblock; + if (options.oneofs) + object._subblock = "subblock"; + } + if (message.block != null && message.hasOwnProperty("block")) { + object.block = message.block; + if (options.oneofs) + object._block = "block"; + } + if (message.cluster != null && message.hasOwnProperty("cluster")) { + object.cluster = message.cluster; + if (options.oneofs) + object._cluster = "cluster"; + } + return object; + }; + + /** + * Converts this ResourceStatusPhysicalHostTopology to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @instance + * @returns {Object.} JSON object + */ + ResourceStatusPhysicalHostTopology.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceStatusPhysicalHostTopology + * @function getTypeUrl + * @memberof google.cloud.compute.v1.ResourceStatusPhysicalHostTopology + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceStatusPhysicalHostTopology.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.ResourceStatusPhysicalHostTopology"; + }; + + return ResourceStatusPhysicalHostTopology; + })(); + v1.ResourceStatusScheduling = (function() { /** @@ -423911,12 +426447,14 @@ * @name google.cloud.compute.v1.Scheduling.ProvisioningModel * @enum {number} * @property {number} UNDEFINED_PROVISIONING_MODEL=0 UNDEFINED_PROVISIONING_MODEL value + * @property {number} RESERVATION_BOUND=293538571 RESERVATION_BOUND value * @property {number} SPOT=2552066 SPOT value * @property {number} STANDARD=484642493 STANDARD value */ Scheduling.ProvisioningModel = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNDEFINED_PROVISIONING_MODEL"] = 0; + values[valuesById[293538571] = "RESERVATION_BOUND"] = 293538571; values[valuesById[2552066] = "SPOT"] = 2552066; values[valuesById[484642493] = "STANDARD"] = 484642493; return values; @@ -491487,8 +494025,10 @@ * @property {number|Long|null} [id] Subnetwork id * @property {string|null} [internalIpv6Prefix] Subnetwork internalIpv6Prefix * @property {string|null} [ipCidrRange] Subnetwork ipCidrRange + * @property {string|null} [ipCollection] Subnetwork ipCollection * @property {string|null} [ipv6AccessType] Subnetwork ipv6AccessType * @property {string|null} [ipv6CidrRange] Subnetwork ipv6CidrRange + * @property {string|null} [ipv6GceEndpoint] Subnetwork ipv6GceEndpoint * @property {string|null} [kind] Subnetwork kind * @property {google.cloud.compute.v1.ISubnetworkLogConfig|null} [logConfig] Subnetwork logConfig * @property {string|null} [name] Subnetwork name @@ -491593,6 +494133,14 @@ */ Subnetwork.prototype.ipCidrRange = null; + /** + * Subnetwork ipCollection. + * @member {string|null|undefined} ipCollection + * @memberof google.cloud.compute.v1.Subnetwork + * @instance + */ + Subnetwork.prototype.ipCollection = null; + /** * Subnetwork ipv6AccessType. * @member {string|null|undefined} ipv6AccessType @@ -491609,6 +494157,14 @@ */ Subnetwork.prototype.ipv6CidrRange = null; + /** + * Subnetwork ipv6GceEndpoint. + * @member {string|null|undefined} ipv6GceEndpoint + * @memberof google.cloud.compute.v1.Subnetwork + * @instance + */ + Subnetwork.prototype.ipv6GceEndpoint = null; + /** * Subnetwork kind. * @member {string|null|undefined} kind @@ -491823,6 +494379,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Subnetwork _ipCollection. + * @member {"ipCollection"|undefined} _ipCollection + * @memberof google.cloud.compute.v1.Subnetwork + * @instance + */ + Object.defineProperty(Subnetwork.prototype, "_ipCollection", { + get: $util.oneOfGetter($oneOfFields = ["ipCollection"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Subnetwork _ipv6AccessType. * @member {"ipv6AccessType"|undefined} _ipv6AccessType @@ -491845,6 +494412,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Subnetwork _ipv6GceEndpoint. + * @member {"ipv6GceEndpoint"|undefined} _ipv6GceEndpoint + * @memberof google.cloud.compute.v1.Subnetwork + * @instance + */ + Object.defineProperty(Subnetwork.prototype, "_ipv6GceEndpoint", { + get: $util.oneOfGetter($oneOfFields = ["ipv6GceEndpoint"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Subnetwork _kind. * @member {"kind"|undefined} _kind @@ -492037,6 +494615,8 @@ writer.uint32(/* id 139299190, wireType 2 =*/1114393522).string(message.externalIpv6Prefix); if (message.enableFlowLogs != null && Object.hasOwnProperty.call(message, "enableFlowLogs")) writer.uint32(/* id 151544420, wireType 0 =*/1212355360).bool(message.enableFlowLogs); + if (message.ipCollection != null && Object.hasOwnProperty.call(message, "ipCollection")) + writer.uint32(/* id 176818358, wireType 2 =*/1414546866).string(message.ipCollection); if (message.network != null && Object.hasOwnProperty.call(message, "network")) writer.uint32(/* id 232872494, wireType 2 =*/1862979954).string(message.network); if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) @@ -492047,6 +494627,8 @@ writer.uint32(/* id 286248754, wireType 2 =*/2289990034).string(message.reservedInternalRange); if (message.purpose != null && Object.hasOwnProperty.call(message, "purpose")) writer.uint32(/* id 316407070, wireType 2 =*/2531256562).string(message.purpose); + if (message.ipv6GceEndpoint != null && Object.hasOwnProperty.call(message, "ipv6GceEndpoint")) + writer.uint32(/* id 320382307, wireType 2 =*/2563058458).string(message.ipv6GceEndpoint); if (message.logConfig != null && Object.hasOwnProperty.call(message, "logConfig")) $root.google.cloud.compute.v1.SubnetworkLogConfig.encode(message.logConfig, writer.uint32(/* id 351299741, wireType 2 =*/2810397930).fork()).ldelim(); if (message.privateIpGoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpGoogleAccess")) @@ -492133,6 +494715,10 @@ message.ipCidrRange = reader.string(); break; } + case 176818358: { + message.ipCollection = reader.string(); + break; + } case 504658653: { message.ipv6AccessType = reader.string(); break; @@ -492141,6 +494727,10 @@ message.ipv6CidrRange = reader.string(); break; } + case 320382307: { + message.ipv6GceEndpoint = reader.string(); + break; + } case 3292052: { message.kind = reader.string(); break; @@ -492280,6 +494870,11 @@ if (!$util.isString(message.ipCidrRange)) return "ipCidrRange: string expected"; } + if (message.ipCollection != null && message.hasOwnProperty("ipCollection")) { + properties._ipCollection = 1; + if (!$util.isString(message.ipCollection)) + return "ipCollection: string expected"; + } if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { properties._ipv6AccessType = 1; if (!$util.isString(message.ipv6AccessType)) @@ -492290,6 +494885,11 @@ if (!$util.isString(message.ipv6CidrRange)) return "ipv6CidrRange: string expected"; } + if (message.ipv6GceEndpoint != null && message.hasOwnProperty("ipv6GceEndpoint")) { + properties._ipv6GceEndpoint = 1; + if (!$util.isString(message.ipv6GceEndpoint)) + return "ipv6GceEndpoint: string expected"; + } if (message.kind != null && message.hasOwnProperty("kind")) { properties._kind = 1; if (!$util.isString(message.kind)) @@ -492407,10 +495007,14 @@ message.internalIpv6Prefix = String(object.internalIpv6Prefix); if (object.ipCidrRange != null) message.ipCidrRange = String(object.ipCidrRange); + if (object.ipCollection != null) + message.ipCollection = String(object.ipCollection); if (object.ipv6AccessType != null) message.ipv6AccessType = String(object.ipv6AccessType); if (object.ipv6CidrRange != null) message.ipv6CidrRange = String(object.ipv6CidrRange); + if (object.ipv6GceEndpoint != null) + message.ipv6GceEndpoint = String(object.ipv6GceEndpoint); if (object.kind != null) message.kind = String(object.kind); if (object.logConfig != null) { @@ -492531,6 +495135,11 @@ if (options.oneofs) object._enableFlowLogs = "enableFlowLogs"; } + if (message.ipCollection != null && message.hasOwnProperty("ipCollection")) { + object.ipCollection = message.ipCollection; + if (options.oneofs) + object._ipCollection = "ipCollection"; + } if (message.network != null && message.hasOwnProperty("network")) { object.network = message.network; if (options.oneofs) @@ -492556,6 +495165,11 @@ if (options.oneofs) object._purpose = "purpose"; } + if (message.ipv6GceEndpoint != null && message.hasOwnProperty("ipv6GceEndpoint")) { + object.ipv6GceEndpoint = message.ipv6GceEndpoint; + if (options.oneofs) + object._ipv6GceEndpoint = "ipv6GceEndpoint"; + } if (message.logConfig != null && message.hasOwnProperty("logConfig")) { object.logConfig = $root.google.cloud.compute.v1.SubnetworkLogConfig.toObject(message.logConfig, options); if (options.oneofs) @@ -492643,6 +495257,22 @@ return values; })(); + /** + * Ipv6GceEndpoint enum. + * @name google.cloud.compute.v1.Subnetwork.Ipv6GceEndpoint + * @enum {number} + * @property {number} UNDEFINED_IPV6_GCE_ENDPOINT=0 UNDEFINED_IPV6_GCE_ENDPOINT value + * @property {number} VM_AND_FR=41830108 VM_AND_FR value + * @property {number} VM_ONLY=236773428 VM_ONLY value + */ + Subnetwork.Ipv6GceEndpoint = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNDEFINED_IPV6_GCE_ENDPOINT"] = 0; + values[valuesById[41830108] = "VM_AND_FR"] = 41830108; + values[valuesById[236773428] = "VM_ONLY"] = 236773428; + return values; + })(); + /** * PrivateIpv6GoogleAccess enum. * @name google.cloud.compute.v1.Subnetwork.PrivateIpv6GoogleAccess @@ -559182,6 +561812,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.compute.v1.Instances|reportHostAsFaulty}. + * @memberof google.cloud.compute.v1.Instances + * @typedef ReportHostAsFaultyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.compute.v1.Operation} [response] Operation + */ + + /** + * Calls ReportHostAsFaulty. + * @function reportHostAsFaulty + * @memberof google.cloud.compute.v1.Instances + * @instance + * @param {google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest} request ReportHostAsFaultyInstanceRequest message or plain object + * @param {google.cloud.compute.v1.Instances.ReportHostAsFaultyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Instances.prototype.reportHostAsFaulty = function reportHostAsFaulty(request, callback) { + return this.rpcCall(reportHostAsFaulty, $root.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest, $root.google.cloud.compute.v1.Operation, request, callback); + }, "name", { value: "ReportHostAsFaulty" }); + + /** + * Calls ReportHostAsFaulty. + * @function reportHostAsFaulty + * @memberof google.cloud.compute.v1.Instances + * @instance + * @param {google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest} request ReportHostAsFaultyInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.compute.v1.Instances|reset}. * @memberof google.cloud.compute.v1.Instances diff --git a/packages/google-cloud-compute/protos/protos.json b/packages/google-cloud-compute/protos/protos.json index a9858a9b224..e71defd2165 100644 --- a/packages/google-cloud-compute/protos/protos.json +++ b/packages/google-cloud-compute/protos/protos.json @@ -6699,6 +6699,34 @@ } } }, + "AllocationReservationSharingPolicy": { + "oneofs": { + "_serviceShareType": { + "oneof": [ + "serviceShareType" + ] + } + }, + "fields": { + "serviceShareType": { + "type": "string", + "id": 514508644, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "ServiceShareType": { + "values": { + "UNDEFINED_SERVICE_SHARE_TYPE": 0, + "ALLOW_ALL": 475536235, + "DISALLOW_ALL": 277786301, + "SERVICE_SHARE_TYPE_UNSPECIFIED": 279057148 + } + } + } + }, "AllocationResourceStatus": { "oneofs": { "_specificSkuAllocation": { @@ -6732,6 +6760,11 @@ "options": { "proto3_optional": true } + }, + "utilizations": { + "keyType": "string", + "type": "int64", + "id": 402495121 } } }, @@ -8623,6 +8656,11 @@ "proto3_optional": true } }, + "customMetrics": { + "rule": "repeated", + "type": "BackendCustomMetric", + "id": 429453813 + }, "description": { "type": "string", "id": 422937596, @@ -8706,6 +8744,7 @@ "values": { "UNDEFINED_BALANCING_MODE": 0, "CONNECTION": 246311646, + "CUSTOM_METRICS": 331575765, "RATE": 2508000, "UTILIZATION": 157008386 } @@ -9168,6 +9207,48 @@ } } }, + "BackendCustomMetric": { + "oneofs": { + "_dryRun": { + "oneof": [ + "dryRun" + ] + }, + "_maxUtilization": { + "oneof": [ + "maxUtilization" + ] + }, + "_name": { + "oneof": [ + "name" + ] + } + }, + "fields": { + "dryRun": { + "type": "bool", + "id": 323854839, + "options": { + "proto3_optional": true + } + }, + "maxUtilization": { + "type": "float", + "id": 148192199, + "options": { + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 3373707, + "options": { + "proto3_optional": true + } + } + } + }, "BackendService": { "oneofs": { "_affinityCookieTtlSec": { @@ -9413,6 +9494,11 @@ "proto3_optional": true } }, + "customMetrics": { + "rule": "repeated", + "type": "BackendServiceCustomMetric", + "id": 429453813 + }, "customRequestHeaders": { "rule": "repeated", "type": "string", @@ -9683,7 +9769,8 @@ "RANDOM": 262527171, "RING_HASH": 432795069, "ROUND_ROBIN": 153895801, - "WEIGHTED_MAGLEV": 254930962 + "WEIGHTED_MAGLEV": 254930962, + "WEIGHTED_ROUND_ROBIN": 5584977 } }, "Protocol": { @@ -10051,6 +10138,36 @@ } } }, + "BackendServiceCustomMetric": { + "oneofs": { + "_dryRun": { + "oneof": [ + "dryRun" + ] + }, + "_name": { + "oneof": [ + "name" + ] + } + }, + "fields": { + "dryRun": { + "type": "bool", + "id": 323854839, + "options": { + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 3373707, + "options": { + "proto3_optional": true + } + } + } + }, "BackendServiceFailoverPolicy": { "oneofs": { "_disableConnectionDrainOnFailover": { @@ -10447,7 +10564,8 @@ "RANDOM": 262527171, "RING_HASH": 432795069, "ROUND_ROBIN": 153895801, - "WEIGHTED_MAGLEV": 254930962 + "WEIGHTED_MAGLEV": 254930962, + "WEIGHTED_ROUND_ROBIN": 5584977 } } } @@ -12188,6 +12306,7 @@ "GRAPHICS_OPTIMIZED": 68500563, "MEMORY_OPTIMIZED": 281753417, "MEMORY_OPTIMIZED_M3": 276301372, + "MEMORY_OPTIMIZED_M4": 276301373, "MEMORY_OPTIMIZED_X4_16TB": 183089120, "MEMORY_OPTIMIZED_X4_24TB": 183116989, "MEMORY_OPTIMIZED_X4_32TB": 183144858, @@ -31606,6 +31725,11 @@ "region" ] }, + "_resourcePolicies": { + "oneof": [ + "resourcePolicies" + ] + }, "_satisfiesPzi": { "oneof": [ "satisfiesPzi" @@ -31785,6 +31909,13 @@ "proto3_optional": true } }, + "resourcePolicies": { + "type": "InstanceGroupManagerResourcePolicies", + "id": 22220385, + "options": { + "proto3_optional": true + } + }, "satisfiesPzi": { "type": "bool", "id": 480964257, @@ -32600,6 +32731,24 @@ } } }, + "InstanceGroupManagerResourcePolicies": { + "oneofs": { + "_workloadPolicy": { + "oneof": [ + "workloadPolicy" + ] + } + }, + "fields": { + "workloadPolicy": { + "type": "string", + "id": 114721530, + "options": { + "proto3_optional": true + } + } + } + }, "InstanceGroupManagerStandbyPolicy": { "oneofs": { "_initialDelaySec": { @@ -34594,6 +34743,80 @@ } } }, + "InstancesReportHostAsFaultyRequest": { + "oneofs": { + "_disruptionSchedule": { + "oneof": [ + "disruptionSchedule" + ] + } + }, + "fields": { + "disruptionSchedule": { + "type": "string", + "id": 95871619, + "options": { + "proto3_optional": true + } + }, + "faultReasons": { + "rule": "repeated", + "type": "InstancesReportHostAsFaultyRequestFaultReason", + "id": 168056210 + } + }, + "nested": { + "DisruptionSchedule": { + "values": { + "UNDEFINED_DISRUPTION_SCHEDULE": 0, + "DISRUPTION_SCHEDULE_UNSPECIFIED": 332543835, + "FUTURE": 474513859, + "IMMEDIATE": 152881041 + } + } + } + }, + "InstancesReportHostAsFaultyRequestFaultReason": { + "oneofs": { + "_behavior": { + "oneof": [ + "behavior" + ] + }, + "_description": { + "oneof": [ + "description" + ] + } + }, + "fields": { + "behavior": { + "type": "string", + "id": 437170770, + "options": { + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 422937596, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Behavior": { + "values": { + "UNDEFINED_BEHAVIOR": 0, + "BEHAVIOR_UNSPECIFIED": 85734570, + "PERFORMANCE": 135701520, + "SILENT_DATA_CORRUPTION": 111360678, + "UNRECOVERABLE_GPU_ERROR": 363710747 + } + } + } + }, "InstancesScopedList": { "oneofs": { "_warning": { @@ -59378,7 +59601,8 @@ "values": { "UNDEFINED_MODE": 0, "DELEGATION": 264149288, - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION": 398684356 + "EXTERNAL_IPV6_FORWARDING_RULE_CREATION": 398684356, + "EXTERNAL_IPV6_SUBNETWORK_CREATION": 61198284 } }, "Status": { @@ -59659,7 +59883,8 @@ "values": { "UNDEFINED_MODE": 0, "DELEGATION": 264149288, - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION": 398684356 + "EXTERNAL_IPV6_FORWARDING_RULE_CREATION": 398684356, + "EXTERNAL_IPV6_SUBNETWORK_CREATION": 61198284 } }, "Status": { @@ -62220,6 +62445,54 @@ } } }, + "ReportHostAsFaultyInstanceRequest": { + "oneofs": { + "_requestId": { + "oneof": [ + "requestId" + ] + } + }, + "fields": { + "instance": { + "type": "string", + "id": 18257045, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instancesReportHostAsFaultyRequestResource": { + "type": "InstancesReportHostAsFaultyRequest", + "id": 494094886, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "project": { + "type": "string", + "id": 227560217, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.cloud.operation_request_field)": "project" + } + }, + "requestId": { + "type": "string", + "id": 37109963, + "options": { + "proto3_optional": true + } + }, + "zone": { + "type": "string", + "id": 3744684, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.cloud.operation_request_field)": "zone" + } + } + } + }, "RequestMirrorPolicy": { "oneofs": { "_backendService": { @@ -62275,6 +62548,11 @@ "name" ] }, + "_reservationSharingPolicy": { + "oneof": [ + "reservationSharingPolicy" + ] + }, "_resourceStatus": { "oneof": [ "resourceStatus" @@ -62366,6 +62644,13 @@ "proto3_optional": true } }, + "reservationSharingPolicy": { + "type": "AllocationReservationSharingPolicy", + "id": 205970120, + "options": { + "proto3_optional": true + } + }, "resourcePolicies": { "keyType": "string", "type": "string", @@ -63903,6 +64188,11 @@ "physicalHost" ] }, + "_physicalHostTopology": { + "oneof": [ + "physicalHostTopology" + ] + }, "_scheduling": { "oneof": [ "scheduling" @@ -63922,6 +64212,13 @@ "proto3_optional": true } }, + "physicalHostTopology": { + "type": "ResourceStatusPhysicalHostTopology", + "id": 390842814, + "options": { + "proto3_optional": true + } + }, "scheduling": { "type": "ResourceStatusScheduling", "id": 386688404, @@ -63938,6 +64235,60 @@ } } }, + "ResourceStatusPhysicalHostTopology": { + "oneofs": { + "_block": { + "oneof": [ + "block" + ] + }, + "_cluster": { + "oneof": [ + "cluster" + ] + }, + "_host": { + "oneof": [ + "host" + ] + }, + "_subblock": { + "oneof": [ + "subblock" + ] + } + }, + "fields": { + "block": { + "type": "string", + "id": 93832333, + "options": { + "proto3_optional": true + } + }, + "cluster": { + "type": "string", + "id": 335221242, + "options": { + "proto3_optional": true + } + }, + "host": { + "type": "string", + "id": 3208616, + "options": { + "proto3_optional": true + } + }, + "subblock": { + "type": "string", + "id": 70446669, + "options": { + "proto3_optional": true + } + } + } + }, "ResourceStatusScheduling": { "oneofs": { "_availabilityDomain": { @@ -67269,6 +67620,7 @@ "ProvisioningModel": { "values": { "UNDEFINED_PROVISIONING_MODEL": 0, + "RESERVATION_BOUND": 293538571, "SPOT": 2552066, "STANDARD": 484642493 } @@ -77104,6 +77456,11 @@ "ipCidrRange" ] }, + "_ipCollection": { + "oneof": [ + "ipCollection" + ] + }, "_ipv6AccessType": { "oneof": [ "ipv6AccessType" @@ -77114,6 +77471,11 @@ "ipv6CidrRange" ] }, + "_ipv6GceEndpoint": { + "oneof": [ + "ipv6GceEndpoint" + ] + }, "_kind": { "oneof": [ "kind" @@ -77244,6 +77606,13 @@ "proto3_optional": true } }, + "ipCollection": { + "type": "string", + "id": 176818358, + "options": { + "proto3_optional": true + } + }, "ipv6AccessType": { "type": "string", "id": 504658653, @@ -77258,6 +77627,13 @@ "proto3_optional": true } }, + "ipv6GceEndpoint": { + "type": "string", + "id": 320382307, + "options": { + "proto3_optional": true + } + }, "kind": { "type": "string", "id": 3292052, @@ -77364,6 +77740,13 @@ "UNSPECIFIED_IPV6_ACCESS_TYPE": 313080613 } }, + "Ipv6GceEndpoint": { + "values": { + "UNDEFINED_IPV6_GCE_ENDPOINT": 0, + "VM_AND_FR": 41830108, + "VM_ONLY": 236773428 + } + }, "PrivateIpv6GoogleAccess": { "values": { "UNDEFINED_PRIVATE_IPV6_GOOGLE_ACCESS": 0, @@ -91010,6 +91393,30 @@ } ] }, + "ReportHostAsFaulty": { + "requestType": "ReportHostAsFaultyInstanceRequest", + "responseType": "Operation", + "options": { + "(google.api.http).body": "instances_report_host_as_faulty_request_resource", + "(google.api.http).post": "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty", + "(google.api.method_signature)": "project,zone,instance,instances_report_host_as_faulty_request_resource", + "(google.cloud.operation_service)": "ZoneOperations" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "body": "instances_report_host_as_faulty_request_resource", + "post": "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty" + } + }, + { + "(google.api.method_signature)": "project,zone,instance,instances_report_host_as_faulty_request_resource" + }, + { + "(google.cloud.operation_service)": "ZoneOperations" + } + ] + }, "Reset": { "requestType": "ResetInstanceRequest", "responseType": "Operation", diff --git a/packages/google-cloud-compute/samples/README.md b/packages/google-cloud-compute/samples/README.md index 9b0eb5805e2..bb0385bc6e5 100644 --- a/packages/google-cloud-compute/samples/README.md +++ b/packages/google-cloud-compute/samples/README.md @@ -236,6 +236,7 @@ * [Instances.list_referrers](#instances.list_referrers) * [Instances.perform_maintenance](#instances.perform_maintenance) * [Instances.remove_resource_policies](#instances.remove_resource_policies) + * [Instances.report_host_as_faulty](#instances.report_host_as_faulty) * [Instances.reset](#instances.reset) * [Instances.resume](#instances.resume) * [Instances.send_diagnostic_interrupt](#instances.send_diagnostic_interrupt) @@ -4632,6 +4633,23 @@ __Usage:__ +### Instances.report_host_as_faulty + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js` + + +----- + + + + ### Instances.reset View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-compute/samples/generated/v1/instances.reset.js). diff --git a/packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js b/packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js new file mode 100644 index 00000000000..61f9642c7bc --- /dev/null +++ b/packages/google-cloud-compute/samples/generated/v1/instances.report_host_as_faulty.js @@ -0,0 +1,80 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(instance, instancesReportHostAsFaultyRequestResource, project, zone) { + // [START compute_v1_generated_Instances_ReportHostAsFaulty_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. + */ + /** + * Name of the instance scoping this request. + */ + // const instance = 'abc123' + /** + * The body resource for this request + */ + // const instancesReportHostAsFaultyRequestResource = {} + /** + * Project ID for this request. + */ + // const project = 'my-project' + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * The name of the zone for this request. + */ + // const zone = 'abc123' + + // Imports the Compute library + const {InstancesClient} = require('@google-cloud/compute').v1; + + // Instantiates a client + const computeClient = new InstancesClient(); + + async function callReportHostAsFaulty() { + // Construct request + const request = { + instance, + instancesReportHostAsFaultyRequestResource, + project, + zone, + }; + + // Run request + const response = await computeClient.reportHostAsFaulty(request); + console.log(response); + } + + callReportHostAsFaulty(); + // [END compute_v1_generated_Instances_ReportHostAsFaulty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json index 403e129ca54..631e9a84940 100644 --- a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json +++ b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json @@ -11455,6 +11455,62 @@ } } }, + { + "regionTag": "compute_v1_generated_Instances_ReportHostAsFaulty_async", + "title": "AcceleratorTypes reportHostAsFaulty Sample", + "origin": "API_DEFINITION", + "description": " Mark the host as faulty and try to restart the instance on a new host.", + "canonical": true, + "file": "instances.report_host_as_faulty.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReportHostAsFaulty", + "fullName": "google.cloud.compute.v1.Instances.ReportHostAsFaulty", + "async": true, + "parameters": [ + { + "name": "instance", + "type": "TYPE_STRING" + }, + { + "name": "instances_report_host_as_faulty_request_resource", + "type": ".google.cloud.compute.v1.InstancesReportHostAsFaultyRequest" + }, + { + "name": "project", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.compute.v1.Operation", + "client": { + "shortName": "InstancesClient", + "fullName": "google.cloud.compute.v1.InstancesClient" + }, + "method": { + "shortName": "ReportHostAsFaulty", + "fullName": "google.cloud.compute.v1.Instances.ReportHostAsFaulty", + "service": { + "shortName": "Instances", + "fullName": "google.cloud.compute.v1.Instances" + } + } + } + }, { "regionTag": "compute_v1_generated_Instances_Reset_async", "title": "AcceleratorTypes reset Sample", diff --git a/packages/google-cloud-compute/src/v1/gapic_metadata.json b/packages/google-cloud-compute/src/v1/gapic_metadata.json index 3c14096281d..39a9228011b 100644 --- a/packages/google-cloud-compute/src/v1/gapic_metadata.json +++ b/packages/google-cloud-compute/src/v1/gapic_metadata.json @@ -2513,6 +2513,11 @@ "removeResourcePolicies" ] }, + "ReportHostAsFaulty": { + "methods": [ + "reportHostAsFaulty" + ] + }, "Reset": { "methods": [ "reset" @@ -2764,6 +2769,11 @@ "removeResourcePolicies" ] }, + "ReportHostAsFaulty": { + "methods": [ + "reportHostAsFaulty" + ] + }, "Reset": { "methods": [ "reset" diff --git a/packages/google-cloud-compute/src/v1/instances_client.ts b/packages/google-cloud-compute/src/v1/instances_client.ts index 4c75bbd136e..696efabf82a 100644 --- a/packages/google-cloud-compute/src/v1/instances_client.ts +++ b/packages/google-cloud-compute/src/v1/instances_client.ts @@ -289,6 +289,7 @@ export class InstancesClient { 'listReferrers', 'performMaintenance', 'removeResourcePolicies', + 'reportHostAsFaulty', 'reset', 'resume', 'sendDiagnosticInterrupt', @@ -2720,6 +2721,146 @@ export class InstancesClient { } ); } + /** + * Mark the host as faulty and try to restart the instance on a new host. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.instance + * Name of the instance scoping this request. + * @param {google.cloud.compute.v1.InstancesReportHostAsFaultyRequest} request.instancesReportHostAsFaultyRequestResource + * The body resource for this request + * @param {string} request.project + * Project ID for this request. + * @param {string} request.requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @param {string} request.zone + * The name of the zone for this request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * This method is considered to be in beta. This means while + * stable it is still a work-in-progress and under active development, + * and might get backwards-incompatible changes at any time. + * `.promise()` is not supported yet. + * @example include:samples/generated/v1/instances.report_host_as_faulty.js + * region_tag:compute_v1_generated_Instances_ReportHostAsFaulty_async + */ + reportHostAsFaulty( + request?: protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest, + options?: CallOptions + ): Promise< + [ + LROperation, + protos.google.cloud.compute.v1.IOperation | undefined, + {} | undefined, + ] + >; + reportHostAsFaulty( + request: protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.compute.v1.IOperation, + | protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + reportHostAsFaulty( + request: protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest, + callback: Callback< + protos.google.cloud.compute.v1.IOperation, + | protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + reportHostAsFaulty( + request?: protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.compute.v1.IOperation, + | protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.compute.v1.IOperation, + | protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation, + protos.google.cloud.compute.v1.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + project: request.project ?? '', + zone: request.zone ?? '', + instance: request.instance ?? '', + }); + this.initialize(); + this._log.info('reportHostAsFaulty request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.compute.v1.IOperation, + | protos.google.cloud.compute.v1.IReportHostAsFaultyInstanceRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, nextRequest, rawResponse) => { + this._log.info('reportHostAsFaulty response %j', rawResponse); + callback!(error, response, nextRequest, rawResponse); // We verified `callback` above. + } + : undefined; + return this.innerApiCalls + .reportHostAsFaulty(request, options, wrappedCallback) + ?.then( + ([response, operation, rawResponse]: [ + protos.google.cloud.compute.v1.IOperation, + protos.google.cloud.compute.v1.IOperation, + protos.google.cloud.compute.v1.IOperation, + ]) => { + return [ + { + latestResponse: response, + done: false, + name: response.id, + metadata: null, + result: {}, + }, + operation, + rawResponse, + ]; + } + ); + } /** * Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance. * diff --git a/packages/google-cloud-compute/src/v1/instances_client_config.json b/packages/google-cloud-compute/src/v1/instances_client_config.json index 601f08688a0..40e52257221 100644 --- a/packages/google-cloud-compute/src/v1/instances_client_config.json +++ b/packages/google-cloud-compute/src/v1/instances_client_config.json @@ -100,6 +100,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "ReportHostAsFaulty": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "Reset": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-compute/test/gapic_instances_v1.ts b/packages/google-cloud-compute/test/gapic_instances_v1.ts index 38a2c2c3aa3..b61293d8b6f 100644 --- a/packages/google-cloud-compute/test/gapic_instances_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instances_v1.ts @@ -3179,6 +3179,177 @@ describe('v1.InstancesClient', () => { }); }); + describe('reportHostAsFaulty', () => { + it('invokes reportHostAsFaulty without error', async () => { + const client = new instancesModule.v1.InstancesClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['project'] + ); + request.project = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['zone'] + ); + request.zone = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['instance'] + ); + request.instance = defaultValue3; + const expectedHeaderRequestParams = `project=${defaultValue1 ?? ''}&zone=${defaultValue2 ?? ''}&instance=${defaultValue3 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.compute.v1.Operation() + ); + client.innerApiCalls.reportHostAsFaulty = + stubSimpleCall(expectedResponse); + const [response] = await client.reportHostAsFaulty(request); + assert.deepStrictEqual(response.latestResponse, expectedResponse); + const actualRequest = ( + client.innerApiCalls.reportHostAsFaulty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reportHostAsFaulty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reportHostAsFaulty without error using callback', async () => { + const client = new instancesModule.v1.InstancesClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['project'] + ); + request.project = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['zone'] + ); + request.zone = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['instance'] + ); + request.instance = defaultValue3; + const expectedHeaderRequestParams = `project=${defaultValue1 ?? ''}&zone=${defaultValue2 ?? ''}&instance=${defaultValue3 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.compute.v1.Operation() + ); + client.innerApiCalls.reportHostAsFaulty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.reportHostAsFaulty( + request, + ( + err?: Error | null, + result?: protos.google.cloud.compute.v1.IOperation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.reportHostAsFaulty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reportHostAsFaulty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reportHostAsFaulty with error', async () => { + const client = new instancesModule.v1.InstancesClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['project'] + ); + request.project = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['zone'] + ); + request.zone = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['instance'] + ); + request.instance = defaultValue3; + const expectedHeaderRequestParams = `project=${defaultValue1 ?? ''}&zone=${defaultValue2 ?? ''}&instance=${defaultValue3 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.reportHostAsFaulty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.reportHostAsFaulty(request), expectedError); + const actualRequest = ( + client.innerApiCalls.reportHostAsFaulty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reportHostAsFaulty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reportHostAsFaulty with closed client', async () => { + const client = new instancesModule.v1.InstancesClient({ + auth: googleAuth, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['project'] + ); + request.project = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['zone'] + ); + request.zone = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + '.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest', + ['instance'] + ); + request.instance = defaultValue3; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.reportHostAsFaulty(request), expectedError); + }); + }); + describe('reset', () => { it('invokes reset without error', async () => { const client = new instancesModule.v1.InstancesClient({ From a5cb6f1b5a50048cc696e043b98adbc62fed0d12 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:24:09 -0700 Subject: [PATCH 06/34] docs: [orchestration] update composer supported environments version match (#6161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: update composer supported environments version match PiperOrigin-RevId: 737034878 Source-Link: https://github.com/googleapis/googleapis/commit/d5b0985766af88699d7b112d64f338cfd8403023 Source-Link: https://github.com/googleapis/googleapis-gen/commit/566bff27465eff2f6a116bce89f7ae765b5127c0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yY2hlc3RyYXRpb24tYWlyZmxvdy1zZXJ2aWNlLy5Pd2xCb3QueWFtbCIsImgiOiI1NjZiZmYyNzQ2NWVmZjJmNmExMTZiY2U4OWY3YWU3NjViNTEyN2MwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../service/v1beta1/environments.proto | 34 +++++++++---------- ...orchestration.airflow.service.v1beta1.json | 22 ++++++------ .../src/v1beta1/environments_client.ts | 22 ++++++------ 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto index 761c1a4ed2c..07da6e27112 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -152,7 +152,7 @@ service Environments { // runs a single Composer component. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-2.*.*-airflow-*.*.* and newer. rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads" @@ -163,7 +163,7 @@ service Environments { // Creates a user workloads Secret. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc CreateUserWorkloadsSecret(CreateUserWorkloadsSecretRequest) returns (UserWorkloadsSecret) { option (google.api.http) = { @@ -177,7 +177,7 @@ service Environments { // Values of the "data" field in the response are cleared. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc GetUserWorkloadsSecret(GetUserWorkloadsSecretRequest) returns (UserWorkloadsSecret) { option (google.api.http) = { @@ -189,7 +189,7 @@ service Environments { // Lists user workloads Secrets. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc ListUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest) returns (ListUserWorkloadsSecretsResponse) { option (google.api.http) = { @@ -201,7 +201,7 @@ service Environments { // Updates a user workloads Secret. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc UpdateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest) returns (UserWorkloadsSecret) { option (google.api.http) = { @@ -214,7 +214,7 @@ service Environments { // Deletes a user workloads Secret. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc DeleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -226,7 +226,7 @@ service Environments { // Creates a user workloads ConfigMap. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc CreateUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest) returns (UserWorkloadsConfigMap) { option (google.api.http) = { @@ -239,7 +239,7 @@ service Environments { // Gets an existing user workloads ConfigMap. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc GetUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest) returns (UserWorkloadsConfigMap) { option (google.api.http) = { @@ -251,7 +251,7 @@ service Environments { // Lists user workloads ConfigMaps. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc ListUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest) returns (ListUserWorkloadsConfigMapsResponse) { option (google.api.http) = { @@ -263,7 +263,7 @@ service Environments { // Updates a user workloads ConfigMap. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc UpdateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest) returns (UserWorkloadsConfigMap) { option (google.api.http) = { @@ -276,7 +276,7 @@ service Environments { // Deletes a user workloads ConfigMap. // // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. rpc DeleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -1362,7 +1362,7 @@ message SoftwareConfig { // If unspecified, the field defaults to `PLUGINS_ENABLED`. // // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. WebServerPluginsMode web_server_plugins_mode = 10 [(google.api.field_behavior) = OPTIONAL]; } @@ -1572,7 +1572,7 @@ message NodeConfig { // projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. // // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. string composer_network_attachment = 12 [(google.api.field_behavior) = OPTIONAL]; @@ -1583,7 +1583,7 @@ message NodeConfig { // If not specified, the default value of '100.64.128.0/20' is used. // // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. string composer_internal_ipv4_cidr_block = 13 [(google.api.field_behavior) = OPTIONAL]; } @@ -1651,7 +1651,7 @@ message PrivateEnvironmentConfig { // internet. // // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. bool enable_private_builds_only = 11 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for the private GKE cluster for a Private IP @@ -1859,7 +1859,7 @@ message WorkloadsConfig { // Configuration for resources used by Airflow DAG processors. // // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. message DagProcessorResource { // Optional. CPU request and limit for a single Airflow DAG processor // replica. @@ -1893,7 +1893,7 @@ message WorkloadsConfig { // Optional. Resources used by Airflow DAG processors. // // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. + // composer-3-airflow-*.*.*-build.* and newer. DagProcessorResource dag_processor = 5 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json index df6ae49473d..26521caf35b 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json @@ -483,7 +483,7 @@ "regionTag": "composer_v1beta1_generated_Environments_ListWorkloads_async", "title": "Environments listWorkloads Sample", "origin": "API_DEFINITION", - "description": " Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", "canonical": true, "file": "environments.list_workloads.js", "language": "JAVASCRIPT", @@ -535,7 +535,7 @@ "regionTag": "composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_async", "title": "Environments createUserWorkloadsSecret Sample", "origin": "API_DEFINITION", - "description": " Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.create_user_workloads_secret.js", "language": "JAVASCRIPT", @@ -579,7 +579,7 @@ "regionTag": "composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_async", "title": "Environments getUserWorkloadsSecret Sample", "origin": "API_DEFINITION", - "description": " Gets an existing user workloads Secret. Values of the \"data\" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Gets an existing user workloads Secret. Values of the \"data\" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.get_user_workloads_secret.js", "language": "JAVASCRIPT", @@ -619,7 +619,7 @@ "regionTag": "composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_async", "title": "Environments listUserWorkloadsSecrets Sample", "origin": "API_DEFINITION", - "description": " Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.list_user_workloads_secrets.js", "language": "JAVASCRIPT", @@ -667,7 +667,7 @@ "regionTag": "composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_async", "title": "Environments updateUserWorkloadsSecret Sample", "origin": "API_DEFINITION", - "description": " Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.update_user_workloads_secret.js", "language": "JAVASCRIPT", @@ -707,7 +707,7 @@ "regionTag": "composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_async", "title": "Environments deleteUserWorkloadsSecret Sample", "origin": "API_DEFINITION", - "description": " Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.delete_user_workloads_secret.js", "language": "JAVASCRIPT", @@ -747,7 +747,7 @@ "regionTag": "composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_async", "title": "Environments createUserWorkloadsConfigMap Sample", "origin": "API_DEFINITION", - "description": " Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.create_user_workloads_config_map.js", "language": "JAVASCRIPT", @@ -791,7 +791,7 @@ "regionTag": "composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_async", "title": "Environments getUserWorkloadsConfigMap Sample", "origin": "API_DEFINITION", - "description": " Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.get_user_workloads_config_map.js", "language": "JAVASCRIPT", @@ -831,7 +831,7 @@ "regionTag": "composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_async", "title": "Environments listUserWorkloadsConfigMaps Sample", "origin": "API_DEFINITION", - "description": " Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.list_user_workloads_config_maps.js", "language": "JAVASCRIPT", @@ -879,7 +879,7 @@ "regionTag": "composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_async", "title": "Environments updateUserWorkloadsConfigMap Sample", "origin": "API_DEFINITION", - "description": " Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.update_user_workloads_config_map.js", "language": "JAVASCRIPT", @@ -919,7 +919,7 @@ "regionTag": "composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_async", "title": "Environments deleteUserWorkloadsConfigMap Sample", "origin": "API_DEFINITION", - "description": " Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "description": " Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.", "canonical": true, "file": "environments.delete_user_workloads_config_map.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index c8e899b8bd9..da91873f188 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -1089,7 +1089,7 @@ export class EnvironmentsClient { * Creates a user workloads Secret. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -1221,7 +1221,7 @@ export class EnvironmentsClient { * Values of the "data" field in the response are cleared. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -1350,7 +1350,7 @@ export class EnvironmentsClient { * Updates a user workloads Secret. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -1478,7 +1478,7 @@ export class EnvironmentsClient { * Deletes a user workloads Secret. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -1607,7 +1607,7 @@ export class EnvironmentsClient { * Creates a user workloads ConfigMap. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -1738,7 +1738,7 @@ export class EnvironmentsClient { * Gets an existing user workloads ConfigMap. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -1867,7 +1867,7 @@ export class EnvironmentsClient { * Updates a user workloads ConfigMap. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -1996,7 +1996,7 @@ export class EnvironmentsClient { * Deletes a user workloads ConfigMap. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -4017,7 +4017,7 @@ export class EnvironmentsClient { * runs a single Composer component. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-2.*.*-airflow-*.*.* and newer. * * @param {Object} request * The request object that will be sent. @@ -4261,7 +4261,7 @@ export class EnvironmentsClient { * Lists user workloads Secrets. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. @@ -4484,7 +4484,7 @@ export class EnvironmentsClient { * Lists user workloads ConfigMaps. * * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. + * composer-3-airflow-*.*.*-build.* and newer. * * @param {Object} request * The request object that will be sent. From 336ec3119f2c1964b3d43ed23fba880ab4658b20 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:24:26 -0700 Subject: [PATCH 07/34] feat: [oracledatabase] add enum value `State::NOT_APPROVED_IN_PRIVATE_MARKETPLACE` (#6162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add enum value `State::NOT_APPROVED_IN_PRIVATE_MARKETPLACE` docs: update comment for field `MaintenanceWindow.patching_mode` PiperOrigin-RevId: 737035315 Source-Link: https://github.com/googleapis/googleapis/commit/e4515ba9ef4f8d75d6d38de3a2b3fe6654705b26 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2343688b93c940392fa5f6964933f8d9068d726d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yYWNsZWRhdGFiYXNlLy5Pd2xCb3QueWFtbCIsImgiOiIyMzQzNjg4YjkzYzk0MDM5MmZhNWY2OTY0OTMzZjhkOTA2OGQ3MjZkIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/cloud/oracledatabase/v1/entitlement.proto | 3 +++ .../google/cloud/oracledatabase/v1/exadata_infra.proto | 3 +-- packages/google-cloud-oracledatabase/protos/protos.d.ts | 3 ++- packages/google-cloud-oracledatabase/protos/protos.js | 7 +++++++ packages/google-cloud-oracledatabase/protos/protos.json | 3 ++- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/entitlement.proto b/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/entitlement.proto index a653c091019..6b22a7f2816 100644 --- a/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/entitlement.proto +++ b/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/entitlement.proto @@ -52,6 +52,9 @@ message Entitlement { // Account is suspended. ACCOUNT_SUSPENDED = 4; + + // Entitlement is not approved in private marketplace. + NOT_APPROVED_IN_PRIVATE_MARKETPLACE = 5; } // Identifier. The name of the Entitlement resource with the format: diff --git a/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/exadata_infra.proto b/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/exadata_infra.proto index c8a5c9c15a8..5036ff4da76 100644 --- a/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/exadata_infra.proto +++ b/packages/google-cloud-oracledatabase/protos/google/cloud/oracledatabase/v1/exadata_infra.proto @@ -264,8 +264,7 @@ message MaintenanceWindow { int32 lead_time_week = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Cloud CloudExadataInfrastructure node patching method, either - // "ROLLING" - // or "NONROLLING". Default value is ROLLING. + // "ROLLING" or "NONROLLING". Default value is ROLLING. PatchingMode patching_mode = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Determines the amount of time the system will wait before the diff --git a/packages/google-cloud-oracledatabase/protos/protos.d.ts b/packages/google-cloud-oracledatabase/protos/protos.d.ts index b1fa2c7b298..25c5f5e2f63 100644 --- a/packages/google-cloud-oracledatabase/protos/protos.d.ts +++ b/packages/google-cloud-oracledatabase/protos/protos.d.ts @@ -3161,7 +3161,8 @@ export namespace google { ACCOUNT_NOT_LINKED = 1, ACCOUNT_NOT_ACTIVE = 2, ACTIVE = 3, - ACCOUNT_SUSPENDED = 4 + ACCOUNT_SUSPENDED = 4, + NOT_APPROVED_IN_PRIVATE_MARKETPLACE = 5 } } diff --git a/packages/google-cloud-oracledatabase/protos/protos.js b/packages/google-cloud-oracledatabase/protos/protos.js index e23dd13d6c0..6ab071ef1eb 100644 --- a/packages/google-cloud-oracledatabase/protos/protos.js +++ b/packages/google-cloud-oracledatabase/protos/protos.js @@ -9561,6 +9561,7 @@ case 2: case 3: case 4: + case 5: break; } return null; @@ -9614,6 +9615,10 @@ case 4: message.state = 4; break; + case "NOT_APPROVED_IN_PRIVATE_MARKETPLACE": + case 5: + message.state = 5; + break; } return message; }; @@ -9683,6 +9688,7 @@ * @property {number} ACCOUNT_NOT_ACTIVE=2 ACCOUNT_NOT_ACTIVE value * @property {number} ACTIVE=3 ACTIVE value * @property {number} ACCOUNT_SUSPENDED=4 ACCOUNT_SUSPENDED value + * @property {number} NOT_APPROVED_IN_PRIVATE_MARKETPLACE=5 NOT_APPROVED_IN_PRIVATE_MARKETPLACE value */ Entitlement.State = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -9691,6 +9697,7 @@ values[valuesById[2] = "ACCOUNT_NOT_ACTIVE"] = 2; values[valuesById[3] = "ACTIVE"] = 3; values[valuesById[4] = "ACCOUNT_SUSPENDED"] = 4; + values[valuesById[5] = "NOT_APPROVED_IN_PRIVATE_MARKETPLACE"] = 5; return values; })(); diff --git a/packages/google-cloud-oracledatabase/protos/protos.json b/packages/google-cloud-oracledatabase/protos/protos.json index 5ee635d664e..eb607a8dbff 100644 --- a/packages/google-cloud-oracledatabase/protos/protos.json +++ b/packages/google-cloud-oracledatabase/protos/protos.json @@ -1636,7 +1636,8 @@ "ACCOUNT_NOT_LINKED": 1, "ACCOUNT_NOT_ACTIVE": 2, "ACTIVE": 3, - "ACCOUNT_SUSPENDED": 4 + "ACCOUNT_SUSPENDED": 4, + "NOT_APPROVED_IN_PRIVATE_MARKETPLACE": 5 } } } From 99028ab3ca6487acf9df82e4d013ffa40d0aebf6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:24:44 -0700 Subject: [PATCH 08/34] feat: [merchantapi] add an update method (#6163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add an update method docs: A comment for message `ProductInput` is changed docs: A comment for field `channel` in message `.google.shopping.merchant.products.v1beta.ProductInput` is changed docs: A comment for field `data_source` in message `.google.shopping.merchant.products.v1beta.InsertProductInputRequest` is changed PiperOrigin-RevId: 737402434 Source-Link: https://github.com/googleapis/googleapis/commit/bc7f715d7f58afe381fbc244a8bcde7f0afa11ed Source-Link: https://github.com/googleapis/googleapis-gen/commit/020db0ddbcc7a378dcafe8766a03c0243cb1806c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLy5Pd2xCb3QueWFtbCIsImgiOiIwMjBkYjBkZGJjYzdhMzc4ZGNhZmU4NzY2YTAzYzAyNDNjYjE4MDZjIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../README.md | 1 + .../products/v1beta/productinputs.proto | 96 +- .../products/v1beta/products_common.proto | 36 + .../protos/protos.d.ts | 358 ++++++ .../protos/protos.js | 1082 +++++++++++++++-- .../protos/protos.json | 100 ++ .../samples/README.md | 18 + ...uct_inputs_service.insert_product_input.js | 5 +- ...uct_inputs_service.update_product_input.js | 83 ++ ...gle.shopping.merchant.products.v1beta.json | 50 +- .../src/v1beta/gapic_metadata.json | 10 + .../v1beta/product_inputs_service_client.ts | 160 ++- .../product_inputs_service_client_config.json | 5 + .../gapic_product_inputs_service_v1beta.ts | 139 +++ 14 files changed, 2019 insertions(+), 124 deletions(-) create mode 100644 packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js diff --git a/packages/google-shopping-merchant-products/README.md b/packages/google-shopping-merchant-products/README.md index 1504353088b..17dc2cfcb04 100644 --- a/packages/google-shopping-merchant-products/README.md +++ b/packages/google-shopping-merchant-products/README.md @@ -116,6 +116,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | --------------------------- | --------------------------------- | ------ | | Product_inputs_service.delete_product_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.delete_product_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.delete_product_input.js,packages/google-shopping-merchant-products/samples/README.md) | | Product_inputs_service.insert_product_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.insert_product_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.insert_product_input.js,packages/google-shopping-merchant-products/samples/README.md) | +| Product_inputs_service.update_product_input | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js,packages/google-shopping-merchant-products/samples/README.md) | | Products_service.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/generated/v1beta/products_service.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-products/samples/generated/v1beta/products_service.get_product.js,packages/google-shopping-merchant-products/samples/README.md) | | Products_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/generated/v1beta/products_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-products/samples/generated/v1beta/products_service.list_products.js,packages/google-shopping-merchant-products/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-products/samples/quickstart.js,packages/google-shopping-merchant-products/samples/README.md) | diff --git a/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/productinputs.proto b/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/productinputs.proto index 0f4d173282e..205e5ebb728 100644 --- a/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/productinputs.proto +++ b/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/productinputs.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/shopping/merchant/products/v1beta/products_common.proto"; import "google/shopping/type/types.proto"; @@ -48,6 +49,18 @@ service ProductInputsService { }; } + // Updates the existing product input in your Merchant Center account. + // + // After inserting, updating, or deleting a product input, it may take several + // minutes before the processed product can be retrieved. + rpc UpdateProductInput(UpdateProductInputRequest) returns (ProductInput) { + option (google.api.http) = { + patch: "/products/v1beta/{product_input.name=accounts/*/productInputs/*}" + body: "product_input" + }; + option (google.api.method_signature) = "product_input,update_mask"; + } + // Deletes a product input from your Merchant Center account. // // After inserting, updating, or deleting a product input, it may take several @@ -62,26 +75,26 @@ service ProductInputsService { } // This resource represents input data you submit for a product, not the -// processed product that you see in Merchant Center, in Shopping ads, or across -// Google surfaces. Product inputs, rules and supplemental data source data are -// combined to create the processed -// [Product][google.shopping.merchant.products.v1beta.Product]. +// processed product that you see in Merchant Center, in Shopping ads, or +// across Google surfaces. Product inputs, rules and supplemental data source +// data are combined to create the processed +// [Product][google.shopping.merchant.products.v1beta.Product]. // -// Required product input attributes to pass data validation checks are -// primarily defined in the [Products Data -// Specification](https://support.google.com/merchants/answer/188494). +// Required product input attributes to pass data validation checks are +// primarily defined in the [Products Data +// Specification](https://support.google.com/merchants/answer/188494). // -// The following attributes are required: -// [feedLabel][google.shopping.merchant.products.v1beta.Product.feed_label], -// [contentLanguage][google.shopping.merchant.products.v1beta.Product.content_language] -// and [offerId][google.shopping.merchant.products.v1beta.Product.offer_id]. +// The following attributes are required: +// [feedLabel][google.shopping.merchant.products.v1beta.Product.feed_label], +// [contentLanguage][google.shopping.merchant.products.v1beta.Product.content_language] +// and [offerId][google.shopping.merchant.products.v1beta.Product.offer_id]. // -// After inserting, updating, or deleting a product input, it may take several -// minutes before the processed product can be retrieved. +// After inserting, updating, or deleting a product input, it may take several +// minutes before the processed product can be retrieved. // -// All fields in the product input and its sub-messages match the English name -// of their corresponding attribute in the vertical spec with [some -// exceptions](https://support.google.com/merchants/answer/7052112). +// All fields in the product input and its sub-messages match the English name +// of their corresponding attribute in the vertical spec with [some +// exceptions](https://support.google.com/merchants/answer/7052112). message ProductInput { option (google.api.resource) = { type: "merchantapi.googleapis.com/ProductInput" @@ -104,13 +117,11 @@ message ProductInput { // `"{product.name=accounts/{account}/products/{product}}"` string product = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. Immutable. The + // Immutable. The // [channel](https://support.google.com/merchants/answer/7361332) of the // product. - google.shopping.type.Channel.ChannelEnum channel = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; + google.shopping.type.Channel.ChannelEnum channel = 3 + [(google.api.field_behavior) = IMMUTABLE]; // Required. Immutable. Your unique identifier for the product. This is the // same for the product input and processed product. Leading and trailing @@ -188,8 +199,47 @@ message InsertProductInputRequest { // Required. The primary or supplemental product data source name. If the // product already exists and data source provided is different, then the - // product will be moved to a new data source. Format: - // `accounts/{account}/dataSources/{datasource}`. + // product will be moved to a new data source. + // + // Only API data sources are supported. + // + // Format: `accounts/{account}/dataSources/{datasource}`. + string data_source = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the UpdateProductInput method. +// The product (primary input) must exist for the update to succeed. +// If the update is for a primary product input, the existing primary product +// input must be from the same data source. +message UpdateProductInputRequest { + // Required. The product input resource to update. Information you submit will + // be applied to the processed product as well. + ProductInput product_input = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of product attributes to be updated. + // + // If the update mask is omitted, then it is treated as implied field mask + // equivalent to all fields that are populated (have a non-empty value). + // + // Attributes specified in the update mask without a value specified in the + // body will be deleted from the product. + // + // Update mask can only be specified for top level fields in + // attributes and custom attributes. + // + // To specify the update mask for custom attributes you need to add the + // `custom_attribute.` prefix. + // + // Providing special "*" value for full product replacement is not supported. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The primary or supplemental product data source where + // `data_source` name identifies the product input to be updated. + // + // Only API data sources are supported. + // + // Format: `accounts/{account}/dataSources/{datasource}`. string data_source = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/products_common.proto b/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/products_common.proto index 39035a6c4ba..abe90f17143 100644 --- a/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/products_common.proto +++ b/packages/google-shopping-merchant-products/protos/google/shopping/merchant/products/v1beta/products_common.proto @@ -383,6 +383,9 @@ message Attributes { // ensuring that discounts on merchants' offers do not fall below this value, // thereby preserving the offer's value and profitability. google.shopping.type.Price auto_pricing_min_price = 124; + + // The list of sustainability incentive programs. + repeated ProductSustainabilityIncentive sustainability_incentives = 138; } // The Tax of the product. @@ -844,3 +847,36 @@ message CloudExportAdditionalProperties { // string size is 256B. optional string unit_code = 8; } + +// Information regarding sustainability-related incentive programs such as +// rebates or tax relief. +message ProductSustainabilityIncentive { + // Types of supported sustainability incentive programs. + enum Type { + // Unspecified or unknown sustainability incentive type. + TYPE_UNSPECIFIED = 0; + + // Program offering tax liability reductions for electric vehicles and, in + // some countries, plug-in hybrids. These reductions can be based on a + // specific amount or a percentage of the sale price. + EV_TAX_CREDIT = 1; + + // A subsidy program, often called an environmental bonus, provides a + // purchase grant for electric vehicles and, in some countries, plug-in + // hybrids. The grant amount may be a fixed sum or a percentage of the sale + // price. + EV_PRICE_DISCOUNT = 2; + } + + // Sustainability incentive value. + oneof value { + // The fixed amount of the incentive. + google.shopping.type.Price amount = 2; + + // The percentage of the sale price that the incentive is applied to. + double percentage = 3; + } + + // Sustainability incentive program. + optional Type type = 1; +} diff --git a/packages/google-shopping-merchant-products/protos/protos.d.ts b/packages/google-shopping-merchant-products/protos/protos.d.ts index 79f47e7b45b..0e297410315 100644 --- a/packages/google-shopping-merchant-products/protos/protos.d.ts +++ b/packages/google-shopping-merchant-products/protos/protos.d.ts @@ -63,6 +63,20 @@ export namespace google { */ public insertProductInput(request: google.shopping.merchant.products.v1beta.IInsertProductInputRequest): Promise; + /** + * Calls UpdateProductInput. + * @param request UpdateProductInputRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProductInput + */ + public updateProductInput(request: google.shopping.merchant.products.v1beta.IUpdateProductInputRequest, callback: google.shopping.merchant.products.v1beta.ProductInputsService.UpdateProductInputCallback): void; + + /** + * Calls UpdateProductInput. + * @param request UpdateProductInputRequest message or plain object + * @returns Promise + */ + public updateProductInput(request: google.shopping.merchant.products.v1beta.IUpdateProductInputRequest): Promise; + /** * Calls DeleteProductInput. * @param request DeleteProductInputRequest message or plain object @@ -87,6 +101,13 @@ export namespace google { */ type InsertProductInputCallback = (error: (Error|null), response?: google.shopping.merchant.products.v1beta.ProductInput) => void; + /** + * Callback as used by {@link google.shopping.merchant.products.v1beta.ProductInputsService|updateProductInput}. + * @param error Error, if any + * @param [response] ProductInput + */ + type UpdateProductInputCallback = (error: (Error|null), response?: google.shopping.merchant.products.v1beta.ProductInput) => void; + /** * Callback as used by {@link google.shopping.merchant.products.v1beta.ProductInputsService|deleteProductInput}. * @param error Error, if any @@ -352,6 +373,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UpdateProductInputRequest. */ + interface IUpdateProductInputRequest { + + /** UpdateProductInputRequest productInput */ + productInput?: (google.shopping.merchant.products.v1beta.IProductInput|null); + + /** UpdateProductInputRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateProductInputRequest dataSource */ + dataSource?: (string|null); + } + + /** Represents an UpdateProductInputRequest. */ + class UpdateProductInputRequest implements IUpdateProductInputRequest { + + /** + * Constructs a new UpdateProductInputRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.products.v1beta.IUpdateProductInputRequest); + + /** UpdateProductInputRequest productInput. */ + public productInput?: (google.shopping.merchant.products.v1beta.IProductInput|null); + + /** UpdateProductInputRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateProductInputRequest dataSource. */ + public dataSource: string; + + /** + * Creates a new UpdateProductInputRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateProductInputRequest instance + */ + public static create(properties?: google.shopping.merchant.products.v1beta.IUpdateProductInputRequest): google.shopping.merchant.products.v1beta.UpdateProductInputRequest; + + /** + * Encodes the specified UpdateProductInputRequest message. Does not implicitly {@link google.shopping.merchant.products.v1beta.UpdateProductInputRequest.verify|verify} messages. + * @param message UpdateProductInputRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.products.v1beta.IUpdateProductInputRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateProductInputRequest message, length delimited. Does not implicitly {@link google.shopping.merchant.products.v1beta.UpdateProductInputRequest.verify|verify} messages. + * @param message UpdateProductInputRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.products.v1beta.IUpdateProductInputRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateProductInputRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateProductInputRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.products.v1beta.UpdateProductInputRequest; + + /** + * Decodes an UpdateProductInputRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateProductInputRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.products.v1beta.UpdateProductInputRequest; + + /** + * Verifies an UpdateProductInputRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateProductInputRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateProductInputRequest + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.products.v1beta.UpdateProductInputRequest; + + /** + * Creates a plain object from an UpdateProductInputRequest message. Also converts values to other types if specified. + * @param message UpdateProductInputRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.products.v1beta.UpdateProductInputRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateProductInputRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateProductInputRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a DeleteProductInputRequest. */ interface IDeleteProductInputRequest { @@ -740,6 +870,9 @@ export namespace google { /** Attributes autoPricingMinPrice */ autoPricingMinPrice?: (google.shopping.type.IPrice|null); + + /** Attributes sustainabilityIncentives */ + sustainabilityIncentives?: (google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive[]|null); } /** Represents an Attributes. */ @@ -1027,6 +1160,9 @@ export namespace google { /** Attributes autoPricingMinPrice. */ public autoPricingMinPrice?: (google.shopping.type.IPrice|null); + /** Attributes sustainabilityIncentives. */ + public sustainabilityIncentives: google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive[]; + /** Attributes _identifierExists. */ public _identifierExists?: "identifierExists"; @@ -3780,6 +3916,131 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ProductSustainabilityIncentive. */ + interface IProductSustainabilityIncentive { + + /** ProductSustainabilityIncentive amount */ + amount?: (google.shopping.type.IPrice|null); + + /** ProductSustainabilityIncentive percentage */ + percentage?: (number|null); + + /** ProductSustainabilityIncentive type */ + type?: (google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type|keyof typeof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type|null); + } + + /** Represents a ProductSustainabilityIncentive. */ + class ProductSustainabilityIncentive implements IProductSustainabilityIncentive { + + /** + * Constructs a new ProductSustainabilityIncentive. + * @param [properties] Properties to set + */ + constructor(properties?: google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive); + + /** ProductSustainabilityIncentive amount. */ + public amount?: (google.shopping.type.IPrice|null); + + /** ProductSustainabilityIncentive percentage. */ + public percentage?: (number|null); + + /** ProductSustainabilityIncentive type. */ + public type?: (google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type|keyof typeof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type|null); + + /** ProductSustainabilityIncentive value. */ + public value?: ("amount"|"percentage"); + + /** ProductSustainabilityIncentive _type. */ + public _type?: "type"; + + /** + * Creates a new ProductSustainabilityIncentive instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductSustainabilityIncentive instance + */ + public static create(properties?: google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive): google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive; + + /** + * Encodes the specified ProductSustainabilityIncentive message. Does not implicitly {@link google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.verify|verify} messages. + * @param message ProductSustainabilityIncentive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductSustainabilityIncentive message, length delimited. Does not implicitly {@link google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.verify|verify} messages. + * @param message ProductSustainabilityIncentive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductSustainabilityIncentive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductSustainabilityIncentive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive; + + /** + * Decodes a ProductSustainabilityIncentive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductSustainabilityIncentive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive; + + /** + * Verifies a ProductSustainabilityIncentive message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProductSustainabilityIncentive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductSustainabilityIncentive + */ + public static fromObject(object: { [k: string]: any }): google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive; + + /** + * Creates a plain object from a ProductSustainabilityIncentive message. Also converts values to other types if specified. + * @param message ProductSustainabilityIncentive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductSustainabilityIncentive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProductSustainabilityIncentive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProductSustainabilityIncentive { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + EV_TAX_CREDIT = 1, + EV_PRICE_DISCOUNT = 2 + } + } + /** Represents a ProductsService */ class ProductsService extends $protobuf.rpc.Service { @@ -11391,6 +11652,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Timestamp. */ interface ITimestamp { diff --git a/packages/google-shopping-merchant-products/protos/protos.js b/packages/google-shopping-merchant-products/protos/protos.js index 1d09e02fb7a..1bc13cecb9b 100644 --- a/packages/google-shopping-merchant-products/protos/protos.js +++ b/packages/google-shopping-merchant-products/protos/protos.js @@ -140,6 +140,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.shopping.merchant.products.v1beta.ProductInputsService|updateProductInput}. + * @memberof google.shopping.merchant.products.v1beta.ProductInputsService + * @typedef UpdateProductInputCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.shopping.merchant.products.v1beta.ProductInput} [response] ProductInput + */ + + /** + * Calls UpdateProductInput. + * @function updateProductInput + * @memberof google.shopping.merchant.products.v1beta.ProductInputsService + * @instance + * @param {google.shopping.merchant.products.v1beta.IUpdateProductInputRequest} request UpdateProductInputRequest message or plain object + * @param {google.shopping.merchant.products.v1beta.ProductInputsService.UpdateProductInputCallback} callback Node-style callback called with the error, if any, and ProductInput + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ProductInputsService.prototype.updateProductInput = function updateProductInput(request, callback) { + return this.rpcCall(updateProductInput, $root.google.shopping.merchant.products.v1beta.UpdateProductInputRequest, $root.google.shopping.merchant.products.v1beta.ProductInput, request, callback); + }, "name", { value: "UpdateProductInput" }); + + /** + * Calls UpdateProductInput. + * @function updateProductInput + * @memberof google.shopping.merchant.products.v1beta.ProductInputsService + * @instance + * @param {google.shopping.merchant.products.v1beta.IUpdateProductInputRequest} request UpdateProductInputRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.shopping.merchant.products.v1beta.ProductInputsService|deleteProductInput}. * @memberof google.shopping.merchant.products.v1beta.ProductInputsService @@ -899,6 +932,266 @@ return InsertProductInputRequest; })(); + v1beta.UpdateProductInputRequest = (function() { + + /** + * Properties of an UpdateProductInputRequest. + * @memberof google.shopping.merchant.products.v1beta + * @interface IUpdateProductInputRequest + * @property {google.shopping.merchant.products.v1beta.IProductInput|null} [productInput] UpdateProductInputRequest productInput + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProductInputRequest updateMask + * @property {string|null} [dataSource] UpdateProductInputRequest dataSource + */ + + /** + * Constructs a new UpdateProductInputRequest. + * @memberof google.shopping.merchant.products.v1beta + * @classdesc Represents an UpdateProductInputRequest. + * @implements IUpdateProductInputRequest + * @constructor + * @param {google.shopping.merchant.products.v1beta.IUpdateProductInputRequest=} [properties] Properties to set + */ + function UpdateProductInputRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateProductInputRequest productInput. + * @member {google.shopping.merchant.products.v1beta.IProductInput|null|undefined} productInput + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @instance + */ + UpdateProductInputRequest.prototype.productInput = null; + + /** + * UpdateProductInputRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @instance + */ + UpdateProductInputRequest.prototype.updateMask = null; + + /** + * UpdateProductInputRequest dataSource. + * @member {string} dataSource + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @instance + */ + UpdateProductInputRequest.prototype.dataSource = ""; + + /** + * Creates a new UpdateProductInputRequest instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {google.shopping.merchant.products.v1beta.IUpdateProductInputRequest=} [properties] Properties to set + * @returns {google.shopping.merchant.products.v1beta.UpdateProductInputRequest} UpdateProductInputRequest instance + */ + UpdateProductInputRequest.create = function create(properties) { + return new UpdateProductInputRequest(properties); + }; + + /** + * Encodes the specified UpdateProductInputRequest message. Does not implicitly {@link google.shopping.merchant.products.v1beta.UpdateProductInputRequest.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {google.shopping.merchant.products.v1beta.IUpdateProductInputRequest} message UpdateProductInputRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProductInputRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productInput != null && Object.hasOwnProperty.call(message, "productInput")) + $root.google.shopping.merchant.products.v1beta.ProductInput.encode(message.productInput, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataSource); + return writer; + }; + + /** + * Encodes the specified UpdateProductInputRequest message, length delimited. Does not implicitly {@link google.shopping.merchant.products.v1beta.UpdateProductInputRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {google.shopping.merchant.products.v1beta.IUpdateProductInputRequest} message UpdateProductInputRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateProductInputRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateProductInputRequest message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.products.v1beta.UpdateProductInputRequest} UpdateProductInputRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProductInputRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.products.v1beta.UpdateProductInputRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.productInput = $root.google.shopping.merchant.products.v1beta.ProductInput.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dataSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateProductInputRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.products.v1beta.UpdateProductInputRequest} UpdateProductInputRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateProductInputRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateProductInputRequest message. + * @function verify + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateProductInputRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productInput != null && message.hasOwnProperty("productInput")) { + var error = $root.google.shopping.merchant.products.v1beta.ProductInput.verify(message.productInput); + if (error) + return "productInput." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + return null; + }; + + /** + * Creates an UpdateProductInputRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.products.v1beta.UpdateProductInputRequest} UpdateProductInputRequest + */ + UpdateProductInputRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.products.v1beta.UpdateProductInputRequest) + return object; + var message = new $root.google.shopping.merchant.products.v1beta.UpdateProductInputRequest(); + if (object.productInput != null) { + if (typeof object.productInput !== "object") + throw TypeError(".google.shopping.merchant.products.v1beta.UpdateProductInputRequest.productInput: object expected"); + message.productInput = $root.google.shopping.merchant.products.v1beta.ProductInput.fromObject(object.productInput); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.shopping.merchant.products.v1beta.UpdateProductInputRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + return message; + }; + + /** + * Creates a plain object from an UpdateProductInputRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {google.shopping.merchant.products.v1beta.UpdateProductInputRequest} message UpdateProductInputRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateProductInputRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.productInput = null; + object.updateMask = null; + object.dataSource = ""; + } + if (message.productInput != null && message.hasOwnProperty("productInput")) + object.productInput = $root.google.shopping.merchant.products.v1beta.ProductInput.toObject(message.productInput, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + return object; + }; + + /** + * Converts this UpdateProductInputRequest to JSON. + * @function toJSON + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateProductInputRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateProductInputRequest + * @function getTypeUrl + * @memberof google.shopping.merchant.products.v1beta.UpdateProductInputRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateProductInputRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.products.v1beta.UpdateProductInputRequest"; + }; + + return UpdateProductInputRequest; + })(); + v1beta.DeleteProductInputRequest = (function() { /** @@ -1240,6 +1533,7 @@ * @property {google.shopping.merchant.products.v1beta.IProductStructuredTitle|null} [structuredTitle] Attributes structuredTitle * @property {google.shopping.merchant.products.v1beta.IProductStructuredDescription|null} [structuredDescription] Attributes structuredDescription * @property {google.shopping.type.IPrice|null} [autoPricingMinPrice] Attributes autoPricingMinPrice + * @property {Array.|null} [sustainabilityIncentives] Attributes sustainabilityIncentives */ /** @@ -1270,6 +1564,7 @@ this.lifestyleImageLinks = []; this.cloudExportAdditionalProperties = []; this.certifications = []; + this.sustainabilityIncentives = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2012,6 +2307,14 @@ */ Attributes.prototype.autoPricingMinPrice = null; + /** + * Attributes sustainabilityIncentives. + * @member {Array.} sustainabilityIncentives + * @memberof google.shopping.merchant.products.v1beta.Attributes + * @instance + */ + Attributes.prototype.sustainabilityIncentives = $util.emptyArray; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2814,6 +3117,9 @@ if (message.loyaltyPrograms != null && message.loyaltyPrograms.length) for (var i = 0; i < message.loyaltyPrograms.length; ++i) $root.google.shopping.merchant.products.v1beta.LoyaltyProgram.encode(message.loyaltyPrograms[i], writer.uint32(/* id 136, wireType 2 =*/1090).fork()).ldelim(); + if (message.sustainabilityIncentives != null && message.sustainabilityIncentives.length) + for (var i = 0; i < message.sustainabilityIncentives.length; ++i) + $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.encode(message.sustainabilityIncentives[i], writer.uint32(/* id 138, wireType 2 =*/1106).fork()).ldelim(); return writer; }; @@ -3254,6 +3560,12 @@ message.autoPricingMinPrice = $root.google.shopping.type.Price.decode(reader, reader.uint32()); break; } + case 138: { + if (!(message.sustainabilityIncentives && message.sustainabilityIncentives.length)) + message.sustainabilityIncentives = []; + message.sustainabilityIncentives.push($root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -3808,6 +4120,15 @@ if (error) return "autoPricingMinPrice." + error; } + if (message.sustainabilityIncentives != null && message.hasOwnProperty("sustainabilityIncentives")) { + if (!Array.isArray(message.sustainabilityIncentives)) + return "sustainabilityIncentives: array expected"; + for (var i = 0; i < message.sustainabilityIncentives.length; ++i) { + var error = $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.verify(message.sustainabilityIncentives[i]); + if (error) + return "sustainabilityIncentives." + error; + } + } return null; }; @@ -4220,6 +4541,16 @@ throw TypeError(".google.shopping.merchant.products.v1beta.Attributes.autoPricingMinPrice: object expected"); message.autoPricingMinPrice = $root.google.shopping.type.Price.fromObject(object.autoPricingMinPrice); } + if (object.sustainabilityIncentives) { + if (!Array.isArray(object.sustainabilityIncentives)) + throw TypeError(".google.shopping.merchant.products.v1beta.Attributes.sustainabilityIncentives: array expected"); + message.sustainabilityIncentives = []; + for (var i = 0; i < object.sustainabilityIncentives.length; ++i) { + if (typeof object.sustainabilityIncentives[i] !== "object") + throw TypeError(".google.shopping.merchant.products.v1beta.Attributes.sustainabilityIncentives: object expected"); + message.sustainabilityIncentives[i] = $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.fromObject(object.sustainabilityIncentives[i]); + } + } return message; }; @@ -4256,6 +4587,7 @@ object.certifications = []; object.freeShippingThreshold = []; object.loyaltyPrograms = []; + object.sustainabilityIncentives = []; } if (options.defaults) { object.expirationDate = null; @@ -4689,6 +5021,11 @@ for (var j = 0; j < message.loyaltyPrograms.length; ++j) object.loyaltyPrograms[j] = $root.google.shopping.merchant.products.v1beta.LoyaltyProgram.toObject(message.loyaltyPrograms[j], options); } + if (message.sustainabilityIncentives && message.sustainabilityIncentives.length) { + object.sustainabilityIncentives = []; + for (var j = 0; j < message.sustainabilityIncentives.length; ++j) + object.sustainabilityIncentives[j] = $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.toObject(message.sustainabilityIncentives[j], options); + } return object; }; @@ -11391,149 +11728,483 @@ }; /** - * Creates a CloudExportAdditionalProperties message from a plain object. Also converts values to their respective internal types. + * Creates a CloudExportAdditionalProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @static + * @param {Object.} object Plain object + * @returns {google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties} CloudExportAdditionalProperties + */ + CloudExportAdditionalProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties) + return object; + var message = new $root.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties(); + if (object.propertyName != null) + message.propertyName = String(object.propertyName); + if (object.textValue) { + if (!Array.isArray(object.textValue)) + throw TypeError(".google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties.textValue: array expected"); + message.textValue = []; + for (var i = 0; i < object.textValue.length; ++i) + message.textValue[i] = String(object.textValue[i]); + } + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.intValue) { + if (!Array.isArray(object.intValue)) + throw TypeError(".google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties.intValue: array expected"); + message.intValue = []; + for (var i = 0; i < object.intValue.length; ++i) + if ($util.Long) + (message.intValue[i] = $util.Long.fromValue(object.intValue[i])).unsigned = false; + else if (typeof object.intValue[i] === "string") + message.intValue[i] = parseInt(object.intValue[i], 10); + else if (typeof object.intValue[i] === "number") + message.intValue[i] = object.intValue[i]; + else if (typeof object.intValue[i] === "object") + message.intValue[i] = new $util.LongBits(object.intValue[i].low >>> 0, object.intValue[i].high >>> 0).toNumber(); + } + if (object.floatValue) { + if (!Array.isArray(object.floatValue)) + throw TypeError(".google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties.floatValue: array expected"); + message.floatValue = []; + for (var i = 0; i < object.floatValue.length; ++i) + message.floatValue[i] = Number(object.floatValue[i]); + } + if (object.minValue != null) + message.minValue = Number(object.minValue); + if (object.maxValue != null) + message.maxValue = Number(object.maxValue); + if (object.unitCode != null) + message.unitCode = String(object.unitCode); + return message; + }; + + /** + * Creates a plain object from a CloudExportAdditionalProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @static + * @param {google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties} message CloudExportAdditionalProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudExportAdditionalProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.textValue = []; + object.intValue = []; + object.floatValue = []; + } + if (message.propertyName != null && message.hasOwnProperty("propertyName")) { + object.propertyName = message.propertyName; + if (options.oneofs) + object._propertyName = "propertyName"; + } + if (message.textValue && message.textValue.length) { + object.textValue = []; + for (var j = 0; j < message.textValue.length; ++j) + object.textValue[j] = message.textValue[j]; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object._boolValue = "boolValue"; + } + if (message.intValue && message.intValue.length) { + object.intValue = []; + for (var j = 0; j < message.intValue.length; ++j) + if (typeof message.intValue[j] === "number") + object.intValue[j] = options.longs === String ? String(message.intValue[j]) : message.intValue[j]; + else + object.intValue[j] = options.longs === String ? $util.Long.prototype.toString.call(message.intValue[j]) : options.longs === Number ? new $util.LongBits(message.intValue[j].low >>> 0, message.intValue[j].high >>> 0).toNumber() : message.intValue[j]; + } + if (message.floatValue && message.floatValue.length) { + object.floatValue = []; + for (var j = 0; j < message.floatValue.length; ++j) + object.floatValue[j] = options.json && !isFinite(message.floatValue[j]) ? String(message.floatValue[j]) : message.floatValue[j]; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) { + object.minValue = options.json && !isFinite(message.minValue) ? String(message.minValue) : message.minValue; + if (options.oneofs) + object._minValue = "minValue"; + } + if (message.maxValue != null && message.hasOwnProperty("maxValue")) { + object.maxValue = options.json && !isFinite(message.maxValue) ? String(message.maxValue) : message.maxValue; + if (options.oneofs) + object._maxValue = "maxValue"; + } + if (message.unitCode != null && message.hasOwnProperty("unitCode")) { + object.unitCode = message.unitCode; + if (options.oneofs) + object._unitCode = "unitCode"; + } + return object; + }; + + /** + * Converts this CloudExportAdditionalProperties to JSON. + * @function toJSON + * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @instance + * @returns {Object.} JSON object + */ + CloudExportAdditionalProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudExportAdditionalProperties + * @function getTypeUrl + * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudExportAdditionalProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties"; + }; + + return CloudExportAdditionalProperties; + })(); + + v1beta.ProductSustainabilityIncentive = (function() { + + /** + * Properties of a ProductSustainabilityIncentive. + * @memberof google.shopping.merchant.products.v1beta + * @interface IProductSustainabilityIncentive + * @property {google.shopping.type.IPrice|null} [amount] ProductSustainabilityIncentive amount + * @property {number|null} [percentage] ProductSustainabilityIncentive percentage + * @property {google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type|null} [type] ProductSustainabilityIncentive type + */ + + /** + * Constructs a new ProductSustainabilityIncentive. + * @memberof google.shopping.merchant.products.v1beta + * @classdesc Represents a ProductSustainabilityIncentive. + * @implements IProductSustainabilityIncentive + * @constructor + * @param {google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive=} [properties] Properties to set + */ + function ProductSustainabilityIncentive(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProductSustainabilityIncentive amount. + * @member {google.shopping.type.IPrice|null|undefined} amount + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @instance + */ + ProductSustainabilityIncentive.prototype.amount = null; + + /** + * ProductSustainabilityIncentive percentage. + * @member {number|null|undefined} percentage + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @instance + */ + ProductSustainabilityIncentive.prototype.percentage = null; + + /** + * ProductSustainabilityIncentive type. + * @member {google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type|null|undefined} type + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @instance + */ + ProductSustainabilityIncentive.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ProductSustainabilityIncentive value. + * @member {"amount"|"percentage"|undefined} value + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @instance + */ + Object.defineProperty(ProductSustainabilityIncentive.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["amount", "percentage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ProductSustainabilityIncentive _type. + * @member {"type"|undefined} _type + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @instance + */ + Object.defineProperty(ProductSustainabilityIncentive.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProductSustainabilityIncentive instance using the specified properties. + * @function create + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @static + * @param {google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive=} [properties] Properties to set + * @returns {google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive} ProductSustainabilityIncentive instance + */ + ProductSustainabilityIncentive.create = function create(properties) { + return new ProductSustainabilityIncentive(properties); + }; + + /** + * Encodes the specified ProductSustainabilityIncentive message. Does not implicitly {@link google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.verify|verify} messages. + * @function encode + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @static + * @param {google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive} message ProductSustainabilityIncentive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSustainabilityIncentive.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.google.shopping.type.Price.encode(message.amount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.percentage != null && Object.hasOwnProperty.call(message, "percentage")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.percentage); + return writer; + }; + + /** + * Encodes the specified ProductSustainabilityIncentive message, length delimited. Does not implicitly {@link google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.verify|verify} messages. + * @function encodeDelimited + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @static + * @param {google.shopping.merchant.products.v1beta.IProductSustainabilityIncentive} message ProductSustainabilityIncentive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSustainabilityIncentive.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductSustainabilityIncentive message from the specified reader or buffer. + * @function decode + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive} ProductSustainabilityIncentive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSustainabilityIncentive.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.amount = $root.google.shopping.type.Price.decode(reader, reader.uint32()); + break; + } + case 3: { + message.percentage = reader.double(); + break; + } + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductSustainabilityIncentive message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive} ProductSustainabilityIncentive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSustainabilityIncentive.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductSustainabilityIncentive message. + * @function verify + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductSustainabilityIncentive.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.amount != null && message.hasOwnProperty("amount")) { + properties.value = 1; + { + var error = $root.google.shopping.type.Price.verify(message.amount); + if (error) + return "amount." + error; + } + } + if (message.percentage != null && message.hasOwnProperty("percentage")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.percentage !== "number") + return "percentage: number expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a ProductSustainabilityIncentive message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive * @static * @param {Object.} object Plain object - * @returns {google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties} CloudExportAdditionalProperties + * @returns {google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive} ProductSustainabilityIncentive */ - CloudExportAdditionalProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties) + ProductSustainabilityIncentive.fromObject = function fromObject(object) { + if (object instanceof $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive) return object; - var message = new $root.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties(); - if (object.propertyName != null) - message.propertyName = String(object.propertyName); - if (object.textValue) { - if (!Array.isArray(object.textValue)) - throw TypeError(".google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties.textValue: array expected"); - message.textValue = []; - for (var i = 0; i < object.textValue.length; ++i) - message.textValue[i] = String(object.textValue[i]); - } - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.intValue) { - if (!Array.isArray(object.intValue)) - throw TypeError(".google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties.intValue: array expected"); - message.intValue = []; - for (var i = 0; i < object.intValue.length; ++i) - if ($util.Long) - (message.intValue[i] = $util.Long.fromValue(object.intValue[i])).unsigned = false; - else if (typeof object.intValue[i] === "string") - message.intValue[i] = parseInt(object.intValue[i], 10); - else if (typeof object.intValue[i] === "number") - message.intValue[i] = object.intValue[i]; - else if (typeof object.intValue[i] === "object") - message.intValue[i] = new $util.LongBits(object.intValue[i].low >>> 0, object.intValue[i].high >>> 0).toNumber(); + var message = new $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive(); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.amount: object expected"); + message.amount = $root.google.shopping.type.Price.fromObject(object.amount); } - if (object.floatValue) { - if (!Array.isArray(object.floatValue)) - throw TypeError(".google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties.floatValue: array expected"); - message.floatValue = []; - for (var i = 0; i < object.floatValue.length; ++i) - message.floatValue[i] = Number(object.floatValue[i]); + if (object.percentage != null) + message.percentage = Number(object.percentage); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "EV_TAX_CREDIT": + case 1: + message.type = 1; + break; + case "EV_PRICE_DISCOUNT": + case 2: + message.type = 2; + break; } - if (object.minValue != null) - message.minValue = Number(object.minValue); - if (object.maxValue != null) - message.maxValue = Number(object.maxValue); - if (object.unitCode != null) - message.unitCode = String(object.unitCode); return message; }; /** - * Creates a plain object from a CloudExportAdditionalProperties message. Also converts values to other types if specified. + * Creates a plain object from a ProductSustainabilityIncentive message. Also converts values to other types if specified. * @function toObject - * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive * @static - * @param {google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties} message CloudExportAdditionalProperties + * @param {google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive} message ProductSustainabilityIncentive * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudExportAdditionalProperties.toObject = function toObject(message, options) { + ProductSustainabilityIncentive.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.textValue = []; - object.intValue = []; - object.floatValue = []; - } - if (message.propertyName != null && message.hasOwnProperty("propertyName")) { - object.propertyName = message.propertyName; - if (options.oneofs) - object._propertyName = "propertyName"; - } - if (message.textValue && message.textValue.length) { - object.textValue = []; - for (var j = 0; j < message.textValue.length; ++j) - object.textValue[j] = message.textValue[j]; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object._boolValue = "boolValue"; - } - if (message.intValue && message.intValue.length) { - object.intValue = []; - for (var j = 0; j < message.intValue.length; ++j) - if (typeof message.intValue[j] === "number") - object.intValue[j] = options.longs === String ? String(message.intValue[j]) : message.intValue[j]; - else - object.intValue[j] = options.longs === String ? $util.Long.prototype.toString.call(message.intValue[j]) : options.longs === Number ? new $util.LongBits(message.intValue[j].low >>> 0, message.intValue[j].high >>> 0).toNumber() : message.intValue[j]; - } - if (message.floatValue && message.floatValue.length) { - object.floatValue = []; - for (var j = 0; j < message.floatValue.length; ++j) - object.floatValue[j] = options.json && !isFinite(message.floatValue[j]) ? String(message.floatValue[j]) : message.floatValue[j]; - } - if (message.minValue != null && message.hasOwnProperty("minValue")) { - object.minValue = options.json && !isFinite(message.minValue) ? String(message.minValue) : message.minValue; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type[message.type] === undefined ? message.type : $root.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type[message.type] : message.type; if (options.oneofs) - object._minValue = "minValue"; + object._type = "type"; } - if (message.maxValue != null && message.hasOwnProperty("maxValue")) { - object.maxValue = options.json && !isFinite(message.maxValue) ? String(message.maxValue) : message.maxValue; + if (message.amount != null && message.hasOwnProperty("amount")) { + object.amount = $root.google.shopping.type.Price.toObject(message.amount, options); if (options.oneofs) - object._maxValue = "maxValue"; + object.value = "amount"; } - if (message.unitCode != null && message.hasOwnProperty("unitCode")) { - object.unitCode = message.unitCode; + if (message.percentage != null && message.hasOwnProperty("percentage")) { + object.percentage = options.json && !isFinite(message.percentage) ? String(message.percentage) : message.percentage; if (options.oneofs) - object._unitCode = "unitCode"; + object.value = "percentage"; } return object; }; /** - * Converts this CloudExportAdditionalProperties to JSON. + * Converts this ProductSustainabilityIncentive to JSON. * @function toJSON - * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive * @instance * @returns {Object.} JSON object */ - CloudExportAdditionalProperties.prototype.toJSON = function toJSON() { + ProductSustainabilityIncentive.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudExportAdditionalProperties + * Gets the default type url for ProductSustainabilityIncentive * @function getTypeUrl - * @memberof google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties + * @memberof google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudExportAdditionalProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ProductSustainabilityIncentive.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties"; + return typeUrlPrefix + "/google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive"; }; - return CloudExportAdditionalProperties; + /** + * Type enum. + * @name google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} EV_TAX_CREDIT=1 EV_TAX_CREDIT value + * @property {number} EV_PRICE_DISCOUNT=2 EV_PRICE_DISCOUNT value + */ + ProductSustainabilityIncentive.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EV_TAX_CREDIT"] = 1; + values[valuesById[2] = "EV_PRICE_DISCOUNT"] = 2; + return values; + })(); + + return ProductSustainabilityIncentive; })(); v1beta.ProductsService = (function() { @@ -32360,6 +33031,225 @@ return Empty; })(); + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + protobuf.Timestamp = (function() { /** diff --git a/packages/google-shopping-merchant-products/protos/protos.json b/packages/google-shopping-merchant-products/protos/protos.json index daf67d69584..7c56f485b5c 100644 --- a/packages/google-shopping-merchant-products/protos/protos.json +++ b/packages/google-shopping-merchant-products/protos/protos.json @@ -40,6 +40,26 @@ } ] }, + "UpdateProductInput": { + "requestType": "UpdateProductInputRequest", + "responseType": "ProductInput", + "options": { + "(google.api.http).patch": "/products/v1beta/{product_input.name=accounts/*/productInputs/*}", + "(google.api.http).body": "product_input", + "(google.api.method_signature)": "product_input,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/products/v1beta/{product_input.name=accounts/*/productInputs/*}", + "body": "product_input" + } + }, + { + "(google.api.method_signature)": "product_input,update_mask" + } + ] + }, "DeleteProductInput": { "requestType": "DeleteProductInputRequest", "responseType": "google.protobuf.Empty", @@ -168,6 +188,31 @@ } } }, + "UpdateProductInputRequest": { + "fields": { + "productInput": { + "type": "ProductInput", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataSource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "DeleteProductInputRequest": { "fields": { "name": { @@ -1000,6 +1045,11 @@ "autoPricingMinPrice": { "type": "google.shopping.type.Price", "id": 124 + }, + "sustainabilityIncentives": { + "rule": "repeated", + "type": "ProductSustainabilityIncentive", + "id": 138 } } }, @@ -1700,6 +1750,47 @@ } } }, + "ProductSustainabilityIncentive": { + "oneofs": { + "value": { + "oneof": [ + "amount", + "percentage" + ] + }, + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "amount": { + "type": "google.shopping.type.Price", + "id": 2 + }, + "percentage": { + "type": "double", + "id": 3 + }, + "type": { + "type": "Type", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "EV_TAX_CREDIT": 1, + "EV_PRICE_DISCOUNT": 2 + } + } + } + }, "ProductsService": { "options": { "(google.api.default_host)": "merchantapi.googleapis.com", @@ -3825,6 +3916,15 @@ "Empty": { "fields": {} }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, "Timestamp": { "fields": { "seconds": { diff --git a/packages/google-shopping-merchant-products/samples/README.md b/packages/google-shopping-merchant-products/samples/README.md index d84528c3e3e..0389b8d0847 100644 --- a/packages/google-shopping-merchant-products/samples/README.md +++ b/packages/google-shopping-merchant-products/samples/README.md @@ -14,6 +14,7 @@ * [Samples](#samples) * [Product_inputs_service.delete_product_input](#product_inputs_service.delete_product_input) * [Product_inputs_service.insert_product_input](#product_inputs_service.insert_product_input) + * [Product_inputs_service.update_product_input](#product_inputs_service.update_product_input) * [Products_service.get_product](#products_service.get_product) * [Products_service.list_products](#products_service.list_products) * [Quickstart](#quickstart) @@ -67,6 +68,23 @@ __Usage:__ +### Product_inputs_service.update_product_input + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js,samples/README.md) + +__Usage:__ + + +`node packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js` + + +----- + + + + ### Products_service.get_product View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-products/samples/generated/v1beta/products_service.get_product.js). diff --git a/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.insert_product_input.js b/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.insert_product_input.js index 09ed5c7088c..9d1873e4790 100644 --- a/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.insert_product_input.js +++ b/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.insert_product_input.js @@ -40,8 +40,9 @@ function main(parent, productInput, dataSource) { /** * Required. The primary or supplemental product data source name. If the * product already exists and data source provided is different, then the - * product will be moved to a new data source. Format: - * `accounts/{account}/dataSources/{datasource}`. + * product will be moved to a new data source. + * Only API data sources are supported. + * Format: `accounts/{account}/dataSources/{datasource}`. */ // const dataSource = 'abc123' diff --git a/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js b/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js new file mode 100644 index 00000000000..a7759d50e97 --- /dev/null +++ b/packages/google-shopping-merchant-products/samples/generated/v1beta/product_inputs_service.update_product_input.js @@ -0,0 +1,83 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(productInput, dataSource) { + // [START merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_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. + */ + /** + * Required. The product input resource to update. Information you submit will + * be applied to the processed product as well. + */ + // const productInput = {} + /** + * Optional. The list of product attributes to be updated. + * If the update mask is omitted, then it is treated as implied field mask + * equivalent to all fields that are populated (have a non-empty value). + * Attributes specified in the update mask without a value specified in the + * body will be deleted from the product. + * Update mask can only be specified for top level fields in + * attributes and custom attributes. + * To specify the update mask for custom attributes you need to add the + * `custom_attribute.` prefix. + * Providing special "*" value for full product replacement is not supported. + */ + // const updateMask = {} + /** + * Required. The primary or supplemental product data source where + * `data_source` name identifies the product input to be updated. + * Only API data sources are supported. + * Format: `accounts/{account}/dataSources/{datasource}`. + */ + // const dataSource = 'abc123' + + // Imports the Products library + const {ProductInputsServiceClient} = require('@google-shopping/products').v1beta; + + // Instantiates a client + const productsClient = new ProductInputsServiceClient(); + + async function callUpdateProductInput() { + // Construct request + const request = { + productInput, + dataSource, + }; + + // Run request + const response = await productsClient.updateProductInput(request); + console.log(response); + } + + callUpdateProductInput(); + // [END merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json b/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json index 7827a865b44..351190f3737 100644 --- a/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json +++ b/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 68, "type": "FULL" } ], @@ -59,6 +59,54 @@ } } }, + { + "regionTag": "merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_async", + "title": "ProductInputsService updateProductInput Sample", + "origin": "API_DEFINITION", + "description": " Updates the existing product input in your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.", + "canonical": true, + "file": "product_inputs_service.update_product_input.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProductInput", + "fullName": "google.shopping.merchant.products.v1beta.ProductInputsService.UpdateProductInput", + "async": true, + "parameters": [ + { + "name": "product_input", + "type": ".google.shopping.merchant.products.v1beta.ProductInput" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_source", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.shopping.merchant.products.v1beta.ProductInput", + "client": { + "shortName": "ProductInputsServiceClient", + "fullName": "google.shopping.merchant.products.v1beta.ProductInputsServiceClient" + }, + "method": { + "shortName": "UpdateProductInput", + "fullName": "google.shopping.merchant.products.v1beta.ProductInputsService.UpdateProductInput", + "service": { + "shortName": "ProductInputsService", + "fullName": "google.shopping.merchant.products.v1beta.ProductInputsService" + } + } + } + }, { "regionTag": "merchantapi_v1beta_generated_ProductInputsService_DeleteProductInput_async", "title": "ProductInputsService deleteProductInput Sample", diff --git a/packages/google-shopping-merchant-products/src/v1beta/gapic_metadata.json b/packages/google-shopping-merchant-products/src/v1beta/gapic_metadata.json index f3012a0e504..4a1692036bb 100644 --- a/packages/google-shopping-merchant-products/src/v1beta/gapic_metadata.json +++ b/packages/google-shopping-merchant-products/src/v1beta/gapic_metadata.json @@ -15,6 +15,11 @@ "insertProductInput" ] }, + "UpdateProductInput": { + "methods": [ + "updateProductInput" + ] + }, "DeleteProductInput": { "methods": [ "deleteProductInput" @@ -30,6 +35,11 @@ "insertProductInput" ] }, + "UpdateProductInput": { + "methods": [ + "updateProductInput" + ] + }, "DeleteProductInput": { "methods": [ "deleteProductInput" diff --git a/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts b/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts index 38569786493..a3b326b4a41 100644 --- a/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts +++ b/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts @@ -264,6 +264,7 @@ export class ProductInputsServiceClient { // and create an API call method for each. const productInputsServiceStubMethods = [ 'insertProductInput', + 'updateProductInput', 'deleteProductInput', ]; for (const methodName of productInputsServiceStubMethods) { @@ -397,8 +398,11 @@ export class ProductInputsServiceClient { * @param {string} request.dataSource * Required. The primary or supplemental product data source name. If the * product already exists and data source provided is different, then the - * product will be moved to a new data source. Format: - * `accounts/{account}/dataSources/{datasource}`. + * product will be moved to a new data source. + * + * Only API data sources are supported. + * + * Format: `accounts/{account}/dataSources/{datasource}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -517,6 +521,158 @@ export class ProductInputsServiceClient { } ); } + /** + * Updates the existing product input in your Merchant Center account. + * + * After inserting, updating, or deleting a product input, it may take several + * minutes before the processed product can be retrieved. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.shopping.merchant.products.v1beta.ProductInput} request.productInput + * Required. The product input resource to update. Information you submit will + * be applied to the processed product as well. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of product attributes to be updated. + * + * If the update mask is omitted, then it is treated as implied field mask + * equivalent to all fields that are populated (have a non-empty value). + * + * Attributes specified in the update mask without a value specified in the + * body will be deleted from the product. + * + * Update mask can only be specified for top level fields in + * attributes and custom attributes. + * + * To specify the update mask for custom attributes you need to add the + * `custom_attribute.` prefix. + * + * Providing special "*" value for full product replacement is not supported. + * @param {string} request.dataSource + * Required. The primary or supplemental product data source where + * `data_source` name identifies the product input to be updated. + * + * Only API data sources are supported. + * + * Format: `accounts/{account}/dataSources/{datasource}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.shopping.merchant.products.v1beta.ProductInput|ProductInput}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/product_inputs_service.update_product_input.js + * region_tag:merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_async + */ + updateProductInput( + request?: protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest, + options?: CallOptions + ): Promise< + [ + protos.google.shopping.merchant.products.v1beta.IProductInput, + ( + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | undefined + ), + {} | undefined, + ] + >; + updateProductInput( + request: protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest, + options: CallOptions, + callback: Callback< + protos.google.shopping.merchant.products.v1beta.IProductInput, + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProductInput( + request: protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest, + callback: Callback< + protos.google.shopping.merchant.products.v1beta.IProductInput, + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProductInput( + request?: protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.shopping.merchant.products.v1beta.IProductInput, + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.shopping.merchant.products.v1beta.IProductInput, + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.shopping.merchant.products.v1beta.IProductInput, + ( + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'product_input.name': request.productInput!.name ?? '', + }); + this.initialize(); + this._log.info('updateProductInput request %j', request); + const wrappedCallback: + | Callback< + protos.google.shopping.merchant.products.v1beta.IProductInput, + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateProductInput response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateProductInput(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.shopping.merchant.products.v1beta.IProductInput, + ( + | protos.google.shopping.merchant.products.v1beta.IUpdateProductInputRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('updateProductInput response %j', response); + return [response, options, rawResponse]; + } + ); + } /** * Deletes a product input from your Merchant Center account. * diff --git a/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client_config.json b/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client_config.json index aa2d1f3d89f..b1c87f3ff6f 100644 --- a/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client_config.json +++ b/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client_config.json @@ -37,6 +37,11 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "UpdateProductInput": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "DeleteProductInput": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts b/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts index 78cca695b77..730e1ff5f53 100644 --- a/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts +++ b/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts @@ -393,6 +393,145 @@ describe('v1beta.ProductInputsServiceClient', () => { }); }); + describe('updateProductInput', () => { + it('invokes updateProductInput without error', async () => { + const client = + new productinputsserviceModule.v1beta.ProductInputsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() + ); + request.productInput ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.products.v1beta.UpdateProductInputRequest', + ['productInput', 'name'] + ); + request.productInput.name = defaultValue1; + const expectedHeaderRequestParams = `product_input.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.shopping.merchant.products.v1beta.ProductInput() + ); + client.innerApiCalls.updateProductInput = + stubSimpleCall(expectedResponse); + const [response] = await client.updateProductInput(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateProductInput as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProductInput as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProductInput without error using callback', async () => { + const client = + new productinputsserviceModule.v1beta.ProductInputsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() + ); + request.productInput ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.products.v1beta.UpdateProductInputRequest', + ['productInput', 'name'] + ); + request.productInput.name = defaultValue1; + const expectedHeaderRequestParams = `product_input.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.shopping.merchant.products.v1beta.ProductInput() + ); + client.innerApiCalls.updateProductInput = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateProductInput( + request, + ( + err?: Error | null, + result?: protos.google.shopping.merchant.products.v1beta.IProductInput | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateProductInput as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProductInput as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProductInput with error', async () => { + const client = + new productinputsserviceModule.v1beta.ProductInputsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() + ); + request.productInput ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.products.v1beta.UpdateProductInputRequest', + ['productInput', 'name'] + ); + request.productInput.name = defaultValue1; + const expectedHeaderRequestParams = `product_input.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateProductInput = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateProductInput(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateProductInput as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProductInput as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProductInput with closed client', async () => { + const client = + new productinputsserviceModule.v1beta.ProductInputsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() + ); + request.productInput ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.shopping.merchant.products.v1beta.UpdateProductInputRequest', + ['productInput', 'name'] + ); + request.productInput.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProductInput(request), expectedError); + }); + }); + describe('deleteProductInput', () => { it('invokes deleteProductInput without error', async () => { const client = From c301d3bfb98a0d5910f46049e64387d7810ebdc3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:25:00 -0700 Subject: [PATCH 09/34] docs: [networkmanagement] Update comments for Connectivity Test (#6164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Update comments for Connectivity Test PiperOrigin-RevId: 737495961 Source-Link: https://github.com/googleapis/googleapis/commit/2852893d4b201896afb5ac4047205c9163f5c8fa Source-Link: https://github.com/googleapis/googleapis-gen/commit/3109e2063f5edf15bc4a6dd0ad31072c8a4a266d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmttYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiIzMTA5ZTIwNjNmNWVkZjE1YmM0YTZkZDBhZDMxMDcyYzhhNGEyNjZkIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1/connectivity_test.proto | 73 +++++++------------ .../v1beta1/connectivity_test.proto | 73 +++++++------------ 2 files changed, 52 insertions(+), 94 deletions(-) diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto index 5ae37b799d8..340930340ef 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto @@ -47,46 +47,22 @@ message ConnectivityTest { // Required. Source specification of the Connectivity Test. // - // You can use a combination of source IP address, virtual machine - // (VM) instance, or Compute Engine network to uniquely identify - // the source location. + // You can use a combination of source IP address, URI of a supported + // endpoint, project ID, or VPC network to identify the source location. // - // Examples: - // If the source IP address is an internal IP address within a Google Cloud - // Virtual Private Cloud (VPC) network, then you must also specify the VPC - // network. Otherwise, specify the VM instance, which already contains its - // internal IP address and VPC network information. - // - // If the source of the test is within an on-premises network, then you must - // provide the destination VPC network. - // - // If the source endpoint is a Compute Engine VM instance with multiple - // network interfaces, the instance itself is not sufficient to identify the - // endpoint. So, you must also specify the source IP address or VPC network. - // - // A reachability analysis proceeds even if the source location is - // ambiguous. However, the test result may include endpoints that you don't - // intend to test. + // Reachability analysis might proceed even if the source location is + // ambiguous. However, the test result might include endpoints or use a source + // that you don't intend to test. Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; // Required. Destination specification of the Connectivity Test. // - // You can use a combination of destination IP address, Compute Engine - // VM instance, or VPC network to uniquely identify the destination - // location. - // - // Even if the destination IP address is not unique, the source IP - // location is unique. Usually, the analysis can infer the destination - // endpoint from route information. - // - // If the destination you specify is a VM instance and the instance has - // multiple network interfaces, then you must also specify either - // a destination IP address or VPC network to identify the destination - // interface. + // You can use a combination of destination IP address, URI of a supported + // endpoint, project ID, or VPC network to identify the destination location. // - // A reachability analysis proceeds even if the destination location is - // ambiguous. However, the result can include endpoints that you don't - // intend to test. + // Reachability analysis proceeds even if the destination location is + // ambiguous. However, the test result might include endpoints or use a + // destination that you don't intend to test. Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; // IP Protocol of the test. When not provided, "TCP" is assumed. @@ -134,8 +110,7 @@ message ConnectivityTest { ReachabilityDetails return_reachability_details = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the test should skip firewall checking. - // If not provided, we assume false. + // Whether the analysis should skip firewall checking. Default value is false. bool bypass_firewall_checks = 17; } @@ -153,8 +128,8 @@ message Endpoint { GCP_NETWORK = 1; // A network hosted outside of Google Cloud. - // This can be an on-premises network, or a network hosted by another cloud - // provider. + // This can be an on-premises network, an internet resource or a network + // hosted by another cloud provider. NON_GCP_NETWORK = 2; } @@ -213,7 +188,8 @@ message Endpoint { // A forwarding rule and its corresponding IP address represent the frontend // configuration of a Google Cloud load balancer. Forwarding rules are also // used for protocol forwarding, Private Service Connect and other network - // services to provide forwarding information in the control plane. Format: + // services to provide forwarding information in the control plane. Applicable + // only to destination endpoint. Format: // projects/{project}/global/forwardingRules/{id} or // projects/{project}/regions/{region}/forwardingRules/{id} string forwarding_rule = 13; @@ -244,26 +220,29 @@ message Endpoint { // A [Cloud SQL](https://cloud.google.com/sql) instance URI. string cloud_sql_instance = 8; - // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - // URI. + // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) URI. + // Applicable only to destination endpoint. string redis_instance = 17; - // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - // URI. + // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) URI. + // Applicable only to destination endpoint. string redis_cluster = 18; - // A [Cloud Function](https://cloud.google.com/functions). + // A [Cloud Function](https://cloud.google.com/functions). Applicable only to + // source endpoint. CloudFunctionEndpoint cloud_function = 10; // An [App Engine](https://cloud.google.com/appengine) [service // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + // Applicable only to source endpoint. AppEngineVersionEndpoint app_engine_version = 11; // A [Cloud Run](https://cloud.google.com/run) // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + // Applicable only to source endpoint. CloudRunRevisionEndpoint cloud_run_revision = 12; - // A Compute Engine network URI. + // A VPC network URI. string network = 4; // Type of the network where the endpoint is located. @@ -272,9 +251,9 @@ message Endpoint { NetworkType network_type = 5; // Project ID where the endpoint is located. - // The Project ID can be derived from the URI if you provide a VM instance or + // The project ID can be derived from the URI if you provide a endpoint or // network URI. - // The following are two cases where you must provide the project ID: + // The following are two cases where you may need to provide the project ID: // 1. Only the IP address is specified, and the IP address is within a Google // Cloud project. // 2. When you are using Shared VPC and the IP address that you provide is diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto index cf5f935b5c5..56025648dd0 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -47,46 +47,22 @@ message ConnectivityTest { // Required. Source specification of the Connectivity Test. // - // You can use a combination of source IP address, virtual machine - // (VM) instance, or Compute Engine network to uniquely identify - // the source location. + // You can use a combination of source IP address, URI of a supported + // endpoint, project ID, or VPC network to identify the source location. // - // Examples: - // If the source IP address is an internal IP address within a Google Cloud - // Virtual Private Cloud (VPC) network, then you must also specify the VPC - // network. Otherwise, specify the VM instance, which already contains its - // internal IP address and VPC network information. - // - // If the source of the test is within an on-premises network, then you must - // provide the destination VPC network. - // - // If the source endpoint is a Compute Engine VM instance with multiple - // network interfaces, the instance itself is not sufficient to identify the - // endpoint. So, you must also specify the source IP address or VPC network. - // - // A reachability analysis proceeds even if the source location is - // ambiguous. However, the test result may include endpoints that you don't - // intend to test. + // Reachability analysis might proceed even if the source location is + // ambiguous. However, the test result might include endpoints or use a source + // that you don't intend to test. Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; // Required. Destination specification of the Connectivity Test. // - // You can use a combination of destination IP address, Compute Engine - // VM instance, or VPC network to uniquely identify the destination - // location. - // - // Even if the destination IP address is not unique, the source IP - // location is unique. Usually, the analysis can infer the destination - // endpoint from route information. - // - // If the destination you specify is a VM instance and the instance has - // multiple network interfaces, then you must also specify either - // a destination IP address or VPC network to identify the destination - // interface. + // You can use a combination of destination IP address, URI of a supported + // endpoint, project ID, or VPC network to identify the destination location. // - // A reachability analysis proceeds even if the destination location is - // ambiguous. However, the result can include endpoints that you don't - // intend to test. + // Reachability analysis proceeds even if the destination location is + // ambiguous. However, the test result might include endpoints or use a + // destination that you don't intend to test. Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; // IP Protocol of the test. When not provided, "TCP" is assumed. @@ -134,8 +110,7 @@ message ConnectivityTest { ReachabilityDetails return_reachability_details = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether the test should skip firewall checking. - // If not provided, we assume false. + // Whether the analysis should skip firewall checking. Default value is false. bool bypass_firewall_checks = 17; } @@ -153,8 +128,8 @@ message Endpoint { GCP_NETWORK = 1; // A network hosted outside of Google Cloud. - // This can be an on-premises network, or a network hosted by another cloud - // provider. + // This can be an on-premises network, an internet resource or a network + // hosted by another cloud provider. NON_GCP_NETWORK = 2; } @@ -213,7 +188,8 @@ message Endpoint { // A forwarding rule and its corresponding IP address represent the frontend // configuration of a Google Cloud load balancer. Forwarding rules are also // used for protocol forwarding, Private Service Connect and other network - // services to provide forwarding information in the control plane. Format: + // services to provide forwarding information in the control plane. Applicable + // only to destination endpoint. Format: // projects/{project}/global/forwardingRules/{id} or // projects/{project}/regions/{region}/forwardingRules/{id} string forwarding_rule = 13; @@ -244,26 +220,29 @@ message Endpoint { // A [Cloud SQL](https://cloud.google.com/sql) instance URI. string cloud_sql_instance = 8; - // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - // URI. + // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) URI. + // Applicable only to destination endpoint. string redis_instance = 17; - // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - // URI. + // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) URI. + // Applicable only to destination endpoint. string redis_cluster = 18; - // A [Cloud Function](https://cloud.google.com/functions). + // A [Cloud Function](https://cloud.google.com/functions). Applicable only to + // source endpoint. CloudFunctionEndpoint cloud_function = 10; // An [App Engine](https://cloud.google.com/appengine) [service // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + // Applicable only to source endpoint. AppEngineVersionEndpoint app_engine_version = 11; // A [Cloud Run](https://cloud.google.com/run) // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + // Applicable only to source endpoint. CloudRunRevisionEndpoint cloud_run_revision = 12; - // A Compute Engine network URI. + // A VPC network URI. string network = 4; // Type of the network where the endpoint is located. @@ -272,9 +251,9 @@ message Endpoint { NetworkType network_type = 5; // Project ID where the endpoint is located. - // The Project ID can be derived from the URI if you provide a VM instance or + // The project ID can be derived from the URI if you provide a endpoint or // network URI. - // The following are two cases where you must provide the project ID: + // The following are two cases where you may need to provide the project ID: // 1. Only the IP address is specified, and the IP address is within a Google // Cloud project. // 2. When you are using Shared VPC and the IP address that you provide is From 9930467ade72fb91b7933b8fb343131009e40d84 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:25:15 -0700 Subject: [PATCH 10/34] feat: [workflows] add ListWorkflowRevisions method (#6165) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add ListWorkflowRevisions method feat: add ExecutionHistoryLevel to Workflow feat: add crypto key config to Workflow feat: add tags to Workflow feat: add ExecutionHistoryLevel enum docs: update Workflow some standard field docs PiperOrigin-RevId: 737698339 Source-Link: https://github.com/googleapis/googleapis/commit/d7db9c6f0c5a52efda18e8cc3e3e8e6a67ee3b5c Source-Link: https://github.com/googleapis/googleapis-gen/commit/f859edb82325700e35a80ae81ea5bd21d9e32c6e Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy1leGVjdXRpb25zLy5Pd2xCb3QueWFtbCIsImgiOiJmODU5ZWRiODIzMjU3MDBlMzVhODBhZTgxZWE1YmQyMWQ5ZTMyYzZlIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../README.md | 1 + .../google/cloud/workflows/v1/workflows.proto | 123 ++- .../protos/protos.d.ts | 270 +++++++ .../protos/protos.js | 754 ++++++++++++++++++ .../protos/protos.json | 99 ++- .../samples/README.md | 18 + ...et_metadata_google.cloud.workflows.v1.json | 50 +- .../v1/workflows.list_workflow_revisions.js | 75 ++ .../generated/v1/workflows.list_workflows.js | 6 + .../src/v1/gapic_metadata.json | 14 + .../src/v1/workflows_client.ts | 356 +++++++++ .../src/v1/workflows_client_config.json | 4 + .../test/gapic_workflows_v1.ts | 417 ++++++++++ 13 files changed, 2180 insertions(+), 7 deletions(-) create mode 100644 packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js diff --git a/packages/google-cloud-workflows-executions/README.md b/packages/google-cloud-workflows-executions/README.md index 5dcc687dc97..699d603b124 100644 --- a/packages/google-cloud-workflows-executions/README.md +++ b/packages/google-cloud-workflows-executions/README.md @@ -69,6 +69,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Workflows.create_workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.create_workflow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1/workflows.create_workflow.js,packages/google-cloud-workflows-executions/samples/README.md) | | Workflows.delete_workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.delete_workflow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1/workflows.delete_workflow.js,packages/google-cloud-workflows-executions/samples/README.md) | | Workflows.get_workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.get_workflow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1/workflows.get_workflow.js,packages/google-cloud-workflows-executions/samples/README.md) | +| Workflows.list_workflow_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js,packages/google-cloud-workflows-executions/samples/README.md) | | Workflows.list_workflows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflows.js,packages/google-cloud-workflows-executions/samples/README.md) | | Workflows.update_workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.update_workflow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1/workflows.update_workflow.js,packages/google-cloud-workflows-executions/samples/README.md) | | Executions.cancel_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1beta/executions.cancel_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1beta/executions.cancel_execution.js,packages/google-cloud-workflows-executions/samples/README.md) | diff --git a/packages/google-cloud-workflows-executions/protos/google/cloud/workflows/v1/workflows.proto b/packages/google-cloud-workflows-executions/protos/google/cloud/workflows/v1/workflows.proto index 66e0285ecf0..1a4641163a7 100644 --- a/packages/google-cloud-workflows-executions/protos/google/cloud/workflows/v1/workflows.proto +++ b/packages/google-cloud-workflows-executions/protos/google/cloud/workflows/v1/workflows.proto @@ -33,6 +33,10 @@ option (google.api.resource_definition) = { type: "cloudkms.googleapis.com/CryptoKey" pattern: "projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}" }; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}" +}; // Workflows is used to deploy and execute workflow programs. // Workflows makes sure the program executes reliably, despite hardware and @@ -107,6 +111,14 @@ service Workflows { metadata_type: "OperationMetadata" }; } + + // Lists revisions for a given workflow. + rpc ListWorkflowRevisions(ListWorkflowRevisionsRequest) + returns (ListWorkflowRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/workflows/*}:listRevisions" + }; + } } // Workflow program to be executed by Workflows. @@ -164,11 +176,13 @@ message Workflow { } // The resource name of the workflow. - // Format: projects/{project}/locations/{location}/workflows/{workflow} + // Format: projects/{project}/locations/{location}/workflows/{workflow}. + // This is a workflow-wide field and is not tied to a specific revision. string name = 1; // Description of the workflow provided by the user. - // Must be at most 1000 unicode characters long. + // Must be at most 1000 Unicode characters long. + // This is a workflow-wide field and is not tied to a specific revision. string description = 2; // Output only. State of the workflow deployment. @@ -188,10 +202,12 @@ message Workflow { string revision_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The timestamp for when the workflow was created. + // This is a workflow-wide field and is not tied to a specific revision. google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The timestamp for when the workflow was last updated. + // This is a workflow-wide field and is not tied to a specific revision. google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -205,6 +221,7 @@ message Workflow { // than 63 characters and can only contain lowercase letters, numeric // characters, underscores, and dashes. Label keys must start with a letter. // International characters are allowed. + // This is a workflow-wide field and is not tied to a specific revision. map labels = 8; // The service account associated with the latest workflow version. @@ -260,10 +277,51 @@ message Workflow { // Optional. User-defined environment variables associated with this workflow // revision. This map has a maximum length of 20. Each string can take up to - // 40KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or - // “WORKFLOWS". + // 4KiB. Keys cannot be empty strings and cannot start with "GOOGLE" or + // "WORKFLOWS". map user_env_vars = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes the execution history level to apply to this workflow. + ExecutionHistoryLevel execution_history_level = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A list of all KMS crypto keys used to encrypt or decrypt the + // data associated with the workflow. + repeated string all_kms_keys = 16 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + + // Output only. A list of all KMS crypto key versions used to encrypt or + // decrypt the data associated with the workflow. + repeated string all_kms_keys_versions = 17 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; + + // Output only. The resource name of a KMS crypto key version used to encrypt + // or decrypt the data associated with the workflow. + // + // Format: + // projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion} + string crypto_key_version = 18 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; + + // Optional. Input only. Immutable. Tags associated with this workflow. + map tags = 19 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // Request for the @@ -293,6 +351,16 @@ message ListWorkflowsRequest { string page_token = 3; // Filter to restrict results to specific workflows. + // For details, see AIP-160. + // + // For example, if you are using the Google APIs Explorer: + // + // `state="SUCCEEDED"` + // + // or + // + // `createTime>"2023-08-01" AND state="FAILED"` string filter = 4; // Comma-separated list of fields that specify the order of the results. @@ -407,3 +475,50 @@ message OperationMetadata { // API version used to start the operation. string api_version = 5; } + +// Request for the +// [ListWorkflowRevisions][google.cloud.workflows.v1.Workflows.ListWorkflowRevisions] +// method. +message ListWorkflowRevisionsRequest { + // Required. Workflow for which the revisions should be listed. + // Format: projects/{project}/locations/{location}/workflows/{workflow} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "workflows.googleapis.com/Workflow" + } + ]; + + // The maximum number of revisions to return per page. If a value is not + // specified, a default value of 20 is used. The maximum permitted value is + // 100. Values greater than 100 are coerced down to 100. + int32 page_size = 2; + + // The page token, received from a previous ListWorkflowRevisions call. + // Provide this to retrieve the subsequent page. + string page_token = 3; +} + +// Response for the +// [ListWorkflowRevisions][google.cloud.workflows.v1.Workflows.ListWorkflowRevisions] +// method. +message ListWorkflowRevisionsResponse { + // The revisions of the workflow, ordered in reverse chronological order. + repeated Workflow workflows = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Define possible options for enabling the execution history level. +enum ExecutionHistoryLevel { + // The default/unset value. + EXECUTION_HISTORY_LEVEL_UNSPECIFIED = 0; + + // Enable execution history basic feature. + EXECUTION_HISTORY_BASIC = 1; + + // Enable execution history detailed feature. + EXECUTION_HISTORY_DETAILED = 2; +} diff --git a/packages/google-cloud-workflows-executions/protos/protos.d.ts b/packages/google-cloud-workflows-executions/protos/protos.d.ts index 85ceb46afec..e842c3006f8 100644 --- a/packages/google-cloud-workflows-executions/protos/protos.d.ts +++ b/packages/google-cloud-workflows-executions/protos/protos.d.ts @@ -2598,6 +2598,20 @@ export namespace google { * @returns Promise */ public updateWorkflow(request: google.cloud.workflows.v1.IUpdateWorkflowRequest): Promise; + + /** + * Calls ListWorkflowRevisions. + * @param request ListWorkflowRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkflowRevisionsResponse + */ + public listWorkflowRevisions(request: google.cloud.workflows.v1.IListWorkflowRevisionsRequest, callback: google.cloud.workflows.v1.Workflows.ListWorkflowRevisionsCallback): void; + + /** + * Calls ListWorkflowRevisions. + * @param request ListWorkflowRevisionsRequest message or plain object + * @returns Promise + */ + public listWorkflowRevisions(request: google.cloud.workflows.v1.IListWorkflowRevisionsRequest): Promise; } namespace Workflows { @@ -2636,6 +2650,13 @@ export namespace google { * @param [response] Operation */ type UpdateWorkflowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.workflows.v1.Workflows|listWorkflowRevisions}. + * @param error Error, if any + * @param [response] ListWorkflowRevisionsResponse + */ + type ListWorkflowRevisionsCallback = (error: (Error|null), response?: google.cloud.workflows.v1.ListWorkflowRevisionsResponse) => void; } /** Properties of a Workflow. */ @@ -2682,6 +2703,21 @@ export namespace google { /** Workflow userEnvVars */ userEnvVars?: ({ [k: string]: string }|null); + + /** Workflow executionHistoryLevel */ + executionHistoryLevel?: (google.cloud.workflows.v1.ExecutionHistoryLevel|keyof typeof google.cloud.workflows.v1.ExecutionHistoryLevel|null); + + /** Workflow allKmsKeys */ + allKmsKeys?: (string[]|null); + + /** Workflow allKmsKeysVersions */ + allKmsKeysVersions?: (string[]|null); + + /** Workflow cryptoKeyVersion */ + cryptoKeyVersion?: (string|null); + + /** Workflow tags */ + tags?: ({ [k: string]: string }|null); } /** Represents a Workflow. */ @@ -2735,6 +2771,21 @@ export namespace google { /** Workflow userEnvVars. */ public userEnvVars: { [k: string]: string }; + /** Workflow executionHistoryLevel. */ + public executionHistoryLevel: (google.cloud.workflows.v1.ExecutionHistoryLevel|keyof typeof google.cloud.workflows.v1.ExecutionHistoryLevel); + + /** Workflow allKmsKeys. */ + public allKmsKeys: string[]; + + /** Workflow allKmsKeysVersions. */ + public allKmsKeysVersions: string[]; + + /** Workflow cryptoKeyVersion. */ + public cryptoKeyVersion: string; + + /** Workflow tags. */ + public tags: { [k: string]: string }; + /** Workflow sourceCode. */ public sourceCode?: "sourceContents"; @@ -3708,6 +3759,225 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a ListWorkflowRevisionsRequest. */ + interface IListWorkflowRevisionsRequest { + + /** ListWorkflowRevisionsRequest name */ + name?: (string|null); + + /** ListWorkflowRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkflowRevisionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListWorkflowRevisionsRequest. */ + class ListWorkflowRevisionsRequest implements IListWorkflowRevisionsRequest { + + /** + * Constructs a new ListWorkflowRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.v1.IListWorkflowRevisionsRequest); + + /** ListWorkflowRevisionsRequest name. */ + public name: string; + + /** ListWorkflowRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListWorkflowRevisionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListWorkflowRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowRevisionsRequest instance + */ + public static create(properties?: google.cloud.workflows.v1.IListWorkflowRevisionsRequest): google.cloud.workflows.v1.ListWorkflowRevisionsRequest; + + /** + * Encodes the specified ListWorkflowRevisionsRequest message. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsRequest.verify|verify} messages. + * @param message ListWorkflowRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.v1.IListWorkflowRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsRequest.verify|verify} messages. + * @param message ListWorkflowRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.v1.IListWorkflowRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1.ListWorkflowRevisionsRequest; + + /** + * Decodes a ListWorkflowRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1.ListWorkflowRevisionsRequest; + + /** + * Verifies a ListWorkflowRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1.ListWorkflowRevisionsRequest; + + /** + * Creates a plain object from a ListWorkflowRevisionsRequest message. Also converts values to other types if specified. + * @param message ListWorkflowRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.v1.ListWorkflowRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkflowRevisionsResponse. */ + interface IListWorkflowRevisionsResponse { + + /** ListWorkflowRevisionsResponse workflows */ + workflows?: (google.cloud.workflows.v1.IWorkflow[]|null); + + /** ListWorkflowRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListWorkflowRevisionsResponse. */ + class ListWorkflowRevisionsResponse implements IListWorkflowRevisionsResponse { + + /** + * Constructs a new ListWorkflowRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workflows.v1.IListWorkflowRevisionsResponse); + + /** ListWorkflowRevisionsResponse workflows. */ + public workflows: google.cloud.workflows.v1.IWorkflow[]; + + /** ListWorkflowRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListWorkflowRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkflowRevisionsResponse instance + */ + public static create(properties?: google.cloud.workflows.v1.IListWorkflowRevisionsResponse): google.cloud.workflows.v1.ListWorkflowRevisionsResponse; + + /** + * Encodes the specified ListWorkflowRevisionsResponse message. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsResponse.verify|verify} messages. + * @param message ListWorkflowRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workflows.v1.IListWorkflowRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkflowRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsResponse.verify|verify} messages. + * @param message ListWorkflowRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workflows.v1.IListWorkflowRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkflowRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkflowRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.workflows.v1.ListWorkflowRevisionsResponse; + + /** + * Decodes a ListWorkflowRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkflowRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.workflows.v1.ListWorkflowRevisionsResponse; + + /** + * Verifies a ListWorkflowRevisionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkflowRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkflowRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workflows.v1.ListWorkflowRevisionsResponse; + + /** + * Creates a plain object from a ListWorkflowRevisionsResponse message. Also converts values to other types if specified. + * @param message ListWorkflowRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workflows.v1.ListWorkflowRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkflowRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkflowRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ExecutionHistoryLevel enum. */ + enum ExecutionHistoryLevel { + EXECUTION_HISTORY_LEVEL_UNSPECIFIED = 0, + EXECUTION_HISTORY_BASIC = 1, + EXECUTION_HISTORY_DETAILED = 2 + } } /** Namespace v1beta. */ diff --git a/packages/google-cloud-workflows-executions/protos/protos.js b/packages/google-cloud-workflows-executions/protos/protos.js index d294ff63d82..44293b5e9d0 100644 --- a/packages/google-cloud-workflows-executions/protos/protos.js +++ b/packages/google-cloud-workflows-executions/protos/protos.js @@ -6232,6 +6232,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.workflows.v1.Workflows|listWorkflowRevisions}. + * @memberof google.cloud.workflows.v1.Workflows + * @typedef ListWorkflowRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.workflows.v1.ListWorkflowRevisionsResponse} [response] ListWorkflowRevisionsResponse + */ + + /** + * Calls ListWorkflowRevisions. + * @function listWorkflowRevisions + * @memberof google.cloud.workflows.v1.Workflows + * @instance + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsRequest} request ListWorkflowRevisionsRequest message or plain object + * @param {google.cloud.workflows.v1.Workflows.ListWorkflowRevisionsCallback} callback Node-style callback called with the error, if any, and ListWorkflowRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Workflows.prototype.listWorkflowRevisions = function listWorkflowRevisions(request, callback) { + return this.rpcCall(listWorkflowRevisions, $root.google.cloud.workflows.v1.ListWorkflowRevisionsRequest, $root.google.cloud.workflows.v1.ListWorkflowRevisionsResponse, request, callback); + }, "name", { value: "ListWorkflowRevisions" }); + + /** + * Calls ListWorkflowRevisions. + * @function listWorkflowRevisions + * @memberof google.cloud.workflows.v1.Workflows + * @instance + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsRequest} request ListWorkflowRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Workflows; })(); @@ -6255,6 +6288,11 @@ * @property {google.cloud.workflows.v1.Workflow.IStateError|null} [stateError] Workflow stateError * @property {google.cloud.workflows.v1.Workflow.CallLogLevel|null} [callLogLevel] Workflow callLogLevel * @property {Object.|null} [userEnvVars] Workflow userEnvVars + * @property {google.cloud.workflows.v1.ExecutionHistoryLevel|null} [executionHistoryLevel] Workflow executionHistoryLevel + * @property {Array.|null} [allKmsKeys] Workflow allKmsKeys + * @property {Array.|null} [allKmsKeysVersions] Workflow allKmsKeysVersions + * @property {string|null} [cryptoKeyVersion] Workflow cryptoKeyVersion + * @property {Object.|null} [tags] Workflow tags */ /** @@ -6268,6 +6306,9 @@ function Workflow(properties) { this.labels = {}; this.userEnvVars = {}; + this.allKmsKeys = []; + this.allKmsKeysVersions = []; + this.tags = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6386,6 +6427,46 @@ */ Workflow.prototype.userEnvVars = $util.emptyObject; + /** + * Workflow executionHistoryLevel. + * @member {google.cloud.workflows.v1.ExecutionHistoryLevel} executionHistoryLevel + * @memberof google.cloud.workflows.v1.Workflow + * @instance + */ + Workflow.prototype.executionHistoryLevel = 0; + + /** + * Workflow allKmsKeys. + * @member {Array.} allKmsKeys + * @memberof google.cloud.workflows.v1.Workflow + * @instance + */ + Workflow.prototype.allKmsKeys = $util.emptyArray; + + /** + * Workflow allKmsKeysVersions. + * @member {Array.} allKmsKeysVersions + * @memberof google.cloud.workflows.v1.Workflow + * @instance + */ + Workflow.prototype.allKmsKeysVersions = $util.emptyArray; + + /** + * Workflow cryptoKeyVersion. + * @member {string} cryptoKeyVersion + * @memberof google.cloud.workflows.v1.Workflow + * @instance + */ + Workflow.prototype.cryptoKeyVersion = ""; + + /** + * Workflow tags. + * @member {Object.} tags + * @memberof google.cloud.workflows.v1.Workflow + * @instance + */ + Workflow.prototype.tags = $util.emptyObject; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -6454,6 +6535,19 @@ if (message.userEnvVars != null && Object.hasOwnProperty.call(message, "userEnvVars")) for (var keys = Object.keys(message.userEnvVars), i = 0; i < keys.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userEnvVars[keys[i]]).ldelim(); + if (message.executionHistoryLevel != null && Object.hasOwnProperty.call(message, "executionHistoryLevel")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.executionHistoryLevel); + if (message.allKmsKeys != null && message.allKmsKeys.length) + for (var i = 0; i < message.allKmsKeys.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.allKmsKeys[i]); + if (message.allKmsKeysVersions != null && message.allKmsKeysVersions.length) + for (var i = 0; i < message.allKmsKeysVersions.length; ++i) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.allKmsKeysVersions[i]); + if (message.cryptoKeyVersion != null && Object.hasOwnProperty.call(message, "cryptoKeyVersion")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.cryptoKeyVersion); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 19, wireType 2 =*/154).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); return writer; }; @@ -6582,6 +6676,49 @@ message.userEnvVars[key] = value; break; } + case 15: { + message.executionHistoryLevel = reader.int32(); + break; + } + case 16: { + if (!(message.allKmsKeys && message.allKmsKeys.length)) + message.allKmsKeys = []; + message.allKmsKeys.push(reader.string()); + break; + } + case 17: { + if (!(message.allKmsKeysVersions && message.allKmsKeysVersions.length)) + message.allKmsKeysVersions = []; + message.allKmsKeysVersions.push(reader.string()); + break; + } + case 18: { + message.cryptoKeyVersion = reader.string(); + break; + } + case 19: { + if (message.tags === $util.emptyObject) + message.tags = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tags[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -6693,6 +6830,40 @@ if (!$util.isString(message.userEnvVars[key[i]])) return "userEnvVars: string{k:string} expected"; } + if (message.executionHistoryLevel != null && message.hasOwnProperty("executionHistoryLevel")) + switch (message.executionHistoryLevel) { + default: + return "executionHistoryLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.allKmsKeys != null && message.hasOwnProperty("allKmsKeys")) { + if (!Array.isArray(message.allKmsKeys)) + return "allKmsKeys: array expected"; + for (var i = 0; i < message.allKmsKeys.length; ++i) + if (!$util.isString(message.allKmsKeys[i])) + return "allKmsKeys: string[] expected"; + } + if (message.allKmsKeysVersions != null && message.hasOwnProperty("allKmsKeysVersions")) { + if (!Array.isArray(message.allKmsKeysVersions)) + return "allKmsKeysVersions: array expected"; + for (var i = 0; i < message.allKmsKeysVersions.length; ++i) + if (!$util.isString(message.allKmsKeysVersions[i])) + return "allKmsKeysVersions: string[] expected"; + } + if (message.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion")) + if (!$util.isString(message.cryptoKeyVersion)) + return "cryptoKeyVersion: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; + var key = Object.keys(message.tags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; + } return null; }; @@ -6798,6 +6969,49 @@ for (var keys = Object.keys(object.userEnvVars), i = 0; i < keys.length; ++i) message.userEnvVars[keys[i]] = String(object.userEnvVars[keys[i]]); } + switch (object.executionHistoryLevel) { + default: + if (typeof object.executionHistoryLevel === "number") { + message.executionHistoryLevel = object.executionHistoryLevel; + break; + } + break; + case "EXECUTION_HISTORY_LEVEL_UNSPECIFIED": + case 0: + message.executionHistoryLevel = 0; + break; + case "EXECUTION_HISTORY_BASIC": + case 1: + message.executionHistoryLevel = 1; + break; + case "EXECUTION_HISTORY_DETAILED": + case 2: + message.executionHistoryLevel = 2; + break; + } + if (object.allKmsKeys) { + if (!Array.isArray(object.allKmsKeys)) + throw TypeError(".google.cloud.workflows.v1.Workflow.allKmsKeys: array expected"); + message.allKmsKeys = []; + for (var i = 0; i < object.allKmsKeys.length; ++i) + message.allKmsKeys[i] = String(object.allKmsKeys[i]); + } + if (object.allKmsKeysVersions) { + if (!Array.isArray(object.allKmsKeysVersions)) + throw TypeError(".google.cloud.workflows.v1.Workflow.allKmsKeysVersions: array expected"); + message.allKmsKeysVersions = []; + for (var i = 0; i < object.allKmsKeysVersions.length; ++i) + message.allKmsKeysVersions[i] = String(object.allKmsKeysVersions[i]); + } + if (object.cryptoKeyVersion != null) + message.cryptoKeyVersion = String(object.cryptoKeyVersion); + if (object.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.workflows.v1.Workflow.tags: object expected"); + message.tags = {}; + for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) + message.tags[keys[i]] = String(object.tags[keys[i]]); + } return message; }; @@ -6814,9 +7028,14 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.allKmsKeys = []; + object.allKmsKeysVersions = []; + } if (options.objects || options.defaults) { object.labels = {}; object.userEnvVars = {}; + object.tags = {}; } if (options.defaults) { object.name = ""; @@ -6830,6 +7049,8 @@ object.cryptoKeyName = ""; object.stateError = null; object.callLogLevel = options.enums === String ? "CALL_LOG_LEVEL_UNSPECIFIED" : 0; + object.executionHistoryLevel = options.enums === String ? "EXECUTION_HISTORY_LEVEL_UNSPECIFIED" : 0; + object.cryptoKeyVersion = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -6869,6 +7090,25 @@ for (var j = 0; j < keys2.length; ++j) object.userEnvVars[keys2[j]] = message.userEnvVars[keys2[j]]; } + if (message.executionHistoryLevel != null && message.hasOwnProperty("executionHistoryLevel")) + object.executionHistoryLevel = options.enums === String ? $root.google.cloud.workflows.v1.ExecutionHistoryLevel[message.executionHistoryLevel] === undefined ? message.executionHistoryLevel : $root.google.cloud.workflows.v1.ExecutionHistoryLevel[message.executionHistoryLevel] : message.executionHistoryLevel; + if (message.allKmsKeys && message.allKmsKeys.length) { + object.allKmsKeys = []; + for (var j = 0; j < message.allKmsKeys.length; ++j) + object.allKmsKeys[j] = message.allKmsKeys[j]; + } + if (message.allKmsKeysVersions && message.allKmsKeysVersions.length) { + object.allKmsKeysVersions = []; + for (var j = 0; j < message.allKmsKeysVersions.length; ++j) + object.allKmsKeysVersions[j] = message.allKmsKeysVersions[j]; + } + if (message.cryptoKeyVersion != null && message.hasOwnProperty("cryptoKeyVersion")) + object.cryptoKeyVersion = message.cryptoKeyVersion; + if (message.tags && (keys2 = Object.keys(message.tags)).length) { + object.tags = {}; + for (var j = 0; j < keys2.length; ++j) + object.tags[keys2[j]] = message.tags[keys2[j]]; + } return object; }; @@ -9007,6 +9247,520 @@ return OperationMetadata; })(); + v1.ListWorkflowRevisionsRequest = (function() { + + /** + * Properties of a ListWorkflowRevisionsRequest. + * @memberof google.cloud.workflows.v1 + * @interface IListWorkflowRevisionsRequest + * @property {string|null} [name] ListWorkflowRevisionsRequest name + * @property {number|null} [pageSize] ListWorkflowRevisionsRequest pageSize + * @property {string|null} [pageToken] ListWorkflowRevisionsRequest pageToken + */ + + /** + * Constructs a new ListWorkflowRevisionsRequest. + * @memberof google.cloud.workflows.v1 + * @classdesc Represents a ListWorkflowRevisionsRequest. + * @implements IListWorkflowRevisionsRequest + * @constructor + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsRequest=} [properties] Properties to set + */ + function ListWorkflowRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowRevisionsRequest name. + * @member {string} name + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @instance + */ + ListWorkflowRevisionsRequest.prototype.name = ""; + + /** + * ListWorkflowRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @instance + */ + ListWorkflowRevisionsRequest.prototype.pageSize = 0; + + /** + * ListWorkflowRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @instance + */ + ListWorkflowRevisionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWorkflowRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsRequest} ListWorkflowRevisionsRequest instance + */ + ListWorkflowRevisionsRequest.create = function create(properties) { + return new ListWorkflowRevisionsRequest(properties); + }; + + /** + * Encodes the specified ListWorkflowRevisionsRequest message. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsRequest} message ListWorkflowRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowRevisionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListWorkflowRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsRequest} message ListWorkflowRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsRequest} ListWorkflowRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowRevisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1.ListWorkflowRevisionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsRequest} ListWorkflowRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowRevisionsRequest message. + * @function verify + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowRevisionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsRequest} ListWorkflowRevisionsRequest + */ + ListWorkflowRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.v1.ListWorkflowRevisionsRequest) + return object; + var message = new $root.google.cloud.workflows.v1.ListWorkflowRevisionsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {google.cloud.workflows.v1.ListWorkflowRevisionsRequest} message ListWorkflowRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListWorkflowRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkflowRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.workflows.v1.ListWorkflowRevisionsRequest"; + }; + + return ListWorkflowRevisionsRequest; + })(); + + v1.ListWorkflowRevisionsResponse = (function() { + + /** + * Properties of a ListWorkflowRevisionsResponse. + * @memberof google.cloud.workflows.v1 + * @interface IListWorkflowRevisionsResponse + * @property {Array.|null} [workflows] ListWorkflowRevisionsResponse workflows + * @property {string|null} [nextPageToken] ListWorkflowRevisionsResponse nextPageToken + */ + + /** + * Constructs a new ListWorkflowRevisionsResponse. + * @memberof google.cloud.workflows.v1 + * @classdesc Represents a ListWorkflowRevisionsResponse. + * @implements IListWorkflowRevisionsResponse + * @constructor + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsResponse=} [properties] Properties to set + */ + function ListWorkflowRevisionsResponse(properties) { + this.workflows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkflowRevisionsResponse workflows. + * @member {Array.} workflows + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @instance + */ + ListWorkflowRevisionsResponse.prototype.workflows = $util.emptyArray; + + /** + * ListWorkflowRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @instance + */ + ListWorkflowRevisionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListWorkflowRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsResponse} ListWorkflowRevisionsResponse instance + */ + ListWorkflowRevisionsResponse.create = function create(properties) { + return new ListWorkflowRevisionsResponse(properties); + }; + + /** + * Encodes the specified ListWorkflowRevisionsResponse message. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsResponse} message ListWorkflowRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workflows != null && message.workflows.length) + for (var i = 0; i < message.workflows.length; ++i) + $root.google.cloud.workflows.v1.Workflow.encode(message.workflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListWorkflowRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.workflows.v1.ListWorkflowRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {google.cloud.workflows.v1.IListWorkflowRevisionsResponse} message ListWorkflowRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkflowRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkflowRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsResponse} ListWorkflowRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workflows.v1.ListWorkflowRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workflows && message.workflows.length)) + message.workflows = []; + message.workflows.push($root.google.cloud.workflows.v1.Workflow.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkflowRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsResponse} ListWorkflowRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkflowRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkflowRevisionsResponse message. + * @function verify + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkflowRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workflows != null && message.hasOwnProperty("workflows")) { + if (!Array.isArray(message.workflows)) + return "workflows: array expected"; + for (var i = 0; i < message.workflows.length; ++i) { + var error = $root.google.cloud.workflows.v1.Workflow.verify(message.workflows[i]); + if (error) + return "workflows." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkflowRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workflows.v1.ListWorkflowRevisionsResponse} ListWorkflowRevisionsResponse + */ + ListWorkflowRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workflows.v1.ListWorkflowRevisionsResponse) + return object; + var message = new $root.google.cloud.workflows.v1.ListWorkflowRevisionsResponse(); + if (object.workflows) { + if (!Array.isArray(object.workflows)) + throw TypeError(".google.cloud.workflows.v1.ListWorkflowRevisionsResponse.workflows: array expected"); + message.workflows = []; + for (var i = 0; i < object.workflows.length; ++i) { + if (typeof object.workflows[i] !== "object") + throw TypeError(".google.cloud.workflows.v1.ListWorkflowRevisionsResponse.workflows: object expected"); + message.workflows[i] = $root.google.cloud.workflows.v1.Workflow.fromObject(object.workflows[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkflowRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {google.cloud.workflows.v1.ListWorkflowRevisionsResponse} message ListWorkflowRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkflowRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workflows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workflows && message.workflows.length) { + object.workflows = []; + for (var j = 0; j < message.workflows.length; ++j) + object.workflows[j] = $root.google.cloud.workflows.v1.Workflow.toObject(message.workflows[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListWorkflowRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkflowRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkflowRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.workflows.v1.ListWorkflowRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkflowRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.workflows.v1.ListWorkflowRevisionsResponse"; + }; + + return ListWorkflowRevisionsResponse; + })(); + + /** + * ExecutionHistoryLevel enum. + * @name google.cloud.workflows.v1.ExecutionHistoryLevel + * @enum {number} + * @property {number} EXECUTION_HISTORY_LEVEL_UNSPECIFIED=0 EXECUTION_HISTORY_LEVEL_UNSPECIFIED value + * @property {number} EXECUTION_HISTORY_BASIC=1 EXECUTION_HISTORY_BASIC value + * @property {number} EXECUTION_HISTORY_DETAILED=2 EXECUTION_HISTORY_DETAILED value + */ + v1.ExecutionHistoryLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXECUTION_HISTORY_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXECUTION_HISTORY_BASIC"] = 1; + values[valuesById[2] = "EXECUTION_HISTORY_DETAILED"] = 2; + return values; + })(); + return v1; })(); diff --git a/packages/google-cloud-workflows-executions/protos/protos.json b/packages/google-cloud-workflows-executions/protos/protos.json index 00768c074d0..186f1557ebb 100644 --- a/packages/google-cloud-workflows-executions/protos/protos.json +++ b/packages/google-cloud-workflows-executions/protos/protos.json @@ -714,8 +714,8 @@ "java_multiple_files": true, "java_outer_classname": "WorkflowsProto", "java_package": "com.google.cloud.workflows.v1", - "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKey", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}" + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}" }, "nested": { "Workflows": { @@ -841,6 +841,20 @@ } } ] + }, + "ListWorkflowRevisions": { + "requestType": "ListWorkflowRevisionsRequest", + "responseType": "ListWorkflowRevisionsResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/workflows/*}:listRevisions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/workflows/*}:listRevisions" + } + } + ] } } }, @@ -942,6 +956,47 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "executionHistoryLevel": { + "type": "ExecutionHistoryLevel", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allKmsKeys": { + "rule": "repeated", + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } + }, + "allKmsKeysVersions": { + "rule": "repeated", + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "cryptoKeyVersion": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "tags": { + "keyType": "string", + "type": "string", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -1123,6 +1178,46 @@ "id": 5 } } + }, + "ListWorkflowRevisionsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "workflows.googleapis.com/Workflow" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListWorkflowRevisionsResponse": { + "fields": { + "workflows": { + "rule": "repeated", + "type": "Workflow", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ExecutionHistoryLevel": { + "values": { + "EXECUTION_HISTORY_LEVEL_UNSPECIFIED": 0, + "EXECUTION_HISTORY_BASIC": 1, + "EXECUTION_HISTORY_DETAILED": 2 + } } } }, diff --git a/packages/google-cloud-workflows-executions/samples/README.md b/packages/google-cloud-workflows-executions/samples/README.md index 62f7d14ba8e..6b1d6b250a9 100644 --- a/packages/google-cloud-workflows-executions/samples/README.md +++ b/packages/google-cloud-workflows-executions/samples/README.md @@ -19,6 +19,7 @@ * [Workflows.create_workflow](#workflows.create_workflow) * [Workflows.delete_workflow](#workflows.delete_workflow) * [Workflows.get_workflow](#workflows.get_workflow) + * [Workflows.list_workflow_revisions](#workflows.list_workflow_revisions) * [Workflows.list_workflows](#workflows.list_workflows) * [Workflows.update_workflow](#workflows.update_workflow) * [Executions.cancel_execution](#executions.cancel_execution) @@ -166,6 +167,23 @@ __Usage:__ +### Workflows.list_workflow_revisions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js` + + +----- + + + + ### Workflows.list_workflows View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflows.js). diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json index 31038297f86..b6f59b7959c 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 81, + "end": 87, "type": "FULL" } ], @@ -242,6 +242,54 @@ } } } + }, + { + "regionTag": "workflows_v1_generated_Workflows_ListWorkflowRevisions_async", + "title": "Workflows listWorkflowRevisions Sample", + "origin": "API_DEFINITION", + "description": " Lists revisions for a given workflow.", + "canonical": true, + "file": "workflows.list_workflow_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkflowRevisions", + "fullName": "google.cloud.workflows.v1.Workflows.ListWorkflowRevisions", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.workflows.v1.ListWorkflowRevisionsResponse", + "client": { + "shortName": "WorkflowsClient", + "fullName": "google.cloud.workflows.v1.WorkflowsClient" + }, + "method": { + "shortName": "ListWorkflowRevisions", + "fullName": "google.cloud.workflows.v1.Workflows.ListWorkflowRevisions", + "service": { + "shortName": "Workflows", + "fullName": "google.cloud.workflows.v1.Workflows" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js b/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js new file mode 100644 index 00000000000..ff93eefdd10 --- /dev/null +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflow_revisions.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START workflows_v1_generated_Workflows_ListWorkflowRevisions_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. + */ + /** + * Required. Workflow for which the revisions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + */ + // const name = 'abc123' + /** + * The maximum number of revisions to return per page. If a value is not + * specified, a default value of 20 is used. The maximum permitted value is + * 100. Values greater than 100 are coerced down to 100. + */ + // const pageSize = 1234 + /** + * The page token, received from a previous ListWorkflowRevisions call. + * Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Workflows library + const {WorkflowsClient} = require('@google-cloud/workflows').v1; + + // Instantiates a client + const workflowsClient = new WorkflowsClient(); + + async function callListWorkflowRevisions() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = workflowsClient.listWorkflowRevisionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkflowRevisions(); + // [END workflows_v1_generated_Workflows_ListWorkflowRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflows.js b/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflows.js index 3ac2fc0fc1a..f01139a2b85 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflows.js +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/workflows.list_workflows.js @@ -49,6 +49,12 @@ function main(parent) { // const pageToken = 'abc123' /** * Filter to restrict results to specific workflows. + * For details, see AIP-160. + * For example, if you are using the Google APIs Explorer: + * `state="SUCCEEDED"` + * or + * `createTime>"2023-08-01" AND state="FAILED"` */ // const filter = 'abc123' /** diff --git a/packages/google-cloud-workflows-executions/src/v1/gapic_metadata.json b/packages/google-cloud-workflows-executions/src/v1/gapic_metadata.json index 4beac113fbb..1b60df445c3 100644 --- a/packages/google-cloud-workflows-executions/src/v1/gapic_metadata.json +++ b/packages/google-cloud-workflows-executions/src/v1/gapic_metadata.json @@ -36,6 +36,13 @@ "listWorkflowsStream", "listWorkflowsAsync" ] + }, + "ListWorkflowRevisions": { + "methods": [ + "listWorkflowRevisions", + "listWorkflowRevisionsStream", + "listWorkflowRevisionsAsync" + ] } } }, @@ -68,6 +75,13 @@ "listWorkflowsStream", "listWorkflowsAsync" ] + }, + "ListWorkflowRevisions": { + "methods": [ + "listWorkflowRevisions", + "listWorkflowRevisionsStream", + "listWorkflowRevisionsAsync" + ] } } } diff --git a/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts b/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts index 4eb19aa0b10..5155cea22f2 100644 --- a/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts +++ b/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts @@ -217,6 +217,9 @@ export class WorkflowsClient { cryptoKeyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}' ), + cryptoKeyVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), @@ -234,6 +237,11 @@ export class WorkflowsClient { 'nextPageToken', 'workflows' ), + listWorkflowRevisions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workflows' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -364,6 +372,7 @@ export class WorkflowsClient { 'createWorkflow', 'deleteWorkflow', 'updateWorkflow', + 'listWorkflowRevisions', ]; for (const methodName of workflowsStubMethods) { const callPromise = this.workflowsStub.then( @@ -1146,6 +1155,16 @@ export class WorkflowsClient { * match the call that provided the page token. * @param {string} request.filter * Filter to restrict results to specific workflows. + * For details, see AIP-160. + * + * For example, if you are using the Google APIs Explorer: + * + * `state="SUCCEEDED"` + * + * or + * + * `createTime>"2023-08-01" AND state="FAILED"` * @param {string} request.orderBy * Comma-separated list of fields that specify the order of the results. * Default sorting order for a field is ascending. To specify descending order @@ -1284,6 +1303,16 @@ export class WorkflowsClient { * match the call that provided the page token. * @param {string} request.filter * Filter to restrict results to specific workflows. + * For details, see AIP-160. + * + * For example, if you are using the Google APIs Explorer: + * + * `state="SUCCEEDED"` + * + * or + * + * `createTime>"2023-08-01" AND state="FAILED"` * @param {string} request.orderBy * Comma-separated list of fields that specify the order of the results. * Default sorting order for a field is ascending. To specify descending order @@ -1345,6 +1374,16 @@ export class WorkflowsClient { * match the call that provided the page token. * @param {string} request.filter * Filter to restrict results to specific workflows. + * For details, see AIP-160. + * + * For example, if you are using the Google APIs Explorer: + * + * `state="SUCCEEDED"` + * + * or + * + * `createTime>"2023-08-01" AND state="FAILED"` * @param {string} request.orderBy * Comma-separated list of fields that specify the order of the results. * Default sorting order for a field is ascending. To specify descending order @@ -1384,6 +1423,232 @@ export class WorkflowsClient { callSettings ) as AsyncIterable; } + /** + * Lists revisions for a given workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Workflow for which the revisions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param {number} request.pageSize + * The maximum number of revisions to return per page. If a value is not + * specified, a default value of 20 is used. The maximum permitted value is + * 100. Values greater than 100 are coerced down to 100. + * @param {string} request.pageToken + * The page token, received from a previous ListWorkflowRevisions call. + * Provide this to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.workflows.v1.Workflow|Workflow}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkflowRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listWorkflowRevisions( + request?: protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.workflows.v1.IWorkflow[], + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest | null, + protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse, + ] + >; + listWorkflowRevisions( + request: protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + | protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse + | null + | undefined, + protos.google.cloud.workflows.v1.IWorkflow + > + ): void; + listWorkflowRevisions( + request: protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + callback: PaginationCallback< + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + | protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse + | null + | undefined, + protos.google.cloud.workflows.v1.IWorkflow + > + ): void; + listWorkflowRevisions( + request?: protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + | protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse + | null + | undefined, + protos.google.cloud.workflows.v1.IWorkflow + >, + callback?: PaginationCallback< + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + | protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse + | null + | undefined, + protos.google.cloud.workflows.v1.IWorkflow + > + ): Promise< + [ + protos.google.cloud.workflows.v1.IWorkflow[], + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest | null, + protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + | protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse + | null + | undefined, + protos.google.cloud.workflows.v1.IWorkflow + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listWorkflowRevisions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listWorkflowRevisions request %j', request); + return this.innerApiCalls + .listWorkflowRevisions(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.workflows.v1.IWorkflow[], + protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest | null, + protos.google.cloud.workflows.v1.IListWorkflowRevisionsResponse, + ]) => { + this._log.info('listWorkflowRevisions values %j', response); + return [response, input, output]; + } + ); + } + + /** + * Equivalent to `listWorkflowRevisions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Workflow for which the revisions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param {number} request.pageSize + * The maximum number of revisions to return per page. If a value is not + * specified, a default value of 20 is used. The maximum permitted value is + * 100. Values greater than 100 are coerced down to 100. + * @param {string} request.pageToken + * The page token, received from a previous ListWorkflowRevisions call. + * Provide this to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.workflows.v1.Workflow|Workflow} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkflowRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listWorkflowRevisionsStream( + request?: protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = this._defaults['listWorkflowRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this._log.info('listWorkflowRevisions stream %j', request); + return this.descriptors.page.listWorkflowRevisions.createStream( + this.innerApiCalls.listWorkflowRevisions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkflowRevisions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Workflow for which the revisions should be listed. + * Format: projects/{project}/locations/{location}/workflows/{workflow} + * @param {number} request.pageSize + * The maximum number of revisions to return per page. If a value is not + * specified, a default value of 20 is used. The maximum permitted value is + * 100. Values greater than 100 are coerced down to 100. + * @param {string} request.pageToken + * The page token, received from a previous ListWorkflowRevisions call. + * Provide this to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.workflows.v1.Workflow|Workflow}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/workflows.list_workflow_revisions.js + * region_tag:workflows_v1_generated_Workflows_ListWorkflowRevisions_async + */ + listWorkflowRevisionsAsync( + request?: protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + const defaultCallSettings = this._defaults['listWorkflowRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this._log.info('listWorkflowRevisions iterate %j', request); + return this.descriptors.page.listWorkflowRevisions.asyncIterate( + this.innerApiCalls['listWorkflowRevisions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } /** * Gets information about a location. * @@ -1761,6 +2026,97 @@ export class WorkflowsClient { .cryptoKey; } + /** + * Return a fully-qualified cryptoKeyVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} keyRing + * @param {string} cryptoKey + * @param {string} cryptoKeyVersion + * @returns {string} Resource name string. + */ + cryptoKeyVersionPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.render({ + project: project, + location: location, + keyRing: keyRing, + cryptoKey: cryptoKey, + cryptoKeyVersion: cryptoKeyVersion, + }); + } + + /** + * Parse the project from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).project; + } + + /** + * Parse the location from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).location; + } + + /** + * Parse the keyRing from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the keyRing. + */ + matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).keyRing; + } + + /** + * Parse the cryptoKey from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the cryptoKey. + */ + matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).cryptoKey; + } + + /** + * Parse the cryptoKeyVersion from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the cryptoKeyVersion. + */ + matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).cryptoKeyVersion; + } + /** * Return a fully-qualified location resource name string. * diff --git a/packages/google-cloud-workflows-executions/src/v1/workflows_client_config.json b/packages/google-cloud-workflows-executions/src/v1/workflows_client_config.json index 02f67fcb3f5..a748088aa9a 100644 --- a/packages/google-cloud-workflows-executions/src/v1/workflows_client_config.json +++ b/packages/google-cloud-workflows-executions/src/v1/workflows_client_config.json @@ -39,6 +39,10 @@ "UpdateWorkflow": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "ListWorkflowRevisions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts b/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts index b207e422428..5fcceeed1fe 100644 --- a/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts +++ b/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts @@ -1356,6 +1356,331 @@ describe('v1.WorkflowsClient', () => { ); }); }); + + describe('listWorkflowRevisions', () => { + it('invokes listWorkflowRevisions without error', async () => { + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.workflows.v1.ListWorkflowRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + ]; + client.innerApiCalls.listWorkflowRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.listWorkflowRevisions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkflowRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowRevisions without error using callback', async () => { + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.workflows.v1.ListWorkflowRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + ]; + client.innerApiCalls.listWorkflowRevisions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkflowRevisions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.workflows.v1.IWorkflow[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listWorkflowRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowRevisions with error', async () => { + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.workflows.v1.ListWorkflowRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkflowRevisions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listWorkflowRevisions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listWorkflowRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkflowRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkflowRevisionsStream without error', async () => { + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.workflows.v1.ListWorkflowRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + ]; + client.descriptors.page.listWorkflowRevisions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listWorkflowRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.workflows.v1.Workflow[] = []; + stream.on( + 'data', + (response: protos.google.cloud.workflows.v1.Workflow) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listWorkflowRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowRevisions, request) + ); + assert( + ( + client.descriptors.page.listWorkflowRevisions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listWorkflowRevisionsStream with error', async () => { + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.workflows.v1.ListWorkflowRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowRevisions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkflowRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.workflows.v1.Workflow[] = []; + stream.on( + 'data', + (response: protos.google.cloud.workflows.v1.Workflow) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listWorkflowRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listWorkflowRevisions, request) + ); + assert( + ( + client.descriptors.page.listWorkflowRevisions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkflowRevisions without error', async () => { + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.workflows.v1.ListWorkflowRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + generateSampleMessage(new protos.google.cloud.workflows.v1.Workflow()), + ]; + client.descriptors.page.listWorkflowRevisions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.workflows.v1.IWorkflow[] = []; + const iterable = client.listWorkflowRevisionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listWorkflowRevisions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkflowRevisions with error', async () => { + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.workflows.v1.ListWorkflowRevisionsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkflowRevisions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkflowRevisionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.workflows.v1.IWorkflow[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listWorkflowRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listWorkflowRevisions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); describe('getLocation', () => { it('invokes getLocation without error', async () => { const client = new workflowsModule.v1.WorkflowsClient({ @@ -1937,6 +2262,98 @@ describe('v1.WorkflowsClient', () => { }); }); + describe('cryptoKeyVersion', () => { + const fakePath = '/rendered/path/cryptoKeyVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + keyRing: 'keyRingValue', + cryptoKey: 'cryptoKeyValue', + cryptoKeyVersion: 'cryptoKeyVersionValue', + }; + const client = new workflowsModule.v1.WorkflowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cryptoKeyVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cryptoKeyVersionPath', () => { + const result = client.cryptoKeyVersionPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.cryptoKeyVersionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCryptoKeyVersionName', () => { + const result = client.matchProjectFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCryptoKeyVersionName', () => { + const result = client.matchLocationFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromCryptoKeyVersionName', () => { + const result = client.matchKeyRingFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromCryptoKeyVersionName', () => { + const result = client.matchCryptoKeyFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromCryptoKeyVersionName', () => { + const result = + client.matchCryptoKeyVersionFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('location', () => { const fakePath = '/rendered/path/location'; const expectedParameters = { From cf25597bfa095ac9ed522702a557155ee8759a80 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:25:29 -0700 Subject: [PATCH 11/34] docs: [oslogin] use Markdown links instead of HTML (#6166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: use Markdown links instead of HTML PiperOrigin-RevId: 737707783 Source-Link: https://github.com/googleapis/googleapis/commit/9ec67d424cd823b06c1b974d67df9ecb6e36edcd Source-Link: https://github.com/googleapis/googleapis-gen/commit/d259befdb24b85bda6c386ff63cf5df9234b6b43 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9zbG9naW4vLk93bEJvdC55YW1sIiwiaCI6ImQyNTliZWZkYjI0Yjg1YmRhNmMzODZmZjYzY2Y1ZGY5MjM0YjZiNDMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../protos/google/cloud/oslogin/common/common.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-oslogin/protos/google/cloud/oslogin/common/common.proto b/packages/google-cloud-oslogin/protos/google/cloud/oslogin/common/common.proto index 1c50671ef7f..afa92ed6b70 100644 --- a/packages/google-cloud-oslogin/protos/google/cloud/oslogin/common/common.proto +++ b/packages/google-cloud-oslogin/protos/google/cloud/oslogin/common/common.proto @@ -93,8 +93,7 @@ message SshPublicKey { }; // Public key text in SSH format, defined by - // RFC4253 - // section 6.6. + // [RFC4253](https://www.ietf.org/rfc/rfc4253.txt) section 6.6. string key = 1; // An expiration time in microseconds since epoch. From 4569e91b5f4c888cd52dd795dbe27cddf0801f51 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:25:57 -0700 Subject: [PATCH 12/34] feat: [alloydb] A new method `ExportCluster` is added to service `AlloyDBAdmin` (#6170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: A new method `ExportCluster` is added to service `AlloyDBAdmin` feat: A new message `GcsDestination` is added feat: A new message `ExportClusterRequest` is added feat: A new message `ExportClusterResponse` is added docs: A comment for field `zone_id` in message `.google.cloud.alloydb.v1beta.Instance` is changed docs: A comment for field `id` in message `.google.cloud.alloydb.v1beta.Instance` is changed docs: A comment for field `ip` in message `.google.cloud.alloydb.v1beta.Instance` is changed docs: A comment for field `state` in message `.google.cloud.alloydb.v1beta.Instance` is changed docs: A comment for field `database_flags` in message `.google.cloud.alloydb.v1beta.Instance` is changed docs: A comment for field `requested_cancellation` in message `.google.cloud.alloydb.v1beta.OperationMetadata` is changed PiperOrigin-RevId: 737752125 Source-Link: https://github.com/googleapis/googleapis/commit/6155d42e99f45ebf53100d492852be1561916137 Source-Link: https://github.com/googleapis/googleapis-gen/commit/367acaddbab3302a6a579d960990b73c421e49a6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6IjM2N2FjYWRkYmFiMzMwMmE2YTU3OWQ5NjA5OTBiNzNjNDIxZTQ5YTYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-alloydb/README.md | 1 + .../cloud/alloydb/v1beta/resources.proto | 31 +- .../google/cloud/alloydb/v1beta/service.proto | 111 +- .../google-cloud-alloydb/protos/protos.d.ts | 587 +++++++ .../google-cloud-alloydb/protos/protos.js | 1427 +++++++++++++++++ .../google-cloud-alloydb/protos/protos.json | 211 ++- .../google-cloud-alloydb/samples/README.md | 18 + .../v1beta/alloy_d_b_admin.export_cluster.js | 84 + ..._metadata_google.cloud.alloydb.v1beta.json | 56 + .../src/v1beta/alloy_d_b_admin_client.ts | 192 +++ .../v1beta/alloy_d_b_admin_client_config.json | 5 + .../src/v1beta/gapic_metadata.json | 10 + .../test/gapic_alloy_d_b_admin_v1beta.ts | 194 +++ 13 files changed, 2906 insertions(+), 21 deletions(-) create mode 100644 packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js diff --git a/packages/google-cloud-alloydb/README.md b/packages/google-cloud-alloydb/README.md index fd33454eb2e..1e034d37bef 100644 --- a/packages/google-cloud-alloydb/README.md +++ b/packages/google-cloud-alloydb/README.md @@ -195,6 +195,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Alloy_d_b_admin.delete_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.delete_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.delete_instance.js,packages/google-cloud-alloydb/samples/README.md) | | Alloy_d_b_admin.delete_user | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.delete_user.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.delete_user.js,packages/google-cloud-alloydb/samples/README.md) | | Alloy_d_b_admin.execute_sql | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.execute_sql.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.execute_sql.js,packages/google-cloud-alloydb/samples/README.md) | +| Alloy_d_b_admin.export_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js,packages/google-cloud-alloydb/samples/README.md) | | Alloy_d_b_admin.failover_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.failover_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.failover_instance.js,packages/google-cloud-alloydb/samples/README.md) | | Alloy_d_b_admin.generate_client_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.generate_client_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.generate_client_certificate.js,packages/google-cloud-alloydb/samples/README.md) | | Alloy_d_b_admin.get_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.get_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.get_backup.js,packages/google-cloud-alloydb/samples/README.md) | diff --git a/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/resources.proto b/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/resources.proto index 13771c22bf4..d91d84507d5 100644 --- a/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/resources.proto +++ b/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/resources.proto @@ -746,20 +746,21 @@ message Instance { // Nodes in an AlloyDB instance are ephemereal, they can change during // update, failover, autohealing and resize operations. message Node { - // The Compute Engine zone of the VM e.g. "us-central1-b". - string zone_id = 1; + // Output only. The Compute Engine zone of the VM e.g. "us-central1-b". + string zone_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The identifier of the VM e.g. "test-read-0601-407e52be-ms3l". - string id = 2; + // Output only. The identifier of the VM e.g. + // "test-read-0601-407e52be-ms3l". + string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The private IP address of the VM e.g. "10.57.0.34". - string ip = 3; + // Output only. The private IP address of the VM e.g. "10.57.0.34". + string ip = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Determined by state of the compute VM and postgres-service health. - // Compute VM state can have values listed in + // Output only. Determined by state of the compute VM and postgres-service + // health. Compute VM state can have values listed in // https://cloud.google.com/compute/docs/instances/instance-life-cycle and // postgres-service health can have values: HEALTHY and UNHEALTHY. - string state = 4; + string state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // QueryInsights Instance specific configuration. @@ -1032,11 +1033,13 @@ message Instance { // zone with available capacity. string gce_zone = 12; - // Database flags. Set at instance level. - // * They are copied from primary instance on read instance creation. - // * Read instances can set new or override existing flags that are relevant - // for reads, e.g. for enabling columnar cache on a read instance. Flags - // set on read instance may or may not be present on primary. + // Database flags. Set at the instance level. + // They are copied from the primary instance on secondary instance creation. + // Flags that have restrictions default to the value at primary + // instance on read instances during creation. Read instances can set new + // flags or override existing flags that are relevant for reads, for example, + // for enabling columnar cache on a read instance. Flags set on read instance + // might or might not be present on the primary instance. // // // This is a list of "key": "value" pairs. diff --git a/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/service.proto b/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/service.proto index ef0baee4f2f..decb97065f2 100644 --- a/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/service.proto +++ b/packages/google-cloud-alloydb/protos/google/cloud/alloydb/v1beta/service.proto @@ -88,6 +88,22 @@ service AlloyDBAdmin { }; } + // Exports data from the cluster. + // Imperative only. + rpc ExportCluster(ExportClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/clusters/*}:export" + body: "*" + }; + option (google.api.method_signature) = + "name,gcs_destination,database,csv_export_options,sql_export_options"; + option (google.longrunning.operation_info) = { + response_type: "ExportClusterResponse" + metadata_type: "OperationMetadata" + }; + } + // Upgrades a single Cluster. // Imperative only. rpc UpgradeCluster(UpgradeClusterRequest) @@ -629,6 +645,94 @@ message UpdateClusterRequest { bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Destination for Export. Export will be done to cloud storage. +message GcsDestination { + // Required. The path to the file in Google Cloud Storage where the export + // will be stored. The URI is in the form `gs://bucketName/fileName`. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Export cluster request. +message ExportClusterRequest { + // Options for exporting data in CSV format. + message CsvExportOptions { + // Required. The SELECT query used to extract the data. + string select_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies the character that separates columns within each row + // (line) of the file. The default is comma. The value of this argument has + // to be a character in Hex ASCII Code. + string field_delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the quoting character to be used when a data value is + // quoted. The default is double-quote. The value of this argument has to be + // a character in Hex ASCII Code. + string quote_character = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the character that should appear before a data + // character that needs to be escaped. The default is the same as quote + // character. The value of this argument has to be a character in Hex ASCII + // Code. + string escape_character = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Options for exporting data in SQL format. + message SqlExportOptions { + // Optional. Tables to export from. + repeated string tables = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, only export the schema. + optional bool schema_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, output commands to DROP all the dumped database + // objects prior to outputting the commands for creating them. + optional bool clean_target_objects = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, use DROP ... IF EXISTS commands to check for the + // object's existence before dropping it in clean_target_objects mode. + optional bool if_exist_target_objects = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Oneof field to support other destinations in future. + oneof destination { + // Required. Option to export data to cloud storage. + GcsDestination gcs_destination = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required field to specify export file type and options. + oneof export_options { + // Options for exporting data in CSV format. Required field to be set for + // CSV file type. + CsvExportOptions csv_export_options = 4; + + // Options for exporting data in SQL format. Required field to be set for + // SQL file type. + SqlExportOptions sql_export_options = 5; + } + + // Required. The resource name of the cluster. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } + ]; + + // Required. Name of the database where the export command will be executed. + // Note - Value provided should be the same as expected from + // `SELECT current_database();` and NOT as a resource reference. + string database = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response of export cluster rpc. +message ExportClusterResponse { + // Oneof field to support other destinations in future. + oneof destination { + // Required. Option to export data to cloud storage. + GcsDestination gcs_destination = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + // Upgrades a cluster. message UpgradeClusterRequest { // Required. The resource name of the cluster. @@ -1780,9 +1884,10 @@ message OperationMetadata { // Output only. Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/packages/google-cloud-alloydb/protos/protos.d.ts b/packages/google-cloud-alloydb/protos/protos.d.ts index b72f0f51c19..4d08ebc44b6 100644 --- a/packages/google-cloud-alloydb/protos/protos.d.ts +++ b/packages/google-cloud-alloydb/protos/protos.d.ts @@ -30737,6 +30737,20 @@ export namespace google { */ public updateCluster(request: google.cloud.alloydb.v1beta.IUpdateClusterRequest): Promise; + /** + * Calls ExportCluster. + * @param request ExportClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportCluster(request: google.cloud.alloydb.v1beta.IExportClusterRequest, callback: google.cloud.alloydb.v1beta.AlloyDBAdmin.ExportClusterCallback): void; + + /** + * Calls ExportCluster. + * @param request ExportClusterRequest message or plain object + * @returns Promise + */ + public exportCluster(request: google.cloud.alloydb.v1beta.IExportClusterRequest): Promise; + /** * Calls UpgradeCluster. * @param request UpgradeClusterRequest message or plain object @@ -31202,6 +31216,13 @@ export namespace google { */ type UpdateClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.alloydb.v1beta.AlloyDBAdmin|exportCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.alloydb.v1beta.AlloyDBAdmin|upgradeCluster}. * @param error Error, if any @@ -32116,6 +32137,572 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GcsDestination. */ + interface IGcsDestination { + + /** GcsDestination uri */ + uri?: (string|null); + } + + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { + + /** + * Constructs a new GcsDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.alloydb.v1beta.IGcsDestination); + + /** GcsDestination uri. */ + public uri: string; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsDestination instance + */ + public static create(properties?: google.cloud.alloydb.v1beta.IGcsDestination): google.cloud.alloydb.v1beta.GcsDestination; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.alloydb.v1beta.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.alloydb.v1beta.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.alloydb.v1beta.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.alloydb.v1beta.GcsDestination; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.alloydb.v1beta.GcsDestination; + + /** + * Verifies a GcsDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.alloydb.v1beta.GcsDestination; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.alloydb.v1beta.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportClusterRequest. */ + interface IExportClusterRequest { + + /** ExportClusterRequest gcsDestination */ + gcsDestination?: (google.cloud.alloydb.v1beta.IGcsDestination|null); + + /** ExportClusterRequest csvExportOptions */ + csvExportOptions?: (google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions|null); + + /** ExportClusterRequest sqlExportOptions */ + sqlExportOptions?: (google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions|null); + + /** ExportClusterRequest name */ + name?: (string|null); + + /** ExportClusterRequest database */ + database?: (string|null); + } + + /** Represents an ExportClusterRequest. */ + class ExportClusterRequest implements IExportClusterRequest { + + /** + * Constructs a new ExportClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.alloydb.v1beta.IExportClusterRequest); + + /** ExportClusterRequest gcsDestination. */ + public gcsDestination?: (google.cloud.alloydb.v1beta.IGcsDestination|null); + + /** ExportClusterRequest csvExportOptions. */ + public csvExportOptions?: (google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions|null); + + /** ExportClusterRequest sqlExportOptions. */ + public sqlExportOptions?: (google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions|null); + + /** ExportClusterRequest name. */ + public name: string; + + /** ExportClusterRequest database. */ + public database: string; + + /** ExportClusterRequest destination. */ + public destination?: "gcsDestination"; + + /** ExportClusterRequest exportOptions. */ + public exportOptions?: ("csvExportOptions"|"sqlExportOptions"); + + /** + * Creates a new ExportClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportClusterRequest instance + */ + public static create(properties?: google.cloud.alloydb.v1beta.IExportClusterRequest): google.cloud.alloydb.v1beta.ExportClusterRequest; + + /** + * Encodes the specified ExportClusterRequest message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.verify|verify} messages. + * @param message ExportClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.alloydb.v1beta.IExportClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportClusterRequest message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.verify|verify} messages. + * @param message ExportClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.alloydb.v1beta.IExportClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.alloydb.v1beta.ExportClusterRequest; + + /** + * Decodes an ExportClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.alloydb.v1beta.ExportClusterRequest; + + /** + * Verifies an ExportClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.alloydb.v1beta.ExportClusterRequest; + + /** + * Creates a plain object from an ExportClusterRequest message. Also converts values to other types if specified. + * @param message ExportClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.alloydb.v1beta.ExportClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExportClusterRequest { + + /** Properties of a CsvExportOptions. */ + interface ICsvExportOptions { + + /** CsvExportOptions selectQuery */ + selectQuery?: (string|null); + + /** CsvExportOptions fieldDelimiter */ + fieldDelimiter?: (string|null); + + /** CsvExportOptions quoteCharacter */ + quoteCharacter?: (string|null); + + /** CsvExportOptions escapeCharacter */ + escapeCharacter?: (string|null); + } + + /** Represents a CsvExportOptions. */ + class CsvExportOptions implements ICsvExportOptions { + + /** + * Constructs a new CsvExportOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions); + + /** CsvExportOptions selectQuery. */ + public selectQuery: string; + + /** CsvExportOptions fieldDelimiter. */ + public fieldDelimiter: string; + + /** CsvExportOptions quoteCharacter. */ + public quoteCharacter: string; + + /** CsvExportOptions escapeCharacter. */ + public escapeCharacter: string; + + /** + * Creates a new CsvExportOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvExportOptions instance + */ + public static create(properties?: google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions): google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions; + + /** + * Encodes the specified CsvExportOptions message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.verify|verify} messages. + * @param message CsvExportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvExportOptions message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.verify|verify} messages. + * @param message CsvExportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvExportOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions; + + /** + * Decodes a CsvExportOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions; + + /** + * Verifies a CsvExportOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvExportOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvExportOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions; + + /** + * Creates a plain object from a CsvExportOptions message. Also converts values to other types if specified. + * @param message CsvExportOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvExportOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvExportOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlExportOptions. */ + interface ISqlExportOptions { + + /** SqlExportOptions tables */ + tables?: (string[]|null); + + /** SqlExportOptions schemaOnly */ + schemaOnly?: (boolean|null); + + /** SqlExportOptions cleanTargetObjects */ + cleanTargetObjects?: (boolean|null); + + /** SqlExportOptions ifExistTargetObjects */ + ifExistTargetObjects?: (boolean|null); + } + + /** Represents a SqlExportOptions. */ + class SqlExportOptions implements ISqlExportOptions { + + /** + * Constructs a new SqlExportOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions); + + /** SqlExportOptions tables. */ + public tables: string[]; + + /** SqlExportOptions schemaOnly. */ + public schemaOnly?: (boolean|null); + + /** SqlExportOptions cleanTargetObjects. */ + public cleanTargetObjects?: (boolean|null); + + /** SqlExportOptions ifExistTargetObjects. */ + public ifExistTargetObjects?: (boolean|null); + + /** SqlExportOptions _schemaOnly. */ + public _schemaOnly?: "schemaOnly"; + + /** SqlExportOptions _cleanTargetObjects. */ + public _cleanTargetObjects?: "cleanTargetObjects"; + + /** SqlExportOptions _ifExistTargetObjects. */ + public _ifExistTargetObjects?: "ifExistTargetObjects"; + + /** + * Creates a new SqlExportOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlExportOptions instance + */ + public static create(properties?: google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions): google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions; + + /** + * Encodes the specified SqlExportOptions message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.verify|verify} messages. + * @param message SqlExportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlExportOptions message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.verify|verify} messages. + * @param message SqlExportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlExportOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions; + + /** + * Decodes a SqlExportOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions; + + /** + * Verifies a SqlExportOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SqlExportOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlExportOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions; + + /** + * Creates a plain object from a SqlExportOptions message. Also converts values to other types if specified. + * @param message SqlExportOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlExportOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlExportOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExportClusterResponse. */ + interface IExportClusterResponse { + + /** ExportClusterResponse gcsDestination */ + gcsDestination?: (google.cloud.alloydb.v1beta.IGcsDestination|null); + } + + /** Represents an ExportClusterResponse. */ + class ExportClusterResponse implements IExportClusterResponse { + + /** + * Constructs a new ExportClusterResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.alloydb.v1beta.IExportClusterResponse); + + /** ExportClusterResponse gcsDestination. */ + public gcsDestination?: (google.cloud.alloydb.v1beta.IGcsDestination|null); + + /** ExportClusterResponse destination. */ + public destination?: "gcsDestination"; + + /** + * Creates a new ExportClusterResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportClusterResponse instance + */ + public static create(properties?: google.cloud.alloydb.v1beta.IExportClusterResponse): google.cloud.alloydb.v1beta.ExportClusterResponse; + + /** + * Encodes the specified ExportClusterResponse message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterResponse.verify|verify} messages. + * @param message ExportClusterResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.alloydb.v1beta.IExportClusterResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportClusterResponse message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterResponse.verify|verify} messages. + * @param message ExportClusterResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.alloydb.v1beta.IExportClusterResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportClusterResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportClusterResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.alloydb.v1beta.ExportClusterResponse; + + /** + * Decodes an ExportClusterResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportClusterResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.alloydb.v1beta.ExportClusterResponse; + + /** + * Verifies an ExportClusterResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExportClusterResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportClusterResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.alloydb.v1beta.ExportClusterResponse; + + /** + * Creates a plain object from an ExportClusterResponse message. Also converts values to other types if specified. + * @param message ExportClusterResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.alloydb.v1beta.ExportClusterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportClusterResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportClusterResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an UpgradeClusterRequest. */ interface IUpgradeClusterRequest { diff --git a/packages/google-cloud-alloydb/protos/protos.js b/packages/google-cloud-alloydb/protos/protos.js index d165fa4650b..1bfa5f95098 100644 --- a/packages/google-cloud-alloydb/protos/protos.js +++ b/packages/google-cloud-alloydb/protos/protos.js @@ -79184,6 +79184,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.alloydb.v1beta.AlloyDBAdmin|exportCluster}. + * @memberof google.cloud.alloydb.v1beta.AlloyDBAdmin + * @typedef ExportClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportCluster. + * @function exportCluster + * @memberof google.cloud.alloydb.v1beta.AlloyDBAdmin + * @instance + * @param {google.cloud.alloydb.v1beta.IExportClusterRequest} request ExportClusterRequest message or plain object + * @param {google.cloud.alloydb.v1beta.AlloyDBAdmin.ExportClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlloyDBAdmin.prototype.exportCluster = function exportCluster(request, callback) { + return this.rpcCall(exportCluster, $root.google.cloud.alloydb.v1beta.ExportClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportCluster" }); + + /** + * Calls ExportCluster. + * @function exportCluster + * @memberof google.cloud.alloydb.v1beta.AlloyDBAdmin + * @instance + * @param {google.cloud.alloydb.v1beta.IExportClusterRequest} request ExportClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.alloydb.v1beta.AlloyDBAdmin|upgradeCluster}. * @memberof google.cloud.alloydb.v1beta.AlloyDBAdmin @@ -81953,6 +81986,1400 @@ return UpdateClusterRequest; })(); + v1beta.GcsDestination = (function() { + + /** + * Properties of a GcsDestination. + * @memberof google.cloud.alloydb.v1beta + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri + */ + + /** + * Constructs a new GcsDestination. + * @memberof google.cloud.alloydb.v1beta + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination + * @constructor + * @param {google.cloud.alloydb.v1beta.IGcsDestination=} [properties] Properties to set + */ + function GcsDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @instance + */ + GcsDestination.prototype.uri = ""; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @function create + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {google.cloud.alloydb.v1beta.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.alloydb.v1beta.GcsDestination} GcsDestination instance + */ + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); + }; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.alloydb.v1beta.GcsDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {google.cloud.alloydb.v1beta.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.GcsDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {google.cloud.alloydb.v1beta.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.alloydb.v1beta.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.alloydb.v1beta.GcsDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.alloydb.v1beta.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsDestination message. + * @function verify + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.alloydb.v1beta.GcsDestination} GcsDestination + */ + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.alloydb.v1beta.GcsDestination) + return object; + var message = new $root.google.cloud.alloydb.v1beta.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {google.cloud.alloydb.v1beta.GcsDestination} message GcsDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this GcsDestination to JSON. + * @function toJSON + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @instance + * @returns {Object.} JSON object + */ + GcsDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsDestination + * @function getTypeUrl + * @memberof google.cloud.alloydb.v1beta.GcsDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.alloydb.v1beta.GcsDestination"; + }; + + return GcsDestination; + })(); + + v1beta.ExportClusterRequest = (function() { + + /** + * Properties of an ExportClusterRequest. + * @memberof google.cloud.alloydb.v1beta + * @interface IExportClusterRequest + * @property {google.cloud.alloydb.v1beta.IGcsDestination|null} [gcsDestination] ExportClusterRequest gcsDestination + * @property {google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions|null} [csvExportOptions] ExportClusterRequest csvExportOptions + * @property {google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions|null} [sqlExportOptions] ExportClusterRequest sqlExportOptions + * @property {string|null} [name] ExportClusterRequest name + * @property {string|null} [database] ExportClusterRequest database + */ + + /** + * Constructs a new ExportClusterRequest. + * @memberof google.cloud.alloydb.v1beta + * @classdesc Represents an ExportClusterRequest. + * @implements IExportClusterRequest + * @constructor + * @param {google.cloud.alloydb.v1beta.IExportClusterRequest=} [properties] Properties to set + */ + function ExportClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportClusterRequest gcsDestination. + * @member {google.cloud.alloydb.v1beta.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + */ + ExportClusterRequest.prototype.gcsDestination = null; + + /** + * ExportClusterRequest csvExportOptions. + * @member {google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions|null|undefined} csvExportOptions + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + */ + ExportClusterRequest.prototype.csvExportOptions = null; + + /** + * ExportClusterRequest sqlExportOptions. + * @member {google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions|null|undefined} sqlExportOptions + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + */ + ExportClusterRequest.prototype.sqlExportOptions = null; + + /** + * ExportClusterRequest name. + * @member {string} name + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + */ + ExportClusterRequest.prototype.name = ""; + + /** + * ExportClusterRequest database. + * @member {string} database + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + */ + ExportClusterRequest.prototype.database = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportClusterRequest destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + */ + Object.defineProperty(ExportClusterRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ExportClusterRequest exportOptions. + * @member {"csvExportOptions"|"sqlExportOptions"|undefined} exportOptions + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + */ + Object.defineProperty(ExportClusterRequest.prototype, "exportOptions", { + get: $util.oneOfGetter($oneOfFields = ["csvExportOptions", "sqlExportOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {google.cloud.alloydb.v1beta.IExportClusterRequest=} [properties] Properties to set + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest} ExportClusterRequest instance + */ + ExportClusterRequest.create = function create(properties) { + return new ExportClusterRequest(properties); + }; + + /** + * Encodes the specified ExportClusterRequest message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {google.cloud.alloydb.v1beta.IExportClusterRequest} message ExportClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination")) + $root.google.cloud.alloydb.v1beta.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.database); + if (message.csvExportOptions != null && Object.hasOwnProperty.call(message, "csvExportOptions")) + $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.encode(message.csvExportOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sqlExportOptions != null && Object.hasOwnProperty.call(message, "sqlExportOptions")) + $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.encode(message.sqlExportOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportClusterRequest message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {google.cloud.alloydb.v1beta.IExportClusterRequest} message ExportClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest} ExportClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.alloydb.v1beta.ExportClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.gcsDestination = $root.google.cloud.alloydb.v1beta.GcsDestination.decode(reader, reader.uint32()); + break; + } + case 4: { + message.csvExportOptions = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.sqlExportOptions = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.database = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest} ExportClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportClusterRequest message. + * @function verify + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.alloydb.v1beta.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + if (message.csvExportOptions != null && message.hasOwnProperty("csvExportOptions")) { + properties.exportOptions = 1; + { + var error = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.verify(message.csvExportOptions); + if (error) + return "csvExportOptions." + error; + } + } + if (message.sqlExportOptions != null && message.hasOwnProperty("sqlExportOptions")) { + if (properties.exportOptions === 1) + return "exportOptions: multiple values"; + properties.exportOptions = 1; + { + var error = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.verify(message.sqlExportOptions); + if (error) + return "sqlExportOptions." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + return null; + }; + + /** + * Creates an ExportClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest} ExportClusterRequest + */ + ExportClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.alloydb.v1beta.ExportClusterRequest) + return object; + var message = new $root.google.cloud.alloydb.v1beta.ExportClusterRequest(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.alloydb.v1beta.ExportClusterRequest.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.alloydb.v1beta.GcsDestination.fromObject(object.gcsDestination); + } + if (object.csvExportOptions != null) { + if (typeof object.csvExportOptions !== "object") + throw TypeError(".google.cloud.alloydb.v1beta.ExportClusterRequest.csvExportOptions: object expected"); + message.csvExportOptions = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.fromObject(object.csvExportOptions); + } + if (object.sqlExportOptions != null) { + if (typeof object.sqlExportOptions !== "object") + throw TypeError(".google.cloud.alloydb.v1beta.ExportClusterRequest.sqlExportOptions: object expected"); + message.sqlExportOptions = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.fromObject(object.sqlExportOptions); + } + if (object.name != null) + message.name = String(object.name); + if (object.database != null) + message.database = String(object.database); + return message; + }; + + /** + * Creates a plain object from an ExportClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest} message ExportClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.database = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.alloydb.v1beta.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.csvExportOptions != null && message.hasOwnProperty("csvExportOptions")) { + object.csvExportOptions = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.toObject(message.csvExportOptions, options); + if (options.oneofs) + object.exportOptions = "csvExportOptions"; + } + if (message.sqlExportOptions != null && message.hasOwnProperty("sqlExportOptions")) { + object.sqlExportOptions = $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.toObject(message.sqlExportOptions, options); + if (options.oneofs) + object.exportOptions = "sqlExportOptions"; + } + return object; + }; + + /** + * Converts this ExportClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @instance + * @returns {Object.} JSON object + */ + ExportClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportClusterRequest + * @function getTypeUrl + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.alloydb.v1beta.ExportClusterRequest"; + }; + + ExportClusterRequest.CsvExportOptions = (function() { + + /** + * Properties of a CsvExportOptions. + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @interface ICsvExportOptions + * @property {string|null} [selectQuery] CsvExportOptions selectQuery + * @property {string|null} [fieldDelimiter] CsvExportOptions fieldDelimiter + * @property {string|null} [quoteCharacter] CsvExportOptions quoteCharacter + * @property {string|null} [escapeCharacter] CsvExportOptions escapeCharacter + */ + + /** + * Constructs a new CsvExportOptions. + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @classdesc Represents a CsvExportOptions. + * @implements ICsvExportOptions + * @constructor + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions=} [properties] Properties to set + */ + function CsvExportOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvExportOptions selectQuery. + * @member {string} selectQuery + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @instance + */ + CsvExportOptions.prototype.selectQuery = ""; + + /** + * CsvExportOptions fieldDelimiter. + * @member {string} fieldDelimiter + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @instance + */ + CsvExportOptions.prototype.fieldDelimiter = ""; + + /** + * CsvExportOptions quoteCharacter. + * @member {string} quoteCharacter + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @instance + */ + CsvExportOptions.prototype.quoteCharacter = ""; + + /** + * CsvExportOptions escapeCharacter. + * @member {string} escapeCharacter + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @instance + */ + CsvExportOptions.prototype.escapeCharacter = ""; + + /** + * Creates a new CsvExportOptions instance using the specified properties. + * @function create + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions=} [properties] Properties to set + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions} CsvExportOptions instance + */ + CsvExportOptions.create = function create(properties) { + return new CsvExportOptions(properties); + }; + + /** + * Encodes the specified CsvExportOptions message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions} message CsvExportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvExportOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selectQuery != null && Object.hasOwnProperty.call(message, "selectQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectQuery); + if (message.fieldDelimiter != null && Object.hasOwnProperty.call(message, "fieldDelimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldDelimiter); + if (message.quoteCharacter != null && Object.hasOwnProperty.call(message, "quoteCharacter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.quoteCharacter); + if (message.escapeCharacter != null && Object.hasOwnProperty.call(message, "escapeCharacter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.escapeCharacter); + return writer; + }; + + /** + * Encodes the specified CsvExportOptions message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ICsvExportOptions} message CsvExportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvExportOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvExportOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions} CsvExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvExportOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selectQuery = reader.string(); + break; + } + case 2: { + message.fieldDelimiter = reader.string(); + break; + } + case 3: { + message.quoteCharacter = reader.string(); + break; + } + case 4: { + message.escapeCharacter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvExportOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions} CsvExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvExportOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvExportOptions message. + * @function verify + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvExportOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + if (!$util.isString(message.selectQuery)) + return "selectQuery: string expected"; + if (message.fieldDelimiter != null && message.hasOwnProperty("fieldDelimiter")) + if (!$util.isString(message.fieldDelimiter)) + return "fieldDelimiter: string expected"; + if (message.quoteCharacter != null && message.hasOwnProperty("quoteCharacter")) + if (!$util.isString(message.quoteCharacter)) + return "quoteCharacter: string expected"; + if (message.escapeCharacter != null && message.hasOwnProperty("escapeCharacter")) + if (!$util.isString(message.escapeCharacter)) + return "escapeCharacter: string expected"; + return null; + }; + + /** + * Creates a CsvExportOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions} CsvExportOptions + */ + CsvExportOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions) + return object; + var message = new $root.google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions(); + if (object.selectQuery != null) + message.selectQuery = String(object.selectQuery); + if (object.fieldDelimiter != null) + message.fieldDelimiter = String(object.fieldDelimiter); + if (object.quoteCharacter != null) + message.quoteCharacter = String(object.quoteCharacter); + if (object.escapeCharacter != null) + message.escapeCharacter = String(object.escapeCharacter); + return message; + }; + + /** + * Creates a plain object from a CsvExportOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions} message CsvExportOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvExportOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selectQuery = ""; + object.fieldDelimiter = ""; + object.quoteCharacter = ""; + object.escapeCharacter = ""; + } + if (message.selectQuery != null && message.hasOwnProperty("selectQuery")) + object.selectQuery = message.selectQuery; + if (message.fieldDelimiter != null && message.hasOwnProperty("fieldDelimiter")) + object.fieldDelimiter = message.fieldDelimiter; + if (message.quoteCharacter != null && message.hasOwnProperty("quoteCharacter")) + object.quoteCharacter = message.quoteCharacter; + if (message.escapeCharacter != null && message.hasOwnProperty("escapeCharacter")) + object.escapeCharacter = message.escapeCharacter; + return object; + }; + + /** + * Converts this CsvExportOptions to JSON. + * @function toJSON + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @instance + * @returns {Object.} JSON object + */ + CsvExportOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CsvExportOptions + * @function getTypeUrl + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvExportOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions"; + }; + + return CsvExportOptions; + })(); + + ExportClusterRequest.SqlExportOptions = (function() { + + /** + * Properties of a SqlExportOptions. + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @interface ISqlExportOptions + * @property {Array.|null} [tables] SqlExportOptions tables + * @property {boolean|null} [schemaOnly] SqlExportOptions schemaOnly + * @property {boolean|null} [cleanTargetObjects] SqlExportOptions cleanTargetObjects + * @property {boolean|null} [ifExistTargetObjects] SqlExportOptions ifExistTargetObjects + */ + + /** + * Constructs a new SqlExportOptions. + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest + * @classdesc Represents a SqlExportOptions. + * @implements ISqlExportOptions + * @constructor + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions=} [properties] Properties to set + */ + function SqlExportOptions(properties) { + this.tables = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SqlExportOptions tables. + * @member {Array.} tables + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + */ + SqlExportOptions.prototype.tables = $util.emptyArray; + + /** + * SqlExportOptions schemaOnly. + * @member {boolean|null|undefined} schemaOnly + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + */ + SqlExportOptions.prototype.schemaOnly = null; + + /** + * SqlExportOptions cleanTargetObjects. + * @member {boolean|null|undefined} cleanTargetObjects + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + */ + SqlExportOptions.prototype.cleanTargetObjects = null; + + /** + * SqlExportOptions ifExistTargetObjects. + * @member {boolean|null|undefined} ifExistTargetObjects + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + */ + SqlExportOptions.prototype.ifExistTargetObjects = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SqlExportOptions _schemaOnly. + * @member {"schemaOnly"|undefined} _schemaOnly + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + */ + Object.defineProperty(SqlExportOptions.prototype, "_schemaOnly", { + get: $util.oneOfGetter($oneOfFields = ["schemaOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SqlExportOptions _cleanTargetObjects. + * @member {"cleanTargetObjects"|undefined} _cleanTargetObjects + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + */ + Object.defineProperty(SqlExportOptions.prototype, "_cleanTargetObjects", { + get: $util.oneOfGetter($oneOfFields = ["cleanTargetObjects"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SqlExportOptions _ifExistTargetObjects. + * @member {"ifExistTargetObjects"|undefined} _ifExistTargetObjects + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + */ + Object.defineProperty(SqlExportOptions.prototype, "_ifExistTargetObjects", { + get: $util.oneOfGetter($oneOfFields = ["ifExistTargetObjects"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SqlExportOptions instance using the specified properties. + * @function create + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions=} [properties] Properties to set + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions} SqlExportOptions instance + */ + SqlExportOptions.create = function create(properties) { + return new SqlExportOptions(properties); + }; + + /** + * Encodes the specified SqlExportOptions message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions} message SqlExportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlExportOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tables[i]); + if (message.schemaOnly != null && Object.hasOwnProperty.call(message, "schemaOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.schemaOnly); + if (message.cleanTargetObjects != null && Object.hasOwnProperty.call(message, "cleanTargetObjects")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.cleanTargetObjects); + if (message.ifExistTargetObjects != null && Object.hasOwnProperty.call(message, "ifExistTargetObjects")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ifExistTargetObjects); + return writer; + }; + + /** + * Encodes the specified SqlExportOptions message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.ISqlExportOptions} message SqlExportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlExportOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlExportOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions} SqlExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlExportOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); + break; + } + case 2: { + message.schemaOnly = reader.bool(); + break; + } + case 3: { + message.cleanTargetObjects = reader.bool(); + break; + } + case 4: { + message.ifExistTargetObjects = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlExportOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions} SqlExportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlExportOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlExportOptions message. + * @function verify + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlExportOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; + } + if (message.schemaOnly != null && message.hasOwnProperty("schemaOnly")) { + properties._schemaOnly = 1; + if (typeof message.schemaOnly !== "boolean") + return "schemaOnly: boolean expected"; + } + if (message.cleanTargetObjects != null && message.hasOwnProperty("cleanTargetObjects")) { + properties._cleanTargetObjects = 1; + if (typeof message.cleanTargetObjects !== "boolean") + return "cleanTargetObjects: boolean expected"; + } + if (message.ifExistTargetObjects != null && message.hasOwnProperty("ifExistTargetObjects")) { + properties._ifExistTargetObjects = 1; + if (typeof message.ifExistTargetObjects !== "boolean") + return "ifExistTargetObjects: boolean expected"; + } + return null; + }; + + /** + * Creates a SqlExportOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions} SqlExportOptions + */ + SqlExportOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions) + return object; + var message = new $root.google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions(); + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); + } + if (object.schemaOnly != null) + message.schemaOnly = Boolean(object.schemaOnly); + if (object.cleanTargetObjects != null) + message.cleanTargetObjects = Boolean(object.cleanTargetObjects); + if (object.ifExistTargetObjects != null) + message.ifExistTargetObjects = Boolean(object.ifExistTargetObjects); + return message; + }; + + /** + * Creates a plain object from a SqlExportOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions} message SqlExportOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlExportOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tables = []; + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; + } + if (message.schemaOnly != null && message.hasOwnProperty("schemaOnly")) { + object.schemaOnly = message.schemaOnly; + if (options.oneofs) + object._schemaOnly = "schemaOnly"; + } + if (message.cleanTargetObjects != null && message.hasOwnProperty("cleanTargetObjects")) { + object.cleanTargetObjects = message.cleanTargetObjects; + if (options.oneofs) + object._cleanTargetObjects = "cleanTargetObjects"; + } + if (message.ifExistTargetObjects != null && message.hasOwnProperty("ifExistTargetObjects")) { + object.ifExistTargetObjects = message.ifExistTargetObjects; + if (options.oneofs) + object._ifExistTargetObjects = "ifExistTargetObjects"; + } + return object; + }; + + /** + * Converts this SqlExportOptions to JSON. + * @function toJSON + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @instance + * @returns {Object.} JSON object + */ + SqlExportOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlExportOptions + * @function getTypeUrl + * @memberof google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlExportOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions"; + }; + + return SqlExportOptions; + })(); + + return ExportClusterRequest; + })(); + + v1beta.ExportClusterResponse = (function() { + + /** + * Properties of an ExportClusterResponse. + * @memberof google.cloud.alloydb.v1beta + * @interface IExportClusterResponse + * @property {google.cloud.alloydb.v1beta.IGcsDestination|null} [gcsDestination] ExportClusterResponse gcsDestination + */ + + /** + * Constructs a new ExportClusterResponse. + * @memberof google.cloud.alloydb.v1beta + * @classdesc Represents an ExportClusterResponse. + * @implements IExportClusterResponse + * @constructor + * @param {google.cloud.alloydb.v1beta.IExportClusterResponse=} [properties] Properties to set + */ + function ExportClusterResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportClusterResponse gcsDestination. + * @member {google.cloud.alloydb.v1beta.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @instance + */ + ExportClusterResponse.prototype.gcsDestination = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportClusterResponse destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @instance + */ + Object.defineProperty(ExportClusterResponse.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportClusterResponse instance using the specified properties. + * @function create + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {google.cloud.alloydb.v1beta.IExportClusterResponse=} [properties] Properties to set + * @returns {google.cloud.alloydb.v1beta.ExportClusterResponse} ExportClusterResponse instance + */ + ExportClusterResponse.create = function create(properties) { + return new ExportClusterResponse(properties); + }; + + /** + * Encodes the specified ExportClusterResponse message. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {google.cloud.alloydb.v1beta.IExportClusterResponse} message ExportClusterResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportClusterResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination")) + $root.google.cloud.alloydb.v1beta.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportClusterResponse message, length delimited. Does not implicitly {@link google.cloud.alloydb.v1beta.ExportClusterResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {google.cloud.alloydb.v1beta.IExportClusterResponse} message ExportClusterResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportClusterResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportClusterResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.alloydb.v1beta.ExportClusterResponse} ExportClusterResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportClusterResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.alloydb.v1beta.ExportClusterResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.gcsDestination = $root.google.cloud.alloydb.v1beta.GcsDestination.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportClusterResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.alloydb.v1beta.ExportClusterResponse} ExportClusterResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportClusterResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportClusterResponse message. + * @function verify + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportClusterResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.alloydb.v1beta.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + return null; + }; + + /** + * Creates an ExportClusterResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.alloydb.v1beta.ExportClusterResponse} ExportClusterResponse + */ + ExportClusterResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.alloydb.v1beta.ExportClusterResponse) + return object; + var message = new $root.google.cloud.alloydb.v1beta.ExportClusterResponse(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.alloydb.v1beta.ExportClusterResponse.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.alloydb.v1beta.GcsDestination.fromObject(object.gcsDestination); + } + return message; + }; + + /** + * Creates a plain object from an ExportClusterResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {google.cloud.alloydb.v1beta.ExportClusterResponse} message ExportClusterResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportClusterResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.alloydb.v1beta.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } + return object; + }; + + /** + * Converts this ExportClusterResponse to JSON. + * @function toJSON + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @instance + * @returns {Object.} JSON object + */ + ExportClusterResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportClusterResponse + * @function getTypeUrl + * @memberof google.cloud.alloydb.v1beta.ExportClusterResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportClusterResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.alloydb.v1beta.ExportClusterResponse"; + }; + + return ExportClusterResponse; + })(); + v1beta.UpgradeClusterRequest = (function() { /** diff --git a/packages/google-cloud-alloydb/protos/protos.json b/packages/google-cloud-alloydb/protos/protos.json index 32cb33a4dcd..1a73a421db8 100644 --- a/packages/google-cloud-alloydb/protos/protos.json +++ b/packages/google-cloud-alloydb/protos/protos.json @@ -9217,19 +9217,31 @@ "fields": { "zoneId": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "id": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "ip": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "state": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -10048,6 +10060,34 @@ } ] }, + "ExportCluster": { + "requestType": "ExportClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{name=projects/*/locations/*/clusters/*}:export", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,gcs_destination,database,csv_export_options,sql_export_options", + "(google.longrunning.operation_info).response_type": "ExportClusterResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=projects/*/locations/*/clusters/*}:export", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,gcs_destination,database,csv_export_options,sql_export_options" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ExportClusterResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, "UpgradeCluster": { "requestType": "UpgradeClusterRequest", "responseType": "google.longrunning.Operation", @@ -10965,6 +11005,169 @@ } } }, + "GcsDestination": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExportClusterRequest": { + "oneofs": { + "destination": { + "oneof": [ + "gcsDestination" + ] + }, + "exportOptions": { + "oneof": [ + "csvExportOptions", + "sqlExportOptions" + ] + } + }, + "fields": { + "gcsDestination": { + "type": "GcsDestination", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "csvExportOptions": { + "type": "CsvExportOptions", + "id": 4 + }, + "sqlExportOptions": { + "type": "SqlExportOptions", + "id": 5 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "alloydb.googleapis.com/Cluster" + } + }, + "database": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "CsvExportOptions": { + "fields": { + "selectQuery": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fieldDelimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quoteCharacter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "escapeCharacter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SqlExportOptions": { + "oneofs": { + "_schemaOnly": { + "oneof": [ + "schemaOnly" + ] + }, + "_cleanTargetObjects": { + "oneof": [ + "cleanTargetObjects" + ] + }, + "_ifExistTargetObjects": { + "oneof": [ + "ifExistTargetObjects" + ] + } + }, + "fields": { + "tables": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaOnly": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "cleanTargetObjects": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ifExistTargetObjects": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + } + } + }, + "ExportClusterResponse": { + "oneofs": { + "destination": { + "oneof": [ + "gcsDestination" + ] + } + }, + "fields": { + "gcsDestination": { + "type": "GcsDestination", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "UpgradeClusterRequest": { "fields": { "name": { diff --git a/packages/google-cloud-alloydb/samples/README.md b/packages/google-cloud-alloydb/samples/README.md index f317aa646d8..7b4b4394032 100644 --- a/packages/google-cloud-alloydb/samples/README.md +++ b/packages/google-cloud-alloydb/samples/README.md @@ -93,6 +93,7 @@ * [Alloy_d_b_admin.delete_instance](#alloy_d_b_admin.delete_instance) * [Alloy_d_b_admin.delete_user](#alloy_d_b_admin.delete_user) * [Alloy_d_b_admin.execute_sql](#alloy_d_b_admin.execute_sql) + * [Alloy_d_b_admin.export_cluster](#alloy_d_b_admin.export_cluster) * [Alloy_d_b_admin.failover_instance](#alloy_d_b_admin.failover_instance) * [Alloy_d_b_admin.generate_client_certificate](#alloy_d_b_admin.generate_client_certificate) * [Alloy_d_b_admin.get_backup](#alloy_d_b_admin.get_backup) @@ -1510,6 +1511,23 @@ __Usage:__ +### Alloy_d_b_admin.export_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js` + + +----- + + + + ### Alloy_d_b_admin.failover_instance View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.failover_instance.js). diff --git a/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js b/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js new file mode 100644 index 00000000000..f2672285c81 --- /dev/null +++ b/packages/google-cloud-alloydb/samples/generated/v1beta/alloy_d_b_admin.export_cluster.js @@ -0,0 +1,84 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(gcsDestination, name, database) { + // [START alloydb_v1beta_generated_AlloyDBAdmin_ExportCluster_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. + */ + /** + * Required. Option to export data to cloud storage. + */ + // const gcsDestination = {} + /** + * Options for exporting data in CSV format. Required field to be set for + * CSV file type. + */ + // const csvExportOptions = {} + /** + * Options for exporting data in SQL format. Required field to be set for + * SQL file type. + */ + // const sqlExportOptions = {} + /** + * Required. The resource name of the cluster. + */ + // const name = 'abc123' + /** + * Required. Name of the database where the export command will be executed. + * Note - Value provided should be the same as expected from + * `SELECT current_database();` and NOT as a resource reference. + */ + // const database = 'abc123' + + // Imports the Alloydb library + const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1beta; + + // Instantiates a client + const alloydbClient = new AlloyDBAdminClient(); + + async function callExportCluster() { + // Construct request + const request = { + gcsDestination, + name, + database, + }; + + // Run request + const [operation] = await alloydbClient.exportCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callExportCluster(); + // [END alloydb_v1beta_generated_AlloyDBAdmin_ExportCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json index 59d062262ad..ae75a76d31b 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json +++ b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json @@ -223,6 +223,62 @@ } } }, + { + "regionTag": "alloydb_v1beta_generated_AlloyDBAdmin_ExportCluster_async", + "title": "AlloyDBAdmin exportCluster Sample", + "origin": "API_DEFINITION", + "description": " Exports data from the cluster. Imperative only.", + "canonical": true, + "file": "alloy_d_b_admin.export_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportCluster", + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdmin.ExportCluster", + "async": true, + "parameters": [ + { + "name": "gcs_destination", + "type": ".google.cloud.alloydb.v1beta.GcsDestination" + }, + { + "name": "csv_export_options", + "type": ".google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions" + }, + { + "name": "sql_export_options", + "type": ".google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions" + }, + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "database", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AlloyDBAdminClient", + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdminClient" + }, + "method": { + "shortName": "ExportCluster", + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdmin.ExportCluster", + "service": { + "shortName": "AlloyDBAdmin", + "fullName": "google.cloud.alloydb.v1beta.AlloyDBAdmin" + } + } + } + }, { "regionTag": "alloydb_v1beta_generated_AlloyDBAdmin_UpgradeCluster_async", "title": "AlloyDBAdmin upgradeCluster Sample", diff --git a/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts b/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts index 8fcf7b2e59f..ddafbe9a51c 100644 --- a/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts +++ b/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts @@ -334,6 +334,12 @@ export class AlloyDBAdminClient { const updateClusterMetadata = protoFilesRoot.lookup( '.google.cloud.alloydb.v1beta.OperationMetadata' ) as gax.protobuf.Type; + const exportClusterResponse = protoFilesRoot.lookup( + '.google.cloud.alloydb.v1beta.ExportClusterResponse' + ) as gax.protobuf.Type; + const exportClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.alloydb.v1beta.OperationMetadata' + ) as gax.protobuf.Type; const upgradeClusterResponse = protoFilesRoot.lookup( '.google.cloud.alloydb.v1beta.UpgradeClusterResponse' ) as gax.protobuf.Type; @@ -448,6 +454,11 @@ export class AlloyDBAdminClient { updateClusterResponse.decode.bind(updateClusterResponse), updateClusterMetadata.decode.bind(updateClusterMetadata) ), + exportCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + exportClusterResponse.decode.bind(exportClusterResponse), + exportClusterMetadata.decode.bind(exportClusterMetadata) + ), upgradeCluster: new this._gaxModule.LongrunningDescriptor( this.operationsClient, upgradeClusterResponse.decode.bind(upgradeClusterResponse), @@ -597,6 +608,7 @@ export class AlloyDBAdminClient { 'getCluster', 'createCluster', 'updateCluster', + 'exportCluster', 'upgradeCluster', 'deleteCluster', 'promoteCluster', @@ -2385,6 +2397,186 @@ export class AlloyDBAdminClient { protos.google.cloud.alloydb.v1beta.OperationMetadata >; } + /** + * Exports data from the cluster. + * Imperative only. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.alloydb.v1beta.GcsDestination} request.gcsDestination + * Required. Option to export data to cloud storage. + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.CsvExportOptions} request.csvExportOptions + * Options for exporting data in CSV format. Required field to be set for + * CSV file type. + * @param {google.cloud.alloydb.v1beta.ExportClusterRequest.SqlExportOptions} request.sqlExportOptions + * Options for exporting data in SQL format. Required field to be set for + * SQL file type. + * @param {string} request.name + * Required. The resource name of the cluster. + * @param {string} request.database + * Required. Name of the database where the export command will be executed. + * Note - Value provided should be the same as expected from + * `SELECT current_database();` and NOT as a resource reference. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/alloy_d_b_admin.export_cluster.js + * region_tag:alloydb_v1beta_generated_AlloyDBAdmin_ExportCluster_async + */ + exportCluster( + request?: protos.google.cloud.alloydb.v1beta.IExportClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + exportCluster( + request: protos.google.cloud.alloydb.v1beta.IExportClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportCluster( + request: protos.google.cloud.alloydb.v1beta.IExportClusterRequest, + callback: Callback< + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportCluster( + request?: protos.google.cloud.alloydb.v1beta.IExportClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('exportCluster response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('exportCluster request %j', request); + return this.innerApiCalls + .exportCluster(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('exportCluster response %j', rawResponse); + return [response, rawResponse, _]; + } + ); + } + /** + * Check the status of the long running operation returned by `exportCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/alloy_d_b_admin.export_cluster.js + * region_tag:alloydb_v1beta_generated_AlloyDBAdmin_ExportCluster_async + */ + async checkExportClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.alloydb.v1beta.ExportClusterResponse, + protos.google.cloud.alloydb.v1beta.OperationMetadata + > + > { + this._log.info('exportCluster long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.exportCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.alloydb.v1beta.ExportClusterResponse, + protos.google.cloud.alloydb.v1beta.OperationMetadata + >; + } /** * Upgrades a single Cluster. * Imperative only. diff --git a/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client_config.json b/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client_config.json index f924c59f183..096957ba49c 100644 --- a/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client_config.json +++ b/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client_config.json @@ -52,6 +52,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "ExportCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "UpgradeCluster": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-alloydb/src/v1beta/gapic_metadata.json b/packages/google-cloud-alloydb/src/v1beta/gapic_metadata.json index 6bca17b3307..0771443cc9c 100644 --- a/packages/google-cloud-alloydb/src/v1beta/gapic_metadata.json +++ b/packages/google-cloud-alloydb/src/v1beta/gapic_metadata.json @@ -70,6 +70,11 @@ "updateCluster" ] }, + "ExportCluster": { + "methods": [ + "exportCluster" + ] + }, "UpgradeCluster": { "methods": [ "upgradeCluster" @@ -262,6 +267,11 @@ "updateCluster" ] }, + "ExportCluster": { + "methods": [ + "exportCluster" + ] + }, "UpgradeCluster": { "methods": [ "upgradeCluster" diff --git a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts index 9ccf5689bae..9edefabbdb7 100644 --- a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts +++ b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts @@ -2040,6 +2040,200 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); + describe('exportCluster', () => { + it('invokes exportCluster without error', async () => { + const client = new alloydbadminModule.v1beta.AlloyDBAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.alloydb.v1beta.ExportClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.exportCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportCluster without error using callback', async () => { + const client = new alloydbadminModule.v1beta.AlloyDBAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.alloydb.v1beta.ExportClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.alloydb.v1beta.IExportClusterResponse, + protos.google.cloud.alloydb.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportCluster with call error', async () => { + const client = new alloydbadminModule.v1beta.AlloyDBAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.alloydb.v1beta.ExportClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.exportCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportCluster with LRO error', async () => { + const client = new alloydbadminModule.v1beta.AlloyDBAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.alloydb.v1beta.ExportClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.exportCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkExportClusterProgress without error', async () => { + const client = new alloydbadminModule.v1beta.AlloyDBAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkExportClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportClusterProgress with error', async () => { + const client = new alloydbadminModule.v1beta.AlloyDBAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkExportClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('upgradeCluster', () => { it('invokes upgradeCluster without error', async () => { const client = new alloydbadminModule.v1beta.AlloyDBAdminClient({ From ab8bf7fb6a3a81dd619a7ecf0e4cdb0d46f99dc7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:26:59 -0700 Subject: [PATCH 13/34] docs: [recaptchaenterprise] fix typo in FraudPrevention.DISABLE comment (#6175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix typo in FraudPrevention.DISABLE comment PiperOrigin-RevId: 738067567 Source-Link: https://github.com/googleapis/googleapis/commit/3ce116857cb29c22c70bd3aef289b7a0019cd52e Source-Link: https://github.com/googleapis/googleapis-gen/commit/2d54469d639e813035f6c3571289f8ec38e2a86f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYWVudGVycHJpc2UvLk93bEJvdC55YW1sIiwiaCI6IjJkNTQ0NjlkNjM5ZTgxMzAzNWY2YzM1NzEyODlmOGVjMzhlMmE4NmYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../recaptchaenterprise/v1beta1/recaptchaenterprise.proto | 4 ++-- .../snippet_metadata.google.cloud.recaptchaenterprise.v1.json | 2 +- .../snippet_metadata_google.cloud.recaptchaenterprise.v1.json | 2 +- ...pet_metadata.google.cloud.recaptchaenterprise.v1beta1.json | 2 +- ...pet_metadata_google.cloud.recaptchaenterprise.v1beta1.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto index fb5e7b4fa35..697ac2781e8 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto +++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto @@ -412,8 +412,8 @@ message Event { // enabled in the Google Cloud console. ENABLED = 1; - // Disable Fraud Prevention for this assessment, regardless of Google Cloud - // console settings. + // Disable Fraud Prevention for this assessment, regardless of the Google + // Cloud console settings. DISABLED = 2; } diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json index f56bc56932c..e3e0631d86d 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recaptchaenterprise", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata_google.cloud.recaptchaenterprise.v1.json b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata_google.cloud.recaptchaenterprise.v1.json index fb6d6e66bab..f239b6c62f2 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata_google.cloud.recaptchaenterprise.v1.json +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata_google.cloud.recaptchaenterprise.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recaptchaenterprise", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json index 9fa84e2012e..81005354e9d 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recaptchaenterprise", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata_google.cloud.recaptchaenterprise.v1beta1.json b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata_google.cloud.recaptchaenterprise.v1beta1.json index ecf0850ea80..30ec3ddb830 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata_google.cloud.recaptchaenterprise.v1beta1.json +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata_google.cloud.recaptchaenterprise.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recaptchaenterprise", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { From 63b6187b833648213cff66adc29bebb6e3beb1e5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:29:41 -0700 Subject: [PATCH 14/34] feat: [managedkafka] add Managed Kafka Connect API (#6176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add Managed Kafka Connect API PiperOrigin-RevId: 738085357 Source-Link: https://github.com/googleapis/googleapis/commit/9eee08a64ae74996275e914db69dec1e022bdce7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f75a1ddee634861fc2bd1ff22d68159e7699b2c0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWRrYWZrYS8uT3dsQm90LnlhbWwiLCJoIjoiZjc1YTFkZGVlNjM0ODYxZmMyYmQxZmYyMmQ2ODE1OWU3Njk5YjJjMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-managedkafka/README.md | 14 + .../v1/managed_kafka_connect.proto | 511 ++ .../cloud/managedkafka/v1/resources.proto | 207 + .../protos/protos.d.ts | 3045 ++++++++ .../protos/protos.js | 6897 +++++++++++++++++ .../protos/protos.json | 851 +- .../samples/README.md | 252 + ...ed_kafka_connect.create_connect_cluster.js | 94 + .../managed_kafka_connect.create_connector.js | 77 + ...ed_kafka_connect.delete_connect_cluster.js | 79 + .../managed_kafka_connect.delete_connector.js | 63 + ...naged_kafka_connect.get_connect_cluster.js | 63 + .../v1/managed_kafka_connect.get_connector.js | 63 + ...ged_kafka_connect.list_connect_clusters.js | 85 + .../managed_kafka_connect.list_connectors.js | 78 + .../managed_kafka_connect.pause_connector.js | 63 + ...managed_kafka_connect.restart_connector.js | 63 + .../managed_kafka_connect.resume_connector.js | 63 + .../managed_kafka_connect.stop_connector.js | 63 + ...ed_kafka_connect.update_connect_cluster.js | 87 + .../managed_kafka_connect.update_connector.js | 70 + ...metadata_google.cloud.managedkafka.v1.json | 622 +- .../google-cloud-managedkafka/src/index.ts | 6 +- .../src/v1/gapic_metadata.json | 162 + .../google-cloud-managedkafka/src/v1/index.ts | 1 + .../src/v1/managed_kafka_client.ts | 136 + .../src/v1/managed_kafka_connect_client.ts | 3359 ++++++++ .../managed_kafka_connect_client_config.json | 108 + .../v1/managed_kafka_connect_proto_list.json | 5 + .../src/v1/managed_kafka_proto_list.json | 1 + .../system-test/fixtures/sample/src/index.js | 2 + .../system-test/fixtures/sample/src/index.ts | 13 +- .../test/gapic_managed_kafka_connect_v1.ts | 3912 ++++++++++ .../test/gapic_managed_kafka_v1.ts | 141 + 34 files changed, 21249 insertions(+), 7 deletions(-) create mode 100644 packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/managed_kafka_connect.proto create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js create mode 100644 packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js create mode 100644 packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts create mode 100644 packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client_config.json create mode 100644 packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_proto_list.json create mode 100644 packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts diff --git a/packages/google-cloud-managedkafka/README.md b/packages/google-cloud-managedkafka/README.md index b219b7e486d..3606455eaf8 100644 --- a/packages/google-cloud-managedkafka/README.md +++ b/packages/google-cloud-managedkafka/README.md @@ -135,6 +135,20 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Managed_kafka.update_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka.update_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka.update_cluster.js,packages/google-cloud-managedkafka/samples/README.md) | | Managed_kafka.update_consumer_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka.update_consumer_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka.update_consumer_group.js,packages/google-cloud-managedkafka/samples/README.md) | | Managed_kafka.update_topic | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka.update_topic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka.update_topic.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.create_connect_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.create_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.delete_connect_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.delete_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.get_connect_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.get_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.list_connect_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.list_connectors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.pause_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.restart_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.resume_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.stop_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.update_connect_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js,packages/google-cloud-managedkafka/samples/README.md) | +| Managed_kafka_connect.update_connector | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js,packages/google-cloud-managedkafka/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/quickstart.js,packages/google-cloud-managedkafka/samples/README.md) | diff --git a/packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/managed_kafka_connect.proto b/packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/managed_kafka_connect.proto new file mode 100644 index 00000000000..ede9dae5e2a --- /dev/null +++ b/packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/managed_kafka_connect.proto @@ -0,0 +1,511 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.managedkafka.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/managedkafka/v1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.ManagedKafka.V1"; +option go_package = "cloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb"; +option java_multiple_files = true; +option java_outer_classname = "ManagedKafkaConnectProto"; +option java_package = "com.google.cloud.managedkafka.v1"; +option php_namespace = "Google\\Cloud\\ManagedKafka\\V1"; +option ruby_package = "Google::Cloud::ManagedKafka::V1"; + +// The service that a client application uses to manage Apache Kafka Connect +// clusters and connectors. +service ManagedKafkaConnect { + option (google.api.default_host) = "managedkafka.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the Kafka Connect clusters in a given project and location. + rpc ListConnectClusters(ListConnectClustersRequest) + returns (ListConnectClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/connectClusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the properties of a single Kafka Connect cluster. + rpc GetConnectCluster(GetConnectClusterRequest) returns (ConnectCluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/connectClusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Kafka Connect cluster in a given project and location. + rpc CreateConnectCluster(CreateConnectClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/connectClusters" + body: "connect_cluster" + }; + option (google.api.method_signature) = + "parent,connect_cluster,connect_cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "ConnectCluster" + metadata_type: "OperationMetadata" + }; + } + + // Updates the properties of a single Kafka Connect cluster. + rpc UpdateConnectCluster(UpdateConnectClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{connect_cluster.name=projects/*/locations/*/connectClusters/*}" + body: "connect_cluster" + }; + option (google.api.method_signature) = "connect_cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ConnectCluster" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Connect cluster. + rpc DeleteConnectCluster(DeleteConnectClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/connectClusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists the connectors in a given Connect cluster. + rpc ListConnectors(ListConnectorsRequest) returns (ListConnectorsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/connectClusters/*}/connectors" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the properties of a single connector. + rpc GetConnector(GetConnectorRequest) returns (Connector) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new connector in a given Connect cluster. + rpc CreateConnector(CreateConnectorRequest) returns (Connector) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/connectClusters/*}/connectors" + body: "connector" + }; + option (google.api.method_signature) = "parent,connector,connector_id"; + } + + // Updates the properties of a connector. + rpc UpdateConnector(UpdateConnectorRequest) returns (Connector) { + option (google.api.http) = { + patch: "/v1/{connector.name=projects/*/locations/*/connectClusters/*/connectors/*}" + body: "connector" + }; + option (google.api.method_signature) = "connector,update_mask"; + } + + // Deletes a connector. + rpc DeleteConnector(DeleteConnectorRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Pauses the connector and its tasks. + rpc PauseConnector(PauseConnectorRequest) returns (PauseConnectorResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:pause" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Resumes the connector and its tasks. + rpc ResumeConnector(ResumeConnectorRequest) + returns (ResumeConnectorResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:resume" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Restarts the connector. + rpc RestartConnector(RestartConnectorRequest) + returns (RestartConnectorResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:restart" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Stops the connector. + rpc StopConnector(StopConnectorRequest) returns (StopConnectorResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request for GetConnectCluster. +message GetConnectClusterRequest { + // Required. The name of the Kafka Connect cluster whose configuration to + // return. Structured like + // `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/ConnectCluster" + } + ]; +} + +// Request for CreateConnectCluster. +message CreateConnectClusterRequest { + // Required. The parent project/location in which to create the Kafka Connect + // cluster. Structured like + // `projects/{project}/locations/{location}/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "managedkafka.googleapis.com/ConnectCluster" + } + ]; + + // Required. The ID to use for the Connect cluster, which will become the + // final component of the cluster's name. The ID must be 1-63 characters long, + // and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply + // with RFC 1035. + // + // This value is structured like: `my-cluster-id`. + string connect_cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration of the Kafka Connect cluster to create. Its `name` + // field is ignored. + ConnectCluster connect_cluster = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID to avoid duplication of requests. If a request times out or + // fails, retrying with the same ID allows the server to recognize the + // previous attempt. For at least 60 minutes, the server ignores duplicate + // requests bearing the same ID. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID + // within 60 minutes of the last request, the server checks if an original + // operation with the same request ID was received. If so, the server ignores + // the second request. + // + // The request ID must be a valid UUID. A zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request for UpdateConnectCluster. +message UpdateConnectClusterRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // cluster resource by the update. The fields specified in the update_mask are + // relative to the resource, not the full request. A field will be overwritten + // if it is in the mask. The mask is required and a value of * will update all + // fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The Kafka Connect cluster to update. Its `name` field must be + // populated. + ConnectCluster connect_cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID to avoid duplication of requests. If a request times out or + // fails, retrying with the same ID allows the server to recognize the + // previous attempt. For at least 60 minutes, the server ignores duplicate + // requests bearing the same ID. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID + // within 60 minutes of the last request, the server checks if an original + // operation with the same request ID was received. If so, the server ignores + // the second request. + // + // The request ID must be a valid UUID. A zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request for DeleteConnectCluster. +message DeleteConnectClusterRequest { + // Required. The name of the Kafka Connect cluster to delete. + // Structured like + // `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/ConnectCluster" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID to avoid duplication of requests. If a request times out or + // fails, retrying with the same ID allows the server to recognize the + // previous attempt. For at least 60 minutes, the server ignores duplicate + // requests bearing the same ID. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID + // within 60 minutes of the last request, the server checks if an original + // operation with the same request ID was received. If so, the server ignores + // the second request. + // + // The request ID must be a valid UUID. A zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request for ListConnectClusters. +message ListConnectClustersRequest { + // Required. The parent project/location whose Connect clusters are to be + // listed. Structured like `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "managedkafka.googleapis.com/ConnectCluster" + } + ]; + + // Optional. The maximum number of Connect clusters to return. The service may + // return fewer than this value. If unspecified, server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListConnectClusters` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListConnectClusters` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression for the result. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for ListConnectClusters. +message ListConnectClustersResponse { + // The list of Connect clusters in the requested parent. + repeated ConnectCluster connect_clusters = 1; + + // A token that can be sent as `page_token` to retrieve the next page of + // results. If this field is omitted, there are no more results. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for GetConnector. +message GetConnectorRequest { + // Required. The name of the connector whose configuration to return. + // Structured like: + // projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Connector" + } + ]; +} + +// Request for CreateConnector. +message CreateConnectorRequest { + // Required. The parent Connect cluster in which to create the connector. + // Structured like + // `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "managedkafka.googleapis.com/Connector" + } + ]; + + // Required. The ID to use for the connector, which will become the final + // component of the connector's name. The ID must be 1-63 characters long, and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + // RFC 1035. + // + // This value is structured like: `my-connector-id`. + string connector_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The connector to create. + Connector connector = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for UpdateConnector. +message UpdateConnectorRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // cluster resource by the update. The fields specified in the update_mask are + // relative to the resource, not the full request. A field will be overwritten + // if it is in the mask. The mask is required and a value of * will update all + // fields. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The connector to update. Its `name` field must be populated. + Connector connector = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for DeleteConnector. +message DeleteConnectorRequest { + // Required. The name of the connector to delete. + // Structured like: + // projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Connector" + } + ]; +} + +// Request for ListConnectors. +message ListConnectorsRequest { + // Required. The parent Connect cluster whose connectors are to be listed. + // Structured like + // `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "managedkafka.googleapis.com/Connector" + } + ]; + + // Optional. The maximum number of connectors to return. The service may + // return fewer than this value. If unspecified, server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListConnectors` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListConnectors` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for ListConnectors. +message ListConnectorsResponse { + // The list of connectors in the requested parent. + repeated Connector connectors = 1; + + // A token that can be sent as `page_token` to retrieve the next page of + // results. If this field is omitted, there are no more results. + string next_page_token = 2; +} + +// Request for PauseConnector. +message PauseConnectorRequest { + // Required. The name of the connector to pause. + // Structured like: + // projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Connector" + } + ]; +} + +// Response for PauseConnector. +message PauseConnectorResponse {} + +// Request for ResumeConnector. +message ResumeConnectorRequest { + // Required. The name of the connector to pause. + // Structured like: + // projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Connector" + } + ]; +} + +// Response for ResumeConnector. +message ResumeConnectorResponse {} + +// Request for RestartConnector. +message RestartConnectorRequest { + // Required. The name of the connector to restart. + // Structured like: + // projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Connector" + } + ]; +} + +// Response for RestartConnector. +message RestartConnectorResponse {} + +// Request for StopConnector. +message StopConnectorRequest { + // Required. The name of the connector to stop. + // Structured like: + // projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Connector" + } + ]; +} + +// Response for StopConnector. +message StopConnectorResponse {} diff --git a/packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/resources.proto b/packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/resources.proto index e637f15f456..fdc8fa4025a 100644 --- a/packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/resources.proto +++ b/packages/google-cloud-managedkafka/protos/google/cloud/managedkafka/v1/resources.proto @@ -18,6 +18,7 @@ package google.cloud.managedkafka.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.ManagedKafka.V1"; @@ -35,6 +36,10 @@ option (google.api.resource_definition) = { type: "secretmanager.googleapis.com/SecretVersion" pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}" }; +option (google.api.resource_definition) = { + type: "privateca.googleapis.com/CaPool" + pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}" +}; // An Apache Kafka cluster deployed in a location. message Cluster { @@ -272,3 +277,205 @@ message OperationMetadata { // Output only. API version used to start the operation. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// An Apache Kafka Connect cluster deployed in a location. +message ConnectCluster { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/ConnectCluster" + pattern: "projects/{project}/locations/{location}/connectClusters/{connect_cluster}" + plural: "connectClusters" + singular: "connectCluster" + }; + + // The state of the cluster. + enum State { + // A state was not specified. + STATE_UNSPECIFIED = 0; + + // The cluster is being created. + CREATING = 1; + + // The cluster is active. + ACTIVE = 2; + + // The cluster is being deleted. + DELETING = 3; + } + + // Platform specific configuration properties for a Kafka Connect cluster. + oneof platform_config { + // Required. Configuration properties for a Kafka Connect cluster deployed + // to Google Cloud Platform. + ConnectGcpConfig gcp_config = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Identifier. The name of the Kafka Connect cluster. Structured like: + // projects/{project_number}/locations/{location}/connectClusters/{connect_cluster_id} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. The name of the Kafka cluster this Kafka Connect + // cluster is attached to. Structured like: + // projects/{project}/locations/{location}/clusters/{cluster} + string kafka_cluster = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. The time when the cluster was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the cluster was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Capacity configuration for the Kafka Connect cluster. + CapacityConfig capacity_config = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the cluster. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configurations for the worker that are overridden from the + // defaults. The key of the map is a Kafka Connect worker property name, for + // example: `exactly.once.source.support`. + map config = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration of a Virtual Private Cloud (VPC) network that can access +// the Kafka Connect cluster. +message ConnectNetworkConfig { + // Required. VPC subnet to make available to the Kafka Connect cluster. + // Structured like: + // projects/{project}/regions/{region}/subnetworks/{subnet_id} + // + // It is used to create a Private Service Connect (PSC) interface for the + // Kafka Connect workers. It must be located in the same region as the + // Kafka Connect cluster. + // + // The CIDR range of the subnet must be within the IPv4 address ranges for + // private networks, as specified in RFC 1918. The primary subnet CIDR range + // must have a minimum size of /22 (1024 addresses). + string primary_subnet = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Additional subnets may be specified. They may be in another + // region, but must be in the same VPC network. The Connect workers can + // communicate with network endpoints in either the primary or additional + // subnets. + repeated string additional_subnets = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional DNS domain names from the subnet's network to be made + // visible to the Connect Cluster. When using MirrorMaker2, it's necessary to + // add the bootstrap address's dns domain name of the target cluster to make + // it visible to the connector. For example: + // my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog + repeated string dns_domain_names = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration of access to the Kafka Connect cluster. +message ConnectAccessConfig { + // Required. + // Virtual Private Cloud (VPC) networks that must be granted direct access to + // the Kafka Connect cluster. Minimum of 1 network is required. Maximum 10 + // networks can be specified. + repeated ConnectNetworkConfig network_configs = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration properties for a Kafka Connect cluster deployed to Google Cloud +// Platform. +message ConnectGcpConfig { + // Required. Access configuration for the Kafka Connect cluster. + ConnectAccessConfig access_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Secrets to load into workers. Exact SecretVersions from Secret + // Manager must be provided -- aliases are not supported. Up to 32 secrets may + // be loaded into one cluster. Format: + // projects//secrets//versions/ + repeated string secret_paths = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; +} + +// A Kafka Connect connector in a given ConnectCluster. +message Connector { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/Connector" + pattern: "projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}" + plural: "connectors" + singular: "connector" + }; + + // The state of the connector. + enum State { + // A state was not specified. + STATE_UNSPECIFIED = 0; + + // The connector is not assigned to any tasks, usually transient. + UNASSIGNED = 1; + + // The connector is running. + RUNNING = 2; + + // The connector has been paused. + PAUSED = 3; + + // The connector has failed. See logs for why. + FAILED = 4; + + // The connector is restarting. + RESTARTING = 5; + + // The connector has been stopped. + STOPPED = 6; + } + + // A policy that specifies how to restart the failed connectors/tasks in a + // Cluster resource. If not set, the failed connectors/tasks won't be + // restarted. + oneof restart_policy { + // Optional. Restarts the individual tasks of a Connector. + TaskRetryPolicy task_restart_policy = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifier. The name of the connector. + // Structured like: + // projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Connector config as keys/values. + // The keys of the map are connector property names, for example: + // `connector.class`, `tasks.max`, `key.converter`. + map configs = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The current state of the connector. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Task Retry Policy is implemented on a best-effort +// basis. +// Retry delay will be exponential based on provided minimum and maximum +// backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. +// Note that the delay between consecutive task restarts may not always +// precisely match the configured settings. This can happen when the +// ConnectCluster is in rebalancing state or if the ConnectCluster is +// unresponsive etc. +message TaskRetryPolicy { + // Optional. The minimum amount of time to wait before retrying a failed task. + // This sets a lower bound for the backoff delay. + google.protobuf.Duration minimum_backoff = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum amount of time to wait before retrying a failed task. + // This sets an upper bound for the backoff delay. + google.protobuf.Duration maximum_backoff = 2 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-managedkafka/protos/protos.d.ts b/packages/google-cloud-managedkafka/protos/protos.d.ts index ba630a0ebb8..09f77f516ce 100644 --- a/packages/google-cloud-managedkafka/protos/protos.d.ts +++ b/packages/google-cloud-managedkafka/protos/protos.d.ts @@ -3353,6 +3353,3051 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a ConnectCluster. */ + interface IConnectCluster { + + /** ConnectCluster gcpConfig */ + gcpConfig?: (google.cloud.managedkafka.v1.IConnectGcpConfig|null); + + /** ConnectCluster name */ + name?: (string|null); + + /** ConnectCluster kafkaCluster */ + kafkaCluster?: (string|null); + + /** ConnectCluster createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectCluster updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectCluster labels */ + labels?: ({ [k: string]: string }|null); + + /** ConnectCluster capacityConfig */ + capacityConfig?: (google.cloud.managedkafka.v1.ICapacityConfig|null); + + /** ConnectCluster state */ + state?: (google.cloud.managedkafka.v1.ConnectCluster.State|keyof typeof google.cloud.managedkafka.v1.ConnectCluster.State|null); + + /** ConnectCluster config */ + config?: ({ [k: string]: string }|null); + } + + /** Represents a ConnectCluster. */ + class ConnectCluster implements IConnectCluster { + + /** + * Constructs a new ConnectCluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IConnectCluster); + + /** ConnectCluster gcpConfig. */ + public gcpConfig?: (google.cloud.managedkafka.v1.IConnectGcpConfig|null); + + /** ConnectCluster name. */ + public name: string; + + /** ConnectCluster kafkaCluster. */ + public kafkaCluster: string; + + /** ConnectCluster createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectCluster updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectCluster labels. */ + public labels: { [k: string]: string }; + + /** ConnectCluster capacityConfig. */ + public capacityConfig?: (google.cloud.managedkafka.v1.ICapacityConfig|null); + + /** ConnectCluster state. */ + public state: (google.cloud.managedkafka.v1.ConnectCluster.State|keyof typeof google.cloud.managedkafka.v1.ConnectCluster.State); + + /** ConnectCluster config. */ + public config: { [k: string]: string }; + + /** ConnectCluster platformConfig. */ + public platformConfig?: "gcpConfig"; + + /** + * Creates a new ConnectCluster instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectCluster instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IConnectCluster): google.cloud.managedkafka.v1.ConnectCluster; + + /** + * Encodes the specified ConnectCluster message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectCluster.verify|verify} messages. + * @param message ConnectCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IConnectCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectCluster message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectCluster.verify|verify} messages. + * @param message ConnectCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IConnectCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectCluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ConnectCluster; + + /** + * Decodes a ConnectCluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ConnectCluster; + + /** + * Verifies a ConnectCluster message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectCluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectCluster + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ConnectCluster; + + /** + * Creates a plain object from a ConnectCluster message. Also converts values to other types if specified. + * @param message ConnectCluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ConnectCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectCluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectCluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConnectCluster { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3 + } + } + + /** Properties of a ConnectNetworkConfig. */ + interface IConnectNetworkConfig { + + /** ConnectNetworkConfig primarySubnet */ + primarySubnet?: (string|null); + + /** ConnectNetworkConfig additionalSubnets */ + additionalSubnets?: (string[]|null); + + /** ConnectNetworkConfig dnsDomainNames */ + dnsDomainNames?: (string[]|null); + } + + /** Represents a ConnectNetworkConfig. */ + class ConnectNetworkConfig implements IConnectNetworkConfig { + + /** + * Constructs a new ConnectNetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IConnectNetworkConfig); + + /** ConnectNetworkConfig primarySubnet. */ + public primarySubnet: string; + + /** ConnectNetworkConfig additionalSubnets. */ + public additionalSubnets: string[]; + + /** ConnectNetworkConfig dnsDomainNames. */ + public dnsDomainNames: string[]; + + /** + * Creates a new ConnectNetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectNetworkConfig instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IConnectNetworkConfig): google.cloud.managedkafka.v1.ConnectNetworkConfig; + + /** + * Encodes the specified ConnectNetworkConfig message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectNetworkConfig.verify|verify} messages. + * @param message ConnectNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IConnectNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectNetworkConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectNetworkConfig.verify|verify} messages. + * @param message ConnectNetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IConnectNetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectNetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ConnectNetworkConfig; + + /** + * Decodes a ConnectNetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ConnectNetworkConfig; + + /** + * Verifies a ConnectNetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectNetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ConnectNetworkConfig; + + /** + * Creates a plain object from a ConnectNetworkConfig message. Also converts values to other types if specified. + * @param message ConnectNetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ConnectNetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectNetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectNetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConnectAccessConfig. */ + interface IConnectAccessConfig { + + /** ConnectAccessConfig networkConfigs */ + networkConfigs?: (google.cloud.managedkafka.v1.IConnectNetworkConfig[]|null); + } + + /** Represents a ConnectAccessConfig. */ + class ConnectAccessConfig implements IConnectAccessConfig { + + /** + * Constructs a new ConnectAccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IConnectAccessConfig); + + /** ConnectAccessConfig networkConfigs. */ + public networkConfigs: google.cloud.managedkafka.v1.IConnectNetworkConfig[]; + + /** + * Creates a new ConnectAccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectAccessConfig instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IConnectAccessConfig): google.cloud.managedkafka.v1.ConnectAccessConfig; + + /** + * Encodes the specified ConnectAccessConfig message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectAccessConfig.verify|verify} messages. + * @param message ConnectAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IConnectAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectAccessConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectAccessConfig.verify|verify} messages. + * @param message ConnectAccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IConnectAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectAccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ConnectAccessConfig; + + /** + * Decodes a ConnectAccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ConnectAccessConfig; + + /** + * Verifies a ConnectAccessConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectAccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectAccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ConnectAccessConfig; + + /** + * Creates a plain object from a ConnectAccessConfig message. Also converts values to other types if specified. + * @param message ConnectAccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ConnectAccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectAccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectAccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConnectGcpConfig. */ + interface IConnectGcpConfig { + + /** ConnectGcpConfig accessConfig */ + accessConfig?: (google.cloud.managedkafka.v1.IConnectAccessConfig|null); + + /** ConnectGcpConfig secretPaths */ + secretPaths?: (string[]|null); + } + + /** Represents a ConnectGcpConfig. */ + class ConnectGcpConfig implements IConnectGcpConfig { + + /** + * Constructs a new ConnectGcpConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IConnectGcpConfig); + + /** ConnectGcpConfig accessConfig. */ + public accessConfig?: (google.cloud.managedkafka.v1.IConnectAccessConfig|null); + + /** ConnectGcpConfig secretPaths. */ + public secretPaths: string[]; + + /** + * Creates a new ConnectGcpConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectGcpConfig instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IConnectGcpConfig): google.cloud.managedkafka.v1.ConnectGcpConfig; + + /** + * Encodes the specified ConnectGcpConfig message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectGcpConfig.verify|verify} messages. + * @param message ConnectGcpConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IConnectGcpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectGcpConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectGcpConfig.verify|verify} messages. + * @param message ConnectGcpConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IConnectGcpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectGcpConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectGcpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ConnectGcpConfig; + + /** + * Decodes a ConnectGcpConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectGcpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ConnectGcpConfig; + + /** + * Verifies a ConnectGcpConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectGcpConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectGcpConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ConnectGcpConfig; + + /** + * Creates a plain object from a ConnectGcpConfig message. Also converts values to other types if specified. + * @param message ConnectGcpConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ConnectGcpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectGcpConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectGcpConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Connector. */ + interface IConnector { + + /** Connector taskRestartPolicy */ + taskRestartPolicy?: (google.cloud.managedkafka.v1.ITaskRetryPolicy|null); + + /** Connector name */ + name?: (string|null); + + /** Connector configs */ + configs?: ({ [k: string]: string }|null); + + /** Connector state */ + state?: (google.cloud.managedkafka.v1.Connector.State|keyof typeof google.cloud.managedkafka.v1.Connector.State|null); + } + + /** Represents a Connector. */ + class Connector implements IConnector { + + /** + * Constructs a new Connector. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IConnector); + + /** Connector taskRestartPolicy. */ + public taskRestartPolicy?: (google.cloud.managedkafka.v1.ITaskRetryPolicy|null); + + /** Connector name. */ + public name: string; + + /** Connector configs. */ + public configs: { [k: string]: string }; + + /** Connector state. */ + public state: (google.cloud.managedkafka.v1.Connector.State|keyof typeof google.cloud.managedkafka.v1.Connector.State); + + /** Connector restartPolicy. */ + public restartPolicy?: "taskRestartPolicy"; + + /** + * Creates a new Connector instance using the specified properties. + * @param [properties] Properties to set + * @returns Connector instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IConnector): google.cloud.managedkafka.v1.Connector; + + /** + * Encodes the specified Connector message. Does not implicitly {@link google.cloud.managedkafka.v1.Connector.verify|verify} messages. + * @param message Connector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IConnector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Connector message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.Connector.verify|verify} messages. + * @param message Connector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IConnector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Connector message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Connector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.Connector; + + /** + * Decodes a Connector message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Connector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.Connector; + + /** + * Verifies a Connector message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Connector message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Connector + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.Connector; + + /** + * Creates a plain object from a Connector message. Also converts values to other types if specified. + * @param message Connector + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.Connector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Connector to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Connector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Connector { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + UNASSIGNED = 1, + RUNNING = 2, + PAUSED = 3, + FAILED = 4, + RESTARTING = 5, + STOPPED = 6 + } + } + + /** Properties of a TaskRetryPolicy. */ + interface ITaskRetryPolicy { + + /** TaskRetryPolicy minimumBackoff */ + minimumBackoff?: (google.protobuf.IDuration|null); + + /** TaskRetryPolicy maximumBackoff */ + maximumBackoff?: (google.protobuf.IDuration|null); + } + + /** Represents a TaskRetryPolicy. */ + class TaskRetryPolicy implements ITaskRetryPolicy { + + /** + * Constructs a new TaskRetryPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.ITaskRetryPolicy); + + /** TaskRetryPolicy minimumBackoff. */ + public minimumBackoff?: (google.protobuf.IDuration|null); + + /** TaskRetryPolicy maximumBackoff. */ + public maximumBackoff?: (google.protobuf.IDuration|null); + + /** + * Creates a new TaskRetryPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskRetryPolicy instance + */ + public static create(properties?: google.cloud.managedkafka.v1.ITaskRetryPolicy): google.cloud.managedkafka.v1.TaskRetryPolicy; + + /** + * Encodes the specified TaskRetryPolicy message. Does not implicitly {@link google.cloud.managedkafka.v1.TaskRetryPolicy.verify|verify} messages. + * @param message TaskRetryPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.ITaskRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaskRetryPolicy message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.TaskRetryPolicy.verify|verify} messages. + * @param message TaskRetryPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.ITaskRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskRetryPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskRetryPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.TaskRetryPolicy; + + /** + * Decodes a TaskRetryPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaskRetryPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.TaskRetryPolicy; + + /** + * Verifies a TaskRetryPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaskRetryPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaskRetryPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.TaskRetryPolicy; + + /** + * Creates a plain object from a TaskRetryPolicy message. Also converts values to other types if specified. + * @param message TaskRetryPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.TaskRetryPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaskRetryPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaskRetryPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ManagedKafkaConnect */ + class ManagedKafkaConnect extends $protobuf.rpc.Service { + + /** + * Constructs a new ManagedKafkaConnect service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ManagedKafkaConnect service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ManagedKafkaConnect; + + /** + * Calls ListConnectClusters. + * @param request ListConnectClustersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectClustersResponse + */ + public listConnectClusters(request: google.cloud.managedkafka.v1.IListConnectClustersRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectClustersCallback): void; + + /** + * Calls ListConnectClusters. + * @param request ListConnectClustersRequest message or plain object + * @returns Promise + */ + public listConnectClusters(request: google.cloud.managedkafka.v1.IListConnectClustersRequest): Promise; + + /** + * Calls GetConnectCluster. + * @param request GetConnectClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConnectCluster + */ + public getConnectCluster(request: google.cloud.managedkafka.v1.IGetConnectClusterRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnectClusterCallback): void; + + /** + * Calls GetConnectCluster. + * @param request GetConnectClusterRequest message or plain object + * @returns Promise + */ + public getConnectCluster(request: google.cloud.managedkafka.v1.IGetConnectClusterRequest): Promise; + + /** + * Calls CreateConnectCluster. + * @param request CreateConnectClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConnectCluster(request: google.cloud.managedkafka.v1.ICreateConnectClusterRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnectClusterCallback): void; + + /** + * Calls CreateConnectCluster. + * @param request CreateConnectClusterRequest message or plain object + * @returns Promise + */ + public createConnectCluster(request: google.cloud.managedkafka.v1.ICreateConnectClusterRequest): Promise; + + /** + * Calls UpdateConnectCluster. + * @param request UpdateConnectClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConnectCluster(request: google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnectClusterCallback): void; + + /** + * Calls UpdateConnectCluster. + * @param request UpdateConnectClusterRequest message or plain object + * @returns Promise + */ + public updateConnectCluster(request: google.cloud.managedkafka.v1.IUpdateConnectClusterRequest): Promise; + + /** + * Calls DeleteConnectCluster. + * @param request DeleteConnectClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConnectCluster(request: google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnectClusterCallback): void; + + /** + * Calls DeleteConnectCluster. + * @param request DeleteConnectClusterRequest message or plain object + * @returns Promise + */ + public deleteConnectCluster(request: google.cloud.managedkafka.v1.IDeleteConnectClusterRequest): Promise; + + /** + * Calls ListConnectors. + * @param request ListConnectorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectorsResponse + */ + public listConnectors(request: google.cloud.managedkafka.v1.IListConnectorsRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectorsCallback): void; + + /** + * Calls ListConnectors. + * @param request ListConnectorsRequest message or plain object + * @returns Promise + */ + public listConnectors(request: google.cloud.managedkafka.v1.IListConnectorsRequest): Promise; + + /** + * Calls GetConnector. + * @param request GetConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Connector + */ + public getConnector(request: google.cloud.managedkafka.v1.IGetConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnectorCallback): void; + + /** + * Calls GetConnector. + * @param request GetConnectorRequest message or plain object + * @returns Promise + */ + public getConnector(request: google.cloud.managedkafka.v1.IGetConnectorRequest): Promise; + + /** + * Calls CreateConnector. + * @param request CreateConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Connector + */ + public createConnector(request: google.cloud.managedkafka.v1.ICreateConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnectorCallback): void; + + /** + * Calls CreateConnector. + * @param request CreateConnectorRequest message or plain object + * @returns Promise + */ + public createConnector(request: google.cloud.managedkafka.v1.ICreateConnectorRequest): Promise; + + /** + * Calls UpdateConnector. + * @param request UpdateConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Connector + */ + public updateConnector(request: google.cloud.managedkafka.v1.IUpdateConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnectorCallback): void; + + /** + * Calls UpdateConnector. + * @param request UpdateConnectorRequest message or plain object + * @returns Promise + */ + public updateConnector(request: google.cloud.managedkafka.v1.IUpdateConnectorRequest): Promise; + + /** + * Calls DeleteConnector. + * @param request DeleteConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConnector(request: google.cloud.managedkafka.v1.IDeleteConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnectorCallback): void; + + /** + * Calls DeleteConnector. + * @param request DeleteConnectorRequest message or plain object + * @returns Promise + */ + public deleteConnector(request: google.cloud.managedkafka.v1.IDeleteConnectorRequest): Promise; + + /** + * Calls PauseConnector. + * @param request PauseConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PauseConnectorResponse + */ + public pauseConnector(request: google.cloud.managedkafka.v1.IPauseConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.PauseConnectorCallback): void; + + /** + * Calls PauseConnector. + * @param request PauseConnectorRequest message or plain object + * @returns Promise + */ + public pauseConnector(request: google.cloud.managedkafka.v1.IPauseConnectorRequest): Promise; + + /** + * Calls ResumeConnector. + * @param request ResumeConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ResumeConnectorResponse + */ + public resumeConnector(request: google.cloud.managedkafka.v1.IResumeConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.ResumeConnectorCallback): void; + + /** + * Calls ResumeConnector. + * @param request ResumeConnectorRequest message or plain object + * @returns Promise + */ + public resumeConnector(request: google.cloud.managedkafka.v1.IResumeConnectorRequest): Promise; + + /** + * Calls RestartConnector. + * @param request RestartConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RestartConnectorResponse + */ + public restartConnector(request: google.cloud.managedkafka.v1.IRestartConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.RestartConnectorCallback): void; + + /** + * Calls RestartConnector. + * @param request RestartConnectorRequest message or plain object + * @returns Promise + */ + public restartConnector(request: google.cloud.managedkafka.v1.IRestartConnectorRequest): Promise; + + /** + * Calls StopConnector. + * @param request StopConnectorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StopConnectorResponse + */ + public stopConnector(request: google.cloud.managedkafka.v1.IStopConnectorRequest, callback: google.cloud.managedkafka.v1.ManagedKafkaConnect.StopConnectorCallback): void; + + /** + * Calls StopConnector. + * @param request StopConnectorRequest message or plain object + * @returns Promise + */ + public stopConnector(request: google.cloud.managedkafka.v1.IStopConnectorRequest): Promise; + } + + namespace ManagedKafkaConnect { + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|listConnectClusters}. + * @param error Error, if any + * @param [response] ListConnectClustersResponse + */ + type ListConnectClustersCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.ListConnectClustersResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|getConnectCluster}. + * @param error Error, if any + * @param [response] ConnectCluster + */ + type GetConnectClusterCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.ConnectCluster) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|createConnectCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConnectClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|updateConnectCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConnectClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|deleteConnectCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConnectClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|listConnectors}. + * @param error Error, if any + * @param [response] ListConnectorsResponse + */ + type ListConnectorsCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.ListConnectorsResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|getConnector}. + * @param error Error, if any + * @param [response] Connector + */ + type GetConnectorCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.Connector) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|createConnector}. + * @param error Error, if any + * @param [response] Connector + */ + type CreateConnectorCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.Connector) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|updateConnector}. + * @param error Error, if any + * @param [response] Connector + */ + type UpdateConnectorCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.Connector) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|deleteConnector}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConnectorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|pauseConnector}. + * @param error Error, if any + * @param [response] PauseConnectorResponse + */ + type PauseConnectorCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.PauseConnectorResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|resumeConnector}. + * @param error Error, if any + * @param [response] ResumeConnectorResponse + */ + type ResumeConnectorCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.ResumeConnectorResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|restartConnector}. + * @param error Error, if any + * @param [response] RestartConnectorResponse + */ + type RestartConnectorCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.RestartConnectorResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|stopConnector}. + * @param error Error, if any + * @param [response] StopConnectorResponse + */ + type StopConnectorCallback = (error: (Error|null), response?: google.cloud.managedkafka.v1.StopConnectorResponse) => void; + } + + /** Properties of a GetConnectClusterRequest. */ + interface IGetConnectClusterRequest { + + /** GetConnectClusterRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectClusterRequest. */ + class GetConnectClusterRequest implements IGetConnectClusterRequest { + + /** + * Constructs a new GetConnectClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IGetConnectClusterRequest); + + /** GetConnectClusterRequest name. */ + public name: string; + + /** + * Creates a new GetConnectClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectClusterRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IGetConnectClusterRequest): google.cloud.managedkafka.v1.GetConnectClusterRequest; + + /** + * Encodes the specified GetConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectClusterRequest.verify|verify} messages. + * @param message GetConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IGetConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectClusterRequest.verify|verify} messages. + * @param message GetConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IGetConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.GetConnectClusterRequest; + + /** + * Decodes a GetConnectClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.GetConnectClusterRequest; + + /** + * Verifies a GetConnectClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.GetConnectClusterRequest; + + /** + * Creates a plain object from a GetConnectClusterRequest message. Also converts values to other types if specified. + * @param message GetConnectClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.GetConnectClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectClusterRequest. */ + interface ICreateConnectClusterRequest { + + /** CreateConnectClusterRequest parent */ + parent?: (string|null); + + /** CreateConnectClusterRequest connectClusterId */ + connectClusterId?: (string|null); + + /** CreateConnectClusterRequest connectCluster */ + connectCluster?: (google.cloud.managedkafka.v1.IConnectCluster|null); + + /** CreateConnectClusterRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateConnectClusterRequest. */ + class CreateConnectClusterRequest implements ICreateConnectClusterRequest { + + /** + * Constructs a new CreateConnectClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.ICreateConnectClusterRequest); + + /** CreateConnectClusterRequest parent. */ + public parent: string; + + /** CreateConnectClusterRequest connectClusterId. */ + public connectClusterId: string; + + /** CreateConnectClusterRequest connectCluster. */ + public connectCluster?: (google.cloud.managedkafka.v1.IConnectCluster|null); + + /** CreateConnectClusterRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateConnectClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectClusterRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.ICreateConnectClusterRequest): google.cloud.managedkafka.v1.CreateConnectClusterRequest; + + /** + * Encodes the specified CreateConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectClusterRequest.verify|verify} messages. + * @param message CreateConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.ICreateConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectClusterRequest.verify|verify} messages. + * @param message CreateConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.ICreateConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.CreateConnectClusterRequest; + + /** + * Decodes a CreateConnectClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.CreateConnectClusterRequest; + + /** + * Verifies a CreateConnectClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.CreateConnectClusterRequest; + + /** + * Creates a plain object from a CreateConnectClusterRequest message. Also converts values to other types if specified. + * @param message CreateConnectClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.CreateConnectClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectClusterRequest. */ + interface IUpdateConnectClusterRequest { + + /** UpdateConnectClusterRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectClusterRequest connectCluster */ + connectCluster?: (google.cloud.managedkafka.v1.IConnectCluster|null); + + /** UpdateConnectClusterRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateConnectClusterRequest. */ + class UpdateConnectClusterRequest implements IUpdateConnectClusterRequest { + + /** + * Constructs a new UpdateConnectClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IUpdateConnectClusterRequest); + + /** UpdateConnectClusterRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectClusterRequest connectCluster. */ + public connectCluster?: (google.cloud.managedkafka.v1.IConnectCluster|null); + + /** UpdateConnectClusterRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateConnectClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectClusterRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IUpdateConnectClusterRequest): google.cloud.managedkafka.v1.UpdateConnectClusterRequest; + + /** + * Encodes the specified UpdateConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectClusterRequest.verify|verify} messages. + * @param message UpdateConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectClusterRequest.verify|verify} messages. + * @param message UpdateConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.UpdateConnectClusterRequest; + + /** + * Decodes an UpdateConnectClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.UpdateConnectClusterRequest; + + /** + * Verifies an UpdateConnectClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.UpdateConnectClusterRequest; + + /** + * Creates a plain object from an UpdateConnectClusterRequest message. Also converts values to other types if specified. + * @param message UpdateConnectClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.UpdateConnectClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectClusterRequest. */ + interface IDeleteConnectClusterRequest { + + /** DeleteConnectClusterRequest name */ + name?: (string|null); + + /** DeleteConnectClusterRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteConnectClusterRequest. */ + class DeleteConnectClusterRequest implements IDeleteConnectClusterRequest { + + /** + * Constructs a new DeleteConnectClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IDeleteConnectClusterRequest); + + /** DeleteConnectClusterRequest name. */ + public name: string; + + /** DeleteConnectClusterRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteConnectClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectClusterRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IDeleteConnectClusterRequest): google.cloud.managedkafka.v1.DeleteConnectClusterRequest; + + /** + * Encodes the specified DeleteConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectClusterRequest.verify|verify} messages. + * @param message DeleteConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectClusterRequest.verify|verify} messages. + * @param message DeleteConnectClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.DeleteConnectClusterRequest; + + /** + * Decodes a DeleteConnectClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.DeleteConnectClusterRequest; + + /** + * Verifies a DeleteConnectClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.DeleteConnectClusterRequest; + + /** + * Creates a plain object from a DeleteConnectClusterRequest message. Also converts values to other types if specified. + * @param message DeleteConnectClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.DeleteConnectClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectClustersRequest. */ + interface IListConnectClustersRequest { + + /** ListConnectClustersRequest parent */ + parent?: (string|null); + + /** ListConnectClustersRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectClustersRequest pageToken */ + pageToken?: (string|null); + + /** ListConnectClustersRequest filter */ + filter?: (string|null); + + /** ListConnectClustersRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListConnectClustersRequest. */ + class ListConnectClustersRequest implements IListConnectClustersRequest { + + /** + * Constructs a new ListConnectClustersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IListConnectClustersRequest); + + /** ListConnectClustersRequest parent. */ + public parent: string; + + /** ListConnectClustersRequest pageSize. */ + public pageSize: number; + + /** ListConnectClustersRequest pageToken. */ + public pageToken: string; + + /** ListConnectClustersRequest filter. */ + public filter: string; + + /** ListConnectClustersRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListConnectClustersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectClustersRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IListConnectClustersRequest): google.cloud.managedkafka.v1.ListConnectClustersRequest; + + /** + * Encodes the specified ListConnectClustersRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersRequest.verify|verify} messages. + * @param message ListConnectClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IListConnectClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectClustersRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersRequest.verify|verify} messages. + * @param message ListConnectClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IListConnectClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectClustersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ListConnectClustersRequest; + + /** + * Decodes a ListConnectClustersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ListConnectClustersRequest; + + /** + * Verifies a ListConnectClustersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectClustersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectClustersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ListConnectClustersRequest; + + /** + * Creates a plain object from a ListConnectClustersRequest message. Also converts values to other types if specified. + * @param message ListConnectClustersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ListConnectClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectClustersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectClustersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectClustersResponse. */ + interface IListConnectClustersResponse { + + /** ListConnectClustersResponse connectClusters */ + connectClusters?: (google.cloud.managedkafka.v1.IConnectCluster[]|null); + + /** ListConnectClustersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListConnectClustersResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListConnectClustersResponse. */ + class ListConnectClustersResponse implements IListConnectClustersResponse { + + /** + * Constructs a new ListConnectClustersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IListConnectClustersResponse); + + /** ListConnectClustersResponse connectClusters. */ + public connectClusters: google.cloud.managedkafka.v1.IConnectCluster[]; + + /** ListConnectClustersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListConnectClustersResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListConnectClustersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectClustersResponse instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IListConnectClustersResponse): google.cloud.managedkafka.v1.ListConnectClustersResponse; + + /** + * Encodes the specified ListConnectClustersResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersResponse.verify|verify} messages. + * @param message ListConnectClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IListConnectClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectClustersResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersResponse.verify|verify} messages. + * @param message ListConnectClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IListConnectClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectClustersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ListConnectClustersResponse; + + /** + * Decodes a ListConnectClustersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ListConnectClustersResponse; + + /** + * Verifies a ListConnectClustersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectClustersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectClustersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ListConnectClustersResponse; + + /** + * Creates a plain object from a ListConnectClustersResponse message. Also converts values to other types if specified. + * @param message ListConnectClustersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ListConnectClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectClustersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectClustersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConnectorRequest. */ + interface IGetConnectorRequest { + + /** GetConnectorRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectorRequest. */ + class GetConnectorRequest implements IGetConnectorRequest { + + /** + * Constructs a new GetConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IGetConnectorRequest); + + /** GetConnectorRequest name. */ + public name: string; + + /** + * Creates a new GetConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IGetConnectorRequest): google.cloud.managedkafka.v1.GetConnectorRequest; + + /** + * Encodes the specified GetConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectorRequest.verify|verify} messages. + * @param message GetConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IGetConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectorRequest.verify|verify} messages. + * @param message GetConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IGetConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.GetConnectorRequest; + + /** + * Decodes a GetConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.GetConnectorRequest; + + /** + * Verifies a GetConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.GetConnectorRequest; + + /** + * Creates a plain object from a GetConnectorRequest message. Also converts values to other types if specified. + * @param message GetConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.GetConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectorRequest. */ + interface ICreateConnectorRequest { + + /** CreateConnectorRequest parent */ + parent?: (string|null); + + /** CreateConnectorRequest connectorId */ + connectorId?: (string|null); + + /** CreateConnectorRequest connector */ + connector?: (google.cloud.managedkafka.v1.IConnector|null); + } + + /** Represents a CreateConnectorRequest. */ + class CreateConnectorRequest implements ICreateConnectorRequest { + + /** + * Constructs a new CreateConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.ICreateConnectorRequest); + + /** CreateConnectorRequest parent. */ + public parent: string; + + /** CreateConnectorRequest connectorId. */ + public connectorId: string; + + /** CreateConnectorRequest connector. */ + public connector?: (google.cloud.managedkafka.v1.IConnector|null); + + /** + * Creates a new CreateConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.ICreateConnectorRequest): google.cloud.managedkafka.v1.CreateConnectorRequest; + + /** + * Encodes the specified CreateConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectorRequest.verify|verify} messages. + * @param message CreateConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.ICreateConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectorRequest.verify|verify} messages. + * @param message CreateConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.ICreateConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.CreateConnectorRequest; + + /** + * Decodes a CreateConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.CreateConnectorRequest; + + /** + * Verifies a CreateConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.CreateConnectorRequest; + + /** + * Creates a plain object from a CreateConnectorRequest message. Also converts values to other types if specified. + * @param message CreateConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.CreateConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectorRequest. */ + interface IUpdateConnectorRequest { + + /** UpdateConnectorRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectorRequest connector */ + connector?: (google.cloud.managedkafka.v1.IConnector|null); + } + + /** Represents an UpdateConnectorRequest. */ + class UpdateConnectorRequest implements IUpdateConnectorRequest { + + /** + * Constructs a new UpdateConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IUpdateConnectorRequest); + + /** UpdateConnectorRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectorRequest connector. */ + public connector?: (google.cloud.managedkafka.v1.IConnector|null); + + /** + * Creates a new UpdateConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IUpdateConnectorRequest): google.cloud.managedkafka.v1.UpdateConnectorRequest; + + /** + * Encodes the specified UpdateConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectorRequest.verify|verify} messages. + * @param message UpdateConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IUpdateConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectorRequest.verify|verify} messages. + * @param message UpdateConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IUpdateConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.UpdateConnectorRequest; + + /** + * Decodes an UpdateConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.UpdateConnectorRequest; + + /** + * Verifies an UpdateConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.UpdateConnectorRequest; + + /** + * Creates a plain object from an UpdateConnectorRequest message. Also converts values to other types if specified. + * @param message UpdateConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.UpdateConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectorRequest. */ + interface IDeleteConnectorRequest { + + /** DeleteConnectorRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConnectorRequest. */ + class DeleteConnectorRequest implements IDeleteConnectorRequest { + + /** + * Constructs a new DeleteConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IDeleteConnectorRequest); + + /** DeleteConnectorRequest name. */ + public name: string; + + /** + * Creates a new DeleteConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IDeleteConnectorRequest): google.cloud.managedkafka.v1.DeleteConnectorRequest; + + /** + * Encodes the specified DeleteConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectorRequest.verify|verify} messages. + * @param message DeleteConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IDeleteConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectorRequest.verify|verify} messages. + * @param message DeleteConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IDeleteConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.DeleteConnectorRequest; + + /** + * Decodes a DeleteConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.DeleteConnectorRequest; + + /** + * Verifies a DeleteConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.DeleteConnectorRequest; + + /** + * Creates a plain object from a DeleteConnectorRequest message. Also converts values to other types if specified. + * @param message DeleteConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.DeleteConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectorsRequest. */ + interface IListConnectorsRequest { + + /** ListConnectorsRequest parent */ + parent?: (string|null); + + /** ListConnectorsRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectorsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListConnectorsRequest. */ + class ListConnectorsRequest implements IListConnectorsRequest { + + /** + * Constructs a new ListConnectorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IListConnectorsRequest); + + /** ListConnectorsRequest parent. */ + public parent: string; + + /** ListConnectorsRequest pageSize. */ + public pageSize: number; + + /** ListConnectorsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListConnectorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectorsRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IListConnectorsRequest): google.cloud.managedkafka.v1.ListConnectorsRequest; + + /** + * Encodes the specified ListConnectorsRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsRequest.verify|verify} messages. + * @param message ListConnectorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IListConnectorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectorsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsRequest.verify|verify} messages. + * @param message ListConnectorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IListConnectorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ListConnectorsRequest; + + /** + * Decodes a ListConnectorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ListConnectorsRequest; + + /** + * Verifies a ListConnectorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ListConnectorsRequest; + + /** + * Creates a plain object from a ListConnectorsRequest message. Also converts values to other types if specified. + * @param message ListConnectorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ListConnectorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectorsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectorsResponse. */ + interface IListConnectorsResponse { + + /** ListConnectorsResponse connectors */ + connectors?: (google.cloud.managedkafka.v1.IConnector[]|null); + + /** ListConnectorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConnectorsResponse. */ + class ListConnectorsResponse implements IListConnectorsResponse { + + /** + * Constructs a new ListConnectorsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IListConnectorsResponse); + + /** ListConnectorsResponse connectors. */ + public connectors: google.cloud.managedkafka.v1.IConnector[]; + + /** ListConnectorsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConnectorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectorsResponse instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IListConnectorsResponse): google.cloud.managedkafka.v1.ListConnectorsResponse; + + /** + * Encodes the specified ListConnectorsResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsResponse.verify|verify} messages. + * @param message ListConnectorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IListConnectorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectorsResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsResponse.verify|verify} messages. + * @param message ListConnectorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IListConnectorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectorsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ListConnectorsResponse; + + /** + * Decodes a ListConnectorsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ListConnectorsResponse; + + /** + * Verifies a ListConnectorsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectorsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectorsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ListConnectorsResponse; + + /** + * Creates a plain object from a ListConnectorsResponse message. Also converts values to other types if specified. + * @param message ListConnectorsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ListConnectorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectorsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PauseConnectorRequest. */ + interface IPauseConnectorRequest { + + /** PauseConnectorRequest name */ + name?: (string|null); + } + + /** Represents a PauseConnectorRequest. */ + class PauseConnectorRequest implements IPauseConnectorRequest { + + /** + * Constructs a new PauseConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IPauseConnectorRequest); + + /** PauseConnectorRequest name. */ + public name: string; + + /** + * Creates a new PauseConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PauseConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IPauseConnectorRequest): google.cloud.managedkafka.v1.PauseConnectorRequest; + + /** + * Encodes the specified PauseConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorRequest.verify|verify} messages. + * @param message PauseConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IPauseConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PauseConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorRequest.verify|verify} messages. + * @param message PauseConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IPauseConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PauseConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PauseConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.PauseConnectorRequest; + + /** + * Decodes a PauseConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PauseConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.PauseConnectorRequest; + + /** + * Verifies a PauseConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PauseConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PauseConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.PauseConnectorRequest; + + /** + * Creates a plain object from a PauseConnectorRequest message. Also converts values to other types if specified. + * @param message PauseConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.PauseConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PauseConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PauseConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PauseConnectorResponse. */ + interface IPauseConnectorResponse { + } + + /** Represents a PauseConnectorResponse. */ + class PauseConnectorResponse implements IPauseConnectorResponse { + + /** + * Constructs a new PauseConnectorResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IPauseConnectorResponse); + + /** + * Creates a new PauseConnectorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PauseConnectorResponse instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IPauseConnectorResponse): google.cloud.managedkafka.v1.PauseConnectorResponse; + + /** + * Encodes the specified PauseConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorResponse.verify|verify} messages. + * @param message PauseConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IPauseConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PauseConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorResponse.verify|verify} messages. + * @param message PauseConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IPauseConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PauseConnectorResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PauseConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.PauseConnectorResponse; + + /** + * Decodes a PauseConnectorResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PauseConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.PauseConnectorResponse; + + /** + * Verifies a PauseConnectorResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PauseConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PauseConnectorResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.PauseConnectorResponse; + + /** + * Creates a plain object from a PauseConnectorResponse message. Also converts values to other types if specified. + * @param message PauseConnectorResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.PauseConnectorResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PauseConnectorResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PauseConnectorResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResumeConnectorRequest. */ + interface IResumeConnectorRequest { + + /** ResumeConnectorRequest name */ + name?: (string|null); + } + + /** Represents a ResumeConnectorRequest. */ + class ResumeConnectorRequest implements IResumeConnectorRequest { + + /** + * Constructs a new ResumeConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IResumeConnectorRequest); + + /** ResumeConnectorRequest name. */ + public name: string; + + /** + * Creates a new ResumeConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResumeConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IResumeConnectorRequest): google.cloud.managedkafka.v1.ResumeConnectorRequest; + + /** + * Encodes the specified ResumeConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorRequest.verify|verify} messages. + * @param message ResumeConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IResumeConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResumeConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorRequest.verify|verify} messages. + * @param message ResumeConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IResumeConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResumeConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResumeConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ResumeConnectorRequest; + + /** + * Decodes a ResumeConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResumeConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ResumeConnectorRequest; + + /** + * Verifies a ResumeConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResumeConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResumeConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ResumeConnectorRequest; + + /** + * Creates a plain object from a ResumeConnectorRequest message. Also converts values to other types if specified. + * @param message ResumeConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ResumeConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResumeConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResumeConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResumeConnectorResponse. */ + interface IResumeConnectorResponse { + } + + /** Represents a ResumeConnectorResponse. */ + class ResumeConnectorResponse implements IResumeConnectorResponse { + + /** + * Constructs a new ResumeConnectorResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IResumeConnectorResponse); + + /** + * Creates a new ResumeConnectorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ResumeConnectorResponse instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IResumeConnectorResponse): google.cloud.managedkafka.v1.ResumeConnectorResponse; + + /** + * Encodes the specified ResumeConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorResponse.verify|verify} messages. + * @param message ResumeConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IResumeConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResumeConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorResponse.verify|verify} messages. + * @param message ResumeConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IResumeConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResumeConnectorResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResumeConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.ResumeConnectorResponse; + + /** + * Decodes a ResumeConnectorResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResumeConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.ResumeConnectorResponse; + + /** + * Verifies a ResumeConnectorResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResumeConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResumeConnectorResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.ResumeConnectorResponse; + + /** + * Creates a plain object from a ResumeConnectorResponse message. Also converts values to other types if specified. + * @param message ResumeConnectorResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.ResumeConnectorResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResumeConnectorResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResumeConnectorResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestartConnectorRequest. */ + interface IRestartConnectorRequest { + + /** RestartConnectorRequest name */ + name?: (string|null); + } + + /** Represents a RestartConnectorRequest. */ + class RestartConnectorRequest implements IRestartConnectorRequest { + + /** + * Constructs a new RestartConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IRestartConnectorRequest); + + /** RestartConnectorRequest name. */ + public name: string; + + /** + * Creates a new RestartConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestartConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IRestartConnectorRequest): google.cloud.managedkafka.v1.RestartConnectorRequest; + + /** + * Encodes the specified RestartConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorRequest.verify|verify} messages. + * @param message RestartConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IRestartConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestartConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorRequest.verify|verify} messages. + * @param message RestartConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IRestartConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestartConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestartConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.RestartConnectorRequest; + + /** + * Decodes a RestartConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestartConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.RestartConnectorRequest; + + /** + * Verifies a RestartConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestartConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestartConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.RestartConnectorRequest; + + /** + * Creates a plain object from a RestartConnectorRequest message. Also converts values to other types if specified. + * @param message RestartConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.RestartConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestartConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestartConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestartConnectorResponse. */ + interface IRestartConnectorResponse { + } + + /** Represents a RestartConnectorResponse. */ + class RestartConnectorResponse implements IRestartConnectorResponse { + + /** + * Constructs a new RestartConnectorResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IRestartConnectorResponse); + + /** + * Creates a new RestartConnectorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestartConnectorResponse instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IRestartConnectorResponse): google.cloud.managedkafka.v1.RestartConnectorResponse; + + /** + * Encodes the specified RestartConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorResponse.verify|verify} messages. + * @param message RestartConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IRestartConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestartConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorResponse.verify|verify} messages. + * @param message RestartConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IRestartConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestartConnectorResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestartConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.RestartConnectorResponse; + + /** + * Decodes a RestartConnectorResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestartConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.RestartConnectorResponse; + + /** + * Verifies a RestartConnectorResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestartConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestartConnectorResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.RestartConnectorResponse; + + /** + * Creates a plain object from a RestartConnectorResponse message. Also converts values to other types if specified. + * @param message RestartConnectorResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.RestartConnectorResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestartConnectorResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestartConnectorResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopConnectorRequest. */ + interface IStopConnectorRequest { + + /** StopConnectorRequest name */ + name?: (string|null); + } + + /** Represents a StopConnectorRequest. */ + class StopConnectorRequest implements IStopConnectorRequest { + + /** + * Constructs a new StopConnectorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IStopConnectorRequest); + + /** StopConnectorRequest name. */ + public name: string; + + /** + * Creates a new StopConnectorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StopConnectorRequest instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IStopConnectorRequest): google.cloud.managedkafka.v1.StopConnectorRequest; + + /** + * Encodes the specified StopConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorRequest.verify|verify} messages. + * @param message StopConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IStopConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorRequest.verify|verify} messages. + * @param message StopConnectorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IStopConnectorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopConnectorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.StopConnectorRequest; + + /** + * Decodes a StopConnectorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.StopConnectorRequest; + + /** + * Verifies a StopConnectorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StopConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopConnectorRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.StopConnectorRequest; + + /** + * Creates a plain object from a StopConnectorRequest message. Also converts values to other types if specified. + * @param message StopConnectorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.StopConnectorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopConnectorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopConnectorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopConnectorResponse. */ + interface IStopConnectorResponse { + } + + /** Represents a StopConnectorResponse. */ + class StopConnectorResponse implements IStopConnectorResponse { + + /** + * Constructs a new StopConnectorResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.v1.IStopConnectorResponse); + + /** + * Creates a new StopConnectorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StopConnectorResponse instance + */ + public static create(properties?: google.cloud.managedkafka.v1.IStopConnectorResponse): google.cloud.managedkafka.v1.StopConnectorResponse; + + /** + * Encodes the specified StopConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorResponse.verify|verify} messages. + * @param message StopConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.v1.IStopConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorResponse.verify|verify} messages. + * @param message StopConnectorResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.v1.IStopConnectorResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopConnectorResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.v1.StopConnectorResponse; + + /** + * Decodes a StopConnectorResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.v1.StopConnectorResponse; + + /** + * Verifies a StopConnectorResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StopConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopConnectorResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.v1.StopConnectorResponse; + + /** + * Creates a plain object from a StopConnectorResponse message. Also converts values to other types if specified. + * @param message StopConnectorResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.v1.StopConnectorResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopConnectorResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopConnectorResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } diff --git a/packages/google-cloud-managedkafka/protos/protos.js b/packages/google-cloud-managedkafka/protos/protos.js index 55bb79412c1..c2a4c1fb085 100644 --- a/packages/google-cloud-managedkafka/protos/protos.js +++ b/packages/google-cloud-managedkafka/protos/protos.js @@ -7798,6 +7798,6903 @@ return OperationMetadata; })(); + v1.ConnectCluster = (function() { + + /** + * Properties of a ConnectCluster. + * @memberof google.cloud.managedkafka.v1 + * @interface IConnectCluster + * @property {google.cloud.managedkafka.v1.IConnectGcpConfig|null} [gcpConfig] ConnectCluster gcpConfig + * @property {string|null} [name] ConnectCluster name + * @property {string|null} [kafkaCluster] ConnectCluster kafkaCluster + * @property {google.protobuf.ITimestamp|null} [createTime] ConnectCluster createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectCluster updateTime + * @property {Object.|null} [labels] ConnectCluster labels + * @property {google.cloud.managedkafka.v1.ICapacityConfig|null} [capacityConfig] ConnectCluster capacityConfig + * @property {google.cloud.managedkafka.v1.ConnectCluster.State|null} [state] ConnectCluster state + * @property {Object.|null} [config] ConnectCluster config + */ + + /** + * Constructs a new ConnectCluster. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ConnectCluster. + * @implements IConnectCluster + * @constructor + * @param {google.cloud.managedkafka.v1.IConnectCluster=} [properties] Properties to set + */ + function ConnectCluster(properties) { + this.labels = {}; + this.config = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectCluster gcpConfig. + * @member {google.cloud.managedkafka.v1.IConnectGcpConfig|null|undefined} gcpConfig + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.gcpConfig = null; + + /** + * ConnectCluster name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.name = ""; + + /** + * ConnectCluster kafkaCluster. + * @member {string} kafkaCluster + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.kafkaCluster = ""; + + /** + * ConnectCluster createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.createTime = null; + + /** + * ConnectCluster updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.updateTime = null; + + /** + * ConnectCluster labels. + * @member {Object.} labels + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.labels = $util.emptyObject; + + /** + * ConnectCluster capacityConfig. + * @member {google.cloud.managedkafka.v1.ICapacityConfig|null|undefined} capacityConfig + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.capacityConfig = null; + + /** + * ConnectCluster state. + * @member {google.cloud.managedkafka.v1.ConnectCluster.State} state + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.state = 0; + + /** + * ConnectCluster config. + * @member {Object.} config + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + ConnectCluster.prototype.config = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConnectCluster platformConfig. + * @member {"gcpConfig"|undefined} platformConfig + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + */ + Object.defineProperty(ConnectCluster.prototype, "platformConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConnectCluster instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {google.cloud.managedkafka.v1.IConnectCluster=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ConnectCluster} ConnectCluster instance + */ + ConnectCluster.create = function create(properties) { + return new ConnectCluster(properties); + }; + + /** + * Encodes the specified ConnectCluster message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectCluster.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {google.cloud.managedkafka.v1.IConnectCluster} message ConnectCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectCluster.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kafkaCluster != null && Object.hasOwnProperty.call(message, "kafkaCluster")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kafkaCluster); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.capacityConfig != null && Object.hasOwnProperty.call(message, "capacityConfig")) + $root.google.cloud.managedkafka.v1.CapacityConfig.encode(message.capacityConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.gcpConfig != null && Object.hasOwnProperty.call(message, "gcpConfig")) + $root.google.cloud.managedkafka.v1.ConnectGcpConfig.encode(message.gcpConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + for (var keys = Object.keys(message.config), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.config[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConnectCluster message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectCluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {google.cloud.managedkafka.v1.IConnectCluster} message ConnectCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectCluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectCluster message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ConnectCluster} ConnectCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectCluster.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ConnectCluster(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.gcpConfig = $root.google.cloud.managedkafka.v1.ConnectGcpConfig.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.kafkaCluster = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.capacityConfig = $root.google.cloud.managedkafka.v1.CapacityConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + if (message.config === $util.emptyObject) + message.config = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.config[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectCluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ConnectCluster} ConnectCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectCluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectCluster message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectCluster.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpConfig != null && message.hasOwnProperty("gcpConfig")) { + properties.platformConfig = 1; + { + var error = $root.google.cloud.managedkafka.v1.ConnectGcpConfig.verify(message.gcpConfig); + if (error) + return "gcpConfig." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kafkaCluster != null && message.hasOwnProperty("kafkaCluster")) + if (!$util.isString(message.kafkaCluster)) + return "kafkaCluster: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.capacityConfig != null && message.hasOwnProperty("capacityConfig")) { + var error = $root.google.cloud.managedkafka.v1.CapacityConfig.verify(message.capacityConfig); + if (error) + return "capacityConfig." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + if (!$util.isObject(message.config)) + return "config: object expected"; + var key = Object.keys(message.config); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.config[key[i]])) + return "config: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ConnectCluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ConnectCluster} ConnectCluster + */ + ConnectCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ConnectCluster) + return object; + var message = new $root.google.cloud.managedkafka.v1.ConnectCluster(); + if (object.gcpConfig != null) { + if (typeof object.gcpConfig !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectCluster.gcpConfig: object expected"); + message.gcpConfig = $root.google.cloud.managedkafka.v1.ConnectGcpConfig.fromObject(object.gcpConfig); + } + if (object.name != null) + message.name = String(object.name); + if (object.kafkaCluster != null) + message.kafkaCluster = String(object.kafkaCluster); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectCluster.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectCluster.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectCluster.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.capacityConfig != null) { + if (typeof object.capacityConfig !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectCluster.capacityConfig: object expected"); + message.capacityConfig = $root.google.cloud.managedkafka.v1.CapacityConfig.fromObject(object.capacityConfig); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + } + if (object.config) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectCluster.config: object expected"); + message.config = {}; + for (var keys = Object.keys(object.config), i = 0; i < keys.length; ++i) + message.config[keys[i]] = String(object.config[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ConnectCluster message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {google.cloud.managedkafka.v1.ConnectCluster} message ConnectCluster + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectCluster.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.config = {}; + } + if (options.defaults) { + object.name = ""; + object.kafkaCluster = ""; + object.createTime = null; + object.updateTime = null; + object.capacityConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kafkaCluster != null && message.hasOwnProperty("kafkaCluster")) + object.kafkaCluster = message.kafkaCluster; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.capacityConfig != null && message.hasOwnProperty("capacityConfig")) + object.capacityConfig = $root.google.cloud.managedkafka.v1.CapacityConfig.toObject(message.capacityConfig, options); + if (message.gcpConfig != null && message.hasOwnProperty("gcpConfig")) { + object.gcpConfig = $root.google.cloud.managedkafka.v1.ConnectGcpConfig.toObject(message.gcpConfig, options); + if (options.oneofs) + object.platformConfig = "gcpConfig"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.managedkafka.v1.ConnectCluster.State[message.state] === undefined ? message.state : $root.google.cloud.managedkafka.v1.ConnectCluster.State[message.state] : message.state; + if (message.config && (keys2 = Object.keys(message.config)).length) { + object.config = {}; + for (var j = 0; j < keys2.length; ++j) + object.config[keys2[j]] = message.config[keys2[j]]; + } + return object; + }; + + /** + * Converts this ConnectCluster to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @instance + * @returns {Object.} JSON object + */ + ConnectCluster.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectCluster + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ConnectCluster + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ConnectCluster"; + }; + + /** + * State enum. + * @name google.cloud.managedkafka.v1.ConnectCluster.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + */ + ConnectCluster.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + return values; + })(); + + return ConnectCluster; + })(); + + v1.ConnectNetworkConfig = (function() { + + /** + * Properties of a ConnectNetworkConfig. + * @memberof google.cloud.managedkafka.v1 + * @interface IConnectNetworkConfig + * @property {string|null} [primarySubnet] ConnectNetworkConfig primarySubnet + * @property {Array.|null} [additionalSubnets] ConnectNetworkConfig additionalSubnets + * @property {Array.|null} [dnsDomainNames] ConnectNetworkConfig dnsDomainNames + */ + + /** + * Constructs a new ConnectNetworkConfig. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ConnectNetworkConfig. + * @implements IConnectNetworkConfig + * @constructor + * @param {google.cloud.managedkafka.v1.IConnectNetworkConfig=} [properties] Properties to set + */ + function ConnectNetworkConfig(properties) { + this.additionalSubnets = []; + this.dnsDomainNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectNetworkConfig primarySubnet. + * @member {string} primarySubnet + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @instance + */ + ConnectNetworkConfig.prototype.primarySubnet = ""; + + /** + * ConnectNetworkConfig additionalSubnets. + * @member {Array.} additionalSubnets + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @instance + */ + ConnectNetworkConfig.prototype.additionalSubnets = $util.emptyArray; + + /** + * ConnectNetworkConfig dnsDomainNames. + * @member {Array.} dnsDomainNames + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @instance + */ + ConnectNetworkConfig.prototype.dnsDomainNames = $util.emptyArray; + + /** + * Creates a new ConnectNetworkConfig instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectNetworkConfig=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ConnectNetworkConfig} ConnectNetworkConfig instance + */ + ConnectNetworkConfig.create = function create(properties) { + return new ConnectNetworkConfig(properties); + }; + + /** + * Encodes the specified ConnectNetworkConfig message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectNetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectNetworkConfig} message ConnectNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectNetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dnsDomainNames != null && message.dnsDomainNames.length) + for (var i = 0; i < message.dnsDomainNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dnsDomainNames[i]); + if (message.primarySubnet != null && Object.hasOwnProperty.call(message, "primarySubnet")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.primarySubnet); + if (message.additionalSubnets != null && message.additionalSubnets.length) + for (var i = 0; i < message.additionalSubnets.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.additionalSubnets[i]); + return writer; + }; + + /** + * Encodes the specified ConnectNetworkConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectNetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectNetworkConfig} message ConnectNetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectNetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectNetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ConnectNetworkConfig} ConnectNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectNetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ConnectNetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.primarySubnet = reader.string(); + break; + } + case 4: { + if (!(message.additionalSubnets && message.additionalSubnets.length)) + message.additionalSubnets = []; + message.additionalSubnets.push(reader.string()); + break; + } + case 2: { + if (!(message.dnsDomainNames && message.dnsDomainNames.length)) + message.dnsDomainNames = []; + message.dnsDomainNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectNetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ConnectNetworkConfig} ConnectNetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectNetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectNetworkConfig message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectNetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primarySubnet != null && message.hasOwnProperty("primarySubnet")) + if (!$util.isString(message.primarySubnet)) + return "primarySubnet: string expected"; + if (message.additionalSubnets != null && message.hasOwnProperty("additionalSubnets")) { + if (!Array.isArray(message.additionalSubnets)) + return "additionalSubnets: array expected"; + for (var i = 0; i < message.additionalSubnets.length; ++i) + if (!$util.isString(message.additionalSubnets[i])) + return "additionalSubnets: string[] expected"; + } + if (message.dnsDomainNames != null && message.hasOwnProperty("dnsDomainNames")) { + if (!Array.isArray(message.dnsDomainNames)) + return "dnsDomainNames: array expected"; + for (var i = 0; i < message.dnsDomainNames.length; ++i) + if (!$util.isString(message.dnsDomainNames[i])) + return "dnsDomainNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ConnectNetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ConnectNetworkConfig} ConnectNetworkConfig + */ + ConnectNetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ConnectNetworkConfig) + return object; + var message = new $root.google.cloud.managedkafka.v1.ConnectNetworkConfig(); + if (object.primarySubnet != null) + message.primarySubnet = String(object.primarySubnet); + if (object.additionalSubnets) { + if (!Array.isArray(object.additionalSubnets)) + throw TypeError(".google.cloud.managedkafka.v1.ConnectNetworkConfig.additionalSubnets: array expected"); + message.additionalSubnets = []; + for (var i = 0; i < object.additionalSubnets.length; ++i) + message.additionalSubnets[i] = String(object.additionalSubnets[i]); + } + if (object.dnsDomainNames) { + if (!Array.isArray(object.dnsDomainNames)) + throw TypeError(".google.cloud.managedkafka.v1.ConnectNetworkConfig.dnsDomainNames: array expected"); + message.dnsDomainNames = []; + for (var i = 0; i < object.dnsDomainNames.length; ++i) + message.dnsDomainNames[i] = String(object.dnsDomainNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ConnectNetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {google.cloud.managedkafka.v1.ConnectNetworkConfig} message ConnectNetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectNetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dnsDomainNames = []; + object.additionalSubnets = []; + } + if (options.defaults) + object.primarySubnet = ""; + if (message.dnsDomainNames && message.dnsDomainNames.length) { + object.dnsDomainNames = []; + for (var j = 0; j < message.dnsDomainNames.length; ++j) + object.dnsDomainNames[j] = message.dnsDomainNames[j]; + } + if (message.primarySubnet != null && message.hasOwnProperty("primarySubnet")) + object.primarySubnet = message.primarySubnet; + if (message.additionalSubnets && message.additionalSubnets.length) { + object.additionalSubnets = []; + for (var j = 0; j < message.additionalSubnets.length; ++j) + object.additionalSubnets[j] = message.additionalSubnets[j]; + } + return object; + }; + + /** + * Converts this ConnectNetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @instance + * @returns {Object.} JSON object + */ + ConnectNetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectNetworkConfig + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ConnectNetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectNetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ConnectNetworkConfig"; + }; + + return ConnectNetworkConfig; + })(); + + v1.ConnectAccessConfig = (function() { + + /** + * Properties of a ConnectAccessConfig. + * @memberof google.cloud.managedkafka.v1 + * @interface IConnectAccessConfig + * @property {Array.|null} [networkConfigs] ConnectAccessConfig networkConfigs + */ + + /** + * Constructs a new ConnectAccessConfig. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ConnectAccessConfig. + * @implements IConnectAccessConfig + * @constructor + * @param {google.cloud.managedkafka.v1.IConnectAccessConfig=} [properties] Properties to set + */ + function ConnectAccessConfig(properties) { + this.networkConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectAccessConfig networkConfigs. + * @member {Array.} networkConfigs + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @instance + */ + ConnectAccessConfig.prototype.networkConfigs = $util.emptyArray; + + /** + * Creates a new ConnectAccessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectAccessConfig=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ConnectAccessConfig} ConnectAccessConfig instance + */ + ConnectAccessConfig.create = function create(properties) { + return new ConnectAccessConfig(properties); + }; + + /** + * Encodes the specified ConnectAccessConfig message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectAccessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectAccessConfig} message ConnectAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectAccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkConfigs != null && message.networkConfigs.length) + for (var i = 0; i < message.networkConfigs.length; ++i) + $root.google.cloud.managedkafka.v1.ConnectNetworkConfig.encode(message.networkConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConnectAccessConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectAccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectAccessConfig} message ConnectAccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectAccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectAccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ConnectAccessConfig} ConnectAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectAccessConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ConnectAccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.networkConfigs && message.networkConfigs.length)) + message.networkConfigs = []; + message.networkConfigs.push($root.google.cloud.managedkafka.v1.ConnectNetworkConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectAccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ConnectAccessConfig} ConnectAccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectAccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectAccessConfig message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectAccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkConfigs != null && message.hasOwnProperty("networkConfigs")) { + if (!Array.isArray(message.networkConfigs)) + return "networkConfigs: array expected"; + for (var i = 0; i < message.networkConfigs.length; ++i) { + var error = $root.google.cloud.managedkafka.v1.ConnectNetworkConfig.verify(message.networkConfigs[i]); + if (error) + return "networkConfigs." + error; + } + } + return null; + }; + + /** + * Creates a ConnectAccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ConnectAccessConfig} ConnectAccessConfig + */ + ConnectAccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ConnectAccessConfig) + return object; + var message = new $root.google.cloud.managedkafka.v1.ConnectAccessConfig(); + if (object.networkConfigs) { + if (!Array.isArray(object.networkConfigs)) + throw TypeError(".google.cloud.managedkafka.v1.ConnectAccessConfig.networkConfigs: array expected"); + message.networkConfigs = []; + for (var i = 0; i < object.networkConfigs.length; ++i) { + if (typeof object.networkConfigs[i] !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectAccessConfig.networkConfigs: object expected"); + message.networkConfigs[i] = $root.google.cloud.managedkafka.v1.ConnectNetworkConfig.fromObject(object.networkConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ConnectAccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {google.cloud.managedkafka.v1.ConnectAccessConfig} message ConnectAccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectAccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkConfigs = []; + if (message.networkConfigs && message.networkConfigs.length) { + object.networkConfigs = []; + for (var j = 0; j < message.networkConfigs.length; ++j) + object.networkConfigs[j] = $root.google.cloud.managedkafka.v1.ConnectNetworkConfig.toObject(message.networkConfigs[j], options); + } + return object; + }; + + /** + * Converts this ConnectAccessConfig to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @instance + * @returns {Object.} JSON object + */ + ConnectAccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectAccessConfig + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ConnectAccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectAccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ConnectAccessConfig"; + }; + + return ConnectAccessConfig; + })(); + + v1.ConnectGcpConfig = (function() { + + /** + * Properties of a ConnectGcpConfig. + * @memberof google.cloud.managedkafka.v1 + * @interface IConnectGcpConfig + * @property {google.cloud.managedkafka.v1.IConnectAccessConfig|null} [accessConfig] ConnectGcpConfig accessConfig + * @property {Array.|null} [secretPaths] ConnectGcpConfig secretPaths + */ + + /** + * Constructs a new ConnectGcpConfig. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ConnectGcpConfig. + * @implements IConnectGcpConfig + * @constructor + * @param {google.cloud.managedkafka.v1.IConnectGcpConfig=} [properties] Properties to set + */ + function ConnectGcpConfig(properties) { + this.secretPaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectGcpConfig accessConfig. + * @member {google.cloud.managedkafka.v1.IConnectAccessConfig|null|undefined} accessConfig + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @instance + */ + ConnectGcpConfig.prototype.accessConfig = null; + + /** + * ConnectGcpConfig secretPaths. + * @member {Array.} secretPaths + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @instance + */ + ConnectGcpConfig.prototype.secretPaths = $util.emptyArray; + + /** + * Creates a new ConnectGcpConfig instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectGcpConfig=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ConnectGcpConfig} ConnectGcpConfig instance + */ + ConnectGcpConfig.create = function create(properties) { + return new ConnectGcpConfig(properties); + }; + + /** + * Encodes the specified ConnectGcpConfig message. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectGcpConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectGcpConfig} message ConnectGcpConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectGcpConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessConfig != null && Object.hasOwnProperty.call(message, "accessConfig")) + $root.google.cloud.managedkafka.v1.ConnectAccessConfig.encode(message.accessConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.secretPaths != null && message.secretPaths.length) + for (var i = 0; i < message.secretPaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secretPaths[i]); + return writer; + }; + + /** + * Encodes the specified ConnectGcpConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ConnectGcpConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {google.cloud.managedkafka.v1.IConnectGcpConfig} message ConnectGcpConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectGcpConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectGcpConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ConnectGcpConfig} ConnectGcpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectGcpConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ConnectGcpConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accessConfig = $root.google.cloud.managedkafka.v1.ConnectAccessConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.secretPaths && message.secretPaths.length)) + message.secretPaths = []; + message.secretPaths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectGcpConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ConnectGcpConfig} ConnectGcpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectGcpConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectGcpConfig message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectGcpConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessConfig != null && message.hasOwnProperty("accessConfig")) { + var error = $root.google.cloud.managedkafka.v1.ConnectAccessConfig.verify(message.accessConfig); + if (error) + return "accessConfig." + error; + } + if (message.secretPaths != null && message.hasOwnProperty("secretPaths")) { + if (!Array.isArray(message.secretPaths)) + return "secretPaths: array expected"; + for (var i = 0; i < message.secretPaths.length; ++i) + if (!$util.isString(message.secretPaths[i])) + return "secretPaths: string[] expected"; + } + return null; + }; + + /** + * Creates a ConnectGcpConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ConnectGcpConfig} ConnectGcpConfig + */ + ConnectGcpConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ConnectGcpConfig) + return object; + var message = new $root.google.cloud.managedkafka.v1.ConnectGcpConfig(); + if (object.accessConfig != null) { + if (typeof object.accessConfig !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ConnectGcpConfig.accessConfig: object expected"); + message.accessConfig = $root.google.cloud.managedkafka.v1.ConnectAccessConfig.fromObject(object.accessConfig); + } + if (object.secretPaths) { + if (!Array.isArray(object.secretPaths)) + throw TypeError(".google.cloud.managedkafka.v1.ConnectGcpConfig.secretPaths: array expected"); + message.secretPaths = []; + for (var i = 0; i < object.secretPaths.length; ++i) + message.secretPaths[i] = String(object.secretPaths[i]); + } + return message; + }; + + /** + * Creates a plain object from a ConnectGcpConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {google.cloud.managedkafka.v1.ConnectGcpConfig} message ConnectGcpConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectGcpConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.secretPaths = []; + if (options.defaults) + object.accessConfig = null; + if (message.accessConfig != null && message.hasOwnProperty("accessConfig")) + object.accessConfig = $root.google.cloud.managedkafka.v1.ConnectAccessConfig.toObject(message.accessConfig, options); + if (message.secretPaths && message.secretPaths.length) { + object.secretPaths = []; + for (var j = 0; j < message.secretPaths.length; ++j) + object.secretPaths[j] = message.secretPaths[j]; + } + return object; + }; + + /** + * Converts this ConnectGcpConfig to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @instance + * @returns {Object.} JSON object + */ + ConnectGcpConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectGcpConfig + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ConnectGcpConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectGcpConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ConnectGcpConfig"; + }; + + return ConnectGcpConfig; + })(); + + v1.Connector = (function() { + + /** + * Properties of a Connector. + * @memberof google.cloud.managedkafka.v1 + * @interface IConnector + * @property {google.cloud.managedkafka.v1.ITaskRetryPolicy|null} [taskRestartPolicy] Connector taskRestartPolicy + * @property {string|null} [name] Connector name + * @property {Object.|null} [configs] Connector configs + * @property {google.cloud.managedkafka.v1.Connector.State|null} [state] Connector state + */ + + /** + * Constructs a new Connector. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a Connector. + * @implements IConnector + * @constructor + * @param {google.cloud.managedkafka.v1.IConnector=} [properties] Properties to set + */ + function Connector(properties) { + this.configs = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Connector taskRestartPolicy. + * @member {google.cloud.managedkafka.v1.ITaskRetryPolicy|null|undefined} taskRestartPolicy + * @memberof google.cloud.managedkafka.v1.Connector + * @instance + */ + Connector.prototype.taskRestartPolicy = null; + + /** + * Connector name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.Connector + * @instance + */ + Connector.prototype.name = ""; + + /** + * Connector configs. + * @member {Object.} configs + * @memberof google.cloud.managedkafka.v1.Connector + * @instance + */ + Connector.prototype.configs = $util.emptyObject; + + /** + * Connector state. + * @member {google.cloud.managedkafka.v1.Connector.State} state + * @memberof google.cloud.managedkafka.v1.Connector + * @instance + */ + Connector.prototype.state = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Connector restartPolicy. + * @member {"taskRestartPolicy"|undefined} restartPolicy + * @memberof google.cloud.managedkafka.v1.Connector + * @instance + */ + Object.defineProperty(Connector.prototype, "restartPolicy", { + get: $util.oneOfGetter($oneOfFields = ["taskRestartPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Connector instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {google.cloud.managedkafka.v1.IConnector=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.Connector} Connector instance + */ + Connector.create = function create(properties) { + return new Connector(properties); + }; + + /** + * Encodes the specified Connector message. Does not implicitly {@link google.cloud.managedkafka.v1.Connector.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {google.cloud.managedkafka.v1.IConnector} message Connector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Connector.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.configs != null && Object.hasOwnProperty.call(message, "configs")) + for (var keys = Object.keys(message.configs), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configs[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.taskRestartPolicy != null && Object.hasOwnProperty.call(message, "taskRestartPolicy")) + $root.google.cloud.managedkafka.v1.TaskRetryPolicy.encode(message.taskRestartPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Connector message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.Connector.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {google.cloud.managedkafka.v1.IConnector} message Connector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Connector.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Connector message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.Connector} Connector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Connector.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.Connector(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.taskRestartPolicy = $root.google.cloud.managedkafka.v1.TaskRetryPolicy.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.configs === $util.emptyObject) + message.configs = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.configs[key] = value; + break; + } + case 3: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Connector message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.Connector} Connector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Connector.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Connector message. + * @function verify + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Connector.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.taskRestartPolicy != null && message.hasOwnProperty("taskRestartPolicy")) { + properties.restartPolicy = 1; + { + var error = $root.google.cloud.managedkafka.v1.TaskRetryPolicy.verify(message.taskRestartPolicy); + if (error) + return "taskRestartPolicy." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.configs != null && message.hasOwnProperty("configs")) { + if (!$util.isObject(message.configs)) + return "configs: object expected"; + var key = Object.keys(message.configs); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.configs[key[i]])) + return "configs: string{k:string} expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a Connector message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.Connector} Connector + */ + Connector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.Connector) + return object; + var message = new $root.google.cloud.managedkafka.v1.Connector(); + if (object.taskRestartPolicy != null) { + if (typeof object.taskRestartPolicy !== "object") + throw TypeError(".google.cloud.managedkafka.v1.Connector.taskRestartPolicy: object expected"); + message.taskRestartPolicy = $root.google.cloud.managedkafka.v1.TaskRetryPolicy.fromObject(object.taskRestartPolicy); + } + if (object.name != null) + message.name = String(object.name); + if (object.configs) { + if (typeof object.configs !== "object") + throw TypeError(".google.cloud.managedkafka.v1.Connector.configs: object expected"); + message.configs = {}; + for (var keys = Object.keys(object.configs), i = 0; i < keys.length; ++i) + message.configs[keys[i]] = String(object.configs[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "UNASSIGNED": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "RESTARTING": + case 5: + message.state = 5; + break; + case "STOPPED": + case 6: + message.state = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a Connector message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {google.cloud.managedkafka.v1.Connector} message Connector + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Connector.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.configs = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.configs && (keys2 = Object.keys(message.configs)).length) { + object.configs = {}; + for (var j = 0; j < keys2.length; ++j) + object.configs[keys2[j]] = message.configs[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.managedkafka.v1.Connector.State[message.state] === undefined ? message.state : $root.google.cloud.managedkafka.v1.Connector.State[message.state] : message.state; + if (message.taskRestartPolicy != null && message.hasOwnProperty("taskRestartPolicy")) { + object.taskRestartPolicy = $root.google.cloud.managedkafka.v1.TaskRetryPolicy.toObject(message.taskRestartPolicy, options); + if (options.oneofs) + object.restartPolicy = "taskRestartPolicy"; + } + return object; + }; + + /** + * Converts this Connector to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.Connector + * @instance + * @returns {Object.} JSON object + */ + Connector.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Connector + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.Connector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Connector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.Connector"; + }; + + /** + * State enum. + * @name google.cloud.managedkafka.v1.Connector.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} UNASSIGNED=1 UNASSIGNED value + * @property {number} RUNNING=2 RUNNING value + * @property {number} PAUSED=3 PAUSED value + * @property {number} FAILED=4 FAILED value + * @property {number} RESTARTING=5 RESTARTING value + * @property {number} STOPPED=6 STOPPED value + */ + Connector.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNASSIGNED"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "RESTARTING"] = 5; + values[valuesById[6] = "STOPPED"] = 6; + return values; + })(); + + return Connector; + })(); + + v1.TaskRetryPolicy = (function() { + + /** + * Properties of a TaskRetryPolicy. + * @memberof google.cloud.managedkafka.v1 + * @interface ITaskRetryPolicy + * @property {google.protobuf.IDuration|null} [minimumBackoff] TaskRetryPolicy minimumBackoff + * @property {google.protobuf.IDuration|null} [maximumBackoff] TaskRetryPolicy maximumBackoff + */ + + /** + * Constructs a new TaskRetryPolicy. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a TaskRetryPolicy. + * @implements ITaskRetryPolicy + * @constructor + * @param {google.cloud.managedkafka.v1.ITaskRetryPolicy=} [properties] Properties to set + */ + function TaskRetryPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TaskRetryPolicy minimumBackoff. + * @member {google.protobuf.IDuration|null|undefined} minimumBackoff + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @instance + */ + TaskRetryPolicy.prototype.minimumBackoff = null; + + /** + * TaskRetryPolicy maximumBackoff. + * @member {google.protobuf.IDuration|null|undefined} maximumBackoff + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @instance + */ + TaskRetryPolicy.prototype.maximumBackoff = null; + + /** + * Creates a new TaskRetryPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {google.cloud.managedkafka.v1.ITaskRetryPolicy=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.TaskRetryPolicy} TaskRetryPolicy instance + */ + TaskRetryPolicy.create = function create(properties) { + return new TaskRetryPolicy(properties); + }; + + /** + * Encodes the specified TaskRetryPolicy message. Does not implicitly {@link google.cloud.managedkafka.v1.TaskRetryPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {google.cloud.managedkafka.v1.ITaskRetryPolicy} message TaskRetryPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskRetryPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minimumBackoff != null && Object.hasOwnProperty.call(message, "minimumBackoff")) + $root.google.protobuf.Duration.encode(message.minimumBackoff, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maximumBackoff != null && Object.hasOwnProperty.call(message, "maximumBackoff")) + $root.google.protobuf.Duration.encode(message.maximumBackoff, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TaskRetryPolicy message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.TaskRetryPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {google.cloud.managedkafka.v1.ITaskRetryPolicy} message TaskRetryPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskRetryPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TaskRetryPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.TaskRetryPolicy} TaskRetryPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskRetryPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.TaskRetryPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minimumBackoff = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.maximumBackoff = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TaskRetryPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.TaskRetryPolicy} TaskRetryPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskRetryPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TaskRetryPolicy message. + * @function verify + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaskRetryPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minimumBackoff != null && message.hasOwnProperty("minimumBackoff")) { + var error = $root.google.protobuf.Duration.verify(message.minimumBackoff); + if (error) + return "minimumBackoff." + error; + } + if (message.maximumBackoff != null && message.hasOwnProperty("maximumBackoff")) { + var error = $root.google.protobuf.Duration.verify(message.maximumBackoff); + if (error) + return "maximumBackoff." + error; + } + return null; + }; + + /** + * Creates a TaskRetryPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.TaskRetryPolicy} TaskRetryPolicy + */ + TaskRetryPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.TaskRetryPolicy) + return object; + var message = new $root.google.cloud.managedkafka.v1.TaskRetryPolicy(); + if (object.minimumBackoff != null) { + if (typeof object.minimumBackoff !== "object") + throw TypeError(".google.cloud.managedkafka.v1.TaskRetryPolicy.minimumBackoff: object expected"); + message.minimumBackoff = $root.google.protobuf.Duration.fromObject(object.minimumBackoff); + } + if (object.maximumBackoff != null) { + if (typeof object.maximumBackoff !== "object") + throw TypeError(".google.cloud.managedkafka.v1.TaskRetryPolicy.maximumBackoff: object expected"); + message.maximumBackoff = $root.google.protobuf.Duration.fromObject(object.maximumBackoff); + } + return message; + }; + + /** + * Creates a plain object from a TaskRetryPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {google.cloud.managedkafka.v1.TaskRetryPolicy} message TaskRetryPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TaskRetryPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minimumBackoff = null; + object.maximumBackoff = null; + } + if (message.minimumBackoff != null && message.hasOwnProperty("minimumBackoff")) + object.minimumBackoff = $root.google.protobuf.Duration.toObject(message.minimumBackoff, options); + if (message.maximumBackoff != null && message.hasOwnProperty("maximumBackoff")) + object.maximumBackoff = $root.google.protobuf.Duration.toObject(message.maximumBackoff, options); + return object; + }; + + /** + * Converts this TaskRetryPolicy to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @instance + * @returns {Object.} JSON object + */ + TaskRetryPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TaskRetryPolicy + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.TaskRetryPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TaskRetryPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.TaskRetryPolicy"; + }; + + return TaskRetryPolicy; + })(); + + v1.ManagedKafkaConnect = (function() { + + /** + * Constructs a new ManagedKafkaConnect service. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ManagedKafkaConnect + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ManagedKafkaConnect(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ManagedKafkaConnect.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ManagedKafkaConnect; + + /** + * Creates new ManagedKafkaConnect service using the specified rpc implementation. + * @function create + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ManagedKafkaConnect} RPC service. Useful where requests and/or responses are streamed. + */ + ManagedKafkaConnect.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|listConnectClusters}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef ListConnectClustersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.ListConnectClustersResponse} [response] ListConnectClustersResponse + */ + + /** + * Calls ListConnectClusters. + * @function listConnectClusters + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IListConnectClustersRequest} request ListConnectClustersRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectClustersCallback} callback Node-style callback called with the error, if any, and ListConnectClustersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.listConnectClusters = function listConnectClusters(request, callback) { + return this.rpcCall(listConnectClusters, $root.google.cloud.managedkafka.v1.ListConnectClustersRequest, $root.google.cloud.managedkafka.v1.ListConnectClustersResponse, request, callback); + }, "name", { value: "ListConnectClusters" }); + + /** + * Calls ListConnectClusters. + * @function listConnectClusters + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IListConnectClustersRequest} request ListConnectClustersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|getConnectCluster}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef GetConnectClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.ConnectCluster} [response] ConnectCluster + */ + + /** + * Calls GetConnectCluster. + * @function getConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IGetConnectClusterRequest} request GetConnectClusterRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnectClusterCallback} callback Node-style callback called with the error, if any, and ConnectCluster + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.getConnectCluster = function getConnectCluster(request, callback) { + return this.rpcCall(getConnectCluster, $root.google.cloud.managedkafka.v1.GetConnectClusterRequest, $root.google.cloud.managedkafka.v1.ConnectCluster, request, callback); + }, "name", { value: "GetConnectCluster" }); + + /** + * Calls GetConnectCluster. + * @function getConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IGetConnectClusterRequest} request GetConnectClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|createConnectCluster}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef CreateConnectClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConnectCluster. + * @function createConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.ICreateConnectClusterRequest} request CreateConnectClusterRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnectClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.createConnectCluster = function createConnectCluster(request, callback) { + return this.rpcCall(createConnectCluster, $root.google.cloud.managedkafka.v1.CreateConnectClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConnectCluster" }); + + /** + * Calls CreateConnectCluster. + * @function createConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.ICreateConnectClusterRequest} request CreateConnectClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|updateConnectCluster}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef UpdateConnectClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateConnectCluster. + * @function updateConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IUpdateConnectClusterRequest} request UpdateConnectClusterRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnectClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.updateConnectCluster = function updateConnectCluster(request, callback) { + return this.rpcCall(updateConnectCluster, $root.google.cloud.managedkafka.v1.UpdateConnectClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConnectCluster" }); + + /** + * Calls UpdateConnectCluster. + * @function updateConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IUpdateConnectClusterRequest} request UpdateConnectClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|deleteConnectCluster}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef DeleteConnectClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConnectCluster. + * @function deleteConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IDeleteConnectClusterRequest} request DeleteConnectClusterRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnectClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.deleteConnectCluster = function deleteConnectCluster(request, callback) { + return this.rpcCall(deleteConnectCluster, $root.google.cloud.managedkafka.v1.DeleteConnectClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConnectCluster" }); + + /** + * Calls DeleteConnectCluster. + * @function deleteConnectCluster + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IDeleteConnectClusterRequest} request DeleteConnectClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|listConnectors}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef ListConnectorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.ListConnectorsResponse} [response] ListConnectorsResponse + */ + + /** + * Calls ListConnectors. + * @function listConnectors + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IListConnectorsRequest} request ListConnectorsRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectorsCallback} callback Node-style callback called with the error, if any, and ListConnectorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.listConnectors = function listConnectors(request, callback) { + return this.rpcCall(listConnectors, $root.google.cloud.managedkafka.v1.ListConnectorsRequest, $root.google.cloud.managedkafka.v1.ListConnectorsResponse, request, callback); + }, "name", { value: "ListConnectors" }); + + /** + * Calls ListConnectors. + * @function listConnectors + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IListConnectorsRequest} request ListConnectorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|getConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef GetConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.Connector} [response] Connector + */ + + /** + * Calls GetConnector. + * @function getConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IGetConnectorRequest} request GetConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnectorCallback} callback Node-style callback called with the error, if any, and Connector + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.getConnector = function getConnector(request, callback) { + return this.rpcCall(getConnector, $root.google.cloud.managedkafka.v1.GetConnectorRequest, $root.google.cloud.managedkafka.v1.Connector, request, callback); + }, "name", { value: "GetConnector" }); + + /** + * Calls GetConnector. + * @function getConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IGetConnectorRequest} request GetConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|createConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef CreateConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.Connector} [response] Connector + */ + + /** + * Calls CreateConnector. + * @function createConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.ICreateConnectorRequest} request CreateConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnectorCallback} callback Node-style callback called with the error, if any, and Connector + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.createConnector = function createConnector(request, callback) { + return this.rpcCall(createConnector, $root.google.cloud.managedkafka.v1.CreateConnectorRequest, $root.google.cloud.managedkafka.v1.Connector, request, callback); + }, "name", { value: "CreateConnector" }); + + /** + * Calls CreateConnector. + * @function createConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.ICreateConnectorRequest} request CreateConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|updateConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef UpdateConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.Connector} [response] Connector + */ + + /** + * Calls UpdateConnector. + * @function updateConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IUpdateConnectorRequest} request UpdateConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnectorCallback} callback Node-style callback called with the error, if any, and Connector + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.updateConnector = function updateConnector(request, callback) { + return this.rpcCall(updateConnector, $root.google.cloud.managedkafka.v1.UpdateConnectorRequest, $root.google.cloud.managedkafka.v1.Connector, request, callback); + }, "name", { value: "UpdateConnector" }); + + /** + * Calls UpdateConnector. + * @function updateConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IUpdateConnectorRequest} request UpdateConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|deleteConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef DeleteConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConnector. + * @function deleteConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IDeleteConnectorRequest} request DeleteConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnectorCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.deleteConnector = function deleteConnector(request, callback) { + return this.rpcCall(deleteConnector, $root.google.cloud.managedkafka.v1.DeleteConnectorRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConnector" }); + + /** + * Calls DeleteConnector. + * @function deleteConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IDeleteConnectorRequest} request DeleteConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|pauseConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef PauseConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.PauseConnectorResponse} [response] PauseConnectorResponse + */ + + /** + * Calls PauseConnector. + * @function pauseConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IPauseConnectorRequest} request PauseConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.PauseConnectorCallback} callback Node-style callback called with the error, if any, and PauseConnectorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.pauseConnector = function pauseConnector(request, callback) { + return this.rpcCall(pauseConnector, $root.google.cloud.managedkafka.v1.PauseConnectorRequest, $root.google.cloud.managedkafka.v1.PauseConnectorResponse, request, callback); + }, "name", { value: "PauseConnector" }); + + /** + * Calls PauseConnector. + * @function pauseConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IPauseConnectorRequest} request PauseConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|resumeConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef ResumeConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.ResumeConnectorResponse} [response] ResumeConnectorResponse + */ + + /** + * Calls ResumeConnector. + * @function resumeConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IResumeConnectorRequest} request ResumeConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.ResumeConnectorCallback} callback Node-style callback called with the error, if any, and ResumeConnectorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.resumeConnector = function resumeConnector(request, callback) { + return this.rpcCall(resumeConnector, $root.google.cloud.managedkafka.v1.ResumeConnectorRequest, $root.google.cloud.managedkafka.v1.ResumeConnectorResponse, request, callback); + }, "name", { value: "ResumeConnector" }); + + /** + * Calls ResumeConnector. + * @function resumeConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IResumeConnectorRequest} request ResumeConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|restartConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef RestartConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.RestartConnectorResponse} [response] RestartConnectorResponse + */ + + /** + * Calls RestartConnector. + * @function restartConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IRestartConnectorRequest} request RestartConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.RestartConnectorCallback} callback Node-style callback called with the error, if any, and RestartConnectorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.restartConnector = function restartConnector(request, callback) { + return this.rpcCall(restartConnector, $root.google.cloud.managedkafka.v1.RestartConnectorRequest, $root.google.cloud.managedkafka.v1.RestartConnectorResponse, request, callback); + }, "name", { value: "RestartConnector" }); + + /** + * Calls RestartConnector. + * @function restartConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IRestartConnectorRequest} request RestartConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.v1.ManagedKafkaConnect|stopConnector}. + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @typedef StopConnectorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.v1.StopConnectorResponse} [response] StopConnectorResponse + */ + + /** + * Calls StopConnector. + * @function stopConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IStopConnectorRequest} request StopConnectorRequest message or plain object + * @param {google.cloud.managedkafka.v1.ManagedKafkaConnect.StopConnectorCallback} callback Node-style callback called with the error, if any, and StopConnectorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedKafkaConnect.prototype.stopConnector = function stopConnector(request, callback) { + return this.rpcCall(stopConnector, $root.google.cloud.managedkafka.v1.StopConnectorRequest, $root.google.cloud.managedkafka.v1.StopConnectorResponse, request, callback); + }, "name", { value: "StopConnector" }); + + /** + * Calls StopConnector. + * @function stopConnector + * @memberof google.cloud.managedkafka.v1.ManagedKafkaConnect + * @instance + * @param {google.cloud.managedkafka.v1.IStopConnectorRequest} request StopConnectorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ManagedKafkaConnect; + })(); + + v1.GetConnectClusterRequest = (function() { + + /** + * Properties of a GetConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IGetConnectClusterRequest + * @property {string|null} [name] GetConnectClusterRequest name + */ + + /** + * Constructs a new GetConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a GetConnectClusterRequest. + * @implements IGetConnectClusterRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IGetConnectClusterRequest=} [properties] Properties to set + */ + function GetConnectClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectClusterRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @instance + */ + GetConnectClusterRequest.prototype.name = ""; + + /** + * Creates a new GetConnectClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IGetConnectClusterRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.GetConnectClusterRequest} GetConnectClusterRequest instance + */ + GetConnectClusterRequest.create = function create(properties) { + return new GetConnectClusterRequest(properties); + }; + + /** + * Encodes the specified GetConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IGetConnectClusterRequest} message GetConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IGetConnectClusterRequest} message GetConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.GetConnectClusterRequest} GetConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.GetConnectClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConnectClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.GetConnectClusterRequest} GetConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectClusterRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.GetConnectClusterRequest} GetConnectClusterRequest + */ + GetConnectClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.GetConnectClusterRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.GetConnectClusterRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.GetConnectClusterRequest} message GetConnectClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetConnectClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectClusterRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.GetConnectClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.GetConnectClusterRequest"; + }; + + return GetConnectClusterRequest; + })(); + + v1.CreateConnectClusterRequest = (function() { + + /** + * Properties of a CreateConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface ICreateConnectClusterRequest + * @property {string|null} [parent] CreateConnectClusterRequest parent + * @property {string|null} [connectClusterId] CreateConnectClusterRequest connectClusterId + * @property {google.cloud.managedkafka.v1.IConnectCluster|null} [connectCluster] CreateConnectClusterRequest connectCluster + * @property {string|null} [requestId] CreateConnectClusterRequest requestId + */ + + /** + * Constructs a new CreateConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a CreateConnectClusterRequest. + * @implements ICreateConnectClusterRequest + * @constructor + * @param {google.cloud.managedkafka.v1.ICreateConnectClusterRequest=} [properties] Properties to set + */ + function CreateConnectClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectClusterRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @instance + */ + CreateConnectClusterRequest.prototype.parent = ""; + + /** + * CreateConnectClusterRequest connectClusterId. + * @member {string} connectClusterId + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @instance + */ + CreateConnectClusterRequest.prototype.connectClusterId = ""; + + /** + * CreateConnectClusterRequest connectCluster. + * @member {google.cloud.managedkafka.v1.IConnectCluster|null|undefined} connectCluster + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @instance + */ + CreateConnectClusterRequest.prototype.connectCluster = null; + + /** + * CreateConnectClusterRequest requestId. + * @member {string} requestId + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @instance + */ + CreateConnectClusterRequest.prototype.requestId = ""; + + /** + * Creates a new CreateConnectClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.ICreateConnectClusterRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.CreateConnectClusterRequest} CreateConnectClusterRequest instance + */ + CreateConnectClusterRequest.create = function create(properties) { + return new CreateConnectClusterRequest(properties); + }; + + /** + * Encodes the specified CreateConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.ICreateConnectClusterRequest} message CreateConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.connectClusterId != null && Object.hasOwnProperty.call(message, "connectClusterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectClusterId); + if (message.connectCluster != null && Object.hasOwnProperty.call(message, "connectCluster")) + $root.google.cloud.managedkafka.v1.ConnectCluster.encode(message.connectCluster, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.ICreateConnectClusterRequest} message CreateConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.CreateConnectClusterRequest} CreateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.CreateConnectClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.connectClusterId = reader.string(); + break; + } + case 3: { + message.connectCluster = $root.google.cloud.managedkafka.v1.ConnectCluster.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.CreateConnectClusterRequest} CreateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectClusterRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.connectClusterId != null && message.hasOwnProperty("connectClusterId")) + if (!$util.isString(message.connectClusterId)) + return "connectClusterId: string expected"; + if (message.connectCluster != null && message.hasOwnProperty("connectCluster")) { + var error = $root.google.cloud.managedkafka.v1.ConnectCluster.verify(message.connectCluster); + if (error) + return "connectCluster." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.CreateConnectClusterRequest} CreateConnectClusterRequest + */ + CreateConnectClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.CreateConnectClusterRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.CreateConnectClusterRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.connectClusterId != null) + message.connectClusterId = String(object.connectClusterId); + if (object.connectCluster != null) { + if (typeof object.connectCluster !== "object") + throw TypeError(".google.cloud.managedkafka.v1.CreateConnectClusterRequest.connectCluster: object expected"); + message.connectCluster = $root.google.cloud.managedkafka.v1.ConnectCluster.fromObject(object.connectCluster); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateConnectClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.CreateConnectClusterRequest} message CreateConnectClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.connectClusterId = ""; + object.connectCluster = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.connectClusterId != null && message.hasOwnProperty("connectClusterId")) + object.connectClusterId = message.connectClusterId; + if (message.connectCluster != null && message.hasOwnProperty("connectCluster")) + object.connectCluster = $root.google.cloud.managedkafka.v1.ConnectCluster.toObject(message.connectCluster, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateConnectClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectClusterRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.CreateConnectClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.CreateConnectClusterRequest"; + }; + + return CreateConnectClusterRequest; + })(); + + v1.UpdateConnectClusterRequest = (function() { + + /** + * Properties of an UpdateConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IUpdateConnectClusterRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectClusterRequest updateMask + * @property {google.cloud.managedkafka.v1.IConnectCluster|null} [connectCluster] UpdateConnectClusterRequest connectCluster + * @property {string|null} [requestId] UpdateConnectClusterRequest requestId + */ + + /** + * Constructs a new UpdateConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents an UpdateConnectClusterRequest. + * @implements IUpdateConnectClusterRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IUpdateConnectClusterRequest=} [properties] Properties to set + */ + function UpdateConnectClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectClusterRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @instance + */ + UpdateConnectClusterRequest.prototype.updateMask = null; + + /** + * UpdateConnectClusterRequest connectCluster. + * @member {google.cloud.managedkafka.v1.IConnectCluster|null|undefined} connectCluster + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @instance + */ + UpdateConnectClusterRequest.prototype.connectCluster = null; + + /** + * UpdateConnectClusterRequest requestId. + * @member {string} requestId + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @instance + */ + UpdateConnectClusterRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateConnectClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IUpdateConnectClusterRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.UpdateConnectClusterRequest} UpdateConnectClusterRequest instance + */ + UpdateConnectClusterRequest.create = function create(properties) { + return new UpdateConnectClusterRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IUpdateConnectClusterRequest} message UpdateConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.connectCluster != null && Object.hasOwnProperty.call(message, "connectCluster")) + $root.google.cloud.managedkafka.v1.ConnectCluster.encode(message.connectCluster, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IUpdateConnectClusterRequest} message UpdateConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.UpdateConnectClusterRequest} UpdateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.UpdateConnectClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.connectCluster = $root.google.cloud.managedkafka.v1.ConnectCluster.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.UpdateConnectClusterRequest} UpdateConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectClusterRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.connectCluster != null && message.hasOwnProperty("connectCluster")) { + var error = $root.google.cloud.managedkafka.v1.ConnectCluster.verify(message.connectCluster); + if (error) + return "connectCluster." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.UpdateConnectClusterRequest} UpdateConnectClusterRequest + */ + UpdateConnectClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.UpdateConnectClusterRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.UpdateConnectClusterRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.managedkafka.v1.UpdateConnectClusterRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.connectCluster != null) { + if (typeof object.connectCluster !== "object") + throw TypeError(".google.cloud.managedkafka.v1.UpdateConnectClusterRequest.connectCluster: object expected"); + message.connectCluster = $root.google.cloud.managedkafka.v1.ConnectCluster.fromObject(object.connectCluster); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateConnectClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.UpdateConnectClusterRequest} message UpdateConnectClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.connectCluster = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.connectCluster != null && message.hasOwnProperty("connectCluster")) + object.connectCluster = $root.google.cloud.managedkafka.v1.ConnectCluster.toObject(message.connectCluster, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateConnectClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectClusterRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.UpdateConnectClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.UpdateConnectClusterRequest"; + }; + + return UpdateConnectClusterRequest; + })(); + + v1.DeleteConnectClusterRequest = (function() { + + /** + * Properties of a DeleteConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IDeleteConnectClusterRequest + * @property {string|null} [name] DeleteConnectClusterRequest name + * @property {string|null} [requestId] DeleteConnectClusterRequest requestId + */ + + /** + * Constructs a new DeleteConnectClusterRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a DeleteConnectClusterRequest. + * @implements IDeleteConnectClusterRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IDeleteConnectClusterRequest=} [properties] Properties to set + */ + function DeleteConnectClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectClusterRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @instance + */ + DeleteConnectClusterRequest.prototype.name = ""; + + /** + * DeleteConnectClusterRequest requestId. + * @member {string} requestId + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @instance + */ + DeleteConnectClusterRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteConnectClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IDeleteConnectClusterRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.DeleteConnectClusterRequest} DeleteConnectClusterRequest instance + */ + DeleteConnectClusterRequest.create = function create(properties) { + return new DeleteConnectClusterRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectClusterRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IDeleteConnectClusterRequest} message DeleteConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteConnectClusterRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.IDeleteConnectClusterRequest} message DeleteConnectClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.DeleteConnectClusterRequest} DeleteConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.DeleteConnectClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConnectClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.DeleteConnectClusterRequest} DeleteConnectClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectClusterRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteConnectClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.DeleteConnectClusterRequest} DeleteConnectClusterRequest + */ + DeleteConnectClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.DeleteConnectClusterRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.DeleteConnectClusterRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {google.cloud.managedkafka.v1.DeleteConnectClusterRequest} message DeleteConnectClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteConnectClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectClusterRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.DeleteConnectClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.DeleteConnectClusterRequest"; + }; + + return DeleteConnectClusterRequest; + })(); + + v1.ListConnectClustersRequest = (function() { + + /** + * Properties of a ListConnectClustersRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IListConnectClustersRequest + * @property {string|null} [parent] ListConnectClustersRequest parent + * @property {number|null} [pageSize] ListConnectClustersRequest pageSize + * @property {string|null} [pageToken] ListConnectClustersRequest pageToken + * @property {string|null} [filter] ListConnectClustersRequest filter + * @property {string|null} [orderBy] ListConnectClustersRequest orderBy + */ + + /** + * Constructs a new ListConnectClustersRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ListConnectClustersRequest. + * @implements IListConnectClustersRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IListConnectClustersRequest=} [properties] Properties to set + */ + function ListConnectClustersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectClustersRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @instance + */ + ListConnectClustersRequest.prototype.parent = ""; + + /** + * ListConnectClustersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @instance + */ + ListConnectClustersRequest.prototype.pageSize = 0; + + /** + * ListConnectClustersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @instance + */ + ListConnectClustersRequest.prototype.pageToken = ""; + + /** + * ListConnectClustersRequest filter. + * @member {string} filter + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @instance + */ + ListConnectClustersRequest.prototype.filter = ""; + + /** + * ListConnectClustersRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @instance + */ + ListConnectClustersRequest.prototype.orderBy = ""; + + /** + * Creates a new ListConnectClustersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {google.cloud.managedkafka.v1.IListConnectClustersRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ListConnectClustersRequest} ListConnectClustersRequest instance + */ + ListConnectClustersRequest.create = function create(properties) { + return new ListConnectClustersRequest(properties); + }; + + /** + * Encodes the specified ListConnectClustersRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {google.cloud.managedkafka.v1.IListConnectClustersRequest} message ListConnectClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectClustersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListConnectClustersRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {google.cloud.managedkafka.v1.IListConnectClustersRequest} message ListConnectClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectClustersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ListConnectClustersRequest} ListConnectClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectClustersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ListConnectClustersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectClustersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ListConnectClustersRequest} ListConnectClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectClustersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectClustersRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectClustersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListConnectClustersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ListConnectClustersRequest} ListConnectClustersRequest + */ + ListConnectClustersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ListConnectClustersRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.ListConnectClustersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListConnectClustersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {google.cloud.managedkafka.v1.ListConnectClustersRequest} message ListConnectClustersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectClustersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListConnectClustersRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectClustersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectClustersRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ListConnectClustersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ListConnectClustersRequest"; + }; + + return ListConnectClustersRequest; + })(); + + v1.ListConnectClustersResponse = (function() { + + /** + * Properties of a ListConnectClustersResponse. + * @memberof google.cloud.managedkafka.v1 + * @interface IListConnectClustersResponse + * @property {Array.|null} [connectClusters] ListConnectClustersResponse connectClusters + * @property {string|null} [nextPageToken] ListConnectClustersResponse nextPageToken + * @property {Array.|null} [unreachable] ListConnectClustersResponse unreachable + */ + + /** + * Constructs a new ListConnectClustersResponse. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ListConnectClustersResponse. + * @implements IListConnectClustersResponse + * @constructor + * @param {google.cloud.managedkafka.v1.IListConnectClustersResponse=} [properties] Properties to set + */ + function ListConnectClustersResponse(properties) { + this.connectClusters = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectClustersResponse connectClusters. + * @member {Array.} connectClusters + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @instance + */ + ListConnectClustersResponse.prototype.connectClusters = $util.emptyArray; + + /** + * ListConnectClustersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @instance + */ + ListConnectClustersResponse.prototype.nextPageToken = ""; + + /** + * ListConnectClustersResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @instance + */ + ListConnectClustersResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListConnectClustersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {google.cloud.managedkafka.v1.IListConnectClustersResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ListConnectClustersResponse} ListConnectClustersResponse instance + */ + ListConnectClustersResponse.create = function create(properties) { + return new ListConnectClustersResponse(properties); + }; + + /** + * Encodes the specified ListConnectClustersResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {google.cloud.managedkafka.v1.IListConnectClustersResponse} message ListConnectClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectClustersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectClusters != null && message.connectClusters.length) + for (var i = 0; i < message.connectClusters.length; ++i) + $root.google.cloud.managedkafka.v1.ConnectCluster.encode(message.connectClusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListConnectClustersResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectClustersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {google.cloud.managedkafka.v1.IListConnectClustersResponse} message ListConnectClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectClustersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ListConnectClustersResponse} ListConnectClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectClustersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ListConnectClustersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.connectClusters && message.connectClusters.length)) + message.connectClusters = []; + message.connectClusters.push($root.google.cloud.managedkafka.v1.ConnectCluster.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectClustersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ListConnectClustersResponse} ListConnectClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectClustersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectClustersResponse message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectClustersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectClusters != null && message.hasOwnProperty("connectClusters")) { + if (!Array.isArray(message.connectClusters)) + return "connectClusters: array expected"; + for (var i = 0; i < message.connectClusters.length; ++i) { + var error = $root.google.cloud.managedkafka.v1.ConnectCluster.verify(message.connectClusters[i]); + if (error) + return "connectClusters." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListConnectClustersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ListConnectClustersResponse} ListConnectClustersResponse + */ + ListConnectClustersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ListConnectClustersResponse) + return object; + var message = new $root.google.cloud.managedkafka.v1.ListConnectClustersResponse(); + if (object.connectClusters) { + if (!Array.isArray(object.connectClusters)) + throw TypeError(".google.cloud.managedkafka.v1.ListConnectClustersResponse.connectClusters: array expected"); + message.connectClusters = []; + for (var i = 0; i < object.connectClusters.length; ++i) { + if (typeof object.connectClusters[i] !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ListConnectClustersResponse.connectClusters: object expected"); + message.connectClusters[i] = $root.google.cloud.managedkafka.v1.ConnectCluster.fromObject(object.connectClusters[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.managedkafka.v1.ListConnectClustersResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListConnectClustersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {google.cloud.managedkafka.v1.ListConnectClustersResponse} message ListConnectClustersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectClustersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.connectClusters = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.connectClusters && message.connectClusters.length) { + object.connectClusters = []; + for (var j = 0; j < message.connectClusters.length; ++j) + object.connectClusters[j] = $root.google.cloud.managedkafka.v1.ConnectCluster.toObject(message.connectClusters[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListConnectClustersResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectClustersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectClustersResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ListConnectClustersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ListConnectClustersResponse"; + }; + + return ListConnectClustersResponse; + })(); + + v1.GetConnectorRequest = (function() { + + /** + * Properties of a GetConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IGetConnectorRequest + * @property {string|null} [name] GetConnectorRequest name + */ + + /** + * Constructs a new GetConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a GetConnectorRequest. + * @implements IGetConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IGetConnectorRequest=} [properties] Properties to set + */ + function GetConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectorRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @instance + */ + GetConnectorRequest.prototype.name = ""; + + /** + * Creates a new GetConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IGetConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.GetConnectorRequest} GetConnectorRequest instance + */ + GetConnectorRequest.create = function create(properties) { + return new GetConnectorRequest(properties); + }; + + /** + * Encodes the specified GetConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IGetConnectorRequest} message GetConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.GetConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IGetConnectorRequest} message GetConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.GetConnectorRequest} GetConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.GetConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.GetConnectorRequest} GetConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.GetConnectorRequest} GetConnectorRequest + */ + GetConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.GetConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.GetConnectorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.GetConnectorRequest} message GetConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.GetConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.GetConnectorRequest"; + }; + + return GetConnectorRequest; + })(); + + v1.CreateConnectorRequest = (function() { + + /** + * Properties of a CreateConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface ICreateConnectorRequest + * @property {string|null} [parent] CreateConnectorRequest parent + * @property {string|null} [connectorId] CreateConnectorRequest connectorId + * @property {google.cloud.managedkafka.v1.IConnector|null} [connector] CreateConnectorRequest connector + */ + + /** + * Constructs a new CreateConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a CreateConnectorRequest. + * @implements ICreateConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.ICreateConnectorRequest=} [properties] Properties to set + */ + function CreateConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectorRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @instance + */ + CreateConnectorRequest.prototype.parent = ""; + + /** + * CreateConnectorRequest connectorId. + * @member {string} connectorId + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @instance + */ + CreateConnectorRequest.prototype.connectorId = ""; + + /** + * CreateConnectorRequest connector. + * @member {google.cloud.managedkafka.v1.IConnector|null|undefined} connector + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @instance + */ + CreateConnectorRequest.prototype.connector = null; + + /** + * Creates a new CreateConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.ICreateConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.CreateConnectorRequest} CreateConnectorRequest instance + */ + CreateConnectorRequest.create = function create(properties) { + return new CreateConnectorRequest(properties); + }; + + /** + * Encodes the specified CreateConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.ICreateConnectorRequest} message CreateConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.connectorId != null && Object.hasOwnProperty.call(message, "connectorId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectorId); + if (message.connector != null && Object.hasOwnProperty.call(message, "connector")) + $root.google.cloud.managedkafka.v1.Connector.encode(message.connector, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.CreateConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.ICreateConnectorRequest} message CreateConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.CreateConnectorRequest} CreateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.CreateConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.connectorId = reader.string(); + break; + } + case 3: { + message.connector = $root.google.cloud.managedkafka.v1.Connector.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.CreateConnectorRequest} CreateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.connectorId != null && message.hasOwnProperty("connectorId")) + if (!$util.isString(message.connectorId)) + return "connectorId: string expected"; + if (message.connector != null && message.hasOwnProperty("connector")) { + var error = $root.google.cloud.managedkafka.v1.Connector.verify(message.connector); + if (error) + return "connector." + error; + } + return null; + }; + + /** + * Creates a CreateConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.CreateConnectorRequest} CreateConnectorRequest + */ + CreateConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.CreateConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.CreateConnectorRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.connectorId != null) + message.connectorId = String(object.connectorId); + if (object.connector != null) { + if (typeof object.connector !== "object") + throw TypeError(".google.cloud.managedkafka.v1.CreateConnectorRequest.connector: object expected"); + message.connector = $root.google.cloud.managedkafka.v1.Connector.fromObject(object.connector); + } + return message; + }; + + /** + * Creates a plain object from a CreateConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.CreateConnectorRequest} message CreateConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.connectorId = ""; + object.connector = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.connectorId != null && message.hasOwnProperty("connectorId")) + object.connectorId = message.connectorId; + if (message.connector != null && message.hasOwnProperty("connector")) + object.connector = $root.google.cloud.managedkafka.v1.Connector.toObject(message.connector, options); + return object; + }; + + /** + * Converts this CreateConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.CreateConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.CreateConnectorRequest"; + }; + + return CreateConnectorRequest; + })(); + + v1.UpdateConnectorRequest = (function() { + + /** + * Properties of an UpdateConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IUpdateConnectorRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectorRequest updateMask + * @property {google.cloud.managedkafka.v1.IConnector|null} [connector] UpdateConnectorRequest connector + */ + + /** + * Constructs a new UpdateConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents an UpdateConnectorRequest. + * @implements IUpdateConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IUpdateConnectorRequest=} [properties] Properties to set + */ + function UpdateConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectorRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @instance + */ + UpdateConnectorRequest.prototype.updateMask = null; + + /** + * UpdateConnectorRequest connector. + * @member {google.cloud.managedkafka.v1.IConnector|null|undefined} connector + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @instance + */ + UpdateConnectorRequest.prototype.connector = null; + + /** + * Creates a new UpdateConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IUpdateConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.UpdateConnectorRequest} UpdateConnectorRequest instance + */ + UpdateConnectorRequest.create = function create(properties) { + return new UpdateConnectorRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IUpdateConnectorRequest} message UpdateConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.connector != null && Object.hasOwnProperty.call(message, "connector")) + $root.google.cloud.managedkafka.v1.Connector.encode(message.connector, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.UpdateConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IUpdateConnectorRequest} message UpdateConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.UpdateConnectorRequest} UpdateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.UpdateConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.connector = $root.google.cloud.managedkafka.v1.Connector.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.UpdateConnectorRequest} UpdateConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.connector != null && message.hasOwnProperty("connector")) { + var error = $root.google.cloud.managedkafka.v1.Connector.verify(message.connector); + if (error) + return "connector." + error; + } + return null; + }; + + /** + * Creates an UpdateConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.UpdateConnectorRequest} UpdateConnectorRequest + */ + UpdateConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.UpdateConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.UpdateConnectorRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.managedkafka.v1.UpdateConnectorRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.connector != null) { + if (typeof object.connector !== "object") + throw TypeError(".google.cloud.managedkafka.v1.UpdateConnectorRequest.connector: object expected"); + message.connector = $root.google.cloud.managedkafka.v1.Connector.fromObject(object.connector); + } + return message; + }; + + /** + * Creates a plain object from an UpdateConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.UpdateConnectorRequest} message UpdateConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.connector = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.connector != null && message.hasOwnProperty("connector")) + object.connector = $root.google.cloud.managedkafka.v1.Connector.toObject(message.connector, options); + return object; + }; + + /** + * Converts this UpdateConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.UpdateConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.UpdateConnectorRequest"; + }; + + return UpdateConnectorRequest; + })(); + + v1.DeleteConnectorRequest = (function() { + + /** + * Properties of a DeleteConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IDeleteConnectorRequest + * @property {string|null} [name] DeleteConnectorRequest name + */ + + /** + * Constructs a new DeleteConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a DeleteConnectorRequest. + * @implements IDeleteConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IDeleteConnectorRequest=} [properties] Properties to set + */ + function DeleteConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectorRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @instance + */ + DeleteConnectorRequest.prototype.name = ""; + + /** + * Creates a new DeleteConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IDeleteConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.DeleteConnectorRequest} DeleteConnectorRequest instance + */ + DeleteConnectorRequest.create = function create(properties) { + return new DeleteConnectorRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IDeleteConnectorRequest} message DeleteConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.DeleteConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IDeleteConnectorRequest} message DeleteConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.DeleteConnectorRequest} DeleteConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.DeleteConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.DeleteConnectorRequest} DeleteConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.DeleteConnectorRequest} DeleteConnectorRequest + */ + DeleteConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.DeleteConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.DeleteConnectorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.DeleteConnectorRequest} message DeleteConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.DeleteConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.DeleteConnectorRequest"; + }; + + return DeleteConnectorRequest; + })(); + + v1.ListConnectorsRequest = (function() { + + /** + * Properties of a ListConnectorsRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IListConnectorsRequest + * @property {string|null} [parent] ListConnectorsRequest parent + * @property {number|null} [pageSize] ListConnectorsRequest pageSize + * @property {string|null} [pageToken] ListConnectorsRequest pageToken + */ + + /** + * Constructs a new ListConnectorsRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ListConnectorsRequest. + * @implements IListConnectorsRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IListConnectorsRequest=} [properties] Properties to set + */ + function ListConnectorsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectorsRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @instance + */ + ListConnectorsRequest.prototype.parent = ""; + + /** + * ListConnectorsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @instance + */ + ListConnectorsRequest.prototype.pageSize = 0; + + /** + * ListConnectorsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @instance + */ + ListConnectorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListConnectorsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {google.cloud.managedkafka.v1.IListConnectorsRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ListConnectorsRequest} ListConnectorsRequest instance + */ + ListConnectorsRequest.create = function create(properties) { + return new ListConnectorsRequest(properties); + }; + + /** + * Encodes the specified ListConnectorsRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {google.cloud.managedkafka.v1.IListConnectorsRequest} message ListConnectorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListConnectorsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {google.cloud.managedkafka.v1.IListConnectorsRequest} message ListConnectorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectorsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ListConnectorsRequest} ListConnectorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ListConnectorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ListConnectorsRequest} ListConnectorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectorsRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListConnectorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ListConnectorsRequest} ListConnectorsRequest + */ + ListConnectorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ListConnectorsRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.ListConnectorsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListConnectorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {google.cloud.managedkafka.v1.ListConnectorsRequest} message ListConnectorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListConnectorsRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectorsRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ListConnectorsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ListConnectorsRequest"; + }; + + return ListConnectorsRequest; + })(); + + v1.ListConnectorsResponse = (function() { + + /** + * Properties of a ListConnectorsResponse. + * @memberof google.cloud.managedkafka.v1 + * @interface IListConnectorsResponse + * @property {Array.|null} [connectors] ListConnectorsResponse connectors + * @property {string|null} [nextPageToken] ListConnectorsResponse nextPageToken + */ + + /** + * Constructs a new ListConnectorsResponse. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ListConnectorsResponse. + * @implements IListConnectorsResponse + * @constructor + * @param {google.cloud.managedkafka.v1.IListConnectorsResponse=} [properties] Properties to set + */ + function ListConnectorsResponse(properties) { + this.connectors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectorsResponse connectors. + * @member {Array.} connectors + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @instance + */ + ListConnectorsResponse.prototype.connectors = $util.emptyArray; + + /** + * ListConnectorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @instance + */ + ListConnectorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConnectorsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {google.cloud.managedkafka.v1.IListConnectorsResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ListConnectorsResponse} ListConnectorsResponse instance + */ + ListConnectorsResponse.create = function create(properties) { + return new ListConnectorsResponse(properties); + }; + + /** + * Encodes the specified ListConnectorsResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {google.cloud.managedkafka.v1.IListConnectorsResponse} message ListConnectorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectors != null && message.connectors.length) + for (var i = 0; i < message.connectors.length; ++i) + $root.google.cloud.managedkafka.v1.Connector.encode(message.connectors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListConnectorsResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ListConnectorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {google.cloud.managedkafka.v1.IListConnectorsResponse} message ListConnectorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectorsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ListConnectorsResponse} ListConnectorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ListConnectorsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.connectors && message.connectors.length)) + message.connectors = []; + message.connectors.push($root.google.cloud.managedkafka.v1.Connector.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ListConnectorsResponse} ListConnectorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectorsResponse message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectors != null && message.hasOwnProperty("connectors")) { + if (!Array.isArray(message.connectors)) + return "connectors: array expected"; + for (var i = 0; i < message.connectors.length; ++i) { + var error = $root.google.cloud.managedkafka.v1.Connector.verify(message.connectors[i]); + if (error) + return "connectors." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConnectorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ListConnectorsResponse} ListConnectorsResponse + */ + ListConnectorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ListConnectorsResponse) + return object; + var message = new $root.google.cloud.managedkafka.v1.ListConnectorsResponse(); + if (object.connectors) { + if (!Array.isArray(object.connectors)) + throw TypeError(".google.cloud.managedkafka.v1.ListConnectorsResponse.connectors: array expected"); + message.connectors = []; + for (var i = 0; i < object.connectors.length; ++i) { + if (typeof object.connectors[i] !== "object") + throw TypeError(".google.cloud.managedkafka.v1.ListConnectorsResponse.connectors: object expected"); + message.connectors[i] = $root.google.cloud.managedkafka.v1.Connector.fromObject(object.connectors[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConnectorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {google.cloud.managedkafka.v1.ListConnectorsResponse} message ListConnectorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connectors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.connectors && message.connectors.length) { + object.connectors = []; + for (var j = 0; j < message.connectors.length; ++j) + object.connectors[j] = $root.google.cloud.managedkafka.v1.Connector.toObject(message.connectors[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConnectorsResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectorsResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ListConnectorsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ListConnectorsResponse"; + }; + + return ListConnectorsResponse; + })(); + + v1.PauseConnectorRequest = (function() { + + /** + * Properties of a PauseConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IPauseConnectorRequest + * @property {string|null} [name] PauseConnectorRequest name + */ + + /** + * Constructs a new PauseConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a PauseConnectorRequest. + * @implements IPauseConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IPauseConnectorRequest=} [properties] Properties to set + */ + function PauseConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PauseConnectorRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @instance + */ + PauseConnectorRequest.prototype.name = ""; + + /** + * Creates a new PauseConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IPauseConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.PauseConnectorRequest} PauseConnectorRequest instance + */ + PauseConnectorRequest.create = function create(properties) { + return new PauseConnectorRequest(properties); + }; + + /** + * Encodes the specified PauseConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IPauseConnectorRequest} message PauseConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PauseConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified PauseConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IPauseConnectorRequest} message PauseConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PauseConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PauseConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.PauseConnectorRequest} PauseConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PauseConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.PauseConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PauseConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.PauseConnectorRequest} PauseConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PauseConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PauseConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PauseConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a PauseConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.PauseConnectorRequest} PauseConnectorRequest + */ + PauseConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.PauseConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.PauseConnectorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PauseConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.PauseConnectorRequest} message PauseConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PauseConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PauseConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + PauseConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PauseConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.PauseConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PauseConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.PauseConnectorRequest"; + }; + + return PauseConnectorRequest; + })(); + + v1.PauseConnectorResponse = (function() { + + /** + * Properties of a PauseConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @interface IPauseConnectorResponse + */ + + /** + * Constructs a new PauseConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a PauseConnectorResponse. + * @implements IPauseConnectorResponse + * @constructor + * @param {google.cloud.managedkafka.v1.IPauseConnectorResponse=} [properties] Properties to set + */ + function PauseConnectorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PauseConnectorResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IPauseConnectorResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.PauseConnectorResponse} PauseConnectorResponse instance + */ + PauseConnectorResponse.create = function create(properties) { + return new PauseConnectorResponse(properties); + }; + + /** + * Encodes the specified PauseConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IPauseConnectorResponse} message PauseConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PauseConnectorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PauseConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.PauseConnectorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IPauseConnectorResponse} message PauseConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PauseConnectorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PauseConnectorResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.PauseConnectorResponse} PauseConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PauseConnectorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.PauseConnectorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PauseConnectorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.PauseConnectorResponse} PauseConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PauseConnectorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PauseConnectorResponse message. + * @function verify + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PauseConnectorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PauseConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.PauseConnectorResponse} PauseConnectorResponse + */ + PauseConnectorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.PauseConnectorResponse) + return object; + return new $root.google.cloud.managedkafka.v1.PauseConnectorResponse(); + }; + + /** + * Creates a plain object from a PauseConnectorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.PauseConnectorResponse} message PauseConnectorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PauseConnectorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PauseConnectorResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @instance + * @returns {Object.} JSON object + */ + PauseConnectorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PauseConnectorResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.PauseConnectorResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PauseConnectorResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.PauseConnectorResponse"; + }; + + return PauseConnectorResponse; + })(); + + v1.ResumeConnectorRequest = (function() { + + /** + * Properties of a ResumeConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IResumeConnectorRequest + * @property {string|null} [name] ResumeConnectorRequest name + */ + + /** + * Constructs a new ResumeConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ResumeConnectorRequest. + * @implements IResumeConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IResumeConnectorRequest=} [properties] Properties to set + */ + function ResumeConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResumeConnectorRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @instance + */ + ResumeConnectorRequest.prototype.name = ""; + + /** + * Creates a new ResumeConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IResumeConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ResumeConnectorRequest} ResumeConnectorRequest instance + */ + ResumeConnectorRequest.create = function create(properties) { + return new ResumeConnectorRequest(properties); + }; + + /** + * Encodes the specified ResumeConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IResumeConnectorRequest} message ResumeConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified ResumeConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IResumeConnectorRequest} message ResumeConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResumeConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ResumeConnectorRequest} ResumeConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ResumeConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResumeConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ResumeConnectorRequest} ResumeConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResumeConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResumeConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a ResumeConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ResumeConnectorRequest} ResumeConnectorRequest + */ + ResumeConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ResumeConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.ResumeConnectorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ResumeConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.ResumeConnectorRequest} message ResumeConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResumeConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ResumeConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + ResumeConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResumeConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ResumeConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResumeConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ResumeConnectorRequest"; + }; + + return ResumeConnectorRequest; + })(); + + v1.ResumeConnectorResponse = (function() { + + /** + * Properties of a ResumeConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @interface IResumeConnectorResponse + */ + + /** + * Constructs a new ResumeConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a ResumeConnectorResponse. + * @implements IResumeConnectorResponse + * @constructor + * @param {google.cloud.managedkafka.v1.IResumeConnectorResponse=} [properties] Properties to set + */ + function ResumeConnectorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ResumeConnectorResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IResumeConnectorResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.ResumeConnectorResponse} ResumeConnectorResponse instance + */ + ResumeConnectorResponse.create = function create(properties) { + return new ResumeConnectorResponse(properties); + }; + + /** + * Encodes the specified ResumeConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IResumeConnectorResponse} message ResumeConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeConnectorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ResumeConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.ResumeConnectorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IResumeConnectorResponse} message ResumeConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeConnectorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResumeConnectorResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.ResumeConnectorResponse} ResumeConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeConnectorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.ResumeConnectorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResumeConnectorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.ResumeConnectorResponse} ResumeConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeConnectorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResumeConnectorResponse message. + * @function verify + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResumeConnectorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ResumeConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.ResumeConnectorResponse} ResumeConnectorResponse + */ + ResumeConnectorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.ResumeConnectorResponse) + return object; + return new $root.google.cloud.managedkafka.v1.ResumeConnectorResponse(); + }; + + /** + * Creates a plain object from a ResumeConnectorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.ResumeConnectorResponse} message ResumeConnectorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResumeConnectorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ResumeConnectorResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @instance + * @returns {Object.} JSON object + */ + ResumeConnectorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResumeConnectorResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.ResumeConnectorResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResumeConnectorResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.ResumeConnectorResponse"; + }; + + return ResumeConnectorResponse; + })(); + + v1.RestartConnectorRequest = (function() { + + /** + * Properties of a RestartConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IRestartConnectorRequest + * @property {string|null} [name] RestartConnectorRequest name + */ + + /** + * Constructs a new RestartConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a RestartConnectorRequest. + * @implements IRestartConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IRestartConnectorRequest=} [properties] Properties to set + */ + function RestartConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestartConnectorRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @instance + */ + RestartConnectorRequest.prototype.name = ""; + + /** + * Creates a new RestartConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IRestartConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.RestartConnectorRequest} RestartConnectorRequest instance + */ + RestartConnectorRequest.create = function create(properties) { + return new RestartConnectorRequest(properties); + }; + + /** + * Encodes the specified RestartConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IRestartConnectorRequest} message RestartConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified RestartConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IRestartConnectorRequest} message RestartConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestartConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.RestartConnectorRequest} RestartConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.RestartConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestartConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.RestartConnectorRequest} RestartConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestartConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestartConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a RestartConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.RestartConnectorRequest} RestartConnectorRequest + */ + RestartConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.RestartConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.RestartConnectorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RestartConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.RestartConnectorRequest} message RestartConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestartConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this RestartConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + RestartConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestartConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.RestartConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestartConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.RestartConnectorRequest"; + }; + + return RestartConnectorRequest; + })(); + + v1.RestartConnectorResponse = (function() { + + /** + * Properties of a RestartConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @interface IRestartConnectorResponse + */ + + /** + * Constructs a new RestartConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a RestartConnectorResponse. + * @implements IRestartConnectorResponse + * @constructor + * @param {google.cloud.managedkafka.v1.IRestartConnectorResponse=} [properties] Properties to set + */ + function RestartConnectorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RestartConnectorResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IRestartConnectorResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.RestartConnectorResponse} RestartConnectorResponse instance + */ + RestartConnectorResponse.create = function create(properties) { + return new RestartConnectorResponse(properties); + }; + + /** + * Encodes the specified RestartConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IRestartConnectorResponse} message RestartConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartConnectorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RestartConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.RestartConnectorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IRestartConnectorResponse} message RestartConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartConnectorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestartConnectorResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.RestartConnectorResponse} RestartConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartConnectorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.RestartConnectorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestartConnectorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.RestartConnectorResponse} RestartConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartConnectorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestartConnectorResponse message. + * @function verify + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestartConnectorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RestartConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.RestartConnectorResponse} RestartConnectorResponse + */ + RestartConnectorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.RestartConnectorResponse) + return object; + return new $root.google.cloud.managedkafka.v1.RestartConnectorResponse(); + }; + + /** + * Creates a plain object from a RestartConnectorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.RestartConnectorResponse} message RestartConnectorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestartConnectorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RestartConnectorResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @instance + * @returns {Object.} JSON object + */ + RestartConnectorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestartConnectorResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.RestartConnectorResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestartConnectorResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.RestartConnectorResponse"; + }; + + return RestartConnectorResponse; + })(); + + v1.StopConnectorRequest = (function() { + + /** + * Properties of a StopConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @interface IStopConnectorRequest + * @property {string|null} [name] StopConnectorRequest name + */ + + /** + * Constructs a new StopConnectorRequest. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a StopConnectorRequest. + * @implements IStopConnectorRequest + * @constructor + * @param {google.cloud.managedkafka.v1.IStopConnectorRequest=} [properties] Properties to set + */ + function StopConnectorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StopConnectorRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @instance + */ + StopConnectorRequest.prototype.name = ""; + + /** + * Creates a new StopConnectorRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IStopConnectorRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.StopConnectorRequest} StopConnectorRequest instance + */ + StopConnectorRequest.create = function create(properties) { + return new StopConnectorRequest(properties); + }; + + /** + * Encodes the specified StopConnectorRequest message. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IStopConnectorRequest} message StopConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopConnectorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified StopConnectorRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.IStopConnectorRequest} message StopConnectorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopConnectorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopConnectorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.StopConnectorRequest} StopConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopConnectorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.StopConnectorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopConnectorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.StopConnectorRequest} StopConnectorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopConnectorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopConnectorRequest message. + * @function verify + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopConnectorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a StopConnectorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.StopConnectorRequest} StopConnectorRequest + */ + StopConnectorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.StopConnectorRequest) + return object; + var message = new $root.google.cloud.managedkafka.v1.StopConnectorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a StopConnectorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {google.cloud.managedkafka.v1.StopConnectorRequest} message StopConnectorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopConnectorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this StopConnectorRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @instance + * @returns {Object.} JSON object + */ + StopConnectorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopConnectorRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.StopConnectorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopConnectorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.StopConnectorRequest"; + }; + + return StopConnectorRequest; + })(); + + v1.StopConnectorResponse = (function() { + + /** + * Properties of a StopConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @interface IStopConnectorResponse + */ + + /** + * Constructs a new StopConnectorResponse. + * @memberof google.cloud.managedkafka.v1 + * @classdesc Represents a StopConnectorResponse. + * @implements IStopConnectorResponse + * @constructor + * @param {google.cloud.managedkafka.v1.IStopConnectorResponse=} [properties] Properties to set + */ + function StopConnectorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new StopConnectorResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IStopConnectorResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.v1.StopConnectorResponse} StopConnectorResponse instance + */ + StopConnectorResponse.create = function create(properties) { + return new StopConnectorResponse(properties); + }; + + /** + * Encodes the specified StopConnectorResponse message. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IStopConnectorResponse} message StopConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopConnectorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified StopConnectorResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.v1.StopConnectorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.IStopConnectorResponse} message StopConnectorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopConnectorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopConnectorResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.v1.StopConnectorResponse} StopConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopConnectorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.v1.StopConnectorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopConnectorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.v1.StopConnectorResponse} StopConnectorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopConnectorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopConnectorResponse message. + * @function verify + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopConnectorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a StopConnectorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.v1.StopConnectorResponse} StopConnectorResponse + */ + StopConnectorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.v1.StopConnectorResponse) + return object; + return new $root.google.cloud.managedkafka.v1.StopConnectorResponse(); + }; + + /** + * Creates a plain object from a StopConnectorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {google.cloud.managedkafka.v1.StopConnectorResponse} message StopConnectorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopConnectorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this StopConnectorResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @instance + * @returns {Object.} JSON object + */ + StopConnectorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopConnectorResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.v1.StopConnectorResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopConnectorResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.v1.StopConnectorResponse"; + }; + + return StopConnectorResponse; + })(); + return v1; })(); diff --git a/packages/google-cloud-managedkafka/protos/protos.json b/packages/google-cloud-managedkafka/protos/protos.json index 419d82252ca..06218d484e2 100644 --- a/packages/google-cloud-managedkafka/protos/protos.json +++ b/packages/google-cloud-managedkafka/protos/protos.json @@ -11,12 +11,12 @@ "csharp_namespace": "Google.Cloud.ManagedKafka.V1", "go_package": "cloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb", "java_multiple_files": true, - "java_outer_classname": "ResourcesProto", + "java_outer_classname": "ManagedKafkaConnectProto", "java_package": "com.google.cloud.managedkafka.v1", "php_namespace": "Google\\Cloud\\ManagedKafka\\V1", "ruby_package": "Google::Cloud::ManagedKafka::V1", - "(google.api.resource_definition).type": "secretmanager.googleapis.com/SecretVersion", - "(google.api.resource_definition).pattern": "projects/{project}/secrets/{secret}/versions/{secret_version}" + "(google.api.resource_definition).type": "privateca.googleapis.com/CaPool", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/caPools/{ca_pool}" }, "nested": { "ManagedKafka": { @@ -987,6 +987,851 @@ } } } + }, + "ConnectCluster": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/ConnectCluster", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/connectClusters/{connect_cluster}", + "(google.api.resource).plural": "connectClusters", + "(google.api.resource).singular": "connectCluster" + }, + "oneofs": { + "platformConfig": { + "oneof": [ + "gcpConfig" + ] + } + }, + "fields": { + "gcpConfig": { + "type": "ConnectGcpConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "kafkaCluster": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "capacityConfig": { + "type": "CapacityConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "config": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3 + } + } + } + }, + "ConnectNetworkConfig": { + "fields": { + "primarySubnet": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "additionalSubnets": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dnsDomainNames": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ConnectAccessConfig": { + "fields": { + "networkConfigs": { + "rule": "repeated", + "type": "ConnectNetworkConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ConnectGcpConfig": { + "fields": { + "accessConfig": { + "type": "ConnectAccessConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "secretPaths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + } + } + }, + "Connector": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/Connector", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}", + "(google.api.resource).plural": "connectors", + "(google.api.resource).singular": "connector" + }, + "oneofs": { + "restartPolicy": { + "oneof": [ + "taskRestartPolicy" + ] + } + }, + "fields": { + "taskRestartPolicy": { + "type": "TaskRetryPolicy", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "configs": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "UNASSIGNED": 1, + "RUNNING": 2, + "PAUSED": 3, + "FAILED": 4, + "RESTARTING": 5, + "STOPPED": 6 + } + } + } + }, + "TaskRetryPolicy": { + "fields": { + "minimumBackoff": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maximumBackoff": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ManagedKafkaConnect": { + "options": { + "(google.api.default_host)": "managedkafka.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListConnectClusters": { + "requestType": "ListConnectClustersRequest", + "responseType": "ListConnectClustersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/connectClusters", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/connectClusters" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetConnectCluster": { + "requestType": "GetConnectClusterRequest", + "responseType": "ConnectCluster", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/connectClusters/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/connectClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateConnectCluster": { + "requestType": "CreateConnectClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/connectClusters", + "(google.api.http).body": "connect_cluster", + "(google.api.method_signature)": "parent,connect_cluster,connect_cluster_id", + "(google.longrunning.operation_info).response_type": "ConnectCluster", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/connectClusters", + "body": "connect_cluster" + } + }, + { + "(google.api.method_signature)": "parent,connect_cluster,connect_cluster_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConnectCluster", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateConnectCluster": { + "requestType": "UpdateConnectClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{connect_cluster.name=projects/*/locations/*/connectClusters/*}", + "(google.api.http).body": "connect_cluster", + "(google.api.method_signature)": "connect_cluster,update_mask", + "(google.longrunning.operation_info).response_type": "ConnectCluster", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{connect_cluster.name=projects/*/locations/*/connectClusters/*}", + "body": "connect_cluster" + } + }, + { + "(google.api.method_signature)": "connect_cluster,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConnectCluster", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteConnectCluster": { + "requestType": "DeleteConnectClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/connectClusters/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/connectClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListConnectors": { + "requestType": "ListConnectorsRequest", + "responseType": "ListConnectorsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/connectClusters/*}/connectors", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/connectClusters/*}/connectors" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetConnector": { + "requestType": "GetConnectorRequest", + "responseType": "Connector", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateConnector": { + "requestType": "CreateConnectorRequest", + "responseType": "Connector", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/connectClusters/*}/connectors", + "(google.api.http).body": "connector", + "(google.api.method_signature)": "parent,connector,connector_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/connectClusters/*}/connectors", + "body": "connector" + } + }, + { + "(google.api.method_signature)": "parent,connector,connector_id" + } + ] + }, + "UpdateConnector": { + "requestType": "UpdateConnectorRequest", + "responseType": "Connector", + "options": { + "(google.api.http).patch": "/v1/{connector.name=projects/*/locations/*/connectClusters/*/connectors/*}", + "(google.api.http).body": "connector", + "(google.api.method_signature)": "connector,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{connector.name=projects/*/locations/*/connectClusters/*/connectors/*}", + "body": "connector" + } + }, + { + "(google.api.method_signature)": "connector,update_mask" + } + ] + }, + "DeleteConnector": { + "requestType": "DeleteConnectorRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "PauseConnector": { + "requestType": "PauseConnectorRequest", + "responseType": "PauseConnectorResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:pause", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:pause", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ResumeConnector": { + "requestType": "ResumeConnectorRequest", + "responseType": "ResumeConnectorResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:resume", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:resume", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "RestartConnector": { + "requestType": "RestartConnectorRequest", + "responseType": "RestartConnectorResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:restart", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:restart", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StopConnector": { + "requestType": "StopConnectorRequest", + "responseType": "StopConnectorResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:stop", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/connectClusters/*/connectors/*}:stop", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "GetConnectClusterRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/ConnectCluster" + } + } + } + }, + "CreateConnectClusterRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "managedkafka.googleapis.com/ConnectCluster" + } + }, + "connectClusterId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connectCluster": { + "type": "ConnectCluster", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateConnectClusterRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connectCluster": { + "type": "ConnectCluster", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteConnectClusterRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/ConnectCluster" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListConnectClustersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "managedkafka.googleapis.com/ConnectCluster" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListConnectClustersResponse": { + "fields": { + "connectClusters": { + "rule": "repeated", + "type": "ConnectCluster", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConnectorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Connector" + } + } + } + }, + "CreateConnectorRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "managedkafka.googleapis.com/Connector" + } + }, + "connectorId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connector": { + "type": "Connector", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateConnectorRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connector": { + "type": "Connector", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteConnectorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Connector" + } + } + } + }, + "ListConnectorsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "managedkafka.googleapis.com/Connector" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListConnectorsResponse": { + "fields": { + "connectors": { + "rule": "repeated", + "type": "Connector", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "PauseConnectorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Connector" + } + } + } + }, + "PauseConnectorResponse": { + "fields": {} + }, + "ResumeConnectorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Connector" + } + } + } + }, + "ResumeConnectorResponse": { + "fields": {} + }, + "RestartConnectorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Connector" + } + } + } + }, + "RestartConnectorResponse": { + "fields": {} + }, + "StopConnectorRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Connector" + } + } + } + }, + "StopConnectorResponse": { + "fields": {} } } } diff --git a/packages/google-cloud-managedkafka/samples/README.md b/packages/google-cloud-managedkafka/samples/README.md index 5f23d6113eb..92d7980c783 100644 --- a/packages/google-cloud-managedkafka/samples/README.md +++ b/packages/google-cloud-managedkafka/samples/README.md @@ -26,6 +26,20 @@ * [Managed_kafka.update_cluster](#managed_kafka.update_cluster) * [Managed_kafka.update_consumer_group](#managed_kafka.update_consumer_group) * [Managed_kafka.update_topic](#managed_kafka.update_topic) + * [Managed_kafka_connect.create_connect_cluster](#managed_kafka_connect.create_connect_cluster) + * [Managed_kafka_connect.create_connector](#managed_kafka_connect.create_connector) + * [Managed_kafka_connect.delete_connect_cluster](#managed_kafka_connect.delete_connect_cluster) + * [Managed_kafka_connect.delete_connector](#managed_kafka_connect.delete_connector) + * [Managed_kafka_connect.get_connect_cluster](#managed_kafka_connect.get_connect_cluster) + * [Managed_kafka_connect.get_connector](#managed_kafka_connect.get_connector) + * [Managed_kafka_connect.list_connect_clusters](#managed_kafka_connect.list_connect_clusters) + * [Managed_kafka_connect.list_connectors](#managed_kafka_connect.list_connectors) + * [Managed_kafka_connect.pause_connector](#managed_kafka_connect.pause_connector) + * [Managed_kafka_connect.restart_connector](#managed_kafka_connect.restart_connector) + * [Managed_kafka_connect.resume_connector](#managed_kafka_connect.resume_connector) + * [Managed_kafka_connect.stop_connector](#managed_kafka_connect.stop_connector) + * [Managed_kafka_connect.update_connect_cluster](#managed_kafka_connect.update_connect_cluster) + * [Managed_kafka_connect.update_connector](#managed_kafka_connect.update_connector) * [Quickstart](#quickstart) ## Before you begin @@ -281,6 +295,244 @@ __Usage:__ +### Managed_kafka_connect.create_connect_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js` + + +----- + + + + +### Managed_kafka_connect.create_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js` + + +----- + + + + +### Managed_kafka_connect.delete_connect_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js` + + +----- + + + + +### Managed_kafka_connect.delete_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js` + + +----- + + + + +### Managed_kafka_connect.get_connect_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js` + + +----- + + + + +### Managed_kafka_connect.get_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js` + + +----- + + + + +### Managed_kafka_connect.list_connect_clusters + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js` + + +----- + + + + +### Managed_kafka_connect.list_connectors + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js` + + +----- + + + + +### Managed_kafka_connect.pause_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js` + + +----- + + + + +### Managed_kafka_connect.restart_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js` + + +----- + + + + +### Managed_kafka_connect.resume_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js` + + +----- + + + + +### Managed_kafka_connect.stop_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js` + + +----- + + + + +### Managed_kafka_connect.update_connect_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js` + + +----- + + + + +### Managed_kafka_connect.update_connector + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka/samples/quickstart.js). diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js new file mode 100644 index 00000000000..09e690d23dc --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connect_cluster.js @@ -0,0 +1,94 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, connectClusterId, connectCluster) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_CreateConnectCluster_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. + */ + /** + * Required. The parent project/location in which to create the Kafka Connect + * cluster. Structured like + * `projects/{project}/locations/{location}/`. + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the Connect cluster, which will become the + * final component of the cluster's name. The ID must be 1-63 characters long, + * and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply + * with RFC 1035. + * This value is structured like: `my-cluster-id`. + */ + // const connectClusterId = 'abc123' + /** + * Required. Configuration of the Kafka Connect cluster to create. Its `name` + * field is ignored. + */ + // const connectCluster = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callCreateConnectCluster() { + // Construct request + const request = { + parent, + connectClusterId, + connectCluster, + }; + + // Run request + const [operation] = await managedkafkaClient.createConnectCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConnectCluster(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_CreateConnectCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js new file mode 100644 index 00000000000..b154c91f366 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.create_connector.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, connectorId, connector) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_CreateConnector_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. + */ + /** + * Required. The parent Connect cluster in which to create the connector. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the connector, which will become the final + * component of the connector's name. The ID must be 1-63 characters long, and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + * RFC 1035. + * This value is structured like: `my-connector-id`. + */ + // const connectorId = 'abc123' + /** + * Required. The connector to create. + */ + // const connector = {} + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callCreateConnector() { + // Construct request + const request = { + parent, + connectorId, + connector, + }; + + // Run request + const response = await managedkafkaClient.createConnector(request); + console.log(response); + } + + callCreateConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_CreateConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js new file mode 100644 index 00000000000..84102dc4739 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js @@ -0,0 +1,79 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnectCluster_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. + */ + /** + * Required. The name of the Kafka Connect cluster to delete. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callDeleteConnectCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await managedkafkaClient.deleteConnectCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConnectCluster(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnectCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js new file mode 100644 index 00000000000..560f8b70836 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.delete_connector.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnector_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. + */ + /** + * Required. The name of the connector to delete. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + */ + // const name = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callDeleteConnector() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedkafkaClient.deleteConnector(request); + console.log(response); + } + + callDeleteConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js new file mode 100644 index 00000000000..51bbed1d95a --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connect_cluster.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_GetConnectCluster_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. + */ + /** + * Required. The name of the Kafka Connect cluster whose configuration to + * return. Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + */ + // const name = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callGetConnectCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedkafkaClient.getConnectCluster(request); + console.log(response); + } + + callGetConnectCluster(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_GetConnectCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js new file mode 100644 index 00000000000..12508c4167f --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.get_connector.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_GetConnector_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. + */ + /** + * Required. The name of the connector whose configuration to return. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + */ + // const name = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callGetConnector() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedkafkaClient.getConnector(request); + console.log(response); + } + + callGetConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_GetConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js new file mode 100644 index 00000000000..0a4df4a6a1f --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connect_clusters.js @@ -0,0 +1,85 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_ListConnectClusters_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. + */ + /** + * Required. The parent project/location whose Connect clusters are to be + * listed. Structured like `projects/{project}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of Connect clusters to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListConnectClusters` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConnectClusters` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter expression for the result. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callListConnectClusters() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = managedkafkaClient.listConnectClustersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnectClusters(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_ListConnectClusters_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js new file mode 100644 index 00000000000..1372abddf15 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.list_connectors.js @@ -0,0 +1,78 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_ListConnectors_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. + */ + /** + * Required. The parent Connect cluster whose connectors are to be listed. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListConnectors` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConnectors` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callListConnectors() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = managedkafkaClient.listConnectorsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnectors(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_ListConnectors_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js new file mode 100644 index 00000000000..dca1d32f5d7 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.pause_connector.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_PauseConnector_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. + */ + /** + * Required. The name of the connector to pause. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + */ + // const name = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callPauseConnector() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedkafkaClient.pauseConnector(request); + console.log(response); + } + + callPauseConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_PauseConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js new file mode 100644 index 00000000000..827ca259e07 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.restart_connector.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_RestartConnector_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. + */ + /** + * Required. The name of the connector to restart. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + */ + // const name = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callRestartConnector() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedkafkaClient.restartConnector(request); + console.log(response); + } + + callRestartConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_RestartConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js new file mode 100644 index 00000000000..5f83ad243d2 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.resume_connector.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_ResumeConnector_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. + */ + /** + * Required. The name of the connector to pause. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + */ + // const name = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callResumeConnector() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedkafkaClient.resumeConnector(request); + console.log(response); + } + + callResumeConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_ResumeConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js new file mode 100644 index 00000000000..eae7c6d5f63 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.stop_connector.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_StopConnector_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. + */ + /** + * Required. The name of the connector to stop. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + */ + // const name = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callStopConnector() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedkafkaClient.stopConnector(request); + console.log(response); + } + + callStopConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_StopConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js new file mode 100644 index 00000000000..7cbfa9c3c4a --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connect_cluster.js @@ -0,0 +1,87 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, connectCluster) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnectCluster_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. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + */ + // const updateMask = {} + /** + * Required. The Kafka Connect cluster to update. Its `name` field must be + * populated. + */ + // const connectCluster = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callUpdateConnectCluster() { + // Construct request + const request = { + updateMask, + connectCluster, + }; + + // Run request + const [operation] = await managedkafkaClient.updateConnectCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConnectCluster(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnectCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js new file mode 100644 index 00000000000..658b4c48205 --- /dev/null +++ b/packages/google-cloud-managedkafka/samples/generated/v1/managed_kafka_connect.update_connector.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, connector) { + // [START managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnector_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. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + */ + // const updateMask = {} + /** + * Required. The connector to update. Its `name` field must be populated. + */ + // const connector = {} + + // Imports the Managedkafka library + const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1; + + // Instantiates a client + const managedkafkaClient = new ManagedKafkaConnectClient(); + + async function callUpdateConnector() { + // Construct request + const request = { + updateMask, + connector, + }; + + // Run request + const response = await managedkafkaClient.updateConnector(request); + console.log(response); + } + + callUpdateConnector(); + // [END managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnector_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json b/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json index 7d4c1f836aa..227da4fb7ee 100644 --- a/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json +++ b/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedkafka", - "version": "0.3.1", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { @@ -642,6 +642,626 @@ } } } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_ListConnectClusters_async", + "title": "ManagedKafka listConnectClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists the Kafka Connect clusters in a given project and location.", + "canonical": true, + "file": "managed_kafka_connect.list_connect_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConnectClusters", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectClusters", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.ListConnectClustersResponse", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "ListConnectClusters", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectClusters", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_GetConnectCluster_async", + "title": "ManagedKafka getConnectCluster Sample", + "origin": "API_DEFINITION", + "description": " Returns the properties of a single Kafka Connect cluster.", + "canonical": true, + "file": "managed_kafka_connect.get_connect_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnectCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.ConnectCluster", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "GetConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnectCluster", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_CreateConnectCluster_async", + "title": "ManagedKafka createConnectCluster Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Kafka Connect cluster in a given project and location.", + "canonical": true, + "file": "managed_kafka_connect.create_connect_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnectCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "connect_cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "connect_cluster", + "type": ".google.cloud.managedkafka.v1.ConnectCluster" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "CreateConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnectCluster", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnectCluster_async", + "title": "ManagedKafka updateConnectCluster Sample", + "origin": "API_DEFINITION", + "description": " Updates the properties of a single Kafka Connect cluster.", + "canonical": true, + "file": "managed_kafka_connect.update_connect_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnectCluster", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "connect_cluster", + "type": ".google.cloud.managedkafka.v1.ConnectCluster" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "UpdateConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnectCluster", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnectCluster_async", + "title": "ManagedKafka deleteConnectCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Connect cluster.", + "canonical": true, + "file": "managed_kafka_connect.delete_connect_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnectCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "DeleteConnectCluster", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnectCluster", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_ListConnectors_async", + "title": "ManagedKafka listConnectors Sample", + "origin": "API_DEFINITION", + "description": " Lists the connectors in a given Connect cluster.", + "canonical": true, + "file": "managed_kafka_connect.list_connectors.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConnectors", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectors", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.ListConnectorsResponse", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "ListConnectors", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.ListConnectors", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_GetConnector_async", + "title": "ManagedKafka getConnector Sample", + "origin": "API_DEFINITION", + "description": " Returns the properties of a single connector.", + "canonical": true, + "file": "managed_kafka_connect.get_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnector", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.Connector", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "GetConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.GetConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_CreateConnector_async", + "title": "ManagedKafka createConnector Sample", + "origin": "API_DEFINITION", + "description": " Creates a new connector in a given Connect cluster.", + "canonical": true, + "file": "managed_kafka_connect.create_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnector", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "connector_id", + "type": "TYPE_STRING" + }, + { + "name": "connector", + "type": ".google.cloud.managedkafka.v1.Connector" + } + ], + "resultType": ".google.cloud.managedkafka.v1.Connector", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "CreateConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.CreateConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnector_async", + "title": "ManagedKafka updateConnector Sample", + "origin": "API_DEFINITION", + "description": " Updates the properties of a connector.", + "canonical": true, + "file": "managed_kafka_connect.update_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnector", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "connector", + "type": ".google.cloud.managedkafka.v1.Connector" + } + ], + "resultType": ".google.cloud.managedkafka.v1.Connector", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "UpdateConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.UpdateConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnector_async", + "title": "ManagedKafka deleteConnector Sample", + "origin": "API_DEFINITION", + "description": " Deletes a connector.", + "canonical": true, + "file": "managed_kafka_connect.delete_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnector", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "DeleteConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.DeleteConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_PauseConnector_async", + "title": "ManagedKafka pauseConnector Sample", + "origin": "API_DEFINITION", + "description": " Pauses the connector and its tasks.", + "canonical": true, + "file": "managed_kafka_connect.pause_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PauseConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.PauseConnector", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.PauseConnectorResponse", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "PauseConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.PauseConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_ResumeConnector_async", + "title": "ManagedKafka resumeConnector Sample", + "origin": "API_DEFINITION", + "description": " Resumes the connector and its tasks.", + "canonical": true, + "file": "managed_kafka_connect.resume_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResumeConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.ResumeConnector", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.ResumeConnectorResponse", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "ResumeConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.ResumeConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_RestartConnector_async", + "title": "ManagedKafka restartConnector Sample", + "origin": "API_DEFINITION", + "description": " Restarts the connector.", + "canonical": true, + "file": "managed_kafka_connect.restart_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestartConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.RestartConnector", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.RestartConnectorResponse", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "RestartConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.RestartConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedKafkaConnect_StopConnector_async", + "title": "ManagedKafka stopConnector Sample", + "origin": "API_DEFINITION", + "description": " Stops the connector.", + "canonical": true, + "file": "managed_kafka_connect.stop_connector.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StopConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.StopConnector", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.v1.StopConnectorResponse", + "client": { + "shortName": "ManagedKafkaConnectClient", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnectClient" + }, + "method": { + "shortName": "StopConnector", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect.StopConnector", + "service": { + "shortName": "ManagedKafkaConnect", + "fullName": "google.cloud.managedkafka.v1.ManagedKafkaConnect" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-managedkafka/src/index.ts b/packages/google-cloud-managedkafka/src/index.ts index ac455444244..e118808c62b 100644 --- a/packages/google-cloud-managedkafka/src/index.ts +++ b/packages/google-cloud-managedkafka/src/index.ts @@ -20,8 +20,10 @@ import * as v1 from './v1'; const ManagedKafkaClient = v1.ManagedKafkaClient; type ManagedKafkaClient = v1.ManagedKafkaClient; +const ManagedKafkaConnectClient = v1.ManagedKafkaConnectClient; +type ManagedKafkaConnectClient = v1.ManagedKafkaConnectClient; -export {v1, ManagedKafkaClient}; -export default {v1, ManagedKafkaClient}; +export {v1, ManagedKafkaClient, ManagedKafkaConnectClient}; +export default {v1, ManagedKafkaClient, ManagedKafkaConnectClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-managedkafka/src/v1/gapic_metadata.json b/packages/google-cloud-managedkafka/src/v1/gapic_metadata.json index 63f65181ad2..d2614fda87e 100644 --- a/packages/google-cloud-managedkafka/src/v1/gapic_metadata.json +++ b/packages/google-cloud-managedkafka/src/v1/gapic_metadata.json @@ -170,6 +170,168 @@ } } } + }, + "ManagedKafkaConnect": { + "clients": { + "grpc": { + "libraryClient": "ManagedKafkaConnectClient", + "rpcs": { + "GetConnectCluster": { + "methods": [ + "getConnectCluster" + ] + }, + "GetConnector": { + "methods": [ + "getConnector" + ] + }, + "CreateConnector": { + "methods": [ + "createConnector" + ] + }, + "UpdateConnector": { + "methods": [ + "updateConnector" + ] + }, + "DeleteConnector": { + "methods": [ + "deleteConnector" + ] + }, + "PauseConnector": { + "methods": [ + "pauseConnector" + ] + }, + "ResumeConnector": { + "methods": [ + "resumeConnector" + ] + }, + "RestartConnector": { + "methods": [ + "restartConnector" + ] + }, + "StopConnector": { + "methods": [ + "stopConnector" + ] + }, + "CreateConnectCluster": { + "methods": [ + "createConnectCluster" + ] + }, + "UpdateConnectCluster": { + "methods": [ + "updateConnectCluster" + ] + }, + "DeleteConnectCluster": { + "methods": [ + "deleteConnectCluster" + ] + }, + "ListConnectClusters": { + "methods": [ + "listConnectClusters", + "listConnectClustersStream", + "listConnectClustersAsync" + ] + }, + "ListConnectors": { + "methods": [ + "listConnectors", + "listConnectorsStream", + "listConnectorsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ManagedKafkaConnectClient", + "rpcs": { + "GetConnectCluster": { + "methods": [ + "getConnectCluster" + ] + }, + "GetConnector": { + "methods": [ + "getConnector" + ] + }, + "CreateConnector": { + "methods": [ + "createConnector" + ] + }, + "UpdateConnector": { + "methods": [ + "updateConnector" + ] + }, + "DeleteConnector": { + "methods": [ + "deleteConnector" + ] + }, + "PauseConnector": { + "methods": [ + "pauseConnector" + ] + }, + "ResumeConnector": { + "methods": [ + "resumeConnector" + ] + }, + "RestartConnector": { + "methods": [ + "restartConnector" + ] + }, + "StopConnector": { + "methods": [ + "stopConnector" + ] + }, + "CreateConnectCluster": { + "methods": [ + "createConnectCluster" + ] + }, + "UpdateConnectCluster": { + "methods": [ + "updateConnectCluster" + ] + }, + "DeleteConnectCluster": { + "methods": [ + "deleteConnectCluster" + ] + }, + "ListConnectClusters": { + "methods": [ + "listConnectClusters", + "listConnectClustersStream", + "listConnectClustersAsync" + ] + }, + "ListConnectors": { + "methods": [ + "listConnectors", + "listConnectorsStream", + "listConnectorsAsync" + ] + } + } + } + } } } } diff --git a/packages/google-cloud-managedkafka/src/v1/index.ts b/packages/google-cloud-managedkafka/src/v1/index.ts index dc0ef6d49ea..e2f61e3dd7f 100644 --- a/packages/google-cloud-managedkafka/src/v1/index.ts +++ b/packages/google-cloud-managedkafka/src/v1/index.ts @@ -17,3 +17,4 @@ // ** All changes to this file may be overwritten. ** export {ManagedKafkaClient} from './managed_kafka_client'; +export {ManagedKafkaConnectClient} from './managed_kafka_connect_client'; diff --git a/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts b/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts index e59b9df0580..de7d594438d 100644 --- a/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts +++ b/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts @@ -216,6 +216,12 @@ export class ManagedKafkaClient { clusterPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/clusters/{cluster}' ), + connectClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/connectClusters/{connect_cluster}' + ), + connectorPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}' + ), consumerGroupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}' ), @@ -3113,6 +3119,136 @@ export class ManagedKafkaClient { return this.pathTemplates.clusterPathTemplate.match(clusterName).cluster; } + /** + * Return a fully-qualified connectCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} connect_cluster + * @returns {string} Resource name string. + */ + connectClusterPath( + project: string, + location: string, + connectCluster: string + ) { + return this.pathTemplates.connectClusterPathTemplate.render({ + project: project, + location: location, + connect_cluster: connectCluster, + }); + } + + /** + * Parse the project from ConnectCluster resource. + * + * @param {string} connectClusterName + * A fully-qualified path representing ConnectCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectClusterName(connectClusterName: string) { + return this.pathTemplates.connectClusterPathTemplate.match( + connectClusterName + ).project; + } + + /** + * Parse the location from ConnectCluster resource. + * + * @param {string} connectClusterName + * A fully-qualified path representing ConnectCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConnectClusterName(connectClusterName: string) { + return this.pathTemplates.connectClusterPathTemplate.match( + connectClusterName + ).location; + } + + /** + * Parse the connect_cluster from ConnectCluster resource. + * + * @param {string} connectClusterName + * A fully-qualified path representing ConnectCluster resource. + * @returns {string} A string representing the connect_cluster. + */ + matchConnectClusterFromConnectClusterName(connectClusterName: string) { + return this.pathTemplates.connectClusterPathTemplate.match( + connectClusterName + ).connect_cluster; + } + + /** + * Return a fully-qualified connector resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} connect_cluster + * @param {string} connector + * @returns {string} Resource name string. + */ + connectorPath( + project: string, + location: string, + connectCluster: string, + connector: string + ) { + return this.pathTemplates.connectorPathTemplate.render({ + project: project, + location: location, + connect_cluster: connectCluster, + connector: connector, + }); + } + + /** + * Parse the project from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .project; + } + + /** + * Parse the location from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .location; + } + + /** + * Parse the connect_cluster from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the connect_cluster. + */ + matchConnectClusterFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .connect_cluster; + } + + /** + * Parse the connector from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the connector. + */ + matchConnectorFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .connector; + } + /** * Return a fully-qualified consumerGroup resource name string. * diff --git a/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts new file mode 100644 index 00000000000..3008a2192c8 --- /dev/null +++ b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts @@ -0,0 +1,3359 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/managed_kafka_connect_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './managed_kafka_connect_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The service that a client application uses to manage Apache Kafka Connect + * clusters and connectors. + * @class + * @memberof v1 + */ +export class ManagedKafkaConnectClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('managedkafka'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + managedKafkaConnectStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ManagedKafkaConnectClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ManagedKafkaConnectClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ManagedKafkaConnectClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'managedkafka.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + clusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/clusters/{cluster}' + ), + connectClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/connectClusters/{connect_cluster}' + ), + connectorPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}' + ), + consumerGroupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + topicPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listConnectClusters: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'connectClusters' + ), + listConnectors: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'connectors' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createConnectClusterResponse = protoFilesRoot.lookup( + '.google.cloud.managedkafka.v1.ConnectCluster' + ) as gax.protobuf.Type; + const createConnectClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.managedkafka.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateConnectClusterResponse = protoFilesRoot.lookup( + '.google.cloud.managedkafka.v1.ConnectCluster' + ) as gax.protobuf.Type; + const updateConnectClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.managedkafka.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteConnectClusterResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteConnectClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.managedkafka.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createConnectCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConnectClusterResponse.decode.bind(createConnectClusterResponse), + createConnectClusterMetadata.decode.bind(createConnectClusterMetadata) + ), + updateConnectCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConnectClusterResponse.decode.bind(updateConnectClusterResponse), + updateConnectClusterMetadata.decode.bind(updateConnectClusterMetadata) + ), + deleteConnectCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConnectClusterResponse.decode.bind(deleteConnectClusterResponse), + deleteConnectClusterMetadata.decode.bind(deleteConnectClusterMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.managedkafka.v1.ManagedKafkaConnect', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.managedKafkaConnectStub) { + return this.managedKafkaConnectStub; + } + + // Put together the "service stub" for + // google.cloud.managedkafka.v1.ManagedKafkaConnect. + this.managedKafkaConnectStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.managedkafka.v1.ManagedKafkaConnect' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.managedkafka.v1 + .ManagedKafkaConnect, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const managedKafkaConnectStubMethods = [ + 'listConnectClusters', + 'getConnectCluster', + 'createConnectCluster', + 'updateConnectCluster', + 'deleteConnectCluster', + 'listConnectors', + 'getConnector', + 'createConnector', + 'updateConnector', + 'deleteConnector', + 'pauseConnector', + 'resumeConnector', + 'restartConnector', + 'stopConnector', + ]; + for (const methodName of managedKafkaConnectStubMethods) { + const callPromise = this.managedKafkaConnectStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.managedKafkaConnectStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'managedkafka.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'managedkafka.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Returns the properties of a single Kafka Connect cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Kafka Connect cluster whose configuration to + * return. Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.ConnectCluster|ConnectCluster}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.get_connect_cluster.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_GetConnectCluster_async + */ + getConnectCluster( + request?: protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | undefined, + {} | undefined, + ] + >; + getConnectCluster( + request: protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnectCluster, + | protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConnectCluster( + request: protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnectCluster, + | protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConnectCluster( + request?: protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IConnectCluster, + | protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IConnectCluster, + | protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('getConnectCluster request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IConnectCluster, + | protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getConnectCluster response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getConnectCluster(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IConnectCluster, + ( + | protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getConnectCluster response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Returns the properties of a single connector. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the connector whose configuration to return. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.Connector|Connector}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.get_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_GetConnector_async + */ + getConnector( + request?: protos.google.cloud.managedkafka.v1.IGetConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector, + protos.google.cloud.managedkafka.v1.IGetConnectorRequest | undefined, + {} | undefined, + ] + >; + getConnector( + request: protos.google.cloud.managedkafka.v1.IGetConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IGetConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConnector( + request: protos.google.cloud.managedkafka.v1.IGetConnectorRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IGetConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConnector( + request?: protos.google.cloud.managedkafka.v1.IGetConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IGetConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IGetConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector, + protos.google.cloud.managedkafka.v1.IGetConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('getConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IGetConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IConnector, + protos.google.cloud.managedkafka.v1.IGetConnectorRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Creates a new connector in a given Connect cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent Connect cluster in which to create the connector. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + * @param {string} request.connectorId + * Required. The ID to use for the connector, which will become the final + * component of the connector's name. The ID must be 1-63 characters long, and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + * RFC 1035. + * + * This value is structured like: `my-connector-id`. + * @param {google.cloud.managedkafka.v1.Connector} request.connector + * Required. The connector to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.Connector|Connector}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.create_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_CreateConnector_async + */ + createConnector( + request?: protos.google.cloud.managedkafka.v1.ICreateConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector, + protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | undefined, + {} | undefined, + ] + >; + createConnector( + request: protos.google.cloud.managedkafka.v1.ICreateConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.ICreateConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConnector( + request: protos.google.cloud.managedkafka.v1.ICreateConnectorRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.ICreateConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConnector( + request?: protos.google.cloud.managedkafka.v1.ICreateConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.ICreateConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.ICreateConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector, + protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + this._log.info('createConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.ICreateConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IConnector, + ( + | protos.google.cloud.managedkafka.v1.ICreateConnectorRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('createConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Updates the properties of a connector. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * @param {google.cloud.managedkafka.v1.Connector} request.connector + * Required. The connector to update. Its `name` field must be populated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.Connector|Connector}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.update_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnector_async + */ + updateConnector( + request?: protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector, + protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | undefined, + {} | undefined, + ] + >; + updateConnector( + request: protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateConnector( + request: protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateConnector( + request?: protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector, + protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'connector.name': request.connector!.name ?? '', + }); + this.initialize(); + this._log.info('updateConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IConnector, + | protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IConnector, + ( + | protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('updateConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Deletes a connector. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the connector to delete. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.delete_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnector_async + */ + deleteConnector( + request?: protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | undefined, + {} | undefined, + ] + >; + deleteConnector( + request: protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConnector( + request: protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConnector( + request?: protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('deleteConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Pauses the connector and its tasks. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the connector to pause. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.PauseConnectorResponse|PauseConnectorResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.pause_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_PauseConnector_async + */ + pauseConnector( + request?: protos.google.cloud.managedkafka.v1.IPauseConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | undefined, + {} | undefined, + ] + >; + pauseConnector( + request: protos.google.cloud.managedkafka.v1.IPauseConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + | protos.google.cloud.managedkafka.v1.IPauseConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pauseConnector( + request: protos.google.cloud.managedkafka.v1.IPauseConnectorRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + | protos.google.cloud.managedkafka.v1.IPauseConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + pauseConnector( + request?: protos.google.cloud.managedkafka.v1.IPauseConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + | protos.google.cloud.managedkafka.v1.IPauseConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + | protos.google.cloud.managedkafka.v1.IPauseConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('pauseConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + | protos.google.cloud.managedkafka.v1.IPauseConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('pauseConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .pauseConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, + ( + | protos.google.cloud.managedkafka.v1.IPauseConnectorRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('pauseConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Resumes the connector and its tasks. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the connector to pause. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.ResumeConnectorResponse|ResumeConnectorResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.resume_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_ResumeConnector_async + */ + resumeConnector( + request?: protos.google.cloud.managedkafka.v1.IResumeConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | undefined, + {} | undefined, + ] + >; + resumeConnector( + request: protos.google.cloud.managedkafka.v1.IResumeConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + | protos.google.cloud.managedkafka.v1.IResumeConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resumeConnector( + request: protos.google.cloud.managedkafka.v1.IResumeConnectorRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + | protos.google.cloud.managedkafka.v1.IResumeConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + resumeConnector( + request?: protos.google.cloud.managedkafka.v1.IResumeConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + | protos.google.cloud.managedkafka.v1.IResumeConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + | protos.google.cloud.managedkafka.v1.IResumeConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('resumeConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + | protos.google.cloud.managedkafka.v1.IResumeConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('resumeConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .resumeConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, + ( + | protos.google.cloud.managedkafka.v1.IResumeConnectorRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('resumeConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Restarts the connector. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the connector to restart. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.RestartConnectorResponse|RestartConnectorResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.restart_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_RestartConnector_async + */ + restartConnector( + request?: protos.google.cloud.managedkafka.v1.IRestartConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | undefined, + {} | undefined, + ] + >; + restartConnector( + request: protos.google.cloud.managedkafka.v1.IRestartConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + | protos.google.cloud.managedkafka.v1.IRestartConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + restartConnector( + request: protos.google.cloud.managedkafka.v1.IRestartConnectorRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + | protos.google.cloud.managedkafka.v1.IRestartConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + restartConnector( + request?: protos.google.cloud.managedkafka.v1.IRestartConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + | protos.google.cloud.managedkafka.v1.IRestartConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + | protos.google.cloud.managedkafka.v1.IRestartConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('restartConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + | protos.google.cloud.managedkafka.v1.IRestartConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('restartConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .restartConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, + ( + | protos.google.cloud.managedkafka.v1.IRestartConnectorRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('restartConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + /** + * Stops the connector. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the connector to stop. + * Structured like: + * projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.v1.StopConnectorResponse|StopConnectorResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.stop_connector.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_StopConnector_async + */ + stopConnector( + request?: protos.google.cloud.managedkafka.v1.IStopConnectorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + protos.google.cloud.managedkafka.v1.IStopConnectorRequest | undefined, + {} | undefined, + ] + >; + stopConnector( + request: protos.google.cloud.managedkafka.v1.IStopConnectorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + | protos.google.cloud.managedkafka.v1.IStopConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + stopConnector( + request: protos.google.cloud.managedkafka.v1.IStopConnectorRequest, + callback: Callback< + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + | protos.google.cloud.managedkafka.v1.IStopConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + stopConnector( + request?: protos.google.cloud.managedkafka.v1.IStopConnectorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + | protos.google.cloud.managedkafka.v1.IStopConnectorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + | protos.google.cloud.managedkafka.v1.IStopConnectorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + protos.google.cloud.managedkafka.v1.IStopConnectorRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + this._log.info('stopConnector request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + | protos.google.cloud.managedkafka.v1.IStopConnectorRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('stopConnector response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .stopConnector(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.v1.IStopConnectorResponse, + protos.google.cloud.managedkafka.v1.IStopConnectorRequest | undefined, + {} | undefined, + ]) => { + this._log.info('stopConnector response %j', response); + return [response, options, rawResponse]; + } + ); + } + + /** + * Creates a new Kafka Connect cluster in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent project/location in which to create the Kafka Connect + * cluster. Structured like + * `projects/{project}/locations/{location}/`. + * @param {string} request.connectClusterId + * Required. The ID to use for the Connect cluster, which will become the + * final component of the cluster's name. The ID must be 1-63 characters long, + * and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply + * with RFC 1035. + * + * This value is structured like: `my-cluster-id`. + * @param {google.cloud.managedkafka.v1.ConnectCluster} request.connectCluster + * Required. Configuration of the Kafka Connect cluster to create. Its `name` + * field is ignored. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.create_connect_cluster.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_CreateConnectCluster_async + */ + createConnectCluster( + request?: protos.google.cloud.managedkafka.v1.ICreateConnectClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createConnectCluster( + request: protos.google.cloud.managedkafka.v1.ICreateConnectClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createConnectCluster( + request: protos.google.cloud.managedkafka.v1.ICreateConnectClusterRequest, + callback: Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createConnectCluster( + request?: protos.google.cloud.managedkafka.v1.ICreateConnectClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createConnectCluster response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createConnectCluster request %j', request); + return this.innerApiCalls + .createConnectCluster(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createConnectCluster response %j', rawResponse); + return [response, rawResponse, _]; + } + ); + } + /** + * Check the status of the long running operation returned by `createConnectCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.create_connect_cluster.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_CreateConnectCluster_async + */ + async checkCreateConnectClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.managedkafka.v1.ConnectCluster, + protos.google.cloud.managedkafka.v1.OperationMetadata + > + > { + this._log.info('createConnectCluster long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createConnectCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.managedkafka.v1.ConnectCluster, + protos.google.cloud.managedkafka.v1.OperationMetadata + >; + } + /** + * Updates the properties of a single Kafka Connect cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * @param {google.cloud.managedkafka.v1.ConnectCluster} request.connectCluster + * Required. The Kafka Connect cluster to update. Its `name` field must be + * populated. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.update_connect_cluster.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnectCluster_async + */ + updateConnectCluster( + request?: protos.google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateConnectCluster( + request: protos.google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConnectCluster( + request: protos.google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, + callback: Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConnectCluster( + request?: protos.google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'connect_cluster.name': request.connectCluster!.name ?? '', + }); + this.initialize(); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateConnectCluster response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateConnectCluster request %j', request); + return this.innerApiCalls + .updateConnectCluster(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateConnectCluster response %j', rawResponse); + return [response, rawResponse, _]; + } + ); + } + /** + * Check the status of the long running operation returned by `updateConnectCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.update_connect_cluster.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_UpdateConnectCluster_async + */ + async checkUpdateConnectClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.managedkafka.v1.ConnectCluster, + protos.google.cloud.managedkafka.v1.OperationMetadata + > + > { + this._log.info('updateConnectCluster long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateConnectCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.managedkafka.v1.ConnectCluster, + protos.google.cloud.managedkafka.v1.OperationMetadata + >; + } + /** + * Deletes a single Connect cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Kafka Connect cluster to delete. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnectCluster_async + */ + deleteConnectCluster( + request?: protos.google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteConnectCluster( + request: protos.google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConnectCluster( + request: protos.google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConnectCluster( + request?: protos.google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + const wrappedCallback: + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteConnectCluster response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteConnectCluster request %j', request); + return this.innerApiCalls + .deleteConnectCluster(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('deleteConnectCluster response %j', rawResponse); + return [response, rawResponse, _]; + } + ); + } + /** + * Check the status of the long running operation returned by `deleteConnectCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.delete_connect_cluster.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_DeleteConnectCluster_async + */ + async checkDeleteConnectClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.managedkafka.v1.OperationMetadata + > + > { + this._log.info('deleteConnectCluster long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteConnectCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.managedkafka.v1.OperationMetadata + >; + } + /** + * Lists the Kafka Connect clusters in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent project/location whose Connect clusters are to be + * listed. Structured like `projects/{project}/locations/{location}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of Connect clusters to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConnectClusters` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectClusters` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter expression for the result. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.managedkafka.v1.ConnectCluster|ConnectCluster}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listConnectClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConnectClusters( + request?: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnectCluster[], + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest | null, + protos.google.cloud.managedkafka.v1.IListConnectClustersResponse, + ] + >; + listConnectClusters( + request: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + | protos.google.cloud.managedkafka.v1.IListConnectClustersResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnectCluster + > + ): void; + listConnectClusters( + request: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + callback: PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + | protos.google.cloud.managedkafka.v1.IListConnectClustersResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnectCluster + > + ): void; + listConnectClusters( + request?: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + | protos.google.cloud.managedkafka.v1.IListConnectClustersResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnectCluster + >, + callback?: PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + | protos.google.cloud.managedkafka.v1.IListConnectClustersResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnectCluster + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnectCluster[], + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest | null, + protos.google.cloud.managedkafka.v1.IListConnectClustersResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + | protos.google.cloud.managedkafka.v1.IListConnectClustersResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnectCluster + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listConnectClusters values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listConnectClusters request %j', request); + return this.innerApiCalls + .listConnectClusters(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.managedkafka.v1.IConnectCluster[], + protos.google.cloud.managedkafka.v1.IListConnectClustersRequest | null, + protos.google.cloud.managedkafka.v1.IListConnectClustersResponse, + ]) => { + this._log.info('listConnectClusters values %j', response); + return [response, input, output]; + } + ); + } + + /** + * Equivalent to `listConnectClusters`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent project/location whose Connect clusters are to be + * listed. Structured like `projects/{project}/locations/{location}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of Connect clusters to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConnectClusters` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectClusters` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter expression for the result. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.managedkafka.v1.ConnectCluster|ConnectCluster} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listConnectClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConnectClustersStream( + request?: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConnectClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this._log.info('listConnectClusters stream %j', request); + return this.descriptors.page.listConnectClusters.createStream( + this.innerApiCalls.listConnectClusters as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConnectClusters`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent project/location whose Connect clusters are to be + * listed. Structured like `projects/{project}/locations/{location}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of Connect clusters to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConnectClusters` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectClusters` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter expression for the result. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.managedkafka.v1.ConnectCluster|ConnectCluster}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.list_connect_clusters.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_ListConnectClusters_async + */ + listConnectClustersAsync( + request?: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConnectClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this._log.info('listConnectClusters iterate %j', request); + return this.descriptors.page.listConnectClusters.asyncIterate( + this.innerApiCalls['listConnectClusters'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists the connectors in a given Connect cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent Connect cluster whose connectors are to be listed. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConnectors` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectors` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.managedkafka.v1.Connector|Connector}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listConnectorsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConnectors( + request?: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector[], + protos.google.cloud.managedkafka.v1.IListConnectorsRequest | null, + protos.google.cloud.managedkafka.v1.IListConnectorsResponse, + ] + >; + listConnectors( + request: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + | protos.google.cloud.managedkafka.v1.IListConnectorsResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnector + > + ): void; + listConnectors( + request: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + callback: PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + | protos.google.cloud.managedkafka.v1.IListConnectorsResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnector + > + ): void; + listConnectors( + request?: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + | protos.google.cloud.managedkafka.v1.IListConnectorsResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnector + >, + callback?: PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + | protos.google.cloud.managedkafka.v1.IListConnectorsResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnector + > + ): Promise< + [ + protos.google.cloud.managedkafka.v1.IConnector[], + protos.google.cloud.managedkafka.v1.IListConnectorsRequest | null, + protos.google.cloud.managedkafka.v1.IListConnectorsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + | protos.google.cloud.managedkafka.v1.IListConnectorsResponse + | null + | undefined, + protos.google.cloud.managedkafka.v1.IConnector + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listConnectors values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listConnectors request %j', request); + return this.innerApiCalls + .listConnectors(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.managedkafka.v1.IConnector[], + protos.google.cloud.managedkafka.v1.IListConnectorsRequest | null, + protos.google.cloud.managedkafka.v1.IListConnectorsResponse, + ]) => { + this._log.info('listConnectors values %j', response); + return [response, input, output]; + } + ); + } + + /** + * Equivalent to `listConnectors`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent Connect cluster whose connectors are to be listed. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConnectors` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectors` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.managedkafka.v1.Connector|Connector} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listConnectorsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConnectorsStream( + request?: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConnectors']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this._log.info('listConnectors stream %j', request); + return this.descriptors.page.listConnectors.createStream( + this.innerApiCalls.listConnectors as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConnectors`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent Connect cluster whose connectors are to be listed. + * Structured like + * `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListConnectors` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectors` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.managedkafka.v1.Connector|Connector}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_kafka_connect.list_connectors.js + * region_tag:managedkafka_v1_generated_ManagedKafkaConnect_ListConnectors_async + */ + listConnectorsAsync( + request?: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConnectors']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this._log.info('listConnectors iterate %j', request); + return this.descriptors.page.listConnectors.asyncIterate( + this.innerApiCalls['listConnectors'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified cluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cluster + * @returns {string} Resource name string. + */ + clusterPath(project: string, location: string, cluster: string) { + return this.pathTemplates.clusterPathTemplate.render({ + project: project, + location: location, + cluster: cluster, + }); + } + + /** + * Parse the project from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).project; + } + + /** + * Parse the location from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).location; + } + + /** + * Parse the cluster from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).cluster; + } + + /** + * Return a fully-qualified connectCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} connect_cluster + * @returns {string} Resource name string. + */ + connectClusterPath( + project: string, + location: string, + connectCluster: string + ) { + return this.pathTemplates.connectClusterPathTemplate.render({ + project: project, + location: location, + connect_cluster: connectCluster, + }); + } + + /** + * Parse the project from ConnectCluster resource. + * + * @param {string} connectClusterName + * A fully-qualified path representing ConnectCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectClusterName(connectClusterName: string) { + return this.pathTemplates.connectClusterPathTemplate.match( + connectClusterName + ).project; + } + + /** + * Parse the location from ConnectCluster resource. + * + * @param {string} connectClusterName + * A fully-qualified path representing ConnectCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConnectClusterName(connectClusterName: string) { + return this.pathTemplates.connectClusterPathTemplate.match( + connectClusterName + ).location; + } + + /** + * Parse the connect_cluster from ConnectCluster resource. + * + * @param {string} connectClusterName + * A fully-qualified path representing ConnectCluster resource. + * @returns {string} A string representing the connect_cluster. + */ + matchConnectClusterFromConnectClusterName(connectClusterName: string) { + return this.pathTemplates.connectClusterPathTemplate.match( + connectClusterName + ).connect_cluster; + } + + /** + * Return a fully-qualified connector resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} connect_cluster + * @param {string} connector + * @returns {string} Resource name string. + */ + connectorPath( + project: string, + location: string, + connectCluster: string, + connector: string + ) { + return this.pathTemplates.connectorPathTemplate.render({ + project: project, + location: location, + connect_cluster: connectCluster, + connector: connector, + }); + } + + /** + * Parse the project from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .project; + } + + /** + * Parse the location from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .location; + } + + /** + * Parse the connect_cluster from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the connect_cluster. + */ + matchConnectClusterFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .connect_cluster; + } + + /** + * Parse the connector from Connector resource. + * + * @param {string} connectorName + * A fully-qualified path representing Connector resource. + * @returns {string} A string representing the connector. + */ + matchConnectorFromConnectorName(connectorName: string) { + return this.pathTemplates.connectorPathTemplate.match(connectorName) + .connector; + } + + /** + * Return a fully-qualified consumerGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cluster + * @param {string} consumer_group + * @returns {string} Resource name string. + */ + consumerGroupPath( + project: string, + location: string, + cluster: string, + consumerGroup: string + ) { + return this.pathTemplates.consumerGroupPathTemplate.render({ + project: project, + location: location, + cluster: cluster, + consumer_group: consumerGroup, + }); + } + + /** + * Parse the project from ConsumerGroup resource. + * + * @param {string} consumerGroupName + * A fully-qualified path representing ConsumerGroup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConsumerGroupName(consumerGroupName: string) { + return this.pathTemplates.consumerGroupPathTemplate.match(consumerGroupName) + .project; + } + + /** + * Parse the location from ConsumerGroup resource. + * + * @param {string} consumerGroupName + * A fully-qualified path representing ConsumerGroup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConsumerGroupName(consumerGroupName: string) { + return this.pathTemplates.consumerGroupPathTemplate.match(consumerGroupName) + .location; + } + + /** + * Parse the cluster from ConsumerGroup resource. + * + * @param {string} consumerGroupName + * A fully-qualified path representing ConsumerGroup resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromConsumerGroupName(consumerGroupName: string) { + return this.pathTemplates.consumerGroupPathTemplate.match(consumerGroupName) + .cluster; + } + + /** + * Parse the consumer_group from ConsumerGroup resource. + * + * @param {string} consumerGroupName + * A fully-qualified path representing ConsumerGroup resource. + * @returns {string} A string representing the consumer_group. + */ + matchConsumerGroupFromConsumerGroupName(consumerGroupName: string) { + return this.pathTemplates.consumerGroupPathTemplate.match(consumerGroupName) + .consumer_group; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified topic resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cluster + * @param {string} topic + * @returns {string} Resource name string. + */ + topicPath(project: string, location: string, cluster: string, topic: string) { + return this.pathTemplates.topicPathTemplate.render({ + project: project, + location: location, + cluster: cluster, + topic: topic, + }); + } + + /** + * Parse the project from Topic resource. + * + * @param {string} topicName + * A fully-qualified path representing Topic resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTopicName(topicName: string) { + return this.pathTemplates.topicPathTemplate.match(topicName).project; + } + + /** + * Parse the location from Topic resource. + * + * @param {string} topicName + * A fully-qualified path representing Topic resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTopicName(topicName: string) { + return this.pathTemplates.topicPathTemplate.match(topicName).location; + } + + /** + * Parse the cluster from Topic resource. + * + * @param {string} topicName + * A fully-qualified path representing Topic resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromTopicName(topicName: string) { + return this.pathTemplates.topicPathTemplate.match(topicName).cluster; + } + + /** + * Parse the topic from Topic resource. + * + * @param {string} topicName + * A fully-qualified path representing Topic resource. + * @returns {string} A string representing the topic. + */ + matchTopicFromTopicName(topicName: string) { + return this.pathTemplates.topicPathTemplate.match(topicName).topic; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.managedKafkaConnectStub && !this._terminated) { + return this.managedKafkaConnectStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client_config.json b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client_config.json new file mode 100644 index 00000000000..1f579c56245 --- /dev/null +++ b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client_config.json @@ -0,0 +1,108 @@ +{ + "interfaces": { + "google.cloud.managedkafka.v1.ManagedKafkaConnect": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListConnectClusters": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetConnectCluster": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateConnectCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConnectCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnectCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListConnectors": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetConnector": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateConnector": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConnector": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnector": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PauseConnector": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResumeConnector": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestartConnector": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StopConnector": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_proto_list.json b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_proto_list.json new file mode 100644 index 00000000000..619dfe5ad3b --- /dev/null +++ b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/managedkafka/v1/managed_kafka.proto", + "../../protos/google/cloud/managedkafka/v1/managed_kafka_connect.proto", + "../../protos/google/cloud/managedkafka/v1/resources.proto" +] diff --git a/packages/google-cloud-managedkafka/src/v1/managed_kafka_proto_list.json b/packages/google-cloud-managedkafka/src/v1/managed_kafka_proto_list.json index 2b0b0725693..619dfe5ad3b 100644 --- a/packages/google-cloud-managedkafka/src/v1/managed_kafka_proto_list.json +++ b/packages/google-cloud-managedkafka/src/v1/managed_kafka_proto_list.json @@ -1,4 +1,5 @@ [ "../../protos/google/cloud/managedkafka/v1/managed_kafka.proto", + "../../protos/google/cloud/managedkafka/v1/managed_kafka_connect.proto", "../../protos/google/cloud/managedkafka/v1/resources.proto" ] diff --git a/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.js b/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.js index a2bcf723ebd..208cc2aaf81 100644 --- a/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.js @@ -21,6 +21,8 @@ const managedkafka = require('@google-cloud/managedkafka'); function main() { const managedKafkaClient = new managedkafka.ManagedKafkaClient(); + const managedKafkaConnectClient = + new managedkafka.ManagedKafkaConnectClient(); } main(); diff --git a/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.ts index a1d9ad1d2bb..6070ec0321b 100644 --- a/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-managedkafka/system-test/fixtures/sample/src/index.ts @@ -16,17 +16,28 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {ManagedKafkaClient} from '@google-cloud/managedkafka'; +import { + ManagedKafkaClient, + ManagedKafkaConnectClient, +} from '@google-cloud/managedkafka'; // check that the client class type name can be used function doStuffWithManagedKafkaClient(client: ManagedKafkaClient) { client.close(); } +function doStuffWithManagedKafkaConnectClient( + client: ManagedKafkaConnectClient +) { + client.close(); +} function main() { // check that the client instance can be created const managedKafkaClient = new ManagedKafkaClient(); doStuffWithManagedKafkaClient(managedKafkaClient); + // check that the client instance can be created + const managedKafkaConnectClient = new ManagedKafkaConnectClient(); + doStuffWithManagedKafkaConnectClient(managedKafkaConnectClient); } main(); diff --git a/packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts new file mode 100644 index 00000000000..321b4ada298 --- /dev/null +++ b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts @@ -0,0 +1,3912 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as managedkafkaconnectModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ManagedKafkaConnectClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new managedkafkaconnectModule.v1.ManagedKafkaConnectClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'managedkafka.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new managedkafkaconnectModule.v1.ManagedKafkaConnectClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + managedkafkaconnectModule.v1.ManagedKafkaConnectClient.servicePath; + assert.strictEqual(servicePath, 'managedkafka.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + managedkafkaconnectModule.v1.ManagedKafkaConnectClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'managedkafka.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + {universeDomain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'managedkafka.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + {universe_domain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'managedkafka.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new managedkafkaconnectModule.v1.ManagedKafkaConnectClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'managedkafka.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new managedkafkaconnectModule.v1.ManagedKafkaConnectClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'managedkafka.configured.example.com' + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new managedkafkaconnectModule.v1.ManagedKafkaConnectClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = managedkafkaconnectModule.v1.ManagedKafkaConnectClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new managedkafkaconnectModule.v1.ManagedKafkaConnectClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.managedKafkaConnectStub, undefined); + await client.initialize(); + assert(client.managedKafkaConnectStub); + }); + + it('has close method for the initialized client', done => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.managedKafkaConnectStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.managedKafkaConnectStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + 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 managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + 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('getConnectCluster', () => { + it('invokes getConnectCluster without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ); + client.innerApiCalls.getConnectCluster = stubSimpleCall(expectedResponse); + const [response] = await client.getConnectCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectCluster without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ); + client.innerApiCalls.getConnectCluster = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnectCluster( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IConnectCluster | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectCluster with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnectCluster = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getConnectCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectCluster with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConnectCluster(request), expectedError); + }); + }); + + describe('getConnector', () => { + it('invokes getConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ); + client.innerApiCalls.getConnector = stubSimpleCall(expectedResponse); + const [response] = await client.getConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ); + client.innerApiCalls.getConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnector( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IConnector | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.GetConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.GetConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConnector(request), expectedError); + }); + }); + + describe('createConnector', () => { + it('invokes createConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ); + client.innerApiCalls.createConnector = stubSimpleCall(expectedResponse); + const [response] = await client.createConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ); + client.innerApiCalls.createConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnector( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IConnector | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createConnector(request), expectedError); + }); + }); + + describe('updateConnector', () => { + it('invokes updateConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() + ); + request.connector ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectorRequest', + ['connector', 'name'] + ); + request.connector.name = defaultValue1; + const expectedHeaderRequestParams = `connector.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ); + client.innerApiCalls.updateConnector = stubSimpleCall(expectedResponse); + const [response] = await client.updateConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() + ); + request.connector ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectorRequest', + ['connector', 'name'] + ); + request.connector.name = defaultValue1; + const expectedHeaderRequestParams = `connector.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ); + client.innerApiCalls.updateConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnector( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IConnector | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() + ); + request.connector ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectorRequest', + ['connector', 'name'] + ); + request.connector.name = defaultValue1; + const expectedHeaderRequestParams = `connector.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() + ); + request.connector ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectorRequest', + ['connector', 'name'] + ); + request.connector.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateConnector(request), expectedError); + }); + }); + + describe('deleteConnector', () => { + it('invokes deleteConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConnector = stubSimpleCall(expectedResponse); + const [response] = await client.deleteConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnector( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteConnector(request), expectedError); + }); + }); + + describe('pauseConnector', () => { + it('invokes pauseConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.PauseConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.PauseConnectorResponse() + ); + client.innerApiCalls.pauseConnector = stubSimpleCall(expectedResponse); + const [response] = await client.pauseConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pauseConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pauseConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pauseConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.PauseConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.PauseConnectorResponse() + ); + client.innerApiCalls.pauseConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pauseConnector( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IPauseConnectorResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.pauseConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pauseConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pauseConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.PauseConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.pauseConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pauseConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.pauseConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.pauseConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pauseConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.PauseConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pauseConnector(request), expectedError); + }); + }); + + describe('resumeConnector', () => { + it('invokes resumeConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ResumeConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ResumeConnectorResponse() + ); + client.innerApiCalls.resumeConnector = stubSimpleCall(expectedResponse); + const [response] = await client.resumeConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resumeConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumeConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ResumeConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ResumeConnectorResponse() + ); + client.innerApiCalls.resumeConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resumeConnector( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IResumeConnectorResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.resumeConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumeConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ResumeConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.resumeConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.resumeConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.resumeConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.resumeConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ResumeConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.resumeConnector(request), expectedError); + }); + }); + + describe('restartConnector', () => { + it('invokes restartConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.RestartConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.RestartConnectorResponse() + ); + client.innerApiCalls.restartConnector = stubSimpleCall(expectedResponse); + const [response] = await client.restartConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restartConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restartConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restartConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.RestartConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.RestartConnectorResponse() + ); + client.innerApiCalls.restartConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restartConnector( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IRestartConnectorResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restartConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restartConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restartConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.RestartConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restartConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.restartConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.restartConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restartConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restartConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.RestartConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.restartConnector(request), expectedError); + }); + }); + + describe('stopConnector', () => { + it('invokes stopConnector without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.StopConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.StopConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.StopConnectorResponse() + ); + client.innerApiCalls.stopConnector = stubSimpleCall(expectedResponse); + const [response] = await client.stopConnector(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.stopConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.stopConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopConnector without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.StopConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.StopConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.StopConnectorResponse() + ); + client.innerApiCalls.stopConnector = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.stopConnector( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IStopConnectorResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.stopConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.stopConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopConnector with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.StopConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.StopConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.stopConnector = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.stopConnector(request), expectedError); + const actualRequest = ( + client.innerApiCalls.stopConnector as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.stopConnector as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopConnector with closed client', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.StopConnectorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.StopConnectorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.stopConnector(request), expectedError); + }); + }); + + describe('createConnectCluster', () => { + it('invokes createConnectCluster without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createConnectCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectCluster without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnectCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectCluster with call error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createConnectCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectCluster with LRO error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.CreateConnectClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createConnectCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConnectClusterProgress without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateConnectClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConnectClusterProgress with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateConnectClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateConnectCluster', () => { + it('invokes updateConnectCluster without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() + ); + request.connectCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectClusterRequest', + ['connectCluster', 'name'] + ); + request.connectCluster.name = defaultValue1; + const expectedHeaderRequestParams = `connect_cluster.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConnectCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectCluster without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() + ); + request.connectCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectClusterRequest', + ['connectCluster', 'name'] + ); + request.connectCluster.name = defaultValue1; + const expectedHeaderRequestParams = `connect_cluster.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnectCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.managedkafka.v1.IConnectCluster, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectCluster with call error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() + ); + request.connectCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectClusterRequest', + ['connectCluster', 'name'] + ); + request.connectCluster.name = defaultValue1; + const expectedHeaderRequestParams = `connect_cluster.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateConnectCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectCluster with LRO error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() + ); + request.connectCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.UpdateConnectClusterRequest', + ['connectCluster', 'name'] + ); + request.connectCluster.name = defaultValue1; + const expectedHeaderRequestParams = `connect_cluster.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateConnectCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConnectClusterProgress without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateConnectClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConnectClusterProgress with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateConnectClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteConnectCluster', () => { + it('invokes deleteConnectCluster without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConnectCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectCluster without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnectCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectCluster with call error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteConnectCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectCluster with LRO error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.DeleteConnectClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteConnectCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConnectClusterProgress without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteConnectClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConnectClusterProgress with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteConnectClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listConnectClusters', () => { + it('invokes listConnectClusters without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + ]; + client.innerApiCalls.listConnectClusters = + stubSimpleCall(expectedResponse); + const [response] = await client.listConnectClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnectClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectClusters without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + ]; + client.innerApiCalls.listConnectClusters = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectClusters( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.managedkafka.v1.IConnectCluster[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnectClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectClusters with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectClusters = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConnectClusters(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConnectClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectClustersStream without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + ]; + client.descriptors.page.listConnectClusters.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConnectClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.managedkafka.v1.ConnectCluster[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.managedkafka.v1.ConnectCluster) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listConnectClusters.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnectClusters, request) + ); + assert( + (client.descriptors.page.listConnectClusters.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listConnectClustersStream with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectClusters.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.managedkafka.v1.ConnectCluster[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.managedkafka.v1.ConnectCluster) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConnectClusters.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnectClusters, request) + ); + assert( + (client.descriptors.page.listConnectClusters.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listConnectClusters without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ConnectCluster() + ), + ]; + client.descriptors.page.listConnectClusters.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.managedkafka.v1.IConnectCluster[] = + []; + const iterable = client.listConnectClustersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnectClusters.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConnectClusters.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listConnectClusters with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectClusters.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectClustersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.managedkafka.v1.IConnectCluster[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnectClusters.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConnectClusters.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listConnectors', () => { + it('invokes listConnectors without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + ]; + client.innerApiCalls.listConnectors = stubSimpleCall(expectedResponse); + const [response] = await client.listConnectors(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnectors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectors without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + ]; + client.innerApiCalls.listConnectors = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectors( + request, + ( + err?: Error | null, + result?: protos.google.cloud.managedkafka.v1.IConnector[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnectors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectors with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectors = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConnectors(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConnectors as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectors as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectorsStream without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + ]; + client.descriptors.page.listConnectors.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConnectorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.managedkafka.v1.Connector[] = []; + stream.on( + 'data', + (response: protos.google.cloud.managedkafka.v1.Connector) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listConnectors.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnectors, request) + ); + assert( + (client.descriptors.page.listConnectors.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listConnectorsStream with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectors.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.managedkafka.v1.Connector[] = []; + stream.on( + 'data', + (response: protos.google.cloud.managedkafka.v1.Connector) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConnectors.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnectors, request) + ); + assert( + (client.descriptors.page.listConnectors.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listConnectors without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + generateSampleMessage( + new protos.google.cloud.managedkafka.v1.Connector() + ), + ]; + client.descriptors.page.listConnectors.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.managedkafka.v1.IConnector[] = []; + const iterable = client.listConnectorsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnectors.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConnectors.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listConnectors with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.managedkafka.v1.ListConnectorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectors.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectorsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.managedkafka.v1.IConnector[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnectors.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConnectors.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('cluster', () => { + const fakePath = '/rendered/path/cluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + cluster: 'clusterValue', + }; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.clusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.clusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('clusterPath', () => { + const result = client.clusterPath( + 'projectValue', + 'locationValue', + 'clusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.clusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromClusterName', () => { + const result = client.matchProjectFromClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromClusterName', () => { + const result = client.matchLocationFromClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchClusterFromClusterName', () => { + const result = client.matchClusterFromClusterName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('connectCluster', () => { + const fakePath = '/rendered/path/connectCluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + connect_cluster: 'connectClusterValue', + }; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.connectClusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.connectClusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('connectClusterPath', () => { + const result = client.connectClusterPath( + 'projectValue', + 'locationValue', + 'connectClusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.connectClusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConnectClusterName', () => { + const result = client.matchProjectFromConnectClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.connectClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConnectClusterName', () => { + const result = client.matchLocationFromConnectClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.connectClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectClusterFromConnectClusterName', () => { + const result = + client.matchConnectClusterFromConnectClusterName(fakePath); + assert.strictEqual(result, 'connectClusterValue'); + assert( + (client.pathTemplates.connectClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('connector', () => { + const fakePath = '/rendered/path/connector'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + connect_cluster: 'connectClusterValue', + connector: 'connectorValue', + }; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.connectorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.connectorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('connectorPath', () => { + const result = client.connectorPath( + 'projectValue', + 'locationValue', + 'connectClusterValue', + 'connectorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.connectorPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConnectorName', () => { + const result = client.matchProjectFromConnectorName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConnectorName', () => { + const result = client.matchLocationFromConnectorName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectClusterFromConnectorName', () => { + const result = client.matchConnectClusterFromConnectorName(fakePath); + assert.strictEqual(result, 'connectClusterValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectorFromConnectorName', () => { + const result = client.matchConnectorFromConnectorName(fakePath); + assert.strictEqual(result, 'connectorValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('consumerGroup', () => { + const fakePath = '/rendered/path/consumerGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + cluster: 'clusterValue', + consumer_group: 'consumerGroupValue', + }; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.consumerGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.consumerGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('consumerGroupPath', () => { + const result = client.consumerGroupPath( + 'projectValue', + 'locationValue', + 'clusterValue', + 'consumerGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.consumerGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConsumerGroupName', () => { + const result = client.matchProjectFromConsumerGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.consumerGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConsumerGroupName', () => { + const result = client.matchLocationFromConsumerGroupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.consumerGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchClusterFromConsumerGroupName', () => { + const result = client.matchClusterFromConsumerGroupName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.consumerGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConsumerGroupFromConsumerGroupName', () => { + const result = client.matchConsumerGroupFromConsumerGroupName(fakePath); + assert.strictEqual(result, 'consumerGroupValue'); + assert( + (client.pathTemplates.consumerGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('topic', () => { + const fakePath = '/rendered/path/topic'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + cluster: 'clusterValue', + topic: 'topicValue', + }; + const client = new managedkafkaconnectModule.v1.ManagedKafkaConnectClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.topicPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.topicPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('topicPath', () => { + const result = client.topicPath( + 'projectValue', + 'locationValue', + 'clusterValue', + 'topicValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.topicPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTopicName', () => { + const result = client.matchProjectFromTopicName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.topicPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTopicName', () => { + const result = client.matchLocationFromTopicName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.topicPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchClusterFromTopicName', () => { + const result = client.matchClusterFromTopicName(fakePath); + assert.strictEqual(result, 'clusterValue'); + assert( + (client.pathTemplates.topicPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTopicFromTopicName', () => { + const result = client.matchTopicFromTopicName(fakePath); + assert.strictEqual(result, 'topicValue'); + assert( + (client.pathTemplates.topicPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts index 0a1cba3c115..41d7e79ee32 100644 --- a/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts +++ b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts @@ -3508,6 +3508,147 @@ describe('v1.ManagedKafkaClient', () => { }); }); + describe('connectCluster', () => { + const fakePath = '/rendered/path/connectCluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + connect_cluster: 'connectClusterValue', + }; + const client = new managedkafkaModule.v1.ManagedKafkaClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectClusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.connectClusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('connectClusterPath', () => { + const result = client.connectClusterPath( + 'projectValue', + 'locationValue', + 'connectClusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.connectClusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConnectClusterName', () => { + const result = client.matchProjectFromConnectClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.connectClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConnectClusterName', () => { + const result = client.matchLocationFromConnectClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.connectClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectClusterFromConnectClusterName', () => { + const result = + client.matchConnectClusterFromConnectClusterName(fakePath); + assert.strictEqual(result, 'connectClusterValue'); + assert( + (client.pathTemplates.connectClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('connector', () => { + const fakePath = '/rendered/path/connector'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + connect_cluster: 'connectClusterValue', + connector: 'connectorValue', + }; + const client = new managedkafkaModule.v1.ManagedKafkaClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.connectorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('connectorPath', () => { + const result = client.connectorPath( + 'projectValue', + 'locationValue', + 'connectClusterValue', + 'connectorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.connectorPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConnectorName', () => { + const result = client.matchProjectFromConnectorName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConnectorName', () => { + const result = client.matchLocationFromConnectorName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectClusterFromConnectorName', () => { + const result = client.matchConnectClusterFromConnectorName(fakePath); + assert.strictEqual(result, 'connectClusterValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConnectorFromConnectorName', () => { + const result = client.matchConnectorFromConnectorName(fakePath); + assert.strictEqual(result, 'connectorValue'); + assert( + (client.pathTemplates.connectorPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('consumerGroup', () => { const fakePath = '/rendered/path/consumerGroup'; const expectedParameters = { From 2be675d236ff0fa1bdf634f6959b1f260d66f77c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 18:59:36 -0700 Subject: [PATCH 15/34] feat: [compute] Update Compute Engine API to revision 20250302 (#995) (#6178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update Compute Engine API to revision 20250302 (#995) Source-Link: https://github.com/googleapis/googleapis/commit/4c4d2b6ad6f52a0b27e9b49d79df1c18ce610e4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/f3cb7910f380af63c2577783889cdab0e7d4fab9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbXB1dGUvLk93bEJvdC55YW1sIiwiaCI6ImYzY2I3OTEwZjM4MGFmNjNjMjU3Nzc4Mzg4OWNkYWIwZTdkNGZhYjkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/cloud/compute/v1/compute.proto | 9 +- .../google-cloud-compute/protos/protos.d.ts | 101 +++++++- .../google-cloud-compute/protos/protos.js | 238 +++++++++++++++++- .../google-cloud-compute/protos/protos.json | 11 +- ...ppet_metadata.google.cloud.compute.v1.json | 2 +- ...ppet_metadata_google.cloud.compute.v1.json | 2 +- ...metadata.google.cloud.compute.v1small.json | 2 +- ...metadata_google.cloud.compute.v1small.json | 2 +- 8 files changed, 352 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto b/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto index 10923ddbadd..77d18518554 100644 --- a/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto +++ b/packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto @@ -20180,7 +20180,14 @@ message ManagedInstanceInstanceHealth { // message ManagedInstanceLastAttempt { // [Output Only] Encountered errors during the last attempt to create or delete the instance. - optional Errors errors = 315977579; + optional ManagedInstanceLastAttemptErrors errors = 315977579; + +} + +// [Output Only] Encountered errors during the last attempt to create or delete the instance. +message ManagedInstanceLastAttemptErrors { + // [Output Only] The array of errors encountered while processing this operation. + repeated Errors errors = 315977579; } diff --git a/packages/google-cloud-compute/protos/protos.d.ts b/packages/google-cloud-compute/protos/protos.d.ts index 893f06a55ec..c4018f0816b 100644 --- a/packages/google-cloud-compute/protos/protos.d.ts +++ b/packages/google-cloud-compute/protos/protos.d.ts @@ -114449,7 +114449,7 @@ export namespace google { interface IManagedInstanceLastAttempt { /** ManagedInstanceLastAttempt errors */ - errors?: (google.cloud.compute.v1.IErrors|null); + errors?: (google.cloud.compute.v1.IManagedInstanceLastAttemptErrors|null); } /** Represents a ManagedInstanceLastAttempt. */ @@ -114462,7 +114462,7 @@ export namespace google { constructor(properties?: google.cloud.compute.v1.IManagedInstanceLastAttempt); /** ManagedInstanceLastAttempt errors. */ - public errors?: (google.cloud.compute.v1.IErrors|null); + public errors?: (google.cloud.compute.v1.IManagedInstanceLastAttemptErrors|null); /** ManagedInstanceLastAttempt _errors. */ public _errors?: "errors"; @@ -114545,6 +114545,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ManagedInstanceLastAttemptErrors. */ + interface IManagedInstanceLastAttemptErrors { + + /** ManagedInstanceLastAttemptErrors errors */ + errors?: (google.cloud.compute.v1.IErrors[]|null); + } + + /** Represents a ManagedInstanceLastAttemptErrors. */ + class ManagedInstanceLastAttemptErrors implements IManagedInstanceLastAttemptErrors { + + /** + * Constructs a new ManagedInstanceLastAttemptErrors. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.compute.v1.IManagedInstanceLastAttemptErrors); + + /** ManagedInstanceLastAttemptErrors errors. */ + public errors: google.cloud.compute.v1.IErrors[]; + + /** + * Creates a new ManagedInstanceLastAttemptErrors instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagedInstanceLastAttemptErrors instance + */ + public static create(properties?: google.cloud.compute.v1.IManagedInstanceLastAttemptErrors): google.cloud.compute.v1.ManagedInstanceLastAttemptErrors; + + /** + * Encodes the specified ManagedInstanceLastAttemptErrors message. Does not implicitly {@link google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.verify|verify} messages. + * @param message ManagedInstanceLastAttemptErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.compute.v1.IManagedInstanceLastAttemptErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagedInstanceLastAttemptErrors message, length delimited. Does not implicitly {@link google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.verify|verify} messages. + * @param message ManagedInstanceLastAttemptErrors message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.compute.v1.IManagedInstanceLastAttemptErrors, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagedInstanceLastAttemptErrors message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagedInstanceLastAttemptErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.ManagedInstanceLastAttemptErrors; + + /** + * Decodes a ManagedInstanceLastAttemptErrors message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagedInstanceLastAttemptErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.ManagedInstanceLastAttemptErrors; + + /** + * Verifies a ManagedInstanceLastAttemptErrors message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagedInstanceLastAttemptErrors message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagedInstanceLastAttemptErrors + */ + public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.ManagedInstanceLastAttemptErrors; + + /** + * Creates a plain object from a ManagedInstanceLastAttemptErrors message. Also converts values to other types if specified. + * @param message ManagedInstanceLastAttemptErrors + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.compute.v1.ManagedInstanceLastAttemptErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagedInstanceLastAttemptErrors to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagedInstanceLastAttemptErrors + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ManagedInstancePropertiesFromFlexibilityPolicy. */ interface IManagedInstancePropertiesFromFlexibilityPolicy { diff --git a/packages/google-cloud-compute/protos/protos.js b/packages/google-cloud-compute/protos/protos.js index 41ae0d1aade..e218cd1662d 100644 --- a/packages/google-cloud-compute/protos/protos.js +++ b/packages/google-cloud-compute/protos/protos.js @@ -310437,7 +310437,7 @@ * Properties of a ManagedInstanceLastAttempt. * @memberof google.cloud.compute.v1 * @interface IManagedInstanceLastAttempt - * @property {google.cloud.compute.v1.IErrors|null} [errors] ManagedInstanceLastAttempt errors + * @property {google.cloud.compute.v1.IManagedInstanceLastAttemptErrors|null} [errors] ManagedInstanceLastAttempt errors */ /** @@ -310457,7 +310457,7 @@ /** * ManagedInstanceLastAttempt errors. - * @member {google.cloud.compute.v1.IErrors|null|undefined} errors + * @member {google.cloud.compute.v1.IManagedInstanceLastAttemptErrors|null|undefined} errors * @memberof google.cloud.compute.v1.ManagedInstanceLastAttempt * @instance */ @@ -310502,7 +310502,7 @@ if (!writer) writer = $Writer.create(); if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) - $root.google.cloud.compute.v1.Errors.encode(message.errors, writer.uint32(/* id 315977579, wireType 2 =*/2527820634).fork()).ldelim(); + $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.encode(message.errors, writer.uint32(/* id 315977579, wireType 2 =*/2527820634).fork()).ldelim(); return writer; }; @@ -310538,7 +310538,7 @@ var tag = reader.uint32(); switch (tag >>> 3) { case 315977579: { - message.errors = $root.google.cloud.compute.v1.Errors.decode(reader, reader.uint32()); + message.errors = $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.decode(reader, reader.uint32()); break; } default: @@ -310580,7 +310580,7 @@ if (message.errors != null && message.hasOwnProperty("errors")) { properties._errors = 1; { - var error = $root.google.cloud.compute.v1.Errors.verify(message.errors); + var error = $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.verify(message.errors); if (error) return "errors." + error; } @@ -310603,7 +310603,7 @@ if (object.errors != null) { if (typeof object.errors !== "object") throw TypeError(".google.cloud.compute.v1.ManagedInstanceLastAttempt.errors: object expected"); - message.errors = $root.google.cloud.compute.v1.Errors.fromObject(object.errors); + message.errors = $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.fromObject(object.errors); } return message; }; @@ -310622,7 +310622,7 @@ options = {}; var object = {}; if (message.errors != null && message.hasOwnProperty("errors")) { - object.errors = $root.google.cloud.compute.v1.Errors.toObject(message.errors, options); + object.errors = $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.toObject(message.errors, options); if (options.oneofs) object._errors = "errors"; } @@ -310658,6 +310658,230 @@ return ManagedInstanceLastAttempt; })(); + v1.ManagedInstanceLastAttemptErrors = (function() { + + /** + * Properties of a ManagedInstanceLastAttemptErrors. + * @memberof google.cloud.compute.v1 + * @interface IManagedInstanceLastAttemptErrors + * @property {Array.|null} [errors] ManagedInstanceLastAttemptErrors errors + */ + + /** + * Constructs a new ManagedInstanceLastAttemptErrors. + * @memberof google.cloud.compute.v1 + * @classdesc Represents a ManagedInstanceLastAttemptErrors. + * @implements IManagedInstanceLastAttemptErrors + * @constructor + * @param {google.cloud.compute.v1.IManagedInstanceLastAttemptErrors=} [properties] Properties to set + */ + function ManagedInstanceLastAttemptErrors(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagedInstanceLastAttemptErrors errors. + * @member {Array.} errors + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @instance + */ + ManagedInstanceLastAttemptErrors.prototype.errors = $util.emptyArray; + + /** + * Creates a new ManagedInstanceLastAttemptErrors instance using the specified properties. + * @function create + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {google.cloud.compute.v1.IManagedInstanceLastAttemptErrors=} [properties] Properties to set + * @returns {google.cloud.compute.v1.ManagedInstanceLastAttemptErrors} ManagedInstanceLastAttemptErrors instance + */ + ManagedInstanceLastAttemptErrors.create = function create(properties) { + return new ManagedInstanceLastAttemptErrors(properties); + }; + + /** + * Encodes the specified ManagedInstanceLastAttemptErrors message. Does not implicitly {@link google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.verify|verify} messages. + * @function encode + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {google.cloud.compute.v1.IManagedInstanceLastAttemptErrors} message ManagedInstanceLastAttemptErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedInstanceLastAttemptErrors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.compute.v1.Errors.encode(message.errors[i], writer.uint32(/* id 315977579, wireType 2 =*/2527820634).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ManagedInstanceLastAttemptErrors message, length delimited. Does not implicitly {@link google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {google.cloud.compute.v1.IManagedInstanceLastAttemptErrors} message ManagedInstanceLastAttemptErrors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedInstanceLastAttemptErrors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagedInstanceLastAttemptErrors message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.compute.v1.ManagedInstanceLastAttemptErrors} ManagedInstanceLastAttemptErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedInstanceLastAttemptErrors.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 315977579: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.compute.v1.Errors.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagedInstanceLastAttemptErrors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.compute.v1.ManagedInstanceLastAttemptErrors} ManagedInstanceLastAttemptErrors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedInstanceLastAttemptErrors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagedInstanceLastAttemptErrors message. + * @function verify + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagedInstanceLastAttemptErrors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.compute.v1.Errors.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates a ManagedInstanceLastAttemptErrors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.compute.v1.ManagedInstanceLastAttemptErrors} ManagedInstanceLastAttemptErrors + */ + ManagedInstanceLastAttemptErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors) + return object; + var message = new $root.google.cloud.compute.v1.ManagedInstanceLastAttemptErrors(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.compute.v1.ManagedInstanceLastAttemptErrors.errors: object expected"); + message.errors[i] = $root.google.cloud.compute.v1.Errors.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ManagedInstanceLastAttemptErrors message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {google.cloud.compute.v1.ManagedInstanceLastAttemptErrors} message ManagedInstanceLastAttemptErrors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagedInstanceLastAttemptErrors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.compute.v1.Errors.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this ManagedInstanceLastAttemptErrors to JSON. + * @function toJSON + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @instance + * @returns {Object.} JSON object + */ + ManagedInstanceLastAttemptErrors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagedInstanceLastAttemptErrors + * @function getTypeUrl + * @memberof google.cloud.compute.v1.ManagedInstanceLastAttemptErrors + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagedInstanceLastAttemptErrors.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.compute.v1.ManagedInstanceLastAttemptErrors"; + }; + + return ManagedInstanceLastAttemptErrors; + })(); + v1.ManagedInstancePropertiesFromFlexibilityPolicy = (function() { /** diff --git a/packages/google-cloud-compute/protos/protos.json b/packages/google-cloud-compute/protos/protos.json index e71defd2165..838acce3e20 100644 --- a/packages/google-cloud-compute/protos/protos.json +++ b/packages/google-cloud-compute/protos/protos.json @@ -48971,7 +48971,7 @@ }, "fields": { "errors": { - "type": "Errors", + "type": "ManagedInstanceLastAttemptErrors", "id": 315977579, "options": { "proto3_optional": true @@ -48979,6 +48979,15 @@ } } }, + "ManagedInstanceLastAttemptErrors": { + "fields": { + "errors": { + "rule": "repeated", + "type": "Errors", + "id": 315977579 + } + } + }, "ManagedInstancePropertiesFromFlexibilityPolicy": { "oneofs": { "_machineType": { diff --git a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json index aecfdd6192c..042922679ff 100644 --- a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json +++ b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "4.12.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json index 631e9a84940..3cca2ee37e7 100644 --- a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json +++ b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "4.12.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json index 1a657447b41..317c60bab8b 100644 --- a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json +++ b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "4.12.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json index 1a657447b41..317c60bab8b 100644 --- a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json +++ b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "4.12.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { From 96b5dadce0e616ba47caf996d7c49a0bc969105e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 19:00:09 -0700 Subject: [PATCH 16/34] docs: [orchestration] A comment for field `connection_type` in message `.google.cloud.orchestration.airflow.service.v1.NetworkingConfig` is changed (#6179) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: A comment for field `connection_type` in message `.google.cloud.orchestration.airflow.service.v1.NetworkingConfig` is changed PiperOrigin-RevId: 738128429 Source-Link: https://github.com/googleapis/googleapis/commit/1ce903753d854c9ee210dc7e5ac2322d8df7a270 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e5617baf236c4f146a40ec572f5945f49917e63b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yY2hlc3RyYXRpb24tYWlyZmxvdy1zZXJ2aWNlLy5Pd2xCb3QueWFtbCIsImgiOiJlNTYxN2JhZjIzNmM0ZjE0NmE0MGVjNTcyZjU5NDVmNDk5MTdlNjNiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../cloud/orchestration/airflow/service/v1/environments.proto | 2 +- ..._metadata.google.cloud.orchestration.airflow.service.v1.json | 2 +- ..._metadata_google.cloud.orchestration.airflow.service.v1.json | 2 +- ...data.google.cloud.orchestration.airflow.service.v1beta1.json | 2 +- ...data_google.cloud.orchestration.airflow.service.v1beta1.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto index ff0e4aacf39..80cc3a9f47f 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto @@ -1645,7 +1645,7 @@ message NetworkingConfig { PRIVATE_SERVICE_CONNECT = 2; } - // Optional. Indicates the user requested specifc connection type between + // Optional. Indicates the user requested specific connection type between // Tenant and Customer projects. You cannot set networking connection type in // public IP environment. ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index a152d6db560..e1abf09e73e 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json index 4d2531571eb..e60fcf8e939 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index 7bba3d1e1d6..577314d0058 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json index 26521caf35b..94c793f440a 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { From f0f3e3a7956143160cb36d8cba96e669c76e3c2e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 19:00:30 -0700 Subject: [PATCH 17/34] feat: [documentai] Added config options to enable LLM layout parsing (#6180) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added config options to enable LLM layout parsing PiperOrigin-RevId: 738162282 Source-Link: https://github.com/googleapis/googleapis/commit/9b90b04146c2def3ea16715e3ef99e719ca66f9c Source-Link: https://github.com/googleapis/googleapis-gen/commit/69946fcc008af51dd1ea2d01405042837cf3a61d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjY5OTQ2ZmNjMDA4YWY1MWRkMWVhMmQwMTQwNTA0MjgzN2NmM2E2MWQifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../v1beta3/document_processor_service.proto | 10 +++ .../protos/protos.d.ts | 18 +++++ .../google-cloud-documentai/protos/protos.js | 72 ++++++++++++++++++- .../protos/protos.json | 21 ++++++ ...t_metadata.google.cloud.documentai.v1.json | 2 +- ...t_metadata_google.cloud.documentai.v1.json | 2 +- ...adata.google.cloud.documentai.v1beta1.json | 2 +- ...adata_google.cloud.documentai.v1beta1.json | 2 +- ...adata.google.cloud.documentai.v1beta2.json | 2 +- ...adata_google.cloud.documentai.v1beta2.json | 2 +- ...adata.google.cloud.documentai.v1beta3.json | 2 +- ...adata_google.cloud.documentai.v1beta3.json | 2 +- 12 files changed, 128 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto index d27ba16ba4d..0b9dd1f4105 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_processor_service.proto @@ -372,6 +372,16 @@ message ProcessOptions { // Optional. Config for chunking in layout parser processor. ChunkingConfig chunking_config = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to include images in layout parser processor response. + bool return_images = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to include bounding boxes in layout parser processor + // response. + bool return_bounding_boxes = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to refine PDF layout using LLM. + bool enable_llm_layout_parsing = 5 [(google.api.field_behavior) = OPTIONAL]; } // A list of individual page numbers. diff --git a/packages/google-cloud-documentai/protos/protos.d.ts b/packages/google-cloud-documentai/protos/protos.d.ts index 2b00a47314c..df42c92300b 100644 --- a/packages/google-cloud-documentai/protos/protos.d.ts +++ b/packages/google-cloud-documentai/protos/protos.d.ts @@ -38572,6 +38572,15 @@ export namespace google { /** LayoutConfig chunkingConfig */ chunkingConfig?: (google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.IChunkingConfig|null); + + /** LayoutConfig returnImages */ + returnImages?: (boolean|null); + + /** LayoutConfig returnBoundingBoxes */ + returnBoundingBoxes?: (boolean|null); + + /** LayoutConfig enableLlmLayoutParsing */ + enableLlmLayoutParsing?: (boolean|null); } /** Represents a LayoutConfig. */ @@ -38586,6 +38595,15 @@ export namespace google { /** LayoutConfig chunkingConfig. */ public chunkingConfig?: (google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.IChunkingConfig|null); + /** LayoutConfig returnImages. */ + public returnImages: boolean; + + /** LayoutConfig returnBoundingBoxes. */ + public returnBoundingBoxes: boolean; + + /** LayoutConfig enableLlmLayoutParsing. */ + public enableLlmLayoutParsing: boolean; + /** * Creates a new LayoutConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-documentai/protos/protos.js b/packages/google-cloud-documentai/protos/protos.js index 7d21ce4bc9f..74afcd6cde0 100644 --- a/packages/google-cloud-documentai/protos/protos.js +++ b/packages/google-cloud-documentai/protos/protos.js @@ -96368,6 +96368,9 @@ * @memberof google.cloud.documentai.v1beta3.ProcessOptions * @interface ILayoutConfig * @property {google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.IChunkingConfig|null} [chunkingConfig] LayoutConfig chunkingConfig + * @property {boolean|null} [returnImages] LayoutConfig returnImages + * @property {boolean|null} [returnBoundingBoxes] LayoutConfig returnBoundingBoxes + * @property {boolean|null} [enableLlmLayoutParsing] LayoutConfig enableLlmLayoutParsing */ /** @@ -96393,6 +96396,30 @@ */ LayoutConfig.prototype.chunkingConfig = null; + /** + * LayoutConfig returnImages. + * @member {boolean} returnImages + * @memberof google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + * @instance + */ + LayoutConfig.prototype.returnImages = false; + + /** + * LayoutConfig returnBoundingBoxes. + * @member {boolean} returnBoundingBoxes + * @memberof google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + * @instance + */ + LayoutConfig.prototype.returnBoundingBoxes = false; + + /** + * LayoutConfig enableLlmLayoutParsing. + * @member {boolean} enableLlmLayoutParsing + * @memberof google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig + * @instance + */ + LayoutConfig.prototype.enableLlmLayoutParsing = false; + /** * Creates a new LayoutConfig instance using the specified properties. * @function create @@ -96419,6 +96446,12 @@ writer = $Writer.create(); if (message.chunkingConfig != null && Object.hasOwnProperty.call(message, "chunkingConfig")) $root.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.encode(message.chunkingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.returnImages != null && Object.hasOwnProperty.call(message, "returnImages")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.returnImages); + if (message.returnBoundingBoxes != null && Object.hasOwnProperty.call(message, "returnBoundingBoxes")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.returnBoundingBoxes); + if (message.enableLlmLayoutParsing != null && Object.hasOwnProperty.call(message, "enableLlmLayoutParsing")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableLlmLayoutParsing); return writer; }; @@ -96457,6 +96490,18 @@ message.chunkingConfig = $root.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.decode(reader, reader.uint32()); break; } + case 2: { + message.returnImages = reader.bool(); + break; + } + case 3: { + message.returnBoundingBoxes = reader.bool(); + break; + } + case 5: { + message.enableLlmLayoutParsing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -96497,6 +96542,15 @@ if (error) return "chunkingConfig." + error; } + if (message.returnImages != null && message.hasOwnProperty("returnImages")) + if (typeof message.returnImages !== "boolean") + return "returnImages: boolean expected"; + if (message.returnBoundingBoxes != null && message.hasOwnProperty("returnBoundingBoxes")) + if (typeof message.returnBoundingBoxes !== "boolean") + return "returnBoundingBoxes: boolean expected"; + if (message.enableLlmLayoutParsing != null && message.hasOwnProperty("enableLlmLayoutParsing")) + if (typeof message.enableLlmLayoutParsing !== "boolean") + return "enableLlmLayoutParsing: boolean expected"; return null; }; @@ -96517,6 +96571,12 @@ throw TypeError(".google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.chunkingConfig: object expected"); message.chunkingConfig = $root.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.fromObject(object.chunkingConfig); } + if (object.returnImages != null) + message.returnImages = Boolean(object.returnImages); + if (object.returnBoundingBoxes != null) + message.returnBoundingBoxes = Boolean(object.returnBoundingBoxes); + if (object.enableLlmLayoutParsing != null) + message.enableLlmLayoutParsing = Boolean(object.enableLlmLayoutParsing); return message; }; @@ -96533,10 +96593,20 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.chunkingConfig = null; + object.returnImages = false; + object.returnBoundingBoxes = false; + object.enableLlmLayoutParsing = false; + } if (message.chunkingConfig != null && message.hasOwnProperty("chunkingConfig")) object.chunkingConfig = $root.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.toObject(message.chunkingConfig, options); + if (message.returnImages != null && message.hasOwnProperty("returnImages")) + object.returnImages = message.returnImages; + if (message.returnBoundingBoxes != null && message.hasOwnProperty("returnBoundingBoxes")) + object.returnBoundingBoxes = message.returnBoundingBoxes; + if (message.enableLlmLayoutParsing != null && message.hasOwnProperty("enableLlmLayoutParsing")) + object.enableLlmLayoutParsing = message.enableLlmLayoutParsing; return object; }; diff --git a/packages/google-cloud-documentai/protos/protos.json b/packages/google-cloud-documentai/protos/protos.json index 2f6ef4517cb..f3fa40c4880 100644 --- a/packages/google-cloud-documentai/protos/protos.json +++ b/packages/google-cloud-documentai/protos/protos.json @@ -8609,6 +8609,27 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "returnImages": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "returnBoundingBoxes": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enableLlmLayoutParsing": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json index 7e1bcc5d203..844d5d3c78b 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json index 96eaacda17c..0d9ef9c3f07 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json index d2a2ca09f3f..5bd1a7f37b6 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json index d2a2ca09f3f..5bd1a7f37b6 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json index 7a66f17560b..8ed3beaf462 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json index 7a66f17560b..8ed3beaf462 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json index 0a8a53ddfda..16e88fd1514 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json index ff60f935582..5d3df649b0d 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.12.0", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { From 73110e21283ed2e54ae2ae721497a98caa9b8df0 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 19 Mar 2025 03:29:26 +0100 Subject: [PATCH 18/34] fix(deps): update dependency proto3-json-serializer to v3 (#6131) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-speech/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-speech/samples/package.json b/packages/google-cloud-speech/samples/package.json index 7a47afd33fb..1a0a8422723 100644 --- a/packages/google-cloud-speech/samples/package.json +++ b/packages/google-cloud-speech/samples/package.json @@ -21,7 +21,7 @@ "fs.promises": "^0.1.2", "google-proto-files": "^4.0.0", "node-record-lpcm16": "^1.0.1", - "proto3-json-serializer": "^2.0.0", + "proto3-json-serializer": "^3.0.0", "protobufjs": "^7.0.0", "sox": "^0.1.0", "yargs": "^17.0.0" From 1135b8610b2471249dc3aec47eb0f985ded13f93 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 19 Mar 2025 03:49:42 +0100 Subject: [PATCH 19/34] fix(deps): update dependency @google-cloud/promisify to v5 (#6150) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-dns/package.json | 2 +- packages/google-cloud-vision/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-dns/package.json b/packages/google-cloud-dns/package.json index 0097e895a49..353ad1d7a9f 100644 --- a/packages/google-cloud-dns/package.json +++ b/packages/google-cloud-dns/package.json @@ -50,7 +50,7 @@ "dependencies": { "@google-cloud/common": "^6.0.0", "@google-cloud/paginator": "^6.0.0", - "@google-cloud/promisify": "^4.0.0", + "@google-cloud/promisify": "^5.0.0", "arrify": "^2.0.0", "dns-zonefile": "0.2.10", "lodash.groupby": "^4.6.0", diff --git a/packages/google-cloud-vision/package.json b/packages/google-cloud-vision/package.json index 3f4a076ab27..5663d9fa725 100644 --- a/packages/google-cloud-vision/package.json +++ b/packages/google-cloud-vision/package.json @@ -49,7 +49,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "@google-cloud/promisify": "^4.0.0", + "@google-cloud/promisify": "^5.0.0", "google-gax": "^5.0.0-rc.0", "is": "^3.3.0" }, From b3b30b8483e222116f488ed313c02901601b75f3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 19 Mar 2025 04:27:00 +0100 Subject: [PATCH 20/34] fix(deps): update dependency @google-cloud/compute to v5 (#6171) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-asset/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-asset/samples/package.json b/packages/google-cloud-asset/samples/package.json index 5fff0e8717d..5085851531a 100644 --- a/packages/google-cloud-asset/samples/package.json +++ b/packages/google-cloud-asset/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/asset": "^6.0.0", "@google-cloud/bigquery": "^7.0.0", - "@google-cloud/compute": "^4.0.0", + "@google-cloud/compute": "^5.0.0", "@google-cloud/storage": "^7.0.0", "uuid": "^9.0.0", "yargs": "^17.0.0" From 9cc054d8ede1cdc66a1c5f751efaa9528f6fe906 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 18 Mar 2025 20:29:13 -0700 Subject: [PATCH 21/34] docs: update the list of available APIs (#6181) --- README.md | 1 + libraries.json | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index 2c83a665315..30fbf758177 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ applications that interact with individual Google Cloud services: | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-quota) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/quota)](https://npm.im/@google-shopping/quota) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-reports) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/reports)](https://npm.im/@google-shopping/reports) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-reviews) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/reviews)](https://npm.im/@google-shopping/reviews) | +| [Model Armor API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-modelarmor) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/modelarmor)](https://npm.im/@google-cloud/modelarmor) | | [Oracle Database@Google Cloud API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-oracledatabase) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/oracledatabase)](https://npm.im/@google-cloud/oracledatabase) | | [Parallelstore API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-parallelstore) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/parallelstore)](https://npm.im/@google-cloud/parallelstore) | | [Parameter Manager API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-parametermanager) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/parametermanager)](https://npm.im/@google-cloud/parametermanager) | diff --git a/libraries.json b/libraries.json index bc65bf94f9f..3e134d6159b 100644 --- a/libraries.json +++ b/libraries.json @@ -3369,6 +3369,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-reviews", "support_documentation": "https://developers.google.com/merchant/api/docs/getting-support" }, + { + "name": "modelarmor", + "name_pretty": "Model Armor API", + "product_documentation": "https://cloud.google.com/security-command-center/docs/model-armor-overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/modelarmor/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/modelarmor", + "api_id": "modelarmor.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "modelarmor", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-modelarmor", + "support_documentation": "https://cloud.google.com/security-command-center/docs/getting-support" + }, { "name": "oracledatabase", "name_pretty": "Oracle Database@Google Cloud API", From f91a34f796895397c51e02f87197b601214d82f9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 19 Mar 2025 04:42:55 +0100 Subject: [PATCH 22/34] fix(deps): update dependency @google-cloud/grafeas to v6 (#6172) Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-devtools-containeranalysis/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-containeranalysis/package.json b/packages/google-devtools-containeranalysis/package.json index 731a3657eb9..4a20a9c7143 100644 --- a/packages/google-devtools-containeranalysis/package.json +++ b/packages/google-devtools-containeranalysis/package.json @@ -47,7 +47,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "@google-cloud/grafeas": "^5.5.0", + "@google-cloud/grafeas": "^6.0.0", "google-gax": "^5.0.0-rc.0" }, "devDependencies": { From f79da88b29303a18c00e8081434af4859ad91225 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:34:30 -0700 Subject: [PATCH 23/34] feat: [datacatalog] await/catch promises, and update listOperationsAsync return type (#6156) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: mark DataCatalog service deprecated, use Dataplex Catalog instead docs: fix a few typos PiperOrigin-RevId: 736573278 Source-Link: https://github.com/googleapis/googleapis/commit/c18eb9fd055def47dcf2e26ffc06fdb02f9d15c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/352c3e352b89a191aceb2dcf057102ec3ad83936 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFjYXRhbG9nLy5Pd2xCb3QueWFtbCIsImgiOiIzNTJjM2UzNTJiODlhMTkxYWNlYjJkY2YwNTcxMDJlYzNhZDgzOTM2In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFjYXRhbG9nLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * remove tests for deprecated service --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Sofia Leon --- .../cloud/datacatalog/v1/datacatalog.proto | 48 +- .../protos/protos.json | 149 + ..._metadata.google.cloud.datacatalog.v1.json | 2 +- ..._metadata_google.cloud.datacatalog.v1.json | 2 +- ...data.google.cloud.datacatalog.v1beta1.json | 2 +- ...data_google.cloud.datacatalog.v1beta1.json | 2 +- .../src/v1/data_catalog_client.ts | 475 +- .../src/v1/policy_tag_manager_client.ts | 68 +- ...policy_tag_manager_serialization_client.ts | 12 +- .../src/v1beta1/data_catalog_client.ts | 144 +- .../src/v1beta1/policy_tag_manager_client.ts | 68 +- ...policy_tag_manager_serialization_client.ts | 8 +- .../test/gapic_data_catalog_v1.ts | 6638 ----------------- ...pic_policy_tag_manager_serialization_v1.ts | 64 +- ...olicy_tag_manager_serialization_v1beta1.ts | 56 +- .../test/gapic_policy_tag_manager_v1.ts | 156 +- .../test/gapic_policy_tag_manager_v1beta1.ts | 156 +- 17 files changed, 1072 insertions(+), 6978 deletions(-) delete mode 100644 packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts diff --git a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1/datacatalog.proto b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1/datacatalog.proto index a865cad5a75..21be6a0d94c 100644 --- a/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1/datacatalog.proto +++ b/packages/google-cloud-datacatalog/protos/google/cloud/datacatalog/v1/datacatalog.proto @@ -49,9 +49,12 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}" }; +// Deprecated: Please use Dataplex Catalog instead. +// // Data Catalog API service allows you to discover, understand, and manage // your data. service DataCatalog { + option deprecated = true; option (google.api.default_host) = "datacatalog.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; @@ -72,6 +75,7 @@ service DataCatalog { // For more information, see [Data Catalog search syntax] // (https://cloud.google.com/data-catalog/docs/how-to/search-reference). rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { + option deprecated = true; option (google.api.http) = { post: "/v1/catalog:search" body: "*" @@ -107,6 +111,7 @@ service DataCatalog { // the `parent` parameter. For more information, see [Data Catalog resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/entryGroups" body: "entry_group" @@ -116,6 +121,7 @@ service DataCatalog { // Gets an entry group. rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { + option deprecated = true; option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/entryGroups/*}" }; @@ -130,6 +136,7 @@ service DataCatalog { // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { + option deprecated = true; option (google.api.http) = { patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" body: "entry_group" @@ -146,6 +153,7 @@ service DataCatalog { // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { + option deprecated = true; option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" }; @@ -155,6 +163,7 @@ service DataCatalog { // Lists entry groups. rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { + option deprecated = true; option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/entryGroups" }; @@ -173,6 +182,7 @@ service DataCatalog { // // An entry group can have a maximum of 100,000 entries. rpc CreateEntry(CreateEntryRequest) returns (Entry) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" body: "entry" @@ -187,6 +197,7 @@ service DataCatalog { // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { + option deprecated = true; option (google.api.http) = { patch: "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" body: "entry" @@ -206,6 +217,7 @@ service DataCatalog { // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { + option deprecated = true; option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" }; @@ -214,6 +226,7 @@ service DataCatalog { // Gets an entry. rpc GetEntry(GetEntryRequest) returns (Entry) { + option deprecated = true; option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" }; @@ -224,6 +237,7 @@ service DataCatalog { // // The resource name comes from the source Google Cloud Platform service. rpc LookupEntry(LookupEntryRequest) returns (Entry) { + option deprecated = true; option (google.api.http) = { get: "/v1/entries:lookup" }; @@ -235,6 +249,7 @@ service DataCatalog { // To get a list of both custom and automatically created entries, use // [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { + option deprecated = true; option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" }; @@ -247,6 +262,7 @@ service DataCatalog { // To call this method, you must have the `datacatalog.entries.updateOverview` // IAM permission on the corresponding project. rpc ModifyEntryOverview(ModifyEntryOverviewRequest) returns (EntryOverview) { + option deprecated = true; option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview" body: "*" @@ -259,6 +275,7 @@ service DataCatalog { // To call this method, you must have the `datacatalog.entries.updateContacts` // IAM permission on the corresponding project. rpc ModifyEntryContacts(ModifyEntryContactsRequest) returns (Contacts) { + option deprecated = true; option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts" body: "*" @@ -272,6 +289,7 @@ service DataCatalog { // For more information, see [Data Catalog resource project] // (https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/tagTemplates" body: "tag_template" @@ -282,6 +300,7 @@ service DataCatalog { // Gets a tag template. rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { + option deprecated = true; option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/tagTemplates/*}" }; @@ -298,6 +317,7 @@ service DataCatalog { // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { + option deprecated = true; option (google.api.http) = { patch: "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" body: "tag_template" @@ -313,6 +333,7 @@ service DataCatalog { // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { + option deprecated = true; option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}" }; @@ -326,6 +347,7 @@ service DataCatalog { // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields" body: "tag_template_field" @@ -344,6 +366,7 @@ service DataCatalog { // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { + option deprecated = true; option (google.api.http) = { patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" body: "tag_template_field" @@ -360,6 +383,7 @@ service DataCatalog { // (https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { + option deprecated = true; option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" body: "*" @@ -372,6 +396,7 @@ service DataCatalog { // Within a single enum field, enum values must be unique. rpc RenameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest) returns (TagTemplateField) { + option deprecated = true; option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename" body: "*" @@ -387,6 +412,7 @@ service DataCatalog { // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { + option deprecated = true; option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" }; @@ -406,6 +432,7 @@ service DataCatalog { // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) // used to create the tag must be in the same organization. rpc CreateTag(CreateTagRequest) returns (Tag) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" body: "tag" @@ -419,6 +446,7 @@ service DataCatalog { // Updates an existing tag. rpc UpdateTag(UpdateTagRequest) returns (Tag) { + option deprecated = true; option (google.api.http) = { patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" body: "tag" @@ -433,6 +461,7 @@ service DataCatalog { // Deletes a tag. rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { + option deprecated = true; option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" additional_bindings { @@ -446,6 +475,7 @@ service DataCatalog { // The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are // lowercased. rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { + option deprecated = true; option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" additional_bindings { @@ -470,6 +500,7 @@ service DataCatalog { // [google.cloud.datacatalog.v1.ReconcileTagsResponse] message. rpc ReconcileTags(ReconcileTagsRequest) returns (google.longrunning.Operation) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile" body: "*" @@ -483,6 +514,7 @@ service DataCatalog { // Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by // the current user. Starring information is private to each user. rpc StarEntry(StarEntryRequest) returns (StarEntryResponse) { + option deprecated = true; option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star" body: "*" @@ -493,6 +525,7 @@ service DataCatalog { // Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by // the current user. Starring information is private to each user. rpc UnstarEntry(UnstarEntryRequest) returns (UnstarEntryResponse) { + option deprecated = true; option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar" body: "*" @@ -519,6 +552,7 @@ service DataCatalog { // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option deprecated = true; option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" body: "*" @@ -553,6 +587,7 @@ service DataCatalog { // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option deprecated = true; option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" body: "*" @@ -584,6 +619,7 @@ service DataCatalog { // No Google IAM permissions are required to call this method. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option deprecated = true; option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" body: "*" @@ -618,6 +654,7 @@ service DataCatalog { // message. rpc ImportEntries(ImportEntriesRequest) returns (google.longrunning.Operation) { + option deprecated = true; option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import" body: "*" @@ -631,6 +668,7 @@ service DataCatalog { // Sets the configuration related to the migration to Dataplex for an // organization or project. rpc SetConfig(SetConfigRequest) returns (MigrationConfig) { + option deprecated = true; option (google.api.http) = { post: "/v1/{name=organizations/*/locations/*}:setConfig" body: "*" @@ -645,6 +683,7 @@ service DataCatalog { // Dataplex for a specific organization, including all the projects under it // which have a separate configuration set. rpc RetrieveConfig(RetrieveConfigRequest) returns (OrganizationConfig) { + option deprecated = true; option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*}:retrieveConfig" }; @@ -657,6 +696,7 @@ service DataCatalog { // resource itself. rpc RetrieveEffectiveConfig(RetrieveEffectiveConfigRequest) returns (MigrationConfig) { + option deprecated = true; option (google.api.http) = { get: "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig" additional_bindings { @@ -1325,7 +1365,7 @@ message DatabaseTableSpec { DataplexTableSpec dataplex_table = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Spec what aplies to tables that are actually views. + // Spec what applies to tables that are actually views. // Not set for "real" tables. DatabaseViewSpec database_view_spec = 3; } @@ -1651,7 +1691,7 @@ message ModelSpec { // Detail description of the source information of a Vertex Feature Online // Store. message FeatureOnlineStoreSpec { - // Type of underlaying storage type. + // Type of underlying storage type. enum StorageType { // Should not be used. STORAGE_TYPE_UNSPECIFIED = 0; @@ -1659,11 +1699,11 @@ message FeatureOnlineStoreSpec { // Underlsying storgae is Bigtable. BIGTABLE = 1; - // Underlaying is optimized online server (Lightning). + // Underlying is optimized online server (Lightning). OPTIMIZED = 2; } - // Output only. Type of underelaying storage for the FeatureOnlineStore. + // Output only. Type of underlying storage for the FeatureOnlineStore. StorageType storage_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-datacatalog/protos/protos.json b/packages/google-cloud-datacatalog/protos/protos.json index 99e302624e0..298709483a9 100644 --- a/packages/google-cloud-datacatalog/protos/protos.json +++ b/packages/google-cloud-datacatalog/protos/protos.json @@ -171,6 +171,7 @@ }, "DataCatalog": { "options": { + "deprecated": true, "(google.api.default_host)": "datacatalog.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, @@ -179,11 +180,15 @@ "requestType": "SearchCatalogRequest", "responseType": "SearchCatalogResponse", "options": { + "deprecated": true, "(google.api.http).post": "/v1/catalog:search", "(google.api.http).body": "*", "(google.api.method_signature)": "scope,query" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/catalog:search", @@ -199,11 +204,15 @@ "requestType": "CreateEntryGroupRequest", "responseType": "EntryGroup", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/entryGroups", "(google.api.http).body": "entry_group", "(google.api.method_signature)": "parent,entry_group_id,entry_group" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*}/entryGroups", @@ -219,10 +228,14 @@ "requestType": "GetEntryGroupRequest", "responseType": "EntryGroup", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryGroups/*}", "(google.api.method_signature)": "name,read_mask" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{name=projects/*/locations/*/entryGroups/*}" @@ -240,11 +253,15 @@ "requestType": "UpdateEntryGroupRequest", "responseType": "EntryGroup", "options": { + "deprecated": true, "(google.api.http).patch": "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}", "(google.api.http).body": "entry_group", "(google.api.method_signature)": "entry_group,update_mask" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "patch": "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}", @@ -263,10 +280,14 @@ "requestType": "DeleteEntryGroupRequest", "responseType": "google.protobuf.Empty", "options": { + "deprecated": true, "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "delete": "/v1/{name=projects/*/locations/*/entryGroups/*}" @@ -281,10 +302,14 @@ "requestType": "ListEntryGroupsRequest", "responseType": "ListEntryGroupsResponse", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/entryGroups", "(google.api.method_signature)": "parent" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{parent=projects/*/locations/*}/entryGroups" @@ -299,11 +324,15 @@ "requestType": "CreateEntryRequest", "responseType": "Entry", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", "(google.api.http).body": "entry", "(google.api.method_signature)": "parent,entry_id,entry" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", @@ -319,11 +348,15 @@ "requestType": "UpdateEntryRequest", "responseType": "Entry", "options": { + "deprecated": true, "(google.api.http).patch": "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}", "(google.api.http).body": "entry", "(google.api.method_signature)": "entry,update_mask" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "patch": "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}", @@ -342,10 +375,14 @@ "requestType": "DeleteEntryRequest", "responseType": "google.protobuf.Empty", "options": { + "deprecated": true, "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" @@ -360,10 +397,14 @@ "requestType": "GetEntryRequest", "responseType": "Entry", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" @@ -378,9 +419,13 @@ "requestType": "LookupEntryRequest", "responseType": "Entry", "options": { + "deprecated": true, "(google.api.http).get": "/v1/entries:lookup" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/entries:lookup" @@ -392,10 +437,14 @@ "requestType": "ListEntriesRequest", "responseType": "ListEntriesResponse", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", "(google.api.method_signature)": "parent" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" @@ -410,10 +459,14 @@ "requestType": "ModifyEntryOverviewRequest", "responseType": "EntryOverview", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview", "(google.api.http).body": "*" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview", @@ -426,10 +479,14 @@ "requestType": "ModifyEntryContactsRequest", "responseType": "Contacts", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts", "(google.api.http).body": "*" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts", @@ -442,11 +499,15 @@ "requestType": "CreateTagTemplateRequest", "responseType": "TagTemplate", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/tagTemplates", "(google.api.http).body": "tag_template", "(google.api.method_signature)": "parent,tag_template_id,tag_template" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*}/tagTemplates", @@ -462,10 +523,14 @@ "requestType": "GetTagTemplateRequest", "responseType": "TagTemplate", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{name=projects/*/locations/*/tagTemplates/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{name=projects/*/locations/*/tagTemplates/*}" @@ -480,11 +545,15 @@ "requestType": "UpdateTagTemplateRequest", "responseType": "TagTemplate", "options": { + "deprecated": true, "(google.api.http).patch": "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}", "(google.api.http).body": "tag_template", "(google.api.method_signature)": "tag_template,update_mask" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "patch": "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}", @@ -503,10 +572,14 @@ "requestType": "DeleteTagTemplateRequest", "responseType": "google.protobuf.Empty", "options": { + "deprecated": true, "(google.api.http).delete": "/v1/{name=projects/*/locations/*/tagTemplates/*}", "(google.api.method_signature)": "name,force" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "delete": "/v1/{name=projects/*/locations/*/tagTemplates/*}" @@ -521,11 +594,15 @@ "requestType": "CreateTagTemplateFieldRequest", "responseType": "TagTemplateField", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields", "(google.api.http).body": "tag_template_field", "(google.api.method_signature)": "parent,tag_template_field_id,tag_template_field" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields", @@ -541,11 +618,15 @@ "requestType": "UpdateTagTemplateFieldRequest", "responseType": "TagTemplateField", "options": { + "deprecated": true, "(google.api.http).patch": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", "(google.api.http).body": "tag_template_field", "(google.api.method_signature)": "name,tag_template_field,update_mask" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "patch": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", @@ -564,11 +645,15 @@ "requestType": "RenameTagTemplateFieldRequest", "responseType": "TagTemplateField", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename", "(google.api.http).body": "*", "(google.api.method_signature)": "name,new_tag_template_field_id" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename", @@ -584,11 +669,15 @@ "requestType": "RenameTagTemplateFieldEnumValueRequest", "responseType": "TagTemplateField", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename", "(google.api.http).body": "*", "(google.api.method_signature)": "name,new_enum_value_display_name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename", @@ -604,10 +693,14 @@ "requestType": "DeleteTagTemplateFieldRequest", "responseType": "google.protobuf.Empty", "options": { + "deprecated": true, "(google.api.http).delete": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", "(google.api.method_signature)": "name,force" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "delete": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" @@ -622,6 +715,7 @@ "requestType": "CreateTagRequest", "responseType": "Tag", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", "(google.api.http).body": "tag", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags", @@ -629,6 +723,9 @@ "(google.api.method_signature)": "parent,tag" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", @@ -648,6 +745,7 @@ "requestType": "UpdateTagRequest", "responseType": "Tag", "options": { + "deprecated": true, "(google.api.http).patch": "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", "(google.api.http).body": "tag", "(google.api.http).additional_bindings.patch": "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}", @@ -655,6 +753,9 @@ "(google.api.method_signature)": "tag,update_mask" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "patch": "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", @@ -677,11 +778,15 @@ "requestType": "DeleteTagRequest", "responseType": "google.protobuf.Empty", "options": { + "deprecated": true, "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", @@ -699,11 +804,15 @@ "requestType": "ListTagsRequest", "responseType": "ListTagsResponse", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags", "(google.api.method_signature)": "parent" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", @@ -721,12 +830,16 @@ "requestType": "ReconcileTagsRequest", "responseType": "google.longrunning.Operation", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile", "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "ReconcileTagsResponse", "(google.longrunning.operation_info).metadata_type": "ReconcileTagsMetadata" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags:reconcile", @@ -745,11 +858,15 @@ "requestType": "StarEntryRequest", "responseType": "StarEntryResponse", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star", "(google.api.http).body": "*", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star", @@ -765,11 +882,15 @@ "requestType": "UnstarEntryRequest", "responseType": "UnstarEntryResponse", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar", "(google.api.http).body": "*", "(google.api.method_signature)": "name" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar", @@ -785,6 +906,7 @@ "requestType": "google.iam.v1.SetIamPolicyRequest", "responseType": "google.iam.v1.Policy", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy", @@ -792,6 +914,9 @@ "(google.api.method_signature)": "resource,policy" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy", @@ -811,6 +936,7 @@ "requestType": "google.iam.v1.GetIamPolicyRequest", "responseType": "google.iam.v1.Policy", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy", @@ -818,6 +944,9 @@ "(google.api.method_signature)": "resource" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy", @@ -843,12 +972,16 @@ "requestType": "google.iam.v1.TestIamPermissionsRequest", "responseType": "google.iam.v1.TestIamPermissionsResponse", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions", "(google.api.http).additional_bindings.body": "*" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions", @@ -871,12 +1004,16 @@ "requestType": "ImportEntriesRequest", "responseType": "google.longrunning.Operation", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import", "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "ImportEntriesResponse", "(google.longrunning.operation_info).metadata_type": "ImportEntriesMetadata" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:import", @@ -895,12 +1032,16 @@ "requestType": "SetConfigRequest", "responseType": "MigrationConfig", "options": { + "deprecated": true, "(google.api.http).post": "/v1/{name=organizations/*/locations/*}:setConfig", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*}:setConfig", "(google.api.http).additional_bindings.body": "*" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "post": "/v1/{name=organizations/*/locations/*}:setConfig", @@ -917,9 +1058,13 @@ "requestType": "RetrieveConfigRequest", "responseType": "OrganizationConfig", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{name=organizations/*/locations/*}:retrieveConfig" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{name=organizations/*/locations/*}:retrieveConfig" @@ -931,10 +1076,14 @@ "requestType": "RetrieveEffectiveConfigRequest", "responseType": "MigrationConfig", "options": { + "deprecated": true, "(google.api.http).get": "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig", "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*}:retrieveEffectiveConfig" }, "parsedOptions": [ + { + "deprecated": true + }, { "(google.api.http)": { "get": "/v1/{name=organizations/*/locations/*}:retrieveEffectiveConfig", diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json index a85cfee661e..d00e8e56cbb 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "4.7.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json index 3baa9deb60c..0c4c4bacfc5 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "4.7.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json index eee22ed363e..12282db3d56 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "4.7.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json index 63b7ea862cf..5f035a95656 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "4.7.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts b/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts index ba4ca8f5e05..35e4b856657 100644 --- a/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts +++ b/packages/google-cloud-datacatalog/src/v1/data_catalog_client.ts @@ -42,10 +42,13 @@ import * as gapicConfig from './data_catalog_client_config.json'; const version = require('../../../package.json').version; /** + * Deprecated: Please use Dataplex Catalog instead. + * * Data Catalog API service allows you to discover, understand, and manage * your data. * @class * @memberof v1 + * @deprecated DataCatalog is deprecated and may be removed in a future version. */ export class DataCatalogClient { private _terminated = false; @@ -350,6 +353,11 @@ export class DataCatalogClient { initialize() { // If the client stub promise is already initialized, return immediately. if (this.dataCatalogStub) { + this.warn( + 'DEP$DataCatalog', + 'DataCatalog is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.dataCatalogStub; } @@ -435,6 +443,11 @@ export class DataCatalogClient { this.innerApiCalls[methodName] = apiCall; } + this.warn( + 'DEP$DataCatalog', + 'DataCatalog is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); return this.dataCatalogStub; } @@ -576,6 +589,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.create_entry_group.js * region_tag:datacatalog_v1_generated_DataCatalog_CreateEntryGroup_async + * @deprecated CreateEntryGroup is deprecated and may be removed in a future version. */ createEntryGroup( request?: protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest, @@ -648,7 +662,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$CreateEntryGroup', + 'CreateEntryGroup is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('createEntryGroup request %j', request); const wrappedCallback: | Callback< @@ -697,6 +718,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.get_entry_group.js * region_tag:datacatalog_v1_generated_DataCatalog_GetEntryGroup_async + * @deprecated GetEntryGroup is deprecated and may be removed in a future version. */ getEntryGroup( request?: protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest, @@ -769,7 +791,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$GetEntryGroup', + 'GetEntryGroup is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('getEntryGroup request %j', request); const wrappedCallback: | Callback< @@ -824,6 +853,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.update_entry_group.js * region_tag:datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_async + * @deprecated UpdateEntryGroup is deprecated and may be removed in a future version. */ updateEntryGroup( request?: protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, @@ -896,7 +926,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'entry_group.name': request.entryGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$UpdateEntryGroup', + 'UpdateEntryGroup is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('updateEntryGroup request %j', request); const wrappedCallback: | Callback< @@ -950,6 +987,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.delete_entry_group.js * region_tag:datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_async + * @deprecated DeleteEntryGroup is deprecated and may be removed in a future version. */ deleteEntryGroup( request?: protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, @@ -1022,7 +1060,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$DeleteEntryGroup', + 'DeleteEntryGroup is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('deleteEntryGroup request %j', request); const wrappedCallback: | Callback< @@ -1090,6 +1135,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.create_entry.js * region_tag:datacatalog_v1_generated_DataCatalog_CreateEntry_async + * @deprecated CreateEntry is deprecated and may be removed in a future version. */ createEntry( request?: protos.google.cloud.datacatalog.v1.ICreateEntryRequest, @@ -1156,7 +1202,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$CreateEntry', + 'CreateEntry is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('createEntry request %j', request); const wrappedCallback: | Callback< @@ -1235,6 +1288,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.update_entry.js * region_tag:datacatalog_v1_generated_DataCatalog_UpdateEntry_async + * @deprecated UpdateEntry is deprecated and may be removed in a future version. */ updateEntry( request?: protos.google.cloud.datacatalog.v1.IUpdateEntryRequest, @@ -1301,7 +1355,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'entry.name': request.entry!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$UpdateEntry', + 'UpdateEntry is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('updateEntry request %j', request); const wrappedCallback: | Callback< @@ -1354,6 +1415,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.delete_entry.js * region_tag:datacatalog_v1_generated_DataCatalog_DeleteEntry_async + * @deprecated DeleteEntry is deprecated and may be removed in a future version. */ deleteEntry( request?: protos.google.cloud.datacatalog.v1.IDeleteEntryRequest, @@ -1420,7 +1482,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$DeleteEntry', + 'DeleteEntry is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('deleteEntry request %j', request); const wrappedCallback: | Callback< @@ -1464,6 +1533,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.get_entry.js * region_tag:datacatalog_v1_generated_DataCatalog_GetEntry_async + * @deprecated GetEntry is deprecated and may be removed in a future version. */ getEntry( request?: protos.google.cloud.datacatalog.v1.IGetEntryRequest, @@ -1530,7 +1600,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$GetEntry', + 'GetEntry is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('getEntry request %j', request); const wrappedCallback: | Callback< @@ -1623,6 +1700,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.lookup_entry.js * region_tag:datacatalog_v1_generated_DataCatalog_LookupEntry_async + * @deprecated LookupEntry is deprecated and may be removed in a future version. */ lookupEntry( request?: protos.google.cloud.datacatalog.v1.ILookupEntryRequest, @@ -1685,7 +1763,14 @@ export class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$LookupEntry', + 'LookupEntry is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('lookupEntry request %j', request); const wrappedCallback: | Callback< @@ -1735,6 +1820,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.modify_entry_overview.js * region_tag:datacatalog_v1_generated_DataCatalog_ModifyEntryOverview_async + * @deprecated ModifyEntryOverview is deprecated and may be removed in a future version. */ modifyEntryOverview( request?: protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, @@ -1813,7 +1899,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ModifyEntryOverview', + 'ModifyEntryOverview is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('modifyEntryOverview request %j', request); const wrappedCallback: | Callback< @@ -1866,6 +1959,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.modify_entry_contacts.js * region_tag:datacatalog_v1_generated_DataCatalog_ModifyEntryContacts_async + * @deprecated ModifyEntryContacts is deprecated and may be removed in a future version. */ modifyEntryContacts( request?: protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest, @@ -1944,7 +2038,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ModifyEntryContacts', + 'ModifyEntryContacts is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('modifyEntryContacts request %j', request); const wrappedCallback: | Callback< @@ -2005,6 +2106,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.create_tag_template.js * region_tag:datacatalog_v1_generated_DataCatalog_CreateTagTemplate_async + * @deprecated CreateTagTemplate is deprecated and may be removed in a future version. */ createTagTemplate( request?: protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest, @@ -2077,7 +2179,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$CreateTagTemplate', + 'CreateTagTemplate is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('createTagTemplate request %j', request); const wrappedCallback: | Callback< @@ -2124,6 +2233,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.get_tag_template.js * region_tag:datacatalog_v1_generated_DataCatalog_GetTagTemplate_async + * @deprecated GetTagTemplate is deprecated and may be removed in a future version. */ getTagTemplate( request?: protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest, @@ -2196,7 +2306,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$GetTagTemplate', + 'GetTagTemplate is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('getTagTemplate request %j', request); const wrappedCallback: | Callback< @@ -2258,6 +2375,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.update_tag_template.js * region_tag:datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_async + * @deprecated UpdateTagTemplate is deprecated and may be removed in a future version. */ updateTagTemplate( request?: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, @@ -2330,7 +2448,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'tag_template.name': request.tagTemplate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$UpdateTagTemplate', + 'UpdateTagTemplate is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('updateTagTemplate request %j', request); const wrappedCallback: | Callback< @@ -2385,6 +2510,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.delete_tag_template.js * region_tag:datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_async + * @deprecated DeleteTagTemplate is deprecated and may be removed in a future version. */ deleteTagTemplate( request?: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, @@ -2457,7 +2583,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$DeleteTagTemplate', + 'DeleteTagTemplate is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('deleteTagTemplate request %j', request); const wrappedCallback: | Callback< @@ -2520,6 +2653,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.create_tag_template_field.js * region_tag:datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_async + * @deprecated CreateTagTemplateField is deprecated and may be removed in a future version. */ createTagTemplateField( request?: protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, @@ -2598,7 +2732,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$CreateTagTemplateField', + 'CreateTagTemplateField is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('createTagTemplateField request %j', request); const wrappedCallback: | Callback< @@ -2671,6 +2812,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.update_tag_template_field.js * region_tag:datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_async + * @deprecated UpdateTagTemplateField is deprecated and may be removed in a future version. */ updateTagTemplateField( request?: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, @@ -2749,7 +2891,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$UpdateTagTemplateField', + 'UpdateTagTemplateField is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('updateTagTemplateField request %j', request); const wrappedCallback: | Callback< @@ -2803,6 +2952,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.rename_tag_template_field.js * region_tag:datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_async + * @deprecated RenameTagTemplateField is deprecated and may be removed in a future version. */ renameTagTemplateField( request?: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, @@ -2881,7 +3031,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$RenameTagTemplateField', + 'RenameTagTemplateField is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('renameTagTemplateField request %j', request); const wrappedCallback: | Callback< @@ -2933,6 +3090,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js * region_tag:datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async + * @deprecated RenameTagTemplateFieldEnumValue is deprecated and may be removed in a future version. */ renameTagTemplateFieldEnumValue( request?: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, @@ -3011,7 +3169,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$RenameTagTemplateFieldEnumValue', + 'RenameTagTemplateFieldEnumValue is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('renameTagTemplateFieldEnumValue request %j', request); const wrappedCallback: | Callback< @@ -3073,6 +3238,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.delete_tag_template_field.js * region_tag:datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_async + * @deprecated DeleteTagTemplateField is deprecated and may be removed in a future version. */ deleteTagTemplateField( request?: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, @@ -3151,7 +3317,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$DeleteTagTemplateField', + 'DeleteTagTemplateField is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('deleteTagTemplateField request %j', request); const wrappedCallback: | Callback< @@ -3217,6 +3390,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.create_tag.js * region_tag:datacatalog_v1_generated_DataCatalog_CreateTag_async + * @deprecated CreateTag is deprecated and may be removed in a future version. */ createTag( request?: protos.google.cloud.datacatalog.v1.ICreateTagRequest, @@ -3283,7 +3457,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$CreateTag', + 'CreateTag is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('createTag request %j', request); const wrappedCallback: | Callback< @@ -3334,6 +3515,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.update_tag.js * region_tag:datacatalog_v1_generated_DataCatalog_UpdateTag_async + * @deprecated UpdateTag is deprecated and may be removed in a future version. */ updateTag( request?: protos.google.cloud.datacatalog.v1.IUpdateTagRequest, @@ -3400,7 +3582,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'tag.name': request.tag!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$UpdateTag', + 'UpdateTag is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('updateTag request %j', request); const wrappedCallback: | Callback< @@ -3444,6 +3633,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.delete_tag.js * region_tag:datacatalog_v1_generated_DataCatalog_DeleteTag_async + * @deprecated DeleteTag is deprecated and may be removed in a future version. */ deleteTag( request?: protos.google.cloud.datacatalog.v1.IDeleteTagRequest, @@ -3510,7 +3700,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$DeleteTag', + 'DeleteTag is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('deleteTag request %j', request); const wrappedCallback: | Callback< @@ -3555,6 +3752,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.star_entry.js * region_tag:datacatalog_v1_generated_DataCatalog_StarEntry_async + * @deprecated StarEntry is deprecated and may be removed in a future version. */ starEntry( request?: protos.google.cloud.datacatalog.v1.IStarEntryRequest, @@ -3621,7 +3819,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$StarEntry', + 'StarEntry is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('starEntry request %j', request); const wrappedCallback: | Callback< @@ -3666,6 +3871,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.unstar_entry.js * region_tag:datacatalog_v1_generated_DataCatalog_UnstarEntry_async + * @deprecated UnstarEntry is deprecated and may be removed in a future version. */ unstarEntry( request?: protos.google.cloud.datacatalog.v1.IUnstarEntryRequest, @@ -3732,7 +3938,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$UnstarEntry', + 'UnstarEntry is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('unstarEntry request %j', request); const wrappedCallback: | Callback< @@ -3804,6 +4017,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.set_iam_policy.js * region_tag:datacatalog_v1_generated_DataCatalog_SetIamPolicy_async + * @deprecated SetIamPolicy is deprecated and may be removed in a future version. */ setIamPolicy( request?: protos.google.iam.v1.ISetIamPolicyRequest, @@ -3868,7 +4082,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$SetIamPolicy', + 'SetIamPolicy is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -3934,6 +4155,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.get_iam_policy.js * region_tag:datacatalog_v1_generated_DataCatalog_GetIamPolicy_async + * @deprecated GetIamPolicy is deprecated and may be removed in a future version. */ getIamPolicy( request?: protos.google.iam.v1.IGetIamPolicyRequest, @@ -3998,7 +4220,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$GetIamPolicy', + 'GetIamPolicy is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -4059,6 +4288,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.test_iam_permissions.js * region_tag:datacatalog_v1_generated_DataCatalog_TestIamPermissions_async + * @deprecated TestIamPermissions is deprecated and may be removed in a future version. */ testIamPermissions( request?: protos.google.iam.v1.ITestIamPermissionsRequest, @@ -4123,7 +4353,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$TestIamPermissions', + 'TestIamPermissions is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -4170,6 +4407,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.set_config.js * region_tag:datacatalog_v1_generated_DataCatalog_SetConfig_async + * @deprecated SetConfig is deprecated and may be removed in a future version. */ setConfig( request?: protos.google.cloud.datacatalog.v1.ISetConfigRequest, @@ -4236,7 +4474,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$SetConfig', + 'SetConfig is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('setConfig request %j', request); const wrappedCallback: | Callback< @@ -4282,6 +4527,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.retrieve_config.js * region_tag:datacatalog_v1_generated_DataCatalog_RetrieveConfig_async + * @deprecated RetrieveConfig is deprecated and may be removed in a future version. */ retrieveConfig( request?: protos.google.cloud.datacatalog.v1.IRetrieveConfigRequest, @@ -4354,7 +4600,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$RetrieveConfig', + 'RetrieveConfig is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('retrieveConfig request %j', request); const wrappedCallback: | Callback< @@ -4402,6 +4655,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.retrieve_effective_config.js * region_tag:datacatalog_v1_generated_DataCatalog_RetrieveEffectiveConfig_async + * @deprecated RetrieveEffectiveConfig is deprecated and may be removed in a future version. */ retrieveEffectiveConfig( request?: protos.google.cloud.datacatalog.v1.IRetrieveEffectiveConfigRequest, @@ -4480,7 +4734,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$RetrieveEffectiveConfig', + 'RetrieveEffectiveConfig is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('retrieveEffectiveConfig request %j', request); const wrappedCallback: | Callback< @@ -4553,6 +4814,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.reconcile_tags.js * region_tag:datacatalog_v1_generated_DataCatalog_ReconcileTags_async + * @deprecated ReconcileTags is deprecated and may be removed in a future version. */ reconcileTags( request?: protos.google.cloud.datacatalog.v1.IReconcileTagsRequest, @@ -4635,7 +4897,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ReconcileTags', + 'ReconcileTags is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const wrappedCallback: | Callback< LROperation< @@ -4678,6 +4947,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.reconcile_tags.js * region_tag:datacatalog_v1_generated_DataCatalog_ReconcileTags_async + * @deprecated ReconcileTags is deprecated and may be removed in a future version. */ async checkReconcileTagsProgress( name: string @@ -4687,6 +4957,11 @@ export class DataCatalogClient { protos.google.cloud.datacatalog.v1.ReconcileTagsMetadata > > { + this.warn( + 'DEP$DataCatalog-$checkReconcileTagsProgress', + 'checkReconcileTagsProgress is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('reconcileTags long-running'); const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( @@ -4742,6 +5017,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.import_entries.js * region_tag:datacatalog_v1_generated_DataCatalog_ImportEntries_async + * @deprecated ImportEntries is deprecated and may be removed in a future version. */ importEntries( request?: protos.google.cloud.datacatalog.v1.IImportEntriesRequest, @@ -4824,7 +5100,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ImportEntries', + 'ImportEntries is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const wrappedCallback: | Callback< LROperation< @@ -4867,6 +5150,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.import_entries.js * region_tag:datacatalog_v1_generated_DataCatalog_ImportEntries_async + * @deprecated ImportEntries is deprecated and may be removed in a future version. */ async checkImportEntriesProgress( name: string @@ -4876,6 +5160,11 @@ export class DataCatalogClient { protos.google.cloud.datacatalog.v1.ImportEntriesMetadata > > { + this.warn( + 'DEP$DataCatalog-$checkImportEntriesProgress', + 'checkImportEntriesProgress is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('importEntries long-running'); const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( @@ -4979,6 +5268,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated SearchCatalog is deprecated and may be removed in a future version. */ searchCatalog( request?: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, @@ -5047,7 +5337,14 @@ export class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$SearchCatalog', + 'SearchCatalog is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, @@ -5148,6 +5445,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated SearchCatalog is deprecated and may be removed in a future version. */ searchCatalogStream( request?: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, @@ -5159,7 +5457,14 @@ export class DataCatalogClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchCatalog']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$SearchCatalog', + 'SearchCatalog is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('searchCatalog stream %j', request); return this.descriptors.page.searchCatalog.createStream( this.innerApiCalls.searchCatalog as GaxCall, @@ -5242,6 +5547,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.search_catalog.js * region_tag:datacatalog_v1_generated_DataCatalog_SearchCatalog_async + * @deprecated SearchCatalog is deprecated and may be removed in a future version. */ searchCatalogAsync( request?: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, @@ -5253,7 +5559,14 @@ export class DataCatalogClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchCatalog']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$SearchCatalog', + 'SearchCatalog is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('searchCatalog iterate %j', request); return this.descriptors.page.searchCatalog.asyncIterate( this.innerApiCalls['searchCatalog'] as GaxCall, @@ -5289,6 +5602,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated ListEntryGroups is deprecated and may be removed in a future version. */ listEntryGroups( request?: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, @@ -5361,7 +5675,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListEntryGroups', + 'ListEntryGroups is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, @@ -5417,6 +5738,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated ListEntryGroups is deprecated and may be removed in a future version. */ listEntryGroupsStream( request?: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, @@ -5432,7 +5754,14 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntryGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListEntryGroups', + 'ListEntryGroups is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('listEntryGroups stream %j', request); return this.descriptors.page.listEntryGroups.createStream( this.innerApiCalls.listEntryGroups as GaxCall, @@ -5470,6 +5799,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.list_entry_groups.js * region_tag:datacatalog_v1_generated_DataCatalog_ListEntryGroups_async + * @deprecated ListEntryGroups is deprecated and may be removed in a future version. */ listEntryGroupsAsync( request?: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, @@ -5485,7 +5815,14 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntryGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListEntryGroups', + 'ListEntryGroups is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('listEntryGroups iterate %j', request); return this.descriptors.page.listEntryGroups.asyncIterate( this.innerApiCalls['listEntryGroups'] as GaxCall, @@ -5529,6 +5866,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated ListEntries is deprecated and may be removed in a future version. */ listEntries( request?: protos.google.cloud.datacatalog.v1.IListEntriesRequest, @@ -5601,7 +5939,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListEntries', + 'ListEntries is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1.IListEntriesRequest, @@ -5661,6 +6006,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated ListEntries is deprecated and may be removed in a future version. */ listEntriesStream( request?: protos.google.cloud.datacatalog.v1.IListEntriesRequest, @@ -5676,7 +6022,14 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListEntries', + 'ListEntries is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('listEntries stream %j', request); return this.descriptors.page.listEntries.createStream( this.innerApiCalls.listEntries as GaxCall, @@ -5718,6 +6071,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.list_entries.js * region_tag:datacatalog_v1_generated_DataCatalog_ListEntries_async + * @deprecated ListEntries is deprecated and may be removed in a future version. */ listEntriesAsync( request?: protos.google.cloud.datacatalog.v1.IListEntriesRequest, @@ -5733,7 +6087,14 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListEntries', + 'ListEntries is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('listEntries iterate %j', request); return this.descriptors.page.listEntries.asyncIterate( this.innerApiCalls['listEntries'] as GaxCall, @@ -5770,6 +6131,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated ListTags is deprecated and may be removed in a future version. */ listTags( request?: protos.google.cloud.datacatalog.v1.IListTagsRequest, @@ -5836,7 +6198,14 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListTags', + 'ListTags is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1.IListTagsRequest, @@ -5891,6 +6260,7 @@ export class DataCatalogClient { * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. + * @deprecated ListTags is deprecated and may be removed in a future version. */ listTagsStream( request?: protos.google.cloud.datacatalog.v1.IListTagsRequest, @@ -5906,7 +6276,14 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListTags', + 'ListTags is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('listTags stream %j', request); return this.descriptors.page.listTags.createStream( this.innerApiCalls.listTags as GaxCall, @@ -5943,6 +6320,7 @@ export class DataCatalogClient { * for more details and examples. * @example include:samples/generated/v1/data_catalog.list_tags.js * region_tag:datacatalog_v1_generated_DataCatalog_ListTags_async + * @deprecated ListTags is deprecated and may be removed in a future version. */ listTagsAsync( request?: protos.google.cloud.datacatalog.v1.IListTagsRequest, @@ -5958,7 +6336,14 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this.warn( + 'DEP$DataCatalog-$ListTags', + 'ListTags is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); this._log.info('listTags iterate %j', request); return this.descriptors.page.listTags.asyncIterate( this.innerApiCalls['listTags'] as GaxCall, diff --git a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts index beddca1277f..3f6d47c0cef 100644 --- a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts +++ b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_client.ts @@ -517,7 +517,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -637,7 +639,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -761,7 +765,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ 'taxonomy.name': request.taxonomy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -871,7 +877,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -989,7 +997,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1115,7 +1125,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1243,7 +1255,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ 'policy_tag.name': request.policyTag!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1362,7 +1376,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1474,7 +1490,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1592,7 +1610,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1705,7 +1725,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1835,7 +1857,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, @@ -1907,7 +1931,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listTaxonomies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTaxonomies stream %j', request); return this.descriptors.page.listTaxonomies.createStream( this.innerApiCalls.listTaxonomies as GaxCall, @@ -1961,7 +1987,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listTaxonomies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTaxonomies iterate %j', request); return this.descriptors.page.listTaxonomies.asyncIterate( this.innerApiCalls['listTaxonomies'] as GaxCall, @@ -2068,7 +2096,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, @@ -2138,7 +2168,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listPolicyTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyTags stream %j', request); return this.descriptors.page.listPolicyTags.createStream( this.innerApiCalls.listPolicyTags as GaxCall, @@ -2190,7 +2222,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listPolicyTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyTags iterate %j', request); return this.descriptors.page.listPolicyTags.asyncIterate( this.innerApiCalls['listPolicyTags'] as GaxCall, diff --git a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts index d9758d4bbda..02fa6486362 100644 --- a/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts +++ b/packages/google-cloud-datacatalog/src/v1/policy_tag_manager_serialization_client.ts @@ -499,7 +499,9 @@ export class PolicyTagManagerSerializationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('replaceTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -630,7 +632,9 @@ export class PolicyTagManagerSerializationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importTaxonomies request %j', request); const wrappedCallback: | Callback< @@ -760,7 +764,9 @@ export class PolicyTagManagerSerializationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('exportTaxonomies request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts index e42d2f8988b..992f3d51488 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts +++ b/packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts @@ -574,7 +574,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$CreateEntryGroup', 'CreateEntryGroup is deprecated and may be removed in a future version.', @@ -715,7 +717,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'entry_group.name': request.entryGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$UpdateEntryGroup', 'UpdateEntryGroup is deprecated and may be removed in a future version.', @@ -843,7 +847,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$GetEntryGroup', 'GetEntryGroup is deprecated and may be removed in a future version.', @@ -981,7 +987,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$DeleteEntryGroup', 'DeleteEntryGroup is deprecated and may be removed in a future version.', @@ -1123,7 +1131,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$CreateEntry', 'CreateEntry is deprecated and may be removed in a future version.', @@ -1277,7 +1287,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'entry.name': request.entry!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$UpdateEntry', 'UpdateEntry is deprecated and may be removed in a future version.', @@ -1410,7 +1422,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$DeleteEntry', 'DeleteEntry is deprecated and may be removed in a future version.', @@ -1537,7 +1551,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$GetEntry', 'GetEntry is deprecated and may be removed in a future version.', @@ -1678,7 +1694,9 @@ export class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$LookupEntry', 'LookupEntry is deprecated and may be removed in a future version.', @@ -1822,7 +1840,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$CreateTagTemplate', 'CreateTagTemplate is deprecated and may be removed in a future version.', @@ -1955,7 +1975,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$GetTagTemplate', 'GetTagTemplate is deprecated and may be removed in a future version.', @@ -2099,7 +2121,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'tag_template.name': request.tagTemplate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$UpdateTagTemplate', 'UpdateTagTemplate is deprecated and may be removed in a future version.', @@ -2240,7 +2264,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$DeleteTagTemplate', 'DeleteTagTemplate is deprecated and may be removed in a future version.', @@ -2388,7 +2414,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$CreateTagTemplateField', 'CreateTagTemplateField is deprecated and may be removed in a future version.', @@ -2544,7 +2572,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$UpdateTagTemplateField', 'UpdateTagTemplateField is deprecated and may be removed in a future version.', @@ -2684,7 +2714,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$RenameTagTemplateField', 'RenameTagTemplateField is deprecated and may be removed in a future version.', @@ -2822,7 +2854,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$RenameTagTemplateFieldEnumValue', 'RenameTagTemplateFieldEnumValue is deprecated and may be removed in a future version.', @@ -2969,7 +3003,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$DeleteTagTemplateField', 'DeleteTagTemplateField is deprecated and may be removed in a future version.', @@ -3109,7 +3145,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$CreateTag', 'CreateTag is deprecated and may be removed in a future version.', @@ -3240,7 +3278,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ 'tag.name': request.tag!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$UpdateTag', 'UpdateTag is deprecated and may be removed in a future version.', @@ -3364,7 +3404,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$DeleteTag', 'DeleteTag is deprecated and may be removed in a future version.', @@ -3503,7 +3545,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$SetIamPolicy', 'SetIamPolicy is deprecated and may be removed in a future version.', @@ -3634,7 +3678,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$GetIamPolicy', 'GetIamPolicy is deprecated and may be removed in a future version.', @@ -3764,7 +3810,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$TestIamPermissions', 'TestIamPermissions is deprecated and may be removed in a future version.', @@ -3935,7 +3983,9 @@ export class DataCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$SearchCatalog', 'SearchCatalog is deprecated and may be removed in a future version.', @@ -4034,7 +4084,9 @@ export class DataCatalogClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchCatalog']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$SearchCatalog', 'SearchCatalog is deprecated and may be removed in a future version.', @@ -4115,7 +4167,9 @@ export class DataCatalogClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchCatalog']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$SearchCatalog', 'SearchCatalog is deprecated and may be removed in a future version.', @@ -4228,7 +4282,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListEntryGroups', 'ListEntryGroups is deprecated and may be removed in a future version.', @@ -4304,7 +4360,9 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntryGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListEntryGroups', 'ListEntryGroups is deprecated and may be removed in a future version.', @@ -4362,7 +4420,9 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntryGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListEntryGroups', 'ListEntryGroups is deprecated and may be removed in a future version.', @@ -4480,7 +4540,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListEntries', 'ListEntries is deprecated and may be removed in a future version.', @@ -4561,7 +4623,9 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListEntries', 'ListEntries is deprecated and may be removed in a future version.', @@ -4624,7 +4688,9 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListEntries', 'ListEntries is deprecated and may be removed in a future version.', @@ -4742,7 +4808,9 @@ export class DataCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListTags', 'ListTags is deprecated and may be removed in a future version.', @@ -4821,7 +4889,9 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListTags', 'ListTags is deprecated and may be removed in a future version.', @@ -4882,7 +4952,9 @@ export class DataCatalogClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataCatalog-$ListTags', 'ListTags is deprecated and may be removed in a future version.', diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts index e4b8326cb03..5222c663375 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_client.ts @@ -518,7 +518,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -645,7 +647,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -776,7 +780,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ 'taxonomy.name': request.taxonomy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -895,7 +901,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTaxonomy request %j', request); const wrappedCallback: | Callback< @@ -1022,7 +1030,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1148,7 +1158,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1282,7 +1294,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ 'policy_tag.name': request.policyTag!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1401,7 +1415,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicyTag request %j', request); const wrappedCallback: | Callback< @@ -1516,7 +1532,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1634,7 +1652,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1747,7 +1767,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1875,7 +1897,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, @@ -1945,7 +1969,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listTaxonomies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTaxonomies stream %j', request); return this.descriptors.page.listTaxonomies.createStream( this.innerApiCalls.listTaxonomies as GaxCall, @@ -1997,7 +2023,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listTaxonomies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTaxonomies iterate %j', request); return this.descriptors.page.listTaxonomies.asyncIterate( this.innerApiCalls['listTaxonomies'] as GaxCall, @@ -2101,7 +2129,9 @@ export class PolicyTagManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, @@ -2168,7 +2198,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listPolicyTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyTags stream %j', request); return this.descriptors.page.listPolicyTags.createStream( this.innerApiCalls.listPolicyTags as GaxCall, @@ -2217,7 +2249,9 @@ export class PolicyTagManagerClient { }); const defaultCallSettings = this._defaults['listPolicyTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyTags iterate %j', request); return this.descriptors.page.listPolicyTags.asyncIterate( this.innerApiCalls['listPolicyTags'] as GaxCall, diff --git a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts index ba40acdcd7c..43ab172f78e 100644 --- a/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts +++ b/packages/google-cloud-datacatalog/src/v1beta1/policy_tag_manager_serialization_client.ts @@ -495,7 +495,9 @@ export class PolicyTagManagerSerializationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importTaxonomies request %j', request); const wrappedCallback: | Callback< @@ -628,7 +630,9 @@ export class PolicyTagManagerSerializationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('exportTaxonomies request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts b/packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts deleted file mode 100644 index f45b14c3b1e..00000000000 --- a/packages/google-cloud-datacatalog/test/gapic_data_catalog_v1.ts +++ /dev/null @@ -1,6638 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as datacatalogModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON( - require('../protos/protos.json') -).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = ( - instance.constructor as typeof protobuf.Message - ).toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject - ) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error - ? sinon.stub().rejects(error) - : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback( - response?: ResponseType, - error?: Error -) { - return error - ? sinon.stub().callsArgWith(2, error) - : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall( - response?: ResponseType, - callError?: Error, - lroError?: Error -) { - const innerStub = lroError - ? sinon.stub().rejects(lroError) - : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError - ? sinon.stub().rejects(callError) - : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback( - response?: ResponseType, - callError?: Error, - lroError?: Error -) { - const innerStub = lroError - ? sinon.stub().rejects(lroError) - : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError - ? sinon.stub().callsArgWith(2, callError) - : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall( - responses?: ResponseType[], - error?: Error -) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error - ? sinon.stub().callsArgWith(2, error) - : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { - mockStream.write({}); - }); - } - setImmediate(() => { - mockStream.end(); - }); - } else { - setImmediate(() => { - mockStream.write({}); - }); - setImmediate(() => { - mockStream.end(); - }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall( - responses?: ResponseType[], - error?: Error -) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - }, - }; - }, - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.DataCatalogClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new datacatalogModule.v1.DataCatalogClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new datacatalogModule.v1.DataCatalogClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, 'googleapis.com'); - }); - - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = datacatalogModule.v1.DataCatalogClient.servicePath; - assert.strictEqual(servicePath, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = datacatalogModule.v1.DataCatalogClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'datacatalog.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - universeDomain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - universe_domain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new datacatalogModule.v1.DataCatalogClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new datacatalogModule.v1.DataCatalogClient({ - universeDomain: 'configured.example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'datacatalog.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { - new datacatalogModule.v1.DataCatalogClient({ - universe_domain: 'example.com', - universeDomain: 'example.net', - }); - }); - }); - - it('has port', () => { - const port = datacatalogModule.v1.DataCatalogClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new datacatalogModule.v1.DataCatalogClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataCatalogStub, undefined); - await client.initialize(); - assert(client.dataCatalogStub); - }); - - it('has close method for the initialized client', done => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.dataCatalogStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataCatalogStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new datacatalogModule.v1.DataCatalogClient({ - 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 datacatalogModule.v1.DataCatalogClient({ - 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('createEntryGroup', () => { - it('invokes createEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.createEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.createEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.createEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEntryGroup(request), expectedError); - }); - }); - - describe('getEntryGroup', () => { - it('invokes getEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.getEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.getEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.getEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntryGroup(request), expectedError); - }); - }); - - describe('updateEntryGroup', () => { - it('invokes updateEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.updateEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.updateEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.updateEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEntryGroup(request), expectedError); - }); - }); - - describe('deleteEntryGroup', () => { - it('invokes deleteEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEntryGroup(request), expectedError); - }); - }); - - describe('createEntry', () => { - it('invokes createEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.createEntry = stubSimpleCall(expectedResponse); - const [response] = await client.createEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.createEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEntry(request), expectedError); - }); - }); - - describe('updateEntry', () => { - it('invokes updateEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.updateEntry = stubSimpleCall(expectedResponse); - const [response] = await client.updateEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.updateEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEntry(request), expectedError); - }); - }); - - describe('deleteEntry', () => { - it('invokes deleteEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntry = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntry( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEntry(request), expectedError); - }); - }); - - describe('getEntry', () => { - it('invokes getEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.getEntry = stubSimpleCall(expectedResponse); - const [response] = await client.getEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.getEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntry = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntry(request), expectedError); - }); - }); - - describe('lookupEntry', () => { - it('invokes lookupEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.lookupEntry = stubSimpleCall(expectedResponse); - const [response] = await client.lookupEntry(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes lookupEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.lookupEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.lookupEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes lookupEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.lookupEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.lookupEntry(request), expectedError); - }); - - it('invokes lookupEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.lookupEntry(request), expectedError); - }); - }); - - describe('modifyEntryOverview', () => { - it('invokes modifyEntryOverview without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryOverview() - ); - client.innerApiCalls.modifyEntryOverview = - stubSimpleCall(expectedResponse); - const [response] = await client.modifyEntryOverview(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryOverview without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryOverview() - ); - client.innerApiCalls.modifyEntryOverview = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.modifyEntryOverview( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryOverview | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryOverview with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.modifyEntryOverview = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.modifyEntryOverview(request), expectedError); - const actualRequest = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryOverview with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.modifyEntryOverview(request), expectedError); - }); - }); - - describe('modifyEntryContacts', () => { - it('invokes modifyEntryContacts without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Contacts() - ); - client.innerApiCalls.modifyEntryContacts = - stubSimpleCall(expectedResponse); - const [response] = await client.modifyEntryContacts(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryContacts without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Contacts() - ); - client.innerApiCalls.modifyEntryContacts = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.modifyEntryContacts( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IContacts | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryContacts with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.modifyEntryContacts = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.modifyEntryContacts(request), expectedError); - const actualRequest = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryContacts with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.modifyEntryContacts(request), expectedError); - }); - }); - - describe('createTagTemplate', () => { - it('invokes createTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.createTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.createTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.createTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTagTemplate(request), expectedError); - }); - }); - - describe('getTagTemplate', () => { - it('invokes getTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.getTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.getTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.getTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getTagTemplate(request), expectedError); - }); - }); - - describe('updateTagTemplate', () => { - it('invokes updateTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.updateTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.updateTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.updateTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTagTemplate(request), expectedError); - }); - }); - - describe('deleteTagTemplate', () => { - it('invokes deleteTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTagTemplate(request), expectedError); - }); - }); - - describe('createTagTemplateField', () => { - it('invokes createTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.createTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.createTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.createTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.createTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.createTagTemplateField(request), - expectedError - ); - }); - }); - - describe('updateTagTemplateField', () => { - it('invokes updateTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.updateTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.updateTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.updateTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.updateTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.updateTagTemplateField(request), - expectedError - ); - }); - }); - - describe('renameTagTemplateField', () => { - it('invokes renameTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.renameTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.renameTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.renameTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.renameTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.renameTagTemplateField(request), - expectedError - ); - }); - }); - - describe('renameTagTemplateFieldEnumValue', () => { - it('invokes renameTagTemplateFieldEnumValue without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateFieldEnumValue = - stubSimpleCall(expectedResponse); - const [response] = await client.renameTagTemplateFieldEnumValue(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateFieldEnumValue without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateFieldEnumValue = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.renameTagTemplateFieldEnumValue( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateFieldEnumValue with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.renameTagTemplateFieldEnumValue = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.renameTagTemplateFieldEnumValue(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateFieldEnumValue with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.renameTagTemplateFieldEnumValue(request), - expectedError - ); - }); - }); - - describe('deleteTagTemplateField', () => { - it('invokes deleteTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.deleteTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.deleteTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.deleteTagTemplateField(request), - expectedError - ); - }); - }); - - describe('createTag', () => { - it('invokes createTag without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); - const [response] = await client.createTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.createTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTag(request), expectedError); - }); - }); - - describe('updateTag', () => { - it('invokes updateTag without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); - const [response] = await client.updateTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.updateTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTag(request), expectedError); - }); - }); - - describe('deleteTag', () => { - it('invokes deleteTag without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTag( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTag(request), expectedError); - }); - }); - - describe('starEntry', () => { - it('invokes starEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryResponse() - ); - client.innerApiCalls.starEntry = stubSimpleCall(expectedResponse); - const [response] = await client.starEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes starEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryResponse() - ); - client.innerApiCalls.starEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.starEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IStarEntryResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes starEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.starEntry = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.starEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes starEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.starEntry(request), expectedError); - }); - }); - - describe('unstarEntry', () => { - it('invokes unstarEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryResponse() - ); - client.innerApiCalls.unstarEntry = stubSimpleCall(expectedResponse); - const [response] = await client.unstarEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unstarEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryResponse() - ); - client.innerApiCalls.unstarEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.unstarEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IUnstarEntryResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unstarEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.unstarEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.unstarEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unstarEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.unstarEntry(request), expectedError); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.setIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setIamPolicy(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getIamPolicy(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.ITestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('setConfig', () => { - it('invokes setConfig without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SetConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.SetConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.setConfig = stubSimpleCall(expectedResponse); - const [response] = await client.setConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setConfig without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SetConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.SetConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.setConfig = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setConfig( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IMigrationConfig | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setConfig with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SetConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.SetConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setConfig(request), expectedError); - const actualRequest = ( - client.innerApiCalls.setConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setConfig with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SetConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.SetConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setConfig(request), expectedError); - }); - }); - - describe('retrieveConfig', () => { - it('invokes retrieveConfig without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.OrganizationConfig() - ); - client.innerApiCalls.retrieveConfig = stubSimpleCall(expectedResponse); - const [response] = await client.retrieveConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.retrieveConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.retrieveConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveConfig without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.OrganizationConfig() - ); - client.innerApiCalls.retrieveConfig = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.retrieveConfig( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IOrganizationConfig | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.retrieveConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.retrieveConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveConfig with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.retrieveConfig = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.retrieveConfig(request), expectedError); - const actualRequest = ( - client.innerApiCalls.retrieveConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.retrieveConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveConfig with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.retrieveConfig(request), expectedError); - }); - }); - - describe('retrieveEffectiveConfig', () => { - it('invokes retrieveEffectiveConfig without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.retrieveEffectiveConfig = - stubSimpleCall(expectedResponse); - const [response] = await client.retrieveEffectiveConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.retrieveEffectiveConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.retrieveEffectiveConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveEffectiveConfig without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.MigrationConfig() - ); - client.innerApiCalls.retrieveEffectiveConfig = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.retrieveEffectiveConfig( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IMigrationConfig | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.retrieveEffectiveConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.retrieveEffectiveConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveEffectiveConfig with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.retrieveEffectiveConfig = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.retrieveEffectiveConfig(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.retrieveEffectiveConfig as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.retrieveEffectiveConfig as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retrieveEffectiveConfig with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RetrieveEffectiveConfigRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.retrieveEffectiveConfig(request), - expectedError - ); - }); - }); - - describe('reconcileTags', () => { - it('invokes reconcileTags without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReconcileTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReconcileTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.reconcileTags = - stubLongRunningCall(expectedResponse); - const [operation] = await client.reconcileTags(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reconcileTags without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReconcileTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReconcileTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.reconcileTags = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.reconcileTags( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.datacatalog.v1.IReconcileTagsResponse, - protos.google.cloud.datacatalog.v1.IReconcileTagsMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.datacatalog.v1.IReconcileTagsResponse, - protos.google.cloud.datacatalog.v1.IReconcileTagsMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reconcileTags with call error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReconcileTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReconcileTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.reconcileTags = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.reconcileTags(request), expectedError); - const actualRequest = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reconcileTags with LRO error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReconcileTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReconcileTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.reconcileTags = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.reconcileTags(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.reconcileTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkReconcileTagsProgress without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkReconcileTagsProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkReconcileTagsProgress with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkReconcileTagsProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('importEntries', () => { - it('invokes importEntries without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importEntries = - stubLongRunningCall(expectedResponse); - const [operation] = await client.importEntries(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importEntries without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importEntries = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.importEntries( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.datacatalog.v1.IImportEntriesResponse, - protos.google.cloud.datacatalog.v1.IImportEntriesMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.datacatalog.v1.IImportEntriesResponse, - protos.google.cloud.datacatalog.v1.IImportEntriesMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importEntries with call error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importEntries = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.importEntries(request), expectedError); - const actualRequest = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importEntries with LRO error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importEntries = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.importEntries(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkImportEntriesProgress without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkImportEntriesProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkImportEntriesProgress with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkImportEntriesProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('searchCatalog', () => { - it('invokes searchCatalog without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.innerApiCalls.searchCatalog = stubSimpleCall(expectedResponse); - const [response] = await client.searchCatalog(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchCatalog without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.innerApiCalls.searchCatalog = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.searchCatalog( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.datacatalog.v1.ISearchCatalogResult[] - | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchCatalog with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.searchCatalog = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.searchCatalog(request), expectedError); - }); - - it('invokes searchCatalogStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.descriptors.page.searchCatalog.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.searchCatalogStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.SearchCatalogResult[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.datacatalog.v1.SearchCatalogResult - ) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - (client.descriptors.page.searchCatalog.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.searchCatalog, request) - ); - }); - - it('invokes searchCatalogStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.descriptors.page.searchCatalog.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.searchCatalogStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.SearchCatalogResult[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.datacatalog.v1.SearchCatalogResult - ) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.searchCatalog.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.searchCatalog, request) - ); - }); - - it('uses async iteration with searchCatalog without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.descriptors.page.searchCatalog.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.ISearchCatalogResult[] = - []; - const iterable = client.searchCatalogAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.searchCatalog.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - }); - - it('uses async iteration with searchCatalog with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.descriptors.page.searchCatalog.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.searchCatalogAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.ISearchCatalogResult[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.searchCatalog.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - }); - }); - - describe('listEntryGroups', () => { - it('invokes listEntryGroups without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.innerApiCalls.listEntryGroups = stubSimpleCall(expectedResponse); - const [response] = await client.listEntryGroups(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroups without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.innerApiCalls.listEntryGroups = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntryGroups( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroups with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntryGroups = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listEntryGroups(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroupsStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.descriptors.page.listEntryGroups.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listEntryGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.EntryGroup[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.EntryGroup) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntryGroups, request) - ); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('invokes listEntryGroupsStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryGroups.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listEntryGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.EntryGroup[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.EntryGroup) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntryGroups, request) - ); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('uses async iteration with listEntryGroups without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.descriptors.page.listEntryGroups.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.IEntryGroup[] = []; - const iterable = client.listEntryGroupsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listEntryGroups.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listEntryGroups.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('uses async iteration with listEntryGroups with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryGroups.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEntryGroupsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.IEntryGroup[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listEntryGroups.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listEntryGroups.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - }); - - describe('listEntries', () => { - it('invokes listEntries without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.innerApiCalls.listEntries = stubSimpleCall(expectedResponse); - const [response] = await client.listEntries(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntries without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.innerApiCalls.listEntries = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntries( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntries with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntries = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listEntries(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntriesStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.descriptors.page.listEntries.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Entry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Entry) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntries, request) - ); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('invokes listEntriesStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Entry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Entry) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntries, request) - ); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('uses async iteration with listEntries without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.descriptors.page.listEntries.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.IEntry[] = []; - const iterable = client.listEntriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEntries.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('uses async iteration with listEntries with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listEntriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.IEntry[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEntries.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - }); - - describe('listTags', () => { - it('invokes listTags without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); - const [response] = await client.listTags(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.innerApiCalls.listTags = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTags( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITag[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTags(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTagsStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.descriptors.page.listTags.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Tag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Tag) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTags, request) - ); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('invokes listTagsStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Tag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Tag) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTags, request) - ); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('uses async iteration with listTags without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.descriptors.page.listTags.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.ITag[] = []; - const iterable = client.listTagsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - - it('uses async iteration with listTags with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listTagsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.ITag[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - }); - - describe('Path templates', () => { - describe('entry', () => { - const fakePath = '/rendered/path/entry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryPath', () => { - const result = client.entryPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryName', () => { - const result = client.matchProjectFromEntryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryName', () => { - const result = client.matchLocationFromEntryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryName', () => { - const result = client.matchEntryGroupFromEntryName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromEntryName', () => { - const result = client.matchEntryFromEntryName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('entryGroup', () => { - const fakePath = '/rendered/path/entryGroup'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryGroupPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryGroupPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryGroupPath', () => { - const result = client.entryGroupPath( - 'projectValue', - 'locationValue', - 'entryGroupValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryGroupPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryGroupName', () => { - const result = client.matchProjectFromEntryGroupName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryGroupName', () => { - const result = client.matchLocationFromEntryGroupName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryGroupName', () => { - const result = client.matchEntryGroupFromEntryGroupName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('policyTag', () => { - const fakePath = '/rendered/path/policyTag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - policy_tag: 'policyTagValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.policyTagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.policyTagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('policyTagPath', () => { - const result = client.policyTagPath( - 'projectValue', - 'locationValue', - 'taxonomyValue', - 'policyTagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.policyTagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromPolicyTagName', () => { - const result = client.matchProjectFromPolicyTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromPolicyTagName', () => { - const result = client.matchLocationFromPolicyTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromPolicyTagName', () => { - const result = client.matchTaxonomyFromPolicyTagName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchPolicyTagFromPolicyTagName', () => { - const result = client.matchPolicyTagFromPolicyTagName(fakePath); - assert.strictEqual(result, 'policyTagValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('project', () => { - const fakePath = '/rendered/path/project'; - const expectedParameters = { - project: 'projectValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath('projectValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tag', () => { - const fakePath = '/rendered/path/tag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - tag: 'tagValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagPath', () => { - const result = client.tagPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue', - 'tagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagName', () => { - const result = client.matchProjectFromTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagName', () => { - const result = client.matchLocationFromTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromTagName', () => { - const result = client.matchEntryGroupFromTagName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromTagName', () => { - const result = client.matchEntryFromTagName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagFromTagName', () => { - const result = client.matchTagFromTagName(fakePath); - assert.strictEqual(result, 'tagValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplate', () => { - const fakePath = '/rendered/path/tagTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplatePath', () => { - const result = client.tagTemplatePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateName', () => { - const result = client.matchProjectFromTagTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateName', () => { - const result = client.matchLocationFromTagTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateName', () => { - const result = client.matchTagTemplateFromTagTemplateName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateField', () => { - const fakePath = '/rendered/path/tagTemplateField'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - field: 'fieldValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldPath', () => { - const result = client.tagTemplateFieldPath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'fieldValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldName', () => { - const result = client.matchProjectFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldName', () => { - const result = client.matchLocationFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchFieldFromTagTemplateFieldName', () => { - const result = client.matchFieldFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'fieldValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateFieldEnumValue', () => { - const fakePath = '/rendered/path/tagTemplateFieldEnumValue'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - tag_template_field_id: 'tagTemplateFieldIdValue', - enum_value_display_name: 'enumValueDisplayNameValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldEnumValuePath', () => { - const result = client.tagTemplateFieldEnumValuePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'tagTemplateFieldIdValue', - 'enumValueDisplayNameValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchProjectFromTagTemplateFieldEnumValueName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchLocationFromTagTemplateFieldEnumValueName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldEnumValueName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFieldIdFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchTagTemplateFieldIdFromTagTemplateFieldEnumValueName( - fakePath - ); - assert.strictEqual(result, 'tagTemplateFieldIdValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEnumValueDisplayNameFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchEnumValueDisplayNameFromTagTemplateFieldEnumValueName( - fakePath - ); - assert.strictEqual(result, 'enumValueDisplayNameValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('taxonomy', () => { - const fakePath = '/rendered/path/taxonomy'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taxonomyPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.taxonomyPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('taxonomyPath', () => { - const result = client.taxonomyPath( - 'projectValue', - 'locationValue', - 'taxonomyValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.taxonomyPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTaxonomyName', () => { - const result = client.matchProjectFromTaxonomyName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTaxonomyName', () => { - const result = client.matchLocationFromTaxonomyName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromTaxonomyName', () => { - const result = client.matchTaxonomyFromTaxonomyName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts index 1d40ab95511..60a6ef0e4fc 100644 --- a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts +++ b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1.ts @@ -208,7 +208,9 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyTagManagerSerializationStub); client.close().then(() => { done(); @@ -279,7 +281,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() ); @@ -313,7 +315,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() ); @@ -363,7 +365,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() ); @@ -397,7 +399,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() ); @@ -421,7 +423,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() ); @@ -455,7 +457,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() ); @@ -505,7 +507,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() ); @@ -539,7 +541,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() ); @@ -563,7 +565,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() ); @@ -597,7 +599,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() ); @@ -647,7 +649,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() ); @@ -681,7 +683,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() ); @@ -697,7 +699,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); describe('Path templates', () => { - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -712,7 +714,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -776,7 +778,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -790,7 +792,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -843,7 +845,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -856,7 +858,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -895,7 +897,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('policyTag', () => { + describe('policyTag', async () => { const fakePath = '/rendered/path/policyTag'; const expectedParameters = { project: 'projectValue', @@ -910,7 +912,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.policyTagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -974,7 +976,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -986,7 +988,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1015,7 +1017,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('tag', () => { + describe('tag', async () => { const fakePath = '/rendered/path/tag'; const expectedParameters = { project: 'projectValue', @@ -1031,7 +1033,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1106,7 +1108,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('tagTemplate', () => { + describe('tagTemplate', async () => { const fakePath = '/rendered/path/tagTemplate'; const expectedParameters = { project: 'projectValue', @@ -1120,7 +1122,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1173,7 +1175,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('tagTemplateField', () => { + describe('tagTemplateField', async () => { const fakePath = '/rendered/path/tagTemplateField'; const expectedParameters = { project: 'projectValue', @@ -1188,7 +1190,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1256,7 +1258,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { }); }); - describe('taxonomy', () => { + describe('taxonomy', async () => { const fakePath = '/rendered/path/taxonomy'; const expectedParameters = { project: 'projectValue', @@ -1270,7 +1272,7 @@ describe('v1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1beta1.ts b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1beta1.ts index 76f410073e4..4e378484f0a 100644 --- a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1beta1.ts +++ b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_serialization_v1beta1.ts @@ -208,7 +208,9 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyTagManagerSerializationStub); client.close().then(() => { done(); @@ -279,7 +281,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() ); @@ -313,7 +315,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() ); @@ -363,7 +365,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() ); @@ -397,7 +399,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() ); @@ -421,7 +423,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() ); @@ -455,7 +457,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() ); @@ -505,7 +507,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() ); @@ -539,7 +541,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() ); @@ -555,7 +557,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); describe('Path templates', () => { - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -570,7 +572,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -634,7 +636,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -648,7 +650,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -701,7 +703,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -714,7 +716,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -753,7 +755,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('policyTag', () => { + describe('policyTag', async () => { const fakePath = '/rendered/path/policyTag'; const expectedParameters = { project: 'projectValue', @@ -768,7 +770,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.policyTagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -832,7 +834,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -844,7 +846,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -873,7 +875,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('tag', () => { + describe('tag', async () => { const fakePath = '/rendered/path/tag'; const expectedParameters = { project: 'projectValue', @@ -889,7 +891,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -964,7 +966,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('tagTemplate', () => { + describe('tagTemplate', async () => { const fakePath = '/rendered/path/tagTemplate'; const expectedParameters = { project: 'projectValue', @@ -978,7 +980,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1031,7 +1033,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('tagTemplateField', () => { + describe('tagTemplateField', async () => { const fakePath = '/rendered/path/tagTemplateField'; const expectedParameters = { project: 'projectValue', @@ -1046,7 +1048,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1114,7 +1116,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { }); }); - describe('taxonomy', () => { + describe('taxonomy', async () => { const fakePath = '/rendered/path/taxonomy'; const expectedParameters = { project: 'projectValue', @@ -1128,7 +1130,7 @@ describe('v1beta1.PolicyTagManagerSerializationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts index 2619ce2b159..819ca463d18 100644 --- a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts +++ b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1.ts @@ -252,7 +252,9 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyTagManagerStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() ); @@ -342,7 +344,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() ); @@ -389,7 +391,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() ); @@ -420,7 +422,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() ); @@ -441,7 +443,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() ); @@ -472,7 +474,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() ); @@ -519,7 +521,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() ); @@ -550,7 +552,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() ); @@ -571,7 +573,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() ); @@ -603,7 +605,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() ); @@ -651,7 +653,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() ); @@ -683,7 +685,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() ); @@ -705,7 +707,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() ); @@ -736,7 +738,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() ); @@ -783,7 +785,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() ); @@ -814,7 +816,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() ); @@ -835,7 +837,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() ); @@ -866,7 +868,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() ); @@ -913,7 +915,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() ); @@ -944,7 +946,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() ); @@ -965,7 +967,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() ); @@ -996,7 +998,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() ); @@ -1359,7 +1361,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1390,7 +1392,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1437,7 +1439,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1468,7 +1470,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1489,7 +1491,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1520,7 +1522,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1567,7 +1569,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1598,7 +1600,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1619,7 +1621,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1698,7 +1700,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1729,7 +1731,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1750,7 +1752,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() ); @@ -1789,7 +1791,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() ); @@ -1844,7 +1846,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() ); @@ -1875,7 +1877,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() ); @@ -1935,7 +1937,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() ); @@ -1984,7 +1986,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() ); @@ -2033,7 +2035,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() ); @@ -2075,7 +2077,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() ); @@ -2114,7 +2116,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() ); @@ -2169,7 +2171,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() ); @@ -2200,7 +2202,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() ); @@ -2260,7 +2262,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() ); @@ -2309,7 +2311,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() ); @@ -2358,7 +2360,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() ); @@ -2395,7 +2397,7 @@ describe('v1.PolicyTagManagerClient', () => { }); describe('Path templates', () => { - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -2407,7 +2409,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2471,7 +2473,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -2482,7 +2484,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2535,7 +2537,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2545,7 +2547,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2584,7 +2586,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('policyTag', () => { + describe('policyTag', async () => { const fakePath = '/rendered/path/policyTag'; const expectedParameters = { project: 'projectValue', @@ -2596,7 +2598,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.policyTagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2660,7 +2662,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2669,7 +2671,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2698,7 +2700,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('tag', () => { + describe('tag', async () => { const fakePath = '/rendered/path/tag'; const expectedParameters = { project: 'projectValue', @@ -2711,7 +2713,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2786,7 +2788,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('tagTemplate', () => { + describe('tagTemplate', async () => { const fakePath = '/rendered/path/tagTemplate'; const expectedParameters = { project: 'projectValue', @@ -2797,7 +2799,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2850,7 +2852,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('tagTemplateField', () => { + describe('tagTemplateField', async () => { const fakePath = '/rendered/path/tagTemplateField'; const expectedParameters = { project: 'projectValue', @@ -2862,7 +2864,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2930,7 +2932,7 @@ describe('v1.PolicyTagManagerClient', () => { }); }); - describe('taxonomy', () => { + describe('taxonomy', async () => { const fakePath = '/rendered/path/taxonomy'; const expectedParameters = { project: 'projectValue', @@ -2941,7 +2943,7 @@ describe('v1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1beta1.ts b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1beta1.ts index 56af37fe8e4..d9e290770ac 100644 --- a/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1beta1.ts +++ b/packages/google-cloud-datacatalog/test/gapic_policy_tag_manager_v1beta1.ts @@ -257,7 +257,9 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyTagManagerStub); client.close().then(() => { done(); @@ -316,7 +318,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() ); @@ -347,7 +349,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() ); @@ -394,7 +396,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() ); @@ -425,7 +427,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() ); @@ -446,7 +448,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() ); @@ -477,7 +479,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() ); @@ -524,7 +526,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() ); @@ -555,7 +557,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() ); @@ -576,7 +578,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() ); @@ -608,7 +610,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() ); @@ -656,7 +658,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() ); @@ -688,7 +690,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() ); @@ -710,7 +712,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() ); @@ -741,7 +743,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() ); @@ -788,7 +790,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() ); @@ -819,7 +821,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() ); @@ -840,7 +842,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() ); @@ -871,7 +873,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() ); @@ -918,7 +920,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() ); @@ -949,7 +951,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() ); @@ -970,7 +972,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() ); @@ -1001,7 +1003,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() ); @@ -1048,7 +1050,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() ); @@ -1079,7 +1081,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() ); @@ -1100,7 +1102,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() ); @@ -1132,7 +1134,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() ); @@ -1180,7 +1182,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() ); @@ -1212,7 +1214,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() ); @@ -1234,7 +1236,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() ); @@ -1265,7 +1267,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() ); @@ -1312,7 +1314,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() ); @@ -1343,7 +1345,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() ); @@ -1364,7 +1366,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1395,7 +1397,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1442,7 +1444,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1473,7 +1475,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1494,7 +1496,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1525,7 +1527,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1572,7 +1574,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1603,7 +1605,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1624,7 +1626,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1656,7 +1658,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1703,7 +1705,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1734,7 +1736,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1755,7 +1757,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() ); @@ -1794,7 +1796,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() ); @@ -1849,7 +1851,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() ); @@ -1880,7 +1882,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() ); @@ -1941,7 +1943,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() ); @@ -1991,7 +1993,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() ); @@ -2040,7 +2042,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() ); @@ -2083,7 +2085,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() ); @@ -2122,7 +2124,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() ); @@ -2177,7 +2179,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() ); @@ -2208,7 +2210,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() ); @@ -2269,7 +2271,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() ); @@ -2319,7 +2321,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() ); @@ -2369,7 +2371,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() ); @@ -2407,7 +2409,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); describe('Path templates', () => { - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -2419,7 +2421,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2483,7 +2485,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -2494,7 +2496,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2547,7 +2549,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2557,7 +2559,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2596,7 +2598,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('policyTag', () => { + describe('policyTag', async () => { const fakePath = '/rendered/path/policyTag'; const expectedParameters = { project: 'projectValue', @@ -2608,7 +2610,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.policyTagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2672,7 +2674,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2681,7 +2683,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2710,7 +2712,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('tag', () => { + describe('tag', async () => { const fakePath = '/rendered/path/tag'; const expectedParameters = { project: 'projectValue', @@ -2723,7 +2725,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2798,7 +2800,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('tagTemplate', () => { + describe('tagTemplate', async () => { const fakePath = '/rendered/path/tagTemplate'; const expectedParameters = { project: 'projectValue', @@ -2809,7 +2811,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2862,7 +2864,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('tagTemplateField', () => { + describe('tagTemplateField', async () => { const fakePath = '/rendered/path/tagTemplateField'; const expectedParameters = { project: 'projectValue', @@ -2874,7 +2876,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2942,7 +2944,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { }); }); - describe('taxonomy', () => { + describe('taxonomy', async () => { const fakePath = '/rendered/path/taxonomy'; const expectedParameters = { project: 'projectValue', @@ -2953,7 +2955,7 @@ describe('v1beta1.PolicyTagManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyPathTemplate.render = sinon .stub() .returns(fakePath); From c41ff0729b65a1207978b4029d6369cc0552e0bf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:07:58 -0700 Subject: [PATCH 24/34] feat: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFkcy1hZG1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFpLWdlbmVyYXRpdmVsYW5ndWFnZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1hZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1kYXRhLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwaS1hcGlrZXlzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwaS1jbG91ZHF1b3Rhcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwaS1zZXJ2aWNlY29udHJvbC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwaS1zZXJ2aWNlbWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwaS1zZXJ2aWNldXNhZ2UvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcGVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcHMtbWVldC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFyZWExMjAtdGFibGVzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFjY2Vzc2FwcHJvdmFsLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFkdmlzb3J5bm90aWZpY2F0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFwaWdhdGV3YXkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFwaWdlZWNvbm5lY3QvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFwaWdlZXJlZ2lzdHJ5Ly5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFwaWh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 * chore: run post processor * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update gax * undo changes in aiplatform * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-ads-admanager/package.json | 2 +- ...ppet_metadata_google.ads.admanager.v1.json | 2 +- .../src/v1/ad_unit_service_client.ts | 28 +- .../src/v1/company_service_client.ts | 16 +- .../src/v1/custom_field_service_client.ts | 16 +- .../v1/custom_targeting_key_service_client.ts | 16 +- .../custom_targeting_value_service_client.ts | 16 +- .../entity_signals_mapping_service_client.ts | 32 +- .../src/v1/network_service_client.ts | 8 +- .../src/v1/order_service_client.ts | 16 +- .../src/v1/placement_service_client.ts | 16 +- .../src/v1/report_service_client.ts | 42 +- .../src/v1/role_service_client.ts | 16 +- .../v1/taxonomy_category_service_client.ts | 16 +- .../src/v1/user_service_client.ts | 4 +- .../test/gapic_ad_unit_service_v1.ts | 104 +- .../test/gapic_company_service_v1.ts | 90 +- .../test/gapic_custom_field_service_v1.ts | 90 +- .../gapic_custom_targeting_key_service_v1.ts | 90 +- ...gapic_custom_targeting_value_service_v1.ts | 90 +- ...gapic_entity_signals_mapping_service_v1.ts | 122 +- .../test/gapic_network_service_v1.ts | 84 +- .../test/gapic_order_service_v1.ts | 90 +- .../test/gapic_placement_service_v1.ts | 90 +- .../test/gapic_report_service_v1.ts | 146 +- .../test/gapic_role_service_v1.ts | 90 +- .../gapic_taxonomy_category_service_v1.ts | 90 +- .../test/gapic_user_service_v1.ts | 76 +- .../google-ai-generativelanguage/package.json | 2 +- ...adata_google.ai.generativelanguage.v1.json | 2 +- ..._google.ai.generativelanguage.v1alpha.json | 2 +- ...a_google.ai.generativelanguage.v1beta.json | 2 +- ....google.ai.generativelanguage.v1beta2.json | 2 +- ..._google.ai.generativelanguage.v1beta2.json | 2 +- ..._google.ai.generativelanguage.v1beta3.json | 2 +- .../src/v1/generative_service_client.ts | 20 +- .../src/v1/model_service_client.ts | 16 +- .../src/v1alpha/cache_service_client.ts | 28 +- .../src/v1alpha/discuss_service_client.ts | 8 +- .../src/v1alpha/file_service_client.ts | 24 +- .../src/v1alpha/generative_service_client.ts | 28 +- .../src/v1alpha/model_service_client.ts | 46 +- .../src/v1alpha/permission_service_client.ts | 32 +- .../src/v1alpha/prediction_service_client.ts | 4 +- .../src/v1alpha/retriever_service_client.ts | 104 +- .../src/v1alpha/text_service_client.ts | 16 +- .../src/v1beta/cache_service_client.ts | 28 +- .../src/v1beta/discuss_service_client.ts | 8 +- .../src/v1beta/file_service_client.ts | 24 +- .../src/v1beta/generative_service_client.ts | 24 +- .../src/v1beta/model_service_client.ts | 46 +- .../src/v1beta/permission_service_client.ts | 32 +- .../src/v1beta/prediction_service_client.ts | 4 +- .../src/v1beta/retriever_service_client.ts | 104 +- .../src/v1beta/text_service_client.ts | 16 +- .../src/v1beta2/discuss_service_client.ts | 8 +- .../src/v1beta2/model_service_client.ts | 16 +- .../src/v1beta2/text_service_client.ts | 8 +- .../src/v1beta3/discuss_service_client.ts | 8 +- .../src/v1beta3/model_service_client.ts | 46 +- .../src/v1beta3/permission_service_client.ts | 32 +- .../src/v1beta3/text_service_client.ts | 16 +- .../test/gapic_cache_service_v1alpha.ts | 86 +- .../test/gapic_cache_service_v1beta.ts | 86 +- .../test/gapic_discuss_service_v1alpha.ts | 56 +- .../test/gapic_discuss_service_v1beta.ts | 56 +- .../test/gapic_discuss_service_v1beta2.ts | 24 +- .../test/gapic_discuss_service_v1beta3.ts | 32 +- .../test/gapic_file_service_v1alpha.ts | 78 +- .../test/gapic_file_service_v1beta.ts | 78 +- .../test/gapic_generative_service_v1.ts | 50 +- .../test/gapic_generative_service_v1alpha.ts | 94 +- .../test/gapic_generative_service_v1beta.ts | 94 +- .../test/gapic_model_service_v1.ts | 30 +- .../test/gapic_model_service_v1alpha.ts | 126 +- .../test/gapic_model_service_v1beta.ts | 126 +- .../test/gapic_model_service_v1beta2.ts | 30 +- .../test/gapic_model_service_v1beta3.ts | 102 +- .../test/gapic_permission_service_v1alpha.ts | 94 +- .../test/gapic_permission_service_v1beta.ts | 94 +- .../test/gapic_permission_service_v1beta3.ts | 70 +- .../test/gapic_prediction_service_v1alpha.ts | 48 +- .../test/gapic_prediction_service_v1beta.ts | 48 +- .../test/gapic_retriever_service_v1alpha.ts | 218 +-- .../test/gapic_retriever_service_v1beta.ts | 218 +-- .../test/gapic_text_service_v1alpha.ts | 72 +- .../test/gapic_text_service_v1beta.ts | 72 +- .../test/gapic_text_service_v1beta2.ts | 24 +- .../test/gapic_text_service_v1beta3.ts | 48 +- packages/google-analytics-admin/package.json | 2 +- ...tadata.google.analytics.admin.v1alpha.json | 2 +- ...tadata_google.analytics.admin.v1alpha.json | 2 +- ...etadata.google.analytics.admin.v1beta.json | 2 +- ...etadata_google.analytics.admin.v1beta.json | 2 +- .../v1alpha/analytics_admin_service_client.ts | 816 ++++++--- .../v1beta/analytics_admin_service_client.ts | 312 +++- .../gapic_analytics_admin_service_v1alpha.ts | 1502 +++++++++-------- .../gapic_analytics_admin_service_v1beta.ts | 560 +++--- packages/google-analytics-data/package.json | 2 +- ...etadata.google.analytics.data.v1alpha.json | 2 +- ...etadata_google.analytics.data.v1alpha.json | 2 +- ...metadata.google.analytics.data.v1beta.json | 2 +- ...metadata_google.analytics.data.v1beta.json | 2 +- .../v1alpha/alpha_analytics_data_client.ts | 82 +- .../src/v1beta/beta_analytics_data_client.ts | 54 +- .../gapic_alpha_analytics_data_v1alpha.ts | 176 +- .../test/gapic_beta_analytics_data_v1beta.ts | 128 +- packages/google-api-apikeys/package.json | 2 +- ...nippet_metadata.google.api.apikeys.v2.json | 2 +- ...nippet_metadata_google.api.apikeys.v2.json | 2 +- .../src/v2/api_keys_client.ts | 42 +- .../test/gapic_api_keys_v2.ts | 116 +- packages/google-api-cloudquotas/package.json | 2 +- ...et_metadata_google.api.cloudquotas.v1.json | 2 +- ...etadata_google.api.cloudquotas.v1beta.json | 2 +- .../src/v1/cloud_quotas_client.ts | 40 +- .../src/v1beta/cloud_quotas_client.ts | 40 +- .../quota_adjuster_settings_manager_client.ts | 8 +- .../test/gapic_cloud_quotas_v1.ts | 96 +- .../test/gapic_cloud_quotas_v1beta.ts | 100 +- ..._quota_adjuster_settings_manager_v1beta.ts | 48 +- .../google-api-servicecontrol/package.json | 2 +- ...metadata.google.api.servicecontrol.v1.json | 2 +- ...metadata_google.api.servicecontrol.v1.json | 2 +- ...metadata.google.api.servicecontrol.v2.json | 2 +- ...metadata_google.api.servicecontrol.v2.json | 2 +- .../src/v1/quota_controller_client.ts | 4 +- .../src/v1/service_controller_client.ts | 8 +- .../src/v2/service_controller_client.ts | 8 +- .../test/gapic_quota_controller_v1.ts | 12 +- .../test/gapic_service_controller_v1.ts | 20 +- .../test/gapic_service_controller_v2.ts | 20 +- .../google-api-servicemanagement/package.json | 2 +- ...adata.google.api.servicemanagement.v1.json | 2 +- ...adata_google.api.servicemanagement.v1.json | 2 +- .../src/v1/service_manager_client.ts | 78 +- .../test/gapic_service_manager_v1.ts | 178 +- packages/google-api-serviceusage/package.json | 2 +- ...t_metadata.google.api.serviceusage.v1.json | 2 +- ...t_metadata_google.api.serviceusage.v1.json | 2 +- ...adata.google.api.serviceusage.v1beta1.json | 2 +- ...adata_google.api.serviceusage.v1beta1.json | 2 +- .../src/v1/service_usage_client.ts | 34 +- .../src/v1beta1/service_usage_client.ts | 110 +- .../test/gapic_service_usage_v1.ts | 96 +- .../test/gapic_service_usage_v1beta1.ts | 242 +-- packages/google-appengine/package.json | 2 +- .../snippet_metadata.google.appengine.v1.json | 2 +- .../snippet_metadata_google.appengine.v1.json | 2 +- .../src/v1/applications_client.ts | 16 +- .../src/v1/authorized_certificates_client.ts | 28 +- .../src/v1/authorized_domains_client.ts | 12 +- .../src/v1/domain_mappings_client.ts | 28 +- .../src/v1/firewall_client.ts | 32 +- .../src/v1/instances_client.ts | 24 +- .../src/v1/services_client.ts | 24 +- .../src/v1/versions_client.ts | 28 +- .../test/gapic_applications_v1.ts | 52 +- .../test/gapic_authorized_certificates_v1.ts | 54 +- .../test/gapic_authorized_domains_v1.ts | 22 +- .../test/gapic_domain_mappings_v1.ts | 66 +- .../test/gapic_firewall_v1.ts | 62 +- .../test/gapic_instances_v1.ts | 54 +- .../test/gapic_services_v1.ts | 54 +- .../test/gapic_versions_v1.ts | 66 +- packages/google-apps-meet/package.json | 2 +- .../snippet_metadata_google.apps.meet.v2.json | 2 +- ...ppet_metadata_google.apps.meet.v2beta.json | 2 +- .../v2/conference_records_service_client.ts | 96 +- .../src/v2/spaces_service_client.ts | 16 +- .../conference_records_service_client.ts | 96 +- .../src/v2beta/spaces_service_client.ts | 44 +- .../gapic_conference_records_service_v2.ts | 164 +- ...gapic_conference_records_service_v2beta.ts | 168 +- .../test/gapic_spaces_service_v2.ts | 64 +- .../test/gapic_spaces_service_v2beta.ts | 114 +- packages/google-area120-tables/package.json | 2 +- ...tadata.google.area120.tables.v1alpha1.json | 2 +- ...tadata_google.area120.tables.v1alpha1.json | 2 +- .../src/v1alpha1/tables_service_client.ts | 72 +- .../test/gapic_tables_service_v1alpha1.ts | 130 +- packages/google-chat/package.json | 2 +- .../v1/snippet_metadata_google.chat.v1.json | 2 +- .../google-chat/src/v1/chat_service_client.ts | 172 +- .../google-chat/test/gapic_chat_service_v1.ts | 332 ++-- .../google-cloud-accessapproval/package.json | 2 +- ...tadata.google.cloud.accessapproval.v1.json | 2 +- ...tadata_google.cloud.accessapproval.v1.json | 2 +- .../src/v1/access_approval_client.ts | 44 +- .../test/gapic_access_approval_v1.ts | 122 +- .../package.json | 2 +- ...google.cloud.advisorynotifications.v1.json | 2 +- ...google.cloud.advisorynotifications.v1.json | 2 +- .../advisory_notifications_service_client.ts | 24 +- ...gapic_advisory_notifications_service_v1.ts | 62 +- packages/google-cloud-aiplatform/README.md | 4 +- .../protos/protos.json | 3 - ...t_metadata.google.cloud.aiplatform.v1.json | 2 +- ...t_metadata_google.cloud.aiplatform.v1.json | 2 +- ...adata.google.cloud.aiplatform.v1beta1.json | 2 +- ...adata_google.cloud.aiplatform.v1beta1.json | 2 +- packages/google-cloud-alloydb/package.json | 2 +- ...ppet_metadata.google.cloud.alloydb.v1.json | 2 +- ...ppet_metadata_google.cloud.alloydb.v1.json | 2 +- ...metadata.google.cloud.alloydb.v1alpha.json | 2 +- ...metadata_google.cloud.alloydb.v1alpha.json | 2 +- ..._metadata.google.cloud.alloydb.v1beta.json | 2 +- ..._metadata_google.cloud.alloydb.v1beta.json | 2 +- .../src/v1/alloy_d_b_admin_client.ts | 186 +- .../src/v1alpha/alloy_d_b_admin_client.ts | 190 ++- .../src/v1beta/alloy_d_b_admin_client.ts | 194 ++- .../test/gapic_alloy_d_b_admin_v1.ts | 462 ++--- .../test/gapic_alloy_d_b_admin_v1alpha.ts | 474 +++--- .../test/gapic_alloy_d_b_admin_v1beta.ts | 486 +++--- packages/google-cloud-apigateway/package.json | 2 +- ...t_metadata.google.cloud.apigateway.v1.json | 2 +- ...t_metadata_google.cloud.apigateway.v1.json | 2 +- .../src/v1/api_gateway_service_client.ts | 84 +- .../test/gapic_api_gateway_service_v1.ts | 190 +-- .../google-cloud-apigeeconnect/package.json | 2 +- ...etadata.google.cloud.apigeeconnect.v1.json | 2 +- ...etadata_google.cloud.apigeeconnect.v1.json | 2 +- .../src/v1/connection_service_client.ts | 12 +- .../src/v1/tether_client.ts | 4 +- .../test/gapic_connection_service_v1.ts | 22 +- .../test/gapic_tether_v1.ts | 8 +- .../google-cloud-apigeeregistry/package.json | 2 +- ...tadata.google.cloud.apigeeregistry.v1.json | 2 +- ...tadata_google.cloud.apigeeregistry.v1.json | 2 +- .../src/v1/provisioning_client.ts | 14 +- .../src/v1/registry_client.ts | 196 ++- .../test/gapic_provisioning_v1.ts | 122 +- .../test/gapic_registry_v1.ts | 402 ++--- packages/google-cloud-apihub/package.json | 2 +- ...ippet_metadata_google.cloud.apihub.v1.json | 2 +- .../src/v1/api_hub_client.ts | 204 ++- .../src/v1/api_hub_dependencies_client.ts | 28 +- .../src/v1/api_hub_plugin_client.ts | 12 +- ...ost_project_registration_service_client.ts | 20 +- .../src/v1/linting_service_client.ts | 16 +- .../src/v1/provisioning_client.ts | 14 +- ...ntime_project_attachment_service_client.ts | 28 +- .../test/gapic_api_hub_dependencies_v1.ts | 124 +- .../test/gapic_api_hub_plugin_v1.ts | 94 +- .../test/gapic_api_hub_v1.ts | 406 ++--- ...ic_host_project_registration_service_v1.ts | 108 +- .../test/gapic_linting_service_v1.ts | 102 +- .../test/gapic_provisioning_v1.ts | 120 +- ...c_runtime_project_attachment_service_v1.ts | 124 +- ...nippet_metadata.google.cloud.asset.v1.json | 2 +- ...nippet_metadata_google.cloud.asset.v1.json | 2 +- ...metadata.google.cloud.asset.v1p1beta1.json | 2 +- ...metadata_google.cloud.asset.v1p1beta1.json | 2 +- ...metadata.google.cloud.asset.v1p2beta1.json | 2 +- ...metadata_google.cloud.asset.v1p2beta1.json | 2 +- ...metadata.google.cloud.asset.v1p4beta1.json | 2 +- ...metadata.google.cloud.asset.v1p5beta1.json | 2 +- ...metadata_google.cloud.asset.v1p5beta1.json | 2 +- ...metadata.google.cloud.asset.v1p7beta1.json | 2 +- ...metadata_google.cloud.asset.v1p7beta1.json | 2 +- packages/google-cloud-dns/README.md | 4 +- packages/google-cloud-dns/package.json | 3 +- ...ippet_metadata.google.cloud.vision.v1.json | 2 +- ...ippet_metadata_google.cloud.vision.v1.json | 2 +- ...etadata.google.cloud.vision.v1p1beta1.json | 2 +- ...etadata_google.cloud.vision.v1p1beta1.json | 2 +- ...etadata.google.cloud.vision.v1p2beta1.json | 2 +- ...etadata_google.cloud.vision.v1p2beta1.json | 2 +- ...etadata.google.cloud.vision.v1p3beta1.json | 2 +- ...etadata_google.cloud.vision.v1p3beta1.json | 2 +- ...etadata.google.cloud.vision.v1p4beta1.json | 2 +- ...etadata_google.cloud.vision.v1p4beta1.json | 2 +- .../package.json | 2 +- ....google.devtools.containeranalysis.v1.json | 2 +- ..._google.devtools.containeranalysis.v1.json | 2 +- ...le.devtools.containeranalysis.v1beta1.json | 2 +- ...le.devtools.containeranalysis.v1beta1.json | 2 +- 277 files changed, 9377 insertions(+), 6955 deletions(-) diff --git a/packages/google-ads-admanager/package.json b/packages/google-ads-admanager/package.json index ce4b88e47a5..34b845896e8 100644 --- a/packages/google-ads-admanager/package.json +++ b/packages/google-ads-admanager/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json b/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json index 2b992d7a1d5..6476f8d525d 100644 --- a/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json +++ b/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admanager", - "version": "0.1.1", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts b/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts index 78e6d906ec9..0c317429df6 100644 --- a/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts +++ b/packages/google-ads-admanager/src/v1/ad_unit_service_client.ts @@ -521,7 +521,9 @@ export class AdUnitServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAdUnit request %j', request); const wrappedCallback: | Callback< @@ -655,7 +657,9 @@ export class AdUnitServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListAdUnitsRequest, @@ -738,7 +742,9 @@ export class AdUnitServiceClient { }); const defaultCallSettings = this._defaults['listAdUnits']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdUnits stream %j', request); return this.descriptors.page.listAdUnits.createStream( this.innerApiCalls.listAdUnits as GaxCall, @@ -803,7 +809,9 @@ export class AdUnitServiceClient { }); const defaultCallSettings = this._defaults['listAdUnits']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdUnits iterate %j', request); return this.descriptors.page.listAdUnits.asyncIterate( this.innerApiCalls['listAdUnits'] as GaxCall, @@ -923,7 +931,9 @@ export class AdUnitServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListAdUnitSizesRequest, @@ -1006,7 +1016,9 @@ export class AdUnitServiceClient { }); const defaultCallSettings = this._defaults['listAdUnitSizes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdUnitSizes stream %j', request); return this.descriptors.page.listAdUnitSizes.createStream( this.innerApiCalls.listAdUnitSizes as GaxCall, @@ -1071,7 +1083,9 @@ export class AdUnitServiceClient { }); const defaultCallSettings = this._defaults['listAdUnitSizes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdUnitSizes iterate %j', request); return this.descriptors.page.listAdUnitSizes.asyncIterate( this.innerApiCalls['listAdUnitSizes'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/company_service_client.ts b/packages/google-ads-admanager/src/v1/company_service_client.ts index 9a575bf01c6..e8480d32a0d 100644 --- a/packages/google-ads-admanager/src/v1/company_service_client.ts +++ b/packages/google-ads-admanager/src/v1/company_service_client.ts @@ -512,7 +512,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCompany request %j', request); const wrappedCallback: | Callback< @@ -646,7 +648,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListCompaniesRequest, @@ -729,7 +733,9 @@ export class CompanyServiceClient { }); const defaultCallSettings = this._defaults['listCompanies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompanies stream %j', request); return this.descriptors.page.listCompanies.createStream( this.innerApiCalls.listCompanies as GaxCall, @@ -794,7 +800,9 @@ export class CompanyServiceClient { }); const defaultCallSettings = this._defaults['listCompanies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompanies iterate %j', request); return this.descriptors.page.listCompanies.asyncIterate( this.innerApiCalls['listCompanies'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/custom_field_service_client.ts b/packages/google-ads-admanager/src/v1/custom_field_service_client.ts index b5553cbfeb3..44d2c8a6013 100644 --- a/packages/google-ads-admanager/src/v1/custom_field_service_client.ts +++ b/packages/google-ads-admanager/src/v1/custom_field_service_client.ts @@ -517,7 +517,9 @@ export class CustomFieldServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomField request %j', request); const wrappedCallback: | Callback< @@ -659,7 +661,9 @@ export class CustomFieldServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListCustomFieldsRequest, @@ -742,7 +746,9 @@ export class CustomFieldServiceClient { }); const defaultCallSettings = this._defaults['listCustomFields']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomFields stream %j', request); return this.descriptors.page.listCustomFields.createStream( this.innerApiCalls.listCustomFields as GaxCall, @@ -807,7 +813,9 @@ export class CustomFieldServiceClient { }); const defaultCallSettings = this._defaults['listCustomFields']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomFields iterate %j', request); return this.descriptors.page.listCustomFields.asyncIterate( this.innerApiCalls['listCustomFields'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts b/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts index 816b6586a6a..559e1d7a83d 100644 --- a/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts +++ b/packages/google-ads-admanager/src/v1/custom_targeting_key_service_client.ts @@ -526,7 +526,9 @@ export class CustomTargetingKeyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomTargetingKey request %j', request); const wrappedCallback: | Callback< @@ -671,7 +673,9 @@ export class CustomTargetingKeyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListCustomTargetingKeysRequest, @@ -754,7 +758,9 @@ export class CustomTargetingKeyServiceClient { }); const defaultCallSettings = this._defaults['listCustomTargetingKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomTargetingKeys stream %j', request); return this.descriptors.page.listCustomTargetingKeys.createStream( this.innerApiCalls.listCustomTargetingKeys as GaxCall, @@ -819,7 +825,9 @@ export class CustomTargetingKeyServiceClient { }); const defaultCallSettings = this._defaults['listCustomTargetingKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomTargetingKeys iterate %j', request); return this.descriptors.page.listCustomTargetingKeys.asyncIterate( this.innerApiCalls['listCustomTargetingKeys'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts b/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts index c41cbe102af..5b7a78e28b3 100644 --- a/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts +++ b/packages/google-ads-admanager/src/v1/custom_targeting_value_service_client.ts @@ -532,7 +532,9 @@ export class CustomTargetingValueServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomTargetingValue request %j', request); const wrappedCallback: | Callback< @@ -680,7 +682,9 @@ export class CustomTargetingValueServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListCustomTargetingValuesRequest, @@ -766,7 +770,9 @@ export class CustomTargetingValueServiceClient { }); const defaultCallSettings = this._defaults['listCustomTargetingValues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomTargetingValues stream %j', request); return this.descriptors.page.listCustomTargetingValues.createStream( this.innerApiCalls.listCustomTargetingValues as GaxCall, @@ -834,7 +840,9 @@ export class CustomTargetingValueServiceClient { }); const defaultCallSettings = this._defaults['listCustomTargetingValues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomTargetingValues iterate %j', request); return this.descriptors.page.listCustomTargetingValues.asyncIterate( this.innerApiCalls['listCustomTargetingValues'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts b/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts index 962c78f2da5..8252bfe50a2 100644 --- a/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts +++ b/packages/google-ads-admanager/src/v1/entity_signals_mapping_service_client.ts @@ -536,7 +536,9 @@ export class EntitySignalsMappingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntitySignalsMapping request %j', request); const wrappedCallback: | Callback< @@ -664,7 +666,9 @@ export class EntitySignalsMappingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEntitySignalsMapping request %j', request); const wrappedCallback: | Callback< @@ -796,7 +800,9 @@ export class EntitySignalsMappingServiceClient { this._gaxModule.routingHeader.fromParams({ 'entity_signals_mapping.name': request.entitySignalsMapping!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEntitySignalsMapping request %j', request); const wrappedCallback: | Callback< @@ -926,7 +932,9 @@ export class EntitySignalsMappingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateEntitySignalsMappings request %j', request); const wrappedCallback: | Callback< @@ -1062,7 +1070,9 @@ export class EntitySignalsMappingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateEntitySignalsMappings request %j', request); const wrappedCallback: | Callback< @@ -1215,7 +1225,9 @@ export class EntitySignalsMappingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListEntitySignalsMappingsRequest, @@ -1300,7 +1312,9 @@ export class EntitySignalsMappingServiceClient { }); const defaultCallSettings = this._defaults['listEntitySignalsMappings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitySignalsMappings stream %j', request); return this.descriptors.page.listEntitySignalsMappings.createStream( this.innerApiCalls.listEntitySignalsMappings as GaxCall, @@ -1367,7 +1381,9 @@ export class EntitySignalsMappingServiceClient { }); const defaultCallSettings = this._defaults['listEntitySignalsMappings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitySignalsMappings iterate %j', request); return this.descriptors.page.listEntitySignalsMappings.asyncIterate( this.innerApiCalls['listEntitySignalsMappings'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/network_service_client.ts b/packages/google-ads-admanager/src/v1/network_service_client.ts index fa7025a8fd9..e9ee646b0ba 100644 --- a/packages/google-ads-admanager/src/v1/network_service_client.ts +++ b/packages/google-ads-admanager/src/v1/network_service_client.ts @@ -499,7 +499,9 @@ export class NetworkServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNetwork request %j', request); const wrappedCallback: | Callback< @@ -601,7 +603,9 @@ export class NetworkServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworks request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ads-admanager/src/v1/order_service_client.ts b/packages/google-ads-admanager/src/v1/order_service_client.ts index 876f48629b4..cbee3549413 100644 --- a/packages/google-ads-admanager/src/v1/order_service_client.ts +++ b/packages/google-ads-admanager/src/v1/order_service_client.ts @@ -512,7 +512,9 @@ export class OrderServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrder request %j', request); const wrappedCallback: | Callback< @@ -649,7 +651,9 @@ export class OrderServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListOrdersRequest, @@ -730,7 +734,9 @@ export class OrderServiceClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders stream %j', request); return this.descriptors.page.listOrders.createStream( this.innerApiCalls.listOrders as GaxCall, @@ -795,7 +801,9 @@ export class OrderServiceClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders iterate %j', request); return this.descriptors.page.listOrders.asyncIterate( this.innerApiCalls['listOrders'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/placement_service_client.ts b/packages/google-ads-admanager/src/v1/placement_service_client.ts index 9462a779868..6cd39c4e800 100644 --- a/packages/google-ads-admanager/src/v1/placement_service_client.ts +++ b/packages/google-ads-admanager/src/v1/placement_service_client.ts @@ -514,7 +514,9 @@ export class PlacementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPlacement request %j', request); const wrappedCallback: | Callback< @@ -650,7 +652,9 @@ export class PlacementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListPlacementsRequest, @@ -733,7 +737,9 @@ export class PlacementServiceClient { }); const defaultCallSettings = this._defaults['listPlacements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPlacements stream %j', request); return this.descriptors.page.listPlacements.createStream( this.innerApiCalls.listPlacements as GaxCall, @@ -798,7 +804,9 @@ export class PlacementServiceClient { }); const defaultCallSettings = this._defaults['listPlacements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPlacements iterate %j', request); return this.descriptors.page.listPlacements.asyncIterate( this.innerApiCalls['listPlacements'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/report_service_client.ts b/packages/google-ads-admanager/src/v1/report_service_client.ts index 8650d74244a..dd27714ece4 100644 --- a/packages/google-ads-admanager/src/v1/report_service_client.ts +++ b/packages/google-ads-admanager/src/v1/report_service_client.ts @@ -568,7 +568,9 @@ export class ReportServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReport request %j', request); const wrappedCallback: | Callback< @@ -679,7 +681,9 @@ export class ReportServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReport request %j', request); const wrappedCallback: | Callback< @@ -791,7 +795,9 @@ export class ReportServiceClient { this._gaxModule.routingHeader.fromParams({ 'report.name': request.report!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateReport request %j', request); const wrappedCallback: | Callback< @@ -928,7 +934,9 @@ export class ReportServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1102,7 +1110,9 @@ export class ReportServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListReportsRequest, @@ -1185,7 +1195,9 @@ export class ReportServiceClient { }); const defaultCallSettings = this._defaults['listReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReports stream %j', request); return this.descriptors.page.listReports.createStream( this.innerApiCalls.listReports as GaxCall, @@ -1250,7 +1262,9 @@ export class ReportServiceClient { }); const defaultCallSettings = this._defaults['listReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReports iterate %j', request); return this.descriptors.page.listReports.asyncIterate( this.innerApiCalls['listReports'] as GaxCall, @@ -1360,7 +1374,9 @@ export class ReportServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest, @@ -1430,7 +1446,9 @@ export class ReportServiceClient { }); const defaultCallSettings = this._defaults['fetchReportResultRows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchReportResultRows stream %j', request); return this.descriptors.page.fetchReportResultRows.createStream( this.innerApiCalls.fetchReportResultRows as GaxCall, @@ -1482,7 +1500,9 @@ export class ReportServiceClient { }); const defaultCallSettings = this._defaults['fetchReportResultRows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchReportResultRows iterate %j', request); return this.descriptors.page.fetchReportResultRows.asyncIterate( this.innerApiCalls['fetchReportResultRows'] as GaxCall, @@ -1584,7 +1604,7 @@ export class ReportServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-ads-admanager/src/v1/role_service_client.ts b/packages/google-ads-admanager/src/v1/role_service_client.ts index 507a2ea2e3b..9b3e028c286 100644 --- a/packages/google-ads-admanager/src/v1/role_service_client.ts +++ b/packages/google-ads-admanager/src/v1/role_service_client.ts @@ -512,7 +512,9 @@ export class RoleServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRole request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class RoleServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListRolesRequest, @@ -723,7 +727,9 @@ export class RoleServiceClient { }); const defaultCallSettings = this._defaults['listRoles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoles stream %j', request); return this.descriptors.page.listRoles.createStream( this.innerApiCalls.listRoles as GaxCall, @@ -787,7 +793,9 @@ export class RoleServiceClient { }); const defaultCallSettings = this._defaults['listRoles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoles iterate %j', request); return this.descriptors.page.listRoles.asyncIterate( this.innerApiCalls['listRoles'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts b/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts index 1dcaf61e4c7..6b8b40cdcec 100644 --- a/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts +++ b/packages/google-ads-admanager/src/v1/taxonomy_category_service_client.ts @@ -524,7 +524,9 @@ export class TaxonomyCategoryServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTaxonomyCategory request %j', request); const wrappedCallback: | Callback< @@ -669,7 +671,9 @@ export class TaxonomyCategoryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ads.admanager.v1.IListTaxonomyCategoriesRequest, @@ -752,7 +756,9 @@ export class TaxonomyCategoryServiceClient { }); const defaultCallSettings = this._defaults['listTaxonomyCategories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTaxonomyCategories stream %j', request); return this.descriptors.page.listTaxonomyCategories.createStream( this.innerApiCalls.listTaxonomyCategories as GaxCall, @@ -817,7 +823,9 @@ export class TaxonomyCategoryServiceClient { }); const defaultCallSettings = this._defaults['listTaxonomyCategories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTaxonomyCategories iterate %j', request); return this.descriptors.page.listTaxonomyCategories.asyncIterate( this.innerApiCalls['listTaxonomyCategories'] as GaxCall, diff --git a/packages/google-ads-admanager/src/v1/user_service_client.ts b/packages/google-ads-admanager/src/v1/user_service_client.ts index 2c6893bb11f..6fadab8e5f6 100644 --- a/packages/google-ads-admanager/src/v1/user_service_client.ts +++ b/packages/google-ads-admanager/src/v1/user_service_client.ts @@ -502,7 +502,9 @@ export class UserServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUser request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts b/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts index c69003c11aa..900e9c3ee91 100644 --- a/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_ad_unit_service_v1.ts @@ -265,7 +265,9 @@ describe('v1.AdUnitServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.adUnitServiceStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.AdUnitServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetAdUnitRequest() ); @@ -355,7 +357,7 @@ describe('v1.AdUnitServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetAdUnitRequest() ); @@ -402,7 +404,7 @@ describe('v1.AdUnitServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetAdUnitRequest() ); @@ -430,7 +432,7 @@ describe('v1.AdUnitServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetAdUnitRequest() ); @@ -451,7 +453,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitsRequest() ); @@ -484,7 +486,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitsRequest() ); @@ -533,7 +535,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitsRequest() ); @@ -564,7 +566,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitsRequest() ); @@ -615,7 +617,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitsRequest() ); @@ -663,7 +665,7 @@ describe('v1.AdUnitServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitsRequest() ); @@ -706,7 +708,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitsRequest() ); @@ -750,7 +752,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitSizesRequest() ); @@ -783,7 +785,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitSizesRequest() ); @@ -832,7 +834,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitSizesRequest() ); @@ -863,7 +865,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitSizesRequest() ); @@ -917,7 +919,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitSizesRequest() ); @@ -966,7 +968,7 @@ describe('v1.AdUnitServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitSizesRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListAdUnitSizesRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.AdUnitServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1056,7 +1058,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1095,7 +1097,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1105,7 +1107,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1144,7 +1146,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1154,7 +1156,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1193,7 +1195,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1203,7 +1205,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1245,7 +1247,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1255,7 +1257,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1308,7 +1310,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1319,7 +1321,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1389,7 +1391,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1399,7 +1401,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1454,7 +1456,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1464,7 +1466,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1503,7 +1505,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1512,7 +1514,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1541,7 +1543,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1551,7 +1553,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1590,7 +1592,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1600,7 +1602,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1642,7 +1644,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1652,7 +1654,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1691,7 +1693,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1701,7 +1703,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1740,7 +1742,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1750,7 +1752,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1797,7 +1799,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1807,7 +1809,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1846,7 +1848,7 @@ describe('v1.AdUnitServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1856,7 +1858,7 @@ describe('v1.AdUnitServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_company_service_v1.ts b/packages/google-ads-admanager/test/gapic_company_service_v1.ts index 7efe0358365..0b9687d12d9 100644 --- a/packages/google-ads-admanager/test/gapic_company_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_company_service_v1.ts @@ -265,7 +265,9 @@ describe('v1.CompanyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.companyServiceStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.CompanyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCompanyRequest() ); @@ -355,7 +357,7 @@ describe('v1.CompanyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCompanyRequest() ); @@ -402,7 +404,7 @@ describe('v1.CompanyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCompanyRequest() ); @@ -433,7 +435,7 @@ describe('v1.CompanyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCompanyRequest() ); @@ -454,7 +456,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCompaniesRequest() ); @@ -487,7 +489,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCompaniesRequest() ); @@ -536,7 +538,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCompaniesRequest() ); @@ -567,7 +569,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCompaniesRequest() ); @@ -621,7 +623,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCompaniesRequest() ); @@ -670,7 +672,7 @@ describe('v1.CompanyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCompaniesRequest() ); @@ -713,7 +715,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCompaniesRequest() ); @@ -750,7 +752,7 @@ describe('v1.CompanyServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -760,7 +762,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -799,7 +801,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -809,7 +811,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -848,7 +850,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -858,7 +860,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -897,7 +899,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -907,7 +909,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -949,7 +951,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -959,7 +961,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1012,7 +1014,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1023,7 +1025,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1093,7 +1095,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1103,7 +1105,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1158,7 +1160,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1168,7 +1170,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1207,7 +1209,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1216,7 +1218,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1245,7 +1247,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1255,7 +1257,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1294,7 +1296,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1304,7 +1306,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1346,7 +1348,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1356,7 +1358,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1395,7 +1397,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1405,7 +1407,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1444,7 +1446,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1454,7 +1456,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1501,7 +1503,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1511,7 +1513,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1550,7 +1552,7 @@ describe('v1.CompanyServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1560,7 +1562,7 @@ describe('v1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts b/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts index 64da7ed5784..7d3d20e6b2f 100644 --- a/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_custom_field_service_v1.ts @@ -267,7 +267,9 @@ describe('v1.CustomFieldServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.customFieldServiceStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.CustomFieldServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomFieldRequest() ); @@ -357,7 +359,7 @@ describe('v1.CustomFieldServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomFieldRequest() ); @@ -404,7 +406,7 @@ describe('v1.CustomFieldServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomFieldRequest() ); @@ -435,7 +437,7 @@ describe('v1.CustomFieldServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomFieldRequest() ); @@ -456,7 +458,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomFieldsRequest() ); @@ -489,7 +491,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomFieldsRequest() ); @@ -538,7 +540,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomFieldsRequest() ); @@ -569,7 +571,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomFieldsRequest() ); @@ -623,7 +625,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomFieldsRequest() ); @@ -672,7 +674,7 @@ describe('v1.CustomFieldServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomFieldsRequest() ); @@ -715,7 +717,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomFieldsRequest() ); @@ -752,7 +754,7 @@ describe('v1.CustomFieldServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -762,7 +764,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -801,7 +803,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -811,7 +813,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -850,7 +852,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -860,7 +862,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -899,7 +901,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -909,7 +911,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -951,7 +953,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -961,7 +963,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1014,7 +1016,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1025,7 +1027,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1095,7 +1097,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1105,7 +1107,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1160,7 +1162,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1170,7 +1172,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1209,7 +1211,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1218,7 +1220,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1247,7 +1249,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1257,7 +1259,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1296,7 +1298,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1306,7 +1308,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1348,7 +1350,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1358,7 +1360,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1397,7 +1399,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1407,7 +1409,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1446,7 +1448,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1456,7 +1458,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1503,7 +1505,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1513,7 +1515,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1552,7 +1554,7 @@ describe('v1.CustomFieldServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1562,7 +1564,7 @@ describe('v1.CustomFieldServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts b/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts index c4259844aa8..41e84c5438a 100644 --- a/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_custom_targeting_key_service_v1.ts @@ -278,7 +278,9 @@ describe('v1.CustomTargetingKeyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.customTargetingKeyServiceStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingKeyRequest() ); @@ -374,7 +376,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingKeyRequest() ); @@ -422,7 +424,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingKeyRequest() ); @@ -457,7 +459,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingKeyRequest() ); @@ -482,7 +484,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingKeysRequest() ); @@ -523,7 +525,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingKeysRequest() ); @@ -579,7 +581,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingKeysRequest() ); @@ -614,7 +616,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingKeysRequest() ); @@ -682,7 +684,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingKeysRequest() ); @@ -739,7 +741,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingKeysRequest() ); @@ -794,7 +796,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingKeysRequest() ); @@ -836,7 +838,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -847,7 +849,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -886,7 +888,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -897,7 +899,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -936,7 +938,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -947,7 +949,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -986,7 +988,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -997,7 +999,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1039,7 +1041,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1050,7 +1052,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1103,7 +1105,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1115,7 +1117,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1185,7 +1187,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1196,7 +1198,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1251,7 +1253,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1262,7 +1264,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1301,7 +1303,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1311,7 +1313,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1340,7 +1342,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1351,7 +1353,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1390,7 +1392,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1401,7 +1403,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1443,7 +1445,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1454,7 +1456,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1493,7 +1495,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1504,7 +1506,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1543,7 +1545,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1554,7 +1556,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1601,7 +1603,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1612,7 +1614,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1651,7 +1653,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1662,7 +1664,7 @@ describe('v1.CustomTargetingKeyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts b/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts index 49c8fabc03a..2e6bc883bb4 100644 --- a/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_custom_targeting_value_service_v1.ts @@ -284,7 +284,9 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.customTargetingValueServiceStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingValueRequest() ); @@ -390,7 +392,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingValueRequest() ); @@ -440,7 +442,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingValueRequest() ); @@ -477,7 +479,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetCustomTargetingValueRequest() ); @@ -504,7 +506,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingValuesRequest() ); @@ -547,7 +549,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingValuesRequest() ); @@ -607,7 +609,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingValuesRequest() ); @@ -644,7 +646,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingValuesRequest() ); @@ -714,7 +716,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingValuesRequest() ); @@ -773,7 +775,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingValuesRequest() ); @@ -830,7 +832,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListCustomTargetingValuesRequest() ); @@ -872,7 +874,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -885,7 +887,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -924,7 +926,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -937,7 +939,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -976,7 +978,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -989,7 +991,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1028,7 +1030,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1041,7 +1043,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1083,7 +1085,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1096,7 +1098,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1149,7 +1151,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1163,7 +1165,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1233,7 +1235,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1246,7 +1248,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1301,7 +1303,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1314,7 +1316,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1353,7 +1355,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1365,7 +1367,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1394,7 +1396,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1407,7 +1409,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1446,7 +1448,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1459,7 +1461,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1501,7 +1503,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1514,7 +1516,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1553,7 +1555,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1566,7 +1568,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1605,7 +1607,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1618,7 +1620,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1665,7 +1667,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1678,7 +1680,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1717,7 +1719,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1730,7 +1732,7 @@ describe('v1.CustomTargetingValueServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts b/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts index 7efb83ac762..3d20a0f82ba 100644 --- a/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_entity_signals_mapping_service_v1.ts @@ -284,7 +284,9 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.entitySignalsMappingServiceStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetEntitySignalsMappingRequest() ); @@ -390,7 +392,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetEntitySignalsMappingRequest() ); @@ -440,7 +442,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetEntitySignalsMappingRequest() ); @@ -477,7 +479,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetEntitySignalsMappingRequest() ); @@ -504,7 +506,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateEntitySignalsMappingRequest() ); @@ -539,7 +541,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateEntitySignalsMappingRequest() ); @@ -589,7 +591,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateEntitySignalsMappingRequest() ); @@ -626,7 +628,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateEntitySignalsMappingRequest() ); @@ -653,7 +655,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest() ); @@ -689,7 +691,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest() ); @@ -740,7 +742,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest() ); @@ -778,7 +780,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateEntitySignalsMappingRequest() ); @@ -806,7 +808,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest() ); @@ -841,7 +843,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest() ); @@ -891,7 +893,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest() ); @@ -928,7 +930,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchCreateEntitySignalsMappingsRequest() ); @@ -955,7 +957,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest() ); @@ -990,7 +992,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest() ); @@ -1040,7 +1042,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest() ); @@ -1077,7 +1079,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.BatchUpdateEntitySignalsMappingsRequest() ); @@ -1104,7 +1106,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListEntitySignalsMappingsRequest() ); @@ -1147,7 +1149,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListEntitySignalsMappingsRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListEntitySignalsMappingsRequest() ); @@ -1244,7 +1246,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListEntitySignalsMappingsRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListEntitySignalsMappingsRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListEntitySignalsMappingsRequest() ); @@ -1430,7 +1432,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListEntitySignalsMappingsRequest() ); @@ -1472,7 +1474,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1485,7 +1487,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1524,7 +1526,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1537,7 +1539,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1576,7 +1578,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1589,7 +1591,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1628,7 +1630,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1641,7 +1643,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1683,7 +1685,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1696,7 +1698,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1749,7 +1751,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1763,7 +1765,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1833,7 +1835,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1846,7 +1848,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1901,7 +1903,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1914,7 +1916,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1953,7 +1955,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1965,7 +1967,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1994,7 +1996,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2007,7 +2009,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2046,7 +2048,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2059,7 +2061,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2101,7 +2103,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2114,7 +2116,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2153,7 +2155,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2166,7 +2168,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2205,7 +2207,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2218,7 +2220,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2265,7 +2267,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2278,7 +2280,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2317,7 +2319,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2330,7 +2332,7 @@ describe('v1.EntitySignalsMappingServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_network_service_v1.ts b/packages/google-ads-admanager/test/gapic_network_service_v1.ts index 5dbf8c405b2..750c2a83961 100644 --- a/packages/google-ads-admanager/test/gapic_network_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_network_service_v1.ts @@ -202,7 +202,9 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkServiceStub); client.close().then(() => { done(); @@ -261,7 +263,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetNetworkRequest() ); @@ -292,7 +294,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetNetworkRequest() ); @@ -339,7 +341,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetNetworkRequest() ); @@ -370,7 +372,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetNetworkRequest() ); @@ -391,7 +393,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListNetworksRequest() ); @@ -408,7 +410,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListNetworksRequest() ); @@ -441,7 +443,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListNetworksRequest() ); @@ -458,7 +460,7 @@ describe('v1.NetworkServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListNetworksRequest() ); @@ -469,7 +471,7 @@ describe('v1.NetworkServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -479,7 +481,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -518,7 +520,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -528,7 +530,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -567,7 +569,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -577,7 +579,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -616,7 +618,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -626,7 +628,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -668,7 +670,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -678,7 +680,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -731,7 +733,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -742,7 +744,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -812,7 +814,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -822,7 +824,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -877,7 +879,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -887,7 +889,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -926,7 +928,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -935,7 +937,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -964,7 +966,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -974,7 +976,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1013,7 +1015,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1023,7 +1025,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1065,7 +1067,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1075,7 +1077,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1114,7 +1116,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1124,7 +1126,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1163,7 +1165,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1173,7 +1175,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1220,7 +1222,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1230,7 +1232,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1269,7 +1271,7 @@ describe('v1.NetworkServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1279,7 +1281,7 @@ describe('v1.NetworkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_order_service_v1.ts b/packages/google-ads-admanager/test/gapic_order_service_v1.ts index eca8b86b0c7..bd14d3f8d51 100644 --- a/packages/google-ads-admanager/test/gapic_order_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_order_service_v1.ts @@ -265,7 +265,9 @@ describe('v1.OrderServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.orderServiceStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.OrderServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetOrderRequest() ); @@ -355,7 +357,7 @@ describe('v1.OrderServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetOrderRequest() ); @@ -402,7 +404,7 @@ describe('v1.OrderServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetOrderRequest() ); @@ -430,7 +432,7 @@ describe('v1.OrderServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetOrderRequest() ); @@ -451,7 +453,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListOrdersRequest() ); @@ -484,7 +486,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListOrdersRequest() ); @@ -533,7 +535,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListOrdersRequest() ); @@ -564,7 +566,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListOrdersRequest() ); @@ -615,7 +617,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListOrdersRequest() ); @@ -663,7 +665,7 @@ describe('v1.OrderServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListOrdersRequest() ); @@ -706,7 +708,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListOrdersRequest() ); @@ -745,7 +747,7 @@ describe('v1.OrderServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -755,7 +757,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -794,7 +796,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -804,7 +806,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -843,7 +845,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -853,7 +855,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -892,7 +894,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -902,7 +904,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -944,7 +946,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -954,7 +956,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1007,7 +1009,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1018,7 +1020,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1088,7 +1090,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1098,7 +1100,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1153,7 +1155,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1163,7 +1165,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1202,7 +1204,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1211,7 +1213,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1240,7 +1242,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1250,7 +1252,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1289,7 +1291,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1299,7 +1301,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1341,7 +1343,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1351,7 +1353,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1390,7 +1392,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1400,7 +1402,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1439,7 +1441,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1449,7 +1451,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1496,7 +1498,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1506,7 +1508,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1545,7 +1547,7 @@ describe('v1.OrderServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1555,7 +1557,7 @@ describe('v1.OrderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_placement_service_v1.ts b/packages/google-ads-admanager/test/gapic_placement_service_v1.ts index ec1b64a65f4..63939b58ebd 100644 --- a/packages/google-ads-admanager/test/gapic_placement_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_placement_service_v1.ts @@ -265,7 +265,9 @@ describe('v1.PlacementServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.placementServiceStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.PlacementServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetPlacementRequest() ); @@ -355,7 +357,7 @@ describe('v1.PlacementServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetPlacementRequest() ); @@ -402,7 +404,7 @@ describe('v1.PlacementServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetPlacementRequest() ); @@ -433,7 +435,7 @@ describe('v1.PlacementServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetPlacementRequest() ); @@ -454,7 +456,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListPlacementsRequest() ); @@ -487,7 +489,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListPlacementsRequest() ); @@ -536,7 +538,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListPlacementsRequest() ); @@ -567,7 +569,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListPlacementsRequest() ); @@ -621,7 +623,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListPlacementsRequest() ); @@ -670,7 +672,7 @@ describe('v1.PlacementServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListPlacementsRequest() ); @@ -713,7 +715,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListPlacementsRequest() ); @@ -750,7 +752,7 @@ describe('v1.PlacementServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -760,7 +762,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -799,7 +801,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -809,7 +811,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -848,7 +850,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -858,7 +860,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -897,7 +899,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -907,7 +909,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -949,7 +951,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -959,7 +961,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1012,7 +1014,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1023,7 +1025,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1093,7 +1095,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1103,7 +1105,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1158,7 +1160,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1168,7 +1170,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1207,7 +1209,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1216,7 +1218,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1245,7 +1247,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1255,7 +1257,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1294,7 +1296,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1304,7 +1306,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1346,7 +1348,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1356,7 +1358,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1395,7 +1397,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1405,7 +1407,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1444,7 +1446,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1454,7 +1456,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1501,7 +1503,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1511,7 +1513,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1550,7 +1552,7 @@ describe('v1.PlacementServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1560,7 +1562,7 @@ describe('v1.PlacementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_report_service_v1.ts b/packages/google-ads-admanager/test/gapic_report_service_v1.ts index c6c84ca04e4..70a17b48bf7 100644 --- a/packages/google-ads-admanager/test/gapic_report_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_report_service_v1.ts @@ -297,7 +297,9 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.reportServiceStub); client.close().then(() => { done(); @@ -356,7 +358,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetReportRequest() ); @@ -387,7 +389,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetReportRequest() ); @@ -434,7 +436,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetReportRequest() ); @@ -462,7 +464,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetReportRequest() ); @@ -483,7 +485,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateReportRequest() ); @@ -514,7 +516,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateReportRequest() ); @@ -561,7 +563,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateReportRequest() ); @@ -592,7 +594,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.CreateReportRequest() ); @@ -613,7 +615,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateReportRequest() ); @@ -645,7 +647,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateReportRequest() ); @@ -693,7 +695,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateReportRequest() ); @@ -725,7 +727,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.UpdateReportRequest() ); @@ -747,7 +749,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.RunReportRequest() ); @@ -779,7 +781,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.RunReportRequest() ); @@ -833,7 +835,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.RunReportRequest() ); @@ -864,7 +866,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.RunReportRequest() ); @@ -897,7 +899,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -919,7 +921,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -937,7 +939,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListReportsRequest() ); @@ -970,7 +972,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListReportsRequest() ); @@ -1019,7 +1021,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListReportsRequest() ); @@ -1050,7 +1052,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListReportsRequest() ); @@ -1101,7 +1103,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListReportsRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListReportsRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListReportsRequest() ); @@ -1236,7 +1238,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.FetchReportResultRowsRequest() ); @@ -1276,7 +1278,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.FetchReportResultRowsRequest() ); @@ -1333,7 +1335,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.FetchReportResultRowsRequest() ); @@ -1367,7 +1369,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.FetchReportResultRowsRequest() ); @@ -1434,7 +1436,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.FetchReportResultRowsRequest() ); @@ -1490,7 +1492,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.FetchReportResultRowsRequest() ); @@ -1544,7 +1546,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.FetchReportResultRowsRequest() ); @@ -1590,7 +1592,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1669,7 +1671,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1749,7 +1751,7 @@ describe('v1.ReportServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1845,8 +1847,7 @@ describe('v1.ReportServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1865,7 +1866,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1874,8 +1875,7 @@ describe('v1.ReportServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1891,7 +1891,7 @@ describe('v1.ReportServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1901,7 +1901,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1940,7 +1940,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1950,7 +1950,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1989,7 +1989,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1999,7 +1999,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2038,7 +2038,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2048,7 +2048,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2090,7 +2090,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2100,7 +2100,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2153,7 +2153,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2164,7 +2164,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2234,7 +2234,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2244,7 +2244,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2299,7 +2299,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2309,7 +2309,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2348,7 +2348,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2357,7 +2357,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2386,7 +2386,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2396,7 +2396,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2435,7 +2435,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2445,7 +2445,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2487,7 +2487,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2497,7 +2497,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2536,7 +2536,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2546,7 +2546,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2585,7 +2585,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2595,7 +2595,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2642,7 +2642,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2652,7 +2652,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2691,7 +2691,7 @@ describe('v1.ReportServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -2701,7 +2701,7 @@ describe('v1.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_role_service_v1.ts b/packages/google-ads-admanager/test/gapic_role_service_v1.ts index c78ce0df729..d8390040565 100644 --- a/packages/google-ads-admanager/test/gapic_role_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_role_service_v1.ts @@ -263,7 +263,9 @@ describe('v1.RoleServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.roleServiceStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.RoleServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetRoleRequest() ); @@ -353,7 +355,7 @@ describe('v1.RoleServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetRoleRequest() ); @@ -400,7 +402,7 @@ describe('v1.RoleServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetRoleRequest() ); @@ -428,7 +430,7 @@ describe('v1.RoleServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetRoleRequest() ); @@ -449,7 +451,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListRolesRequest() ); @@ -482,7 +484,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListRolesRequest() ); @@ -531,7 +533,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListRolesRequest() ); @@ -559,7 +561,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListRolesRequest() ); @@ -610,7 +612,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListRolesRequest() ); @@ -658,7 +660,7 @@ describe('v1.RoleServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListRolesRequest() ); @@ -700,7 +702,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListRolesRequest() ); @@ -738,7 +740,7 @@ describe('v1.RoleServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -748,7 +750,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -787,7 +789,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -797,7 +799,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -836,7 +838,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -846,7 +848,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -885,7 +887,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -895,7 +897,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -937,7 +939,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -947,7 +949,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1000,7 +1002,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1011,7 +1013,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1081,7 +1083,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1091,7 +1093,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1146,7 +1148,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1156,7 +1158,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1195,7 +1197,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1204,7 +1206,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1233,7 +1235,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1243,7 +1245,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1282,7 +1284,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1292,7 +1294,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1334,7 +1336,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1344,7 +1346,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1383,7 +1385,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1393,7 +1395,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1432,7 +1434,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1442,7 +1444,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1489,7 +1491,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1499,7 +1501,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1538,7 +1540,7 @@ describe('v1.RoleServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1548,7 +1550,7 @@ describe('v1.RoleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts b/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts index d3f78c8905e..5c63306665f 100644 --- a/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_taxonomy_category_service_v1.ts @@ -278,7 +278,9 @@ describe('v1.TaxonomyCategoryServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.taxonomyCategoryServiceStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetTaxonomyCategoryRequest() ); @@ -374,7 +376,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetTaxonomyCategoryRequest() ); @@ -422,7 +424,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetTaxonomyCategoryRequest() ); @@ -454,7 +456,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetTaxonomyCategoryRequest() ); @@ -476,7 +478,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListTaxonomyCategoriesRequest() ); @@ -517,7 +519,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListTaxonomyCategoriesRequest() ); @@ -573,7 +575,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListTaxonomyCategoriesRequest() ); @@ -608,7 +610,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListTaxonomyCategoriesRequest() ); @@ -675,7 +677,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListTaxonomyCategoriesRequest() ); @@ -731,7 +733,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListTaxonomyCategoriesRequest() ); @@ -785,7 +787,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.ListTaxonomyCategoriesRequest() ); @@ -827,7 +829,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -838,7 +840,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -877,7 +879,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -888,7 +890,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -927,7 +929,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -938,7 +940,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -977,7 +979,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -988,7 +990,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1030,7 +1032,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1041,7 +1043,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1094,7 +1096,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1106,7 +1108,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1176,7 +1178,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1187,7 +1189,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1242,7 +1244,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1253,7 +1255,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1292,7 +1294,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1302,7 +1304,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1331,7 +1333,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1342,7 +1344,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1381,7 +1383,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1392,7 +1394,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1434,7 +1436,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1445,7 +1447,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1484,7 +1486,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1495,7 +1497,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1534,7 +1536,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1545,7 +1547,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1592,7 +1594,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1603,7 +1605,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1642,7 +1644,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1653,7 +1655,7 @@ describe('v1.TaxonomyCategoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ads-admanager/test/gapic_user_service_v1.ts b/packages/google-ads-admanager/test/gapic_user_service_v1.ts index 76583d3db9a..e01dd3ab972 100644 --- a/packages/google-ads-admanager/test/gapic_user_service_v1.ts +++ b/packages/google-ads-admanager/test/gapic_user_service_v1.ts @@ -200,7 +200,9 @@ describe('v1.UserServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userServiceStub); client.close().then(() => { done(); @@ -259,7 +261,7 @@ describe('v1.UserServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetUserRequest() ); @@ -290,7 +292,7 @@ describe('v1.UserServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetUserRequest() ); @@ -337,7 +339,7 @@ describe('v1.UserServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetUserRequest() ); @@ -365,7 +367,7 @@ describe('v1.UserServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ads.admanager.v1.GetUserRequest() ); @@ -381,7 +383,7 @@ describe('v1.UserServiceClient', () => { }); describe('Path templates', () => { - describe('adUnit', () => { + describe('adUnit', async () => { const fakePath = '/rendered/path/adUnit'; const expectedParameters = { network_code: 'networkCodeValue', @@ -391,7 +393,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adUnitPathTemplate.render = sinon .stub() .returns(fakePath); @@ -430,7 +432,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { network_code: 'networkCodeValue', @@ -440,7 +442,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -479,7 +481,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('contact', () => { + describe('contact', async () => { const fakePath = '/rendered/path/contact'; const expectedParameters = { network_code: 'networkCodeValue', @@ -489,7 +491,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -528,7 +530,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('customField', () => { + describe('customField', async () => { const fakePath = '/rendered/path/customField'; const expectedParameters = { network_code: 'networkCodeValue', @@ -538,7 +540,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customFieldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -580,7 +582,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('customTargetingKey', () => { + describe('customTargetingKey', async () => { const fakePath = '/rendered/path/customTargetingKey'; const expectedParameters = { network_code: 'networkCodeValue', @@ -590,7 +592,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -643,7 +645,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('customTargetingValue', () => { + describe('customTargetingValue', async () => { const fakePath = '/rendered/path/customTargetingValue'; const expectedParameters = { network_code: 'networkCodeValue', @@ -654,7 +656,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetingValuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -724,7 +726,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('entitySignalsMapping', () => { + describe('entitySignalsMapping', async () => { const fakePath = '/rendered/path/entitySignalsMapping'; const expectedParameters = { network_code: 'networkCodeValue', @@ -734,7 +736,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitySignalsMappingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -789,7 +791,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('label', () => { + describe('label', async () => { const fakePath = '/rendered/path/label'; const expectedParameters = { network_code: 'networkCodeValue', @@ -799,7 +801,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.labelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -838,7 +840,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { network_code: 'networkCodeValue', @@ -847,7 +849,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -876,7 +878,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { network_code: 'networkCodeValue', @@ -886,7 +888,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -925,7 +927,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('placement', () => { + describe('placement', async () => { const fakePath = '/rendered/path/placement'; const expectedParameters = { network_code: 'networkCodeValue', @@ -935,7 +937,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -977,7 +979,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { network_code: 'networkCodeValue', @@ -987,7 +989,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1026,7 +1028,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('role', () => { + describe('role', async () => { const fakePath = '/rendered/path/role'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1036,7 +1038,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1075,7 +1077,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('taxonomyCategory', () => { + describe('taxonomyCategory', async () => { const fakePath = '/rendered/path/taxonomyCategory'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1085,7 +1087,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taxonomyCategoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1132,7 +1134,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('team', () => { + describe('team', async () => { const fakePath = '/rendered/path/team'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1142,7 +1144,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.teamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1181,7 +1183,7 @@ describe('v1.UserServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { network_code: 'networkCodeValue', @@ -1191,7 +1193,7 @@ describe('v1.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/package.json b/packages/google-ai-generativelanguage/package.json index d3854044fdc..b9f91f321c5 100644 --- a/packages/google-ai-generativelanguage/package.json +++ b/packages/google-ai-generativelanguage/package.json @@ -44,7 +44,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json b/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json index 23c693e9657..8de723f1f23 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.9.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json b/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json index 7c7a11d131f..fc058c515ce 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.9.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json index 8c24638f3a0..91c24746e83 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.9.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json index 522c575dd68..1cf1fd1728b 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.9.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json index 522c575dd68..1cf1fd1728b 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.9.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json b/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json index ec07b8c1b8a..a0ed4f7de16 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.9.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/src/v1/generative_service_client.ts b/packages/google-ai-generativelanguage/src/v1/generative_service_client.ts index b99b9c5bc09..3625cbec456 100644 --- a/packages/google-ai-generativelanguage/src/v1/generative_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1/generative_service_client.ts @@ -524,7 +524,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateContent request %j', request); const wrappedCallback: | Callback< @@ -667,7 +669,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('embedContent request %j', request); const wrappedCallback: | Callback< @@ -802,7 +806,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchEmbedContents request %j', request); const wrappedCallback: | Callback< @@ -940,7 +946,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countTokens request %j', request); const wrappedCallback: | Callback< @@ -1032,7 +1040,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamGenerateContent stream %j', options); return this.innerApiCalls.streamGenerateContent(request, options); } diff --git a/packages/google-ai-generativelanguage/src/v1/model_service_client.ts b/packages/google-ai-generativelanguage/src/v1/model_service_client.ts index 49f280d55ce..863923ae710 100644 --- a/packages/google-ai-generativelanguage/src/v1/model_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1/model_service_client.ts @@ -475,7 +475,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -604,7 +606,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1.IListModelsRequest, @@ -673,7 +677,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -724,7 +730,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1alpha/cache_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/cache_service_client.ts index f4f90f22aeb..f84f9f099aa 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/cache_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/cache_service_client.ts @@ -498,7 +498,9 @@ export class CacheServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCachedContent request %j', request); const wrappedCallback: | Callback< @@ -624,7 +626,9 @@ export class CacheServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCachedContent request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class CacheServiceClient { this._gaxModule.routingHeader.fromParams({ 'cached_content.name': request.cachedContent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCachedContent request %j', request); const wrappedCallback: | Callback< @@ -877,7 +883,9 @@ export class CacheServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCachedContent request %j', request); const wrappedCallback: | Callback< @@ -1005,7 +1013,9 @@ export class CacheServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListCachedContentsRequest, @@ -1071,7 +1081,9 @@ export class CacheServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCachedContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCachedContents stream %j', request); return this.descriptors.page.listCachedContents.createStream( this.innerApiCalls.listCachedContents as GaxCall, @@ -1119,7 +1131,9 @@ export class CacheServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCachedContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCachedContents iterate %j', request); return this.descriptors.page.listCachedContents.asyncIterate( this.innerApiCalls['listCachedContents'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1alpha/discuss_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/discuss_service_client.ts index 5cb20e13409..73c71454737 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/discuss_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/discuss_service_client.ts @@ -517,7 +517,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateMessage request %j', request); const wrappedCallback: | Callback< @@ -649,7 +651,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countMessageTokens request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1alpha/file_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/file_service_client.ts index 2b12b725cf1..9a0ba526338 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/file_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/file_service_client.ts @@ -494,7 +494,9 @@ export class FileServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFile request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class FileServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFile request %j', request); const wrappedCallback: | Callback< @@ -740,7 +744,9 @@ export class FileServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFile request %j', request); const wrappedCallback: | Callback< @@ -862,7 +868,9 @@ export class FileServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListFilesRequest, @@ -922,7 +930,9 @@ export class FileServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles stream %j', request); return this.descriptors.page.listFiles.createStream( this.innerApiCalls.listFiles as GaxCall, @@ -964,7 +974,9 @@ export class FileServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles iterate %j', request); return this.descriptors.page.listFiles.asyncIterate( this.innerApiCalls['listFiles'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1alpha/generative_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/generative_service_client.ts index dab16551786..cb062729f26 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/generative_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/generative_service_client.ts @@ -575,7 +575,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateContent request %j', request); const wrappedCallback: | Callback< @@ -745,7 +747,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAnswer request %j', request); const wrappedCallback: | Callback< @@ -894,7 +898,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('embedContent request %j', request); const wrappedCallback: | Callback< @@ -1029,7 +1035,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchEmbedContents request %j', request); const wrappedCallback: | Callback< @@ -1173,7 +1181,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countTokens request %j', request); const wrappedCallback: | Callback< @@ -1289,7 +1299,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamGenerateContent stream %j', options); return this.innerApiCalls.streamGenerateContent(request, options); } @@ -1310,7 +1322,9 @@ export class GenerativeServiceClient { * region_tag:generativelanguage_v1alpha_generated_GenerativeService_BidiGenerateContent_async */ bidiGenerateContent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('bidiGenerateContent stream %j', options); return this.innerApiCalls.bidiGenerateContent(null, options); } diff --git a/packages/google-ai-generativelanguage/src/v1alpha/model_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/model_service_client.ts index 727eb57d638..2c5853f58ea 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/model_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/model_service_client.ts @@ -559,7 +559,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -686,7 +688,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTunedModel request %j', request); const wrappedCallback: | Callback< @@ -813,7 +817,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ 'tuned_model.name': request.tunedModel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTunedModel request %j', request); const wrappedCallback: | Callback< @@ -939,7 +945,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTunedModel request %j', request); const wrappedCallback: | Callback< @@ -1078,7 +1086,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1245,7 +1255,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListModelsRequest, @@ -1314,7 +1326,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -1365,7 +1379,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -1487,7 +1503,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListTunedModelsRequest, @@ -1572,7 +1590,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTunedModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunedModels stream %j', request); return this.descriptors.page.listTunedModels.createStream( this.innerApiCalls.listTunedModels as GaxCall, @@ -1639,7 +1659,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTunedModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunedModels iterate %j', request); return this.descriptors.page.listTunedModels.asyncIterate( this.innerApiCalls['listTunedModels'] as GaxCall, @@ -1741,7 +1763,7 @@ export class ModelServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-ai-generativelanguage/src/v1alpha/permission_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/permission_service_client.ts index 33a0493bbc9..9ec0e8d476b 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/permission_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/permission_service_client.ts @@ -505,7 +505,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPermission request %j', request); const wrappedCallback: | Callback< @@ -634,7 +636,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPermission request %j', request); const wrappedCallback: | Callback< @@ -764,7 +768,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ 'permission.name': request.permission!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePermission request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePermission request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1032,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('transferOwnership request %j', request); const wrappedCallback: | Callback< @@ -1165,7 +1175,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListPermissionsRequest, @@ -1244,7 +1256,9 @@ export class PermissionServiceClient { }); const defaultCallSettings = this._defaults['listPermissions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPermissions stream %j', request); return this.descriptors.page.listPermissions.createStream( this.innerApiCalls.listPermissions as GaxCall, @@ -1305,7 +1319,9 @@ export class PermissionServiceClient { }); const defaultCallSettings = this._defaults['listPermissions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPermissions iterate %j', request); return this.descriptors.page.listPermissions.asyncIterate( this.innerApiCalls['listPermissions'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1alpha/prediction_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/prediction_service_client.ts index 4da2a28fa27..2c6497df25f 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/prediction_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/prediction_service_client.ts @@ -479,7 +479,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('predict request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1alpha/retriever_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/retriever_service_client.ts index b0ee490711c..3826cd827fc 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/retriever_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/retriever_service_client.ts @@ -520,7 +520,9 @@ export class RetrieverServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCorpus request %j', request); const wrappedCallback: | Callback< @@ -640,7 +642,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCorpus request %j', request); const wrappedCallback: | Callback< @@ -768,7 +772,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ 'corpus.name': request.corpus!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCorpus request %j', request); const wrappedCallback: | Callback< @@ -900,7 +906,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCorpus request %j', request); const wrappedCallback: | Callback< @@ -1066,7 +1074,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryCorpus request %j', request); const wrappedCallback: | Callback< @@ -1194,7 +1204,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocument request %j', request); const wrappedCallback: | Callback< @@ -1320,7 +1332,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -1449,7 +1463,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ 'document.name': request.document!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocument request %j', request); const wrappedCallback: | Callback< @@ -1581,7 +1597,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocument request %j', request); const wrappedCallback: | Callback< @@ -1747,7 +1765,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryDocument request %j', request); const wrappedCallback: | Callback< @@ -1875,7 +1895,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createChunk request %j', request); const wrappedCallback: | Callback< @@ -2005,7 +2027,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateChunks request %j', request); const wrappedCallback: | Callback< @@ -2125,7 +2149,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChunk request %j', request); const wrappedCallback: | Callback< @@ -2253,7 +2279,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ 'chunk.name': request.chunk!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateChunk request %j', request); const wrappedCallback: | Callback< @@ -2383,7 +2411,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateChunks request %j', request); const wrappedCallback: | Callback< @@ -2509,7 +2539,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteChunk request %j', request); const wrappedCallback: | Callback< @@ -2638,7 +2670,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteChunks request %j', request); const wrappedCallback: | Callback< @@ -2769,7 +2803,9 @@ export class RetrieverServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListCorporaRequest, @@ -2838,7 +2874,9 @@ export class RetrieverServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCorpora']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCorpora stream %j', request); return this.descriptors.page.listCorpora.createStream( this.innerApiCalls.listCorpora as GaxCall, @@ -2889,7 +2927,9 @@ export class RetrieverServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCorpora']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCorpora iterate %j', request); return this.descriptors.page.listCorpora.asyncIterate( this.innerApiCalls['listCorpora'] as GaxCall, @@ -3002,7 +3042,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListDocumentsRequest, @@ -3078,7 +3120,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -3136,7 +3180,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -3249,7 +3295,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1alpha.IListChunksRequest, @@ -3325,7 +3373,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listChunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChunks stream %j', request); return this.descriptors.page.listChunks.createStream( this.innerApiCalls.listChunks as GaxCall, @@ -3383,7 +3433,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listChunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChunks iterate %j', request); return this.descriptors.page.listChunks.asyncIterate( this.innerApiCalls['listChunks'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1alpha/text_service_client.ts b/packages/google-ai-generativelanguage/src/v1alpha/text_service_client.ts index 016a2e2e16e..85df0b50712 100644 --- a/packages/google-ai-generativelanguage/src/v1alpha/text_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1alpha/text_service_client.ts @@ -558,7 +558,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateText request %j', request); const wrappedCallback: | Callback< @@ -680,7 +682,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('embedText request %j', request); const wrappedCallback: | Callback< @@ -815,7 +819,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchEmbedText request %j', request); const wrappedCallback: | Callback< @@ -947,7 +953,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countTextTokens request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1beta/cache_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/cache_service_client.ts index 1a374363603..935c1a84221 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/cache_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/cache_service_client.ts @@ -498,7 +498,9 @@ export class CacheServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCachedContent request %j', request); const wrappedCallback: | Callback< @@ -624,7 +626,9 @@ export class CacheServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCachedContent request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class CacheServiceClient { this._gaxModule.routingHeader.fromParams({ 'cached_content.name': request.cachedContent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCachedContent request %j', request); const wrappedCallback: | Callback< @@ -877,7 +883,9 @@ export class CacheServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCachedContent request %j', request); const wrappedCallback: | Callback< @@ -1005,7 +1013,9 @@ export class CacheServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListCachedContentsRequest, @@ -1071,7 +1081,9 @@ export class CacheServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCachedContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCachedContents stream %j', request); return this.descriptors.page.listCachedContents.createStream( this.innerApiCalls.listCachedContents as GaxCall, @@ -1119,7 +1131,9 @@ export class CacheServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCachedContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCachedContents iterate %j', request); return this.descriptors.page.listCachedContents.asyncIterate( this.innerApiCalls['listCachedContents'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1beta/discuss_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/discuss_service_client.ts index 45935654ff9..0f7b3a39e41 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/discuss_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/discuss_service_client.ts @@ -517,7 +517,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateMessage request %j', request); const wrappedCallback: | Callback< @@ -649,7 +651,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countMessageTokens request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1beta/file_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/file_service_client.ts index fc143a87861..31072a169cc 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/file_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/file_service_client.ts @@ -487,7 +487,9 @@ export class FileServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFile request %j', request); const wrappedCallback: | Callback< @@ -607,7 +609,9 @@ export class FileServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFile request %j', request); const wrappedCallback: | Callback< @@ -727,7 +731,9 @@ export class FileServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFile request %j', request); const wrappedCallback: | Callback< @@ -849,7 +855,9 @@ export class FileServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListFilesRequest, @@ -909,7 +917,9 @@ export class FileServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles stream %j', request); return this.descriptors.page.listFiles.createStream( this.innerApiCalls.listFiles as GaxCall, @@ -951,7 +961,9 @@ export class FileServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles iterate %j', request); return this.descriptors.page.listFiles.asyncIterate( this.innerApiCalls['listFiles'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1beta/generative_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/generative_service_client.ts index 5c86bc43fb0..37177c6a541 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/generative_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/generative_service_client.ts @@ -569,7 +569,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateContent request %j', request); const wrappedCallback: | Callback< @@ -739,7 +741,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAnswer request %j', request); const wrappedCallback: | Callback< @@ -888,7 +892,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('embedContent request %j', request); const wrappedCallback: | Callback< @@ -1023,7 +1029,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchEmbedContents request %j', request); const wrappedCallback: | Callback< @@ -1167,7 +1175,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countTokens request %j', request); const wrappedCallback: | Callback< @@ -1283,7 +1293,9 @@ export class GenerativeServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamGenerateContent stream %j', options); return this.innerApiCalls.streamGenerateContent(request, options); } diff --git a/packages/google-ai-generativelanguage/src/v1beta/model_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/model_service_client.ts index 6173b703a03..c7ca55509ce 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/model_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/model_service_client.ts @@ -559,7 +559,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -686,7 +688,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTunedModel request %j', request); const wrappedCallback: | Callback< @@ -813,7 +817,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ 'tuned_model.name': request.tunedModel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTunedModel request %j', request); const wrappedCallback: | Callback< @@ -939,7 +945,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTunedModel request %j', request); const wrappedCallback: | Callback< @@ -1078,7 +1086,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1245,7 +1255,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListModelsRequest, @@ -1314,7 +1326,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -1365,7 +1379,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -1487,7 +1503,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListTunedModelsRequest, @@ -1572,7 +1590,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTunedModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunedModels stream %j', request); return this.descriptors.page.listTunedModels.createStream( this.innerApiCalls.listTunedModels as GaxCall, @@ -1639,7 +1659,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTunedModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunedModels iterate %j', request); return this.descriptors.page.listTunedModels.asyncIterate( this.innerApiCalls['listTunedModels'] as GaxCall, @@ -1741,7 +1763,7 @@ export class ModelServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-ai-generativelanguage/src/v1beta/permission_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/permission_service_client.ts index 6c184ff1e41..654e98fd68b 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/permission_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/permission_service_client.ts @@ -505,7 +505,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPermission request %j', request); const wrappedCallback: | Callback< @@ -634,7 +636,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPermission request %j', request); const wrappedCallback: | Callback< @@ -764,7 +768,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ 'permission.name': request.permission!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePermission request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePermission request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1032,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('transferOwnership request %j', request); const wrappedCallback: | Callback< @@ -1165,7 +1175,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListPermissionsRequest, @@ -1244,7 +1256,9 @@ export class PermissionServiceClient { }); const defaultCallSettings = this._defaults['listPermissions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPermissions stream %j', request); return this.descriptors.page.listPermissions.createStream( this.innerApiCalls.listPermissions as GaxCall, @@ -1305,7 +1319,9 @@ export class PermissionServiceClient { }); const defaultCallSettings = this._defaults['listPermissions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPermissions iterate %j', request); return this.descriptors.page.listPermissions.asyncIterate( this.innerApiCalls['listPermissions'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1beta/prediction_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/prediction_service_client.ts index 51b5d921c07..34a3c7b9c21 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/prediction_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/prediction_service_client.ts @@ -479,7 +479,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('predict request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1beta/retriever_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/retriever_service_client.ts index fae5bec4cf9..fba5d477ba7 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/retriever_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/retriever_service_client.ts @@ -520,7 +520,9 @@ export class RetrieverServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCorpus request %j', request); const wrappedCallback: | Callback< @@ -640,7 +642,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCorpus request %j', request); const wrappedCallback: | Callback< @@ -768,7 +772,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ 'corpus.name': request.corpus!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCorpus request %j', request); const wrappedCallback: | Callback< @@ -900,7 +906,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCorpus request %j', request); const wrappedCallback: | Callback< @@ -1066,7 +1074,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryCorpus request %j', request); const wrappedCallback: | Callback< @@ -1194,7 +1204,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocument request %j', request); const wrappedCallback: | Callback< @@ -1320,7 +1332,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -1449,7 +1463,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ 'document.name': request.document!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocument request %j', request); const wrappedCallback: | Callback< @@ -1581,7 +1597,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocument request %j', request); const wrappedCallback: | Callback< @@ -1747,7 +1765,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryDocument request %j', request); const wrappedCallback: | Callback< @@ -1875,7 +1895,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createChunk request %j', request); const wrappedCallback: | Callback< @@ -2005,7 +2027,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateChunks request %j', request); const wrappedCallback: | Callback< @@ -2125,7 +2149,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChunk request %j', request); const wrappedCallback: | Callback< @@ -2253,7 +2279,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ 'chunk.name': request.chunk!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateChunk request %j', request); const wrappedCallback: | Callback< @@ -2383,7 +2411,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateChunks request %j', request); const wrappedCallback: | Callback< @@ -2509,7 +2539,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteChunk request %j', request); const wrappedCallback: | Callback< @@ -2638,7 +2670,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteChunks request %j', request); const wrappedCallback: | Callback< @@ -2769,7 +2803,9 @@ export class RetrieverServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListCorporaRequest, @@ -2838,7 +2874,9 @@ export class RetrieverServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCorpora']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCorpora stream %j', request); return this.descriptors.page.listCorpora.createStream( this.innerApiCalls.listCorpora as GaxCall, @@ -2889,7 +2927,9 @@ export class RetrieverServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listCorpora']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCorpora iterate %j', request); return this.descriptors.page.listCorpora.asyncIterate( this.innerApiCalls['listCorpora'] as GaxCall, @@ -3002,7 +3042,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListDocumentsRequest, @@ -3078,7 +3120,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -3136,7 +3180,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -3249,7 +3295,9 @@ export class RetrieverServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta.IListChunksRequest, @@ -3325,7 +3373,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listChunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChunks stream %j', request); return this.descriptors.page.listChunks.createStream( this.innerApiCalls.listChunks as GaxCall, @@ -3383,7 +3433,9 @@ export class RetrieverServiceClient { }); const defaultCallSettings = this._defaults['listChunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChunks iterate %j', request); return this.descriptors.page.listChunks.asyncIterate( this.innerApiCalls['listChunks'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1beta/text_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta/text_service_client.ts index a92d6f3769e..ab8c1c8f748 100644 --- a/packages/google-ai-generativelanguage/src/v1beta/text_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta/text_service_client.ts @@ -557,7 +557,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateText request %j', request); const wrappedCallback: | Callback< @@ -679,7 +681,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('embedText request %j', request); const wrappedCallback: | Callback< @@ -814,7 +818,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchEmbedText request %j', request); const wrappedCallback: | Callback< @@ -946,7 +952,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countTextTokens request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client.ts index fa36bec12d3..dd382f5c315 100644 --- a/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client.ts @@ -497,7 +497,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateMessage request %j', request); const wrappedCallback: | Callback< @@ -629,7 +631,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countMessageTokens request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1beta2/model_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta2/model_service_client.ts index c922e8380cc..8400e1cee2c 100644 --- a/packages/google-ai-generativelanguage/src/v1beta2/model_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta2/model_service_client.ts @@ -471,7 +471,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -603,7 +605,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, @@ -673,7 +677,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -725,7 +731,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1beta2/text_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta2/text_service_client.ts index ca96ef9695a..461d3bdad03 100644 --- a/packages/google-ai-generativelanguage/src/v1beta2/text_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta2/text_service_client.ts @@ -523,7 +523,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateText request %j', request); const wrappedCallback: | Callback< @@ -645,7 +647,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('embedText request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1beta3/discuss_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta3/discuss_service_client.ts index 43187a162c7..f43ebcb713f 100644 --- a/packages/google-ai-generativelanguage/src/v1beta3/discuss_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta3/discuss_service_client.ts @@ -503,7 +503,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateMessage request %j', request); const wrappedCallback: | Callback< @@ -635,7 +637,9 @@ export class DiscussServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countMessageTokens request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/src/v1beta3/model_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta3/model_service_client.ts index e98269e8a05..697d7d605be 100644 --- a/packages/google-ai-generativelanguage/src/v1beta3/model_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta3/model_service_client.ts @@ -526,7 +526,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -653,7 +655,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTunedModel request %j', request); const wrappedCallback: | Callback< @@ -780,7 +784,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ 'tuned_model.name': request.tunedModel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTunedModel request %j', request); const wrappedCallback: | Callback< @@ -906,7 +912,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTunedModel request %j', request); const wrappedCallback: | Callback< @@ -1045,7 +1053,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1212,7 +1222,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta3.IListModelsRequest, @@ -1282,7 +1294,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -1334,7 +1348,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -1441,7 +1457,9 @@ export class ModelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta3.IListTunedModelsRequest, @@ -1511,7 +1529,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTunedModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunedModels stream %j', request); return this.descriptors.page.listTunedModels.createStream( this.innerApiCalls.listTunedModels as GaxCall, @@ -1563,7 +1583,9 @@ export class ModelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTunedModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunedModels iterate %j', request); return this.descriptors.page.listTunedModels.asyncIterate( this.innerApiCalls['listTunedModels'] as GaxCall, @@ -1665,7 +1687,7 @@ export class ModelServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-ai-generativelanguage/src/v1beta3/permission_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta3/permission_service_client.ts index a67edcb2e5c..ef44daf241e 100644 --- a/packages/google-ai-generativelanguage/src/v1beta3/permission_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta3/permission_service_client.ts @@ -489,7 +489,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPermission request %j', request); const wrappedCallback: | Callback< @@ -616,7 +618,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPermission request %j', request); const wrappedCallback: | Callback< @@ -746,7 +750,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ 'permission.name': request.permission!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePermission request %j', request); const wrappedCallback: | Callback< @@ -872,7 +878,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePermission request %j', request); const wrappedCallback: | Callback< @@ -1004,7 +1012,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('transferOwnership request %j', request); const wrappedCallback: | Callback< @@ -1143,7 +1153,9 @@ export class PermissionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.ai.generativelanguage.v1beta3.IListPermissionsRequest, @@ -1220,7 +1232,9 @@ export class PermissionServiceClient { }); const defaultCallSettings = this._defaults['listPermissions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPermissions stream %j', request); return this.descriptors.page.listPermissions.createStream( this.innerApiCalls.listPermissions as GaxCall, @@ -1279,7 +1293,9 @@ export class PermissionServiceClient { }); const defaultCallSettings = this._defaults['listPermissions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPermissions iterate %j', request); return this.descriptors.page.listPermissions.asyncIterate( this.innerApiCalls['listPermissions'] as GaxCall, diff --git a/packages/google-ai-generativelanguage/src/v1beta3/text_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta3/text_service_client.ts index d4aa61a7c4e..c6c882e31d0 100644 --- a/packages/google-ai-generativelanguage/src/v1beta3/text_service_client.ts +++ b/packages/google-ai-generativelanguage/src/v1beta3/text_service_client.ts @@ -540,7 +540,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateText request %j', request); const wrappedCallback: | Callback< @@ -662,7 +664,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('embedText request %j', request); const wrappedCallback: | Callback< @@ -794,7 +798,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchEmbedText request %j', request); const wrappedCallback: | Callback< @@ -926,7 +932,9 @@ export class TextServiceClient { this._gaxModule.routingHeader.fromParams({ model: request.model ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('countTextTokens request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-ai-generativelanguage/test/gapic_cache_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_cache_service_v1alpha.ts index 1c6db61b50a..528b64d7020 100644 --- a/packages/google-ai-generativelanguage/test/gapic_cache_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_cache_service_v1alpha.ts @@ -255,7 +255,9 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cacheServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCachedContentRequest() ); @@ -332,7 +334,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCachedContentRequest() ); @@ -365,7 +367,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCachedContentRequest() ); @@ -382,7 +384,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCachedContentRequest() ); @@ -398,7 +400,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCachedContentRequest() ); @@ -429,7 +431,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCachedContentRequest() ); @@ -476,7 +478,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCachedContentRequest() ); @@ -507,7 +509,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCachedContentRequest() ); @@ -528,7 +530,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCachedContentRequest() ); @@ -561,7 +563,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCachedContentRequest() ); @@ -609,7 +611,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCachedContentRequest() ); @@ -641,7 +643,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCachedContentRequest() ); @@ -663,7 +665,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCachedContentRequest() ); @@ -695,7 +697,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCachedContentRequest() ); @@ -742,7 +744,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCachedContentRequest() ); @@ -773,7 +775,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCachedContentRequest() ); @@ -794,7 +796,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCachedContentsRequest() ); @@ -820,7 +822,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCachedContentsRequest() ); @@ -863,7 +865,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCachedContentsRequest() ); @@ -880,7 +882,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCachedContentsRequest() ); @@ -930,7 +932,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCachedContentsRequest() ); @@ -969,7 +971,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCachedContentsRequest() ); @@ -1006,7 +1008,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCachedContentsRequest() ); @@ -1031,7 +1033,7 @@ describe('v1alpha.CacheServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1040,7 +1042,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1069,7 +1071,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1080,7 +1082,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1133,7 +1135,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1142,7 +1144,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1171,7 +1173,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1181,7 +1183,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1226,7 +1228,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1236,7 +1238,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1275,7 +1277,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1284,7 +1286,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1313,7 +1315,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1322,7 +1324,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1351,7 +1353,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1360,7 +1362,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1389,7 +1391,7 @@ describe('v1alpha.CacheServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1399,7 +1401,7 @@ describe('v1alpha.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_cache_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_cache_service_v1beta.ts index 231da6897b1..b08aa169560 100644 --- a/packages/google-ai-generativelanguage/test/gapic_cache_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_cache_service_v1beta.ts @@ -255,7 +255,9 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cacheServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCachedContentRequest() ); @@ -332,7 +334,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCachedContentRequest() ); @@ -365,7 +367,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCachedContentRequest() ); @@ -382,7 +384,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCachedContentRequest() ); @@ -398,7 +400,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCachedContentRequest() ); @@ -429,7 +431,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCachedContentRequest() ); @@ -476,7 +478,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCachedContentRequest() ); @@ -507,7 +509,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCachedContentRequest() ); @@ -528,7 +530,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCachedContentRequest() ); @@ -561,7 +563,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCachedContentRequest() ); @@ -609,7 +611,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCachedContentRequest() ); @@ -641,7 +643,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCachedContentRequest() ); @@ -663,7 +665,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCachedContentRequest() ); @@ -695,7 +697,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCachedContentRequest() ); @@ -742,7 +744,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCachedContentRequest() ); @@ -773,7 +775,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCachedContentRequest() ); @@ -794,7 +796,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCachedContentsRequest() ); @@ -820,7 +822,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCachedContentsRequest() ); @@ -863,7 +865,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCachedContentsRequest() ); @@ -880,7 +882,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCachedContentsRequest() ); @@ -930,7 +932,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCachedContentsRequest() ); @@ -969,7 +971,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCachedContentsRequest() ); @@ -1006,7 +1008,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCachedContentsRequest() ); @@ -1031,7 +1033,7 @@ describe('v1beta.CacheServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1040,7 +1042,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1069,7 +1071,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1080,7 +1082,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1133,7 +1135,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1142,7 +1144,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1171,7 +1173,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1181,7 +1183,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1226,7 +1228,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1236,7 +1238,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1275,7 +1277,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1284,7 +1286,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1313,7 +1315,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1322,7 +1324,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1351,7 +1353,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1360,7 +1362,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1389,7 +1391,7 @@ describe('v1beta.CacheServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1399,7 +1401,7 @@ describe('v1beta.CacheServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1alpha.ts index fee5870ef8d..dfddf8f1607 100644 --- a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1alpha.ts @@ -193,7 +193,9 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.discussServiceStub); client.close().then(() => { done(); @@ -252,7 +254,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateMessageRequest() ); @@ -283,7 +285,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateMessageRequest() ); @@ -330,7 +332,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateMessageRequest() ); @@ -361,7 +363,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateMessageRequest() ); @@ -382,7 +384,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountMessageTokensRequest() ); @@ -414,7 +416,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountMessageTokensRequest() ); @@ -461,7 +463,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountMessageTokensRequest() ); @@ -492,7 +494,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountMessageTokensRequest() ); @@ -508,7 +510,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -517,7 +519,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -546,7 +548,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -557,7 +559,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -610,7 +612,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -619,7 +621,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -648,7 +650,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -658,7 +660,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -703,7 +705,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -713,7 +715,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -752,7 +754,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -761,7 +763,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -790,7 +792,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -799,7 +801,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -828,7 +830,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -837,7 +839,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -866,7 +868,7 @@ describe('v1alpha.DiscussServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -876,7 +878,7 @@ describe('v1alpha.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta.ts index 56b837a21b7..bfff278b734 100644 --- a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta.ts @@ -192,7 +192,9 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.discussServiceStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateMessageRequest() ); @@ -282,7 +284,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateMessageRequest() ); @@ -329,7 +331,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateMessageRequest() ); @@ -360,7 +362,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateMessageRequest() ); @@ -381,7 +383,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountMessageTokensRequest() ); @@ -413,7 +415,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountMessageTokensRequest() ); @@ -460,7 +462,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountMessageTokensRequest() ); @@ -491,7 +493,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountMessageTokensRequest() ); @@ -507,7 +509,7 @@ describe('v1beta.DiscussServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -516,7 +518,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -545,7 +547,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -556,7 +558,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -609,7 +611,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -618,7 +620,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -647,7 +649,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -657,7 +659,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -702,7 +704,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -712,7 +714,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -751,7 +753,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -760,7 +762,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -789,7 +791,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -798,7 +800,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -827,7 +829,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -836,7 +838,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -865,7 +867,7 @@ describe('v1beta.DiscussServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -875,7 +877,7 @@ describe('v1beta.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta2.ts b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta2.ts index 20847ecb5a6..843591edd87 100644 --- a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta2.ts +++ b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta2.ts @@ -193,7 +193,9 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.discussServiceStub); client.close().then(() => { done(); @@ -252,7 +254,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() ); @@ -283,7 +285,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() ); @@ -330,7 +332,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() ); @@ -361,7 +363,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() ); @@ -382,7 +384,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() ); @@ -414,7 +416,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() ); @@ -461,7 +463,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() ); @@ -492,7 +494,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() ); @@ -508,7 +510,7 @@ describe('v1beta2.DiscussServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -517,7 +519,7 @@ describe('v1beta2.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta3.ts b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta3.ts index d41cb41eafa..089fd3d61c5 100644 --- a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta3.ts +++ b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta3.ts @@ -193,7 +193,9 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.discussServiceStub); client.close().then(() => { done(); @@ -252,7 +254,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateMessageRequest() ); @@ -283,7 +285,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateMessageRequest() ); @@ -330,7 +332,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateMessageRequest() ); @@ -361,7 +363,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateMessageRequest() ); @@ -382,7 +384,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountMessageTokensRequest() ); @@ -414,7 +416,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountMessageTokensRequest() ); @@ -461,7 +463,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountMessageTokensRequest() ); @@ -492,7 +494,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountMessageTokensRequest() ); @@ -508,7 +510,7 @@ describe('v1beta3.DiscussServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -517,7 +519,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -546,7 +548,7 @@ describe('v1beta3.DiscussServiceClient', () => { }); }); - describe('permission', () => { + describe('permission', async () => { const fakePath = '/rendered/path/permission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -556,7 +558,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.permissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -598,7 +600,7 @@ describe('v1beta3.DiscussServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -607,7 +609,7 @@ describe('v1beta3.DiscussServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_file_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_file_service_v1alpha.ts index 0e7367e078e..9d74d163f5e 100644 --- a/packages/google-ai-generativelanguage/test/gapic_file_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_file_service_v1alpha.ts @@ -255,7 +255,9 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.fileServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateFileRequest() ); @@ -331,7 +333,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateFileRequest() ); @@ -364,7 +366,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateFileRequest() ); @@ -381,7 +383,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateFileRequest() ); @@ -397,7 +399,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetFileRequest() ); @@ -428,7 +430,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetFileRequest() ); @@ -475,7 +477,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetFileRequest() ); @@ -503,7 +505,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetFileRequest() ); @@ -524,7 +526,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteFileRequest() ); @@ -555,7 +557,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteFileRequest() ); @@ -602,7 +604,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteFileRequest() ); @@ -633,7 +635,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteFileRequest() ); @@ -654,7 +656,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListFilesRequest() ); @@ -679,7 +681,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListFilesRequest() ); @@ -720,7 +722,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListFilesRequest() ); @@ -734,7 +736,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListFilesRequest() ); @@ -782,7 +784,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListFilesRequest() ); @@ -821,7 +823,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListFilesRequest() ); @@ -856,7 +858,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListFilesRequest() ); @@ -882,7 +884,7 @@ describe('v1alpha.FileServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -891,7 +893,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -920,7 +922,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -931,7 +933,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -984,7 +986,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -993,7 +995,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1022,7 +1024,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1032,7 +1034,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1077,7 +1079,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1087,7 +1089,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1126,7 +1128,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1135,7 +1137,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1164,7 +1166,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1173,7 +1175,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1202,7 +1204,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1211,7 +1213,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1240,7 +1242,7 @@ describe('v1alpha.FileServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1250,7 +1252,7 @@ describe('v1alpha.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_file_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_file_service_v1beta.ts index 364562af525..6b09eb6e189 100644 --- a/packages/google-ai-generativelanguage/test/gapic_file_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_file_service_v1beta.ts @@ -255,7 +255,9 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.fileServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateFileRequest() ); @@ -331,7 +333,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateFileRequest() ); @@ -364,7 +366,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateFileRequest() ); @@ -381,7 +383,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateFileRequest() ); @@ -397,7 +399,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetFileRequest() ); @@ -428,7 +430,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetFileRequest() ); @@ -475,7 +477,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetFileRequest() ); @@ -503,7 +505,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetFileRequest() ); @@ -524,7 +526,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteFileRequest() ); @@ -555,7 +557,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteFileRequest() ); @@ -602,7 +604,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteFileRequest() ); @@ -633,7 +635,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteFileRequest() ); @@ -654,7 +656,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListFilesRequest() ); @@ -679,7 +681,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListFilesRequest() ); @@ -720,7 +722,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListFilesRequest() ); @@ -734,7 +736,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListFilesRequest() ); @@ -781,7 +783,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListFilesRequest() ); @@ -819,7 +821,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListFilesRequest() ); @@ -854,7 +856,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListFilesRequest() ); @@ -880,7 +882,7 @@ describe('v1beta.FileServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -889,7 +891,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -918,7 +920,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -929,7 +931,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -982,7 +984,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -991,7 +993,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1020,7 +1022,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1030,7 +1032,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1075,7 +1077,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1085,7 +1087,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1124,7 +1126,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1133,7 +1135,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1162,7 +1164,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1171,7 +1173,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1200,7 +1202,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1209,7 +1211,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1238,7 +1240,7 @@ describe('v1beta.FileServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1248,7 +1250,7 @@ describe('v1beta.FileServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_generative_service_v1.ts b/packages/google-ai-generativelanguage/test/gapic_generative_service_v1.ts index 0c4f9dc8a2d..80efd359fbc 100644 --- a/packages/google-ai-generativelanguage/test/gapic_generative_service_v1.ts +++ b/packages/google-ai-generativelanguage/test/gapic_generative_service_v1.ts @@ -216,7 +216,9 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generativeServiceStub); client.close().then(() => { done(); @@ -275,7 +277,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -306,7 +308,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -353,7 +355,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -384,7 +386,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -405,7 +407,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.EmbedContentRequest() ); @@ -436,7 +438,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.EmbedContentRequest() ); @@ -483,7 +485,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.EmbedContentRequest() ); @@ -514,7 +516,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.EmbedContentRequest() ); @@ -535,7 +537,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.BatchEmbedContentsRequest() ); @@ -567,7 +569,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.BatchEmbedContentsRequest() ); @@ -614,7 +616,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.BatchEmbedContentsRequest() ); @@ -645,7 +647,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.BatchEmbedContentsRequest() ); @@ -666,7 +668,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.CountTokensRequest() ); @@ -697,7 +699,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.CountTokensRequest() ); @@ -744,7 +746,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.CountTokensRequest() ); @@ -775,7 +777,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.CountTokensRequest() ); @@ -796,7 +798,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -839,9 +841,11 @@ describe('v1.GenerativeServiceClient', () => { it('invokes streamGenerateContent without error and gaxServerStreamingRetries enabled', async () => { const client = new generativeserviceModule.v1.GenerativeServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', gaxServerStreamingRetries: true, }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -887,7 +891,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -932,7 +936,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GenerateContentRequest() ); @@ -970,7 +974,7 @@ describe('v1.GenerativeServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -979,7 +983,7 @@ describe('v1.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_generative_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_generative_service_v1alpha.ts index 46b7cf62bb9..4382b5941e0 100644 --- a/packages/google-ai-generativelanguage/test/gapic_generative_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_generative_service_v1alpha.ts @@ -239,7 +239,9 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generativeServiceStub); client.close().then(() => { done(); @@ -302,7 +304,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -334,7 +336,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -382,7 +384,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -414,7 +416,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -436,7 +438,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateAnswerRequest() ); @@ -468,7 +470,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateAnswerRequest() ); @@ -516,7 +518,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateAnswerRequest() ); @@ -548,7 +550,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateAnswerRequest() ); @@ -570,7 +572,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedContentRequest() ); @@ -602,7 +604,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedContentRequest() ); @@ -650,7 +652,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedContentRequest() ); @@ -682,7 +684,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedContentRequest() ); @@ -704,7 +706,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedContentsRequest() ); @@ -737,7 +739,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedContentsRequest() ); @@ -785,7 +787,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedContentsRequest() ); @@ -817,7 +819,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedContentsRequest() ); @@ -839,7 +841,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTokensRequest() ); @@ -871,7 +873,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTokensRequest() ); @@ -919,7 +921,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTokensRequest() ); @@ -951,7 +953,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTokensRequest() ); @@ -973,7 +975,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -1017,9 +1019,11 @@ describe('v1alpha.GenerativeServiceClient', () => { it('invokes streamGenerateContent without error and gaxServerStreamingRetries enabled', async () => { const client = new generativeserviceModule.v1alpha.GenerativeServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', gaxServerStreamingRetries: true, }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -1066,7 +1070,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -1112,7 +1116,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateContentRequest() ); @@ -1157,7 +1161,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BidiGenerateContentClientMessage() ); @@ -1203,7 +1207,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BidiGenerateContentClientMessage() ); @@ -1243,7 +1247,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1253,7 +1257,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1282,7 +1286,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1294,7 +1298,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1347,7 +1351,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1357,7 +1361,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1386,7 +1390,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1397,7 +1401,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1442,7 +1446,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1453,7 +1457,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1492,7 +1496,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1502,7 +1506,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1531,7 +1535,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1541,7 +1545,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1570,7 +1574,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1580,7 +1584,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1609,7 +1613,7 @@ describe('v1alpha.GenerativeServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1620,7 +1624,7 @@ describe('v1alpha.GenerativeServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_generative_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_generative_service_v1beta.ts index ce8d6325c79..2abc7e06d7c 100644 --- a/packages/google-ai-generativelanguage/test/gapic_generative_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_generative_service_v1beta.ts @@ -226,7 +226,9 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generativeServiceStub); client.close().then(() => { done(); @@ -293,7 +295,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -326,7 +328,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -375,7 +377,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -408,7 +410,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -431,7 +433,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateAnswerRequest() ); @@ -464,7 +466,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateAnswerRequest() ); @@ -513,7 +515,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateAnswerRequest() ); @@ -546,7 +548,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateAnswerRequest() ); @@ -569,7 +571,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedContentRequest() ); @@ -602,7 +604,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedContentRequest() ); @@ -651,7 +653,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedContentRequest() ); @@ -684,7 +686,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedContentRequest() ); @@ -707,7 +709,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedContentsRequest() ); @@ -741,7 +743,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedContentsRequest() ); @@ -790,7 +792,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedContentsRequest() ); @@ -823,7 +825,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedContentsRequest() ); @@ -846,7 +848,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTokensRequest() ); @@ -879,7 +881,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTokensRequest() ); @@ -928,7 +930,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTokensRequest() ); @@ -961,7 +963,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTokensRequest() ); @@ -984,7 +986,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -1027,9 +1029,13 @@ describe('v1beta.GenerativeServiceClient', () => { it('invokes streamGenerateContent without error and gaxServerStreamingRetries enabled', async () => { const client = new generativeserviceModule.v1beta.GenerativeServiceClient( - {gaxServerStreamingRetries: true} + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + gaxServerStreamingRetries: true, + } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -1077,7 +1083,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -1124,7 +1130,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateContentRequest() ); @@ -1164,7 +1170,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1175,7 +1181,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1204,7 +1210,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1217,7 +1223,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1270,7 +1276,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1281,7 +1287,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1310,7 +1316,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1322,7 +1328,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1367,7 +1373,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1379,7 +1385,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1418,7 +1424,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1429,7 +1435,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1458,7 +1464,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1469,7 +1475,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1498,7 +1504,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1509,7 +1515,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1538,7 +1544,7 @@ describe('v1beta.GenerativeServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1550,7 +1556,7 @@ describe('v1beta.GenerativeServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_model_service_v1.ts b/packages/google-ai-generativelanguage/test/gapic_model_service_v1.ts index 2d8d01a47c5..794f166a57e 100644 --- a/packages/google-ai-generativelanguage/test/gapic_model_service_v1.ts +++ b/packages/google-ai-generativelanguage/test/gapic_model_service_v1.ts @@ -255,7 +255,9 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GetModelRequest() ); @@ -345,7 +347,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GetModelRequest() ); @@ -392,7 +394,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GetModelRequest() ); @@ -420,7 +422,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.GetModelRequest() ); @@ -441,7 +443,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.ListModelsRequest() ); @@ -466,7 +468,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.ListModelsRequest() ); @@ -507,7 +509,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.ListModelsRequest() ); @@ -524,7 +526,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.ListModelsRequest() ); @@ -571,7 +573,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.ListModelsRequest() ); @@ -609,7 +611,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.ListModelsRequest() ); @@ -645,7 +647,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1.ListModelsRequest() ); @@ -671,7 +673,7 @@ describe('v1.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -680,7 +682,7 @@ describe('v1.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_model_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_model_service_v1alpha.ts index d54c6ca4e33..4ffbf7f419b 100644 --- a/packages/google-ai-generativelanguage/test/gapic_model_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_model_service_v1alpha.ts @@ -287,7 +287,9 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetModelRequest() ); @@ -377,7 +379,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetModelRequest() ); @@ -424,7 +426,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetModelRequest() ); @@ -452,7 +454,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetModelRequest() ); @@ -473,7 +475,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetTunedModelRequest() ); @@ -504,7 +506,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetTunedModelRequest() ); @@ -551,7 +553,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetTunedModelRequest() ); @@ -582,7 +584,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetTunedModelRequest() ); @@ -603,7 +605,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateTunedModelRequest() ); @@ -635,7 +637,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateTunedModelRequest() ); @@ -683,7 +685,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateTunedModelRequest() ); @@ -715,7 +717,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateTunedModelRequest() ); @@ -737,7 +739,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteTunedModelRequest() ); @@ -768,7 +770,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteTunedModelRequest() ); @@ -815,7 +817,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteTunedModelRequest() ); @@ -846,7 +848,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteTunedModelRequest() ); @@ -867,7 +869,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateTunedModelRequest() ); @@ -886,7 +888,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateTunedModelRequest() ); @@ -926,7 +928,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateTunedModelRequest() ); @@ -943,7 +945,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateTunedModelRequest() ); @@ -962,7 +964,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -984,7 +986,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1005,7 +1007,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListModelsRequest() ); @@ -1030,7 +1032,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListModelsRequest() ); @@ -1071,7 +1073,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListModelsRequest() ); @@ -1088,7 +1090,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListModelsRequest() ); @@ -1136,7 +1138,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListModelsRequest() ); @@ -1175,7 +1177,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListModelsRequest() ); @@ -1212,7 +1214,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListModelsRequest() ); @@ -1244,7 +1246,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListTunedModelsRequest() ); @@ -1269,7 +1271,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListTunedModelsRequest() ); @@ -1312,7 +1314,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListTunedModelsRequest() ); @@ -1329,7 +1331,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListTunedModelsRequest() ); @@ -1379,7 +1381,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListTunedModelsRequest() ); @@ -1418,7 +1420,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListTunedModelsRequest() ); @@ -1455,7 +1457,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListTunedModelsRequest() ); @@ -1484,7 +1486,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1563,7 +1565,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1643,7 +1645,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1739,8 +1741,7 @@ describe('v1alpha.ModelServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1759,7 +1760,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1768,8 +1769,7 @@ describe('v1alpha.ModelServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1785,7 +1785,7 @@ describe('v1alpha.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1794,7 +1794,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1823,7 +1823,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1834,7 +1834,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1887,7 +1887,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1896,7 +1896,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1925,7 +1925,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1935,7 +1935,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1980,7 +1980,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1990,7 +1990,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2029,7 +2029,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -2038,7 +2038,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2067,7 +2067,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -2076,7 +2076,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2105,7 +2105,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -2114,7 +2114,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2143,7 +2143,7 @@ describe('v1alpha.ModelServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -2153,7 +2153,7 @@ describe('v1alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta.ts index 3f5cab2bfed..f25b878b9aa 100644 --- a/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta.ts @@ -287,7 +287,9 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetModelRequest() ); @@ -377,7 +379,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetModelRequest() ); @@ -424,7 +426,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetModelRequest() ); @@ -452,7 +454,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetModelRequest() ); @@ -473,7 +475,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetTunedModelRequest() ); @@ -504,7 +506,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetTunedModelRequest() ); @@ -551,7 +553,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetTunedModelRequest() ); @@ -582,7 +584,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetTunedModelRequest() ); @@ -603,7 +605,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateTunedModelRequest() ); @@ -635,7 +637,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateTunedModelRequest() ); @@ -683,7 +685,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateTunedModelRequest() ); @@ -715,7 +717,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateTunedModelRequest() ); @@ -737,7 +739,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteTunedModelRequest() ); @@ -768,7 +770,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteTunedModelRequest() ); @@ -815,7 +817,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteTunedModelRequest() ); @@ -846,7 +848,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteTunedModelRequest() ); @@ -867,7 +869,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateTunedModelRequest() ); @@ -886,7 +888,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateTunedModelRequest() ); @@ -926,7 +928,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateTunedModelRequest() ); @@ -943,7 +945,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateTunedModelRequest() ); @@ -962,7 +964,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -984,7 +986,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1005,7 +1007,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListModelsRequest() ); @@ -1030,7 +1032,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListModelsRequest() ); @@ -1071,7 +1073,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListModelsRequest() ); @@ -1088,7 +1090,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListModelsRequest() ); @@ -1136,7 +1138,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListModelsRequest() ); @@ -1175,7 +1177,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListModelsRequest() ); @@ -1211,7 +1213,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListModelsRequest() ); @@ -1243,7 +1245,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListTunedModelsRequest() ); @@ -1268,7 +1270,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListTunedModelsRequest() ); @@ -1311,7 +1313,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListTunedModelsRequest() ); @@ -1328,7 +1330,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListTunedModelsRequest() ); @@ -1376,7 +1378,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListTunedModelsRequest() ); @@ -1413,7 +1415,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListTunedModelsRequest() ); @@ -1450,7 +1452,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListTunedModelsRequest() ); @@ -1479,7 +1481,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1558,7 +1560,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1638,7 +1640,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1734,8 +1736,7 @@ describe('v1beta.ModelServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1754,7 +1755,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1763,8 +1764,7 @@ describe('v1beta.ModelServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1780,7 +1780,7 @@ describe('v1beta.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1789,7 +1789,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1818,7 +1818,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1829,7 +1829,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1882,7 +1882,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1891,7 +1891,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1920,7 +1920,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1930,7 +1930,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1975,7 +1975,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1985,7 +1985,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2024,7 +2024,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -2033,7 +2033,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2062,7 +2062,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -2071,7 +2071,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2100,7 +2100,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -2109,7 +2109,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2138,7 +2138,7 @@ describe('v1beta.ModelServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -2148,7 +2148,7 @@ describe('v1beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta2.ts b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta2.ts index 8e7103e00e9..3173f42ddb7 100644 --- a/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta2.ts +++ b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta2.ts @@ -255,7 +255,9 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() ); @@ -345,7 +347,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() ); @@ -392,7 +394,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() ); @@ -420,7 +422,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() ); @@ -441,7 +443,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() ); @@ -466,7 +468,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() ); @@ -507,7 +509,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() ); @@ -524,7 +526,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() ); @@ -572,7 +574,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() ); @@ -611,7 +613,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() ); @@ -648,7 +650,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() ); @@ -675,7 +677,7 @@ describe('v1beta2.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -684,7 +686,7 @@ describe('v1beta2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta3.ts b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta3.ts index 107447d2564..5bba347b8b9 100644 --- a/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta3.ts +++ b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta3.ts @@ -287,7 +287,9 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetModelRequest() ); @@ -377,7 +379,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetModelRequest() ); @@ -424,7 +426,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetModelRequest() ); @@ -452,7 +454,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetModelRequest() ); @@ -473,7 +475,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetTunedModelRequest() ); @@ -504,7 +506,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetTunedModelRequest() ); @@ -551,7 +553,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetTunedModelRequest() ); @@ -582,7 +584,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetTunedModelRequest() ); @@ -603,7 +605,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdateTunedModelRequest() ); @@ -635,7 +637,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdateTunedModelRequest() ); @@ -683,7 +685,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdateTunedModelRequest() ); @@ -715,7 +717,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdateTunedModelRequest() ); @@ -737,7 +739,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeleteTunedModelRequest() ); @@ -768,7 +770,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeleteTunedModelRequest() ); @@ -815,7 +817,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeleteTunedModelRequest() ); @@ -846,7 +848,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeleteTunedModelRequest() ); @@ -867,7 +869,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreateTunedModelRequest() ); @@ -886,7 +888,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreateTunedModelRequest() ); @@ -926,7 +928,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreateTunedModelRequest() ); @@ -943,7 +945,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreateTunedModelRequest() ); @@ -962,7 +964,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -984,7 +986,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1005,7 +1007,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListModelsRequest() ); @@ -1030,7 +1032,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListModelsRequest() ); @@ -1071,7 +1073,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListModelsRequest() ); @@ -1088,7 +1090,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListModelsRequest() ); @@ -1136,7 +1138,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListModelsRequest() ); @@ -1175,7 +1177,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListModelsRequest() ); @@ -1212,7 +1214,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListModelsRequest() ); @@ -1244,7 +1246,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListTunedModelsRequest() ); @@ -1269,7 +1271,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListTunedModelsRequest() ); @@ -1312,7 +1314,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListTunedModelsRequest() ); @@ -1329,7 +1331,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListTunedModelsRequest() ); @@ -1379,7 +1381,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListTunedModelsRequest() ); @@ -1418,7 +1420,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListTunedModelsRequest() ); @@ -1455,7 +1457,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListTunedModelsRequest() ); @@ -1484,7 +1486,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1563,7 +1565,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1643,7 +1645,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1739,8 +1741,7 @@ describe('v1beta3.ModelServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1759,7 +1760,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1768,8 +1769,7 @@ describe('v1beta3.ModelServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1785,7 +1785,7 @@ describe('v1beta3.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1794,7 +1794,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1823,7 +1823,7 @@ describe('v1beta3.ModelServiceClient', () => { }); }); - describe('permission', () => { + describe('permission', async () => { const fakePath = '/rendered/path/permission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1833,7 +1833,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.permissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1875,7 +1875,7 @@ describe('v1beta3.ModelServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1884,7 +1884,7 @@ describe('v1beta3.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_permission_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_permission_service_v1alpha.ts index 20e13278888..5406a1d20ca 100644 --- a/packages/google-ai-generativelanguage/test/gapic_permission_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_permission_service_v1alpha.ts @@ -265,7 +265,9 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.permissionServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreatePermissionRequest() ); @@ -360,7 +362,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreatePermissionRequest() ); @@ -408,7 +410,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreatePermissionRequest() ); @@ -440,7 +442,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreatePermissionRequest() ); @@ -462,7 +464,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetPermissionRequest() ); @@ -494,7 +496,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetPermissionRequest() ); @@ -542,7 +544,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetPermissionRequest() ); @@ -574,7 +576,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetPermissionRequest() ); @@ -596,7 +598,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdatePermissionRequest() ); @@ -629,7 +631,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdatePermissionRequest() ); @@ -678,7 +680,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdatePermissionRequest() ); @@ -711,7 +713,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdatePermissionRequest() ); @@ -734,7 +736,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeletePermissionRequest() ); @@ -766,7 +768,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeletePermissionRequest() ); @@ -814,7 +816,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeletePermissionRequest() ); @@ -846,7 +848,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeletePermissionRequest() ); @@ -868,7 +870,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.TransferOwnershipRequest() ); @@ -900,7 +902,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.TransferOwnershipRequest() ); @@ -948,7 +950,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.TransferOwnershipRequest() ); @@ -980,7 +982,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.TransferOwnershipRequest() ); @@ -1002,7 +1004,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListPermissionsRequest() ); @@ -1042,7 +1044,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListPermissionsRequest() ); @@ -1100,7 +1102,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListPermissionsRequest() ); @@ -1132,7 +1134,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListPermissionsRequest() ); @@ -1196,7 +1198,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListPermissionsRequest() ); @@ -1249,7 +1251,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListPermissionsRequest() ); @@ -1300,7 +1302,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListPermissionsRequest() ); @@ -1338,7 +1340,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1348,7 +1350,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1377,7 +1379,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1389,7 +1391,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1442,7 +1444,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1452,7 +1454,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1481,7 +1483,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1492,7 +1494,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1537,7 +1539,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1548,7 +1550,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1587,7 +1589,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1597,7 +1599,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1626,7 +1628,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1636,7 +1638,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1665,7 +1667,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1675,7 +1677,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1704,7 +1706,7 @@ describe('v1alpha.PermissionServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1715,7 +1717,7 @@ describe('v1alpha.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta.ts index 4f804f81f2e..68bfdbcbfae 100644 --- a/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta.ts @@ -266,7 +266,9 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.permissionServiceStub); client.close().then(() => { done(); @@ -333,7 +335,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreatePermissionRequest() ); @@ -366,7 +368,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreatePermissionRequest() ); @@ -415,7 +417,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreatePermissionRequest() ); @@ -448,7 +450,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreatePermissionRequest() ); @@ -471,7 +473,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetPermissionRequest() ); @@ -504,7 +506,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetPermissionRequest() ); @@ -553,7 +555,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetPermissionRequest() ); @@ -586,7 +588,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetPermissionRequest() ); @@ -609,7 +611,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdatePermissionRequest() ); @@ -643,7 +645,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdatePermissionRequest() ); @@ -693,7 +695,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdatePermissionRequest() ); @@ -727,7 +729,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdatePermissionRequest() ); @@ -751,7 +753,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeletePermissionRequest() ); @@ -784,7 +786,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeletePermissionRequest() ); @@ -833,7 +835,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeletePermissionRequest() ); @@ -866,7 +868,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeletePermissionRequest() ); @@ -889,7 +891,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.TransferOwnershipRequest() ); @@ -922,7 +924,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.TransferOwnershipRequest() ); @@ -971,7 +973,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.TransferOwnershipRequest() ); @@ -1004,7 +1006,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.TransferOwnershipRequest() ); @@ -1027,7 +1029,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListPermissionsRequest() ); @@ -1068,7 +1070,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListPermissionsRequest() ); @@ -1127,7 +1129,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListPermissionsRequest() ); @@ -1160,7 +1162,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListPermissionsRequest() ); @@ -1223,7 +1225,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListPermissionsRequest() ); @@ -1275,7 +1277,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListPermissionsRequest() ); @@ -1327,7 +1329,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListPermissionsRequest() ); @@ -1365,7 +1367,7 @@ describe('v1beta.PermissionServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -1376,7 +1378,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1405,7 +1407,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -1418,7 +1420,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1471,7 +1473,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -1482,7 +1484,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1511,7 +1513,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -1523,7 +1525,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1568,7 +1570,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -1580,7 +1582,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1619,7 +1621,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1630,7 +1632,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1659,7 +1661,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1670,7 +1672,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1699,7 +1701,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1710,7 +1712,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1739,7 +1741,7 @@ describe('v1beta.PermissionServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1751,7 +1753,7 @@ describe('v1beta.PermissionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta3.ts b/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta3.ts index 1b2e0f4cd53..10304192adc 100644 --- a/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta3.ts +++ b/packages/google-ai-generativelanguage/test/gapic_permission_service_v1beta3.ts @@ -265,7 +265,9 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.permissionServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreatePermissionRequest() ); @@ -360,7 +362,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreatePermissionRequest() ); @@ -408,7 +410,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreatePermissionRequest() ); @@ -440,7 +442,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CreatePermissionRequest() ); @@ -462,7 +464,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetPermissionRequest() ); @@ -494,7 +496,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetPermissionRequest() ); @@ -542,7 +544,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetPermissionRequest() ); @@ -574,7 +576,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GetPermissionRequest() ); @@ -596,7 +598,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdatePermissionRequest() ); @@ -629,7 +631,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdatePermissionRequest() ); @@ -678,7 +680,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdatePermissionRequest() ); @@ -711,7 +713,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.UpdatePermissionRequest() ); @@ -734,7 +736,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeletePermissionRequest() ); @@ -766,7 +768,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeletePermissionRequest() ); @@ -814,7 +816,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeletePermissionRequest() ); @@ -846,7 +848,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.DeletePermissionRequest() ); @@ -868,7 +870,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.TransferOwnershipRequest() ); @@ -900,7 +902,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.TransferOwnershipRequest() ); @@ -948,7 +950,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.TransferOwnershipRequest() ); @@ -980,7 +982,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.TransferOwnershipRequest() ); @@ -1002,7 +1004,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListPermissionsRequest() ); @@ -1042,7 +1044,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListPermissionsRequest() ); @@ -1100,7 +1102,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListPermissionsRequest() ); @@ -1132,7 +1134,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListPermissionsRequest() ); @@ -1196,7 +1198,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListPermissionsRequest() ); @@ -1249,7 +1251,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListPermissionsRequest() ); @@ -1300,7 +1302,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.ListPermissionsRequest() ); @@ -1338,7 +1340,7 @@ describe('v1beta3.PermissionServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1348,7 +1350,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1377,7 +1379,7 @@ describe('v1beta3.PermissionServiceClient', () => { }); }); - describe('permission', () => { + describe('permission', async () => { const fakePath = '/rendered/path/permission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1388,7 +1390,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.permissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1430,7 +1432,7 @@ describe('v1beta3.PermissionServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1440,7 +1442,7 @@ describe('v1beta3.PermissionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1alpha.ts index d375fea4736..a393ff3a328 100644 --- a/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1alpha.ts @@ -202,7 +202,9 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.predictionServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.PredictRequest() ); @@ -297,7 +299,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.PredictRequest() ); @@ -345,7 +347,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.PredictRequest() ); @@ -374,7 +376,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.PredictRequest() ); @@ -390,7 +392,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -400,7 +402,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -429,7 +431,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -441,7 +443,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -494,7 +496,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -504,7 +506,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -533,7 +535,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -544,7 +546,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -589,7 +591,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -600,7 +602,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -639,7 +641,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -649,7 +651,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -678,7 +680,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -688,7 +690,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -717,7 +719,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -727,7 +729,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -756,7 +758,7 @@ describe('v1alpha.PredictionServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -767,7 +769,7 @@ describe('v1alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1beta.ts index e7f04d33471..ac356c53edb 100644 --- a/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_prediction_service_v1beta.ts @@ -203,7 +203,9 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.predictionServiceStub); client.close().then(() => { done(); @@ -270,7 +272,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.PredictRequest() ); @@ -303,7 +305,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.PredictRequest() ); @@ -352,7 +354,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.PredictRequest() ); @@ -382,7 +384,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.PredictRequest() ); @@ -398,7 +400,7 @@ describe('v1beta.PredictionServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -409,7 +411,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -438,7 +440,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -451,7 +453,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -504,7 +506,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -515,7 +517,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -544,7 +546,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -556,7 +558,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -601,7 +603,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -613,7 +615,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -652,7 +654,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -663,7 +665,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -692,7 +694,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -703,7 +705,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -732,7 +734,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -743,7 +745,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -772,7 +774,7 @@ describe('v1beta.PredictionServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -784,7 +786,7 @@ describe('v1beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1alpha.ts index 382adb72bae..8b3177ef0e0 100644 --- a/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1alpha.ts @@ -260,7 +260,9 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.retrieverServiceStub); client.close().then(() => { done(); @@ -319,7 +321,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCorpusRequest() ); @@ -336,7 +338,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCorpusRequest() ); @@ -369,7 +371,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCorpusRequest() ); @@ -386,7 +388,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateCorpusRequest() ); @@ -402,7 +404,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCorpusRequest() ); @@ -433,7 +435,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCorpusRequest() ); @@ -480,7 +482,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCorpusRequest() ); @@ -508,7 +510,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetCorpusRequest() ); @@ -529,7 +531,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCorpusRequest() ); @@ -561,7 +563,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCorpusRequest() ); @@ -609,7 +611,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCorpusRequest() ); @@ -641,7 +643,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateCorpusRequest() ); @@ -663,7 +665,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCorpusRequest() ); @@ -694,7 +696,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCorpusRequest() ); @@ -741,7 +743,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCorpusRequest() ); @@ -772,7 +774,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteCorpusRequest() ); @@ -793,7 +795,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryCorpusRequest() ); @@ -824,7 +826,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryCorpusRequest() ); @@ -871,7 +873,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryCorpusRequest() ); @@ -902,7 +904,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryCorpusRequest() ); @@ -923,7 +925,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateDocumentRequest() ); @@ -954,7 +956,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateDocumentRequest() ); @@ -1001,7 +1003,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateDocumentRequest() ); @@ -1032,7 +1034,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateDocumentRequest() ); @@ -1053,7 +1055,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetDocumentRequest() ); @@ -1084,7 +1086,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetDocumentRequest() ); @@ -1131,7 +1133,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetDocumentRequest() ); @@ -1162,7 +1164,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetDocumentRequest() ); @@ -1183,7 +1185,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateDocumentRequest() ); @@ -1215,7 +1217,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateDocumentRequest() ); @@ -1263,7 +1265,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateDocumentRequest() ); @@ -1295,7 +1297,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateDocumentRequest() ); @@ -1317,7 +1319,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteDocumentRequest() ); @@ -1348,7 +1350,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteDocumentRequest() ); @@ -1395,7 +1397,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteDocumentRequest() ); @@ -1426,7 +1428,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteDocumentRequest() ); @@ -1447,7 +1449,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryDocumentRequest() ); @@ -1478,7 +1480,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryDocumentRequest() ); @@ -1525,7 +1527,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryDocumentRequest() ); @@ -1556,7 +1558,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.QueryDocumentRequest() ); @@ -1577,7 +1579,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateChunkRequest() ); @@ -1608,7 +1610,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateChunkRequest() ); @@ -1655,7 +1657,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateChunkRequest() ); @@ -1686,7 +1688,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CreateChunkRequest() ); @@ -1707,7 +1709,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchCreateChunksRequest() ); @@ -1738,7 +1740,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchCreateChunksRequest() ); @@ -1785,7 +1787,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchCreateChunksRequest() ); @@ -1816,7 +1818,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchCreateChunksRequest() ); @@ -1837,7 +1839,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetChunkRequest() ); @@ -1868,7 +1870,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetChunkRequest() ); @@ -1915,7 +1917,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetChunkRequest() ); @@ -1943,7 +1945,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GetChunkRequest() ); @@ -1964,7 +1966,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateChunkRequest() ); @@ -1996,7 +1998,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateChunkRequest() ); @@ -2044,7 +2046,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateChunkRequest() ); @@ -2076,7 +2078,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.UpdateChunkRequest() ); @@ -2098,7 +2100,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchUpdateChunksRequest() ); @@ -2129,7 +2131,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchUpdateChunksRequest() ); @@ -2176,7 +2178,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchUpdateChunksRequest() ); @@ -2207,7 +2209,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchUpdateChunksRequest() ); @@ -2228,7 +2230,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteChunkRequest() ); @@ -2259,7 +2261,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteChunkRequest() ); @@ -2306,7 +2308,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteChunkRequest() ); @@ -2337,7 +2339,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.DeleteChunkRequest() ); @@ -2358,7 +2360,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchDeleteChunksRequest() ); @@ -2389,7 +2391,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchDeleteChunksRequest() ); @@ -2436,7 +2438,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchDeleteChunksRequest() ); @@ -2467,7 +2469,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchDeleteChunksRequest() ); @@ -2488,7 +2490,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCorporaRequest() ); @@ -2513,7 +2515,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCorporaRequest() ); @@ -2556,7 +2558,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCorporaRequest() ); @@ -2573,7 +2575,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCorporaRequest() ); @@ -2621,7 +2623,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCorporaRequest() ); @@ -2660,7 +2662,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCorporaRequest() ); @@ -2697,7 +2699,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListCorporaRequest() ); @@ -2729,7 +2731,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListDocumentsRequest() ); @@ -2768,7 +2770,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListDocumentsRequest() ); @@ -2825,7 +2827,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListDocumentsRequest() ); @@ -2856,7 +2858,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListDocumentsRequest() ); @@ -2917,7 +2919,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListDocumentsRequest() ); @@ -2967,7 +2969,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListDocumentsRequest() ); @@ -3017,7 +3019,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListDocumentsRequest() ); @@ -3060,7 +3062,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListChunksRequest() ); @@ -3099,7 +3101,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListChunksRequest() ); @@ -3154,7 +3156,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListChunksRequest() ); @@ -3185,7 +3187,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListChunksRequest() ); @@ -3246,7 +3248,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListChunksRequest() ); @@ -3298,7 +3300,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListChunksRequest() ); @@ -3348,7 +3350,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.ListChunksRequest() ); @@ -3388,7 +3390,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -3397,7 +3399,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3426,7 +3428,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -3437,7 +3439,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3490,7 +3492,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -3499,7 +3501,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3528,7 +3530,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -3538,7 +3540,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3583,7 +3585,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -3593,7 +3595,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3632,7 +3634,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -3641,7 +3643,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3670,7 +3672,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -3679,7 +3681,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3708,7 +3710,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -3717,7 +3719,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3746,7 +3748,7 @@ describe('v1alpha.RetrieverServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -3756,7 +3758,7 @@ describe('v1alpha.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1beta.ts index 56d00221fbb..023ef2c5892 100644 --- a/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_retriever_service_v1beta.ts @@ -257,7 +257,9 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.retrieverServiceStub); client.close().then(() => { done(); @@ -316,7 +318,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCorpusRequest() ); @@ -333,7 +335,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCorpusRequest() ); @@ -366,7 +368,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCorpusRequest() ); @@ -383,7 +385,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateCorpusRequest() ); @@ -399,7 +401,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCorpusRequest() ); @@ -430,7 +432,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCorpusRequest() ); @@ -477,7 +479,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCorpusRequest() ); @@ -505,7 +507,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetCorpusRequest() ); @@ -526,7 +528,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCorpusRequest() ); @@ -558,7 +560,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCorpusRequest() ); @@ -606,7 +608,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCorpusRequest() ); @@ -638,7 +640,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateCorpusRequest() ); @@ -660,7 +662,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCorpusRequest() ); @@ -691,7 +693,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCorpusRequest() ); @@ -738,7 +740,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCorpusRequest() ); @@ -769,7 +771,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteCorpusRequest() ); @@ -790,7 +792,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryCorpusRequest() ); @@ -821,7 +823,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryCorpusRequest() ); @@ -868,7 +870,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryCorpusRequest() ); @@ -899,7 +901,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryCorpusRequest() ); @@ -920,7 +922,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateDocumentRequest() ); @@ -951,7 +953,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateDocumentRequest() ); @@ -998,7 +1000,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateDocumentRequest() ); @@ -1029,7 +1031,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateDocumentRequest() ); @@ -1050,7 +1052,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetDocumentRequest() ); @@ -1081,7 +1083,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetDocumentRequest() ); @@ -1128,7 +1130,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetDocumentRequest() ); @@ -1159,7 +1161,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetDocumentRequest() ); @@ -1180,7 +1182,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateDocumentRequest() ); @@ -1212,7 +1214,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateDocumentRequest() ); @@ -1260,7 +1262,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateDocumentRequest() ); @@ -1292,7 +1294,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateDocumentRequest() ); @@ -1314,7 +1316,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteDocumentRequest() ); @@ -1345,7 +1347,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteDocumentRequest() ); @@ -1392,7 +1394,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteDocumentRequest() ); @@ -1423,7 +1425,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteDocumentRequest() ); @@ -1444,7 +1446,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryDocumentRequest() ); @@ -1475,7 +1477,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryDocumentRequest() ); @@ -1522,7 +1524,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryDocumentRequest() ); @@ -1553,7 +1555,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.QueryDocumentRequest() ); @@ -1574,7 +1576,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateChunkRequest() ); @@ -1605,7 +1607,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateChunkRequest() ); @@ -1652,7 +1654,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateChunkRequest() ); @@ -1683,7 +1685,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CreateChunkRequest() ); @@ -1704,7 +1706,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchCreateChunksRequest() ); @@ -1735,7 +1737,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchCreateChunksRequest() ); @@ -1782,7 +1784,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchCreateChunksRequest() ); @@ -1813,7 +1815,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchCreateChunksRequest() ); @@ -1834,7 +1836,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetChunkRequest() ); @@ -1865,7 +1867,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetChunkRequest() ); @@ -1912,7 +1914,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetChunkRequest() ); @@ -1940,7 +1942,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GetChunkRequest() ); @@ -1961,7 +1963,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateChunkRequest() ); @@ -1993,7 +1995,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateChunkRequest() ); @@ -2041,7 +2043,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateChunkRequest() ); @@ -2073,7 +2075,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.UpdateChunkRequest() ); @@ -2095,7 +2097,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchUpdateChunksRequest() ); @@ -2126,7 +2128,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchUpdateChunksRequest() ); @@ -2173,7 +2175,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchUpdateChunksRequest() ); @@ -2204,7 +2206,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchUpdateChunksRequest() ); @@ -2225,7 +2227,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteChunkRequest() ); @@ -2256,7 +2258,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteChunkRequest() ); @@ -2303,7 +2305,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteChunkRequest() ); @@ -2334,7 +2336,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.DeleteChunkRequest() ); @@ -2355,7 +2357,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchDeleteChunksRequest() ); @@ -2386,7 +2388,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchDeleteChunksRequest() ); @@ -2433,7 +2435,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchDeleteChunksRequest() ); @@ -2464,7 +2466,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchDeleteChunksRequest() ); @@ -2485,7 +2487,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCorporaRequest() ); @@ -2510,7 +2512,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCorporaRequest() ); @@ -2551,7 +2553,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCorporaRequest() ); @@ -2568,7 +2570,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCorporaRequest() ); @@ -2616,7 +2618,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCorporaRequest() ); @@ -2655,7 +2657,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCorporaRequest() ); @@ -2692,7 +2694,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListCorporaRequest() ); @@ -2724,7 +2726,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListDocumentsRequest() ); @@ -2763,7 +2765,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListDocumentsRequest() ); @@ -2820,7 +2822,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListDocumentsRequest() ); @@ -2851,7 +2853,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListDocumentsRequest() ); @@ -2912,7 +2914,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListDocumentsRequest() ); @@ -2962,7 +2964,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListDocumentsRequest() ); @@ -3012,7 +3014,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListDocumentsRequest() ); @@ -3055,7 +3057,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListChunksRequest() ); @@ -3094,7 +3096,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListChunksRequest() ); @@ -3149,7 +3151,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListChunksRequest() ); @@ -3180,7 +3182,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListChunksRequest() ); @@ -3241,7 +3243,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListChunksRequest() ); @@ -3293,7 +3295,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListChunksRequest() ); @@ -3342,7 +3344,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.ListChunksRequest() ); @@ -3382,7 +3384,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -3391,7 +3393,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3420,7 +3422,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -3431,7 +3433,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3484,7 +3486,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -3493,7 +3495,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3522,7 +3524,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -3532,7 +3534,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3577,7 +3579,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -3587,7 +3589,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3626,7 +3628,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -3635,7 +3637,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3664,7 +3666,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -3673,7 +3675,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3702,7 +3704,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -3711,7 +3713,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3740,7 +3742,7 @@ describe('v1beta.RetrieverServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -3750,7 +3752,7 @@ describe('v1beta.RetrieverServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_text_service_v1alpha.ts b/packages/google-ai-generativelanguage/test/gapic_text_service_v1alpha.ts index 4d73bba897d..e5a7eb62200 100644 --- a/packages/google-ai-generativelanguage/test/gapic_text_service_v1alpha.ts +++ b/packages/google-ai-generativelanguage/test/gapic_text_service_v1alpha.ts @@ -192,7 +192,9 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textServiceStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateTextRequest() ); @@ -282,7 +284,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateTextRequest() ); @@ -329,7 +331,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateTextRequest() ); @@ -360,7 +362,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.GenerateTextRequest() ); @@ -381,7 +383,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedTextRequest() ); @@ -412,7 +414,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedTextRequest() ); @@ -459,7 +461,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedTextRequest() ); @@ -487,7 +489,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.EmbedTextRequest() ); @@ -508,7 +510,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedTextRequest() ); @@ -539,7 +541,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedTextRequest() ); @@ -586,7 +588,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedTextRequest() ); @@ -617,7 +619,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.BatchEmbedTextRequest() ); @@ -638,7 +640,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTextTokensRequest() ); @@ -669,7 +671,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTextTokensRequest() ); @@ -716,7 +718,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTextTokensRequest() ); @@ -747,7 +749,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1alpha.CountTextTokensRequest() ); @@ -763,7 +765,7 @@ describe('v1alpha.TextServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -772,7 +774,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -801,7 +803,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -812,7 +814,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -865,7 +867,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -874,7 +876,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -903,7 +905,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -913,7 +915,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -958,7 +960,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -968,7 +970,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1007,7 +1009,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1016,7 +1018,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1045,7 +1047,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1054,7 +1056,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1083,7 +1085,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1092,7 +1094,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1121,7 +1123,7 @@ describe('v1alpha.TextServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1131,7 +1133,7 @@ describe('v1alpha.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta.ts b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta.ts index fb42dd26dbf..721fff75b9f 100644 --- a/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta.ts +++ b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta.ts @@ -192,7 +192,9 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textServiceStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateTextRequest() ); @@ -282,7 +284,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateTextRequest() ); @@ -329,7 +331,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateTextRequest() ); @@ -360,7 +362,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.GenerateTextRequest() ); @@ -381,7 +383,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedTextRequest() ); @@ -412,7 +414,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedTextRequest() ); @@ -459,7 +461,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedTextRequest() ); @@ -487,7 +489,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.EmbedTextRequest() ); @@ -508,7 +510,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedTextRequest() ); @@ -539,7 +541,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedTextRequest() ); @@ -586,7 +588,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedTextRequest() ); @@ -617,7 +619,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.BatchEmbedTextRequest() ); @@ -638,7 +640,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTextTokensRequest() ); @@ -669,7 +671,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTextTokensRequest() ); @@ -716,7 +718,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTextTokensRequest() ); @@ -747,7 +749,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta.CountTextTokensRequest() ); @@ -763,7 +765,7 @@ describe('v1beta.TextServiceClient', () => { }); describe('Path templates', () => { - describe('cachedContent', () => { + describe('cachedContent', async () => { const fakePath = '/rendered/path/cachedContent'; const expectedParameters = { id: 'idValue', @@ -772,7 +774,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cachedContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -801,7 +803,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('chunk', () => { + describe('chunk', async () => { const fakePath = '/rendered/path/chunk'; const expectedParameters = { corpus: 'corpusValue', @@ -812,7 +814,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.chunkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -865,7 +867,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('corpus', () => { + describe('corpus', async () => { const fakePath = '/rendered/path/corpus'; const expectedParameters = { corpus: 'corpusValue', @@ -874,7 +876,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -903,7 +905,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('corpusPermission', () => { + describe('corpusPermission', async () => { const fakePath = '/rendered/path/corpusPermission'; const expectedParameters = { corpus: 'corpusValue', @@ -913,7 +915,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.corpusPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -958,7 +960,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('document', () => { + describe('document', async () => { const fakePath = '/rendered/path/document'; const expectedParameters = { corpus: 'corpusValue', @@ -968,7 +970,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1007,7 +1009,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { file: 'fileValue', @@ -1016,7 +1018,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1045,7 +1047,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -1054,7 +1056,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1083,7 +1085,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1092,7 +1094,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1121,7 +1123,7 @@ describe('v1beta.TextServiceClient', () => { }); }); - describe('tunedModelPermission', () => { + describe('tunedModelPermission', async () => { const fakePath = '/rendered/path/tunedModelPermission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -1131,7 +1133,7 @@ describe('v1beta.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPermissionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta2.ts b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta2.ts index 039899684d2..b1a34fea7dd 100644 --- a/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta2.ts +++ b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta2.ts @@ -192,7 +192,9 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textServiceStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() ); @@ -282,7 +284,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() ); @@ -329,7 +331,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() ); @@ -360,7 +362,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() ); @@ -381,7 +383,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() ); @@ -412,7 +414,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() ); @@ -459,7 +461,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() ); @@ -487,7 +489,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() ); @@ -503,7 +505,7 @@ describe('v1beta2.TextServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -512,7 +514,7 @@ describe('v1beta2.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta3.ts b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta3.ts index 71901c2dab2..c9370aeb02d 100644 --- a/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta3.ts +++ b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta3.ts @@ -192,7 +192,9 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textServiceStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateTextRequest() ); @@ -282,7 +284,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateTextRequest() ); @@ -329,7 +331,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateTextRequest() ); @@ -360,7 +362,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.GenerateTextRequest() ); @@ -381,7 +383,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.EmbedTextRequest() ); @@ -412,7 +414,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.EmbedTextRequest() ); @@ -459,7 +461,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.EmbedTextRequest() ); @@ -487,7 +489,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.EmbedTextRequest() ); @@ -508,7 +510,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.BatchEmbedTextRequest() ); @@ -539,7 +541,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.BatchEmbedTextRequest() ); @@ -586,7 +588,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.BatchEmbedTextRequest() ); @@ -617,7 +619,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.BatchEmbedTextRequest() ); @@ -638,7 +640,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountTextTokensRequest() ); @@ -669,7 +671,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountTextTokensRequest() ); @@ -716,7 +718,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountTextTokensRequest() ); @@ -747,7 +749,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.ai.generativelanguage.v1beta3.CountTextTokensRequest() ); @@ -763,7 +765,7 @@ describe('v1beta3.TextServiceClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { model: 'modelValue', @@ -772,7 +774,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -801,7 +803,7 @@ describe('v1beta3.TextServiceClient', () => { }); }); - describe('permission', () => { + describe('permission', async () => { const fakePath = '/rendered/path/permission'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -811,7 +813,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.permissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -853,7 +855,7 @@ describe('v1beta3.TextServiceClient', () => { }); }); - describe('tunedModel', () => { + describe('tunedModel', async () => { const fakePath = '/rendered/path/tunedModel'; const expectedParameters = { tuned_model: 'tunedModelValue', @@ -862,7 +864,7 @@ describe('v1beta3.TextServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tunedModelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-analytics-admin/package.json b/packages/google-analytics-admin/package.json index d2feb579737..2f46a6d23af 100644 --- a/packages/google-analytics-admin/package.json +++ b/packages/google-analytics-admin/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "google-auth-library": "^10.0.0-rc.1", - "google-gax": "^5.0.0-rc.0", + "google-gax": "^5.0.1-rc.0", "server-destroy": "^1.0.1" }, "devDependencies": { diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json index 1ee7dad0f76..39c3a8581ef 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "7.6.0", + "version": "8.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json index 5af6de4d1c0..c47c3008586 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "7.6.0", + "version": "8.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json index 207e0f5ff6b..611c6fdce9a 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "7.6.0", + "version": "8.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json index 9e9d2409c05..fe95bd196c3 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "7.6.0", + "version": "8.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts index 934828ce8ed..65a4078c23e 100644 --- a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts @@ -861,7 +861,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccount request %j', request); const wrappedCallback: | Callback< @@ -989,7 +991,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAccount request %j', request); const wrappedCallback: | Callback< @@ -1114,7 +1118,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'account.name': request.account!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccount request %j', request); const wrappedCallback: | Callback< @@ -1238,7 +1244,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('provisionAccountTicket request %j', request); const wrappedCallback: | Callback< @@ -1359,7 +1367,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProperty request %j', request); const wrappedCallback: | Callback< @@ -1473,7 +1483,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProperty request %j', request); const wrappedCallback: | Callback< @@ -1604,7 +1616,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProperty request %j', request); const wrappedCallback: | Callback< @@ -1730,7 +1744,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'property.name': request.property!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProperty request %j', request); const wrappedCallback: | Callback< @@ -1861,7 +1877,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFirebaseLink request %j', request); const wrappedCallback: | Callback< @@ -1988,7 +2006,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFirebaseLink request %j', request); const wrappedCallback: | Callback< @@ -2118,7 +2138,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGlobalSiteTag request %j', request); const wrappedCallback: | Callback< @@ -2245,7 +2267,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGoogleAdsLink request %j', request); const wrappedCallback: | Callback< @@ -2375,7 +2399,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'google_ads_link.name': request.googleAdsLink!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGoogleAdsLink request %j', request); const wrappedCallback: | Callback< @@ -2500,7 +2526,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGoogleAdsLink request %j', request); const wrappedCallback: | Callback< @@ -2629,7 +2657,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataSharingSettings request %j', request); const wrappedCallback: | Callback< @@ -2756,7 +2786,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -2884,7 +2916,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -3017,7 +3051,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -3152,7 +3188,9 @@ export class AnalyticsAdminServiceClient { 'measurement_protocol_secret.name': request.measurementProtocolSecret!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -3296,7 +3334,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acknowledgeUserDataCollection request %j', request); const wrappedCallback: | Callback< @@ -3423,7 +3463,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSKAdNetworkConversionValueSchema request %j', request); const wrappedCallback: | Callback< @@ -3557,7 +3599,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'createSKAdNetworkConversionValueSchema request %j', request @@ -3693,7 +3737,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'deleteSKAdNetworkConversionValueSchema request %j', request @@ -3831,7 +3877,9 @@ export class AnalyticsAdminServiceClient { 'skadnetwork_conversion_value_schema.name': request.skadnetworkConversionValueSchema!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateSKAdNetworkConversionValueSchema request %j', request @@ -3966,7 +4014,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGoogleSignalsSettings request %j', request); const wrappedCallback: | Callback< @@ -4098,7 +4148,9 @@ export class AnalyticsAdminServiceClient { 'google_signals_settings.name': request.googleSignalsSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGoogleSignalsSettings request %j', request); const wrappedCallback: | Callback< @@ -4228,7 +4280,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$CreateConversionEvent', 'CreateConversionEvent is deprecated and may be removed in a future version.', @@ -4366,7 +4420,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'conversion_event.name': request.conversionEvent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$UpdateConversionEvent', 'UpdateConversionEvent is deprecated and may be removed in a future version.', @@ -4500,7 +4556,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$GetConversionEvent', 'GetConversionEvent is deprecated and may be removed in a future version.', @@ -4634,7 +4692,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$DeleteConversionEvent', 'DeleteConversionEvent is deprecated and may be removed in a future version.', @@ -4761,7 +4821,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -4886,7 +4948,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'key_event.name': request.keyEvent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -5007,7 +5071,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -5125,7 +5191,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -5251,7 +5319,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDisplayVideo360AdvertiserLink request %j', request); const wrappedCallback: | Callback< @@ -5388,7 +5458,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDisplayVideo360AdvertiserLink request %j', request); const wrappedCallback: | Callback< @@ -5520,7 +5592,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDisplayVideo360AdvertiserLink request %j', request); const wrappedCallback: | Callback< @@ -5656,7 +5730,9 @@ export class AnalyticsAdminServiceClient { 'display_video_360_advertiser_link.name': request.displayVideo_360AdvertiserLink!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDisplayVideo360AdvertiserLink request %j', request); const wrappedCallback: | Callback< @@ -5788,7 +5864,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'getDisplayVideo360AdvertiserLinkProposal request %j', request @@ -5928,7 +6006,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'createDisplayVideo360AdvertiserLinkProposal request %j', request @@ -6068,7 +6148,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'deleteDisplayVideo360AdvertiserLinkProposal request %j', request @@ -6209,7 +6291,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'approveDisplayVideo360AdvertiserLinkProposal request %j', request @@ -6352,7 +6436,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'cancelDisplayVideo360AdvertiserLinkProposal request %j', request @@ -6492,7 +6578,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -6621,7 +6709,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'custom_dimension.name': request.customDimension!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -6747,7 +6837,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('archiveCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -6873,7 +6965,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -7000,7 +7094,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -7129,7 +7225,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'custom_metric.name': request.customMetric!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -7255,7 +7353,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('archiveCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -7375,7 +7475,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -7503,7 +7605,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataRetentionSettings request %j', request); const wrappedCallback: | Callback< @@ -7635,7 +7739,9 @@ export class AnalyticsAdminServiceClient { 'data_retention_settings.name': request.dataRetentionSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataRetentionSettings request %j', request); const wrappedCallback: | Callback< @@ -7762,7 +7868,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataStream request %j', request); const wrappedCallback: | Callback< @@ -7888,7 +7996,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataStream request %j', request); const wrappedCallback: | Callback< @@ -8017,7 +8127,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_stream.name': request.dataStream!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataStream request %j', request); const wrappedCallback: | Callback< @@ -8137,7 +8249,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataStream request %j', request); const wrappedCallback: | Callback< @@ -8259,7 +8373,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAudience request %j', request); const wrappedCallback: | Callback< @@ -8377,7 +8493,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAudience request %j', request); const wrappedCallback: | Callback< @@ -8502,7 +8620,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'audience.name': request.audience!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAudience request %j', request); const wrappedCallback: | Callback< @@ -8621,7 +8741,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('archiveAudience request %j', request); const wrappedCallback: | Callback< @@ -8747,7 +8869,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSearchAds360Link request %j', request); const wrappedCallback: | Callback< @@ -8874,7 +8998,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSearchAds360Link request %j', request); const wrappedCallback: | Callback< @@ -9000,7 +9126,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSearchAds360Link request %j', request); const wrappedCallback: | Callback< @@ -9129,7 +9257,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'search_ads_360_link.name': request.searchAds_360Link!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSearchAds360Link request %j', request); const wrappedCallback: | Callback< @@ -9255,7 +9385,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttributionSettings request %j', request); const wrappedCallback: | Callback< @@ -9386,7 +9518,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'attribution_settings.name': request.attributionSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAttributionSettings request %j', request); const wrappedCallback: | Callback< @@ -9599,7 +9733,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ entity: request.entity ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runAccessReport request %j', request); const wrappedCallback: | Callback< @@ -9728,7 +9864,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAccessBinding request %j', request); const wrappedCallback: | Callback< @@ -9856,7 +9994,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccessBinding request %j', request); const wrappedCallback: | Callback< @@ -9981,7 +10121,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'access_binding.name': request.accessBinding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccessBinding request %j', request); const wrappedCallback: | Callback< @@ -10108,7 +10250,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAccessBinding request %j', request); const wrappedCallback: | Callback< @@ -10244,7 +10388,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateAccessBindings request %j', request); const wrappedCallback: | Callback< @@ -10379,7 +10525,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetAccessBindings request %j', request); const wrappedCallback: | Callback< @@ -10513,7 +10661,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateAccessBindings request %j', request); const wrappedCallback: | Callback< @@ -10645,7 +10795,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteAccessBindings request %j', request); const wrappedCallback: | Callback< @@ -10771,7 +10923,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExpandedDataSet request %j', request); const wrappedCallback: | Callback< @@ -10898,7 +11052,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createExpandedDataSet request %j', request); const wrappedCallback: | Callback< @@ -11030,7 +11186,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'expanded_data_set.name': request.expandedDataSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateExpandedDataSet request %j', request); const wrappedCallback: | Callback< @@ -11155,7 +11313,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteExpandedDataSet request %j', request); const wrappedCallback: | Callback< @@ -11275,7 +11435,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChannelGroup request %j', request); const wrappedCallback: | Callback< @@ -11403,7 +11565,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createChannelGroup request %j', request); const wrappedCallback: | Callback< @@ -11535,7 +11699,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'channel_group.name': request.channelGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateChannelGroup request %j', request); const wrappedCallback: | Callback< @@ -11661,7 +11827,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteChannelGroup request %j', request); const wrappedCallback: | Callback< @@ -11789,7 +11957,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setAutomatedGa4ConfigurationOptOut request %j', request); const wrappedCallback: | Callback< @@ -11921,7 +12091,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchAutomatedGa4ConfigurationOptOut request %j', request); const wrappedCallback: | Callback< @@ -12054,7 +12226,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBigQueryLink request %j', request); const wrappedCallback: | Callback< @@ -12175,7 +12349,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBigQueryLink request %j', request); const wrappedCallback: | Callback< @@ -12301,7 +12477,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBigQueryLink request %j', request); const wrappedCallback: | Callback< @@ -12432,7 +12610,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'bigquery_link.name': request.bigqueryLink!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBigQueryLink request %j', request); const wrappedCallback: | Callback< @@ -12562,7 +12742,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnhancedMeasurementSettings request %j', request); const wrappedCallback: | Callback< @@ -12702,7 +12884,9 @@ export class AnalyticsAdminServiceClient { 'enhanced_measurement_settings.name': request.enhancedMeasurementSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEnhancedMeasurementSettings request %j', request); const wrappedCallback: | Callback< @@ -12836,7 +13020,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConnectedSiteTag request %j', request); const wrappedCallback: | Callback< @@ -12964,7 +13150,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConnectedSiteTag request %j', request); const wrappedCallback: | Callback< @@ -13090,7 +13278,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectedSiteTags request %j', request); const wrappedCallback: | Callback< @@ -13216,7 +13406,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchConnectedGa4Property request %j', request); const wrappedCallback: | Callback< @@ -13337,7 +13529,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAdSenseLink request %j', request); const wrappedCallback: | Callback< @@ -13466,7 +13660,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAdSenseLink request %j', request); const wrappedCallback: | Callback< @@ -13593,7 +13789,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAdSenseLink request %j', request); const wrappedCallback: | Callback< @@ -13719,7 +13917,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEventCreateRule request %j', request); const wrappedCallback: | Callback< @@ -13846,7 +14046,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEventCreateRule request %j', request); const wrappedCallback: | Callback< @@ -13978,7 +14180,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'event_create_rule.name': request.eventCreateRule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEventCreateRule request %j', request); const wrappedCallback: | Callback< @@ -14104,7 +14308,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEventCreateRule request %j', request); const wrappedCallback: | Callback< @@ -14230,7 +14436,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEventEditRule request %j', request); const wrappedCallback: | Callback< @@ -14357,7 +14565,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEventEditRule request %j', request); const wrappedCallback: | Callback< @@ -14489,7 +14699,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'event_edit_rule.name': request.eventEditRule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEventEditRule request %j', request); const wrappedCallback: | Callback< @@ -14614,7 +14826,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEventEditRule request %j', request); const wrappedCallback: | Callback< @@ -14743,7 +14957,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reorderEventEditRules request %j', request); const wrappedCallback: | Callback< @@ -14875,7 +15091,9 @@ export class AnalyticsAdminServiceClient { 'data_redaction_settings.name': request.dataRedactionSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataRedactionSettings request %j', request); const wrappedCallback: | Callback< @@ -15003,7 +15221,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataRedactionSettings request %j', request); const wrappedCallback: | Callback< @@ -15130,7 +15350,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCalculatedMetric request %j', request); const wrappedCallback: | Callback< @@ -15267,7 +15489,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCalculatedMetric request %j', request); const wrappedCallback: | Callback< @@ -15396,7 +15620,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'calculated_metric.name': request.calculatedMetric!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCalculatedMetric request %j', request); const wrappedCallback: | Callback< @@ -15523,7 +15749,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCalculatedMetric request %j', request); const wrappedCallback: | Callback< @@ -15647,7 +15875,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRollupProperty request %j', request); const wrappedCallback: | Callback< @@ -15777,7 +16007,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRollupPropertySourceLink request %j', request); const wrappedCallback: | Callback< @@ -15907,7 +16139,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRollupPropertySourceLink request %j', request); const wrappedCallback: | Callback< @@ -16042,7 +16276,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRollupPropertySourceLink request %j', request); const wrappedCallback: | Callback< @@ -16172,7 +16408,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('provisionSubproperty request %j', request); const wrappedCallback: | Callback< @@ -16300,7 +16538,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSubpropertyEventFilter request %j', request); const wrappedCallback: | Callback< @@ -16428,7 +16668,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSubpropertyEventFilter request %j', request); const wrappedCallback: | Callback< @@ -16559,7 +16801,9 @@ export class AnalyticsAdminServiceClient { 'subproperty_event_filter.name': request.subpropertyEventFilter!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSubpropertyEventFilter request %j', request); const wrappedCallback: | Callback< @@ -16687,7 +16931,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSubpropertyEventFilter request %j', request); const wrappedCallback: | Callback< @@ -16822,7 +17068,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListAccountsRequest, @@ -16891,7 +17139,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccounts stream %j', request); return this.descriptors.page.listAccounts.createStream( this.innerApiCalls.listAccounts as GaxCall, @@ -16942,7 +17192,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccounts iterate %j', request); return this.descriptors.page.listAccounts.asyncIterate( this.innerApiCalls['listAccounts'] as GaxCall, @@ -17044,7 +17296,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, @@ -17109,7 +17363,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccountSummaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountSummaries stream %j', request); return this.descriptors.page.listAccountSummaries.createStream( this.innerApiCalls.listAccountSummaries as GaxCall, @@ -17156,7 +17412,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccountSummaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountSummaries iterate %j', request); return this.descriptors.page.listAccountSummaries.asyncIterate( this.innerApiCalls['listAccountSummaries'] as GaxCall, @@ -17283,7 +17541,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListPropertiesRequest, @@ -17369,7 +17629,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProperties']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProperties stream %j', request); return this.descriptors.page.listProperties.createStream( this.innerApiCalls.listProperties as GaxCall, @@ -17437,7 +17699,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProperties']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProperties iterate %j', request); return this.descriptors.page.listProperties.asyncIterate( this.innerApiCalls['listProperties'] as GaxCall, @@ -17548,7 +17812,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, @@ -17621,7 +17887,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFirebaseLinks stream %j', request); return this.descriptors.page.listFirebaseLinks.createStream( this.innerApiCalls.listFirebaseLinks as GaxCall, @@ -17676,7 +17944,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFirebaseLinks iterate %j', request); return this.descriptors.page.listFirebaseLinks.asyncIterate( this.innerApiCalls['listFirebaseLinks'] as GaxCall, @@ -17784,7 +18054,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, @@ -17855,7 +18127,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGoogleAdsLinks stream %j', request); return this.descriptors.page.listGoogleAdsLinks.createStream( this.innerApiCalls.listGoogleAdsLinks as GaxCall, @@ -17908,7 +18182,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGoogleAdsLinks iterate %j', request); return this.descriptors.page.listGoogleAdsLinks.asyncIterate( this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, @@ -18018,7 +18294,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, @@ -18091,7 +18369,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMeasurementProtocolSecrets stream %j', request); return this.descriptors.page.listMeasurementProtocolSecrets.createStream( this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, @@ -18146,7 +18426,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMeasurementProtocolSecrets iterate %j', request); return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, @@ -18259,7 +18541,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListSKAdNetworkConversionValueSchemasRequest, @@ -18341,7 +18625,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listSkAdNetworkConversionValueSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSKAdNetworkConversionValueSchemas stream %j', request); return this.descriptors.page.listSKAdNetworkConversionValueSchemas.createStream( this.innerApiCalls.listSkAdNetworkConversionValueSchemas as GaxCall, @@ -18399,7 +18685,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listSkAdNetworkConversionValueSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSKAdNetworkConversionValueSchemas iterate %j', request); return this.descriptors.page.listSKAdNetworkConversionValueSchemas.asyncIterate( this.innerApiCalls['listSkAdNetworkConversionValueSchemas'] as GaxCall, @@ -18539,7 +18827,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ account: request.account ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, @@ -18638,7 +18928,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchChangeHistoryEvents stream %j', request); return this.descriptors.page.searchChangeHistoryEvents.createStream( this.innerApiCalls.searchChangeHistoryEvents as GaxCall, @@ -18719,7 +19011,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchChangeHistoryEvents iterate %j', request); return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, @@ -18831,7 +19125,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$ListConversionEvents', 'ListConversionEvents is deprecated and may be removed in a future version.', @@ -18908,7 +19204,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$ListConversionEvents', 'ListConversionEvents is deprecated and may be removed in a future version.', @@ -18967,7 +19265,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$ListConversionEvents', 'ListConversionEvents is deprecated and may be removed in a future version.', @@ -19081,7 +19381,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListKeyEventsRequest, @@ -19152,7 +19454,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listKeyEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyEvents stream %j', request); return this.descriptors.page.listKeyEvents.createStream( this.innerApiCalls.listKeyEvents as GaxCall, @@ -19205,7 +19509,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listKeyEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyEvents iterate %j', request); return this.descriptors.page.listKeyEvents.asyncIterate( this.innerApiCalls['listKeyEvents'] as GaxCall, @@ -19314,7 +19620,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, @@ -19393,7 +19701,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listDisplayVideo360AdvertiserLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDisplayVideo360AdvertiserLinks stream %j', request); return this.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream( this.innerApiCalls.listDisplayVideo360AdvertiserLinks as GaxCall, @@ -19448,7 +19758,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listDisplayVideo360AdvertiserLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDisplayVideo360AdvertiserLinks iterate %j', request); return this.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate( this.innerApiCalls['listDisplayVideo360AdvertiserLinks'] as GaxCall, @@ -19558,7 +19870,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, @@ -19645,7 +19959,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listDisplayVideo360AdvertiserLinkProposals']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDisplayVideo360AdvertiserLinkProposals stream %j', request @@ -19704,7 +20020,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listDisplayVideo360AdvertiserLinkProposals']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDisplayVideo360AdvertiserLinkProposals iterate %j', request @@ -19817,7 +20135,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, @@ -19888,7 +20208,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomDimensions stream %j', request); return this.descriptors.page.listCustomDimensions.createStream( this.innerApiCalls.listCustomDimensions as GaxCall, @@ -19941,7 +20263,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomDimensions iterate %j', request); return this.descriptors.page.listCustomDimensions.asyncIterate( this.innerApiCalls['listCustomDimensions'] as GaxCall, @@ -20049,7 +20373,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, @@ -20120,7 +20446,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomMetrics stream %j', request); return this.descriptors.page.listCustomMetrics.createStream( this.innerApiCalls.listCustomMetrics as GaxCall, @@ -20173,7 +20501,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomMetrics iterate %j', request); return this.descriptors.page.listCustomMetrics.asyncIterate( this.innerApiCalls['listCustomMetrics'] as GaxCall, @@ -20281,7 +20611,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, @@ -20352,7 +20684,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStreams stream %j', request); return this.descriptors.page.listDataStreams.createStream( this.innerApiCalls.listDataStreams as GaxCall, @@ -20405,7 +20739,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStreams iterate %j', request); return this.descriptors.page.listDataStreams.asyncIterate( this.innerApiCalls['listDataStreams'] as GaxCall, @@ -20515,7 +20851,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListAudiencesRequest, @@ -20586,7 +20924,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listAudiences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAudiences stream %j', request); return this.descriptors.page.listAudiences.createStream( this.innerApiCalls.listAudiences as GaxCall, @@ -20639,7 +20979,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listAudiences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAudiences iterate %j', request); return this.descriptors.page.listAudiences.asyncIterate( this.innerApiCalls['listAudiences'] as GaxCall, @@ -20748,7 +21090,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, @@ -20820,7 +21164,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listSearchAds360Links']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSearchAds360Links stream %j', request); return this.descriptors.page.listSearchAds360Links.createStream( this.innerApiCalls.listSearchAds360Links as GaxCall, @@ -20874,7 +21220,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listSearchAds360Links']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSearchAds360Links iterate %j', request); return this.descriptors.page.listSearchAds360Links.asyncIterate( this.innerApiCalls['listSearchAds360Links'] as GaxCall, @@ -20984,7 +21332,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, @@ -21057,7 +21407,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listAccessBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccessBindings stream %j', request); return this.descriptors.page.listAccessBindings.createStream( this.innerApiCalls.listAccessBindings as GaxCall, @@ -21112,7 +21464,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listAccessBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccessBindings iterate %j', request); return this.descriptors.page.listAccessBindings.asyncIterate( this.innerApiCalls['listAccessBindings'] as GaxCall, @@ -21220,7 +21574,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, @@ -21291,7 +21647,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listExpandedDataSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExpandedDataSets stream %j', request); return this.descriptors.page.listExpandedDataSets.createStream( this.innerApiCalls.listExpandedDataSets as GaxCall, @@ -21344,7 +21702,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listExpandedDataSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExpandedDataSets iterate %j', request); return this.descriptors.page.listExpandedDataSets.asyncIterate( this.innerApiCalls['listExpandedDataSets'] as GaxCall, @@ -21453,7 +21813,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, @@ -21525,7 +21887,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listChannelGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelGroups stream %j', request); return this.descriptors.page.listChannelGroups.createStream( this.innerApiCalls.listChannelGroups as GaxCall, @@ -21579,7 +21943,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listChannelGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelGroups iterate %j', request); return this.descriptors.page.listChannelGroups.asyncIterate( this.innerApiCalls['listChannelGroups'] as GaxCall, @@ -21689,7 +22055,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, @@ -21762,7 +22130,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listBigQueryLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBigQueryLinks stream %j', request); return this.descriptors.page.listBigQueryLinks.createStream( this.innerApiCalls.listBigQueryLinks as GaxCall, @@ -21817,7 +22187,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listBigQueryLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBigQueryLinks iterate %j', request); return this.descriptors.page.listBigQueryLinks.asyncIterate( this.innerApiCalls['listBigQueryLinks'] as GaxCall, @@ -21927,7 +22299,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, @@ -22000,7 +22374,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listAdSenseLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdSenseLinks stream %j', request); return this.descriptors.page.listAdSenseLinks.createStream( this.innerApiCalls.listAdSenseLinks as GaxCall, @@ -22055,7 +22431,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listAdSenseLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdSenseLinks iterate %j', request); return this.descriptors.page.listAdSenseLinks.asyncIterate( this.innerApiCalls['listAdSenseLinks'] as GaxCall, @@ -22163,7 +22541,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, @@ -22234,7 +22614,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listEventCreateRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventCreateRules stream %j', request); return this.descriptors.page.listEventCreateRules.createStream( this.innerApiCalls.listEventCreateRules as GaxCall, @@ -22287,7 +22669,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listEventCreateRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventCreateRules iterate %j', request); return this.descriptors.page.listEventCreateRules.asyncIterate( this.innerApiCalls['listEventCreateRules'] as GaxCall, @@ -22395,7 +22779,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListEventEditRulesRequest, @@ -22466,7 +22852,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listEventEditRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventEditRules stream %j', request); return this.descriptors.page.listEventEditRules.createStream( this.innerApiCalls.listEventEditRules as GaxCall, @@ -22519,7 +22907,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listEventEditRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventEditRules iterate %j', request); return this.descriptors.page.listEventEditRules.asyncIterate( this.innerApiCalls['listEventEditRules'] as GaxCall, @@ -22627,7 +23017,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListCalculatedMetricsRequest, @@ -22698,7 +23090,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCalculatedMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCalculatedMetrics stream %j', request); return this.descriptors.page.listCalculatedMetrics.createStream( this.innerApiCalls.listCalculatedMetrics as GaxCall, @@ -22751,7 +23145,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCalculatedMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCalculatedMetrics iterate %j', request); return this.descriptors.page.listCalculatedMetrics.asyncIterate( this.innerApiCalls['listCalculatedMetrics'] as GaxCall, @@ -22863,7 +23259,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListRollupPropertySourceLinksRequest, @@ -22936,7 +23334,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listRollupPropertySourceLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRollupPropertySourceLinks stream %j', request); return this.descriptors.page.listRollupPropertySourceLinks.createStream( this.innerApiCalls.listRollupPropertySourceLinks as GaxCall, @@ -22991,7 +23391,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listRollupPropertySourceLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRollupPropertySourceLinks iterate %j', request); return this.descriptors.page.listRollupPropertySourceLinks.asyncIterate( this.innerApiCalls['listRollupPropertySourceLinks'] as GaxCall, @@ -23102,7 +23504,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1alpha.IListSubpropertyEventFiltersRequest, @@ -23176,7 +23580,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listSubpropertyEventFilters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubpropertyEventFilters stream %j', request); return this.descriptors.page.listSubpropertyEventFilters.createStream( this.innerApiCalls.listSubpropertyEventFilters as GaxCall, @@ -23232,7 +23638,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listSubpropertyEventFilters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubpropertyEventFilters iterate %j', request); return this.descriptors.page.listSubpropertyEventFilters.asyncIterate( this.innerApiCalls['listSubpropertyEventFilters'] as GaxCall, diff --git a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts index 4305817f601..1d895b1bb3f 100644 --- a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts +++ b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts @@ -621,7 +621,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccount request %j', request); const wrappedCallback: | Callback< @@ -749,7 +751,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAccount request %j', request); const wrappedCallback: | Callback< @@ -874,7 +878,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'account.name': request.account!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccount request %j', request); const wrappedCallback: | Callback< @@ -998,7 +1004,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('provisionAccountTicket request %j', request); const wrappedCallback: | Callback< @@ -1119,7 +1127,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProperty request %j', request); const wrappedCallback: | Callback< @@ -1233,7 +1243,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProperty request %j', request); const wrappedCallback: | Callback< @@ -1364,7 +1376,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProperty request %j', request); const wrappedCallback: | Callback< @@ -1490,7 +1504,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'property.name': request.property!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProperty request %j', request); const wrappedCallback: | Callback< @@ -1621,7 +1637,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFirebaseLink request %j', request); const wrappedCallback: | Callback< @@ -1748,7 +1766,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFirebaseLink request %j', request); const wrappedCallback: | Callback< @@ -1875,7 +1895,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGoogleAdsLink request %j', request); const wrappedCallback: | Callback< @@ -2005,7 +2027,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'google_ads_link.name': request.googleAdsLink!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGoogleAdsLink request %j', request); const wrappedCallback: | Callback< @@ -2130,7 +2154,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGoogleAdsLink request %j', request); const wrappedCallback: | Callback< @@ -2259,7 +2285,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataSharingSettings request %j', request); const wrappedCallback: | Callback< @@ -2386,7 +2414,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -2514,7 +2544,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -2647,7 +2679,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -2782,7 +2816,9 @@ export class AnalyticsAdminServiceClient { 'measurement_protocol_secret.name': request.measurementProtocolSecret!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMeasurementProtocolSecret request %j', request); const wrappedCallback: | Callback< @@ -2926,7 +2962,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acknowledgeUserDataCollection request %j', request); const wrappedCallback: | Callback< @@ -3056,7 +3094,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$CreateConversionEvent', 'CreateConversionEvent is deprecated and may be removed in a future version.', @@ -3194,7 +3234,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'conversion_event.name': request.conversionEvent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$UpdateConversionEvent', 'UpdateConversionEvent is deprecated and may be removed in a future version.', @@ -3328,7 +3370,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$GetConversionEvent', 'GetConversionEvent is deprecated and may be removed in a future version.', @@ -3462,7 +3506,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$DeleteConversionEvent', 'DeleteConversionEvent is deprecated and may be removed in a future version.', @@ -3589,7 +3635,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -3714,7 +3762,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'key_event.name': request.keyEvent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -3835,7 +3885,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -3953,7 +4005,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteKeyEvent request %j', request); const wrappedCallback: | Callback< @@ -4080,7 +4134,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -4209,7 +4265,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'custom_dimension.name': request.customDimension!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -4335,7 +4393,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('archiveCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -4461,7 +4521,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomDimension request %j', request); const wrappedCallback: | Callback< @@ -4588,7 +4650,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -4717,7 +4781,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'custom_metric.name': request.customMetric!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -4843,7 +4909,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('archiveCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -4963,7 +5031,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomMetric request %j', request); const wrappedCallback: | Callback< @@ -5091,7 +5161,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataRetentionSettings request %j', request); const wrappedCallback: | Callback< @@ -5223,7 +5295,9 @@ export class AnalyticsAdminServiceClient { 'data_retention_settings.name': request.dataRetentionSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataRetentionSettings request %j', request); const wrappedCallback: | Callback< @@ -5344,7 +5418,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataStream request %j', request); const wrappedCallback: | Callback< @@ -5464,7 +5540,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataStream request %j', request); const wrappedCallback: | Callback< @@ -5587,7 +5665,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_stream.name': request.dataStream!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataStream request %j', request); const wrappedCallback: | Callback< @@ -5707,7 +5787,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataStream request %j', request); const wrappedCallback: | Callback< @@ -5920,7 +6002,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ entity: request.entity ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runAccessReport request %j', request); const wrappedCallback: | Callback< @@ -6055,7 +6139,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListAccountsRequest, @@ -6124,7 +6210,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccounts stream %j', request); return this.descriptors.page.listAccounts.createStream( this.innerApiCalls.listAccounts as GaxCall, @@ -6175,7 +6263,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccounts iterate %j', request); return this.descriptors.page.listAccounts.asyncIterate( this.innerApiCalls['listAccounts'] as GaxCall, @@ -6277,7 +6367,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, @@ -6342,7 +6434,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccountSummaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountSummaries stream %j', request); return this.descriptors.page.listAccountSummaries.createStream( this.innerApiCalls.listAccountSummaries as GaxCall, @@ -6389,7 +6483,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccountSummaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountSummaries iterate %j', request); return this.descriptors.page.listAccountSummaries.asyncIterate( this.innerApiCalls['listAccountSummaries'] as GaxCall, @@ -6516,7 +6612,9 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListPropertiesRequest, @@ -6602,7 +6700,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProperties']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProperties stream %j', request); return this.descriptors.page.listProperties.createStream( this.innerApiCalls.listProperties as GaxCall, @@ -6670,7 +6770,9 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProperties']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProperties iterate %j', request); return this.descriptors.page.listProperties.asyncIterate( this.innerApiCalls['listProperties'] as GaxCall, @@ -6781,7 +6883,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, @@ -6854,7 +6958,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFirebaseLinks stream %j', request); return this.descriptors.page.listFirebaseLinks.createStream( this.innerApiCalls.listFirebaseLinks as GaxCall, @@ -6909,7 +7015,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFirebaseLinks iterate %j', request); return this.descriptors.page.listFirebaseLinks.asyncIterate( this.innerApiCalls['listFirebaseLinks'] as GaxCall, @@ -7017,7 +7125,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, @@ -7088,7 +7198,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGoogleAdsLinks stream %j', request); return this.descriptors.page.listGoogleAdsLinks.createStream( this.innerApiCalls.listGoogleAdsLinks as GaxCall, @@ -7141,7 +7253,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGoogleAdsLinks iterate %j', request); return this.descriptors.page.listGoogleAdsLinks.asyncIterate( this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, @@ -7251,7 +7365,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, @@ -7324,7 +7440,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMeasurementProtocolSecrets stream %j', request); return this.descriptors.page.listMeasurementProtocolSecrets.createStream( this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, @@ -7379,7 +7497,9 @@ export class AnalyticsAdminServiceClient { const defaultCallSettings = this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMeasurementProtocolSecrets iterate %j', request); return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, @@ -7519,7 +7639,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ account: request.account ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, @@ -7618,7 +7740,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchChangeHistoryEvents stream %j', request); return this.descriptors.page.searchChangeHistoryEvents.createStream( this.innerApiCalls.searchChangeHistoryEvents as GaxCall, @@ -7699,7 +7823,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchChangeHistoryEvents iterate %j', request); return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, @@ -7811,7 +7937,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$ListConversionEvents', 'ListConversionEvents is deprecated and may be removed in a future version.', @@ -7888,7 +8016,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$ListConversionEvents', 'ListConversionEvents is deprecated and may be removed in a future version.', @@ -7947,7 +8077,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnalyticsAdminService-$ListConversionEvents', 'ListConversionEvents is deprecated and may be removed in a future version.', @@ -8061,7 +8193,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListKeyEventsRequest, @@ -8132,7 +8266,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listKeyEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyEvents stream %j', request); return this.descriptors.page.listKeyEvents.createStream( this.innerApiCalls.listKeyEvents as GaxCall, @@ -8185,7 +8321,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listKeyEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyEvents iterate %j', request); return this.descriptors.page.listKeyEvents.asyncIterate( this.innerApiCalls['listKeyEvents'] as GaxCall, @@ -8293,7 +8431,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, @@ -8364,7 +8504,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomDimensions stream %j', request); return this.descriptors.page.listCustomDimensions.createStream( this.innerApiCalls.listCustomDimensions as GaxCall, @@ -8417,7 +8559,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomDimensions iterate %j', request); return this.descriptors.page.listCustomDimensions.asyncIterate( this.innerApiCalls['listCustomDimensions'] as GaxCall, @@ -8525,7 +8669,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, @@ -8596,7 +8742,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomMetrics stream %j', request); return this.descriptors.page.listCustomMetrics.createStream( this.innerApiCalls.listCustomMetrics as GaxCall, @@ -8649,7 +8797,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomMetrics iterate %j', request); return this.descriptors.page.listCustomMetrics.asyncIterate( this.innerApiCalls['listCustomMetrics'] as GaxCall, @@ -8757,7 +8907,9 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.admin.v1beta.IListDataStreamsRequest, @@ -8828,7 +8980,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStreams stream %j', request); return this.descriptors.page.listDataStreams.createStream( this.innerApiCalls.listDataStreams as GaxCall, @@ -8881,7 +9035,9 @@ export class AnalyticsAdminServiceClient { }); const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStreams iterate %j', request); return this.descriptors.page.listDataStreams.asyncIterate( this.innerApiCalls['listDataStreams'] as GaxCall, diff --git a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts index 78283943256..519f04f2615 100644 --- a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts +++ b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts @@ -268,7 +268,9 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.analyticsAdminServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccountRequest() ); @@ -363,7 +365,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccountRequest() ); @@ -411,7 +413,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccountRequest() ); @@ -443,7 +445,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccountRequest() ); @@ -465,7 +467,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() ); @@ -497,7 +499,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() ); @@ -545,7 +547,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() ); @@ -577,7 +579,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() ); @@ -599,7 +601,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() ); @@ -632,7 +634,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() ); @@ -681,7 +683,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() ); @@ -714,7 +716,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() ); @@ -737,7 +739,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() ); @@ -756,7 +758,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() ); @@ -790,7 +792,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() ); @@ -811,7 +813,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() ); @@ -831,7 +833,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetPropertyRequest() ); @@ -863,7 +865,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetPropertyRequest() ); @@ -911,7 +913,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetPropertyRequest() ); @@ -943,7 +945,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetPropertyRequest() ); @@ -965,7 +967,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() ); @@ -983,7 +985,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() ); @@ -1017,7 +1019,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() ); @@ -1035,7 +1037,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() ); @@ -1052,7 +1054,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() ); @@ -1084,7 +1086,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() ); @@ -1132,7 +1134,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() ); @@ -1164,7 +1166,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() ); @@ -1186,7 +1188,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() ); @@ -1219,7 +1221,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() ); @@ -1268,7 +1270,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() ); @@ -1301,7 +1303,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() ); @@ -1324,7 +1326,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() ); @@ -1357,7 +1359,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() ); @@ -1405,7 +1407,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() ); @@ -1437,7 +1439,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() ); @@ -1459,7 +1461,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() ); @@ -1492,7 +1494,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() ); @@ -1540,7 +1542,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() ); @@ -1572,7 +1574,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() ); @@ -1594,7 +1596,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() ); @@ -1626,7 +1628,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() ); @@ -1674,7 +1676,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() ); @@ -1706,7 +1708,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() ); @@ -1728,7 +1730,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() ); @@ -1761,7 +1763,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() ); @@ -1809,7 +1811,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() ); @@ -1841,7 +1843,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() ); @@ -1863,7 +1865,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() ); @@ -1897,7 +1899,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() ); @@ -1946,7 +1948,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() ); @@ -1979,7 +1981,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() ); @@ -2002,7 +2004,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() ); @@ -2035,7 +2037,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() ); @@ -2083,7 +2085,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() ); @@ -2115,7 +2117,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() ); @@ -2137,7 +2139,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() ); @@ -2170,7 +2172,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() ); @@ -2218,7 +2220,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() ); @@ -2253,7 +2255,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() ); @@ -2278,7 +2280,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() ); @@ -2311,7 +2313,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() ); @@ -2359,7 +2361,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() ); @@ -2394,7 +2396,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() ); @@ -2419,7 +2421,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() ); @@ -2452,7 +2454,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() ); @@ -2500,7 +2502,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() ); @@ -2535,7 +2537,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() ); @@ -2560,7 +2562,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() ); @@ -2593,7 +2595,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() ); @@ -2641,7 +2643,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() ); @@ -2676,7 +2678,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() ); @@ -2701,7 +2703,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() ); @@ -2735,7 +2737,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() ); @@ -2784,7 +2786,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() ); @@ -2820,7 +2822,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() ); @@ -2846,7 +2848,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() ); @@ -2879,7 +2881,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() ); @@ -2927,7 +2929,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() ); @@ -2962,7 +2964,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() ); @@ -2987,7 +2989,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest() ); @@ -3021,7 +3023,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest() ); @@ -3069,7 +3071,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest() ); @@ -3104,7 +3106,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest() ); @@ -3129,7 +3131,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest() ); @@ -3163,7 +3165,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest() ); @@ -3211,7 +3213,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest() ); @@ -3244,7 +3246,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest() ); @@ -3269,7 +3271,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest() ); @@ -3303,7 +3305,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest() ); @@ -3351,7 +3353,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest() ); @@ -3384,7 +3386,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest() ); @@ -3409,7 +3411,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest() ); @@ -3444,7 +3446,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest() ); @@ -3493,7 +3495,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest() ); @@ -3527,7 +3529,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest() ); @@ -3553,7 +3555,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() ); @@ -3586,7 +3588,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() ); @@ -3634,7 +3636,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() ); @@ -3669,7 +3671,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() ); @@ -3694,7 +3696,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() ); @@ -3728,7 +3730,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() ); @@ -3777,7 +3779,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() ); @@ -3813,7 +3815,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() ); @@ -3840,7 +3842,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() ); @@ -3875,7 +3877,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() ); @@ -3925,7 +3927,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() ); @@ -3962,7 +3964,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() ); @@ -3989,7 +3991,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateConversionEventRequest() ); @@ -4025,7 +4027,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateConversionEventRequest() ); @@ -4076,7 +4078,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateConversionEventRequest() ); @@ -4114,7 +4116,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateConversionEventRequest() ); @@ -4142,7 +4144,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() ); @@ -4177,7 +4179,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() ); @@ -4227,7 +4229,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() ); @@ -4261,7 +4263,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() ); @@ -4285,7 +4287,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() ); @@ -4320,7 +4322,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() ); @@ -4370,7 +4372,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() ); @@ -4407,7 +4409,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() ); @@ -4433,7 +4435,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateKeyEventRequest() ); @@ -4465,7 +4467,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateKeyEventRequest() ); @@ -4513,7 +4515,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateKeyEventRequest() ); @@ -4545,7 +4547,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateKeyEventRequest() ); @@ -4567,7 +4569,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateKeyEventRequest() ); @@ -4600,7 +4602,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateKeyEventRequest() ); @@ -4649,7 +4651,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateKeyEventRequest() ); @@ -4682,7 +4684,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateKeyEventRequest() ); @@ -4705,7 +4707,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetKeyEventRequest() ); @@ -4737,7 +4739,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetKeyEventRequest() ); @@ -4785,7 +4787,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetKeyEventRequest() ); @@ -4817,7 +4819,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetKeyEventRequest() ); @@ -4839,7 +4841,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteKeyEventRequest() ); @@ -4871,7 +4873,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteKeyEventRequest() ); @@ -4919,7 +4921,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteKeyEventRequest() ); @@ -4951,7 +4953,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteKeyEventRequest() ); @@ -4973,7 +4975,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() ); @@ -5006,7 +5008,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() ); @@ -5054,7 +5056,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() ); @@ -5089,7 +5091,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() ); @@ -5114,7 +5116,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() ); @@ -5148,7 +5150,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() ); @@ -5196,7 +5198,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() ); @@ -5231,7 +5233,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() ); @@ -5256,7 +5258,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() ); @@ -5290,7 +5292,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() ); @@ -5338,7 +5340,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() ); @@ -5373,7 +5375,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() ); @@ -5398,7 +5400,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() ); @@ -5433,7 +5435,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() ); @@ -5482,7 +5484,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() ); @@ -5518,7 +5520,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() ); @@ -5544,7 +5546,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5580,7 +5582,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5630,7 +5632,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5665,7 +5667,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5690,7 +5692,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5726,7 +5728,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5776,7 +5778,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5811,7 +5813,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5836,7 +5838,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5872,7 +5874,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5922,7 +5924,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5957,7 +5959,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -5982,7 +5984,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6018,7 +6020,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6068,7 +6070,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6103,7 +6105,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6128,7 +6130,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6164,7 +6166,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6214,7 +6216,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6249,7 +6251,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() ); @@ -6274,7 +6276,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() ); @@ -6307,7 +6309,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() ); @@ -6355,7 +6357,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() ); @@ -6390,7 +6392,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() ); @@ -6415,7 +6417,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() ); @@ -6449,7 +6451,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() ); @@ -6498,7 +6500,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() ); @@ -6534,7 +6536,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() ); @@ -6560,7 +6562,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() ); @@ -6593,7 +6595,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() ); @@ -6641,7 +6643,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() ); @@ -6676,7 +6678,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() ); @@ -6701,7 +6703,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() ); @@ -6734,7 +6736,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() ); @@ -6782,7 +6784,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() ); @@ -6814,7 +6816,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() ); @@ -6836,7 +6838,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() ); @@ -6869,7 +6871,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() ); @@ -6917,7 +6919,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() ); @@ -6949,7 +6951,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() ); @@ -6971,7 +6973,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() ); @@ -7005,7 +7007,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() ); @@ -7054,7 +7056,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() ); @@ -7087,7 +7089,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() ); @@ -7110,7 +7112,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() ); @@ -7143,7 +7145,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() ); @@ -7191,7 +7193,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() ); @@ -7223,7 +7225,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() ); @@ -7245,7 +7247,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() ); @@ -7277,7 +7279,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() ); @@ -7325,7 +7327,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() ); @@ -7357,7 +7359,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() ); @@ -7379,7 +7381,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() ); @@ -7412,7 +7414,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() ); @@ -7460,7 +7462,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() ); @@ -7495,7 +7497,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() ); @@ -7520,7 +7522,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() ); @@ -7554,7 +7556,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() ); @@ -7603,7 +7605,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() ); @@ -7639,7 +7641,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() ); @@ -7665,7 +7667,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() ); @@ -7697,7 +7699,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() ); @@ -7745,7 +7747,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() ); @@ -7777,7 +7779,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() ); @@ -7799,7 +7801,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() ); @@ -7831,7 +7833,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() ); @@ -7879,7 +7881,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() ); @@ -7911,7 +7913,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() ); @@ -7933,7 +7935,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() ); @@ -7966,7 +7968,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() ); @@ -8015,7 +8017,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() ); @@ -8048,7 +8050,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() ); @@ -8071,7 +8073,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() ); @@ -8103,7 +8105,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() ); @@ -8151,7 +8153,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() ); @@ -8183,7 +8185,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() ); @@ -8205,7 +8207,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAudienceRequest() ); @@ -8237,7 +8239,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAudienceRequest() ); @@ -8285,7 +8287,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAudienceRequest() ); @@ -8317,7 +8319,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAudienceRequest() ); @@ -8339,7 +8341,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() ); @@ -8371,7 +8373,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() ); @@ -8419,7 +8421,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() ); @@ -8451,7 +8453,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() ); @@ -8473,7 +8475,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() ); @@ -8506,7 +8508,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() ); @@ -8555,7 +8557,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() ); @@ -8588,7 +8590,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() ); @@ -8611,7 +8613,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() ); @@ -8643,7 +8645,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() ); @@ -8691,7 +8693,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() ); @@ -8723,7 +8725,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() ); @@ -8745,7 +8747,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest() ); @@ -8778,7 +8780,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest() ); @@ -8826,7 +8828,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest() ); @@ -8858,7 +8860,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest() ); @@ -8880,7 +8882,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest() ); @@ -8913,7 +8915,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest() ); @@ -8961,7 +8963,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest() ); @@ -8996,7 +8998,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest() ); @@ -9021,7 +9023,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest() ); @@ -9054,7 +9056,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest() ); @@ -9102,7 +9104,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest() ); @@ -9137,7 +9139,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest() ); @@ -9162,7 +9164,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest() ); @@ -9196,7 +9198,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest() ); @@ -9245,7 +9247,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest() ); @@ -9281,7 +9283,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest() ); @@ -9307,7 +9309,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() ); @@ -9340,7 +9342,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() ); @@ -9388,7 +9390,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() ); @@ -9423,7 +9425,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() ); @@ -9448,7 +9450,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() ); @@ -9482,7 +9484,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() ); @@ -9531,7 +9533,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() ); @@ -9567,7 +9569,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() ); @@ -9593,7 +9595,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() ); @@ -9625,7 +9627,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() ); @@ -9673,7 +9675,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() ); @@ -9705,7 +9707,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() ); @@ -9727,7 +9729,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() ); @@ -9760,7 +9762,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() ); @@ -9808,7 +9810,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() ); @@ -9840,7 +9842,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAccessBindingRequest() ); @@ -9862,7 +9864,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() ); @@ -9894,7 +9896,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() ); @@ -9942,7 +9944,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() ); @@ -9974,7 +9976,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAccessBindingRequest() ); @@ -9996,7 +9998,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); @@ -10030,7 +10032,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); @@ -10079,7 +10081,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); @@ -10112,7 +10114,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateAccessBindingRequest() ); @@ -10135,7 +10137,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() ); @@ -10168,7 +10170,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() ); @@ -10216,7 +10218,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() ); @@ -10248,7 +10250,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAccessBindingRequest() ); @@ -10270,7 +10272,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() ); @@ -10303,7 +10305,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() ); @@ -10351,7 +10353,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() ); @@ -10386,7 +10388,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest() ); @@ -10411,7 +10413,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() ); @@ -10444,7 +10446,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() ); @@ -10492,7 +10494,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() ); @@ -10527,7 +10529,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest() ); @@ -10552,7 +10554,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() ); @@ -10585,7 +10587,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() ); @@ -10633,7 +10635,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() ); @@ -10668,7 +10670,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest() ); @@ -10693,7 +10695,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() ); @@ -10726,7 +10728,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() ); @@ -10774,7 +10776,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() ); @@ -10809,7 +10811,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest() ); @@ -10834,7 +10836,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() ); @@ -10867,7 +10869,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() ); @@ -10915,7 +10917,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() ); @@ -10947,7 +10949,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetExpandedDataSetRequest() ); @@ -10969,7 +10971,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() ); @@ -11002,7 +11004,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() ); @@ -11050,7 +11052,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() ); @@ -11085,7 +11087,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest() ); @@ -11110,7 +11112,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() ); @@ -11144,7 +11146,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() ); @@ -11193,7 +11195,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() ); @@ -11229,7 +11231,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateExpandedDataSetRequest() ); @@ -11255,7 +11257,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() ); @@ -11288,7 +11290,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() ); @@ -11336,7 +11338,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() ); @@ -11371,7 +11373,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteExpandedDataSetRequest() ); @@ -11396,7 +11398,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() ); @@ -11428,7 +11430,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() ); @@ -11476,7 +11478,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() ); @@ -11508,7 +11510,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() ); @@ -11530,7 +11532,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() ); @@ -11563,7 +11565,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() ); @@ -11611,7 +11613,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() ); @@ -11643,7 +11645,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() ); @@ -11665,7 +11667,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); @@ -11699,7 +11701,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); @@ -11748,7 +11750,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); @@ -11781,7 +11783,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); @@ -11804,7 +11806,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); @@ -11837,7 +11839,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); @@ -11885,7 +11887,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); @@ -11917,7 +11919,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); @@ -11939,7 +11941,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); @@ -11959,7 +11961,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); @@ -11993,7 +11995,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); @@ -12014,7 +12016,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); @@ -12034,7 +12036,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); @@ -12054,7 +12056,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); @@ -12088,7 +12090,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); @@ -12107,7 +12109,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); @@ -12127,7 +12129,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateBigQueryLinkRequest() ); @@ -12160,7 +12162,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateBigQueryLinkRequest() ); @@ -12208,7 +12210,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateBigQueryLinkRequest() ); @@ -12240,7 +12242,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateBigQueryLinkRequest() ); @@ -12262,7 +12264,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() ); @@ -12294,7 +12296,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() ); @@ -12342,7 +12344,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() ); @@ -12374,7 +12376,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() ); @@ -12396,7 +12398,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteBigQueryLinkRequest() ); @@ -12429,7 +12431,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteBigQueryLinkRequest() ); @@ -12477,7 +12479,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteBigQueryLinkRequest() ); @@ -12509,7 +12511,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteBigQueryLinkRequest() ); @@ -12531,7 +12533,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateBigQueryLinkRequest() ); @@ -12565,7 +12567,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateBigQueryLinkRequest() ); @@ -12614,7 +12616,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateBigQueryLinkRequest() ); @@ -12647,7 +12649,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateBigQueryLinkRequest() ); @@ -12670,7 +12672,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() ); @@ -12703,7 +12705,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() ); @@ -12751,7 +12753,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() ); @@ -12786,7 +12788,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() ); @@ -12811,7 +12813,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() ); @@ -12846,7 +12848,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() ); @@ -12895,7 +12897,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() ); @@ -12931,7 +12933,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() ); @@ -12957,7 +12959,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() ); @@ -12976,7 +12978,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() ); @@ -13010,7 +13012,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() ); @@ -13031,7 +13033,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() ); @@ -13051,7 +13053,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() ); @@ -13070,7 +13072,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() ); @@ -13104,7 +13106,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() ); @@ -13125,7 +13127,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() ); @@ -13145,7 +13147,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() ); @@ -13164,7 +13166,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() ); @@ -13198,7 +13200,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() ); @@ -13219,7 +13221,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() ); @@ -13239,7 +13241,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() ); @@ -13258,7 +13260,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() ); @@ -13292,7 +13294,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() ); @@ -13313,7 +13315,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() ); @@ -13333,7 +13335,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() ); @@ -13365,7 +13367,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() ); @@ -13413,7 +13415,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() ); @@ -13445,7 +13447,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() ); @@ -13467,7 +13469,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() ); @@ -13499,7 +13501,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() ); @@ -13547,7 +13549,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() ); @@ -13579,7 +13581,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() ); @@ -13601,7 +13603,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() ); @@ -13633,7 +13635,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() ); @@ -13681,7 +13683,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() ); @@ -13713,7 +13715,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() ); @@ -13735,7 +13737,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() ); @@ -13768,7 +13770,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() ); @@ -13816,7 +13818,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() ); @@ -13848,7 +13850,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() ); @@ -13870,7 +13872,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() ); @@ -13903,7 +13905,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() ); @@ -13951,7 +13953,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() ); @@ -13986,7 +13988,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() ); @@ -14011,7 +14013,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() ); @@ -14045,7 +14047,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() ); @@ -14094,7 +14096,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() ); @@ -14130,7 +14132,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() ); @@ -14156,7 +14158,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() ); @@ -14189,7 +14191,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() ); @@ -14237,7 +14239,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() ); @@ -14272,7 +14274,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() ); @@ -14297,7 +14299,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventEditRuleRequest() ); @@ -14329,7 +14331,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventEditRuleRequest() ); @@ -14377,7 +14379,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventEditRuleRequest() ); @@ -14409,7 +14411,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetEventEditRuleRequest() ); @@ -14431,7 +14433,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventEditRuleRequest() ); @@ -14464,7 +14466,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventEditRuleRequest() ); @@ -14512,7 +14514,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventEditRuleRequest() ); @@ -14544,7 +14546,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateEventEditRuleRequest() ); @@ -14566,7 +14568,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventEditRuleRequest() ); @@ -14600,7 +14602,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventEditRuleRequest() ); @@ -14649,7 +14651,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventEditRuleRequest() ); @@ -14682,7 +14684,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateEventEditRuleRequest() ); @@ -14705,7 +14707,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventEditRuleRequest() ); @@ -14738,7 +14740,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventEditRuleRequest() ); @@ -14786,7 +14788,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventEditRuleRequest() ); @@ -14818,7 +14820,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteEventEditRuleRequest() ); @@ -14840,7 +14842,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ReorderEventEditRulesRequest() ); @@ -14873,7 +14875,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ReorderEventEditRulesRequest() ); @@ -14921,7 +14923,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ReorderEventEditRulesRequest() ); @@ -14956,7 +14958,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ReorderEventEditRulesRequest() ); @@ -14981,7 +14983,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest() ); @@ -15015,7 +15017,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest() ); @@ -15064,7 +15066,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest() ); @@ -15100,7 +15102,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest() ); @@ -15126,7 +15128,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest() ); @@ -15159,7 +15161,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest() ); @@ -15207,7 +15209,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest() ); @@ -15242,7 +15244,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest() ); @@ -15267,7 +15269,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCalculatedMetricRequest() ); @@ -15300,7 +15302,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCalculatedMetricRequest() ); @@ -15348,7 +15350,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCalculatedMetricRequest() ); @@ -15380,7 +15382,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetCalculatedMetricRequest() ); @@ -15402,7 +15404,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCalculatedMetricRequest() ); @@ -15435,7 +15437,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCalculatedMetricRequest() ); @@ -15483,7 +15485,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCalculatedMetricRequest() ); @@ -15518,7 +15520,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateCalculatedMetricRequest() ); @@ -15543,7 +15545,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCalculatedMetricRequest() ); @@ -15577,7 +15579,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCalculatedMetricRequest() ); @@ -15626,7 +15628,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCalculatedMetricRequest() ); @@ -15662,7 +15664,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateCalculatedMetricRequest() ); @@ -15688,7 +15690,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteCalculatedMetricRequest() ); @@ -15721,7 +15723,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteCalculatedMetricRequest() ); @@ -15769,7 +15771,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteCalculatedMetricRequest() ); @@ -15804,7 +15806,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteCalculatedMetricRequest() ); @@ -15829,7 +15831,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertyRequest() ); @@ -15848,7 +15850,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertyRequest() ); @@ -15882,7 +15884,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertyRequest() ); @@ -15900,7 +15902,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertyRequest() ); @@ -15917,7 +15919,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest() ); @@ -15950,7 +15952,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest() ); @@ -15998,7 +16000,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest() ); @@ -16033,7 +16035,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest() ); @@ -16058,7 +16060,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest() ); @@ -16091,7 +16093,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest() ); @@ -16139,7 +16141,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest() ); @@ -16174,7 +16176,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest() ); @@ -16199,7 +16201,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest() ); @@ -16232,7 +16234,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest() ); @@ -16280,7 +16282,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest() ); @@ -16315,7 +16317,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest() ); @@ -16340,7 +16342,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionSubpropertyRequest() ); @@ -16359,7 +16361,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionSubpropertyRequest() ); @@ -16393,7 +16395,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionSubpropertyRequest() ); @@ -16411,7 +16413,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ProvisionSubpropertyRequest() ); @@ -16428,7 +16430,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest() ); @@ -16461,7 +16463,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest() ); @@ -16509,7 +16511,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest() ); @@ -16544,7 +16546,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest() ); @@ -16569,7 +16571,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest() ); @@ -16602,7 +16604,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest() ); @@ -16650,7 +16652,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest() ); @@ -16685,7 +16687,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest() ); @@ -16710,7 +16712,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest() ); @@ -16744,7 +16746,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest() ); @@ -16793,7 +16795,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest() ); @@ -16829,7 +16831,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest() ); @@ -16855,7 +16857,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest() ); @@ -16888,7 +16890,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest() ); @@ -16936,7 +16938,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest() ); @@ -16971,7 +16973,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest() ); @@ -16996,7 +16998,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountsRequest() ); @@ -17022,7 +17024,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountsRequest() ); @@ -17064,7 +17066,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountsRequest() ); @@ -17082,7 +17084,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountsRequest() ); @@ -17130,7 +17132,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountsRequest() ); @@ -17169,7 +17171,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountsRequest() ); @@ -17206,7 +17208,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountsRequest() ); @@ -17236,7 +17238,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() ); @@ -17263,7 +17265,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() ); @@ -17307,7 +17309,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() ); @@ -17325,7 +17327,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() ); @@ -17374,7 +17376,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() ); @@ -17412,7 +17414,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() ); @@ -17450,7 +17452,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() ); @@ -17481,7 +17483,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); @@ -17507,7 +17509,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); @@ -17549,7 +17551,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); @@ -17567,7 +17569,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); @@ -17615,7 +17617,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); @@ -17652,7 +17654,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); @@ -17689,7 +17691,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() ); @@ -17719,7 +17721,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); @@ -17759,7 +17761,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); @@ -17817,7 +17819,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); @@ -17849,7 +17851,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); @@ -17911,7 +17913,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); @@ -17962,7 +17964,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); @@ -18013,7 +18015,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() ); @@ -18057,7 +18059,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); @@ -18098,7 +18100,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); @@ -18156,7 +18158,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); @@ -18188,7 +18190,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); @@ -18250,7 +18252,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); @@ -18301,7 +18303,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); @@ -18352,7 +18354,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); @@ -18396,7 +18398,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); @@ -18437,7 +18439,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); @@ -18495,7 +18497,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); @@ -18530,7 +18532,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); @@ -18603,7 +18605,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); @@ -18665,7 +18667,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); @@ -18720,7 +18722,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); @@ -18768,7 +18770,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest() ); @@ -18810,7 +18812,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest() ); @@ -18868,7 +18870,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest() ); @@ -18901,7 +18903,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest() ); @@ -18975,7 +18977,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest() ); @@ -19038,7 +19040,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest() ); @@ -19094,7 +19096,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest() ); @@ -19143,7 +19145,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); @@ -19184,7 +19186,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); @@ -19242,7 +19244,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); @@ -19277,7 +19279,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); @@ -19347,7 +19349,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); @@ -19406,7 +19408,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); @@ -19461,7 +19463,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); @@ -19510,7 +19512,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); @@ -19553,7 +19555,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); @@ -19613,7 +19615,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); @@ -19647,7 +19649,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); @@ -19711,7 +19713,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); @@ -19764,7 +19766,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); @@ -19817,7 +19819,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); @@ -19862,7 +19864,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListKeyEventsRequest() ); @@ -19902,7 +19904,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListKeyEventsRequest() ); @@ -19958,7 +19960,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListKeyEventsRequest() ); @@ -19990,7 +19992,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListKeyEventsRequest() ); @@ -20051,7 +20053,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListKeyEventsRequest() ); @@ -20101,7 +20103,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListKeyEventsRequest() ); @@ -20151,7 +20153,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListKeyEventsRequest() ); @@ -20194,7 +20196,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); @@ -20236,7 +20238,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); @@ -20294,7 +20296,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); @@ -20329,7 +20331,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); @@ -20402,7 +20404,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); @@ -20464,7 +20466,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); @@ -20519,7 +20521,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); @@ -20567,7 +20569,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); @@ -20611,7 +20613,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); @@ -20671,7 +20673,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); @@ -20706,7 +20708,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); @@ -20780,7 +20782,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); @@ -20843,7 +20845,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); @@ -20899,7 +20901,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); @@ -20948,7 +20950,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); @@ -20989,7 +20991,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); @@ -21047,7 +21049,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); @@ -21079,7 +21081,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); @@ -21141,7 +21143,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); @@ -21192,7 +21194,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); @@ -21243,7 +21245,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); @@ -21287,7 +21289,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); @@ -21327,7 +21329,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); @@ -21385,7 +21387,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); @@ -21417,7 +21419,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); @@ -21479,7 +21481,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); @@ -21530,7 +21532,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); @@ -21581,7 +21583,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); @@ -21625,7 +21627,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); @@ -21665,7 +21667,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); @@ -21721,7 +21723,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); @@ -21753,7 +21755,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); @@ -21815,7 +21817,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); @@ -21866,7 +21868,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); @@ -21916,7 +21918,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); @@ -21960,7 +21962,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); @@ -22000,7 +22002,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); @@ -22056,7 +22058,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); @@ -22088,7 +22090,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); @@ -22149,7 +22151,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); @@ -22199,7 +22201,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); @@ -22249,7 +22251,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); @@ -22292,7 +22294,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); @@ -22333,7 +22335,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); @@ -22391,7 +22393,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); @@ -22426,7 +22428,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); @@ -22496,7 +22498,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); @@ -22555,7 +22557,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); @@ -22610,7 +22612,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); @@ -22658,7 +22660,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); @@ -22699,7 +22701,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); @@ -22757,7 +22759,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); @@ -22789,7 +22791,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); @@ -22851,7 +22853,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); @@ -22902,7 +22904,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); @@ -22953,7 +22955,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); @@ -22997,7 +22999,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); @@ -23038,7 +23040,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); @@ -23096,7 +23098,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); @@ -23128,7 +23130,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); @@ -23190,7 +23192,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); @@ -23241,7 +23243,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); @@ -23292,7 +23294,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); @@ -23336,7 +23338,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); @@ -23376,7 +23378,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); @@ -23434,7 +23436,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); @@ -23466,7 +23468,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); @@ -23528,7 +23530,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); @@ -23579,7 +23581,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); @@ -23630,7 +23632,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); @@ -23674,7 +23676,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); @@ -23714,7 +23716,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); @@ -23772,7 +23774,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); @@ -23804,7 +23806,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); @@ -23866,7 +23868,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); @@ -23917,7 +23919,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); @@ -23968,7 +23970,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); @@ -24012,7 +24014,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); @@ -24052,7 +24054,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); @@ -24108,7 +24110,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); @@ -24140,7 +24142,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); @@ -24202,7 +24204,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); @@ -24253,7 +24255,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); @@ -24304,7 +24306,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); @@ -24348,7 +24350,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); @@ -24389,7 +24391,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); @@ -24447,7 +24449,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); @@ -24479,7 +24481,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); @@ -24541,7 +24543,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); @@ -24592,7 +24594,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); @@ -24643,7 +24645,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); @@ -24687,7 +24689,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventEditRulesRequest() ); @@ -24728,7 +24730,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventEditRulesRequest() ); @@ -24786,7 +24788,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventEditRulesRequest() ); @@ -24818,7 +24820,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventEditRulesRequest() ); @@ -24880,7 +24882,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventEditRulesRequest() ); @@ -24931,7 +24933,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventEditRulesRequest() ); @@ -24982,7 +24984,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListEventEditRulesRequest() ); @@ -25026,7 +25028,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest() ); @@ -25067,7 +25069,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest() ); @@ -25125,7 +25127,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest() ); @@ -25160,7 +25162,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest() ); @@ -25230,7 +25232,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest() ); @@ -25289,7 +25291,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest() ); @@ -25344,7 +25346,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListCalculatedMetricsRequest() ); @@ -25392,7 +25394,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest() ); @@ -25433,7 +25435,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest() ); @@ -25491,7 +25493,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest() ); @@ -25526,7 +25528,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest() ); @@ -25599,7 +25601,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest() ); @@ -25661,7 +25663,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest() ); @@ -25716,7 +25718,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest() ); @@ -25764,7 +25766,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest() ); @@ -25805,7 +25807,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest() ); @@ -25863,7 +25865,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest() ); @@ -25898,7 +25900,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest() ); @@ -25968,7 +25970,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest() ); @@ -26027,7 +26029,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest() ); @@ -26082,7 +26084,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest() ); @@ -26124,7 +26126,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -26134,7 +26136,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26163,7 +26165,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('accountAccessBinding', () => { + describe('accountAccessBinding', async () => { const fakePath = '/rendered/path/accountAccessBinding'; const expectedParameters = { account: 'accountValue', @@ -26174,7 +26176,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountAccessBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26227,7 +26229,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('accountSummary', () => { + describe('accountSummary', async () => { const fakePath = '/rendered/path/accountSummary'; const expectedParameters = { account_summary: 'accountSummaryValue', @@ -26237,7 +26239,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountSummaryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26267,7 +26269,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('adSenseLink', () => { + describe('adSenseLink', async () => { const fakePath = '/rendered/path/adSenseLink'; const expectedParameters = { property: 'propertyValue', @@ -26278,7 +26280,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adSenseLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26320,7 +26322,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('attributionSettings', () => { + describe('attributionSettings', async () => { const fakePath = '/rendered/path/attributionSettings'; const expectedParameters = { property: 'propertyValue', @@ -26330,7 +26332,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributionSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26366,7 +26368,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('audience', () => { + describe('audience', async () => { const fakePath = '/rendered/path/audience'; const expectedParameters = { property: 'propertyValue', @@ -26377,7 +26379,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.audiencePathTemplate.render = sinon .stub() .returns(fakePath); @@ -26416,7 +26418,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('bigQueryLink', () => { + describe('bigQueryLink', async () => { const fakePath = '/rendered/path/bigQueryLink'; const expectedParameters = { property: 'propertyValue', @@ -26427,7 +26429,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.bigQueryLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26469,7 +26471,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('calculatedMetric', () => { + describe('calculatedMetric', async () => { const fakePath = '/rendered/path/calculatedMetric'; const expectedParameters = { property: 'propertyValue', @@ -26480,7 +26482,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.calculatedMetricPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26526,7 +26528,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('channelGroup', () => { + describe('channelGroup', async () => { const fakePath = '/rendered/path/channelGroup'; const expectedParameters = { property: 'propertyValue', @@ -26537,7 +26539,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.channelGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26579,7 +26581,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('conversionEvent', () => { + describe('conversionEvent', async () => { const fakePath = '/rendered/path/conversionEvent'; const expectedParameters = { property: 'propertyValue', @@ -26590,7 +26592,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversionEventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26633,7 +26635,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('customDimension', () => { + describe('customDimension', async () => { const fakePath = '/rendered/path/customDimension'; const expectedParameters = { property: 'propertyValue', @@ -26644,7 +26646,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customDimensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26687,7 +26689,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('customMetric', () => { + describe('customMetric', async () => { const fakePath = '/rendered/path/customMetric'; const expectedParameters = { property: 'propertyValue', @@ -26698,7 +26700,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customMetricPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26740,7 +26742,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('dataRedactionSettings', () => { + describe('dataRedactionSettings', async () => { const fakePath = '/rendered/path/dataRedactionSettings'; const expectedParameters = { property: 'propertyValue', @@ -26751,7 +26753,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataRedactionSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26804,7 +26806,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('dataRetentionSettings', () => { + describe('dataRetentionSettings', async () => { const fakePath = '/rendered/path/dataRetentionSettings'; const expectedParameters = { property: 'propertyValue', @@ -26814,7 +26816,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataRetentionSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26850,7 +26852,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('dataSharingSettings', () => { + describe('dataSharingSettings', async () => { const fakePath = '/rendered/path/dataSharingSettings'; const expectedParameters = { account: 'accountValue', @@ -26860,7 +26862,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataSharingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26895,7 +26897,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('dataStream', () => { + describe('dataStream', async () => { const fakePath = '/rendered/path/dataStream'; const expectedParameters = { property: 'propertyValue', @@ -26906,7 +26908,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataStreamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -26948,7 +26950,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('displayVideo360AdvertiserLink', () => { + describe('displayVideo360AdvertiserLink', async () => { const fakePath = '/rendered/path/displayVideo360AdvertiserLink'; const expectedParameters = { property: 'propertyValue', @@ -26958,7 +26960,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.displayVideo360AdvertiserLinkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.displayVideo360AdvertiserLinkPathTemplate.match = @@ -26993,7 +26995,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('displayVideo360AdvertiserLinkProposal', () => { + describe('displayVideo360AdvertiserLinkProposal', async () => { const fakePath = '/rendered/path/displayVideo360AdvertiserLinkProposal'; const expectedParameters = { property: 'propertyValue', @@ -27003,7 +27005,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.displayVideo360AdvertiserLinkProposalPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.displayVideo360AdvertiserLinkProposalPathTemplate.match = @@ -27042,7 +27044,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('enhancedMeasurementSettings', () => { + describe('enhancedMeasurementSettings', async () => { const fakePath = '/rendered/path/enhancedMeasurementSettings'; const expectedParameters = { property: 'propertyValue', @@ -27053,7 +27055,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enhancedMeasurementSettingsPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.enhancedMeasurementSettingsPathTemplate.match = sinon @@ -27105,7 +27107,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('eventCreateRule', () => { + describe('eventCreateRule', async () => { const fakePath = '/rendered/path/eventCreateRule'; const expectedParameters = { property: 'propertyValue', @@ -27117,7 +27119,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.eventCreateRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -27171,7 +27173,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('eventEditRule', () => { + describe('eventEditRule', async () => { const fakePath = '/rendered/path/eventEditRule'; const expectedParameters = { property: 'propertyValue', @@ -27183,7 +27185,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.eventEditRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -27236,7 +27238,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('expandedDataSet', () => { + describe('expandedDataSet', async () => { const fakePath = '/rendered/path/expandedDataSet'; const expectedParameters = { property: 'propertyValue', @@ -27247,7 +27249,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.expandedDataSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27290,7 +27292,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('firebaseLink', () => { + describe('firebaseLink', async () => { const fakePath = '/rendered/path/firebaseLink'; const expectedParameters = { property: 'propertyValue', @@ -27301,7 +27303,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.firebaseLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27343,7 +27345,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('globalSiteTag', () => { + describe('globalSiteTag', async () => { const fakePath = '/rendered/path/globalSiteTag'; const expectedParameters = { property: 'propertyValue', @@ -27354,7 +27356,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.globalSiteTagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27396,7 +27398,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('googleAdsLink', () => { + describe('googleAdsLink', async () => { const fakePath = '/rendered/path/googleAdsLink'; const expectedParameters = { property: 'propertyValue', @@ -27407,7 +27409,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.googleAdsLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27449,7 +27451,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('googleSignalsSettings', () => { + describe('googleSignalsSettings', async () => { const fakePath = '/rendered/path/googleSignalsSettings'; const expectedParameters = { property: 'propertyValue', @@ -27459,7 +27461,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.googleSignalsSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27495,7 +27497,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('keyEvent', () => { + describe('keyEvent', async () => { const fakePath = '/rendered/path/keyEvent'; const expectedParameters = { property: 'propertyValue', @@ -27506,7 +27508,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyEventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27545,7 +27547,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('measurementProtocolSecret', () => { + describe('measurementProtocolSecret', async () => { const fakePath = '/rendered/path/measurementProtocolSecret'; const expectedParameters = { property: 'propertyValue', @@ -27557,7 +27559,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.measurementProtocolSecretPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27627,7 +27629,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('property', () => { + describe('property', async () => { const fakePath = '/rendered/path/property'; const expectedParameters = { property: 'propertyValue', @@ -27637,7 +27639,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.propertyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27666,7 +27668,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('propertyAccessBinding', () => { + describe('propertyAccessBinding', async () => { const fakePath = '/rendered/path/propertyAccessBinding'; const expectedParameters = { property: 'propertyValue', @@ -27677,7 +27679,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.propertyAccessBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27730,7 +27732,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('rollupPropertySourceLink', () => { + describe('rollupPropertySourceLink', async () => { const fakePath = '/rendered/path/rollupPropertySourceLink'; const expectedParameters = { property: 'propertyValue', @@ -27741,7 +27743,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rollupPropertySourceLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27796,7 +27798,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('sKAdNetworkConversionValueSchema', () => { + describe('sKAdNetworkConversionValueSchema', async () => { const fakePath = '/rendered/path/sKAdNetworkConversionValueSchema'; const expectedParameters = { property: 'propertyValue', @@ -27809,7 +27811,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sKAdNetworkConversionValueSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.sKAdNetworkConversionValueSchemaPathTemplate.match = @@ -27881,7 +27883,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('searchAds360Link', () => { + describe('searchAds360Link', async () => { const fakePath = '/rendered/path/searchAds360Link'; const expectedParameters = { property: 'propertyValue', @@ -27891,7 +27893,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.searchAds360LinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -27923,7 +27925,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('subpropertyEventFilter', () => { + describe('subpropertyEventFilter', async () => { const fakePath = '/rendered/path/subpropertyEventFilter'; const expectedParameters = { property: 'propertyValue', @@ -27934,7 +27936,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.subpropertyEventFilterPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts index 8fa11cfb405..c8687de7dee 100644 --- a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts +++ b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts @@ -268,7 +268,9 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.analyticsAdminServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetAccountRequest() ); @@ -363,7 +365,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetAccountRequest() ); @@ -411,7 +413,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetAccountRequest() ); @@ -443,7 +445,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetAccountRequest() ); @@ -465,7 +467,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteAccountRequest() ); @@ -497,7 +499,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteAccountRequest() ); @@ -545,7 +547,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteAccountRequest() ); @@ -577,7 +579,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteAccountRequest() ); @@ -599,7 +601,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateAccountRequest() ); @@ -632,7 +634,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateAccountRequest() ); @@ -681,7 +683,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateAccountRequest() ); @@ -714,7 +716,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateAccountRequest() ); @@ -737,7 +739,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() ); @@ -756,7 +758,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() ); @@ -790,7 +792,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() ); @@ -811,7 +813,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() ); @@ -831,7 +833,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetPropertyRequest() ); @@ -863,7 +865,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetPropertyRequest() ); @@ -911,7 +913,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetPropertyRequest() ); @@ -943,7 +945,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetPropertyRequest() ); @@ -965,7 +967,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreatePropertyRequest() ); @@ -983,7 +985,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreatePropertyRequest() ); @@ -1017,7 +1019,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreatePropertyRequest() ); @@ -1035,7 +1037,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreatePropertyRequest() ); @@ -1052,7 +1054,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeletePropertyRequest() ); @@ -1084,7 +1086,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeletePropertyRequest() ); @@ -1132,7 +1134,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeletePropertyRequest() ); @@ -1164,7 +1166,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeletePropertyRequest() ); @@ -1186,7 +1188,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() ); @@ -1219,7 +1221,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() ); @@ -1268,7 +1270,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() ); @@ -1301,7 +1303,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() ); @@ -1324,7 +1326,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() ); @@ -1357,7 +1359,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() ); @@ -1405,7 +1407,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() ); @@ -1437,7 +1439,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() ); @@ -1459,7 +1461,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() ); @@ -1492,7 +1494,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() ); @@ -1540,7 +1542,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() ); @@ -1572,7 +1574,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() ); @@ -1594,7 +1596,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() ); @@ -1627,7 +1629,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() ); @@ -1675,7 +1677,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() ); @@ -1707,7 +1709,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() ); @@ -1729,7 +1731,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() ); @@ -1763,7 +1765,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() ); @@ -1812,7 +1814,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() ); @@ -1845,7 +1847,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() ); @@ -1868,7 +1870,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() ); @@ -1901,7 +1903,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() ); @@ -1949,7 +1951,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() ); @@ -1981,7 +1983,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() ); @@ -2003,7 +2005,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() ); @@ -2036,7 +2038,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() ); @@ -2084,7 +2086,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() ); @@ -2119,7 +2121,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() ); @@ -2144,7 +2146,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() ); @@ -2177,7 +2179,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() ); @@ -2225,7 +2227,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() ); @@ -2260,7 +2262,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() ); @@ -2285,7 +2287,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() ); @@ -2318,7 +2320,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() ); @@ -2366,7 +2368,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() ); @@ -2401,7 +2403,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() ); @@ -2426,7 +2428,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() ); @@ -2459,7 +2461,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() ); @@ -2507,7 +2509,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() ); @@ -2542,7 +2544,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() ); @@ -2567,7 +2569,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() ); @@ -2601,7 +2603,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() ); @@ -2650,7 +2652,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() ); @@ -2686,7 +2688,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() ); @@ -2712,7 +2714,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() ); @@ -2745,7 +2747,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() ); @@ -2793,7 +2795,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() ); @@ -2828,7 +2830,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() ); @@ -2854,7 +2856,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() ); @@ -2889,7 +2891,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() ); @@ -2939,7 +2941,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() ); @@ -2976,7 +2978,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() ); @@ -3003,7 +3005,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateConversionEventRequest() ); @@ -3039,7 +3041,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateConversionEventRequest() ); @@ -3090,7 +3092,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateConversionEventRequest() ); @@ -3128,7 +3130,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateConversionEventRequest() ); @@ -3156,7 +3158,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetConversionEventRequest() ); @@ -3191,7 +3193,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetConversionEventRequest() ); @@ -3241,7 +3243,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetConversionEventRequest() ); @@ -3275,7 +3277,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetConversionEventRequest() ); @@ -3299,7 +3301,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() ); @@ -3334,7 +3336,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() ); @@ -3384,7 +3386,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() ); @@ -3421,7 +3423,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() ); @@ -3447,7 +3449,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateKeyEventRequest() ); @@ -3479,7 +3481,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateKeyEventRequest() ); @@ -3527,7 +3529,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateKeyEventRequest() ); @@ -3559,7 +3561,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateKeyEventRequest() ); @@ -3581,7 +3583,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateKeyEventRequest() ); @@ -3614,7 +3616,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateKeyEventRequest() ); @@ -3663,7 +3665,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateKeyEventRequest() ); @@ -3696,7 +3698,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateKeyEventRequest() ); @@ -3719,7 +3721,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetKeyEventRequest() ); @@ -3751,7 +3753,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetKeyEventRequest() ); @@ -3799,7 +3801,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetKeyEventRequest() ); @@ -3831,7 +3833,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetKeyEventRequest() ); @@ -3853,7 +3855,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteKeyEventRequest() ); @@ -3885,7 +3887,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteKeyEventRequest() ); @@ -3933,7 +3935,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteKeyEventRequest() ); @@ -3965,7 +3967,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteKeyEventRequest() ); @@ -3987,7 +3989,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() ); @@ -4020,7 +4022,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() ); @@ -4068,7 +4070,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() ); @@ -4103,7 +4105,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() ); @@ -4128,7 +4130,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() ); @@ -4162,7 +4164,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() ); @@ -4211,7 +4213,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() ); @@ -4247,7 +4249,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() ); @@ -4273,7 +4275,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() ); @@ -4306,7 +4308,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() ); @@ -4354,7 +4356,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() ); @@ -4389,7 +4391,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() ); @@ -4414,7 +4416,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() ); @@ -4447,7 +4449,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() ); @@ -4495,7 +4497,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() ); @@ -4527,7 +4529,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() ); @@ -4549,7 +4551,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() ); @@ -4582,7 +4584,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() ); @@ -4630,7 +4632,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() ); @@ -4662,7 +4664,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() ); @@ -4684,7 +4686,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() ); @@ -4718,7 +4720,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() ); @@ -4767,7 +4769,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() ); @@ -4800,7 +4802,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() ); @@ -4823,7 +4825,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() ); @@ -4856,7 +4858,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() ); @@ -4904,7 +4906,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() ); @@ -4936,7 +4938,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() ); @@ -4958,7 +4960,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() ); @@ -4990,7 +4992,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() ); @@ -5038,7 +5040,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() ); @@ -5070,7 +5072,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() ); @@ -5092,7 +5094,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() ); @@ -5125,7 +5127,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() ); @@ -5173,7 +5175,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() ); @@ -5208,7 +5210,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() ); @@ -5233,7 +5235,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() ); @@ -5267,7 +5269,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() ); @@ -5316,7 +5318,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() ); @@ -5352,7 +5354,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() ); @@ -5378,7 +5380,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() ); @@ -5410,7 +5412,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() ); @@ -5458,7 +5460,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() ); @@ -5490,7 +5492,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() ); @@ -5512,7 +5514,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() ); @@ -5544,7 +5546,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() ); @@ -5592,7 +5594,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() ); @@ -5624,7 +5626,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() ); @@ -5646,7 +5648,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() ); @@ -5679,7 +5681,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() ); @@ -5728,7 +5730,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() ); @@ -5761,7 +5763,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() ); @@ -5784,7 +5786,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataStreamRequest() ); @@ -5816,7 +5818,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataStreamRequest() ); @@ -5864,7 +5866,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataStreamRequest() ); @@ -5896,7 +5898,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.GetDataStreamRequest() ); @@ -5918,7 +5920,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.RunAccessReportRequest() ); @@ -5950,7 +5952,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.RunAccessReportRequest() ); @@ -5998,7 +6000,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.RunAccessReportRequest() ); @@ -6030,7 +6032,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.RunAccessReportRequest() ); @@ -6052,7 +6054,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountsRequest() ); @@ -6078,7 +6080,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountsRequest() ); @@ -6120,7 +6122,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountsRequest() ); @@ -6138,7 +6140,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountsRequest() ); @@ -6186,7 +6188,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountsRequest() ); @@ -6225,7 +6227,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountsRequest() ); @@ -6262,7 +6264,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountsRequest() ); @@ -6292,7 +6294,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() ); @@ -6319,7 +6321,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() ); @@ -6363,7 +6365,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() ); @@ -6381,7 +6383,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() ); @@ -6430,7 +6432,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() ); @@ -6468,7 +6470,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() ); @@ -6506,7 +6508,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() ); @@ -6537,7 +6539,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListPropertiesRequest() ); @@ -6563,7 +6565,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListPropertiesRequest() ); @@ -6605,7 +6607,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListPropertiesRequest() ); @@ -6623,7 +6625,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListPropertiesRequest() ); @@ -6671,7 +6673,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListPropertiesRequest() ); @@ -6708,7 +6710,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListPropertiesRequest() ); @@ -6745,7 +6747,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListPropertiesRequest() ); @@ -6775,7 +6777,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() ); @@ -6815,7 +6817,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() ); @@ -6871,7 +6873,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() ); @@ -6903,7 +6905,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() ); @@ -6965,7 +6967,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() ); @@ -7016,7 +7018,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() ); @@ -7067,7 +7069,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() ); @@ -7111,7 +7113,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() ); @@ -7152,7 +7154,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() ); @@ -7210,7 +7212,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() ); @@ -7242,7 +7244,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() ); @@ -7304,7 +7306,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() ); @@ -7355,7 +7357,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() ); @@ -7406,7 +7408,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() ); @@ -7450,7 +7452,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() ); @@ -7491,7 +7493,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() ); @@ -7549,7 +7551,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() ); @@ -7584,7 +7586,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() ); @@ -7657,7 +7659,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() ); @@ -7719,7 +7721,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() ); @@ -7774,7 +7776,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() ); @@ -7822,7 +7824,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() ); @@ -7863,7 +7865,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() ); @@ -7921,7 +7923,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() ); @@ -7956,7 +7958,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() ); @@ -8026,7 +8028,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() ); @@ -8085,7 +8087,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() ); @@ -8140,7 +8142,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() ); @@ -8189,7 +8191,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() ); @@ -8232,7 +8234,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() ); @@ -8292,7 +8294,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() ); @@ -8326,7 +8328,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() ); @@ -8390,7 +8392,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() ); @@ -8443,7 +8445,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() ); @@ -8496,7 +8498,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() ); @@ -8541,7 +8543,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListKeyEventsRequest() ); @@ -8581,7 +8583,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListKeyEventsRequest() ); @@ -8637,7 +8639,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListKeyEventsRequest() ); @@ -8669,7 +8671,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListKeyEventsRequest() ); @@ -8730,7 +8732,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListKeyEventsRequest() ); @@ -8780,7 +8782,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListKeyEventsRequest() ); @@ -8830,7 +8832,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListKeyEventsRequest() ); @@ -8873,7 +8875,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() ); @@ -8914,7 +8916,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() ); @@ -8972,7 +8974,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() ); @@ -9004,7 +9006,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() ); @@ -9066,7 +9068,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() ); @@ -9117,7 +9119,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() ); @@ -9168,7 +9170,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() ); @@ -9212,7 +9214,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() ); @@ -9252,7 +9254,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() ); @@ -9308,7 +9310,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() ); @@ -9340,7 +9342,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() ); @@ -9402,7 +9404,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() ); @@ -9453,7 +9455,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() ); @@ -9504,7 +9506,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() ); @@ -9548,7 +9550,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() ); @@ -9588,7 +9590,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() ); @@ -9644,7 +9646,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() ); @@ -9676,7 +9678,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() ); @@ -9737,7 +9739,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() ); @@ -9787,7 +9789,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() ); @@ -9837,7 +9839,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() ); @@ -9875,7 +9877,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -9885,7 +9887,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9914,7 +9916,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('accountSummary', () => { + describe('accountSummary', async () => { const fakePath = '/rendered/path/accountSummary'; const expectedParameters = { account_summary: 'accountSummaryValue', @@ -9924,7 +9926,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountSummaryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9954,7 +9956,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('conversionEvent', () => { + describe('conversionEvent', async () => { const fakePath = '/rendered/path/conversionEvent'; const expectedParameters = { property: 'propertyValue', @@ -9965,7 +9967,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversionEventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10008,7 +10010,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('customDimension', () => { + describe('customDimension', async () => { const fakePath = '/rendered/path/customDimension'; const expectedParameters = { property: 'propertyValue', @@ -10019,7 +10021,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customDimensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10062,7 +10064,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('customMetric', () => { + describe('customMetric', async () => { const fakePath = '/rendered/path/customMetric'; const expectedParameters = { property: 'propertyValue', @@ -10073,7 +10075,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customMetricPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10115,7 +10117,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('dataRetentionSettings', () => { + describe('dataRetentionSettings', async () => { const fakePath = '/rendered/path/dataRetentionSettings'; const expectedParameters = { property: 'propertyValue', @@ -10125,7 +10127,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataRetentionSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10161,7 +10163,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('dataSharingSettings', () => { + describe('dataSharingSettings', async () => { const fakePath = '/rendered/path/dataSharingSettings'; const expectedParameters = { account: 'accountValue', @@ -10171,7 +10173,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataSharingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10206,7 +10208,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('dataStream', () => { + describe('dataStream', async () => { const fakePath = '/rendered/path/dataStream'; const expectedParameters = { property: 'propertyValue', @@ -10217,7 +10219,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataStreamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10259,7 +10261,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('firebaseLink', () => { + describe('firebaseLink', async () => { const fakePath = '/rendered/path/firebaseLink'; const expectedParameters = { property: 'propertyValue', @@ -10270,7 +10272,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.firebaseLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10312,7 +10314,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('googleAdsLink', () => { + describe('googleAdsLink', async () => { const fakePath = '/rendered/path/googleAdsLink'; const expectedParameters = { property: 'propertyValue', @@ -10323,7 +10325,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.googleAdsLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10365,7 +10367,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('keyEvent', () => { + describe('keyEvent', async () => { const fakePath = '/rendered/path/keyEvent'; const expectedParameters = { property: 'propertyValue', @@ -10376,7 +10378,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyEventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10415,7 +10417,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('measurementProtocolSecret', () => { + describe('measurementProtocolSecret', async () => { const fakePath = '/rendered/path/measurementProtocolSecret'; const expectedParameters = { property: 'propertyValue', @@ -10427,7 +10429,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.measurementProtocolSecretPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10497,7 +10499,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); - describe('property', () => { + describe('property', async () => { const fakePath = '/rendered/path/property'; const expectedParameters = { property: 'propertyValue', @@ -10507,7 +10509,7 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.propertyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-analytics-data/package.json b/packages/google-analytics-data/package.json index 7647d75a5f9..85865ba62a1 100644 --- a/packages/google-analytics-data/package.json +++ b/packages/google-analytics-data/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json index 3c80c3f586f..7a8ca36ff6c 100644 --- a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json +++ b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "4.12.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json index 494e71e7d41..cd9aa33284a 100644 --- a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json +++ b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "4.12.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json index 0891039ac80..9ff9402b78b 100644 --- a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json +++ b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "4.12.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json index 66ae4fb1779..7ccb4eff9f6 100644 --- a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json +++ b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "4.12.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts b/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts index 8f604d7f56d..b80bc55d127 100644 --- a/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts +++ b/packages/google-analytics-data/src/v1alpha/alpha_analytics_data_client.ts @@ -633,7 +633,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runFunnelReport request %j', request); const wrappedCallback: | Callback< @@ -797,7 +799,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryAudienceList request %j', request); const wrappedCallback: | Callback< @@ -962,7 +966,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('sheetExportAudienceList request %j', request); const wrappedCallback: | Callback< @@ -1093,7 +1099,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAudienceList request %j', request); const wrappedCallback: | Callback< @@ -1238,7 +1246,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRecurringAudienceList request %j', request); const wrappedCallback: | Callback< @@ -1375,7 +1385,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecurringAudienceList request %j', request); const wrappedCallback: | Callback< @@ -1502,7 +1514,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPropertyQuotasSnapshot request %j', request); const wrappedCallback: | Callback< @@ -1652,7 +1666,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryReportTask request %j', request); const wrappedCallback: | Callback< @@ -1774,7 +1790,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReportTask request %j', request); const wrappedCallback: | Callback< @@ -1932,7 +1950,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2111,7 +2131,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2294,7 +2316,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.data.v1alpha.IListAudienceListsRequest, @@ -2367,7 +2391,9 @@ export class AlphaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listAudienceLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAudienceLists stream %j', request); return this.descriptors.page.listAudienceLists.createStream( this.innerApiCalls.listAudienceLists as GaxCall, @@ -2422,7 +2448,9 @@ export class AlphaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listAudienceLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAudienceLists iterate %j', request); return this.descriptors.page.listAudienceLists.asyncIterate( this.innerApiCalls['listAudienceLists'] as GaxCall, @@ -2545,7 +2573,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.data.v1alpha.IListRecurringAudienceListsRequest, @@ -2620,7 +2650,9 @@ export class AlphaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listRecurringAudienceLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecurringAudienceLists stream %j', request); return this.descriptors.page.listRecurringAudienceLists.createStream( this.innerApiCalls.listRecurringAudienceLists as GaxCall, @@ -2677,7 +2709,9 @@ export class AlphaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listRecurringAudienceLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecurringAudienceLists iterate %j', request); return this.descriptors.page.listRecurringAudienceLists.asyncIterate( this.innerApiCalls['listRecurringAudienceLists'] as GaxCall, @@ -2781,7 +2815,9 @@ export class AlphaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.data.v1alpha.IListReportTasksRequest, @@ -2848,7 +2884,9 @@ export class AlphaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listReportTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportTasks stream %j', request); return this.descriptors.page.listReportTasks.createStream( this.innerApiCalls.listReportTasks as GaxCall, @@ -2897,7 +2935,9 @@ export class AlphaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listReportTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportTasks iterate %j', request); return this.descriptors.page.listReportTasks.asyncIterate( this.innerApiCalls['listReportTasks'] as GaxCall, @@ -2999,7 +3039,7 @@ export class AlphaAnalyticsDataClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-analytics-data/src/v1beta/beta_analytics_data_client.ts b/packages/google-analytics-data/src/v1beta/beta_analytics_data_client.ts index 196bc8c8686..2cbca11241b 100644 --- a/packages/google-analytics-data/src/v1beta/beta_analytics_data_client.ts +++ b/packages/google-analytics-data/src/v1beta/beta_analytics_data_client.ts @@ -610,7 +610,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runReport request %j', request); const wrappedCallback: | Callback< @@ -786,7 +788,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runPivotReport request %j', request); const wrappedCallback: | Callback< @@ -917,7 +921,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchRunReports request %j', request); const wrappedCallback: | Callback< @@ -1054,7 +1060,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchRunPivotReports request %j', request); const wrappedCallback: | Callback< @@ -1192,7 +1200,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMetadata request %j', request); const wrappedCallback: | Callback< @@ -1355,7 +1365,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runRealtimeReport request %j', request); const wrappedCallback: | Callback< @@ -1510,7 +1522,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ property: request.property ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkCompatibility request %j', request); const wrappedCallback: | Callback< @@ -1675,7 +1689,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryAudienceExport request %j', request); const wrappedCallback: | Callback< @@ -1806,7 +1822,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAudienceExport request %j', request); const wrappedCallback: | Callback< @@ -1965,7 +1983,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2149,7 +2169,9 @@ export class BetaAnalyticsDataClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.analytics.data.v1beta.IListAudienceExportsRequest, @@ -2222,7 +2244,9 @@ export class BetaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listAudienceExports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAudienceExports stream %j', request); return this.descriptors.page.listAudienceExports.createStream( this.innerApiCalls.listAudienceExports as GaxCall, @@ -2277,7 +2301,9 @@ export class BetaAnalyticsDataClient { }); const defaultCallSettings = this._defaults['listAudienceExports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAudienceExports iterate %j', request); return this.descriptors.page.listAudienceExports.asyncIterate( this.innerApiCalls['listAudienceExports'] as GaxCall, @@ -2379,7 +2405,7 @@ export class BetaAnalyticsDataClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts b/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts index 5bfd7224da6..a2ec8075174 100644 --- a/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts +++ b/packages/google-analytics-data/test/gapic_alpha_analytics_data_v1alpha.ts @@ -298,7 +298,9 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.alphaAnalyticsDataStub); client.close().then(() => { done(); @@ -361,7 +363,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() ); @@ -393,7 +395,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() ); @@ -441,7 +443,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() ); @@ -473,7 +475,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.RunFunnelReportRequest() ); @@ -495,7 +497,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() ); @@ -527,7 +529,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() ); @@ -575,7 +577,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() ); @@ -607,7 +609,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryAudienceListRequest() ); @@ -629,7 +631,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() ); @@ -662,7 +664,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() ); @@ -710,7 +712,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() ); @@ -745,7 +747,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.SheetExportAudienceListRequest() ); @@ -770,7 +772,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetAudienceListRequest() ); @@ -802,7 +804,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetAudienceListRequest() ); @@ -850,7 +852,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetAudienceListRequest() ); @@ -882,7 +884,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetAudienceListRequest() ); @@ -904,7 +906,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() ); @@ -937,7 +939,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() ); @@ -985,7 +987,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() ); @@ -1020,7 +1022,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateRecurringAudienceListRequest() ); @@ -1045,7 +1047,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() ); @@ -1078,7 +1080,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() ); @@ -1126,7 +1128,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() ); @@ -1161,7 +1163,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetRecurringAudienceListRequest() ); @@ -1186,7 +1188,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() ); @@ -1219,7 +1221,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() ); @@ -1267,7 +1269,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() ); @@ -1302,7 +1304,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetPropertyQuotasSnapshotRequest() ); @@ -1327,7 +1329,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() ); @@ -1359,7 +1361,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() ); @@ -1407,7 +1409,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() ); @@ -1439,7 +1441,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.QueryReportTaskRequest() ); @@ -1461,7 +1463,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetReportTaskRequest() ); @@ -1493,7 +1495,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetReportTaskRequest() ); @@ -1541,7 +1543,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetReportTaskRequest() ); @@ -1573,7 +1575,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.GetReportTaskRequest() ); @@ -1595,7 +1597,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() ); @@ -1629,7 +1631,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() ); @@ -1684,7 +1686,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() ); @@ -1716,7 +1718,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateAudienceListRequest() ); @@ -1750,7 +1752,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1773,7 +1775,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1795,7 +1797,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() ); @@ -1829,7 +1831,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() ); @@ -1884,7 +1886,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() ); @@ -1916,7 +1918,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.CreateReportTaskRequest() ); @@ -1950,7 +1952,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1973,7 +1975,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1995,7 +1997,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() ); @@ -2035,7 +2037,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() ); @@ -2091,7 +2093,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() ); @@ -2123,7 +2125,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() ); @@ -2185,7 +2187,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() ); @@ -2236,7 +2238,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() ); @@ -2287,7 +2289,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListAudienceListsRequest() ); @@ -2331,7 +2333,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() ); @@ -2372,7 +2374,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() ); @@ -2430,7 +2432,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() ); @@ -2465,7 +2467,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() ); @@ -2535,7 +2537,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() ); @@ -2594,7 +2596,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() ); @@ -2649,7 +2651,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListRecurringAudienceListsRequest() ); @@ -2697,7 +2699,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListReportTasksRequest() ); @@ -2737,7 +2739,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListReportTasksRequest() ); @@ -2793,7 +2795,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListReportTasksRequest() ); @@ -2825,7 +2827,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListReportTasksRequest() ); @@ -2886,7 +2888,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListReportTasksRequest() ); @@ -2936,7 +2938,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListReportTasksRequest() ); @@ -2986,7 +2988,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1alpha.ListReportTasksRequest() ); @@ -3029,7 +3031,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3111,7 +3113,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3194,7 +3196,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3293,8 +3295,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3314,7 +3315,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3323,8 +3324,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3340,7 +3340,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); describe('Path templates', () => { - describe('audienceList', () => { + describe('audienceList', async () => { const fakePath = '/rendered/path/audienceList'; const expectedParameters = { property: 'propertyValue', @@ -3351,7 +3351,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.audienceListPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3393,7 +3393,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); }); - describe('property', () => { + describe('property', async () => { const fakePath = '/rendered/path/property'; const expectedParameters = { property: 'propertyValue', @@ -3403,7 +3403,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.propertyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3432,7 +3432,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); }); - describe('propertyQuotasSnapshot', () => { + describe('propertyQuotasSnapshot', async () => { const fakePath = '/rendered/path/propertyQuotasSnapshot'; const expectedParameters = { property: 'propertyValue', @@ -3442,7 +3442,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.propertyQuotasSnapshotPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3478,7 +3478,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); }); - describe('recurringAudienceList', () => { + describe('recurringAudienceList', async () => { const fakePath = '/rendered/path/recurringAudienceList'; const expectedParameters = { property: 'propertyValue', @@ -3489,7 +3489,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.recurringAudienceListPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3544,7 +3544,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { }); }); - describe('reportTask', () => { + describe('reportTask', async () => { const fakePath = '/rendered/path/reportTask'; const expectedParameters = { property: 'propertyValue', @@ -3555,7 +3555,7 @@ describe('v1alpha.AlphaAnalyticsDataClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportTaskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts b/packages/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts index a8c45edb034..7697dfbdfeb 100644 --- a/packages/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts +++ b/packages/google-analytics-data/test/gapic_beta_analytics_data_v1beta.ts @@ -298,7 +298,9 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.betaAnalyticsDataStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunReportRequest() ); @@ -398,7 +400,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunReportRequest() ); @@ -447,7 +449,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunReportRequest() ); @@ -477,7 +479,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunReportRequest() ); @@ -500,7 +502,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunPivotReportRequest() ); @@ -533,7 +535,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunPivotReportRequest() ); @@ -582,7 +584,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunPivotReportRequest() ); @@ -615,7 +617,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunPivotReportRequest() ); @@ -638,7 +640,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunReportsRequest() ); @@ -671,7 +673,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunReportsRequest() ); @@ -720,7 +722,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunReportsRequest() ); @@ -753,7 +755,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunReportsRequest() ); @@ -776,7 +778,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() ); @@ -810,7 +812,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() ); @@ -859,7 +861,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() ); @@ -892,7 +894,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.BatchRunPivotReportsRequest() ); @@ -915,7 +917,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetMetadataRequest() ); @@ -948,7 +950,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetMetadataRequest() ); @@ -997,7 +999,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetMetadataRequest() ); @@ -1030,7 +1032,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetMetadataRequest() ); @@ -1053,7 +1055,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() ); @@ -1086,7 +1088,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() ); @@ -1135,7 +1137,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() ); @@ -1168,7 +1170,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.RunRealtimeReportRequest() ); @@ -1191,7 +1193,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() ); @@ -1225,7 +1227,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() ); @@ -1274,7 +1276,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() ); @@ -1307,7 +1309,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CheckCompatibilityRequest() ); @@ -1330,7 +1332,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() ); @@ -1364,7 +1366,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() ); @@ -1413,7 +1415,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() ); @@ -1446,7 +1448,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.QueryAudienceExportRequest() ); @@ -1469,7 +1471,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetAudienceExportRequest() ); @@ -1502,7 +1504,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetAudienceExportRequest() ); @@ -1551,7 +1553,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetAudienceExportRequest() ); @@ -1584,7 +1586,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.GetAudienceExportRequest() ); @@ -1607,7 +1609,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() ); @@ -1642,7 +1644,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() ); @@ -1698,7 +1700,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() ); @@ -1731,7 +1733,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.CreateAudienceExportRequest() ); @@ -1766,7 +1768,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1790,7 +1792,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1813,7 +1815,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() ); @@ -1855,7 +1857,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() ); @@ -1914,7 +1916,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() ); @@ -1947,7 +1949,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() ); @@ -2010,7 +2012,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() ); @@ -2062,7 +2064,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() ); @@ -2114,7 +2116,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.analytics.data.v1beta.ListAudienceExportsRequest() ); @@ -2158,7 +2160,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2243,7 +2245,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2329,7 +2331,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2431,8 +2433,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2453,7 +2454,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2462,8 +2463,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2479,7 +2479,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { }); describe('Path templates', () => { - describe('audienceExport', () => { + describe('audienceExport', async () => { const fakePath = '/rendered/path/audienceExport'; const expectedParameters = { property: 'propertyValue', @@ -2491,7 +2491,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.audienceExportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2534,7 +2534,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { }); }); - describe('metadata', () => { + describe('metadata', async () => { const fakePath = '/rendered/path/metadata'; const expectedParameters = { property: 'propertyValue', @@ -2545,7 +2545,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2574,7 +2574,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { }); }); - describe('property', () => { + describe('property', async () => { const fakePath = '/rendered/path/property'; const expectedParameters = { property: 'propertyValue', @@ -2585,7 +2585,7 @@ describe('v1beta.BetaAnalyticsDataClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.propertyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-api-apikeys/package.json b/packages/google-api-apikeys/package.json index 5a6da606f8c..f3692027f1b 100644 --- a/packages/google-api-apikeys/package.json +++ b/packages/google-api-apikeys/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json index dbca9f7da24..5044faa8867 100644 --- a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json +++ b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apikeys", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json index dbca9f7da24..5044faa8867 100644 --- a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json +++ b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apikeys", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-apikeys/src/v2/api_keys_client.ts b/packages/google-api-apikeys/src/v2/api_keys_client.ts index 426f8cde639..4e5ca7d5a11 100644 --- a/packages/google-api-apikeys/src/v2/api_keys_client.ts +++ b/packages/google-api-apikeys/src/v2/api_keys_client.ts @@ -556,7 +556,9 @@ export class ApiKeysClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKey request %j', request); const wrappedCallback: | Callback< @@ -665,7 +667,9 @@ export class ApiKeysClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKeyString request %j', request); const wrappedCallback: | Callback< @@ -771,7 +775,9 @@ export class ApiKeysClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupKey request %j', request); const wrappedCallback: | Callback< @@ -915,7 +921,9 @@ export class ApiKeysClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1093,7 +1101,9 @@ export class ApiKeysClient { this._gaxModule.routingHeader.fromParams({ 'key.name': request.key!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1264,7 +1274,9 @@ export class ApiKeysClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1431,7 +1443,9 @@ export class ApiKeysClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1589,7 +1603,9 @@ export class ApiKeysClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.apikeys.v2.IListKeysRequest, @@ -1655,7 +1671,9 @@ export class ApiKeysClient { }); const defaultCallSettings = this._defaults['listKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeys stream %j', request); return this.descriptors.page.listKeys.createStream( this.innerApiCalls.listKeys as GaxCall, @@ -1705,7 +1723,9 @@ export class ApiKeysClient { }); const defaultCallSettings = this._defaults['listKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeys iterate %j', request); return this.descriptors.page.listKeys.asyncIterate( this.innerApiCalls['listKeys'] as GaxCall, @@ -1807,7 +1827,7 @@ export class ApiKeysClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-api-apikeys/test/gapic_api_keys_v2.ts b/packages/google-api-apikeys/test/gapic_api_keys_v2.ts index 37bb0eedc23..4fd9b1f40a3 100644 --- a/packages/google-api-apikeys/test/gapic_api_keys_v2.ts +++ b/packages/google-api-apikeys/test/gapic_api_keys_v2.ts @@ -282,7 +282,9 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.apiKeysStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyRequest() ); @@ -372,7 +374,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyRequest() ); @@ -419,7 +421,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyRequest() ); @@ -447,7 +449,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyRequest() ); @@ -468,7 +470,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyStringRequest() ); @@ -499,7 +501,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyStringRequest() ); @@ -546,7 +548,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyStringRequest() ); @@ -577,7 +579,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.GetKeyStringRequest() ); @@ -598,7 +600,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.LookupKeyRequest() ); @@ -615,7 +617,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.LookupKeyRequest() ); @@ -648,7 +650,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.LookupKeyRequest() ); @@ -662,7 +664,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.LookupKeyRequest() ); @@ -678,7 +680,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.CreateKeyRequest() ); @@ -710,7 +712,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.CreateKeyRequest() ); @@ -764,7 +766,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.CreateKeyRequest() ); @@ -795,7 +797,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.CreateKeyRequest() ); @@ -828,7 +830,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -850,7 +852,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -868,7 +870,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UpdateKeyRequest() ); @@ -901,7 +903,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UpdateKeyRequest() ); @@ -956,7 +958,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UpdateKeyRequest() ); @@ -988,7 +990,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UpdateKeyRequest() ); @@ -1022,7 +1024,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1044,7 +1046,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1062,7 +1064,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.DeleteKeyRequest() ); @@ -1094,7 +1096,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.DeleteKeyRequest() ); @@ -1148,7 +1150,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.DeleteKeyRequest() ); @@ -1179,7 +1181,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.DeleteKeyRequest() ); @@ -1212,7 +1214,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1234,7 +1236,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1252,7 +1254,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UndeleteKeyRequest() ); @@ -1284,7 +1286,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UndeleteKeyRequest() ); @@ -1338,7 +1340,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UndeleteKeyRequest() ); @@ -1369,7 +1371,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.UndeleteKeyRequest() ); @@ -1402,7 +1404,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1424,7 +1426,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1442,7 +1444,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.ListKeysRequest() ); @@ -1475,7 +1477,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.ListKeysRequest() ); @@ -1524,7 +1526,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.ListKeysRequest() ); @@ -1552,7 +1554,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.ListKeysRequest() ); @@ -1603,7 +1605,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.ListKeysRequest() ); @@ -1651,7 +1653,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.ListKeysRequest() ); @@ -1693,7 +1695,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.apikeys.v2.ListKeysRequest() ); @@ -1735,7 +1737,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1814,7 +1816,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1894,7 +1896,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1990,8 +1992,7 @@ describe('v2.ApiKeysClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2010,7 +2011,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2019,8 +2020,7 @@ describe('v2.ApiKeysClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2036,7 +2036,7 @@ describe('v2.ApiKeysClient', () => { }); describe('Path templates', () => { - describe('key', () => { + describe('key', async () => { const fakePath = '/rendered/path/key'; const expectedParameters = { project: 'projectValue', @@ -2047,7 +2047,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2100,7 +2100,7 @@ describe('v2.ApiKeysClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2110,7 +2110,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2149,7 +2149,7 @@ describe('v2.ApiKeysClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2158,7 +2158,7 @@ describe('v2.ApiKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-api-cloudquotas/package.json b/packages/google-api-cloudquotas/package.json index 0fed73eb14c..71a5bd3440e 100644 --- a/packages/google-api-cloudquotas/package.json +++ b/packages/google-api-cloudquotas/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json b/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json index 53a2cc90888..492f643146d 100644 --- a/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json +++ b/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudquotas", - "version": "1.0.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json b/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json index 1991bf2bf62..37ec5763da9 100644 --- a/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json +++ b/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudquotas", - "version": "1.0.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-cloudquotas/src/v1/cloud_quotas_client.ts b/packages/google-api-cloudquotas/src/v1/cloud_quotas_client.ts index 5314bc65f7a..43f28fee5b5 100644 --- a/packages/google-api-cloudquotas/src/v1/cloud_quotas_client.ts +++ b/packages/google-api-cloudquotas/src/v1/cloud_quotas_client.ts @@ -510,7 +510,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQuotaInfo request %j', request); const wrappedCallback: | Callback< @@ -629,7 +631,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQuotaPreference request %j', request); const wrappedCallback: | Callback< @@ -764,7 +768,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQuotaPreference request %j', request); const wrappedCallback: | Callback< @@ -905,7 +911,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ 'quota_preference.name': request.quotaPreference!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQuotaPreference request %j', request); const wrappedCallback: | Callback< @@ -1040,7 +1048,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.cloudquotas.v1.IListQuotaInfosRequest, @@ -1113,7 +1123,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaInfos']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaInfos stream %j', request); return this.descriptors.page.listQuotaInfos.createStream( this.innerApiCalls.listQuotaInfos as GaxCall, @@ -1168,7 +1180,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaInfos']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaInfos iterate %j', request); return this.descriptors.page.listQuotaInfos.asyncIterate( this.innerApiCalls['listQuotaInfos'] as GaxCall, @@ -1294,7 +1308,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.cloudquotas.v1.IListQuotaPreferencesRequest, @@ -1383,7 +1399,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaPreferences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaPreferences stream %j', request); return this.descriptors.page.listQuotaPreferences.createStream( this.innerApiCalls.listQuotaPreferences as GaxCall, @@ -1454,7 +1472,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaPreferences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaPreferences iterate %j', request); return this.descriptors.page.listQuotaPreferences.asyncIterate( this.innerApiCalls['listQuotaPreferences'] as GaxCall, diff --git a/packages/google-api-cloudquotas/src/v1beta/cloud_quotas_client.ts b/packages/google-api-cloudquotas/src/v1beta/cloud_quotas_client.ts index 8e1bb7f7bfc..e8e32e63704 100644 --- a/packages/google-api-cloudquotas/src/v1beta/cloud_quotas_client.ts +++ b/packages/google-api-cloudquotas/src/v1beta/cloud_quotas_client.ts @@ -519,7 +519,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQuotaInfo request %j', request); const wrappedCallback: | Callback< @@ -644,7 +646,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQuotaPreference request %j', request); const wrappedCallback: | Callback< @@ -779,7 +783,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQuotaPreference request %j', request); const wrappedCallback: | Callback< @@ -920,7 +926,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ 'quota_preference.name': request.quotaPreference!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQuotaPreference request %j', request); const wrappedCallback: | Callback< @@ -1055,7 +1063,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.cloudquotas.v1beta.IListQuotaInfosRequest, @@ -1128,7 +1138,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaInfos']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaInfos stream %j', request); return this.descriptors.page.listQuotaInfos.createStream( this.innerApiCalls.listQuotaInfos as GaxCall, @@ -1183,7 +1195,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaInfos']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaInfos iterate %j', request); return this.descriptors.page.listQuotaInfos.asyncIterate( this.innerApiCalls['listQuotaInfos'] as GaxCall, @@ -1309,7 +1323,9 @@ export class CloudQuotasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.cloudquotas.v1beta.IListQuotaPreferencesRequest, @@ -1398,7 +1414,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaPreferences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaPreferences stream %j', request); return this.descriptors.page.listQuotaPreferences.createStream( this.innerApiCalls.listQuotaPreferences as GaxCall, @@ -1469,7 +1487,9 @@ export class CloudQuotasClient { }); const defaultCallSettings = this._defaults['listQuotaPreferences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaPreferences iterate %j', request); return this.descriptors.page.listQuotaPreferences.asyncIterate( this.innerApiCalls['listQuotaPreferences'] as GaxCall, diff --git a/packages/google-api-cloudquotas/src/v1beta/quota_adjuster_settings_manager_client.ts b/packages/google-api-cloudquotas/src/v1beta/quota_adjuster_settings_manager_client.ts index 71ffbf98b83..efa7a5c055c 100644 --- a/packages/google-api-cloudquotas/src/v1beta/quota_adjuster_settings_manager_client.ts +++ b/packages/google-api-cloudquotas/src/v1beta/quota_adjuster_settings_manager_client.ts @@ -502,7 +502,9 @@ export class QuotaAdjusterSettingsManagerClient { 'quota_adjuster_settings.name': request.quotaAdjusterSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQuotaAdjusterSettings request %j', request); const wrappedCallback: | Callback< @@ -628,7 +630,9 @@ export class QuotaAdjusterSettingsManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQuotaAdjusterSettings request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1.ts b/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1.ts index 46434982193..c334f264470 100644 --- a/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1.ts +++ b/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1.ts @@ -250,7 +250,9 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudQuotasStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaInfoRequest() ); @@ -340,7 +342,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaInfoRequest() ); @@ -387,7 +389,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaInfoRequest() ); @@ -418,7 +420,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaInfoRequest() ); @@ -439,7 +441,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaPreferenceRequest() ); @@ -471,7 +473,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaPreferenceRequest() ); @@ -518,7 +520,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaPreferenceRequest() ); @@ -549,7 +551,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.GetQuotaPreferenceRequest() ); @@ -570,7 +572,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.CreateQuotaPreferenceRequest() ); @@ -602,7 +604,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.CreateQuotaPreferenceRequest() ); @@ -649,7 +651,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.CreateQuotaPreferenceRequest() ); @@ -683,7 +685,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.CreateQuotaPreferenceRequest() ); @@ -707,7 +709,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.UpdateQuotaPreferenceRequest() ); @@ -740,7 +742,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.UpdateQuotaPreferenceRequest() ); @@ -788,7 +790,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.UpdateQuotaPreferenceRequest() ); @@ -823,7 +825,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.UpdateQuotaPreferenceRequest() ); @@ -848,7 +850,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaInfosRequest() ); @@ -881,7 +883,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaInfosRequest() ); @@ -930,7 +932,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaInfosRequest() ); @@ -961,7 +963,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaInfosRequest() ); @@ -1015,7 +1017,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaInfosRequest() ); @@ -1064,7 +1066,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaInfosRequest() ); @@ -1107,7 +1109,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaInfosRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaPreferencesRequest() ); @@ -1189,7 +1191,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaPreferencesRequest() ); @@ -1244,7 +1246,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaPreferencesRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaPreferencesRequest() ); @@ -1336,7 +1338,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaPreferencesRequest() ); @@ -1386,7 +1388,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaPreferencesRequest() ); @@ -1435,7 +1437,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1.ListQuotaPreferencesRequest() ); @@ -1473,7 +1475,7 @@ describe('v1.CloudQuotasClient', () => { }); describe('Path templates', () => { - describe('folderLocationQuotaPreference', () => { + describe('folderLocationQuotaPreference', async () => { const fakePath = '/rendered/path/folderLocationQuotaPreference'; const expectedParameters = { folder: 'folderValue', @@ -1484,7 +1486,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationQuotaPreferencePathTemplate.match = @@ -1552,7 +1554,7 @@ describe('v1.CloudQuotasClient', () => { }); }); - describe('folderLocationServiceQuotaInfo', () => { + describe('folderLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/folderLocationServiceQuotaInfo'; const expectedParameters = { folder: 'folderValue', @@ -1564,7 +1566,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationServiceQuotaInfoPathTemplate.match = @@ -1645,7 +1647,7 @@ describe('v1.CloudQuotasClient', () => { }); }); - describe('organizationLocationQuotaPreference', () => { + describe('organizationLocationQuotaPreference', async () => { const fakePath = '/rendered/path/organizationLocationQuotaPreference'; const expectedParameters = { organization: 'organizationValue', @@ -1656,7 +1658,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationQuotaPreferencePathTemplate.match = @@ -1728,7 +1730,7 @@ describe('v1.CloudQuotasClient', () => { }); }); - describe('organizationLocationServiceQuotaInfo', () => { + describe('organizationLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/organizationLocationServiceQuotaInfo'; const expectedParameters = { organization: 'organizationValue', @@ -1740,7 +1742,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationServiceQuotaInfoPathTemplate.match = @@ -1834,7 +1836,7 @@ describe('v1.CloudQuotasClient', () => { }); }); - describe('projectLocation', () => { + describe('projectLocation', async () => { const fakePath = '/rendered/path/projectLocation'; const expectedParameters = { project: 'projectValue', @@ -1844,7 +1846,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1886,7 +1888,7 @@ describe('v1.CloudQuotasClient', () => { }); }); - describe('projectLocationQuotaPreference', () => { + describe('projectLocationQuotaPreference', async () => { const fakePath = '/rendered/path/projectLocationQuotaPreference'; const expectedParameters = { project: 'projectValue', @@ -1897,7 +1899,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationQuotaPreferencePathTemplate.match = @@ -1965,7 +1967,7 @@ describe('v1.CloudQuotasClient', () => { }); }); - describe('projectLocationService', () => { + describe('projectLocationService', async () => { const fakePath = '/rendered/path/projectLocationService'; const expectedParameters = { project: 'projectValue', @@ -1976,7 +1978,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2044,7 +2046,7 @@ describe('v1.CloudQuotasClient', () => { }); }); - describe('projectLocationServiceQuotaInfo', () => { + describe('projectLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/projectLocationServiceQuotaInfo'; const expectedParameters = { project: 'projectValue', @@ -2056,7 +2058,7 @@ describe('v1.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationServiceQuotaInfoPathTemplate.match = diff --git a/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1beta.ts b/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1beta.ts index d132c546ef0..7212bf1aa11 100644 --- a/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1beta.ts +++ b/packages/google-api-cloudquotas/test/gapic_cloud_quotas_v1beta.ts @@ -252,7 +252,9 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudQuotasStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaInfoRequest() ); @@ -342,7 +344,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaInfoRequest() ); @@ -389,7 +391,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaInfoRequest() ); @@ -420,7 +422,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaInfoRequest() ); @@ -441,7 +443,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaPreferenceRequest() ); @@ -473,7 +475,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaPreferenceRequest() ); @@ -520,7 +522,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaPreferenceRequest() ); @@ -551,7 +553,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaPreferenceRequest() ); @@ -572,7 +574,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.CreateQuotaPreferenceRequest() ); @@ -604,7 +606,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.CreateQuotaPreferenceRequest() ); @@ -651,7 +653,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.CreateQuotaPreferenceRequest() ); @@ -685,7 +687,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.CreateQuotaPreferenceRequest() ); @@ -709,7 +711,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaPreferenceRequest() ); @@ -742,7 +744,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaPreferenceRequest() ); @@ -790,7 +792,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaPreferenceRequest() ); @@ -825,7 +827,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaPreferenceRequest() ); @@ -850,7 +852,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaInfosRequest() ); @@ -889,7 +891,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaInfosRequest() ); @@ -944,7 +946,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaInfosRequest() ); @@ -975,7 +977,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaInfosRequest() ); @@ -1035,7 +1037,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaInfosRequest() ); @@ -1084,7 +1086,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaInfosRequest() ); @@ -1133,7 +1135,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaInfosRequest() ); @@ -1175,7 +1177,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaPreferencesRequest() ); @@ -1215,7 +1217,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaPreferencesRequest() ); @@ -1272,7 +1274,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaPreferencesRequest() ); @@ -1303,7 +1305,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaPreferencesRequest() ); @@ -1364,7 +1366,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaPreferencesRequest() ); @@ -1414,7 +1416,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaPreferencesRequest() ); @@ -1464,7 +1466,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.ListQuotaPreferencesRequest() ); @@ -1502,7 +1504,7 @@ describe('v1beta.CloudQuotasClient', () => { }); describe('Path templates', () => { - describe('folderLocationQuotaPreference', () => { + describe('folderLocationQuotaPreference', async () => { const fakePath = '/rendered/path/folderLocationQuotaPreference'; const expectedParameters = { folder: 'folderValue', @@ -1513,7 +1515,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationQuotaPreferencePathTemplate.match = @@ -1581,7 +1583,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('folderLocationServiceQuotaInfo', () => { + describe('folderLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/folderLocationServiceQuotaInfo'; const expectedParameters = { folder: 'folderValue', @@ -1593,7 +1595,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationServiceQuotaInfoPathTemplate.match = @@ -1674,7 +1676,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('organizationLocationQuotaPreference', () => { + describe('organizationLocationQuotaPreference', async () => { const fakePath = '/rendered/path/organizationLocationQuotaPreference'; const expectedParameters = { organization: 'organizationValue', @@ -1685,7 +1687,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationQuotaPreferencePathTemplate.match = @@ -1757,7 +1759,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('organizationLocationServiceQuotaInfo', () => { + describe('organizationLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/organizationLocationServiceQuotaInfo'; const expectedParameters = { organization: 'organizationValue', @@ -1769,7 +1771,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationServiceQuotaInfoPathTemplate.match = @@ -1863,7 +1865,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('projectLocation', () => { + describe('projectLocation', async () => { const fakePath = '/rendered/path/projectLocation'; const expectedParameters = { project: 'projectValue', @@ -1873,7 +1875,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1915,7 +1917,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('projectLocationQuotaPreference', () => { + describe('projectLocationQuotaPreference', async () => { const fakePath = '/rendered/path/projectLocationQuotaPreference'; const expectedParameters = { project: 'projectValue', @@ -1926,7 +1928,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationQuotaPreferencePathTemplate.match = @@ -1994,7 +1996,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('projectLocationService', () => { + describe('projectLocationService', async () => { const fakePath = '/rendered/path/projectLocationService'; const expectedParameters = { project: 'projectValue', @@ -2005,7 +2007,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2073,7 +2075,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('projectLocationServiceQuotaInfo', () => { + describe('projectLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/projectLocationServiceQuotaInfo'; const expectedParameters = { project: 'projectValue', @@ -2085,7 +2087,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationServiceQuotaInfoPathTemplate.match = @@ -2168,7 +2170,7 @@ describe('v1beta.CloudQuotasClient', () => { }); }); - describe('quotaAdjusterSettings', () => { + describe('quotaAdjusterSettings', async () => { const fakePath = '/rendered/path/quotaAdjusterSettings'; const expectedParameters = { project: 'projectValue', @@ -2178,7 +2180,7 @@ describe('v1beta.CloudQuotasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.quotaAdjusterSettingsPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-api-cloudquotas/test/gapic_quota_adjuster_settings_manager_v1beta.ts b/packages/google-api-cloudquotas/test/gapic_quota_adjuster_settings_manager_v1beta.ts index ee8cd2f41ec..9585491d6ea 100644 --- a/packages/google-api-cloudquotas/test/gapic_quota_adjuster_settings_manager_v1beta.ts +++ b/packages/google-api-cloudquotas/test/gapic_quota_adjuster_settings_manager_v1beta.ts @@ -208,7 +208,9 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.quotaAdjusterSettingsManagerStub); client.close().then(() => { done(); @@ -279,7 +281,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaAdjusterSettingsRequest() ); @@ -315,7 +317,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaAdjusterSettingsRequest() ); @@ -366,7 +368,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaAdjusterSettingsRequest() ); @@ -404,7 +406,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.UpdateQuotaAdjusterSettingsRequest() ); @@ -432,7 +434,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaAdjusterSettingsRequest() ); @@ -467,7 +469,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaAdjusterSettingsRequest() ); @@ -517,7 +519,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaAdjusterSettingsRequest() ); @@ -554,7 +556,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.cloudquotas.v1beta.GetQuotaAdjusterSettingsRequest() ); @@ -573,7 +575,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { }); describe('Path templates', () => { - describe('folderLocationQuotaPreference', () => { + describe('folderLocationQuotaPreference', async () => { const fakePath = '/rendered/path/folderLocationQuotaPreference'; const expectedParameters = { folder: 'folderValue', @@ -587,7 +589,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationQuotaPreferencePathTemplate.match = @@ -655,7 +657,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { }); }); - describe('folderLocationServiceQuotaInfo', () => { + describe('folderLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/folderLocationServiceQuotaInfo'; const expectedParameters = { folder: 'folderValue', @@ -670,7 +672,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationServiceQuotaInfoPathTemplate.match = @@ -751,7 +753,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { }); }); - describe('organizationLocationQuotaPreference', () => { + describe('organizationLocationQuotaPreference', async () => { const fakePath = '/rendered/path/organizationLocationQuotaPreference'; const expectedParameters = { organization: 'organizationValue', @@ -765,7 +767,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationQuotaPreferencePathTemplate.match = @@ -837,7 +839,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { }); }); - describe('organizationLocationServiceQuotaInfo', () => { + describe('organizationLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/organizationLocationServiceQuotaInfo'; const expectedParameters = { organization: 'organizationValue', @@ -852,7 +854,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationServiceQuotaInfoPathTemplate.match = @@ -946,7 +948,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { }); }); - describe('projectLocationQuotaPreference', () => { + describe('projectLocationQuotaPreference', async () => { const fakePath = '/rendered/path/projectLocationQuotaPreference'; const expectedParameters = { project: 'projectValue', @@ -960,7 +962,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationQuotaPreferencePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationQuotaPreferencePathTemplate.match = @@ -1028,7 +1030,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { }); }); - describe('projectLocationServiceQuotaInfo', () => { + describe('projectLocationServiceQuotaInfo', async () => { const fakePath = '/rendered/path/projectLocationServiceQuotaInfo'; const expectedParameters = { project: 'projectValue', @@ -1043,7 +1045,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationServiceQuotaInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationServiceQuotaInfoPathTemplate.match = @@ -1126,7 +1128,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { }); }); - describe('quotaAdjusterSettings', () => { + describe('quotaAdjusterSettings', async () => { const fakePath = '/rendered/path/quotaAdjusterSettings'; const expectedParameters = { project: 'projectValue', @@ -1139,7 +1141,7 @@ describe('v1beta.QuotaAdjusterSettingsManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.quotaAdjusterSettingsPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-api-servicecontrol/package.json b/packages/google-api-servicecontrol/package.json index f04bf59c6a3..821a7dd62c7 100644 --- a/packages/google-api-servicecontrol/package.json +++ b/packages/google-api-servicecontrol/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json index 28c6db2fd09..278bfb5adab 100644 --- a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json +++ b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json index 28c6db2fd09..278bfb5adab 100644 --- a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json +++ b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json index 722152c4b06..fd3652eb858 100644 --- a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json +++ b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json index 722152c4b06..fd3652eb858 100644 --- a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json +++ b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/src/v1/quota_controller_client.ts b/packages/google-api-servicecontrol/src/v1/quota_controller_client.ts index aec1bb7c222..f64bae08cca 100644 --- a/packages/google-api-servicecontrol/src/v1/quota_controller_client.ts +++ b/packages/google-api-servicecontrol/src/v1/quota_controller_client.ts @@ -470,7 +470,9 @@ export class QuotaControllerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('allocateQuota request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-api-servicecontrol/src/v1/service_controller_client.ts b/packages/google-api-servicecontrol/src/v1/service_controller_client.ts index 50ab15dfeec..001fad48322 100644 --- a/packages/google-api-servicecontrol/src/v1/service_controller_client.ts +++ b/packages/google-api-servicecontrol/src/v1/service_controller_client.ts @@ -472,7 +472,9 @@ export class ServiceControllerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('check request %j', request); const wrappedCallback: | Callback< @@ -615,7 +617,9 @@ export class ServiceControllerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('report request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-api-servicecontrol/src/v2/service_controller_client.ts b/packages/google-api-servicecontrol/src/v2/service_controller_client.ts index 14955210dea..a0310b6eed3 100644 --- a/packages/google-api-servicecontrol/src/v2/service_controller_client.ts +++ b/packages/google-api-servicecontrol/src/v2/service_controller_client.ts @@ -483,7 +483,9 @@ export class ServiceControllerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('check request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class ServiceControllerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('report request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-api-servicecontrol/test/gapic_quota_controller_v1.ts b/packages/google-api-servicecontrol/test/gapic_quota_controller_v1.ts index 7fa17297d30..0347f2ed935 100644 --- a/packages/google-api-servicecontrol/test/gapic_quota_controller_v1.ts +++ b/packages/google-api-servicecontrol/test/gapic_quota_controller_v1.ts @@ -192,7 +192,9 @@ describe('v1.QuotaControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.quotaControllerStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1.QuotaControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.AllocateQuotaRequest() ); @@ -282,7 +284,7 @@ describe('v1.QuotaControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.AllocateQuotaRequest() ); @@ -329,7 +331,7 @@ describe('v1.QuotaControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.AllocateQuotaRequest() ); @@ -360,7 +362,7 @@ describe('v1.QuotaControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.AllocateQuotaRequest() ); diff --git a/packages/google-api-servicecontrol/test/gapic_service_controller_v1.ts b/packages/google-api-servicecontrol/test/gapic_service_controller_v1.ts index cb2fb9ec6aa..970e14570de 100644 --- a/packages/google-api-servicecontrol/test/gapic_service_controller_v1.ts +++ b/packages/google-api-servicecontrol/test/gapic_service_controller_v1.ts @@ -193,7 +193,9 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.serviceControllerStub); client.close().then(() => { done(); @@ -252,7 +254,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.CheckRequest() ); @@ -282,7 +284,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.CheckRequest() ); @@ -327,7 +329,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.CheckRequest() ); @@ -354,7 +356,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.CheckRequest() ); @@ -375,7 +377,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.ReportRequest() ); @@ -406,7 +408,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.ReportRequest() ); @@ -453,7 +455,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.ReportRequest() ); @@ -481,7 +483,7 @@ describe('v1.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v1.ReportRequest() ); diff --git a/packages/google-api-servicecontrol/test/gapic_service_controller_v2.ts b/packages/google-api-servicecontrol/test/gapic_service_controller_v2.ts index 1e0a8c79529..f3b91969fe1 100644 --- a/packages/google-api-servicecontrol/test/gapic_service_controller_v2.ts +++ b/packages/google-api-servicecontrol/test/gapic_service_controller_v2.ts @@ -193,7 +193,9 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.serviceControllerStub); client.close().then(() => { done(); @@ -252,7 +254,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.CheckRequest() ); @@ -282,7 +284,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.CheckRequest() ); @@ -327,7 +329,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.CheckRequest() ); @@ -354,7 +356,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.CheckRequest() ); @@ -375,7 +377,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.ReportRequest() ); @@ -406,7 +408,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.ReportRequest() ); @@ -453,7 +455,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.ReportRequest() ); @@ -481,7 +483,7 @@ describe('v2.ServiceControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicecontrol.v2.ReportRequest() ); diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 6dc0844f311..9c606add6ae 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index 8636b2e4955..536c9e5e692 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json index 8636b2e4955..536c9e5e692 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts index 5b9dc6116b3..11b1f37eaa3 100644 --- a/packages/google-api-servicemanagement/src/v1/service_manager_client.ts +++ b/packages/google-api-servicemanagement/src/v1/service_manager_client.ts @@ -612,7 +612,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -745,7 +747,9 @@ export class ServiceManagerClient { service_name: request.serviceName ?? '', config_id: request.configId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServiceConfig request %j', request); const wrappedCallback: | Callback< @@ -881,7 +885,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createServiceConfig request %j', request); const wrappedCallback: | Callback< @@ -1012,7 +1018,9 @@ export class ServiceManagerClient { service_name: request.serviceName ?? '', rollout_id: request.rolloutId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServiceRollout request %j', request); const wrappedCallback: | Callback< @@ -1153,7 +1161,9 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateConfigReport request %j', request); const wrappedCallback: | Callback< @@ -1291,7 +1301,9 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1467,7 +1479,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1641,7 +1655,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1829,7 +1845,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2013,7 +2031,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2183,7 +2203,9 @@ export class ServiceManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.servicemanagement.v1.IListServicesRequest, @@ -2252,7 +2274,9 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -2303,7 +2327,9 @@ export class ServiceManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -2409,7 +2435,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.servicemanagement.v1.IListServiceConfigsRequest, @@ -2477,7 +2505,9 @@ export class ServiceManagerClient { }); const defaultCallSettings = this._defaults['listServiceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceConfigs stream %j', request); return this.descriptors.page.listServiceConfigs.createStream( this.innerApiCalls.listServiceConfigs as GaxCall, @@ -2527,7 +2557,9 @@ export class ServiceManagerClient { }); const defaultCallSettings = this._defaults['listServiceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceConfigs iterate %j', request); return this.descriptors.page.listServiceConfigs.asyncIterate( this.innerApiCalls['listServiceConfigs'] as GaxCall, @@ -2644,7 +2676,9 @@ export class ServiceManagerClient { this._gaxModule.routingHeader.fromParams({ service_name: request.serviceName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.servicemanagement.v1.IListServiceRolloutsRequest, @@ -2723,7 +2757,9 @@ export class ServiceManagerClient { }); const defaultCallSettings = this._defaults['listServiceRollouts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceRollouts stream %j', request); return this.descriptors.page.listServiceRollouts.createStream( this.innerApiCalls.listServiceRollouts as GaxCall, @@ -2784,7 +2820,9 @@ export class ServiceManagerClient { }); const defaultCallSettings = this._defaults['listServiceRollouts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceRollouts iterate %j', request); return this.descriptors.page.listServiceRollouts.asyncIterate( this.innerApiCalls['listServiceRollouts'] as GaxCall, @@ -3024,7 +3062,7 @@ export class ServiceManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts index 331fab6d194..711022d7396 100644 --- a/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts +++ b/packages/google-api-servicemanagement/test/gapic_service_manager_v1.ts @@ -287,7 +287,9 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.serviceManagerStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); @@ -377,7 +379,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); @@ -424,7 +426,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); @@ -455,7 +457,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRequest() ); @@ -476,7 +478,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); @@ -512,7 +514,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); @@ -561,7 +563,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); @@ -597,7 +599,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceConfigRequest() ); @@ -623,7 +625,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); @@ -655,7 +657,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); @@ -699,7 +701,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); @@ -730,7 +732,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceConfigRequest() ); @@ -751,7 +753,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); @@ -787,7 +789,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); @@ -839,7 +841,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); @@ -875,7 +877,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GetServiceRolloutRequest() ); @@ -901,7 +903,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); @@ -919,7 +921,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); @@ -952,7 +954,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); @@ -969,7 +971,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.GenerateConfigReportRequest() ); @@ -985,7 +987,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); @@ -1004,7 +1006,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); @@ -1044,7 +1046,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); @@ -1061,7 +1063,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1102,7 +1104,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1123,7 +1125,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); @@ -1156,7 +1158,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.DeleteServiceRequest() ); @@ -1274,7 +1276,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1296,7 +1298,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1317,7 +1319,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); @@ -1404,7 +1406,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); @@ -1435,7 +1437,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.UndeleteServiceRequest() ); @@ -1468,7 +1470,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1490,7 +1492,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1511,7 +1513,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); @@ -1544,7 +1546,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); @@ -1598,7 +1600,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); @@ -1629,7 +1631,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.SubmitConfigSourceRequest() ); @@ -1662,7 +1664,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1684,7 +1686,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1705,7 +1707,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); @@ -1738,7 +1740,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); @@ -1792,7 +1794,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); @@ -1823,7 +1825,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.CreateServiceRolloutRequest() ); @@ -1856,7 +1858,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1878,7 +1880,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1899,7 +1901,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); @@ -1924,7 +1926,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); @@ -1967,7 +1969,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); @@ -1984,7 +1986,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); @@ -2032,7 +2034,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); @@ -2071,7 +2073,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); @@ -2108,7 +2110,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServicesRequest() ); @@ -2138,7 +2140,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); @@ -2172,7 +2174,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); @@ -2221,7 +2223,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); @@ -2252,7 +2254,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); @@ -2303,7 +2305,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); @@ -2349,7 +2351,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); @@ -2392,7 +2394,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceConfigsRequest() ); @@ -2434,7 +2436,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); @@ -2474,7 +2476,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); @@ -2529,7 +2531,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); @@ -2560,7 +2562,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); @@ -2620,7 +2622,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); @@ -2669,7 +2671,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); @@ -2718,7 +2720,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.servicemanagement.v1.ListServiceRolloutsRequest() ); @@ -2759,7 +2761,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2789,7 +2791,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2833,7 +2835,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2865,7 +2867,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2895,7 +2897,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2939,7 +2941,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2971,7 +2973,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3004,7 +3006,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3048,7 +3050,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3083,7 +3085,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3162,7 +3164,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3242,7 +3244,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3338,8 +3340,7 @@ describe('v1.ServiceManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3358,7 +3359,7 @@ describe('v1.ServiceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3367,8 +3368,7 @@ describe('v1.ServiceManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-api-serviceusage/package.json b/packages/google-api-serviceusage/package.json index 9856e622abe..7ed5772faee 100644 --- a/packages/google-api-serviceusage/package.json +++ b/packages/google-api-serviceusage/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", 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 840e27704f7..c5773c522e9 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { 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 840e27704f7..c5773c522e9 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { 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 e919c865b38..7d623f54ed7 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { 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 f3b6d4b28f5..3122de4d4d1 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { 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 34beeecb4a8..c7ecf794842 100644 --- a/packages/google-api-serviceusage/src/v1/service_usage_client.ts +++ b/packages/google-api-serviceusage/src/v1/service_usage_client.ts @@ -554,7 +554,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -682,7 +684,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetServices request %j', request); const wrappedCallback: | Callback< @@ -824,7 +828,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1011,7 +1017,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1197,7 +1205,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1380,7 +1390,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.serviceusage.v1.IListServicesRequest, @@ -1454,7 +1466,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -1510,7 +1524,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -1612,7 +1628,7 @@ export class ServiceUsageClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; 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 dd2bf5e0dad..ae323b42d21 100644 --- a/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts +++ b/packages/google-api-serviceusage/src/v1beta1/service_usage_client.ts @@ -688,7 +688,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ServiceUsage-$GetService', 'GetService is deprecated and may be removed in a future version.', @@ -820,7 +822,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConsumerQuotaMetric request %j', request); const wrappedCallback: | Callback< @@ -950,7 +954,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConsumerQuotaLimit request %j', request); const wrappedCallback: | Callback< @@ -1095,7 +1101,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ServiceUsage-$EnableService', 'EnableService is deprecated and may be removed in a future version.', @@ -1288,7 +1296,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ServiceUsage-$DisableService', 'DisableService is deprecated and may be removed in a future version.', @@ -1492,7 +1502,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ServiceUsage-$BatchEnableServices', 'BatchEnableServices is deprecated and may be removed in a future version.', @@ -1690,7 +1702,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1875,7 +1889,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2054,7 +2070,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2237,7 +2255,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2423,7 +2443,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2608,7 +2630,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2787,7 +2811,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2970,7 +2996,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3145,7 +3173,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3324,7 +3354,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ServiceUsage-$ListServices', 'ListServices is deprecated and may be removed in a future version.', @@ -3405,7 +3437,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ServiceUsage-$ListServices', 'ListServices is deprecated and may be removed in a future version.', @@ -3468,7 +3502,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ServiceUsage-$ListServices', 'ListServices is deprecated and may be removed in a future version.', @@ -3587,7 +3623,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, @@ -3660,7 +3698,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listConsumerQuotaMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConsumerQuotaMetrics stream %j', request); return this.descriptors.page.listConsumerQuotaMetrics.createStream( this.innerApiCalls.listConsumerQuotaMetrics as GaxCall, @@ -3715,7 +3755,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listConsumerQuotaMetrics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConsumerQuotaMetrics iterate %j', request); return this.descriptors.page.listConsumerQuotaMetrics.asyncIterate( this.innerApiCalls['listConsumerQuotaMetrics'] as GaxCall, @@ -3822,7 +3864,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, @@ -3892,7 +3936,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listAdminOverrides']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdminOverrides stream %j', request); return this.descriptors.page.listAdminOverrides.createStream( this.innerApiCalls.listAdminOverrides as GaxCall, @@ -3944,7 +3990,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listAdminOverrides']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdminOverrides iterate %j', request); return this.descriptors.page.listAdminOverrides.asyncIterate( this.innerApiCalls['listAdminOverrides'] as GaxCall, @@ -4051,7 +4099,9 @@ export class ServiceUsageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, @@ -4121,7 +4171,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listConsumerOverrides']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConsumerOverrides stream %j', request); return this.descriptors.page.listConsumerOverrides.createStream( this.innerApiCalls.listConsumerOverrides as GaxCall, @@ -4173,7 +4225,9 @@ export class ServiceUsageClient { }); const defaultCallSettings = this._defaults['listConsumerOverrides']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConsumerOverrides iterate %j', request); return this.descriptors.page.listConsumerOverrides.asyncIterate( this.innerApiCalls['listConsumerOverrides'] as GaxCall, @@ -4275,7 +4329,7 @@ export class ServiceUsageClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; 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 1e350e2c5af..0d4c538b2b7 100644 --- a/packages/google-api-serviceusage/test/gapic_service_usage_v1.ts +++ b/packages/google-api-serviceusage/test/gapic_service_usage_v1.ts @@ -287,7 +287,9 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.serviceUsageStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.GetServiceRequest() ); @@ -377,7 +379,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.GetServiceRequest() ); @@ -424,7 +426,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.GetServiceRequest() ); @@ -455,7 +457,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.GetServiceRequest() ); @@ -476,7 +478,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchGetServicesRequest() ); @@ -507,7 +509,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchGetServicesRequest() ); @@ -554,7 +556,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchGetServicesRequest() ); @@ -585,7 +587,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchGetServicesRequest() ); @@ -606,7 +608,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.EnableServiceRequest() ); @@ -639,7 +641,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.EnableServiceRequest() ); @@ -693,7 +695,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.EnableServiceRequest() ); @@ -724,7 +726,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.EnableServiceRequest() ); @@ -757,7 +759,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -779,7 +781,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -800,7 +802,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.DisableServiceRequest() ); @@ -833,7 +835,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.DisableServiceRequest() ); @@ -887,7 +889,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.DisableServiceRequest() ); @@ -918,7 +920,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.DisableServiceRequest() ); @@ -951,7 +953,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -973,7 +975,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -994,7 +996,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchEnableServicesRequest() ); @@ -1027,7 +1029,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchEnableServicesRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchEnableServicesRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.BatchEnableServicesRequest() ); @@ -1145,7 +1147,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1167,7 +1169,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1188,7 +1190,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.ListServicesRequest() ); @@ -1221,7 +1223,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.ListServicesRequest() ); @@ -1270,7 +1272,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.ListServicesRequest() ); @@ -1301,7 +1303,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.ListServicesRequest() ); @@ -1355,7 +1357,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.ListServicesRequest() ); @@ -1406,7 +1408,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.ListServicesRequest() ); @@ -1449,7 +1451,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1.ListServicesRequest() ); @@ -1490,7 +1492,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1569,7 +1571,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1649,7 +1651,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1745,8 +1747,7 @@ describe('v1.ServiceUsageClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1765,7 +1766,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1774,8 +1775,7 @@ describe('v1.ServiceUsageClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1791,7 +1791,7 @@ describe('v1.ServiceUsageClient', () => { }); describe('Path templates', () => { - describe('folderService', () => { + describe('folderService', async () => { const fakePath = '/rendered/path/folderService'; const expectedParameters = { folder: 'folderValue', @@ -1801,7 +1801,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1840,7 +1840,7 @@ describe('v1.ServiceUsageClient', () => { }); }); - describe('organizationService', () => { + describe('organizationService', async () => { const fakePath = '/rendered/path/organizationService'; const expectedParameters = { organization: 'organizationValue', @@ -1850,7 +1850,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1902,7 +1902,7 @@ describe('v1.ServiceUsageClient', () => { }); }); - describe('projectService', () => { + describe('projectService', async () => { const fakePath = '/rendered/path/projectService'; const expectedParameters = { project: 'projectValue', @@ -1912,7 +1912,7 @@ describe('v1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectServicePathTemplate.render = sinon .stub() .returns(fakePath); 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 b80779da000..b0a67fd7a9c 100644 --- a/packages/google-api-serviceusage/test/gapic_service_usage_v1beta1.ts +++ b/packages/google-api-serviceusage/test/gapic_service_usage_v1beta1.ts @@ -287,7 +287,9 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.serviceUsageStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetServiceRequest() ); @@ -380,7 +382,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetServiceRequest() ); @@ -429,7 +431,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetServiceRequest() ); @@ -462,7 +464,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetServiceRequest() ); @@ -484,7 +486,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaMetricRequest() ); @@ -516,7 +518,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaMetricRequest() ); @@ -563,7 +565,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaMetricRequest() ); @@ -597,7 +599,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaMetricRequest() ); @@ -621,7 +623,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaLimitRequest() ); @@ -653,7 +655,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaLimitRequest() ); @@ -700,7 +702,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaLimitRequest() ); @@ -734,7 +736,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GetConsumerQuotaLimitRequest() ); @@ -759,7 +761,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.EnableServiceRequest() ); @@ -794,7 +796,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.EnableServiceRequest() ); @@ -850,7 +852,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.EnableServiceRequest() ); @@ -883,7 +885,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.EnableServiceRequest() ); @@ -918,7 +920,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -942,7 +944,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -965,7 +967,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DisableServiceRequest() ); @@ -1000,7 +1002,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DisableServiceRequest() ); @@ -1056,7 +1058,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DisableServiceRequest() ); @@ -1089,7 +1091,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DisableServiceRequest() ); @@ -1124,7 +1126,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1148,7 +1150,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1171,7 +1173,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.BatchEnableServicesRequest() ); @@ -1206,7 +1208,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.BatchEnableServicesRequest() ); @@ -1262,7 +1264,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.BatchEnableServicesRequest() ); @@ -1295,7 +1297,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.BatchEnableServicesRequest() ); @@ -1330,7 +1332,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1354,7 +1356,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1376,7 +1378,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateAdminOverrideRequest() ); @@ -1409,7 +1411,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateAdminOverrideRequest() ); @@ -1463,7 +1465,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateAdminOverrideRequest() ); @@ -1494,7 +1496,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateAdminOverrideRequest() ); @@ -1527,7 +1529,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1549,7 +1551,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1570,7 +1572,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateAdminOverrideRequest() ); @@ -1603,7 +1605,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateAdminOverrideRequest() ); @@ -1657,7 +1659,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateAdminOverrideRequest() ); @@ -1688,7 +1690,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateAdminOverrideRequest() ); @@ -1721,7 +1723,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1743,7 +1745,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1764,7 +1766,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteAdminOverrideRequest() ); @@ -1797,7 +1799,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteAdminOverrideRequest() ); @@ -1851,7 +1853,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteAdminOverrideRequest() ); @@ -1882,7 +1884,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteAdminOverrideRequest() ); @@ -1915,7 +1917,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1937,7 +1939,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1958,7 +1960,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportAdminOverridesRequest() ); @@ -1991,7 +1993,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportAdminOverridesRequest() ); @@ -2045,7 +2047,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportAdminOverridesRequest() ); @@ -2076,7 +2078,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportAdminOverridesRequest() ); @@ -2109,7 +2111,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2131,7 +2133,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2152,7 +2154,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateConsumerOverrideRequest() ); @@ -2185,7 +2187,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateConsumerOverrideRequest() ); @@ -2239,7 +2241,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateConsumerOverrideRequest() ); @@ -2273,7 +2275,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.CreateConsumerOverrideRequest() ); @@ -2306,7 +2308,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2328,7 +2330,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2349,7 +2351,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateConsumerOverrideRequest() ); @@ -2382,7 +2384,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateConsumerOverrideRequest() ); @@ -2436,7 +2438,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateConsumerOverrideRequest() ); @@ -2470,7 +2472,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.UpdateConsumerOverrideRequest() ); @@ -2503,7 +2505,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2525,7 +2527,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2546,7 +2548,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteConsumerOverrideRequest() ); @@ -2579,7 +2581,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteConsumerOverrideRequest() ); @@ -2633,7 +2635,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteConsumerOverrideRequest() ); @@ -2667,7 +2669,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.DeleteConsumerOverrideRequest() ); @@ -2700,7 +2702,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2722,7 +2724,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2743,7 +2745,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesRequest() ); @@ -2776,7 +2778,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesRequest() ); @@ -2830,7 +2832,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesRequest() ); @@ -2864,7 +2866,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesRequest() ); @@ -2897,7 +2899,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2920,7 +2922,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2941,7 +2943,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GenerateServiceIdentityRequest() ); @@ -2974,7 +2976,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GenerateServiceIdentityRequest() ); @@ -3028,7 +3030,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GenerateServiceIdentityRequest() ); @@ -3062,7 +3064,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.GenerateServiceIdentityRequest() ); @@ -3095,7 +3097,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3118,7 +3120,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3140,7 +3142,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListServicesRequest() ); @@ -3181,7 +3183,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListServicesRequest() ); @@ -3238,7 +3240,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListServicesRequest() ); @@ -3271,7 +3273,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListServicesRequest() ); @@ -3333,7 +3335,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListServicesRequest() ); @@ -3386,7 +3388,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListServicesRequest() ); @@ -3437,7 +3439,7 @@ describe('v1beta1.ServiceUsageClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListServicesRequest() ); @@ -3480,7 +3482,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerQuotaMetricsRequest() ); @@ -3520,7 +3522,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerQuotaMetricsRequest() ); @@ -3577,7 +3579,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerQuotaMetricsRequest() ); @@ -3611,7 +3613,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerQuotaMetricsRequest() ); @@ -3680,7 +3682,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerQuotaMetricsRequest() ); @@ -3738,7 +3740,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerQuotaMetricsRequest() ); @@ -3792,7 +3794,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerQuotaMetricsRequest() ); @@ -3839,7 +3841,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListAdminOverridesRequest() ); @@ -3879,7 +3881,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListAdminOverridesRequest() ); @@ -3936,7 +3938,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListAdminOverridesRequest() ); @@ -3967,7 +3969,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListAdminOverridesRequest() ); @@ -4028,7 +4030,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListAdminOverridesRequest() ); @@ -4078,7 +4080,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListAdminOverridesRequest() ); @@ -4128,7 +4130,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListAdminOverridesRequest() ); @@ -4171,7 +4173,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerOverridesRequest() ); @@ -4211,7 +4213,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerOverridesRequest() ); @@ -4268,7 +4270,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerOverridesRequest() ); @@ -4302,7 +4304,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerOverridesRequest() ); @@ -4369,7 +4371,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerOverridesRequest() ); @@ -4425,7 +4427,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerOverridesRequest() ); @@ -4479,7 +4481,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.api.serviceusage.v1beta1.ListConsumerOverridesRequest() ); @@ -4525,7 +4527,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4604,7 +4606,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4684,7 +4686,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4780,8 +4782,7 @@ describe('v1beta1.ServiceUsageClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4800,7 +4801,7 @@ describe('v1beta1.ServiceUsageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4809,8 +4810,7 @@ describe('v1beta1.ServiceUsageClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-appengine/package.json b/packages/google-appengine/package.json index 2c42c221cba..71009b405f0 100644 --- a/packages/google-appengine/package.json +++ b/packages/google-appengine/package.json @@ -52,7 +52,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", 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 6b90df64bc2..c32a43cb9cd 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appengine", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { 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 6b90df64bc2..c32a43cb9cd 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appengine", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-appengine/src/v1/applications_client.ts b/packages/google-appengine/src/v1/applications_client.ts index 98825a617ad..96b4b4b408e 100644 --- a/packages/google-appengine/src/v1/applications_client.ts +++ b/packages/google-appengine/src/v1/applications_client.ts @@ -528,7 +528,9 @@ export class ApplicationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApplication request %j', request); const wrappedCallback: | Callback< @@ -657,7 +659,9 @@ export class ApplicationsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -833,7 +837,9 @@ export class ApplicationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1009,7 +1015,9 @@ export class ApplicationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-appengine/src/v1/authorized_certificates_client.ts b/packages/google-appengine/src/v1/authorized_certificates_client.ts index 4642696986f..fea4b7987a8 100644 --- a/packages/google-appengine/src/v1/authorized_certificates_client.ts +++ b/packages/google-appengine/src/v1/authorized_certificates_client.ts @@ -483,7 +483,9 @@ export class AuthorizedCertificatesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAuthorizedCertificate request %j', request); const wrappedCallback: | Callback< @@ -610,7 +612,9 @@ export class AuthorizedCertificatesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAuthorizedCertificate request %j', request); const wrappedCallback: | Callback< @@ -746,7 +750,9 @@ export class AuthorizedCertificatesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAuthorizedCertificate request %j', request); const wrappedCallback: | Callback< @@ -872,7 +878,9 @@ export class AuthorizedCertificatesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAuthorizedCertificate request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1009,9 @@ export class AuthorizedCertificatesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.appengine.v1.IListAuthorizedCertificatesRequest, @@ -1068,7 +1078,9 @@ export class AuthorizedCertificatesClient { }); const defaultCallSettings = this._defaults['listAuthorizedCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizedCertificates stream %j', request); return this.descriptors.page.listAuthorizedCertificates.createStream( this.innerApiCalls.listAuthorizedCertificates as GaxCall, @@ -1117,7 +1129,9 @@ export class AuthorizedCertificatesClient { }); const defaultCallSettings = this._defaults['listAuthorizedCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizedCertificates iterate %j', request); return this.descriptors.page.listAuthorizedCertificates.asyncIterate( this.innerApiCalls['listAuthorizedCertificates'] as GaxCall, diff --git a/packages/google-appengine/src/v1/authorized_domains_client.ts b/packages/google-appengine/src/v1/authorized_domains_client.ts index b947949b3f8..814a60a711c 100644 --- a/packages/google-appengine/src/v1/authorized_domains_client.ts +++ b/packages/google-appengine/src/v1/authorized_domains_client.ts @@ -482,7 +482,9 @@ export class AuthorizedDomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.appengine.v1.IListAuthorizedDomainsRequest, @@ -547,7 +549,9 @@ export class AuthorizedDomainsClient { }); const defaultCallSettings = this._defaults['listAuthorizedDomains']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizedDomains stream %j', request); return this.descriptors.page.listAuthorizedDomains.createStream( this.innerApiCalls.listAuthorizedDomains as GaxCall, @@ -594,7 +598,9 @@ export class AuthorizedDomainsClient { }); const defaultCallSettings = this._defaults['listAuthorizedDomains']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizedDomains iterate %j', request); return this.descriptors.page.listAuthorizedDomains.asyncIterate( this.innerApiCalls['listAuthorizedDomains'] as GaxCall, diff --git a/packages/google-appengine/src/v1/domain_mappings_client.ts b/packages/google-appengine/src/v1/domain_mappings_client.ts index a3d9d06e08c..29ee4a21322 100644 --- a/packages/google-appengine/src/v1/domain_mappings_client.ts +++ b/packages/google-appengine/src/v1/domain_mappings_client.ts @@ -548,7 +548,9 @@ export class DomainMappingsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDomainMapping request %j', request); const wrappedCallback: | Callback< @@ -684,7 +686,9 @@ export class DomainMappingsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -860,7 +864,9 @@ export class DomainMappingsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1030,7 +1036,9 @@ export class DomainMappingsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1186,7 +1194,9 @@ export class DomainMappingsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.appengine.v1.IListDomainMappingsRequest, @@ -1251,7 +1261,9 @@ export class DomainMappingsClient { }); const defaultCallSettings = this._defaults['listDomainMappings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDomainMappings stream %j', request); return this.descriptors.page.listDomainMappings.createStream( this.innerApiCalls.listDomainMappings as GaxCall, @@ -1298,7 +1310,9 @@ export class DomainMappingsClient { }); const defaultCallSettings = this._defaults['listDomainMappings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDomainMappings iterate %j', request); return this.descriptors.page.listDomainMappings.asyncIterate( this.innerApiCalls['listDomainMappings'] as GaxCall, diff --git a/packages/google-appengine/src/v1/firewall_client.ts b/packages/google-appengine/src/v1/firewall_client.ts index e61ec4d7851..ac4359dc868 100644 --- a/packages/google-appengine/src/v1/firewall_client.ts +++ b/packages/google-appengine/src/v1/firewall_client.ts @@ -495,7 +495,9 @@ export class FirewallClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateIngressRules request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class FirewallClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createIngressRule request %j', request); const wrappedCallback: | Callback< @@ -729,7 +733,9 @@ export class FirewallClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIngressRule request %j', request); const wrappedCallback: | Callback< @@ -842,7 +848,9 @@ export class FirewallClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIngressRule request %j', request); const wrappedCallback: | Callback< @@ -953,7 +961,9 @@ export class FirewallClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteIngressRule request %j', request); const wrappedCallback: | Callback< @@ -1076,7 +1086,9 @@ export class FirewallClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.appengine.v1.IListIngressRulesRequest, @@ -1146,7 +1158,9 @@ export class FirewallClient { }); const defaultCallSettings = this._defaults['listIngressRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIngressRules stream %j', request); return this.descriptors.page.listIngressRules.createStream( this.innerApiCalls.listIngressRules as GaxCall, @@ -1198,7 +1212,9 @@ export class FirewallClient { }); const defaultCallSettings = this._defaults['listIngressRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIngressRules iterate %j', request); return this.descriptors.page.listIngressRules.asyncIterate( this.innerApiCalls['listIngressRules'] as GaxCall, diff --git a/packages/google-appengine/src/v1/instances_client.ts b/packages/google-appengine/src/v1/instances_client.ts index 41cc8f70b44..b0123869ef7 100644 --- a/packages/google-appengine/src/v1/instances_client.ts +++ b/packages/google-appengine/src/v1/instances_client.ts @@ -534,7 +534,9 @@ export class InstancesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -673,7 +675,9 @@ export class InstancesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -856,7 +860,9 @@ export class InstancesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1014,7 +1020,9 @@ export class InstancesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.appengine.v1.IListInstancesRequest, @@ -1078,7 +1086,9 @@ export class InstancesClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1126,7 +1136,9 @@ export class InstancesClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, diff --git a/packages/google-appengine/src/v1/services_client.ts b/packages/google-appengine/src/v1/services_client.ts index 6d90541d0ba..4774661e6bc 100644 --- a/packages/google-appengine/src/v1/services_client.ts +++ b/packages/google-appengine/src/v1/services_client.ts @@ -533,7 +533,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -678,7 +680,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -845,7 +849,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -999,7 +1005,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.appengine.v1.IListServicesRequest, @@ -1062,7 +1070,9 @@ export class ServicesClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -1109,7 +1119,9 @@ export class ServicesClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, diff --git a/packages/google-appengine/src/v1/versions_client.ts b/packages/google-appengine/src/v1/versions_client.ts index 81b0f13d76c..4aa09af6b45 100644 --- a/packages/google-appengine/src/v1/versions_client.ts +++ b/packages/google-appengine/src/v1/versions_client.ts @@ -550,7 +550,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -680,7 +682,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -888,7 +892,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1056,7 +1062,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1213,7 +1221,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.appengine.v1.IListVersionsRequest, @@ -1279,7 +1289,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -1329,7 +1341,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, diff --git a/packages/google-appengine/test/gapic_applications_v1.ts b/packages/google-appengine/test/gapic_applications_v1.ts index 10432f2e838..5974f27143e 100644 --- a/packages/google-appengine/test/gapic_applications_v1.ts +++ b/packages/google-appengine/test/gapic_applications_v1.ts @@ -221,7 +221,9 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.applicationsStub); client.close().then(() => { done(); @@ -280,7 +282,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetApplicationRequest() ); @@ -311,7 +313,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetApplicationRequest() ); @@ -358,7 +360,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetApplicationRequest() ); @@ -389,7 +391,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetApplicationRequest() ); @@ -410,7 +412,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateApplicationRequest() ); @@ -429,7 +431,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateApplicationRequest() ); @@ -469,7 +471,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateApplicationRequest() ); @@ -486,7 +488,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateApplicationRequest() ); @@ -505,7 +507,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -527,7 +529,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -548,7 +550,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateApplicationRequest() ); @@ -581,7 +583,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateApplicationRequest() ); @@ -635,7 +637,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateApplicationRequest() ); @@ -666,7 +668,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateApplicationRequest() ); @@ -699,7 +701,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -721,7 +723,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -742,7 +744,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.RepairApplicationRequest() ); @@ -775,7 +777,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.RepairApplicationRequest() ); @@ -829,7 +831,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.RepairApplicationRequest() ); @@ -860,7 +862,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.RepairApplicationRequest() ); @@ -893,7 +895,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -915,7 +917,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -931,7 +933,7 @@ describe('v1.ApplicationsClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -943,7 +945,7 @@ describe('v1.ApplicationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-appengine/test/gapic_authorized_certificates_v1.ts b/packages/google-appengine/test/gapic_authorized_certificates_v1.ts index 27d65c3b186..ce6b95a2917 100644 --- a/packages/google-appengine/test/gapic_authorized_certificates_v1.ts +++ b/packages/google-appengine/test/gapic_authorized_certificates_v1.ts @@ -265,7 +265,9 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.authorizedCertificatesStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetAuthorizedCertificateRequest() ); @@ -361,7 +363,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetAuthorizedCertificateRequest() ); @@ -409,7 +411,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetAuthorizedCertificateRequest() ); @@ -444,7 +446,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetAuthorizedCertificateRequest() ); @@ -469,7 +471,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateAuthorizedCertificateRequest() ); @@ -502,7 +504,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateAuthorizedCertificateRequest() ); @@ -550,7 +552,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateAuthorizedCertificateRequest() ); @@ -585,7 +587,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateAuthorizedCertificateRequest() ); @@ -610,7 +612,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateAuthorizedCertificateRequest() ); @@ -643,7 +645,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateAuthorizedCertificateRequest() ); @@ -691,7 +693,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateAuthorizedCertificateRequest() ); @@ -726,7 +728,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateAuthorizedCertificateRequest() ); @@ -751,7 +753,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteAuthorizedCertificateRequest() ); @@ -784,7 +786,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteAuthorizedCertificateRequest() ); @@ -832,7 +834,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteAuthorizedCertificateRequest() ); @@ -867,7 +869,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteAuthorizedCertificateRequest() ); @@ -892,7 +894,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedCertificatesRequest() ); @@ -933,7 +935,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedCertificatesRequest() ); @@ -989,7 +991,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedCertificatesRequest() ); @@ -1024,7 +1026,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedCertificatesRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedCertificatesRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedCertificatesRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedCertificatesRequest() ); @@ -1245,7 +1247,7 @@ describe('v1.AuthorizedCertificatesClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -1258,7 +1260,7 @@ describe('v1.AuthorizedCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-appengine/test/gapic_authorized_domains_v1.ts b/packages/google-appengine/test/gapic_authorized_domains_v1.ts index 56c630ba87b..08765a174f5 100644 --- a/packages/google-appengine/test/gapic_authorized_domains_v1.ts +++ b/packages/google-appengine/test/gapic_authorized_domains_v1.ts @@ -253,7 +253,9 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.authorizedDomainsStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedDomainsRequest() ); @@ -352,7 +354,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedDomainsRequest() ); @@ -407,7 +409,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedDomainsRequest() ); @@ -441,7 +443,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedDomainsRequest() ); @@ -507,7 +509,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedDomainsRequest() ); @@ -562,7 +564,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedDomainsRequest() ); @@ -615,7 +617,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListAuthorizedDomainsRequest() ); @@ -656,7 +658,7 @@ describe('v1.AuthorizedDomainsClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -668,7 +670,7 @@ describe('v1.AuthorizedDomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-appengine/test/gapic_domain_mappings_v1.ts b/packages/google-appengine/test/gapic_domain_mappings_v1.ts index 0ad5d7c3abd..86f57a3df1c 100644 --- a/packages/google-appengine/test/gapic_domain_mappings_v1.ts +++ b/packages/google-appengine/test/gapic_domain_mappings_v1.ts @@ -284,7 +284,9 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.domainMappingsStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetDomainMappingRequest() ); @@ -374,7 +376,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetDomainMappingRequest() ); @@ -421,7 +423,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetDomainMappingRequest() ); @@ -452,7 +454,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetDomainMappingRequest() ); @@ -473,7 +475,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateDomainMappingRequest() ); @@ -506,7 +508,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateDomainMappingRequest() ); @@ -560,7 +562,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateDomainMappingRequest() ); @@ -591,7 +593,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateDomainMappingRequest() ); @@ -624,7 +626,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -646,7 +648,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -667,7 +669,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateDomainMappingRequest() ); @@ -700,7 +702,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateDomainMappingRequest() ); @@ -754,7 +756,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateDomainMappingRequest() ); @@ -785,7 +787,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateDomainMappingRequest() ); @@ -818,7 +820,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -840,7 +842,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -861,7 +863,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteDomainMappingRequest() ); @@ -894,7 +896,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteDomainMappingRequest() ); @@ -948,7 +950,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteDomainMappingRequest() ); @@ -979,7 +981,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteDomainMappingRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1034,7 +1036,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1055,7 +1057,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListDomainMappingsRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListDomainMappingsRequest() ); @@ -1138,7 +1140,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListDomainMappingsRequest() ); @@ -1169,7 +1171,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListDomainMappingsRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListDomainMappingsRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListDomainMappingsRequest() ); @@ -1315,7 +1317,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListDomainMappingsRequest() ); @@ -1352,7 +1354,7 @@ describe('v1.DomainMappingsClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -1364,7 +1366,7 @@ describe('v1.DomainMappingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-appengine/test/gapic_firewall_v1.ts b/packages/google-appengine/test/gapic_firewall_v1.ts index f6f1f816bb8..fc77e90d31b 100644 --- a/packages/google-appengine/test/gapic_firewall_v1.ts +++ b/packages/google-appengine/test/gapic_firewall_v1.ts @@ -250,7 +250,9 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.firewallStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.BatchUpdateIngressRulesRequest() ); @@ -341,7 +343,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.BatchUpdateIngressRulesRequest() ); @@ -388,7 +390,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.BatchUpdateIngressRulesRequest() ); @@ -422,7 +424,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.BatchUpdateIngressRulesRequest() ); @@ -446,7 +448,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateIngressRuleRequest() ); @@ -477,7 +479,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateIngressRuleRequest() ); @@ -524,7 +526,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateIngressRuleRequest() ); @@ -555,7 +557,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateIngressRuleRequest() ); @@ -576,7 +578,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetIngressRuleRequest() ); @@ -607,7 +609,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetIngressRuleRequest() ); @@ -654,7 +656,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetIngressRuleRequest() ); @@ -685,7 +687,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetIngressRuleRequest() ); @@ -706,7 +708,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateIngressRuleRequest() ); @@ -737,7 +739,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateIngressRuleRequest() ); @@ -784,7 +786,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateIngressRuleRequest() ); @@ -815,7 +817,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateIngressRuleRequest() ); @@ -836,7 +838,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteIngressRuleRequest() ); @@ -867,7 +869,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteIngressRuleRequest() ); @@ -914,7 +916,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteIngressRuleRequest() ); @@ -945,7 +947,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteIngressRuleRequest() ); @@ -966,7 +968,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListIngressRulesRequest() ); @@ -999,7 +1001,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListIngressRulesRequest() ); @@ -1048,7 +1050,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListIngressRulesRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListIngressRulesRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListIngressRulesRequest() ); @@ -1182,7 +1184,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListIngressRulesRequest() ); @@ -1225,7 +1227,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListIngressRulesRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.FirewallClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -1274,7 +1276,7 @@ describe('v1.FirewallClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-appengine/test/gapic_instances_v1.ts b/packages/google-appengine/test/gapic_instances_v1.ts index 6a7c6bfcb2b..a259e13a726 100644 --- a/packages/google-appengine/test/gapic_instances_v1.ts +++ b/packages/google-appengine/test/gapic_instances_v1.ts @@ -282,7 +282,9 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instancesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetInstanceRequest() ); @@ -372,7 +374,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetInstanceRequest() ); @@ -419,7 +421,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetInstanceRequest() ); @@ -450,7 +452,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetInstanceRequest() ); @@ -471,7 +473,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteInstanceRequest() ); @@ -504,7 +506,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteInstanceRequest() ); @@ -558,7 +560,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteInstanceRequest() ); @@ -589,7 +591,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteInstanceRequest() ); @@ -622,7 +624,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DebugInstanceRequest() ); @@ -698,7 +700,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DebugInstanceRequest() ); @@ -752,7 +754,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DebugInstanceRequest() ); @@ -783,7 +785,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DebugInstanceRequest() ); @@ -816,7 +818,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListInstancesRequest() ); @@ -892,7 +894,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListInstancesRequest() ); @@ -941,7 +943,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListInstancesRequest() ); @@ -972,7 +974,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListInstancesRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListInstancesRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListInstancesRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListInstancesRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.InstancesClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -1161,7 +1163,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-appengine/test/gapic_services_v1.ts b/packages/google-appengine/test/gapic_services_v1.ts index 6845de5c292..9719a0534c0 100644 --- a/packages/google-appengine/test/gapic_services_v1.ts +++ b/packages/google-appengine/test/gapic_services_v1.ts @@ -282,7 +282,9 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.servicesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetServiceRequest() ); @@ -372,7 +374,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetServiceRequest() ); @@ -419,7 +421,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetServiceRequest() ); @@ -450,7 +452,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetServiceRequest() ); @@ -471,7 +473,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateServiceRequest() ); @@ -504,7 +506,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateServiceRequest() ); @@ -558,7 +560,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateServiceRequest() ); @@ -589,7 +591,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateServiceRequest() ); @@ -622,7 +624,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteServiceRequest() ); @@ -698,7 +700,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteServiceRequest() ); @@ -752,7 +754,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteServiceRequest() ); @@ -783,7 +785,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteServiceRequest() ); @@ -816,7 +818,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListServicesRequest() ); @@ -892,7 +894,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListServicesRequest() ); @@ -941,7 +943,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListServicesRequest() ); @@ -972,7 +974,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListServicesRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListServicesRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListServicesRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListServicesRequest() ); @@ -1151,7 +1153,7 @@ describe('v1.ServicesClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -1163,7 +1165,7 @@ describe('v1.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-appengine/test/gapic_versions_v1.ts b/packages/google-appengine/test/gapic_versions_v1.ts index 5614ffad238..c5672d639e9 100644 --- a/packages/google-appengine/test/gapic_versions_v1.ts +++ b/packages/google-appengine/test/gapic_versions_v1.ts @@ -282,7 +282,9 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.versionsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetVersionRequest() ); @@ -372,7 +374,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetVersionRequest() ); @@ -419,7 +421,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetVersionRequest() ); @@ -450,7 +452,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.GetVersionRequest() ); @@ -471,7 +473,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateVersionRequest() ); @@ -504,7 +506,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateVersionRequest() ); @@ -558,7 +560,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateVersionRequest() ); @@ -589,7 +591,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.CreateVersionRequest() ); @@ -622,7 +624,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateVersionRequest() ); @@ -698,7 +700,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateVersionRequest() ); @@ -752,7 +754,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateVersionRequest() ); @@ -783,7 +785,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.UpdateVersionRequest() ); @@ -816,7 +818,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteVersionRequest() ); @@ -892,7 +894,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteVersionRequest() ); @@ -946,7 +948,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteVersionRequest() ); @@ -977,7 +979,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.DeleteVersionRequest() ); @@ -1010,7 +1012,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1032,7 +1034,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1053,7 +1055,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListVersionsRequest() ); @@ -1086,7 +1088,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListVersionsRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListVersionsRequest() ); @@ -1166,7 +1168,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListVersionsRequest() ); @@ -1217,7 +1219,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListVersionsRequest() ); @@ -1265,7 +1267,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListVersionsRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.appengine.v1.ListVersionsRequest() ); @@ -1345,7 +1347,7 @@ describe('v1.VersionsClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { app: 'appValue', @@ -1357,7 +1359,7 @@ describe('v1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-apps-meet/package.json b/packages/google-apps-meet/package.json index c33b6a36d5b..16e0f22857a 100644 --- a/packages/google-apps-meet/package.json +++ b/packages/google-apps-meet/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json b/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json index a71e67adc66..1483f180638 100644 --- a/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json +++ b/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-meet", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json b/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json index 69375f97d28..b1cc156ebff 100644 --- a/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json +++ b/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-meet", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-apps-meet/src/v2/conference_records_service_client.ts b/packages/google-apps-meet/src/v2/conference_records_service_client.ts index 96bc8df6fb6..f623b200403 100644 --- a/packages/google-apps-meet/src/v2/conference_records_service_client.ts +++ b/packages/google-apps-meet/src/v2/conference_records_service_client.ts @@ -520,7 +520,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConferenceRecord request %j', request); const wrappedCallback: | Callback< @@ -628,7 +630,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParticipant request %j', request); const wrappedCallback: | Callback< @@ -742,7 +746,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParticipantSession request %j', request); const wrappedCallback: | Callback< @@ -850,7 +856,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecording request %j', request); const wrappedCallback: | Callback< @@ -956,7 +964,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTranscript request %j', request); const wrappedCallback: | Callback< @@ -1068,7 +1078,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTranscriptEntry request %j', request); const wrappedCallback: | Callback< @@ -1207,7 +1219,9 @@ export class ConferenceRecordsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2.IListConferenceRecordsRequest, @@ -1286,7 +1300,9 @@ export class ConferenceRecordsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listConferenceRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConferenceRecords stream %j', request); return this.descriptors.page.listConferenceRecords.createStream( this.innerApiCalls.listConferenceRecords as GaxCall, @@ -1347,7 +1363,9 @@ export class ConferenceRecordsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listConferenceRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConferenceRecords iterate %j', request); return this.descriptors.page.listConferenceRecords.asyncIterate( this.innerApiCalls['listConferenceRecords'] as GaxCall, @@ -1461,7 +1479,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2.IListParticipantsRequest, @@ -1540,7 +1560,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants stream %j', request); return this.descriptors.page.listParticipants.createStream( this.innerApiCalls.listParticipants as GaxCall, @@ -1601,7 +1623,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants iterate %j', request); return this.descriptors.page.listParticipants.asyncIterate( this.innerApiCalls['listParticipants'] as GaxCall, @@ -1721,7 +1745,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2.IListParticipantSessionsRequest, @@ -1800,7 +1826,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipantSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipantSessions stream %j', request); return this.descriptors.page.listParticipantSessions.createStream( this.innerApiCalls.listParticipantSessions as GaxCall, @@ -1861,7 +1889,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipantSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipantSessions iterate %j', request); return this.descriptors.page.listParticipantSessions.asyncIterate( this.innerApiCalls['listParticipantSessions'] as GaxCall, @@ -1960,7 +1990,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2.IListRecordingsRequest, @@ -2027,7 +2059,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listRecordings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecordings stream %j', request); return this.descriptors.page.listRecordings.createStream( this.innerApiCalls.listRecordings as GaxCall, @@ -2078,7 +2112,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listRecordings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecordings iterate %j', request); return this.descriptors.page.listRecordings.asyncIterate( this.innerApiCalls['listRecordings'] as GaxCall, @@ -2179,7 +2215,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2.IListTranscriptsRequest, @@ -2248,7 +2286,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscripts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscripts stream %j', request); return this.descriptors.page.listTranscripts.createStream( this.innerApiCalls.listTranscripts as GaxCall, @@ -2299,7 +2339,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscripts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscripts iterate %j', request); return this.descriptors.page.listTranscripts.asyncIterate( this.innerApiCalls['listTranscripts'] as GaxCall, @@ -2411,7 +2453,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2.IListTranscriptEntriesRequest, @@ -2481,7 +2525,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscriptEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscriptEntries stream %j', request); return this.descriptors.page.listTranscriptEntries.createStream( this.innerApiCalls.listTranscriptEntries as GaxCall, @@ -2533,7 +2579,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscriptEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscriptEntries iterate %j', request); return this.descriptors.page.listTranscriptEntries.asyncIterate( this.innerApiCalls['listTranscriptEntries'] as GaxCall, diff --git a/packages/google-apps-meet/src/v2/spaces_service_client.ts b/packages/google-apps-meet/src/v2/spaces_service_client.ts index 46ac3992a2f..ecdcde917c5 100644 --- a/packages/google-apps-meet/src/v2/spaces_service_client.ts +++ b/packages/google-apps-meet/src/v2/spaces_service_client.ts @@ -469,7 +469,9 @@ export class SpacesServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSpace request %j', request); const wrappedCallback: | Callback< @@ -596,7 +598,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpace request %j', request); const wrappedCallback: | Callback< @@ -712,7 +716,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ 'space.name': request.space!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSpace request %j', request); const wrappedCallback: | Callback< @@ -831,7 +837,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('endActiveConference request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-apps-meet/src/v2beta/conference_records_service_client.ts b/packages/google-apps-meet/src/v2beta/conference_records_service_client.ts index 058a17d0a16..8221487a454 100644 --- a/packages/google-apps-meet/src/v2beta/conference_records_service_client.ts +++ b/packages/google-apps-meet/src/v2beta/conference_records_service_client.ts @@ -530,7 +530,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConferenceRecord request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParticipant request %j', request); const wrappedCallback: | Callback< @@ -759,7 +763,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParticipantSession request %j', request); const wrappedCallback: | Callback< @@ -872,7 +878,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecording request %j', request); const wrappedCallback: | Callback< @@ -982,7 +990,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTranscript request %j', request); const wrappedCallback: | Callback< @@ -1102,7 +1112,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTranscriptEntry request %j', request); const wrappedCallback: | Callback< @@ -1241,7 +1253,9 @@ export class ConferenceRecordsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2beta.IListConferenceRecordsRequest, @@ -1320,7 +1334,9 @@ export class ConferenceRecordsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listConferenceRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConferenceRecords stream %j', request); return this.descriptors.page.listConferenceRecords.createStream( this.innerApiCalls.listConferenceRecords as GaxCall, @@ -1381,7 +1397,9 @@ export class ConferenceRecordsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listConferenceRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConferenceRecords iterate %j', request); return this.descriptors.page.listConferenceRecords.asyncIterate( this.innerApiCalls['listConferenceRecords'] as GaxCall, @@ -1501,7 +1519,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2beta.IListParticipantsRequest, @@ -1580,7 +1600,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants stream %j', request); return this.descriptors.page.listParticipants.createStream( this.innerApiCalls.listParticipants as GaxCall, @@ -1641,7 +1663,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants iterate %j', request); return this.descriptors.page.listParticipants.asyncIterate( this.innerApiCalls['listParticipants'] as GaxCall, @@ -1761,7 +1785,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2beta.IListParticipantSessionsRequest, @@ -1840,7 +1866,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipantSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipantSessions stream %j', request); return this.descriptors.page.listParticipantSessions.createStream( this.innerApiCalls.listParticipantSessions as GaxCall, @@ -1901,7 +1929,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listParticipantSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipantSessions iterate %j', request); return this.descriptors.page.listParticipantSessions.asyncIterate( this.innerApiCalls['listParticipantSessions'] as GaxCall, @@ -2002,7 +2032,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2beta.IListRecordingsRequest, @@ -2071,7 +2103,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listRecordings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecordings stream %j', request); return this.descriptors.page.listRecordings.createStream( this.innerApiCalls.listRecordings as GaxCall, @@ -2122,7 +2156,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listRecordings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecordings iterate %j', request); return this.descriptors.page.listRecordings.asyncIterate( this.innerApiCalls['listRecordings'] as GaxCall, @@ -2229,7 +2265,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2beta.IListTranscriptsRequest, @@ -2298,7 +2336,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscripts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscripts stream %j', request); return this.descriptors.page.listTranscripts.createStream( this.innerApiCalls.listTranscripts as GaxCall, @@ -2349,7 +2389,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscripts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscripts iterate %j', request); return this.descriptors.page.listTranscripts.asyncIterate( this.innerApiCalls['listTranscripts'] as GaxCall, @@ -2461,7 +2503,9 @@ export class ConferenceRecordsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2beta.IListTranscriptEntriesRequest, @@ -2531,7 +2575,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscriptEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscriptEntries stream %j', request); return this.descriptors.page.listTranscriptEntries.createStream( this.innerApiCalls.listTranscriptEntries as GaxCall, @@ -2583,7 +2629,9 @@ export class ConferenceRecordsServiceClient { }); const defaultCallSettings = this._defaults['listTranscriptEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTranscriptEntries iterate %j', request); return this.descriptors.page.listTranscriptEntries.asyncIterate( this.innerApiCalls['listTranscriptEntries'] as GaxCall, diff --git a/packages/google-apps-meet/src/v2beta/spaces_service_client.ts b/packages/google-apps-meet/src/v2beta/spaces_service_client.ts index eb1e09dbfc5..1dedb82ede9 100644 --- a/packages/google-apps-meet/src/v2beta/spaces_service_client.ts +++ b/packages/google-apps-meet/src/v2beta/spaces_service_client.ts @@ -493,7 +493,9 @@ export class SpacesServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSpace request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpace request %j', request); const wrappedCallback: | Callback< @@ -736,7 +740,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ 'space.name': request.space!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSpace request %j', request); const wrappedCallback: | Callback< @@ -874,7 +880,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('connectActiveConference request %j', request); const wrappedCallback: | Callback< @@ -1004,7 +1012,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('endActiveConference request %j', request); const wrappedCallback: | Callback< @@ -1125,7 +1135,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMember request %j', request); const wrappedCallback: | Callback< @@ -1239,7 +1251,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMember request %j', request); const wrappedCallback: | Callback< @@ -1348,7 +1362,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMember request %j', request); const wrappedCallback: | Callback< @@ -1475,7 +1491,9 @@ export class SpacesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.apps.meet.v2beta.IListMembersRequest, @@ -1543,7 +1561,9 @@ export class SpacesServiceClient { }); const defaultCallSettings = this._defaults['listMembers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMembers stream %j', request); return this.descriptors.page.listMembers.createStream( this.innerApiCalls.listMembers as GaxCall, @@ -1593,7 +1613,9 @@ export class SpacesServiceClient { }); const defaultCallSettings = this._defaults['listMembers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMembers iterate %j', request); return this.descriptors.page.listMembers.asyncIterate( this.innerApiCalls['listMembers'] as GaxCall, diff --git a/packages/google-apps-meet/test/gapic_conference_records_service_v2.ts b/packages/google-apps-meet/test/gapic_conference_records_service_v2.ts index cc9a4abf9a1..3c9e99dac45 100644 --- a/packages/google-apps-meet/test/gapic_conference_records_service_v2.ts +++ b/packages/google-apps-meet/test/gapic_conference_records_service_v2.ts @@ -265,7 +265,9 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conferenceRecordsServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetConferenceRecordRequest() ); @@ -361,7 +363,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetConferenceRecordRequest() ); @@ -409,7 +411,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetConferenceRecordRequest() ); @@ -441,7 +443,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetConferenceRecordRequest() ); @@ -463,7 +465,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantRequest() ); @@ -495,7 +497,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantRequest() ); @@ -543,7 +545,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantRequest() ); @@ -575,7 +577,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantRequest() ); @@ -597,7 +599,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantSessionRequest() ); @@ -630,7 +632,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantSessionRequest() ); @@ -678,7 +680,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantSessionRequest() ); @@ -713,7 +715,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetParticipantSessionRequest() ); @@ -738,7 +740,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetRecordingRequest() ); @@ -770,7 +772,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetRecordingRequest() ); @@ -818,7 +820,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetRecordingRequest() ); @@ -850,7 +852,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetRecordingRequest() ); @@ -872,7 +874,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptRequest() ); @@ -904,7 +906,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptRequest() ); @@ -952,7 +954,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptRequest() ); @@ -984,7 +986,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptRequest() ); @@ -1006,7 +1008,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptEntryRequest() ); @@ -1039,7 +1041,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptEntryRequest() ); @@ -1087,7 +1089,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptEntryRequest() ); @@ -1119,7 +1121,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetTranscriptEntryRequest() ); @@ -1141,7 +1143,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListConferenceRecordsRequest() ); @@ -1168,7 +1170,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListConferenceRecordsRequest() ); @@ -1210,7 +1212,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListConferenceRecordsRequest() ); @@ -1231,7 +1233,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListConferenceRecordsRequest() ); @@ -1282,7 +1284,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListConferenceRecordsRequest() ); @@ -1322,7 +1324,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListConferenceRecordsRequest() ); @@ -1360,7 +1362,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListConferenceRecordsRequest() ); @@ -1391,7 +1393,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantsRequest() ); @@ -1425,7 +1427,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantsRequest() ); @@ -1475,7 +1477,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantsRequest() ); @@ -1507,7 +1509,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantsRequest() ); @@ -1562,7 +1564,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantsRequest() ); @@ -1612,7 +1614,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantsRequest() ); @@ -1656,7 +1658,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantsRequest() ); @@ -1699,7 +1701,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantSessionsRequest() ); @@ -1740,7 +1742,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantSessionsRequest() ); @@ -1796,7 +1798,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantSessionsRequest() ); @@ -1831,7 +1833,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantSessionsRequest() ); @@ -1898,7 +1900,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantSessionsRequest() ); @@ -1954,7 +1956,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantSessionsRequest() ); @@ -2008,7 +2010,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListParticipantSessionsRequest() ); @@ -2055,7 +2057,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListRecordingsRequest() ); @@ -2089,7 +2091,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListRecordingsRequest() ); @@ -2139,7 +2141,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListRecordingsRequest() ); @@ -2171,7 +2173,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListRecordingsRequest() ); @@ -2223,7 +2225,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListRecordingsRequest() ); @@ -2270,7 +2272,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListRecordingsRequest() ); @@ -2314,7 +2316,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListRecordingsRequest() ); @@ -2357,7 +2359,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptsRequest() ); @@ -2391,7 +2393,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptsRequest() ); @@ -2441,7 +2443,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptsRequest() ); @@ -2473,7 +2475,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptsRequest() ); @@ -2525,7 +2527,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptsRequest() ); @@ -2572,7 +2574,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptsRequest() ); @@ -2616,7 +2618,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptsRequest() ); @@ -2659,7 +2661,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptEntriesRequest() ); @@ -2694,7 +2696,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptEntriesRequest() ); @@ -2744,7 +2746,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptEntriesRequest() ); @@ -2779,7 +2781,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptEntriesRequest() ); @@ -2840,7 +2842,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptEntriesRequest() ); @@ -2896,7 +2898,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptEntriesRequest() ); @@ -2944,7 +2946,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.ListTranscriptEntriesRequest() ); @@ -2985,7 +2987,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { }); describe('Path templates', () => { - describe('conferenceRecord', () => { + describe('conferenceRecord', async () => { const fakePath = '/rendered/path/conferenceRecord'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -2995,7 +2997,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conferenceRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3028,7 +3030,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { }); }); - describe('participant', () => { + describe('participant', async () => { const fakePath = '/rendered/path/participant'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3039,7 +3041,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.participantPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3082,7 +3084,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { }); }); - describe('participantSession', () => { + describe('participantSession', async () => { const fakePath = '/rendered/path/participantSession'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3094,7 +3096,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.participantSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3162,7 +3164,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { }); }); - describe('recording', () => { + describe('recording', async () => { const fakePath = '/rendered/path/recording'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3173,7 +3175,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.recordingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3215,7 +3217,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { }); }); - describe('space', () => { + describe('space', async () => { const fakePath = '/rendered/path/space'; const expectedParameters = { space: 'spaceValue', @@ -3225,7 +3227,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3254,7 +3256,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { }); }); - describe('transcript', () => { + describe('transcript', async () => { const fakePath = '/rendered/path/transcript'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3265,7 +3267,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3307,7 +3309,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { }); }); - describe('transcriptEntry', () => { + describe('transcriptEntry', async () => { const fakePath = '/rendered/path/transcriptEntry'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3319,7 +3321,7 @@ describe('v2.ConferenceRecordsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptEntryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-apps-meet/test/gapic_conference_records_service_v2beta.ts b/packages/google-apps-meet/test/gapic_conference_records_service_v2beta.ts index d379bcd9b3f..25895591141 100644 --- a/packages/google-apps-meet/test/gapic_conference_records_service_v2beta.ts +++ b/packages/google-apps-meet/test/gapic_conference_records_service_v2beta.ts @@ -271,7 +271,9 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conferenceRecordsServiceStub); client.close().then(() => { done(); @@ -342,7 +344,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetConferenceRecordRequest() ); @@ -377,7 +379,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetConferenceRecordRequest() ); @@ -427,7 +429,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetConferenceRecordRequest() ); @@ -461,7 +463,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetConferenceRecordRequest() ); @@ -485,7 +487,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantRequest() ); @@ -519,7 +521,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantRequest() ); @@ -569,7 +571,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantRequest() ); @@ -603,7 +605,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantRequest() ); @@ -627,7 +629,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantSessionRequest() ); @@ -662,7 +664,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantSessionRequest() ); @@ -712,7 +714,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantSessionRequest() ); @@ -749,7 +751,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetParticipantSessionRequest() ); @@ -776,7 +778,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetRecordingRequest() ); @@ -810,7 +812,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetRecordingRequest() ); @@ -860,7 +862,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetRecordingRequest() ); @@ -894,7 +896,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetRecordingRequest() ); @@ -918,7 +920,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptRequest() ); @@ -952,7 +954,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptRequest() ); @@ -1002,7 +1004,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptRequest() ); @@ -1036,7 +1038,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptRequest() ); @@ -1060,7 +1062,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptEntryRequest() ); @@ -1095,7 +1097,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptEntryRequest() ); @@ -1145,7 +1147,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptEntryRequest() ); @@ -1179,7 +1181,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetTranscriptEntryRequest() ); @@ -1203,7 +1205,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListConferenceRecordsRequest() ); @@ -1232,7 +1234,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListConferenceRecordsRequest() ); @@ -1276,7 +1278,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListConferenceRecordsRequest() ); @@ -1299,7 +1301,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListConferenceRecordsRequest() ); @@ -1352,7 +1354,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListConferenceRecordsRequest() ); @@ -1394,7 +1396,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListConferenceRecordsRequest() ); @@ -1434,7 +1436,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListConferenceRecordsRequest() ); @@ -1468,7 +1470,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantsRequest() ); @@ -1504,7 +1506,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantsRequest() ); @@ -1556,7 +1558,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantsRequest() ); @@ -1590,7 +1592,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantsRequest() ); @@ -1647,7 +1649,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantsRequest() ); @@ -1699,7 +1701,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantsRequest() ); @@ -1745,7 +1747,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantsRequest() ); @@ -1790,7 +1792,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantSessionsRequest() ); @@ -1833,7 +1835,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantSessionsRequest() ); @@ -1891,7 +1893,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantSessionsRequest() ); @@ -1928,7 +1930,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantSessionsRequest() ); @@ -1998,7 +2000,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantSessionsRequest() ); @@ -2057,7 +2059,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantSessionsRequest() ); @@ -2114,7 +2116,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListParticipantSessionsRequest() ); @@ -2164,7 +2166,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListRecordingsRequest() ); @@ -2200,7 +2202,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListRecordingsRequest() ); @@ -2252,7 +2254,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListRecordingsRequest() ); @@ -2286,7 +2288,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListRecordingsRequest() ); @@ -2343,7 +2345,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListRecordingsRequest() ); @@ -2395,7 +2397,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListRecordingsRequest() ); @@ -2441,7 +2443,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListRecordingsRequest() ); @@ -2486,7 +2488,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptsRequest() ); @@ -2522,7 +2524,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptsRequest() ); @@ -2574,7 +2576,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptsRequest() ); @@ -2608,7 +2610,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptsRequest() ); @@ -2665,7 +2667,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptsRequest() ); @@ -2717,7 +2719,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptsRequest() ); @@ -2763,7 +2765,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptsRequest() ); @@ -2808,7 +2810,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptEntriesRequest() ); @@ -2851,7 +2853,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptEntriesRequest() ); @@ -2909,7 +2911,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptEntriesRequest() ); @@ -2946,7 +2948,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptEntriesRequest() ); @@ -3015,7 +3017,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptEntriesRequest() ); @@ -3073,7 +3075,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptEntriesRequest() ); @@ -3129,7 +3131,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListTranscriptEntriesRequest() ); @@ -3170,7 +3172,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); describe('Path templates', () => { - describe('conferenceRecord', () => { + describe('conferenceRecord', async () => { const fakePath = '/rendered/path/conferenceRecord'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3182,7 +3184,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.conferenceRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3215,7 +3217,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); }); - describe('member', () => { + describe('member', async () => { const fakePath = '/rendered/path/member'; const expectedParameters = { space: 'spaceValue', @@ -3228,7 +3230,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.memberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3267,7 +3269,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); }); - describe('participant', () => { + describe('participant', async () => { const fakePath = '/rendered/path/participant'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3280,7 +3282,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.participantPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3323,7 +3325,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); }); - describe('participantSession', () => { + describe('participantSession', async () => { const fakePath = '/rendered/path/participantSession'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3337,7 +3339,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.participantSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3405,7 +3407,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); }); - describe('recording', () => { + describe('recording', async () => { const fakePath = '/rendered/path/recording'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3418,7 +3420,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.recordingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3460,7 +3462,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); }); - describe('space', () => { + describe('space', async () => { const fakePath = '/rendered/path/space'; const expectedParameters = { space: 'spaceValue', @@ -3472,7 +3474,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.spacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3501,7 +3503,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); }); - describe('transcript', () => { + describe('transcript', async () => { const fakePath = '/rendered/path/transcript'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3514,7 +3516,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3556,7 +3558,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { }); }); - describe('transcriptEntry', () => { + describe('transcriptEntry', async () => { const fakePath = '/rendered/path/transcriptEntry'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -3570,7 +3572,7 @@ describe('v2beta.ConferenceRecordsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptEntryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-apps-meet/test/gapic_spaces_service_v2.ts b/packages/google-apps-meet/test/gapic_spaces_service_v2.ts index 5c54f5fc3fc..c601a6751c5 100644 --- a/packages/google-apps-meet/test/gapic_spaces_service_v2.ts +++ b/packages/google-apps-meet/test/gapic_spaces_service_v2.ts @@ -189,7 +189,9 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.spacesServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.CreateSpaceRequest() ); @@ -265,7 +267,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.CreateSpaceRequest() ); @@ -298,7 +300,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.CreateSpaceRequest() ); @@ -315,7 +317,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.CreateSpaceRequest() ); @@ -331,7 +333,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetSpaceRequest() ); @@ -362,7 +364,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetSpaceRequest() ); @@ -409,7 +411,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetSpaceRequest() ); @@ -437,7 +439,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.GetSpaceRequest() ); @@ -458,7 +460,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.UpdateSpaceRequest() ); @@ -490,7 +492,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.UpdateSpaceRequest() ); @@ -538,7 +540,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.UpdateSpaceRequest() ); @@ -570,7 +572,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.UpdateSpaceRequest() ); @@ -592,7 +594,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.EndActiveConferenceRequest() ); @@ -624,7 +626,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.EndActiveConferenceRequest() ); @@ -671,7 +673,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.EndActiveConferenceRequest() ); @@ -702,7 +704,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2.EndActiveConferenceRequest() ); @@ -718,7 +720,7 @@ describe('v2.SpacesServiceClient', () => { }); describe('Path templates', () => { - describe('conferenceRecord', () => { + describe('conferenceRecord', async () => { const fakePath = '/rendered/path/conferenceRecord'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -727,7 +729,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conferenceRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -760,7 +762,7 @@ describe('v2.SpacesServiceClient', () => { }); }); - describe('participant', () => { + describe('participant', async () => { const fakePath = '/rendered/path/participant'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -770,7 +772,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.participantPathTemplate.render = sinon .stub() .returns(fakePath); @@ -813,7 +815,7 @@ describe('v2.SpacesServiceClient', () => { }); }); - describe('participantSession', () => { + describe('participantSession', async () => { const fakePath = '/rendered/path/participantSession'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -824,7 +826,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.participantSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -892,7 +894,7 @@ describe('v2.SpacesServiceClient', () => { }); }); - describe('recording', () => { + describe('recording', async () => { const fakePath = '/rendered/path/recording'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -902,7 +904,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.recordingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -944,7 +946,7 @@ describe('v2.SpacesServiceClient', () => { }); }); - describe('space', () => { + describe('space', async () => { const fakePath = '/rendered/path/space'; const expectedParameters = { space: 'spaceValue', @@ -953,7 +955,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -982,7 +984,7 @@ describe('v2.SpacesServiceClient', () => { }); }); - describe('transcript', () => { + describe('transcript', async () => { const fakePath = '/rendered/path/transcript'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -992,7 +994,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1034,7 +1036,7 @@ describe('v2.SpacesServiceClient', () => { }); }); - describe('transcriptEntry', () => { + describe('transcriptEntry', async () => { const fakePath = '/rendered/path/transcriptEntry'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -1045,7 +1047,7 @@ describe('v2.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptEntryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-apps-meet/test/gapic_spaces_service_v2beta.ts b/packages/google-apps-meet/test/gapic_spaces_service_v2beta.ts index 31b3bf5ca48..95c53ced3fb 100644 --- a/packages/google-apps-meet/test/gapic_spaces_service_v2beta.ts +++ b/packages/google-apps-meet/test/gapic_spaces_service_v2beta.ts @@ -252,7 +252,9 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.spacesServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateSpaceRequest() ); @@ -328,7 +330,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateSpaceRequest() ); @@ -361,7 +363,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateSpaceRequest() ); @@ -378,7 +380,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateSpaceRequest() ); @@ -394,7 +396,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetSpaceRequest() ); @@ -425,7 +427,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetSpaceRequest() ); @@ -472,7 +474,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetSpaceRequest() ); @@ -500,7 +502,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetSpaceRequest() ); @@ -521,7 +523,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.UpdateSpaceRequest() ); @@ -553,7 +555,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.UpdateSpaceRequest() ); @@ -601,7 +603,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.UpdateSpaceRequest() ); @@ -633,7 +635,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.UpdateSpaceRequest() ); @@ -655,7 +657,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ConnectActiveConferenceRequest() ); @@ -687,7 +689,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ConnectActiveConferenceRequest() ); @@ -734,7 +736,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ConnectActiveConferenceRequest() ); @@ -768,7 +770,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ConnectActiveConferenceRequest() ); @@ -792,7 +794,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.EndActiveConferenceRequest() ); @@ -824,7 +826,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.EndActiveConferenceRequest() ); @@ -871,7 +873,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.EndActiveConferenceRequest() ); @@ -902,7 +904,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.EndActiveConferenceRequest() ); @@ -923,7 +925,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateMemberRequest() ); @@ -954,7 +956,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateMemberRequest() ); @@ -1001,7 +1003,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateMemberRequest() ); @@ -1032,7 +1034,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.CreateMemberRequest() ); @@ -1053,7 +1055,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetMemberRequest() ); @@ -1084,7 +1086,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetMemberRequest() ); @@ -1131,7 +1133,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetMemberRequest() ); @@ -1159,7 +1161,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.GetMemberRequest() ); @@ -1180,7 +1182,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.DeleteMemberRequest() ); @@ -1211,7 +1213,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.DeleteMemberRequest() ); @@ -1258,7 +1260,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.DeleteMemberRequest() ); @@ -1289,7 +1291,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.DeleteMemberRequest() ); @@ -1310,7 +1312,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListMembersRequest() ); @@ -1343,7 +1345,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListMembersRequest() ); @@ -1392,7 +1394,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListMembersRequest() ); @@ -1423,7 +1425,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListMembersRequest() ); @@ -1474,7 +1476,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListMembersRequest() ); @@ -1522,7 +1524,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListMembersRequest() ); @@ -1565,7 +1567,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.apps.meet.v2beta.ListMembersRequest() ); @@ -1604,7 +1606,7 @@ describe('v2beta.SpacesServiceClient', () => { }); describe('Path templates', () => { - describe('conferenceRecord', () => { + describe('conferenceRecord', async () => { const fakePath = '/rendered/path/conferenceRecord'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -1613,7 +1615,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conferenceRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1646,7 +1648,7 @@ describe('v2beta.SpacesServiceClient', () => { }); }); - describe('member', () => { + describe('member', async () => { const fakePath = '/rendered/path/member'; const expectedParameters = { space: 'spaceValue', @@ -1656,7 +1658,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.memberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1695,7 +1697,7 @@ describe('v2beta.SpacesServiceClient', () => { }); }); - describe('participant', () => { + describe('participant', async () => { const fakePath = '/rendered/path/participant'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -1705,7 +1707,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.participantPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1748,7 +1750,7 @@ describe('v2beta.SpacesServiceClient', () => { }); }); - describe('participantSession', () => { + describe('participantSession', async () => { const fakePath = '/rendered/path/participantSession'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -1759,7 +1761,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.participantSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1827,7 +1829,7 @@ describe('v2beta.SpacesServiceClient', () => { }); }); - describe('recording', () => { + describe('recording', async () => { const fakePath = '/rendered/path/recording'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -1837,7 +1839,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.recordingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1879,7 +1881,7 @@ describe('v2beta.SpacesServiceClient', () => { }); }); - describe('space', () => { + describe('space', async () => { const fakePath = '/rendered/path/space'; const expectedParameters = { space: 'spaceValue', @@ -1888,7 +1890,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1917,7 +1919,7 @@ describe('v2beta.SpacesServiceClient', () => { }); }); - describe('transcript', () => { + describe('transcript', async () => { const fakePath = '/rendered/path/transcript'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -1927,7 +1929,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1969,7 +1971,7 @@ describe('v2beta.SpacesServiceClient', () => { }); }); - describe('transcriptEntry', () => { + describe('transcriptEntry', async () => { const fakePath = '/rendered/path/transcriptEntry'; const expectedParameters = { conference_record: 'conferenceRecordValue', @@ -1980,7 +1982,7 @@ describe('v2beta.SpacesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.transcriptEntryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-area120-tables/package.json b/packages/google-area120-tables/package.json index 515489c90b0..4e248bbe3ac 100644 --- a/packages/google-area120-tables/package.json +++ b/packages/google-area120-tables/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json index b3f3a4f73cd..4d2b1e3d129 100644 --- a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json +++ b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tables", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json index b3f3a4f73cd..4d2b1e3d129 100644 --- a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json +++ b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tables", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-area120-tables/src/v1alpha1/tables_service_client.ts b/packages/google-area120-tables/src/v1alpha1/tables_service_client.ts index 0be7d8e91ee..a19d80fb522 100644 --- a/packages/google-area120-tables/src/v1alpha1/tables_service_client.ts +++ b/packages/google-area120-tables/src/v1alpha1/tables_service_client.ts @@ -508,7 +508,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTable request %j', request); const wrappedCallback: | Callback< @@ -625,7 +627,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkspace request %j', request); const wrappedCallback: | Callback< @@ -742,7 +746,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRow request %j', request); const wrappedCallback: | Callback< @@ -864,7 +870,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRow request %j', request); const wrappedCallback: | Callback< @@ -985,7 +993,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateRows request %j', request); const wrappedCallback: | Callback< @@ -1109,7 +1119,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ 'row.name': request.row!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRow request %j', request); const wrappedCallback: | Callback< @@ -1230,7 +1242,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateRows request %j', request); const wrappedCallback: | Callback< @@ -1350,7 +1364,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRow request %j', request); const wrappedCallback: | Callback< @@ -1472,7 +1488,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteRows request %j', request); const wrappedCallback: | Callback< @@ -1601,7 +1619,9 @@ export class TablesServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.area120.tables.v1alpha1.IListTablesRequest, @@ -1668,7 +1688,9 @@ export class TablesServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTables']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTables stream %j', request); return this.descriptors.page.listTables.createStream( this.innerApiCalls.listTables as GaxCall, @@ -1717,7 +1739,9 @@ export class TablesServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTables']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTables iterate %j', request); return this.descriptors.page.listTables.asyncIterate( this.innerApiCalls['listTables'] as GaxCall, @@ -1821,7 +1845,9 @@ export class TablesServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.area120.tables.v1alpha1.IListWorkspacesRequest, @@ -1888,7 +1914,9 @@ export class TablesServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkspaces stream %j', request); return this.descriptors.page.listWorkspaces.createStream( this.innerApiCalls.listWorkspaces as GaxCall, @@ -1937,7 +1965,9 @@ export class TablesServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkspaces iterate %j', request); return this.descriptors.page.listWorkspaces.asyncIterate( this.innerApiCalls['listWorkspaces'] as GaxCall, @@ -2055,7 +2085,9 @@ export class TablesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.area120.tables.v1alpha1.IListRowsRequest, @@ -2136,7 +2168,9 @@ export class TablesServiceClient { }); const defaultCallSettings = this._defaults['listRows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRows stream %j', request); return this.descriptors.page.listRows.createStream( this.innerApiCalls.listRows as GaxCall, @@ -2199,7 +2233,9 @@ export class TablesServiceClient { }); const defaultCallSettings = this._defaults['listRows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRows iterate %j', request); return this.descriptors.page.listRows.asyncIterate( this.innerApiCalls['listRows'] as GaxCall, diff --git a/packages/google-area120-tables/test/gapic_tables_service_v1alpha1.ts b/packages/google-area120-tables/test/gapic_tables_service_v1alpha1.ts index cbea1ef0d82..b9a7dd0060f 100644 --- a/packages/google-area120-tables/test/gapic_tables_service_v1alpha1.ts +++ b/packages/google-area120-tables/test/gapic_tables_service_v1alpha1.ts @@ -255,7 +255,9 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tablesServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetTableRequest() ); @@ -345,7 +347,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetTableRequest() ); @@ -392,7 +394,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetTableRequest() ); @@ -420,7 +422,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetTableRequest() ); @@ -441,7 +443,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetWorkspaceRequest() ); @@ -472,7 +474,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetWorkspaceRequest() ); @@ -519,7 +521,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetWorkspaceRequest() ); @@ -550,7 +552,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetWorkspaceRequest() ); @@ -571,7 +573,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetRowRequest() ); @@ -602,7 +604,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetRowRequest() ); @@ -649,7 +651,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetRowRequest() ); @@ -677,7 +679,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.GetRowRequest() ); @@ -698,7 +700,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.CreateRowRequest() ); @@ -729,7 +731,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.CreateRowRequest() ); @@ -776,7 +778,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.CreateRowRequest() ); @@ -804,7 +806,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.CreateRowRequest() ); @@ -825,7 +827,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchCreateRowsRequest() ); @@ -856,7 +858,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchCreateRowsRequest() ); @@ -903,7 +905,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchCreateRowsRequest() ); @@ -934,7 +936,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchCreateRowsRequest() ); @@ -955,7 +957,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.UpdateRowRequest() ); @@ -987,7 +989,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.UpdateRowRequest() ); @@ -1035,7 +1037,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.UpdateRowRequest() ); @@ -1064,7 +1066,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.UpdateRowRequest() ); @@ -1086,7 +1088,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchUpdateRowsRequest() ); @@ -1117,7 +1119,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchUpdateRowsRequest() ); @@ -1164,7 +1166,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchUpdateRowsRequest() ); @@ -1195,7 +1197,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchUpdateRowsRequest() ); @@ -1216,7 +1218,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.DeleteRowRequest() ); @@ -1247,7 +1249,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.DeleteRowRequest() ); @@ -1294,7 +1296,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.DeleteRowRequest() ); @@ -1322,7 +1324,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.DeleteRowRequest() ); @@ -1343,7 +1345,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchDeleteRowsRequest() ); @@ -1374,7 +1376,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchDeleteRowsRequest() ); @@ -1421,7 +1423,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchDeleteRowsRequest() ); @@ -1452,7 +1454,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.BatchDeleteRowsRequest() ); @@ -1473,7 +1475,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListTablesRequest() ); @@ -1498,7 +1500,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListTablesRequest() ); @@ -1539,7 +1541,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListTablesRequest() ); @@ -1556,7 +1558,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListTablesRequest() ); @@ -1603,7 +1605,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListTablesRequest() ); @@ -1641,7 +1643,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListTablesRequest() ); @@ -1677,7 +1679,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListTablesRequest() ); @@ -1708,7 +1710,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListWorkspacesRequest() ); @@ -1733,7 +1735,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListWorkspacesRequest() ); @@ -1774,7 +1776,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListWorkspacesRequest() ); @@ -1791,7 +1793,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListWorkspacesRequest() ); @@ -1838,7 +1840,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListWorkspacesRequest() ); @@ -1874,7 +1876,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListWorkspacesRequest() ); @@ -1910,7 +1912,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListWorkspacesRequest() ); @@ -1940,7 +1942,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListRowsRequest() ); @@ -1973,7 +1975,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListRowsRequest() ); @@ -2022,7 +2024,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListRowsRequest() ); @@ -2050,7 +2052,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListRowsRequest() ); @@ -2104,7 +2106,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListRowsRequest() ); @@ -2155,7 +2157,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListRowsRequest() ); @@ -2197,7 +2199,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.area120.tables.v1alpha1.ListRowsRequest() ); @@ -2235,7 +2237,7 @@ describe('v1alpha1.TablesServiceClient', () => { }); describe('Path templates', () => { - describe('row', () => { + describe('row', async () => { const fakePath = '/rendered/path/row'; const expectedParameters = { table: 'tableValue', @@ -2245,7 +2247,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2284,7 +2286,7 @@ describe('v1alpha1.TablesServiceClient', () => { }); }); - describe('table', () => { + describe('table', async () => { const fakePath = '/rendered/path/table'; const expectedParameters = { table: 'tableValue', @@ -2293,7 +2295,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tablePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2322,7 +2324,7 @@ describe('v1alpha1.TablesServiceClient', () => { }); }); - describe('workspace', () => { + describe('workspace', async () => { const fakePath = '/rendered/path/workspace'; const expectedParameters = { workspace: 'workspaceValue', @@ -2331,7 +2333,7 @@ describe('v1alpha1.TablesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workspacePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-chat/package.json b/packages/google-chat/package.json index 7dbde2d7249..ca9ce3abce4 100644 --- a/packages/google-chat/package.json +++ b/packages/google-chat/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json index 2aeec382168..46c51924d1c 100644 --- a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json +++ b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-chat", - "version": "0.13.0", + "version": "0.14.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-chat/src/v1/chat_service_client.ts b/packages/google-chat/src/v1/chat_service_client.ts index 36285aa6aba..2aa04504dcc 100644 --- a/packages/google-chat/src/v1/chat_service_client.ts +++ b/packages/google-chat/src/v1/chat_service_client.ts @@ -643,7 +643,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMessage request %j', request); const wrappedCallback: | Callback< @@ -785,7 +787,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMembership request %j', request); const wrappedCallback: | Callback< @@ -911,7 +915,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMessage request %j', request); const wrappedCallback: | Callback< @@ -1057,7 +1063,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ 'message.name': request.message!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMessage request %j', request); const wrappedCallback: | Callback< @@ -1192,7 +1200,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMessage request %j', request); const wrappedCallback: | Callback< @@ -1306,7 +1316,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttachment request %j', request); const wrappedCallback: | Callback< @@ -1424,7 +1436,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('uploadAttachment request %j', request); const wrappedCallback: | Callback< @@ -1555,7 +1569,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpace request %j', request); const wrappedCallback: | Callback< @@ -1694,7 +1710,9 @@ export class ChatServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSpace request %j', request); const wrappedCallback: | Callback< @@ -1906,7 +1924,9 @@ export class ChatServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setUpSpace request %j', request); const wrappedCallback: | Callback< @@ -2108,7 +2128,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ 'space.name': request.space!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSpace request %j', request); const wrappedCallback: | Callback< @@ -2243,7 +2265,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSpace request %j', request); const wrappedCallback: | Callback< @@ -2359,7 +2383,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeImportSpace request %j', request); const wrappedCallback: | Callback< @@ -2495,7 +2521,9 @@ export class ChatServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('findDirectMessage request %j', request); const wrappedCallback: | Callback< @@ -2685,7 +2713,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMembership request %j', request); const wrappedCallback: | Callback< @@ -2823,7 +2853,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ 'membership.name': request.membership!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMembership request %j', request); const wrappedCallback: | Callback< @@ -2969,7 +3001,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMembership request %j', request); const wrappedCallback: | Callback< @@ -3084,7 +3118,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReaction request %j', request); const wrappedCallback: | Callback< @@ -3197,7 +3233,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteReaction request %j', request); const wrappedCallback: | Callback< @@ -3323,7 +3361,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpaceReadState request %j', request); const wrappedCallback: | Callback< @@ -3462,7 +3502,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ 'space_read_state.name': request.spaceReadState!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSpaceReadState request %j', request); const wrappedCallback: | Callback< @@ -3589,7 +3631,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getThreadReadState request %j', request); const wrappedCallback: | Callback< @@ -3713,7 +3757,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpaceEvent request %j', request); const wrappedCallback: | Callback< @@ -3837,7 +3883,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpaceNotificationSetting request %j', request); const wrappedCallback: | Callback< @@ -3968,7 +4016,9 @@ export class ChatServiceClient { 'space_notification_setting.name': request.spaceNotificationSetting!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSpaceNotificationSetting request %j', request); const wrappedCallback: | Callback< @@ -4168,7 +4218,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.chat.v1.IListMessagesRequest, @@ -4297,7 +4349,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessages stream %j', request); return this.descriptors.page.listMessages.createStream( this.innerApiCalls.listMessages as GaxCall, @@ -4410,7 +4464,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessages iterate %j', request); return this.descriptors.page.listMessages.asyncIterate( this.innerApiCalls['listMessages'] as GaxCall, @@ -4609,7 +4665,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.chat.v1.IListMembershipsRequest, @@ -4756,7 +4814,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMemberships stream %j', request); return this.descriptors.page.listMemberships.createStream( this.innerApiCalls.listMemberships as GaxCall, @@ -4887,7 +4947,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMemberships iterate %j', request); return this.descriptors.page.listMemberships.asyncIterate( this.innerApiCalls['listMemberships'] as GaxCall, @@ -5023,7 +5085,9 @@ export class ChatServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.chat.v1.IListSpacesRequest, @@ -5112,7 +5176,9 @@ export class ChatServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listSpaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpaces stream %j', request); return this.descriptors.page.listSpaces.createStream( this.innerApiCalls.listSpaces as GaxCall, @@ -5185,7 +5251,9 @@ export class ChatServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listSpaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpaces iterate %j', request); return this.descriptors.page.listSpaces.asyncIterate( this.innerApiCalls['listSpaces'] as GaxCall, @@ -5398,7 +5466,9 @@ export class ChatServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.chat.v1.ISearchSpacesRequest, @@ -5574,7 +5644,9 @@ export class ChatServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchSpaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchSpaces stream %j', request); return this.descriptors.page.searchSpaces.createStream( this.innerApiCalls.searchSpaces as GaxCall, @@ -5734,7 +5806,9 @@ export class ChatServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchSpaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchSpaces iterate %j', request); return this.descriptors.page.searchSpaces.asyncIterate( this.innerApiCalls['searchSpaces'] as GaxCall, @@ -5888,7 +5962,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.chat.v1.IListReactionsRequest, @@ -6006,7 +6082,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listReactions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReactions stream %j', request); return this.descriptors.page.listReactions.createStream( this.innerApiCalls.listReactions as GaxCall, @@ -6108,7 +6186,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listReactions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReactions iterate %j', request); return this.descriptors.page.listReactions.asyncIterate( this.innerApiCalls['listReactions'] as GaxCall, @@ -6280,7 +6360,9 @@ export class ChatServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.chat.v1.IListSpaceEventsRequest, @@ -6408,7 +6490,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listSpaceEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpaceEvents stream %j', request); return this.descriptors.page.listSpaceEvents.createStream( this.innerApiCalls.listSpaceEvents as GaxCall, @@ -6520,7 +6604,9 @@ export class ChatServiceClient { }); const defaultCallSettings = this._defaults['listSpaceEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpaceEvents iterate %j', request); return this.descriptors.page.listSpaceEvents.asyncIterate( this.innerApiCalls['listSpaceEvents'] as GaxCall, diff --git a/packages/google-chat/test/gapic_chat_service_v1.ts b/packages/google-chat/test/gapic_chat_service_v1.ts index d9ae3bcd32a..3d6fc8f61cf 100644 --- a/packages/google-chat/test/gapic_chat_service_v1.ts +++ b/packages/google-chat/test/gapic_chat_service_v1.ts @@ -250,7 +250,9 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.chatServiceStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMessageRequest() ); @@ -340,7 +342,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMessageRequest() ); @@ -387,7 +389,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMessageRequest() ); @@ -418,7 +420,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMessageRequest() ); @@ -439,7 +441,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMembershipRequest() ); @@ -470,7 +472,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMembershipRequest() ); @@ -517,7 +519,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMembershipRequest() ); @@ -548,7 +550,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMembershipRequest() ); @@ -569,7 +571,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMessageRequest() ); @@ -600,7 +602,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMessageRequest() ); @@ -647,7 +649,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMessageRequest() ); @@ -678,7 +680,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetMessageRequest() ); @@ -699,7 +701,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMessageRequest() ); @@ -731,7 +733,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMessageRequest() ); @@ -779,7 +781,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMessageRequest() ); @@ -811,7 +813,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMessageRequest() ); @@ -833,7 +835,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMessageRequest() ); @@ -864,7 +866,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMessageRequest() ); @@ -911,7 +913,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMessageRequest() ); @@ -942,7 +944,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMessageRequest() ); @@ -963,7 +965,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetAttachmentRequest() ); @@ -994,7 +996,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetAttachmentRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetAttachmentRequest() ); @@ -1072,7 +1074,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetAttachmentRequest() ); @@ -1093,7 +1095,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UploadAttachmentRequest() ); @@ -1124,7 +1126,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UploadAttachmentRequest() ); @@ -1171,7 +1173,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UploadAttachmentRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UploadAttachmentRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceRequest() ); @@ -1301,7 +1303,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceRequest() ); @@ -1329,7 +1331,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateSpaceRequest() ); @@ -1367,7 +1369,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateSpaceRequest() ); @@ -1400,7 +1402,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateSpaceRequest() ); @@ -1417,7 +1419,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateSpaceRequest() ); @@ -1433,7 +1435,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SetUpSpaceRequest() ); @@ -1450,7 +1452,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SetUpSpaceRequest() ); @@ -1483,7 +1485,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SetUpSpaceRequest() ); @@ -1500,7 +1502,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SetUpSpaceRequest() ); @@ -1516,7 +1518,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceRequest() ); @@ -1548,7 +1550,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceRequest() ); @@ -1596,7 +1598,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceRequest() ); @@ -1628,7 +1630,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceRequest() ); @@ -1650,7 +1652,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteSpaceRequest() ); @@ -1681,7 +1683,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteSpaceRequest() ); @@ -1728,7 +1730,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteSpaceRequest() ); @@ -1759,7 +1761,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteSpaceRequest() ); @@ -1780,7 +1782,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CompleteImportSpaceRequest() ); @@ -1812,7 +1814,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CompleteImportSpaceRequest() ); @@ -1859,7 +1861,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CompleteImportSpaceRequest() ); @@ -1890,7 +1892,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CompleteImportSpaceRequest() ); @@ -1911,7 +1913,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.FindDirectMessageRequest() ); @@ -1928,7 +1930,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.FindDirectMessageRequest() ); @@ -1961,7 +1963,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.FindDirectMessageRequest() ); @@ -1978,7 +1980,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.FindDirectMessageRequest() ); @@ -1994,7 +1996,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMembershipRequest() ); @@ -2025,7 +2027,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMembershipRequest() ); @@ -2072,7 +2074,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMembershipRequest() ); @@ -2103,7 +2105,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateMembershipRequest() ); @@ -2124,7 +2126,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMembershipRequest() ); @@ -2156,7 +2158,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMembershipRequest() ); @@ -2204,7 +2206,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMembershipRequest() ); @@ -2236,7 +2238,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateMembershipRequest() ); @@ -2258,7 +2260,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMembershipRequest() ); @@ -2289,7 +2291,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMembershipRequest() ); @@ -2336,7 +2338,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMembershipRequest() ); @@ -2367,7 +2369,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteMembershipRequest() ); @@ -2388,7 +2390,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateReactionRequest() ); @@ -2419,7 +2421,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateReactionRequest() ); @@ -2466,7 +2468,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateReactionRequest() ); @@ -2497,7 +2499,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.CreateReactionRequest() ); @@ -2518,7 +2520,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteReactionRequest() ); @@ -2549,7 +2551,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteReactionRequest() ); @@ -2596,7 +2598,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteReactionRequest() ); @@ -2627,7 +2629,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.DeleteReactionRequest() ); @@ -2648,7 +2650,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceReadStateRequest() ); @@ -2679,7 +2681,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceReadStateRequest() ); @@ -2726,7 +2728,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceReadStateRequest() ); @@ -2757,7 +2759,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceReadStateRequest() ); @@ -2778,7 +2780,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceReadStateRequest() ); @@ -2811,7 +2813,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceReadStateRequest() ); @@ -2859,7 +2861,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceReadStateRequest() ); @@ -2891,7 +2893,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceReadStateRequest() ); @@ -2913,7 +2915,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetThreadReadStateRequest() ); @@ -2945,7 +2947,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetThreadReadStateRequest() ); @@ -2992,7 +2994,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetThreadReadStateRequest() ); @@ -3023,7 +3025,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetThreadReadStateRequest() ); @@ -3044,7 +3046,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceEventRequest() ); @@ -3075,7 +3077,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceEventRequest() ); @@ -3122,7 +3124,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceEventRequest() ); @@ -3153,7 +3155,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceEventRequest() ); @@ -3174,7 +3176,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceNotificationSettingRequest() ); @@ -3206,7 +3208,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceNotificationSettingRequest() ); @@ -3253,7 +3255,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceNotificationSettingRequest() ); @@ -3287,7 +3289,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.GetSpaceNotificationSettingRequest() ); @@ -3311,7 +3313,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceNotificationSettingRequest() ); @@ -3344,7 +3346,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceNotificationSettingRequest() ); @@ -3392,7 +3394,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceNotificationSettingRequest() ); @@ -3427,7 +3429,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.UpdateSpaceNotificationSettingRequest() ); @@ -3452,7 +3454,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMessagesRequest() ); @@ -3485,7 +3487,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMessagesRequest() ); @@ -3534,7 +3536,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMessagesRequest() ); @@ -3565,7 +3567,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMessagesRequest() ); @@ -3616,7 +3618,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMessagesRequest() ); @@ -3664,7 +3666,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMessagesRequest() ); @@ -3707,7 +3709,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMessagesRequest() ); @@ -3749,7 +3751,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMembershipsRequest() ); @@ -3782,7 +3784,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMembershipsRequest() ); @@ -3831,7 +3833,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMembershipsRequest() ); @@ -3862,7 +3864,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMembershipsRequest() ); @@ -3913,7 +3915,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMembershipsRequest() ); @@ -3959,7 +3961,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMembershipsRequest() ); @@ -4002,7 +4004,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListMembershipsRequest() ); @@ -4044,7 +4046,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpacesRequest() ); @@ -4063,7 +4065,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpacesRequest() ); @@ -4098,7 +4100,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpacesRequest() ); @@ -4115,7 +4117,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpacesRequest() ); @@ -4153,7 +4155,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpacesRequest() ); @@ -4188,7 +4190,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpacesRequest() ); @@ -4218,7 +4220,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpacesRequest() ); @@ -4249,7 +4251,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SearchSpacesRequest() ); @@ -4268,7 +4270,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SearchSpacesRequest() ); @@ -4303,7 +4305,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SearchSpacesRequest() ); @@ -4320,7 +4322,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SearchSpacesRequest() ); @@ -4358,7 +4360,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SearchSpacesRequest() ); @@ -4393,7 +4395,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SearchSpacesRequest() ); @@ -4423,7 +4425,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.SearchSpacesRequest() ); @@ -4452,7 +4454,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListReactionsRequest() ); @@ -4485,7 +4487,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListReactionsRequest() ); @@ -4534,7 +4536,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListReactionsRequest() ); @@ -4565,7 +4567,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListReactionsRequest() ); @@ -4616,7 +4618,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListReactionsRequest() ); @@ -4662,7 +4664,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListReactionsRequest() ); @@ -4705,7 +4707,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListReactionsRequest() ); @@ -4747,7 +4749,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpaceEventsRequest() ); @@ -4780,7 +4782,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpaceEventsRequest() ); @@ -4829,7 +4831,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpaceEventsRequest() ); @@ -4860,7 +4862,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpaceEventsRequest() ); @@ -4911,7 +4913,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpaceEventsRequest() ); @@ -4957,7 +4959,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpaceEventsRequest() ); @@ -5000,7 +5002,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.chat.v1.ListSpaceEventsRequest() ); @@ -5037,7 +5039,7 @@ describe('v1.ChatServiceClient', () => { }); describe('Path templates', () => { - describe('attachment', () => { + describe('attachment', async () => { const fakePath = '/rendered/path/attachment'; const expectedParameters = { space: 'spaceValue', @@ -5048,7 +5050,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5101,7 +5103,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('membership', () => { + describe('membership', async () => { const fakePath = '/rendered/path/membership'; const expectedParameters = { space: 'spaceValue', @@ -5111,7 +5113,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.membershipPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5150,7 +5152,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('message', () => { + describe('message', async () => { const fakePath = '/rendered/path/message'; const expectedParameters = { space: 'spaceValue', @@ -5160,7 +5162,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.messagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5199,7 +5201,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('quotedMessageMetadata', () => { + describe('quotedMessageMetadata', async () => { const fakePath = '/rendered/path/quotedMessageMetadata'; const expectedParameters = { space: 'spaceValue', @@ -5210,7 +5212,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.quotedMessageMetadataPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5279,7 +5281,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('reaction', () => { + describe('reaction', async () => { const fakePath = '/rendered/path/reaction'; const expectedParameters = { space: 'spaceValue', @@ -5290,7 +5292,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reactionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5343,7 +5345,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('space', () => { + describe('space', async () => { const fakePath = '/rendered/path/space'; const expectedParameters = { space: 'spaceValue', @@ -5352,7 +5354,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5381,7 +5383,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('spaceEvent', () => { + describe('spaceEvent', async () => { const fakePath = '/rendered/path/spaceEvent'; const expectedParameters = { space: 'spaceValue', @@ -5391,7 +5393,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spaceEventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5430,7 +5432,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('spaceNotificationSetting', () => { + describe('spaceNotificationSetting', async () => { const fakePath = '/rendered/path/spaceNotificationSetting'; const expectedParameters = { user: 'userValue', @@ -5440,7 +5442,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spaceNotificationSettingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5493,7 +5495,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('spaceReadState', () => { + describe('spaceReadState', async () => { const fakePath = '/rendered/path/spaceReadState'; const expectedParameters = { user: 'userValue', @@ -5503,7 +5505,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spaceReadStatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5542,7 +5544,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('thread', () => { + describe('thread', async () => { const fakePath = '/rendered/path/thread'; const expectedParameters = { space: 'spaceValue', @@ -5552,7 +5554,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.threadPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5591,7 +5593,7 @@ describe('v1.ChatServiceClient', () => { }); }); - describe('threadReadState', () => { + describe('threadReadState', async () => { const fakePath = '/rendered/path/threadReadState'; const expectedParameters = { user: 'userValue', @@ -5602,7 +5604,7 @@ describe('v1.ChatServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.threadReadStatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-accessapproval/package.json b/packages/google-cloud-accessapproval/package.json index 48d30a16810..482fdaaf65f 100644 --- a/packages/google-cloud-accessapproval/package.json +++ b/packages/google-cloud-accessapproval/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json index 10e3668b416..b9714c6b9f1 100644 --- a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json +++ b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accessapproval", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json index 10e3668b416..b9714c6b9f1 100644 --- a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json +++ b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accessapproval", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-accessapproval/src/v1/access_approval_client.ts b/packages/google-cloud-accessapproval/src/v1/access_approval_client.ts index 20738528f7a..7753a393521 100644 --- a/packages/google-cloud-accessapproval/src/v1/access_approval_client.ts +++ b/packages/google-cloud-accessapproval/src/v1/access_approval_client.ts @@ -548,7 +548,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApprovalRequest request %j', request); const wrappedCallback: | Callback< @@ -678,7 +680,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('approveApprovalRequest request %j', request); const wrappedCallback: | Callback< @@ -812,7 +816,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('dismissApprovalRequest request %j', request); const wrappedCallback: | Callback< @@ -944,7 +950,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('invalidateApprovalRequest request %j', request); const wrappedCallback: | Callback< @@ -1070,7 +1078,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccessApprovalSettings request %j', request); const wrappedCallback: | Callback< @@ -1207,7 +1217,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ 'settings.name': request.settings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccessApprovalSettings request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1349,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAccessApprovalSettings request %j', request); const wrappedCallback: | Callback< @@ -1463,7 +1477,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccessApprovalServiceAccount request %j', request); const wrappedCallback: | Callback< @@ -1612,7 +1628,9 @@ export class AccessApprovalClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.accessapproval.v1.IListApprovalRequestsMessage, @@ -1691,7 +1709,9 @@ export class AccessApprovalClient { }); const defaultCallSettings = this._defaults['listApprovalRequests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApprovalRequests stream %j', request); return this.descriptors.page.listApprovalRequests.createStream( this.innerApiCalls.listApprovalRequests as GaxCall, @@ -1752,7 +1772,9 @@ export class AccessApprovalClient { }); const defaultCallSettings = this._defaults['listApprovalRequests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApprovalRequests iterate %j', request); return this.descriptors.page.listApprovalRequests.asyncIterate( this.innerApiCalls['listApprovalRequests'] as GaxCall, diff --git a/packages/google-cloud-accessapproval/test/gapic_access_approval_v1.ts b/packages/google-cloud-accessapproval/test/gapic_access_approval_v1.ts index 079c1b8eb65..e38dd63c22b 100644 --- a/packages/google-cloud-accessapproval/test/gapic_access_approval_v1.ts +++ b/packages/google-cloud-accessapproval/test/gapic_access_approval_v1.ts @@ -255,7 +255,9 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.accessApprovalStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetApprovalRequestMessage() ); @@ -346,7 +348,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetApprovalRequestMessage() ); @@ -393,7 +395,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetApprovalRequestMessage() ); @@ -424,7 +426,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetApprovalRequestMessage() ); @@ -445,7 +447,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ApproveApprovalRequestMessage() ); @@ -477,7 +479,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ApproveApprovalRequestMessage() ); @@ -524,7 +526,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ApproveApprovalRequestMessage() ); @@ -558,7 +560,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ApproveApprovalRequestMessage() ); @@ -582,7 +584,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DismissApprovalRequestMessage() ); @@ -614,7 +616,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DismissApprovalRequestMessage() ); @@ -661,7 +663,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DismissApprovalRequestMessage() ); @@ -695,7 +697,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DismissApprovalRequestMessage() ); @@ -719,7 +721,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.InvalidateApprovalRequestMessage() ); @@ -751,7 +753,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.InvalidateApprovalRequestMessage() ); @@ -798,7 +800,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.InvalidateApprovalRequestMessage() ); @@ -832,7 +834,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.InvalidateApprovalRequestMessage() ); @@ -856,7 +858,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalSettingsMessage() ); @@ -888,7 +890,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalSettingsMessage() ); @@ -935,7 +937,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalSettingsMessage() ); @@ -969,7 +971,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalSettingsMessage() ); @@ -993,7 +995,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.UpdateAccessApprovalSettingsMessage() ); @@ -1026,7 +1028,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.UpdateAccessApprovalSettingsMessage() ); @@ -1074,7 +1076,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.UpdateAccessApprovalSettingsMessage() ); @@ -1109,7 +1111,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.UpdateAccessApprovalSettingsMessage() ); @@ -1134,7 +1136,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DeleteAccessApprovalSettingsMessage() ); @@ -1166,7 +1168,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DeleteAccessApprovalSettingsMessage() ); @@ -1213,7 +1215,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DeleteAccessApprovalSettingsMessage() ); @@ -1247,7 +1249,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.DeleteAccessApprovalSettingsMessage() ); @@ -1271,7 +1273,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalServiceAccountMessage() ); @@ -1303,7 +1305,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalServiceAccountMessage() ); @@ -1350,7 +1352,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalServiceAccountMessage() ); @@ -1384,7 +1386,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.GetAccessApprovalServiceAccountMessage() ); @@ -1408,7 +1410,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ListApprovalRequestsMessage() ); @@ -1448,7 +1450,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ListApprovalRequestsMessage() ); @@ -1505,7 +1507,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ListApprovalRequestsMessage() ); @@ -1536,7 +1538,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ListApprovalRequestsMessage() ); @@ -1597,7 +1599,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ListApprovalRequestsMessage() ); @@ -1647,7 +1649,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ListApprovalRequestsMessage() ); @@ -1697,7 +1699,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.accessapproval.v1.ListApprovalRequestsMessage() ); @@ -1735,7 +1737,7 @@ describe('v1.AccessApprovalClient', () => { }); describe('Path templates', () => { - describe('folderAccessApprovalSettings', () => { + describe('folderAccessApprovalSettings', async () => { const fakePath = '/rendered/path/folderAccessApprovalSettings'; const expectedParameters = { folder: 'folderValue', @@ -1744,7 +1746,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderAccessApprovalSettingsPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderAccessApprovalSettingsPathTemplate.match = @@ -1778,7 +1780,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('folderApprovalRequest', () => { + describe('folderApprovalRequest', async () => { const fakePath = '/rendered/path/folderApprovalRequest'; const expectedParameters = { folder: 'folderValue', @@ -1788,7 +1790,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderApprovalRequestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1841,7 +1843,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('folderServiceAccount', () => { + describe('folderServiceAccount', async () => { const fakePath = '/rendered/path/folderServiceAccount'; const expectedParameters = { folder: 'folderValue', @@ -1850,7 +1852,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderServiceAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1885,7 +1887,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('organizationAccessApprovalSettings', () => { + describe('organizationAccessApprovalSettings', async () => { const fakePath = '/rendered/path/organizationAccessApprovalSettings'; const expectedParameters = { organization: 'organizationValue', @@ -1894,7 +1896,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationAccessApprovalSettingsPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationAccessApprovalSettingsPathTemplate.match = @@ -1931,7 +1933,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('organizationApprovalRequest', () => { + describe('organizationApprovalRequest', async () => { const fakePath = '/rendered/path/organizationApprovalRequest'; const expectedParameters = { organization: 'organizationValue', @@ -1941,7 +1943,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationApprovalRequestPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationApprovalRequestPathTemplate.match = sinon @@ -1995,7 +1997,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('organizationServiceAccount', () => { + describe('organizationServiceAccount', async () => { const fakePath = '/rendered/path/organizationServiceAccount'; const expectedParameters = { organization: 'organizationValue', @@ -2004,7 +2006,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationServiceAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2041,7 +2043,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2050,7 +2052,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2079,7 +2081,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('projectAccessApprovalSettings', () => { + describe('projectAccessApprovalSettings', async () => { const fakePath = '/rendered/path/projectAccessApprovalSettings'; const expectedParameters = { project: 'projectValue', @@ -2088,7 +2090,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAccessApprovalSettingsPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAccessApprovalSettingsPathTemplate.match = @@ -2122,7 +2124,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('projectApprovalRequest', () => { + describe('projectApprovalRequest', async () => { const fakePath = '/rendered/path/projectApprovalRequest'; const expectedParameters = { project: 'projectValue', @@ -2132,7 +2134,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectApprovalRequestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2185,7 +2187,7 @@ describe('v1.AccessApprovalClient', () => { }); }); - describe('projectServiceAccount', () => { + describe('projectServiceAccount', async () => { const fakePath = '/rendered/path/projectServiceAccount'; const expectedParameters = { project: 'projectValue', @@ -2194,7 +2196,7 @@ describe('v1.AccessApprovalClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectServiceAccountPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-advisorynotifications/package.json b/packages/google-cloud-advisorynotifications/package.json index 41d1f9a2f32..582d1afec8a 100644 --- a/packages/google-cloud-advisorynotifications/package.json +++ b/packages/google-cloud-advisorynotifications/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json index 07c66627ca6..cdde39755e0 100644 --- a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-advisorynotifications", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json index bdbb433f617..0038818dfc6 100644 --- a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-advisorynotifications", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts index 0e77b5d0e64..7a77becfb18 100644 --- a/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts +++ b/packages/google-cloud-advisorynotifications/src/v1/advisory_notifications_service_client.ts @@ -504,7 +504,9 @@ export class AdvisoryNotificationsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNotification request %j', request); const wrappedCallback: | Callback< @@ -632,7 +634,9 @@ export class AdvisoryNotificationsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSettings request %j', request); const wrappedCallback: | Callback< @@ -757,7 +761,9 @@ export class AdvisoryNotificationsServiceClient { this._gaxModule.routingHeader.fromParams({ 'settings.name': request.settings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSettings request %j', request); const wrappedCallback: | Callback< @@ -900,7 +906,9 @@ export class AdvisoryNotificationsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.advisorynotifications.v1.IListNotificationsRequest, @@ -981,7 +989,9 @@ export class AdvisoryNotificationsServiceClient { }); const defaultCallSettings = this._defaults['listNotifications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotifications stream %j', request); return this.descriptors.page.listNotifications.createStream( this.innerApiCalls.listNotifications as GaxCall, @@ -1044,7 +1054,9 @@ export class AdvisoryNotificationsServiceClient { }); const defaultCallSettings = this._defaults['listNotifications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotifications iterate %j', request); return this.descriptors.page.listNotifications.asyncIterate( this.innerApiCalls['listNotifications'] as GaxCall, diff --git a/packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts b/packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts index 463c2b8f2b0..52a615500c3 100644 --- a/packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts +++ b/packages/google-cloud-advisorynotifications/test/gapic_advisory_notifications_service_v1.ts @@ -274,7 +274,9 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.advisoryNotificationsServiceStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() ); @@ -379,7 +381,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() ); @@ -429,7 +431,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() ); @@ -463,7 +465,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetNotificationRequest() ); @@ -487,7 +489,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetSettingsRequest() ); @@ -521,7 +523,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetSettingsRequest() ); @@ -571,7 +573,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetSettingsRequest() ); @@ -605,7 +607,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.GetSettingsRequest() ); @@ -629,7 +631,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.UpdateSettingsRequest() ); @@ -664,7 +666,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.UpdateSettingsRequest() ); @@ -715,7 +717,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.UpdateSettingsRequest() ); @@ -750,7 +752,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.UpdateSettingsRequest() ); @@ -775,7 +777,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() ); @@ -817,7 +819,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() ); @@ -877,7 +879,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() ); @@ -911,7 +913,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() ); @@ -977,7 +979,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() ); @@ -1085,7 +1087,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.advisorynotifications.v1.ListNotificationsRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { }); describe('Path templates', () => { - describe('organizationLocation', () => { + describe('organizationLocation', async () => { const fakePath = '/rendered/path/organizationLocation'; const expectedParameters = { organization: 'organizationValue', @@ -1136,7 +1138,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1189,7 +1191,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { }); }); - describe('organizationLocationNotification', () => { + describe('organizationLocationNotification', async () => { const fakePath = '/rendered/path/organizationLocationNotification'; const expectedParameters = { organization: 'organizationValue', @@ -1203,7 +1205,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationNotificationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationNotificationPathTemplate.match = @@ -1275,7 +1277,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { }); }); - describe('organizationLocationSettings', () => { + describe('organizationLocationSettings', async () => { const fakePath = '/rendered/path/organizationLocationSettings'; const expectedParameters = { organization: 'organizationValue', @@ -1288,7 +1290,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationSettingsPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationSettingsPathTemplate.match = @@ -1341,7 +1343,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { }); }); - describe('projectLocationNotification', () => { + describe('projectLocationNotification', async () => { const fakePath = '/rendered/path/projectLocationNotification'; const expectedParameters = { project: 'projectValue', @@ -1355,7 +1357,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationNotificationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationNotificationPathTemplate.match = sinon @@ -1422,7 +1424,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { }); }); - describe('projectLocationSettings', () => { + describe('projectLocationSettings', async () => { const fakePath = '/rendered/path/projectLocationSettings'; const expectedParameters = { project: 'projectValue', @@ -1435,7 +1437,7 @@ describe('v1.AdvisoryNotificationsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationSettingsPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index 13b927460d6..b31ef463106 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Vertex AI API][enable_api]. -1. [Set up authentication][auth] so you can access the +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -859,4 +859,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index ebdb26bf1c9..8161f9b60f9 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -1,7 +1,4 @@ { - "options": { - "syntax": "proto3" - }, "nested": { "google": { "nested": { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index a539499566e..239f99f4f35 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.35.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json index 7f375f03d8d..074f45f82f0 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.35.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index b816f25179b..f746bf2568e 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.35.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json index fb73bd00fd3..012add4537d 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.35.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/package.json b/packages/google-cloud-alloydb/package.json index b858f2ac47b..17ad58cec22 100644 --- a/packages/google-cloud-alloydb/package.json +++ b/packages/google-cloud-alloydb/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json index 956daa4ef3a..3a159333fe0 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json +++ b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "1.10.2", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json index 79fb49cc9a5..f1d8ffc7081 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json +++ b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "1.10.2", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json index 47eb421e192..bf1abd7e6e7 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json +++ b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "1.10.2", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json index 0acdca73d20..318e94d07a8 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json +++ b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "1.10.2", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json index cb34e13c449..17330f28de7 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json +++ b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "1.10.2", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json index ae75a76d31b..c12e8fd22cb 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json +++ b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "1.10.2", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/src/v1/alloy_d_b_admin_client.ts b/packages/google-cloud-alloydb/src/v1/alloy_d_b_admin_client.ts index 2237bf0914a..aade5b008c4 100644 --- a/packages/google-cloud-alloydb/src/v1/alloy_d_b_admin_client.ts +++ b/packages/google-cloud-alloydb/src/v1/alloy_d_b_admin_client.ts @@ -817,7 +817,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -926,7 +928,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -1046,7 +1050,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executeSql request %j', request); const wrappedCallback: | Callback< @@ -1152,7 +1158,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1303,7 +1311,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateClientCertificate request %j', request); const wrappedCallback: | Callback< @@ -1437,7 +1447,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectionInfo request %j', request); const wrappedCallback: | Callback< @@ -1546,7 +1558,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUser request %j', request); const wrappedCallback: | Callback< @@ -1673,7 +1687,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUser request %j', request); const wrappedCallback: | Callback< @@ -1804,7 +1820,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'user.name': request.user!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUser request %j', request); const wrappedCallback: | Callback< @@ -1928,7 +1946,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUser request %j', request); const wrappedCallback: | Callback< @@ -2078,7 +2098,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2272,7 +2294,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2464,7 +2488,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2657,7 +2683,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2845,7 +2873,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3042,7 +3072,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3233,7 +3265,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3423,7 +3457,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3613,7 +3649,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3805,7 +3843,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3999,7 +4039,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4189,7 +4231,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4377,7 +4421,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4566,7 +4612,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4756,7 +4804,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4944,7 +4994,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5137,7 +5189,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5326,7 +5380,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5490,7 +5546,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1.IListClustersRequest, @@ -5563,7 +5621,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -5618,7 +5678,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -5724,7 +5786,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1.IListInstancesRequest, @@ -5799,7 +5863,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -5856,7 +5922,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -5957,7 +6025,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1.IListBackupsRequest, @@ -6027,7 +6097,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -6079,7 +6151,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -6188,7 +6262,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1.IListSupportedDatabaseFlagsRequest, @@ -6260,7 +6336,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listSupportedDatabaseFlags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSupportedDatabaseFlags stream %j', request); return this.descriptors.page.listSupportedDatabaseFlags.createStream( this.innerApiCalls.listSupportedDatabaseFlags as GaxCall, @@ -6314,7 +6392,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listSupportedDatabaseFlags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSupportedDatabaseFlags iterate %j', request); return this.descriptors.page.listSupportedDatabaseFlags.asyncIterate( this.innerApiCalls['listSupportedDatabaseFlags'] as GaxCall, @@ -6413,7 +6493,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1.IListUsersRequest, @@ -6481,7 +6563,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers stream %j', request); return this.descriptors.page.listUsers.createStream( this.innerApiCalls.listUsers as GaxCall, @@ -6533,7 +6617,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers iterate %j', request); return this.descriptors.page.listUsers.asyncIterate( this.innerApiCalls['listUsers'] as GaxCall, @@ -6637,7 +6723,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1.IListDatabasesRequest, @@ -6710,7 +6798,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatabases stream %j', request); return this.descriptors.page.listDatabases.createStream( this.innerApiCalls.listDatabases as GaxCall, @@ -6765,7 +6855,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatabases iterate %j', request); return this.descriptors.page.listDatabases.asyncIterate( this.innerApiCalls['listDatabases'] as GaxCall, @@ -7083,7 +7175,7 @@ export class AlloyDBAdminClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-alloydb/src/v1alpha/alloy_d_b_admin_client.ts b/packages/google-cloud-alloydb/src/v1alpha/alloy_d_b_admin_client.ts index a1b58306c3b..659c2ec2bac 100644 --- a/packages/google-cloud-alloydb/src/v1alpha/alloy_d_b_admin_client.ts +++ b/packages/google-cloud-alloydb/src/v1alpha/alloy_d_b_admin_client.ts @@ -831,7 +831,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -950,7 +952,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -1074,7 +1078,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executeSql request %j', request); const wrappedCallback: | Callback< @@ -1184,7 +1190,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1340,7 +1348,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateClientCertificate request %j', request); const wrappedCallback: | Callback< @@ -1474,7 +1484,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectionInfo request %j', request); const wrappedCallback: | Callback< @@ -1588,7 +1600,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUser request %j', request); const wrappedCallback: | Callback< @@ -1719,7 +1733,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUser request %j', request); const wrappedCallback: | Callback< @@ -1854,7 +1870,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'user.name': request.user!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUser request %j', request); const wrappedCallback: | Callback< @@ -1982,7 +2000,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUser request %j', request); const wrappedCallback: | Callback< @@ -2134,7 +2154,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2328,7 +2350,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2520,7 +2544,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2712,7 +2738,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2905,7 +2933,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3093,7 +3123,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3290,7 +3322,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3481,7 +3515,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3671,7 +3707,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3861,7 +3899,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4053,7 +4093,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4247,7 +4289,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4437,7 +4481,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4625,7 +4671,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4814,7 +4862,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5004,7 +5054,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5192,7 +5244,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5385,7 +5439,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5574,7 +5630,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5744,7 +5802,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1alpha.IListClustersRequest, @@ -5817,7 +5877,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -5872,7 +5934,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -5984,7 +6048,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1alpha.IListInstancesRequest, @@ -6059,7 +6125,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -6116,7 +6184,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -6223,7 +6293,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1alpha.IListBackupsRequest, @@ -6293,7 +6365,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -6345,7 +6419,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -6454,7 +6530,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1alpha.IListSupportedDatabaseFlagsRequest, @@ -6526,7 +6604,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listSupportedDatabaseFlags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSupportedDatabaseFlags stream %j', request); return this.descriptors.page.listSupportedDatabaseFlags.createStream( this.innerApiCalls.listSupportedDatabaseFlags as GaxCall, @@ -6580,7 +6660,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listSupportedDatabaseFlags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSupportedDatabaseFlags iterate %j', request); return this.descriptors.page.listSupportedDatabaseFlags.asyncIterate( this.innerApiCalls['listSupportedDatabaseFlags'] as GaxCall, @@ -6681,7 +6763,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1alpha.IListUsersRequest, @@ -6751,7 +6835,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers stream %j', request); return this.descriptors.page.listUsers.createStream( this.innerApiCalls.listUsers as GaxCall, @@ -6803,7 +6889,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers iterate %j', request); return this.descriptors.page.listUsers.asyncIterate( this.innerApiCalls['listUsers'] as GaxCall, @@ -6913,7 +7001,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1alpha.IListDatabasesRequest, @@ -6986,7 +7076,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatabases stream %j', request); return this.descriptors.page.listDatabases.createStream( this.innerApiCalls.listDatabases as GaxCall, @@ -7041,7 +7133,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatabases iterate %j', request); return this.descriptors.page.listDatabases.asyncIterate( this.innerApiCalls['listDatabases'] as GaxCall, @@ -7359,7 +7453,7 @@ export class AlloyDBAdminClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts b/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts index ddafbe9a51c..6c93ecc9320 100644 --- a/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts +++ b/packages/google-cloud-alloydb/src/v1beta/alloy_d_b_admin_client.ts @@ -842,7 +842,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -955,7 +957,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -1079,7 +1083,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executeSql request %j', request); const wrappedCallback: | Callback< @@ -1189,7 +1195,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1345,7 +1353,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateClientCertificate request %j', request); const wrappedCallback: | Callback< @@ -1479,7 +1489,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectionInfo request %j', request); const wrappedCallback: | Callback< @@ -1591,7 +1603,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUser request %j', request); const wrappedCallback: | Callback< @@ -1720,7 +1734,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUser request %j', request); const wrappedCallback: | Callback< @@ -1855,7 +1871,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'user.name': request.user!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUser request %j', request); const wrappedCallback: | Callback< @@ -1983,7 +2001,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUser request %j', request); const wrappedCallback: | Callback< @@ -2135,7 +2155,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2329,7 +2351,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2509,7 +2533,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2701,7 +2727,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2893,7 +2921,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3086,7 +3116,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3274,7 +3306,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3471,7 +3505,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3662,7 +3698,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3852,7 +3890,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4042,7 +4082,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4234,7 +4276,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4428,7 +4472,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4618,7 +4664,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4806,7 +4854,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4995,7 +5045,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5185,7 +5237,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5373,7 +5427,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5566,7 +5622,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5755,7 +5813,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5925,7 +5985,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1beta.IListClustersRequest, @@ -5998,7 +6060,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -6053,7 +6117,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -6165,7 +6231,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1beta.IListInstancesRequest, @@ -6240,7 +6308,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -6297,7 +6367,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -6404,7 +6476,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1beta.IListBackupsRequest, @@ -6474,7 +6548,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -6526,7 +6602,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -6635,7 +6713,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1beta.IListSupportedDatabaseFlagsRequest, @@ -6707,7 +6787,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listSupportedDatabaseFlags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSupportedDatabaseFlags stream %j', request); return this.descriptors.page.listSupportedDatabaseFlags.createStream( this.innerApiCalls.listSupportedDatabaseFlags as GaxCall, @@ -6761,7 +6843,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listSupportedDatabaseFlags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSupportedDatabaseFlags iterate %j', request); return this.descriptors.page.listSupportedDatabaseFlags.asyncIterate( this.innerApiCalls['listSupportedDatabaseFlags'] as GaxCall, @@ -6862,7 +6946,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1beta.IListUsersRequest, @@ -6932,7 +7018,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers stream %j', request); return this.descriptors.page.listUsers.createStream( this.innerApiCalls.listUsers as GaxCall, @@ -6984,7 +7072,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers iterate %j', request); return this.descriptors.page.listUsers.asyncIterate( this.innerApiCalls['listUsers'] as GaxCall, @@ -7094,7 +7184,9 @@ export class AlloyDBAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.alloydb.v1beta.IListDatabasesRequest, @@ -7167,7 +7259,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatabases stream %j', request); return this.descriptors.page.listDatabases.createStream( this.innerApiCalls.listDatabases as GaxCall, @@ -7222,7 +7316,9 @@ export class AlloyDBAdminClient { }); const defaultCallSettings = this._defaults['listDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatabases iterate %j', request); return this.descriptors.page.listDatabases.asyncIterate( this.innerApiCalls['listDatabases'] as GaxCall, @@ -7540,7 +7636,7 @@ export class AlloyDBAdminClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1.ts b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1.ts index d8f0dc13c43..eae5e9f5305 100644 --- a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1.ts +++ b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1.ts @@ -290,7 +290,9 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.alloyDBAdminStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetClusterRequest() ); @@ -380,7 +382,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetClusterRequest() ); @@ -427,7 +429,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetClusterRequest() ); @@ -458,7 +460,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetClusterRequest() ); @@ -479,7 +481,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetInstanceRequest() ); @@ -510,7 +512,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetInstanceRequest() ); @@ -557,7 +559,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetInstanceRequest() ); @@ -588,7 +590,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetInstanceRequest() ); @@ -609,7 +611,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ExecuteSqlRequest() ); @@ -640,7 +642,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ExecuteSqlRequest() ); @@ -687,7 +689,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ExecuteSqlRequest() ); @@ -718,7 +720,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ExecuteSqlRequest() ); @@ -739,7 +741,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetBackupRequest() ); @@ -770,7 +772,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetBackupRequest() ); @@ -817,7 +819,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetBackupRequest() ); @@ -845,7 +847,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetBackupRequest() ); @@ -866,7 +868,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GenerateClientCertificateRequest() ); @@ -898,7 +900,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GenerateClientCertificateRequest() ); @@ -945,7 +947,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GenerateClientCertificateRequest() ); @@ -979,7 +981,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GenerateClientCertificateRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetConnectionInfoRequest() ); @@ -1034,7 +1036,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetConnectionInfoRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetConnectionInfoRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetConnectionInfoRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetUserRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetUserRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetUserRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.GetUserRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateUserRequest() ); @@ -1291,7 +1293,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateUserRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateUserRequest() ); @@ -1369,7 +1371,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateUserRequest() ); @@ -1390,7 +1392,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateUserRequest() ); @@ -1422,7 +1424,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateUserRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateUserRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateUserRequest() ); @@ -1524,7 +1526,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteUserRequest() ); @@ -1555,7 +1557,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteUserRequest() ); @@ -1602,7 +1604,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteUserRequest() ); @@ -1633,7 +1635,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteUserRequest() ); @@ -1654,7 +1656,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateClusterRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateClusterRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateClusterRequest() ); @@ -1772,7 +1774,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateClusterRequest() ); @@ -1805,7 +1807,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1827,7 +1829,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1848,7 +1850,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateClusterRequest() ); @@ -1882,7 +1884,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateClusterRequest() ); @@ -1937,7 +1939,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateClusterRequest() ); @@ -1969,7 +1971,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateClusterRequest() ); @@ -2003,7 +2005,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2025,7 +2027,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2046,7 +2048,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteClusterRequest() ); @@ -2079,7 +2081,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteClusterRequest() ); @@ -2133,7 +2135,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteClusterRequest() ); @@ -2164,7 +2166,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteClusterRequest() ); @@ -2197,7 +2199,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2219,7 +2221,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2240,7 +2242,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.PromoteClusterRequest() ); @@ -2273,7 +2275,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.PromoteClusterRequest() ); @@ -2327,7 +2329,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.PromoteClusterRequest() ); @@ -2358,7 +2360,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.PromoteClusterRequest() ); @@ -2391,7 +2393,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2413,7 +2415,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2434,7 +2436,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.SwitchoverClusterRequest() ); @@ -2467,7 +2469,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.SwitchoverClusterRequest() ); @@ -2521,7 +2523,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.SwitchoverClusterRequest() ); @@ -2552,7 +2554,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.SwitchoverClusterRequest() ); @@ -2585,7 +2587,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2607,7 +2609,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2628,7 +2630,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestoreClusterRequest() ); @@ -2661,7 +2663,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestoreClusterRequest() ); @@ -2715,7 +2717,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestoreClusterRequest() ); @@ -2746,7 +2748,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestoreClusterRequest() ); @@ -2779,7 +2781,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2801,7 +2803,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2822,7 +2824,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryClusterRequest() ); @@ -2855,7 +2857,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryClusterRequest() ); @@ -2909,7 +2911,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryClusterRequest() ); @@ -2943,7 +2945,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryClusterRequest() ); @@ -2976,7 +2978,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2998,7 +3000,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3019,7 +3021,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateInstanceRequest() ); @@ -3052,7 +3054,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateInstanceRequest() ); @@ -3106,7 +3108,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateInstanceRequest() ); @@ -3137,7 +3139,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateInstanceRequest() ); @@ -3170,7 +3172,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3192,7 +3194,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3213,7 +3215,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryInstanceRequest() ); @@ -3246,7 +3248,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryInstanceRequest() ); @@ -3300,7 +3302,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryInstanceRequest() ); @@ -3334,7 +3336,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateSecondaryInstanceRequest() ); @@ -3367,7 +3369,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3390,7 +3392,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3411,7 +3413,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.BatchCreateInstancesRequest() ); @@ -3444,7 +3446,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.BatchCreateInstancesRequest() ); @@ -3498,7 +3500,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.BatchCreateInstancesRequest() ); @@ -3529,7 +3531,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.BatchCreateInstancesRequest() ); @@ -3562,7 +3564,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3584,7 +3586,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3605,7 +3607,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateInstanceRequest() ); @@ -3639,7 +3641,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateInstanceRequest() ); @@ -3694,7 +3696,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateInstanceRequest() ); @@ -3726,7 +3728,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateInstanceRequest() ); @@ -3760,7 +3762,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3782,7 +3784,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3803,7 +3805,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteInstanceRequest() ); @@ -3836,7 +3838,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteInstanceRequest() ); @@ -3890,7 +3892,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteInstanceRequest() ); @@ -3921,7 +3923,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteInstanceRequest() ); @@ -3954,7 +3956,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3976,7 +3978,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3997,7 +3999,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.FailoverInstanceRequest() ); @@ -4030,7 +4032,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.FailoverInstanceRequest() ); @@ -4084,7 +4086,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.FailoverInstanceRequest() ); @@ -4115,7 +4117,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.FailoverInstanceRequest() ); @@ -4148,7 +4150,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4170,7 +4172,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4191,7 +4193,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.InjectFaultRequest() ); @@ -4223,7 +4225,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.InjectFaultRequest() ); @@ -4277,7 +4279,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.InjectFaultRequest() ); @@ -4308,7 +4310,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.InjectFaultRequest() ); @@ -4341,7 +4343,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4363,7 +4365,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4381,7 +4383,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestartInstanceRequest() ); @@ -4414,7 +4416,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestartInstanceRequest() ); @@ -4468,7 +4470,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestartInstanceRequest() ); @@ -4499,7 +4501,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.RestartInstanceRequest() ); @@ -4532,7 +4534,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4554,7 +4556,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4575,7 +4577,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateBackupRequest() ); @@ -4607,7 +4609,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateBackupRequest() ); @@ -4661,7 +4663,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateBackupRequest() ); @@ -4692,7 +4694,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.CreateBackupRequest() ); @@ -4725,7 +4727,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4747,7 +4749,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4765,7 +4767,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateBackupRequest() ); @@ -4798,7 +4800,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateBackupRequest() ); @@ -4853,7 +4855,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateBackupRequest() ); @@ -4885,7 +4887,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.UpdateBackupRequest() ); @@ -4919,7 +4921,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4941,7 +4943,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4959,7 +4961,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteBackupRequest() ); @@ -4991,7 +4993,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteBackupRequest() ); @@ -5045,7 +5047,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteBackupRequest() ); @@ -5076,7 +5078,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.DeleteBackupRequest() ); @@ -5109,7 +5111,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5131,7 +5133,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5149,7 +5151,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListClustersRequest() ); @@ -5182,7 +5184,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListClustersRequest() ); @@ -5231,7 +5233,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListClustersRequest() ); @@ -5262,7 +5264,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListClustersRequest() ); @@ -5316,7 +5318,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListClustersRequest() ); @@ -5367,7 +5369,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListClustersRequest() ); @@ -5410,7 +5412,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListClustersRequest() ); @@ -5452,7 +5454,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListInstancesRequest() ); @@ -5485,7 +5487,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListInstancesRequest() ); @@ -5534,7 +5536,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListInstancesRequest() ); @@ -5565,7 +5567,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListInstancesRequest() ); @@ -5619,7 +5621,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListInstancesRequest() ); @@ -5668,7 +5670,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListInstancesRequest() ); @@ -5711,7 +5713,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListInstancesRequest() ); @@ -5753,7 +5755,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListBackupsRequest() ); @@ -5786,7 +5788,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListBackupsRequest() ); @@ -5835,7 +5837,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListBackupsRequest() ); @@ -5866,7 +5868,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListBackupsRequest() ); @@ -5917,7 +5919,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListBackupsRequest() ); @@ -5965,7 +5967,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListBackupsRequest() ); @@ -6008,7 +6010,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListBackupsRequest() ); @@ -6052,7 +6054,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListSupportedDatabaseFlagsRequest() ); @@ -6092,7 +6094,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListSupportedDatabaseFlagsRequest() ); @@ -6149,7 +6151,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListSupportedDatabaseFlagsRequest() ); @@ -6183,7 +6185,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListSupportedDatabaseFlagsRequest() ); @@ -6250,7 +6252,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListSupportedDatabaseFlagsRequest() ); @@ -6306,7 +6308,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListSupportedDatabaseFlagsRequest() ); @@ -6360,7 +6362,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListSupportedDatabaseFlagsRequest() ); @@ -6407,7 +6409,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListUsersRequest() ); @@ -6440,7 +6442,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListUsersRequest() ); @@ -6489,7 +6491,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListUsersRequest() ); @@ -6517,7 +6519,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListUsersRequest() ); @@ -6568,7 +6570,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListUsersRequest() ); @@ -6616,7 +6618,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListUsersRequest() ); @@ -6658,7 +6660,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListUsersRequest() ); @@ -6701,7 +6703,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListDatabasesRequest() ); @@ -6734,7 +6736,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListDatabasesRequest() ); @@ -6783,7 +6785,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListDatabasesRequest() ); @@ -6814,7 +6816,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListDatabasesRequest() ); @@ -6868,7 +6870,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListDatabasesRequest() ); @@ -6917,7 +6919,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListDatabasesRequest() ); @@ -6960,7 +6962,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1.ListDatabasesRequest() ); @@ -7001,7 +7003,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7031,7 +7033,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7075,7 +7077,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7107,7 +7109,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7137,7 +7139,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7181,7 +7183,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7213,7 +7215,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7246,7 +7248,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7290,7 +7292,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7325,7 +7327,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7355,7 +7357,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7399,7 +7401,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7434,7 +7436,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7482,7 +7484,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7523,7 +7525,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7602,7 +7604,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7682,7 +7684,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7778,8 +7780,7 @@ describe('v1.AlloyDBAdminClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7798,7 +7799,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7807,8 +7808,7 @@ describe('v1.AlloyDBAdminClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -7824,7 +7824,7 @@ describe('v1.AlloyDBAdminClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -7835,7 +7835,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7888,7 +7888,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -7899,7 +7899,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7952,7 +7952,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('connectionInfo', () => { + describe('connectionInfo', async () => { const fakePath = '/rendered/path/connectionInfo'; const expectedParameters = { project: 'projectValue', @@ -7964,7 +7964,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8028,7 +8028,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('database', () => { + describe('database', async () => { const fakePath = '/rendered/path/database'; const expectedParameters = { project: 'projectValue', @@ -8040,7 +8040,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.databasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8104,7 +8104,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -8116,7 +8116,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8180,7 +8180,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8190,7 +8190,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8229,7 +8229,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -8238,7 +8238,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8267,7 +8267,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('supportedDatabaseFlag', () => { + describe('supportedDatabaseFlag', async () => { const fakePath = '/rendered/path/supportedDatabaseFlag'; const expectedParameters = { project: 'projectValue', @@ -8278,7 +8278,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.supportedDatabaseFlagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8345,7 +8345,7 @@ describe('v1.AlloyDBAdminClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { project: 'projectValue', @@ -8357,7 +8357,7 @@ describe('v1.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1alpha.ts b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1alpha.ts index ffafa51220e..0b7a866ab50 100644 --- a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1alpha.ts +++ b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1alpha.ts @@ -290,7 +290,9 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.alloyDBAdminStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetClusterRequest() ); @@ -380,7 +382,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetClusterRequest() ); @@ -427,7 +429,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetClusterRequest() ); @@ -458,7 +460,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetClusterRequest() ); @@ -479,7 +481,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetInstanceRequest() ); @@ -510,7 +512,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetInstanceRequest() ); @@ -557,7 +559,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetInstanceRequest() ); @@ -588,7 +590,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetInstanceRequest() ); @@ -609,7 +611,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ExecuteSqlRequest() ); @@ -640,7 +642,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ExecuteSqlRequest() ); @@ -687,7 +689,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ExecuteSqlRequest() ); @@ -718,7 +720,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ExecuteSqlRequest() ); @@ -739,7 +741,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetBackupRequest() ); @@ -770,7 +772,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetBackupRequest() ); @@ -817,7 +819,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetBackupRequest() ); @@ -845,7 +847,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetBackupRequest() ); @@ -866,7 +868,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GenerateClientCertificateRequest() ); @@ -898,7 +900,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GenerateClientCertificateRequest() ); @@ -945,7 +947,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GenerateClientCertificateRequest() ); @@ -979,7 +981,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GenerateClientCertificateRequest() ); @@ -1003,7 +1005,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetConnectionInfoRequest() ); @@ -1034,7 +1036,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetConnectionInfoRequest() ); @@ -1081,7 +1083,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetConnectionInfoRequest() ); @@ -1112,7 +1114,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetConnectionInfoRequest() ); @@ -1133,7 +1135,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetUserRequest() ); @@ -1164,7 +1166,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetUserRequest() ); @@ -1211,7 +1213,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetUserRequest() ); @@ -1239,7 +1241,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.GetUserRequest() ); @@ -1260,7 +1262,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateUserRequest() ); @@ -1291,7 +1293,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateUserRequest() ); @@ -1338,7 +1340,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateUserRequest() ); @@ -1369,7 +1371,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateUserRequest() ); @@ -1390,7 +1392,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateUserRequest() ); @@ -1422,7 +1424,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateUserRequest() ); @@ -1470,7 +1472,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateUserRequest() ); @@ -1502,7 +1504,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateUserRequest() ); @@ -1524,7 +1526,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteUserRequest() ); @@ -1555,7 +1557,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteUserRequest() ); @@ -1602,7 +1604,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteUserRequest() ); @@ -1633,7 +1635,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteUserRequest() ); @@ -1654,7 +1656,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateClusterRequest() ); @@ -1687,7 +1689,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateClusterRequest() ); @@ -1741,7 +1743,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateClusterRequest() ); @@ -1772,7 +1774,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateClusterRequest() ); @@ -1805,7 +1807,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1827,7 +1829,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1848,7 +1850,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateClusterRequest() ); @@ -1882,7 +1884,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateClusterRequest() ); @@ -1937,7 +1939,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateClusterRequest() ); @@ -1969,7 +1971,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateClusterRequest() ); @@ -2003,7 +2005,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2025,7 +2027,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2046,7 +2048,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpgradeClusterRequest() ); @@ -2079,7 +2081,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpgradeClusterRequest() ); @@ -2133,7 +2135,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpgradeClusterRequest() ); @@ -2164,7 +2166,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpgradeClusterRequest() ); @@ -2197,7 +2199,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2219,7 +2221,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2240,7 +2242,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteClusterRequest() ); @@ -2273,7 +2275,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteClusterRequest() ); @@ -2327,7 +2329,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteClusterRequest() ); @@ -2358,7 +2360,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteClusterRequest() ); @@ -2391,7 +2393,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2413,7 +2415,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2434,7 +2436,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.PromoteClusterRequest() ); @@ -2467,7 +2469,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.PromoteClusterRequest() ); @@ -2521,7 +2523,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.PromoteClusterRequest() ); @@ -2552,7 +2554,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.PromoteClusterRequest() ); @@ -2585,7 +2587,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2607,7 +2609,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2628,7 +2630,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.SwitchoverClusterRequest() ); @@ -2661,7 +2663,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.SwitchoverClusterRequest() ); @@ -2715,7 +2717,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.SwitchoverClusterRequest() ); @@ -2746,7 +2748,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.SwitchoverClusterRequest() ); @@ -2779,7 +2781,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2801,7 +2803,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2822,7 +2824,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestoreClusterRequest() ); @@ -2855,7 +2857,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestoreClusterRequest() ); @@ -2909,7 +2911,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestoreClusterRequest() ); @@ -2940,7 +2942,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestoreClusterRequest() ); @@ -2973,7 +2975,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2995,7 +2997,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3016,7 +3018,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryClusterRequest() ); @@ -3049,7 +3051,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryClusterRequest() ); @@ -3103,7 +3105,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryClusterRequest() ); @@ -3137,7 +3139,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryClusterRequest() ); @@ -3170,7 +3172,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3192,7 +3194,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3213,7 +3215,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateInstanceRequest() ); @@ -3246,7 +3248,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateInstanceRequest() ); @@ -3300,7 +3302,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateInstanceRequest() ); @@ -3331,7 +3333,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateInstanceRequest() ); @@ -3364,7 +3366,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3386,7 +3388,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3407,7 +3409,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryInstanceRequest() ); @@ -3440,7 +3442,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryInstanceRequest() ); @@ -3494,7 +3496,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryInstanceRequest() ); @@ -3528,7 +3530,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateSecondaryInstanceRequest() ); @@ -3561,7 +3563,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3584,7 +3586,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3605,7 +3607,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.BatchCreateInstancesRequest() ); @@ -3638,7 +3640,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.BatchCreateInstancesRequest() ); @@ -3692,7 +3694,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.BatchCreateInstancesRequest() ); @@ -3723,7 +3725,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.BatchCreateInstancesRequest() ); @@ -3756,7 +3758,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3778,7 +3780,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3799,7 +3801,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateInstanceRequest() ); @@ -3833,7 +3835,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateInstanceRequest() ); @@ -3888,7 +3890,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateInstanceRequest() ); @@ -3920,7 +3922,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateInstanceRequest() ); @@ -3954,7 +3956,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3976,7 +3978,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3997,7 +3999,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteInstanceRequest() ); @@ -4030,7 +4032,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteInstanceRequest() ); @@ -4084,7 +4086,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteInstanceRequest() ); @@ -4115,7 +4117,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteInstanceRequest() ); @@ -4148,7 +4150,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4170,7 +4172,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4191,7 +4193,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.FailoverInstanceRequest() ); @@ -4224,7 +4226,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.FailoverInstanceRequest() ); @@ -4278,7 +4280,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.FailoverInstanceRequest() ); @@ -4309,7 +4311,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.FailoverInstanceRequest() ); @@ -4342,7 +4344,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4364,7 +4366,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4385,7 +4387,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.InjectFaultRequest() ); @@ -4417,7 +4419,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.InjectFaultRequest() ); @@ -4471,7 +4473,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.InjectFaultRequest() ); @@ -4502,7 +4504,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.InjectFaultRequest() ); @@ -4535,7 +4537,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4557,7 +4559,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4575,7 +4577,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestartInstanceRequest() ); @@ -4608,7 +4610,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestartInstanceRequest() ); @@ -4662,7 +4664,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestartInstanceRequest() ); @@ -4693,7 +4695,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.RestartInstanceRequest() ); @@ -4726,7 +4728,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4748,7 +4750,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4769,7 +4771,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateBackupRequest() ); @@ -4801,7 +4803,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateBackupRequest() ); @@ -4855,7 +4857,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateBackupRequest() ); @@ -4886,7 +4888,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.CreateBackupRequest() ); @@ -4919,7 +4921,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4941,7 +4943,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4959,7 +4961,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateBackupRequest() ); @@ -4992,7 +4994,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateBackupRequest() ); @@ -5047,7 +5049,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateBackupRequest() ); @@ -5079,7 +5081,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.UpdateBackupRequest() ); @@ -5113,7 +5115,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5135,7 +5137,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5153,7 +5155,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteBackupRequest() ); @@ -5185,7 +5187,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteBackupRequest() ); @@ -5239,7 +5241,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteBackupRequest() ); @@ -5270,7 +5272,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.DeleteBackupRequest() ); @@ -5303,7 +5305,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5325,7 +5327,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5343,7 +5345,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListClustersRequest() ); @@ -5382,7 +5384,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListClustersRequest() ); @@ -5437,7 +5439,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListClustersRequest() ); @@ -5468,7 +5470,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListClustersRequest() ); @@ -5528,7 +5530,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListClustersRequest() ); @@ -5579,7 +5581,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListClustersRequest() ); @@ -5628,7 +5630,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListClustersRequest() ); @@ -5670,7 +5672,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListInstancesRequest() ); @@ -5709,7 +5711,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListInstancesRequest() ); @@ -5764,7 +5766,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListInstancesRequest() ); @@ -5795,7 +5797,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListInstancesRequest() ); @@ -5855,7 +5857,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListInstancesRequest() ); @@ -5904,7 +5906,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListInstancesRequest() ); @@ -5953,7 +5955,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListInstancesRequest() ); @@ -5995,7 +5997,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListBackupsRequest() ); @@ -6028,7 +6030,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListBackupsRequest() ); @@ -6077,7 +6079,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListBackupsRequest() ); @@ -6108,7 +6110,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListBackupsRequest() ); @@ -6162,7 +6164,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListBackupsRequest() ); @@ -6213,7 +6215,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListBackupsRequest() ); @@ -6256,7 +6258,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListBackupsRequest() ); @@ -6300,7 +6302,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest() ); @@ -6340,7 +6342,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest() ); @@ -6397,7 +6399,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest() ); @@ -6431,7 +6433,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest() ); @@ -6500,7 +6502,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest() ); @@ -6558,7 +6560,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest() ); @@ -6612,7 +6614,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListSupportedDatabaseFlagsRequest() ); @@ -6659,7 +6661,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListUsersRequest() ); @@ -6692,7 +6694,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListUsersRequest() ); @@ -6741,7 +6743,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListUsersRequest() ); @@ -6769,7 +6771,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListUsersRequest() ); @@ -6823,7 +6825,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListUsersRequest() ); @@ -6874,7 +6876,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListUsersRequest() ); @@ -6916,7 +6918,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListUsersRequest() ); @@ -6959,7 +6961,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListDatabasesRequest() ); @@ -6998,7 +7000,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListDatabasesRequest() ); @@ -7053,7 +7055,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListDatabasesRequest() ); @@ -7084,7 +7086,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListDatabasesRequest() ); @@ -7144,7 +7146,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListDatabasesRequest() ); @@ -7193,7 +7195,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListDatabasesRequest() ); @@ -7242,7 +7244,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1alpha.ListDatabasesRequest() ); @@ -7283,7 +7285,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7313,7 +7315,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7357,7 +7359,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7389,7 +7391,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7419,7 +7421,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7463,7 +7465,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7495,7 +7497,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7528,7 +7530,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7572,7 +7574,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7607,7 +7609,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7637,7 +7639,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7681,7 +7683,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7716,7 +7718,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7764,7 +7766,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7805,7 +7807,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7884,7 +7886,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7964,7 +7966,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -8060,8 +8062,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -8080,7 +8081,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -8089,8 +8090,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -8106,7 +8106,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -8117,7 +8117,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8170,7 +8170,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -8181,7 +8181,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8234,7 +8234,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('connectionInfo', () => { + describe('connectionInfo', async () => { const fakePath = '/rendered/path/connectionInfo'; const expectedParameters = { project: 'projectValue', @@ -8246,7 +8246,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8310,7 +8310,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('database', () => { + describe('database', async () => { const fakePath = '/rendered/path/database'; const expectedParameters = { project: 'projectValue', @@ -8322,7 +8322,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.databasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8386,7 +8386,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -8398,7 +8398,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8462,7 +8462,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8472,7 +8472,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8511,7 +8511,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -8520,7 +8520,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8549,7 +8549,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('supportedDatabaseFlag', () => { + describe('supportedDatabaseFlag', async () => { const fakePath = '/rendered/path/supportedDatabaseFlag'; const expectedParameters = { project: 'projectValue', @@ -8560,7 +8560,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.supportedDatabaseFlagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8627,7 +8627,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { project: 'projectValue', @@ -8639,7 +8639,7 @@ describe('v1alpha.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts index 9edefabbdb7..6a31eb7edc1 100644 --- a/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts +++ b/packages/google-cloud-alloydb/test/gapic_alloy_d_b_admin_v1beta.ts @@ -290,7 +290,9 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.alloyDBAdminStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetClusterRequest() ); @@ -380,7 +382,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetClusterRequest() ); @@ -427,7 +429,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetClusterRequest() ); @@ -458,7 +460,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetClusterRequest() ); @@ -479,7 +481,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetInstanceRequest() ); @@ -510,7 +512,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetInstanceRequest() ); @@ -557,7 +559,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetInstanceRequest() ); @@ -588,7 +590,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetInstanceRequest() ); @@ -609,7 +611,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExecuteSqlRequest() ); @@ -640,7 +642,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExecuteSqlRequest() ); @@ -687,7 +689,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExecuteSqlRequest() ); @@ -718,7 +720,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExecuteSqlRequest() ); @@ -739,7 +741,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetBackupRequest() ); @@ -770,7 +772,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetBackupRequest() ); @@ -817,7 +819,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetBackupRequest() ); @@ -845,7 +847,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetBackupRequest() ); @@ -866,7 +868,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GenerateClientCertificateRequest() ); @@ -898,7 +900,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GenerateClientCertificateRequest() ); @@ -945,7 +947,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GenerateClientCertificateRequest() ); @@ -979,7 +981,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GenerateClientCertificateRequest() ); @@ -1003,7 +1005,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetConnectionInfoRequest() ); @@ -1034,7 +1036,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetConnectionInfoRequest() ); @@ -1081,7 +1083,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetConnectionInfoRequest() ); @@ -1112,7 +1114,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetConnectionInfoRequest() ); @@ -1133,7 +1135,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetUserRequest() ); @@ -1164,7 +1166,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetUserRequest() ); @@ -1211,7 +1213,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetUserRequest() ); @@ -1239,7 +1241,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.GetUserRequest() ); @@ -1260,7 +1262,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateUserRequest() ); @@ -1291,7 +1293,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateUserRequest() ); @@ -1338,7 +1340,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateUserRequest() ); @@ -1369,7 +1371,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateUserRequest() ); @@ -1390,7 +1392,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateUserRequest() ); @@ -1422,7 +1424,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateUserRequest() ); @@ -1470,7 +1472,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateUserRequest() ); @@ -1502,7 +1504,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateUserRequest() ); @@ -1524,7 +1526,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteUserRequest() ); @@ -1555,7 +1557,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteUserRequest() ); @@ -1602,7 +1604,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteUserRequest() ); @@ -1633,7 +1635,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteUserRequest() ); @@ -1654,7 +1656,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateClusterRequest() ); @@ -1687,7 +1689,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateClusterRequest() ); @@ -1741,7 +1743,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateClusterRequest() ); @@ -1772,7 +1774,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateClusterRequest() ); @@ -1805,7 +1807,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1827,7 +1829,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1848,7 +1850,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateClusterRequest() ); @@ -1882,7 +1884,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateClusterRequest() ); @@ -1937,7 +1939,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateClusterRequest() ); @@ -1969,7 +1971,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateClusterRequest() ); @@ -2003,7 +2005,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2025,7 +2027,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2046,7 +2048,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() ); @@ -2079,7 +2081,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() ); @@ -2133,7 +2135,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() ); @@ -2164,7 +2166,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ExportClusterRequest() ); @@ -2197,7 +2199,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2219,7 +2221,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2240,7 +2242,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpgradeClusterRequest() ); @@ -2273,7 +2275,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpgradeClusterRequest() ); @@ -2327,7 +2329,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpgradeClusterRequest() ); @@ -2358,7 +2360,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpgradeClusterRequest() ); @@ -2391,7 +2393,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2413,7 +2415,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2434,7 +2436,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteClusterRequest() ); @@ -2467,7 +2469,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteClusterRequest() ); @@ -2521,7 +2523,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteClusterRequest() ); @@ -2552,7 +2554,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteClusterRequest() ); @@ -2585,7 +2587,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2607,7 +2609,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2628,7 +2630,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.PromoteClusterRequest() ); @@ -2661,7 +2663,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.PromoteClusterRequest() ); @@ -2715,7 +2717,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.PromoteClusterRequest() ); @@ -2746,7 +2748,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.PromoteClusterRequest() ); @@ -2779,7 +2781,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2801,7 +2803,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2822,7 +2824,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.SwitchoverClusterRequest() ); @@ -2855,7 +2857,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.SwitchoverClusterRequest() ); @@ -2909,7 +2911,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.SwitchoverClusterRequest() ); @@ -2940,7 +2942,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.SwitchoverClusterRequest() ); @@ -2973,7 +2975,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2995,7 +2997,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3016,7 +3018,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestoreClusterRequest() ); @@ -3049,7 +3051,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestoreClusterRequest() ); @@ -3103,7 +3105,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestoreClusterRequest() ); @@ -3134,7 +3136,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestoreClusterRequest() ); @@ -3167,7 +3169,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3189,7 +3191,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3210,7 +3212,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryClusterRequest() ); @@ -3243,7 +3245,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryClusterRequest() ); @@ -3297,7 +3299,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryClusterRequest() ); @@ -3331,7 +3333,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryClusterRequest() ); @@ -3364,7 +3366,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3386,7 +3388,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3407,7 +3409,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateInstanceRequest() ); @@ -3440,7 +3442,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateInstanceRequest() ); @@ -3494,7 +3496,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateInstanceRequest() ); @@ -3525,7 +3527,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateInstanceRequest() ); @@ -3558,7 +3560,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3580,7 +3582,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3601,7 +3603,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryInstanceRequest() ); @@ -3634,7 +3636,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryInstanceRequest() ); @@ -3688,7 +3690,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryInstanceRequest() ); @@ -3722,7 +3724,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateSecondaryInstanceRequest() ); @@ -3755,7 +3757,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3778,7 +3780,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3799,7 +3801,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.BatchCreateInstancesRequest() ); @@ -3832,7 +3834,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.BatchCreateInstancesRequest() ); @@ -3886,7 +3888,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.BatchCreateInstancesRequest() ); @@ -3917,7 +3919,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.BatchCreateInstancesRequest() ); @@ -3950,7 +3952,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3972,7 +3974,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3993,7 +3995,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateInstanceRequest() ); @@ -4027,7 +4029,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateInstanceRequest() ); @@ -4082,7 +4084,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateInstanceRequest() ); @@ -4114,7 +4116,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateInstanceRequest() ); @@ -4148,7 +4150,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4170,7 +4172,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4191,7 +4193,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteInstanceRequest() ); @@ -4224,7 +4226,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteInstanceRequest() ); @@ -4278,7 +4280,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteInstanceRequest() ); @@ -4309,7 +4311,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteInstanceRequest() ); @@ -4342,7 +4344,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4364,7 +4366,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4385,7 +4387,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.FailoverInstanceRequest() ); @@ -4418,7 +4420,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.FailoverInstanceRequest() ); @@ -4472,7 +4474,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.FailoverInstanceRequest() ); @@ -4503,7 +4505,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.FailoverInstanceRequest() ); @@ -4536,7 +4538,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4558,7 +4560,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4579,7 +4581,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.InjectFaultRequest() ); @@ -4611,7 +4613,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.InjectFaultRequest() ); @@ -4665,7 +4667,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.InjectFaultRequest() ); @@ -4696,7 +4698,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.InjectFaultRequest() ); @@ -4729,7 +4731,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4751,7 +4753,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4769,7 +4771,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestartInstanceRequest() ); @@ -4802,7 +4804,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestartInstanceRequest() ); @@ -4856,7 +4858,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestartInstanceRequest() ); @@ -4887,7 +4889,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.RestartInstanceRequest() ); @@ -4920,7 +4922,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4942,7 +4944,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4963,7 +4965,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateBackupRequest() ); @@ -4995,7 +4997,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateBackupRequest() ); @@ -5049,7 +5051,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateBackupRequest() ); @@ -5080,7 +5082,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.CreateBackupRequest() ); @@ -5113,7 +5115,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5135,7 +5137,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5153,7 +5155,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateBackupRequest() ); @@ -5186,7 +5188,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateBackupRequest() ); @@ -5241,7 +5243,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateBackupRequest() ); @@ -5273,7 +5275,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.UpdateBackupRequest() ); @@ -5307,7 +5309,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5329,7 +5331,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5347,7 +5349,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteBackupRequest() ); @@ -5379,7 +5381,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteBackupRequest() ); @@ -5433,7 +5435,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteBackupRequest() ); @@ -5464,7 +5466,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.DeleteBackupRequest() ); @@ -5497,7 +5499,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5519,7 +5521,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5537,7 +5539,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListClustersRequest() ); @@ -5570,7 +5572,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListClustersRequest() ); @@ -5619,7 +5621,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListClustersRequest() ); @@ -5650,7 +5652,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListClustersRequest() ); @@ -5704,7 +5706,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListClustersRequest() ); @@ -5755,7 +5757,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListClustersRequest() ); @@ -5798,7 +5800,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListClustersRequest() ); @@ -5840,7 +5842,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListInstancesRequest() ); @@ -5879,7 +5881,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListInstancesRequest() ); @@ -5934,7 +5936,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListInstancesRequest() ); @@ -5965,7 +5967,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListInstancesRequest() ); @@ -6025,7 +6027,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListInstancesRequest() ); @@ -6074,7 +6076,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListInstancesRequest() ); @@ -6123,7 +6125,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListInstancesRequest() ); @@ -6165,7 +6167,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListBackupsRequest() ); @@ -6198,7 +6200,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListBackupsRequest() ); @@ -6247,7 +6249,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListBackupsRequest() ); @@ -6278,7 +6280,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListBackupsRequest() ); @@ -6332,7 +6334,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListBackupsRequest() ); @@ -6383,7 +6385,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListBackupsRequest() ); @@ -6426,7 +6428,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListBackupsRequest() ); @@ -6470,7 +6472,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest() ); @@ -6510,7 +6512,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest() ); @@ -6567,7 +6569,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest() ); @@ -6601,7 +6603,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest() ); @@ -6670,7 +6672,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest() ); @@ -6728,7 +6730,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest() ); @@ -6782,7 +6784,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListSupportedDatabaseFlagsRequest() ); @@ -6829,7 +6831,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListUsersRequest() ); @@ -6862,7 +6864,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListUsersRequest() ); @@ -6911,7 +6913,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListUsersRequest() ); @@ -6939,7 +6941,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListUsersRequest() ); @@ -6993,7 +6995,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListUsersRequest() ); @@ -7044,7 +7046,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListUsersRequest() ); @@ -7086,7 +7088,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListUsersRequest() ); @@ -7129,7 +7131,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListDatabasesRequest() ); @@ -7168,7 +7170,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListDatabasesRequest() ); @@ -7223,7 +7225,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListDatabasesRequest() ); @@ -7254,7 +7256,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListDatabasesRequest() ); @@ -7314,7 +7316,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListDatabasesRequest() ); @@ -7363,7 +7365,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListDatabasesRequest() ); @@ -7412,7 +7414,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.alloydb.v1beta.ListDatabasesRequest() ); @@ -7453,7 +7455,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7483,7 +7485,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7527,7 +7529,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7559,7 +7561,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7589,7 +7591,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7633,7 +7635,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7665,7 +7667,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7698,7 +7700,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7742,7 +7744,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7777,7 +7779,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7807,7 +7809,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7851,7 +7853,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7886,7 +7888,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7934,7 +7936,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7975,7 +7977,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -8054,7 +8056,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -8134,7 +8136,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -8230,8 +8232,7 @@ describe('v1beta.AlloyDBAdminClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -8250,7 +8251,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -8259,8 +8260,7 @@ describe('v1beta.AlloyDBAdminClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -8276,7 +8276,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -8287,7 +8287,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8340,7 +8340,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -8351,7 +8351,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8404,7 +8404,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('connectionInfo', () => { + describe('connectionInfo', async () => { const fakePath = '/rendered/path/connectionInfo'; const expectedParameters = { project: 'projectValue', @@ -8416,7 +8416,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8480,7 +8480,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('database', () => { + describe('database', async () => { const fakePath = '/rendered/path/database'; const expectedParameters = { project: 'projectValue', @@ -8492,7 +8492,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.databasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8556,7 +8556,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -8568,7 +8568,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8632,7 +8632,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8642,7 +8642,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8681,7 +8681,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -8690,7 +8690,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8719,7 +8719,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('supportedDatabaseFlag', () => { + describe('supportedDatabaseFlag', async () => { const fakePath = '/rendered/path/supportedDatabaseFlag'; const expectedParameters = { project: 'projectValue', @@ -8730,7 +8730,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.supportedDatabaseFlagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8797,7 +8797,7 @@ describe('v1beta.AlloyDBAdminClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { project: 'projectValue', @@ -8809,7 +8809,7 @@ describe('v1beta.AlloyDBAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apigateway/package.json b/packages/google-cloud-apigateway/package.json index 935aa3b8f04..490c2590db5 100644 --- a/packages/google-cloud-apigateway/package.json +++ b/packages/google-cloud-apigateway/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json index bf54aa395bc..af791b74f9f 100644 --- a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json +++ b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigateway", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json index bf54aa395bc..af791b74f9f 100644 --- a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json +++ b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigateway", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigateway/src/v1/api_gateway_service_client.ts b/packages/google-cloud-apigateway/src/v1/api_gateway_service_client.ts index 4293123bc4c..cb6fba29ed0 100644 --- a/packages/google-cloud-apigateway/src/v1/api_gateway_service_client.ts +++ b/packages/google-cloud-apigateway/src/v1/api_gateway_service_client.ts @@ -685,7 +685,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGateway request %j', request); const wrappedCallback: | Callback< @@ -794,7 +796,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApi request %j', request); const wrappedCallback: | Callback< @@ -906,7 +910,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApiConfig request %j', request); const wrappedCallback: | Callback< @@ -1041,7 +1047,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1214,7 +1222,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ 'gateway.name': request.gateway!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1382,7 +1392,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1555,7 +1567,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1728,7 +1742,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ 'api.name': request.api!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1896,7 +1912,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2069,7 +2087,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2242,7 +2262,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ 'api_config.name': request.apiConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2410,7 +2432,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2577,7 +2601,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigateway.v1.IListGatewaysRequest, @@ -2647,7 +2673,9 @@ export class ApiGatewayServiceClient { }); const defaultCallSettings = this._defaults['listGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGateways stream %j', request); return this.descriptors.page.listGateways.createStream( this.innerApiCalls.listGateways as GaxCall, @@ -2699,7 +2727,9 @@ export class ApiGatewayServiceClient { }); const defaultCallSettings = this._defaults['listGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGateways iterate %j', request); return this.descriptors.page.listGateways.asyncIterate( this.innerApiCalls['listGateways'] as GaxCall, @@ -2800,7 +2830,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigateway.v1.IListApisRequest, @@ -2870,7 +2902,9 @@ export class ApiGatewayServiceClient { }); const defaultCallSettings = this._defaults['listApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApis stream %j', request); return this.descriptors.page.listApis.createStream( this.innerApiCalls.listApis as GaxCall, @@ -2922,7 +2956,9 @@ export class ApiGatewayServiceClient { }); const defaultCallSettings = this._defaults['listApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApis iterate %j', request); return this.descriptors.page.listApis.asyncIterate( this.innerApiCalls['listApis'] as GaxCall, @@ -3029,7 +3065,9 @@ export class ApiGatewayServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigateway.v1.IListApiConfigsRequest, @@ -3099,7 +3137,9 @@ export class ApiGatewayServiceClient { }); const defaultCallSettings = this._defaults['listApiConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiConfigs stream %j', request); return this.descriptors.page.listApiConfigs.createStream( this.innerApiCalls.listApiConfigs as GaxCall, @@ -3151,7 +3191,9 @@ export class ApiGatewayServiceClient { }); const defaultCallSettings = this._defaults['listApiConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiConfigs iterate %j', request); return this.descriptors.page.listApiConfigs.asyncIterate( this.innerApiCalls['listApiConfigs'] as GaxCall, diff --git a/packages/google-cloud-apigateway/test/gapic_api_gateway_service_v1.ts b/packages/google-cloud-apigateway/test/gapic_api_gateway_service_v1.ts index 0acec163157..0251a674c3b 100644 --- a/packages/google-cloud-apigateway/test/gapic_api_gateway_service_v1.ts +++ b/packages/google-cloud-apigateway/test/gapic_api_gateway_service_v1.ts @@ -285,7 +285,9 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.apiGatewayServiceStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetGatewayRequest() ); @@ -375,7 +377,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetGatewayRequest() ); @@ -422,7 +424,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetGatewayRequest() ); @@ -453,7 +455,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetGatewayRequest() ); @@ -474,7 +476,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiRequest() ); @@ -505,7 +507,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiRequest() ); @@ -552,7 +554,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiRequest() ); @@ -580,7 +582,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiRequest() ); @@ -601,7 +603,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiConfigRequest() ); @@ -632,7 +634,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiConfigRequest() ); @@ -679,7 +681,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiConfigRequest() ); @@ -710,7 +712,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.GetApiConfigRequest() ); @@ -731,7 +733,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateGatewayRequest() ); @@ -764,7 +766,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateGatewayRequest() ); @@ -818,7 +820,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateGatewayRequest() ); @@ -849,7 +851,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateGatewayRequest() ); @@ -882,7 +884,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -904,7 +906,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -925,7 +927,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateGatewayRequest() ); @@ -959,7 +961,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateGatewayRequest() ); @@ -1014,7 +1016,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateGatewayRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateGatewayRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1102,7 +1104,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1123,7 +1125,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteGatewayRequest() ); @@ -1156,7 +1158,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteGatewayRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteGatewayRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteGatewayRequest() ); @@ -1274,7 +1276,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1296,7 +1298,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1317,7 +1319,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiRequest() ); @@ -1403,7 +1405,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiRequest() ); @@ -1434,7 +1436,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiRequest() ); @@ -1467,7 +1469,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1489,7 +1491,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1507,7 +1509,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiRequest() ); @@ -1540,7 +1542,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiRequest() ); @@ -1595,7 +1597,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiRequest() ); @@ -1627,7 +1629,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiRequest() ); @@ -1661,7 +1663,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1683,7 +1685,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1701,7 +1703,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiRequest() ); @@ -1733,7 +1735,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiRequest() ); @@ -1787,7 +1789,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiRequest() ); @@ -1818,7 +1820,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiRequest() ); @@ -1851,7 +1853,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1873,7 +1875,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1891,7 +1893,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiConfigRequest() ); @@ -1924,7 +1926,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiConfigRequest() ); @@ -1978,7 +1980,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiConfigRequest() ); @@ -2009,7 +2011,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.CreateApiConfigRequest() ); @@ -2042,7 +2044,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2064,7 +2066,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2085,7 +2087,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiConfigRequest() ); @@ -2119,7 +2121,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiConfigRequest() ); @@ -2174,7 +2176,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiConfigRequest() ); @@ -2206,7 +2208,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.UpdateApiConfigRequest() ); @@ -2240,7 +2242,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2262,7 +2264,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2283,7 +2285,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiConfigRequest() ); @@ -2316,7 +2318,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiConfigRequest() ); @@ -2370,7 +2372,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiConfigRequest() ); @@ -2401,7 +2403,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.DeleteApiConfigRequest() ); @@ -2434,7 +2436,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2456,7 +2458,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2477,7 +2479,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListGatewaysRequest() ); @@ -2510,7 +2512,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListGatewaysRequest() ); @@ -2559,7 +2561,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListGatewaysRequest() ); @@ -2590,7 +2592,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListGatewaysRequest() ); @@ -2644,7 +2646,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListGatewaysRequest() ); @@ -2695,7 +2697,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListGatewaysRequest() ); @@ -2738,7 +2740,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListGatewaysRequest() ); @@ -2780,7 +2782,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApisRequest() ); @@ -2813,7 +2815,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApisRequest() ); @@ -2862,7 +2864,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApisRequest() ); @@ -2890,7 +2892,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApisRequest() ); @@ -2941,7 +2943,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApisRequest() ); @@ -2989,7 +2991,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApisRequest() ); @@ -3031,7 +3033,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApisRequest() ); @@ -3074,7 +3076,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApiConfigsRequest() ); @@ -3113,7 +3115,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApiConfigsRequest() ); @@ -3168,7 +3170,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApiConfigsRequest() ); @@ -3199,7 +3201,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApiConfigsRequest() ); @@ -3259,7 +3261,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApiConfigsRequest() ); @@ -3308,7 +3310,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApiConfigsRequest() ); @@ -3357,7 +3359,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigateway.v1.ListApiConfigsRequest() ); @@ -3394,7 +3396,7 @@ describe('v1.ApiGatewayServiceClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -3404,7 +3406,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3443,7 +3445,7 @@ describe('v1.ApiGatewayServiceClient', () => { }); }); - describe('apiConfig', () => { + describe('apiConfig', async () => { const fakePath = '/rendered/path/apiConfig'; const expectedParameters = { project: 'projectValue', @@ -3454,7 +3456,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3507,7 +3509,7 @@ describe('v1.ApiGatewayServiceClient', () => { }); }); - describe('gateway', () => { + describe('gateway', async () => { const fakePath = '/rendered/path/gateway'; const expectedParameters = { project: 'projectValue', @@ -3518,7 +3520,7 @@ describe('v1.ApiGatewayServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.gatewayPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apigeeconnect/package.json b/packages/google-cloud-apigeeconnect/package.json index d1c3bd12ffe..b9fd5c1aee6 100644 --- a/packages/google-cloud-apigeeconnect/package.json +++ b/packages/google-cloud-apigeeconnect/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json index 14dddf0801e..bacdbbfd086 100644 --- a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json +++ b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeconnect", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json index 14dddf0801e..bacdbbfd086 100644 --- a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json +++ b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeconnect", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeconnect/src/v1/connection_service_client.ts b/packages/google-cloud-apigeeconnect/src/v1/connection_service_client.ts index b9b1d0bc1d8..9b99c1a53c1 100644 --- a/packages/google-cloud-apigeeconnect/src/v1/connection_service_client.ts +++ b/packages/google-cloud-apigeeconnect/src/v1/connection_service_client.ts @@ -484,7 +484,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeconnect.v1.IListConnectionsRequest, @@ -556,7 +558,9 @@ export class ConnectionServiceClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections stream %j', request); return this.descriptors.page.listConnections.createStream( this.innerApiCalls.listConnections as GaxCall, @@ -610,7 +614,9 @@ export class ConnectionServiceClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections iterate %j', request); return this.descriptors.page.listConnections.asyncIterate( this.innerApiCalls['listConnections'] as GaxCall, diff --git a/packages/google-cloud-apigeeconnect/src/v1/tether_client.ts b/packages/google-cloud-apigeeconnect/src/v1/tether_client.ts index 252cf3a9e40..3a9b40b3d05 100644 --- a/packages/google-cloud-apigeeconnect/src/v1/tether_client.ts +++ b/packages/google-cloud-apigeeconnect/src/v1/tether_client.ts @@ -404,7 +404,9 @@ export class TetherClient { * region_tag:apigeeconnect_v1_generated_Tether_Egress_async */ egress(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('egress stream %j', options); return this.innerApiCalls.egress(null, options); } diff --git a/packages/google-cloud-apigeeconnect/test/gapic_connection_service_v1.ts b/packages/google-cloud-apigeeconnect/test/gapic_connection_service_v1.ts index fc87be23807..84b7db7dedc 100644 --- a/packages/google-cloud-apigeeconnect/test/gapic_connection_service_v1.ts +++ b/packages/google-cloud-apigeeconnect/test/gapic_connection_service_v1.ts @@ -256,7 +256,9 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.connectionServiceStub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.ListConnectionsRequest() ); @@ -354,7 +356,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.ListConnectionsRequest() ); @@ -409,7 +411,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.ListConnectionsRequest() ); @@ -440,7 +442,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.ListConnectionsRequest() ); @@ -500,7 +502,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.ListConnectionsRequest() ); @@ -549,7 +551,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.ListConnectionsRequest() ); @@ -598,7 +600,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.ListConnectionsRequest() ); @@ -636,7 +638,7 @@ describe('v1.ConnectionServiceClient', () => { }); describe('Path templates', () => { - describe('endpoint', () => { + describe('endpoint', async () => { const fakePath = '/rendered/path/endpoint'; const expectedParameters = { project: 'projectValue', @@ -646,7 +648,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apigeeconnect/test/gapic_tether_v1.ts b/packages/google-cloud-apigeeconnect/test/gapic_tether_v1.ts index ded0cef3a91..81a7988b7e0 100644 --- a/packages/google-cloud-apigeeconnect/test/gapic_tether_v1.ts +++ b/packages/google-cloud-apigeeconnect/test/gapic_tether_v1.ts @@ -191,7 +191,9 @@ describe('v1.TetherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tetherStub); client.close().then(() => { done(); @@ -250,7 +252,7 @@ describe('v1.TetherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.EgressResponse() ); @@ -290,7 +292,7 @@ describe('v1.TetherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeconnect.v1.EgressResponse() ); diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 03dbf313016..0db2745af6e 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -43,7 +43,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index ee37fddb672..08b54b47234 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json index ee37fddb672..08b54b47234 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts index 815b387a0fa..eba01e90f20 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/provisioning_client.ts @@ -693,7 +693,9 @@ export class ProvisioningClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -827,7 +829,9 @@ export class ProvisioningClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -995,7 +999,9 @@ export class ProvisioningClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1373,7 +1379,7 @@ export class ProvisioningClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts index ec2d59dad73..e6cf70cc5be 100644 --- a/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts +++ b/packages/google-cloud-apigeeregistry/src/v1/registry_client.ts @@ -577,7 +577,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApi request %j', request); const wrappedCallback: | Callback< @@ -704,7 +706,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createApi request %j', request); const wrappedCallback: | Callback< @@ -831,7 +835,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ 'api.name': request.api!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateApi request %j', request); const wrappedCallback: | Callback< @@ -952,7 +958,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteApi request %j', request); const wrappedCallback: | Callback< @@ -1069,7 +1077,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApiVersion request %j', request); const wrappedCallback: | Callback< @@ -1205,7 +1215,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createApiVersion request %j', request); const wrappedCallback: | Callback< @@ -1341,7 +1353,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ 'api_version.name': request.apiVersion!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateApiVersion request %j', request); const wrappedCallback: | Callback< @@ -1471,7 +1485,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteApiVersion request %j', request); const wrappedCallback: | Callback< @@ -1591,7 +1607,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApiSpec request %j', request); const wrappedCallback: | Callback< @@ -1717,7 +1735,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApiSpecContents request %j', request); const wrappedCallback: | Callback< @@ -1847,7 +1867,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createApiSpec request %j', request); const wrappedCallback: | Callback< @@ -1977,7 +1999,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ 'api_spec.name': request.apiSpec!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateApiSpec request %j', request); const wrappedCallback: | Callback< @@ -2101,7 +2125,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteApiSpec request %j', request); const wrappedCallback: | Callback< @@ -2229,7 +2255,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('tagApiSpecRevision request %j', request); const wrappedCallback: | Callback< @@ -2354,7 +2382,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rollbackApiSpec request %j', request); const wrappedCallback: | Callback< @@ -2483,7 +2513,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteApiSpecRevision request %j', request); const wrappedCallback: | Callback< @@ -2609,7 +2641,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApiDeployment request %j', request); const wrappedCallback: | Callback< @@ -2745,7 +2779,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createApiDeployment request %j', request); const wrappedCallback: | Callback< @@ -2881,7 +2917,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ 'api_deployment.name': request.apiDeployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateApiDeployment request %j', request); const wrappedCallback: | Callback< @@ -3011,7 +3049,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteApiDeployment request %j', request); const wrappedCallback: | Callback< @@ -3140,7 +3180,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('tagApiDeploymentRevision request %j', request); const wrappedCallback: | Callback< @@ -3271,7 +3313,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rollbackApiDeployment request %j', request); const wrappedCallback: | Callback< @@ -3400,7 +3444,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteApiDeploymentRevision request %j', request); const wrappedCallback: | Callback< @@ -3520,7 +3566,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getArtifact request %j', request); const wrappedCallback: | Callback< @@ -3646,7 +3694,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getArtifactContents request %j', request); const wrappedCallback: | Callback< @@ -3776,7 +3826,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createArtifact request %j', request); const wrappedCallback: | Callback< @@ -3898,7 +3950,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ 'artifact.name': request.artifact!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('replaceArtifact request %j', request); const wrappedCallback: | Callback< @@ -4018,7 +4072,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteArtifact request %j', request); const wrappedCallback: | Callback< @@ -4156,7 +4212,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeregistry.v1.IListApisRequest, @@ -4232,7 +4290,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApis stream %j', request); return this.descriptors.page.listApis.createStream( this.innerApiCalls.listApis as GaxCall, @@ -4290,7 +4350,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApis iterate %j', request); return this.descriptors.page.listApis.asyncIterate( this.innerApiCalls['listApis'] as GaxCall, @@ -4403,7 +4465,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeregistry.v1.IListApiVersionsRequest, @@ -4479,7 +4543,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiVersions stream %j', request); return this.descriptors.page.listApiVersions.createStream( this.innerApiCalls.listApiVersions as GaxCall, @@ -4537,7 +4603,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiVersions iterate %j', request); return this.descriptors.page.listApiVersions.asyncIterate( this.innerApiCalls['listApiVersions'] as GaxCall, @@ -4650,7 +4718,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeregistry.v1.IListApiSpecsRequest, @@ -4726,7 +4796,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiSpecs stream %j', request); return this.descriptors.page.listApiSpecs.createStream( this.innerApiCalls.listApiSpecs as GaxCall, @@ -4784,7 +4856,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiSpecs iterate %j', request); return this.descriptors.page.listApiSpecs.asyncIterate( this.innerApiCalls['listApiSpecs'] as GaxCall, @@ -4888,7 +4962,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeregistry.v1.IListApiSpecRevisionsRequest, @@ -4954,7 +5030,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiSpecRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiSpecRevisions stream %j', request); return this.descriptors.page.listApiSpecRevisions.createStream( this.innerApiCalls.listApiSpecRevisions as GaxCall, @@ -5002,7 +5080,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiSpecRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiSpecRevisions iterate %j', request); return this.descriptors.page.listApiSpecRevisions.asyncIterate( this.innerApiCalls['listApiSpecRevisions'] as GaxCall, @@ -5115,7 +5195,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeregistry.v1.IListApiDeploymentsRequest, @@ -5191,7 +5273,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiDeployments stream %j', request); return this.descriptors.page.listApiDeployments.createStream( this.innerApiCalls.listApiDeployments as GaxCall, @@ -5249,7 +5333,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiDeployments iterate %j', request); return this.descriptors.page.listApiDeployments.asyncIterate( this.innerApiCalls['listApiDeployments'] as GaxCall, @@ -5353,7 +5439,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeregistry.v1.IListApiDeploymentRevisionsRequest, @@ -5419,7 +5507,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiDeploymentRevisions stream %j', request); return this.descriptors.page.listApiDeploymentRevisions.createStream( this.innerApiCalls.listApiDeploymentRevisions as GaxCall, @@ -5467,7 +5557,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listApiDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiDeploymentRevisions iterate %j', request); return this.descriptors.page.listApiDeploymentRevisions.asyncIterate( this.innerApiCalls['listApiDeploymentRevisions'] as GaxCall, @@ -5580,7 +5672,9 @@ export class RegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apigeeregistry.v1.IListArtifactsRequest, @@ -5656,7 +5750,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listArtifacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listArtifacts stream %j', request); return this.descriptors.page.listArtifacts.createStream( this.innerApiCalls.listArtifacts as GaxCall, @@ -5714,7 +5810,9 @@ export class RegistryClient { }); const defaultCallSettings = this._defaults['listArtifacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listArtifacts iterate %j', request); return this.descriptors.page.listArtifacts.asyncIterate( this.innerApiCalls['listArtifacts'] as GaxCall, diff --git a/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts index a6e394e10b7..b2fbbea7af9 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_provisioning_v1.ts @@ -253,7 +253,9 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.provisioningStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); @@ -343,7 +345,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); @@ -390,7 +392,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); @@ -421,7 +423,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetInstanceRequest() ); @@ -442,7 +444,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); @@ -475,7 +477,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); @@ -529,7 +531,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); @@ -560,7 +562,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateInstanceRequest() ); @@ -593,7 +595,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -615,7 +617,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -636,7 +638,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); @@ -669,7 +671,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); @@ -723,7 +725,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); @@ -754,7 +756,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteInstanceRequest() ); @@ -787,7 +789,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -809,7 +811,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -829,7 +831,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -859,7 +861,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -903,7 +905,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -935,7 +937,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -965,7 +967,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1153,7 +1155,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1183,7 +1185,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1227,7 +1229,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1310,7 +1312,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1351,7 +1353,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1430,7 +1432,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1510,7 +1512,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1606,8 +1608,7 @@ describe('v1.ProvisioningClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1626,7 +1627,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1635,8 +1636,7 @@ describe('v1.ProvisioningClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1652,7 +1652,7 @@ describe('v1.ProvisioningClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -1663,7 +1663,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1716,7 +1716,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('apiDeployment', () => { + describe('apiDeployment', async () => { const fakePath = '/rendered/path/apiDeployment'; const expectedParameters = { project: 'projectValue', @@ -1728,7 +1728,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiDeploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1792,7 +1792,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('apiSpec', () => { + describe('apiSpec', async () => { const fakePath = '/rendered/path/apiSpec'; const expectedParameters = { project: 'projectValue', @@ -1805,7 +1805,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1880,7 +1880,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('apiVersion', () => { + describe('apiVersion', async () => { const fakePath = '/rendered/path/apiVersion'; const expectedParameters = { project: 'projectValue', @@ -1892,7 +1892,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1956,7 +1956,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -1967,7 +1967,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2020,7 +2020,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2030,7 +2030,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2069,7 +2069,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('projectLocationApiArtifact', () => { + describe('projectLocationApiArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiArtifact'; const expectedParameters = { project: 'projectValue', @@ -2081,7 +2081,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiArtifactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2164,7 +2164,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('projectLocationApiDeploymentArtifact', () => { + describe('projectLocationApiDeploymentArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiDeploymentArtifact'; const expectedParameters = { project: 'projectValue', @@ -2177,7 +2177,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match = @@ -2287,7 +2287,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('projectLocationApiVersionArtifact', () => { + describe('projectLocationApiVersionArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiVersionArtifact'; const expectedParameters = { project: 'projectValue', @@ -2300,7 +2300,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match = @@ -2404,7 +2404,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('projectLocationApiVersionSpecArtifact', () => { + describe('projectLocationApiVersionSpecArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiVersionSpecArtifact'; const expectedParameters = { project: 'projectValue', @@ -2418,7 +2418,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match = @@ -2548,7 +2548,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('projectLocationArtifact', () => { + describe('projectLocationArtifact', async () => { const fakePath = '/rendered/path/projectLocationArtifact'; const expectedParameters = { project: 'projectValue', @@ -2559,7 +2559,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationArtifactPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts index 3fa7bbcda0e..1b380df5a2e 100644 --- a/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts +++ b/packages/google-cloud-apigeeregistry/test/gapic_registry_v1.ts @@ -253,7 +253,9 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.registryStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); @@ -343,7 +345,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); @@ -390,7 +392,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); @@ -418,7 +420,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiRequest() ); @@ -439,7 +441,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); @@ -470,7 +472,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); @@ -517,7 +519,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); @@ -545,7 +547,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiRequest() ); @@ -566,7 +568,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); @@ -598,7 +600,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); @@ -646,7 +648,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); @@ -675,7 +677,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiRequest() ); @@ -697,7 +699,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); @@ -728,7 +730,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); @@ -775,7 +777,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiRequest() ); @@ -824,7 +826,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); @@ -855,7 +857,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); @@ -902,7 +904,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); @@ -933,7 +935,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiVersionRequest() ); @@ -954,7 +956,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); @@ -985,7 +987,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); @@ -1063,7 +1065,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiVersionRequest() ); @@ -1084,7 +1086,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); @@ -1116,7 +1118,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); @@ -1196,7 +1198,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest() ); @@ -1218,7 +1220,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); @@ -1249,7 +1251,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); @@ -1327,7 +1329,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest() ); @@ -1348,7 +1350,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); @@ -1379,7 +1381,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); @@ -1426,7 +1428,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); @@ -1457,7 +1459,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecRequest() ); @@ -1478,7 +1480,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); @@ -1510,7 +1512,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); @@ -1554,7 +1556,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); @@ -1585,7 +1587,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest() ); @@ -1606,7 +1608,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); @@ -1637,7 +1639,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); @@ -1715,7 +1717,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiSpecRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); @@ -1768,7 +1770,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); @@ -1816,7 +1818,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); @@ -1848,7 +1850,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest() ); @@ -1870,7 +1872,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); @@ -1901,7 +1903,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); @@ -1948,7 +1950,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); @@ -1979,7 +1981,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest() ); @@ -2000,7 +2002,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); @@ -2032,7 +2034,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); @@ -2079,7 +2081,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); @@ -2110,7 +2112,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest() ); @@ -2131,7 +2133,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); @@ -2162,7 +2164,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); @@ -2209,7 +2211,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); @@ -2240,7 +2242,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest() ); @@ -2261,7 +2263,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); @@ -2293,7 +2295,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); @@ -2340,7 +2342,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); @@ -2374,7 +2376,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest() ); @@ -2398,7 +2400,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); @@ -2429,7 +2431,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); @@ -2476,7 +2478,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); @@ -2507,7 +2509,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest() ); @@ -2528,7 +2530,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); @@ -2560,7 +2562,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); @@ -2607,7 +2609,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); @@ -2638,7 +2640,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest() ); @@ -2659,7 +2661,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); @@ -2692,7 +2694,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); @@ -2740,7 +2742,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); @@ -2772,7 +2774,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest() ); @@ -2794,7 +2796,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); @@ -2826,7 +2828,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); @@ -2873,7 +2875,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); @@ -2904,7 +2906,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest() ); @@ -2925,7 +2927,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); @@ -2957,7 +2959,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); @@ -3004,7 +3006,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); @@ -3038,7 +3040,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest() ); @@ -3062,7 +3064,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); @@ -3094,7 +3096,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); @@ -3141,7 +3143,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); @@ -3175,7 +3177,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest() ); @@ -3199,7 +3201,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); @@ -3231,7 +3233,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); @@ -3278,7 +3280,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); @@ -3312,7 +3314,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest() ); @@ -3336,7 +3338,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); @@ -3367,7 +3369,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); @@ -3414,7 +3416,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); @@ -3445,7 +3447,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactRequest() ); @@ -3466,7 +3468,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); @@ -3498,7 +3500,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); @@ -3542,7 +3544,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); @@ -3573,7 +3575,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest() ); @@ -3594,7 +3596,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() ); @@ -3625,7 +3627,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() ); @@ -3672,7 +3674,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() ); @@ -3703,7 +3705,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.CreateArtifactRequest() ); @@ -3724,7 +3726,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); @@ -3756,7 +3758,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); @@ -3804,7 +3806,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); @@ -3836,7 +3838,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest() ); @@ -3858,7 +3860,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); @@ -3889,7 +3891,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); @@ -3936,7 +3938,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); @@ -3967,7 +3969,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.DeleteArtifactRequest() ); @@ -3988,7 +3990,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); @@ -4021,7 +4023,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); @@ -4070,7 +4072,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); @@ -4098,7 +4100,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); @@ -4152,7 +4154,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); @@ -4203,7 +4205,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); @@ -4245,7 +4247,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApisRequest() ); @@ -4288,7 +4290,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); @@ -4327,7 +4329,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); @@ -4382,7 +4384,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); @@ -4413,7 +4415,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); @@ -4474,7 +4476,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); @@ -4524,7 +4526,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); @@ -4573,7 +4575,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiVersionsRequest() ); @@ -4616,7 +4618,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); @@ -4655,7 +4657,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); @@ -4710,7 +4712,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); @@ -4741,7 +4743,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); @@ -4801,7 +4803,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); @@ -4852,7 +4854,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); @@ -4901,7 +4903,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecsRequest() ); @@ -4943,7 +4945,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); @@ -4983,7 +4985,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); @@ -5038,7 +5040,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); @@ -5069,7 +5071,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); @@ -5129,7 +5131,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); @@ -5178,7 +5180,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); @@ -5227,7 +5229,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest() ); @@ -5269,7 +5271,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); @@ -5309,7 +5311,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); @@ -5366,7 +5368,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); @@ -5397,7 +5399,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); @@ -5458,7 +5460,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); @@ -5508,7 +5510,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); @@ -5558,7 +5560,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest() ); @@ -5601,7 +5603,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); @@ -5641,7 +5643,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); @@ -5698,7 +5700,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); @@ -5732,7 +5734,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); @@ -5799,7 +5801,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); @@ -5855,7 +5857,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); @@ -5909,7 +5911,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest() ); @@ -5956,7 +5958,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); @@ -5995,7 +5997,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); @@ -6050,7 +6052,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); @@ -6081,7 +6083,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); @@ -6141,7 +6143,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); @@ -6190,7 +6192,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); @@ -6239,7 +6241,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apigeeregistry.v1.ListArtifactsRequest() ); @@ -6280,7 +6282,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6310,7 +6312,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6354,7 +6356,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6386,7 +6388,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6416,7 +6418,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6460,7 +6462,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6492,7 +6494,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6525,7 +6527,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6569,7 +6571,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6604,7 +6606,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6634,7 +6636,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6678,7 +6680,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6713,7 +6715,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6761,7 +6763,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6798,7 +6800,7 @@ describe('v1.RegistryClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -6809,7 +6811,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6862,7 +6864,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('apiDeployment', () => { + describe('apiDeployment', async () => { const fakePath = '/rendered/path/apiDeployment'; const expectedParameters = { project: 'projectValue', @@ -6874,7 +6876,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiDeploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6938,7 +6940,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('apiSpec', () => { + describe('apiSpec', async () => { const fakePath = '/rendered/path/apiSpec'; const expectedParameters = { project: 'projectValue', @@ -6951,7 +6953,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7026,7 +7028,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('apiVersion', () => { + describe('apiVersion', async () => { const fakePath = '/rendered/path/apiVersion'; const expectedParameters = { project: 'projectValue', @@ -7038,7 +7040,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7102,7 +7104,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -7113,7 +7115,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7166,7 +7168,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -7176,7 +7178,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7215,7 +7217,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -7224,7 +7226,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7253,7 +7255,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('projectLocationApiArtifact', () => { + describe('projectLocationApiArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiArtifact'; const expectedParameters = { project: 'projectValue', @@ -7265,7 +7267,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiArtifactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7348,7 +7350,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('projectLocationApiDeploymentArtifact', () => { + describe('projectLocationApiDeploymentArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiDeploymentArtifact'; const expectedParameters = { project: 'projectValue', @@ -7361,7 +7363,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationApiDeploymentArtifactPathTemplate.match = @@ -7471,7 +7473,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('projectLocationApiVersionArtifact', () => { + describe('projectLocationApiVersionArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiVersionArtifact'; const expectedParameters = { project: 'projectValue', @@ -7484,7 +7486,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationApiVersionArtifactPathTemplate.match = @@ -7588,7 +7590,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('projectLocationApiVersionSpecArtifact', () => { + describe('projectLocationApiVersionSpecArtifact', async () => { const fakePath = '/rendered/path/projectLocationApiVersionSpecArtifact'; const expectedParameters = { project: 'projectValue', @@ -7602,7 +7604,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationApiVersionSpecArtifactPathTemplate.match = @@ -7732,7 +7734,7 @@ describe('v1.RegistryClient', () => { }); }); - describe('projectLocationArtifact', () => { + describe('projectLocationArtifact', async () => { const fakePath = '/rendered/path/projectLocationArtifact'; const expectedParameters = { project: 'projectValue', @@ -7743,7 +7745,7 @@ describe('v1.RegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationArtifactPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apihub/package.json b/packages/google-cloud-apihub/package.json index 2918e69494b..fbe4c79fe59 100644 --- a/packages/google-cloud-apihub/package.json +++ b/packages/google-cloud-apihub/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json b/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json index fd99352ca62..b35082f8e8e 100644 --- a/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json +++ b/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apihub", - "version": "0.1.1", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apihub/src/v1/api_hub_client.ts b/packages/google-cloud-apihub/src/v1/api_hub_client.ts index af197bb7d79..b994a200d56 100644 --- a/packages/google-cloud-apihub/src/v1/api_hub_client.ts +++ b/packages/google-cloud-apihub/src/v1/api_hub_client.ts @@ -603,7 +603,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createApi request %j', request); const wrappedCallback: | Callback< @@ -710,7 +712,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApi request %j', request); const wrappedCallback: | Callback< @@ -840,7 +844,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ 'api.name': request.api!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateApi request %j', request); const wrappedCallback: | Callback< @@ -951,7 +957,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteApi request %j', request); const wrappedCallback: | Callback< @@ -1072,7 +1080,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createVersion request %j', request); const wrappedCallback: | Callback< @@ -1184,7 +1194,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -1312,7 +1324,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ 'version.name': request.version!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateVersion request %j', request); const wrappedCallback: | Callback< @@ -1428,7 +1442,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteVersion request %j', request); const wrappedCallback: | Callback< @@ -1571,7 +1587,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSpec request %j', request); const wrappedCallback: | Callback< @@ -1682,7 +1700,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpec request %j', request); const wrappedCallback: | Callback< @@ -1792,7 +1812,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpecContents request %j', request); const wrappedCallback: | Callback< @@ -1927,7 +1949,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ 'spec.name': request.spec!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSpec request %j', request); const wrappedCallback: | Callback< @@ -2037,7 +2061,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSpec request %j', request); const wrappedCallback: | Callback< @@ -2147,7 +2173,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApiOperation request %j', request); const wrappedCallback: | Callback< @@ -2259,7 +2287,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDefinition request %j', request); const wrappedCallback: | Callback< @@ -2385,7 +2415,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDeployment request %j', request); const wrappedCallback: | Callback< @@ -2496,7 +2528,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployment request %j', request); const wrappedCallback: | Callback< @@ -2628,7 +2662,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ 'deployment.name': request.deployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDeployment request %j', request); const wrappedCallback: | Callback< @@ -2739,7 +2775,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDeployment request %j', request); const wrappedCallback: | Callback< @@ -2869,7 +2907,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAttribute request %j', request); const wrappedCallback: | Callback< @@ -2979,7 +3019,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttribute request %j', request); const wrappedCallback: | Callback< @@ -3115,7 +3157,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ 'attribute.name': request.attribute!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAttribute request %j', request); const wrappedCallback: | Callback< @@ -3231,7 +3275,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAttribute request %j', request); const wrappedCallback: | Callback< @@ -3362,7 +3408,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createExternalApi request %j', request); const wrappedCallback: | Callback< @@ -3474,7 +3522,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExternalApi request %j', request); const wrappedCallback: | Callback< @@ -3607,7 +3657,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ 'external_api.name': request.externalApi!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateExternalApi request %j', request); const wrappedCallback: | Callback< @@ -3725,7 +3777,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteExternalApi request %j', request); const wrappedCallback: | Callback< @@ -3921,7 +3975,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListApisRequest, @@ -4064,7 +4120,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApis stream %j', request); return this.descriptors.page.listApis.createStream( this.innerApiCalls.listApis as GaxCall, @@ -4191,7 +4249,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApis iterate %j', request); return this.descriptors.page.listApis.asyncIterate( this.innerApiCalls['listApis'] as GaxCall, @@ -4355,7 +4415,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListVersionsRequest, @@ -4488,7 +4550,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -4603,7 +4667,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, @@ -4758,7 +4824,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListSpecsRequest, @@ -4882,7 +4950,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpecs stream %j', request); return this.descriptors.page.listSpecs.createStream( this.innerApiCalls.listSpecs as GaxCall, @@ -4990,7 +5060,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpecs iterate %j', request); return this.descriptors.page.listSpecs.asyncIterate( this.innerApiCalls['listSpecs'] as GaxCall, @@ -5142,7 +5214,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListApiOperationsRequest, @@ -5257,7 +5331,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listApiOperations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiOperations stream %j', request); return this.descriptors.page.listApiOperations.createStream( this.innerApiCalls.listApiOperations as GaxCall, @@ -5354,7 +5430,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listApiOperations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApiOperations iterate %j', request); return this.descriptors.page.listApiOperations.asyncIterate( this.innerApiCalls['listApiOperations'] as GaxCall, @@ -5517,7 +5595,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListDeploymentsRequest, @@ -5649,7 +5729,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments stream %j', request); return this.descriptors.page.listDeployments.createStream( this.innerApiCalls.listDeployments as GaxCall, @@ -5763,7 +5845,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments iterate %j', request); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, @@ -5911,7 +5995,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListAttributesRequest, @@ -6028,7 +6114,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listAttributes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttributes stream %j', request); return this.descriptors.page.listAttributes.createStream( this.innerApiCalls.listAttributes as GaxCall, @@ -6127,7 +6215,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listAttributes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttributes iterate %j', request); return this.descriptors.page.listAttributes.asyncIterate( this.innerApiCalls['listAttributes'] as GaxCall, @@ -6260,7 +6350,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.ISearchResourcesRequest, @@ -6362,7 +6454,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['searchResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchResources stream %j', request); return this.descriptors.page.searchResources.createStream( this.innerApiCalls.searchResources as GaxCall, @@ -6446,7 +6540,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['searchResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchResources iterate %j', request); return this.descriptors.page.searchResources.asyncIterate( this.innerApiCalls['searchResources'] as GaxCall, @@ -6556,7 +6652,9 @@ export class ApiHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListExternalApisRequest, @@ -6629,7 +6727,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listExternalApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExternalApis stream %j', request); return this.descriptors.page.listExternalApis.createStream( this.innerApiCalls.listExternalApis as GaxCall, @@ -6684,7 +6784,9 @@ export class ApiHubClient { }); const defaultCallSettings = this._defaults['listExternalApis']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExternalApis iterate %j', request); return this.descriptors.page.listExternalApis.asyncIterate( this.innerApiCalls['listExternalApis'] as GaxCall, diff --git a/packages/google-cloud-apihub/src/v1/api_hub_dependencies_client.ts b/packages/google-cloud-apihub/src/v1/api_hub_dependencies_client.ts index a17ed30e3bd..75d87f081e7 100644 --- a/packages/google-cloud-apihub/src/v1/api_hub_dependencies_client.ts +++ b/packages/google-cloud-apihub/src/v1/api_hub_dependencies_client.ts @@ -539,7 +539,9 @@ export class ApiHubDependenciesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDependency request %j', request); const wrappedCallback: | Callback< @@ -650,7 +652,9 @@ export class ApiHubDependenciesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDependency request %j', request); const wrappedCallback: | Callback< @@ -771,7 +775,9 @@ export class ApiHubDependenciesClient { this._gaxModule.routingHeader.fromParams({ 'dependency.name': request.dependency!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDependency request %j', request); const wrappedCallback: | Callback< @@ -882,7 +888,9 @@ export class ApiHubDependenciesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDependency request %j', request); const wrappedCallback: | Callback< @@ -1049,7 +1057,9 @@ export class ApiHubDependenciesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListDependenciesRequest, @@ -1157,7 +1167,9 @@ export class ApiHubDependenciesClient { }); const defaultCallSettings = this._defaults['listDependencies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDependencies stream %j', request); return this.descriptors.page.listDependencies.createStream( this.innerApiCalls.listDependencies as GaxCall, @@ -1247,7 +1259,9 @@ export class ApiHubDependenciesClient { }); const defaultCallSettings = this._defaults['listDependencies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDependencies iterate %j', request); return this.descriptors.page.listDependencies.asyncIterate( this.innerApiCalls['listDependencies'] as GaxCall, diff --git a/packages/google-cloud-apihub/src/v1/api_hub_plugin_client.ts b/packages/google-cloud-apihub/src/v1/api_hub_plugin_client.ts index e701d239d59..ecd82740849 100644 --- a/packages/google-cloud-apihub/src/v1/api_hub_plugin_client.ts +++ b/packages/google-cloud-apihub/src/v1/api_hub_plugin_client.ts @@ -504,7 +504,9 @@ export class ApiHubPluginClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPlugin request %j', request); const wrappedCallback: | Callback< @@ -612,7 +614,9 @@ export class ApiHubPluginClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enablePlugin request %j', request); const wrappedCallback: | Callback< @@ -722,7 +726,9 @@ export class ApiHubPluginClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('disablePlugin request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-apihub/src/v1/host_project_registration_service_client.ts b/packages/google-cloud-apihub/src/v1/host_project_registration_service_client.ts index b37af5cc392..850c94ffa77 100644 --- a/packages/google-cloud-apihub/src/v1/host_project_registration_service_client.ts +++ b/packages/google-cloud-apihub/src/v1/host_project_registration_service_client.ts @@ -550,7 +550,9 @@ export class HostProjectRegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createHostProjectRegistration request %j', request); const wrappedCallback: | Callback< @@ -676,7 +678,9 @@ export class HostProjectRegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHostProjectRegistration request %j', request); const wrappedCallback: | Callback< @@ -832,7 +836,9 @@ export class HostProjectRegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListHostProjectRegistrationsRequest, @@ -926,7 +932,9 @@ export class HostProjectRegistrationServiceClient { }); const defaultCallSettings = this._defaults['listHostProjectRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHostProjectRegistrations stream %j', request); return this.descriptors.page.listHostProjectRegistrations.createStream( this.innerApiCalls.listHostProjectRegistrations as GaxCall, @@ -1002,7 +1010,9 @@ export class HostProjectRegistrationServiceClient { }); const defaultCallSettings = this._defaults['listHostProjectRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHostProjectRegistrations iterate %j', request); return this.descriptors.page.listHostProjectRegistrations.asyncIterate( this.innerApiCalls['listHostProjectRegistrations'] as GaxCall, diff --git a/packages/google-cloud-apihub/src/v1/linting_service_client.ts b/packages/google-cloud-apihub/src/v1/linting_service_client.ts index f36a64fbcf4..ef32d1057e3 100644 --- a/packages/google-cloud-apihub/src/v1/linting_service_client.ts +++ b/packages/google-cloud-apihub/src/v1/linting_service_client.ts @@ -508,7 +508,9 @@ export class LintingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStyleGuide request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class LintingServiceClient { this._gaxModule.routingHeader.fromParams({ 'style_guide.name': request.styleGuide!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateStyleGuide request %j', request); const wrappedCallback: | Callback< @@ -739,7 +743,9 @@ export class LintingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStyleGuideContents request %j', request); const wrappedCallback: | Callback< @@ -854,7 +860,9 @@ export class LintingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lintSpec request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-apihub/src/v1/provisioning_client.ts b/packages/google-cloud-apihub/src/v1/provisioning_client.ts index 42281b5020c..44befc1b74c 100644 --- a/packages/google-cloud-apihub/src/v1/provisioning_client.ts +++ b/packages/google-cloud-apihub/src/v1/provisioning_client.ts @@ -578,7 +578,9 @@ export class ProvisioningClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApiHubInstance request %j', request); const wrappedCallback: | Callback< @@ -698,7 +700,9 @@ export class ProvisioningClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupApiHubInstance request %j', request); const wrappedCallback: | Callback< @@ -840,7 +844,9 @@ export class ProvisioningClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1080,7 +1086,7 @@ export class ProvisioningClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-apihub/src/v1/runtime_project_attachment_service_client.ts b/packages/google-cloud-apihub/src/v1/runtime_project_attachment_service_client.ts index 32a4d23cf9d..01fa0e7c907 100644 --- a/packages/google-cloud-apihub/src/v1/runtime_project_attachment_service_client.ts +++ b/packages/google-cloud-apihub/src/v1/runtime_project_attachment_service_client.ts @@ -548,7 +548,9 @@ export class RuntimeProjectAttachmentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRuntimeProjectAttachment request %j', request); const wrappedCallback: | Callback< @@ -681,7 +683,9 @@ export class RuntimeProjectAttachmentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRuntimeProjectAttachment request %j', request); const wrappedCallback: | Callback< @@ -809,7 +813,9 @@ export class RuntimeProjectAttachmentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRuntimeProjectAttachment request %j', request); const wrappedCallback: | Callback< @@ -943,7 +949,9 @@ export class RuntimeProjectAttachmentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupRuntimeProjectAttachment request %j', request); const wrappedCallback: | Callback< @@ -1105,7 +1113,9 @@ export class RuntimeProjectAttachmentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apihub.v1.IListRuntimeProjectAttachmentsRequest, @@ -1199,7 +1209,9 @@ export class RuntimeProjectAttachmentServiceClient { }); const defaultCallSettings = this._defaults['listRuntimeProjectAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeProjectAttachments stream %j', request); return this.descriptors.page.listRuntimeProjectAttachments.createStream( this.innerApiCalls.listRuntimeProjectAttachments as GaxCall, @@ -1275,7 +1287,9 @@ export class RuntimeProjectAttachmentServiceClient { }); const defaultCallSettings = this._defaults['listRuntimeProjectAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeProjectAttachments iterate %j', request); return this.descriptors.page.listRuntimeProjectAttachments.asyncIterate( this.innerApiCalls['listRuntimeProjectAttachments'] as GaxCall, diff --git a/packages/google-cloud-apihub/test/gapic_api_hub_dependencies_v1.ts b/packages/google-cloud-apihub/test/gapic_api_hub_dependencies_v1.ts index f27f3821dea..ee751011a87 100644 --- a/packages/google-cloud-apihub/test/gapic_api_hub_dependencies_v1.ts +++ b/packages/google-cloud-apihub/test/gapic_api_hub_dependencies_v1.ts @@ -267,7 +267,9 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.apiHubDependenciesStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDependencyRequest() ); @@ -357,7 +359,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDependencyRequest() ); @@ -404,7 +406,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDependencyRequest() ); @@ -435,7 +437,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDependencyRequest() ); @@ -456,7 +458,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDependencyRequest() ); @@ -487,7 +489,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDependencyRequest() ); @@ -534,7 +536,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDependencyRequest() ); @@ -565,7 +567,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDependencyRequest() ); @@ -586,7 +588,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDependencyRequest() ); @@ -618,7 +620,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDependencyRequest() ); @@ -666,7 +668,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDependencyRequest() ); @@ -698,7 +700,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDependencyRequest() ); @@ -720,7 +722,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDependencyRequest() ); @@ -751,7 +753,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDependencyRequest() ); @@ -798,7 +800,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDependencyRequest() ); @@ -829,7 +831,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDependencyRequest() ); @@ -850,7 +852,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDependenciesRequest() ); @@ -883,7 +885,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDependenciesRequest() ); @@ -932,7 +934,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDependenciesRequest() ); @@ -963,7 +965,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDependenciesRequest() ); @@ -1017,7 +1019,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDependenciesRequest() ); @@ -1066,7 +1068,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDependenciesRequest() ); @@ -1109,7 +1111,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDependenciesRequest() ); @@ -1150,7 +1152,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1180,7 +1182,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1224,7 +1226,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1259,7 +1261,7 @@ describe('v1.ApiHubDependenciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1344,7 +1346,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -1355,7 +1357,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1408,7 +1410,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('apiHubInstance', () => { + describe('apiHubInstance', async () => { const fakePath = '/rendered/path/apiHubInstance'; const expectedParameters = { project: 'projectValue', @@ -1419,7 +1421,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiHubInstancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1473,7 +1475,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('apiOperation', () => { + describe('apiOperation', async () => { const fakePath = '/rendered/path/apiOperation'; const expectedParameters = { project: 'projectValue', @@ -1486,7 +1488,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiOperationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1561,7 +1563,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('attribute', () => { + describe('attribute', async () => { const fakePath = '/rendered/path/attribute'; const expectedParameters = { project: 'projectValue', @@ -1572,7 +1574,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1625,7 +1627,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('definition', () => { + describe('definition', async () => { const fakePath = '/rendered/path/definition'; const expectedParameters = { project: 'projectValue', @@ -1638,7 +1640,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.definitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1713,7 +1715,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('dependency', () => { + describe('dependency', async () => { const fakePath = '/rendered/path/dependency'; const expectedParameters = { project: 'projectValue', @@ -1724,7 +1726,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dependencyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1777,7 +1779,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1788,7 +1790,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1841,7 +1843,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('externalApi', () => { + describe('externalApi', async () => { const fakePath = '/rendered/path/externalApi'; const expectedParameters = { project: 'projectValue', @@ -1852,7 +1854,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.externalApiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1905,7 +1907,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('hostProjectRegistration', () => { + describe('hostProjectRegistration', async () => { const fakePath = '/rendered/path/hostProjectRegistration'; const expectedParameters = { project: 'projectValue', @@ -1916,7 +1918,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hostProjectRegistrationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1986,7 +1988,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1996,7 +1998,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2035,7 +2037,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('plugin', () => { + describe('plugin', async () => { const fakePath = '/rendered/path/plugin'; const expectedParameters = { project: 'projectValue', @@ -2046,7 +2048,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pluginPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2099,7 +2101,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2108,7 +2110,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2137,7 +2139,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('runtimeProjectAttachment', () => { + describe('runtimeProjectAttachment', async () => { const fakePath = '/rendered/path/runtimeProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -2148,7 +2150,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2218,7 +2220,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('spec', () => { + describe('spec', async () => { const fakePath = '/rendered/path/spec'; const expectedParameters = { project: 'projectValue', @@ -2231,7 +2233,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.specPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2306,7 +2308,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('styleGuide', () => { + describe('styleGuide', async () => { const fakePath = '/rendered/path/styleGuide'; const expectedParameters = { project: 'projectValue', @@ -2317,7 +2319,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.styleGuidePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2370,7 +2372,7 @@ describe('v1.ApiHubDependenciesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -2382,7 +2384,7 @@ describe('v1.ApiHubDependenciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apihub/test/gapic_api_hub_plugin_v1.ts b/packages/google-cloud-apihub/test/gapic_api_hub_plugin_v1.ts index dcd19917ed6..0d706632543 100644 --- a/packages/google-cloud-apihub/test/gapic_api_hub_plugin_v1.ts +++ b/packages/google-cloud-apihub/test/gapic_api_hub_plugin_v1.ts @@ -225,7 +225,9 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.apiHubPluginStub); client.close().then(() => { done(); @@ -284,7 +286,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetPluginRequest() ); @@ -315,7 +317,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetPluginRequest() ); @@ -362,7 +364,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetPluginRequest() ); @@ -390,7 +392,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetPluginRequest() ); @@ -411,7 +413,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.EnablePluginRequest() ); @@ -442,7 +444,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.EnablePluginRequest() ); @@ -489,7 +491,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.EnablePluginRequest() ); @@ -520,7 +522,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.EnablePluginRequest() ); @@ -541,7 +543,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DisablePluginRequest() ); @@ -572,7 +574,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DisablePluginRequest() ); @@ -619,7 +621,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DisablePluginRequest() ); @@ -650,7 +652,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DisablePluginRequest() ); @@ -670,7 +672,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -700,7 +702,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -744,7 +746,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -779,7 +781,7 @@ describe('v1.ApiHubPluginClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -827,7 +829,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -864,7 +866,7 @@ describe('v1.ApiHubPluginClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -875,7 +877,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -928,7 +930,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('apiHubInstance', () => { + describe('apiHubInstance', async () => { const fakePath = '/rendered/path/apiHubInstance'; const expectedParameters = { project: 'projectValue', @@ -939,7 +941,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiHubInstancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -993,7 +995,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('apiOperation', () => { + describe('apiOperation', async () => { const fakePath = '/rendered/path/apiOperation'; const expectedParameters = { project: 'projectValue', @@ -1006,7 +1008,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiOperationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1081,7 +1083,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('attribute', () => { + describe('attribute', async () => { const fakePath = '/rendered/path/attribute'; const expectedParameters = { project: 'projectValue', @@ -1092,7 +1094,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1145,7 +1147,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('definition', () => { + describe('definition', async () => { const fakePath = '/rendered/path/definition'; const expectedParameters = { project: 'projectValue', @@ -1158,7 +1160,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.definitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1233,7 +1235,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('dependency', () => { + describe('dependency', async () => { const fakePath = '/rendered/path/dependency'; const expectedParameters = { project: 'projectValue', @@ -1244,7 +1246,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dependencyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1297,7 +1299,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1308,7 +1310,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1361,7 +1363,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('externalApi', () => { + describe('externalApi', async () => { const fakePath = '/rendered/path/externalApi'; const expectedParameters = { project: 'projectValue', @@ -1372,7 +1374,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.externalApiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1425,7 +1427,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('hostProjectRegistration', () => { + describe('hostProjectRegistration', async () => { const fakePath = '/rendered/path/hostProjectRegistration'; const expectedParameters = { project: 'projectValue', @@ -1436,7 +1438,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hostProjectRegistrationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1506,7 +1508,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('plugin', () => { + describe('plugin', async () => { const fakePath = '/rendered/path/plugin'; const expectedParameters = { project: 'projectValue', @@ -1517,7 +1519,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pluginPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1570,7 +1572,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('runtimeProjectAttachment', () => { + describe('runtimeProjectAttachment', async () => { const fakePath = '/rendered/path/runtimeProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -1581,7 +1583,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1651,7 +1653,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('spec', () => { + describe('spec', async () => { const fakePath = '/rendered/path/spec'; const expectedParameters = { project: 'projectValue', @@ -1664,7 +1666,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.specPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1739,7 +1741,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('styleGuide', () => { + describe('styleGuide', async () => { const fakePath = '/rendered/path/styleGuide'; const expectedParameters = { project: 'projectValue', @@ -1750,7 +1752,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.styleGuidePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1803,7 +1805,7 @@ describe('v1.ApiHubPluginClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -1815,7 +1817,7 @@ describe('v1.ApiHubPluginClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apihub/test/gapic_api_hub_v1.ts b/packages/google-cloud-apihub/test/gapic_api_hub_v1.ts index d9d271af94f..720d31ab895 100644 --- a/packages/google-cloud-apihub/test/gapic_api_hub_v1.ts +++ b/packages/google-cloud-apihub/test/gapic_api_hub_v1.ts @@ -263,7 +263,9 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.apiHubStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiRequest() ); @@ -353,7 +355,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiRequest() ); @@ -400,7 +402,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiRequest() ); @@ -428,7 +430,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiRequest() ); @@ -449,7 +451,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiRequest() ); @@ -480,7 +482,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiRequest() ); @@ -527,7 +529,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiRequest() ); @@ -555,7 +557,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiRequest() ); @@ -576,7 +578,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateApiRequest() ); @@ -608,7 +610,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateApiRequest() ); @@ -656,7 +658,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateApiRequest() ); @@ -685,7 +687,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateApiRequest() ); @@ -707,7 +709,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteApiRequest() ); @@ -738,7 +740,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteApiRequest() ); @@ -785,7 +787,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteApiRequest() ); @@ -813,7 +815,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteApiRequest() ); @@ -834,7 +836,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateVersionRequest() ); @@ -865,7 +867,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateVersionRequest() ); @@ -912,7 +914,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateVersionRequest() ); @@ -943,7 +945,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateVersionRequest() ); @@ -964,7 +966,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetVersionRequest() ); @@ -995,7 +997,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetVersionRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetVersionRequest() ); @@ -1073,7 +1075,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetVersionRequest() ); @@ -1094,7 +1096,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateVersionRequest() ); @@ -1126,7 +1128,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateVersionRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateVersionRequest() ); @@ -1206,7 +1208,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateVersionRequest() ); @@ -1228,7 +1230,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteVersionRequest() ); @@ -1259,7 +1261,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteVersionRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteVersionRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteVersionRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateSpecRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateSpecRequest() ); @@ -1436,7 +1438,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateSpecRequest() ); @@ -1467,7 +1469,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateSpecRequest() ); @@ -1488,7 +1490,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecRequest() ); @@ -1519,7 +1521,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecRequest() ); @@ -1566,7 +1568,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecRequest() ); @@ -1594,7 +1596,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecRequest() ); @@ -1615,7 +1617,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecContentsRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecContentsRequest() ); @@ -1693,7 +1695,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecContentsRequest() ); @@ -1724,7 +1726,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetSpecContentsRequest() ); @@ -1745,7 +1747,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateSpecRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateSpecRequest() ); @@ -1825,7 +1827,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateSpecRequest() ); @@ -1857,7 +1859,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateSpecRequest() ); @@ -1879,7 +1881,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteSpecRequest() ); @@ -1910,7 +1912,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteSpecRequest() ); @@ -1957,7 +1959,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteSpecRequest() ); @@ -1988,7 +1990,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteSpecRequest() ); @@ -2009,7 +2011,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiOperationRequest() ); @@ -2040,7 +2042,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiOperationRequest() ); @@ -2087,7 +2089,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiOperationRequest() ); @@ -2118,7 +2120,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiOperationRequest() ); @@ -2139,7 +2141,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDefinitionRequest() ); @@ -2170,7 +2172,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDefinitionRequest() ); @@ -2217,7 +2219,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDefinitionRequest() ); @@ -2248,7 +2250,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDefinitionRequest() ); @@ -2269,7 +2271,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDeploymentRequest() ); @@ -2300,7 +2302,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDeploymentRequest() ); @@ -2347,7 +2349,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDeploymentRequest() ); @@ -2378,7 +2380,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateDeploymentRequest() ); @@ -2399,7 +2401,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDeploymentRequest() ); @@ -2430,7 +2432,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDeploymentRequest() ); @@ -2477,7 +2479,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDeploymentRequest() ); @@ -2508,7 +2510,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetDeploymentRequest() ); @@ -2529,7 +2531,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDeploymentRequest() ); @@ -2561,7 +2563,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDeploymentRequest() ); @@ -2609,7 +2611,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDeploymentRequest() ); @@ -2641,7 +2643,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateDeploymentRequest() ); @@ -2663,7 +2665,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDeploymentRequest() ); @@ -2694,7 +2696,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDeploymentRequest() ); @@ -2741,7 +2743,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDeploymentRequest() ); @@ -2772,7 +2774,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteDeploymentRequest() ); @@ -2793,7 +2795,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateAttributeRequest() ); @@ -2824,7 +2826,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateAttributeRequest() ); @@ -2871,7 +2873,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateAttributeRequest() ); @@ -2902,7 +2904,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateAttributeRequest() ); @@ -2923,7 +2925,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetAttributeRequest() ); @@ -2954,7 +2956,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetAttributeRequest() ); @@ -3001,7 +3003,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetAttributeRequest() ); @@ -3032,7 +3034,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetAttributeRequest() ); @@ -3053,7 +3055,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateAttributeRequest() ); @@ -3085,7 +3087,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateAttributeRequest() ); @@ -3133,7 +3135,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateAttributeRequest() ); @@ -3165,7 +3167,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateAttributeRequest() ); @@ -3187,7 +3189,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteAttributeRequest() ); @@ -3218,7 +3220,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteAttributeRequest() ); @@ -3265,7 +3267,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteAttributeRequest() ); @@ -3296,7 +3298,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteAttributeRequest() ); @@ -3317,7 +3319,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateExternalApiRequest() ); @@ -3348,7 +3350,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateExternalApiRequest() ); @@ -3395,7 +3397,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateExternalApiRequest() ); @@ -3426,7 +3428,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateExternalApiRequest() ); @@ -3447,7 +3449,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetExternalApiRequest() ); @@ -3478,7 +3480,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetExternalApiRequest() ); @@ -3525,7 +3527,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetExternalApiRequest() ); @@ -3556,7 +3558,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetExternalApiRequest() ); @@ -3577,7 +3579,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateExternalApiRequest() ); @@ -3609,7 +3611,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateExternalApiRequest() ); @@ -3657,7 +3659,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateExternalApiRequest() ); @@ -3689,7 +3691,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateExternalApiRequest() ); @@ -3711,7 +3713,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteExternalApiRequest() ); @@ -3742,7 +3744,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteExternalApiRequest() ); @@ -3789,7 +3791,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteExternalApiRequest() ); @@ -3820,7 +3822,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteExternalApiRequest() ); @@ -3841,7 +3843,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApisRequest() ); @@ -3874,7 +3876,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApisRequest() ); @@ -3923,7 +3925,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApisRequest() ); @@ -3951,7 +3953,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApisRequest() ); @@ -4002,7 +4004,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApisRequest() ); @@ -4050,7 +4052,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApisRequest() ); @@ -4092,7 +4094,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApisRequest() ); @@ -4135,7 +4137,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListVersionsRequest() ); @@ -4168,7 +4170,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListVersionsRequest() ); @@ -4217,7 +4219,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListVersionsRequest() ); @@ -4248,7 +4250,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListVersionsRequest() ); @@ -4299,7 +4301,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListVersionsRequest() ); @@ -4347,7 +4349,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListVersionsRequest() ); @@ -4390,7 +4392,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListVersionsRequest() ); @@ -4432,7 +4434,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListSpecsRequest() ); @@ -4465,7 +4467,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListSpecsRequest() ); @@ -4514,7 +4516,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListSpecsRequest() ); @@ -4542,7 +4544,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListSpecsRequest() ); @@ -4593,7 +4595,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListSpecsRequest() ); @@ -4641,7 +4643,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListSpecsRequest() ); @@ -4683,7 +4685,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListSpecsRequest() ); @@ -4726,7 +4728,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApiOperationsRequest() ); @@ -4759,7 +4761,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApiOperationsRequest() ); @@ -4808,7 +4810,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApiOperationsRequest() ); @@ -4839,7 +4841,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApiOperationsRequest() ); @@ -4893,7 +4895,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApiOperationsRequest() ); @@ -4942,7 +4944,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApiOperationsRequest() ); @@ -4985,7 +4987,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListApiOperationsRequest() ); @@ -5027,7 +5029,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDeploymentsRequest() ); @@ -5060,7 +5062,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDeploymentsRequest() ); @@ -5109,7 +5111,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDeploymentsRequest() ); @@ -5140,7 +5142,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDeploymentsRequest() ); @@ -5194,7 +5196,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDeploymentsRequest() ); @@ -5243,7 +5245,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDeploymentsRequest() ); @@ -5286,7 +5288,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListDeploymentsRequest() ); @@ -5328,7 +5330,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListAttributesRequest() ); @@ -5361,7 +5363,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListAttributesRequest() ); @@ -5410,7 +5412,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListAttributesRequest() ); @@ -5441,7 +5443,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListAttributesRequest() ); @@ -5495,7 +5497,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListAttributesRequest() ); @@ -5544,7 +5546,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListAttributesRequest() ); @@ -5587,7 +5589,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListAttributesRequest() ); @@ -5629,7 +5631,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.SearchResourcesRequest() ); @@ -5662,7 +5664,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.SearchResourcesRequest() ); @@ -5711,7 +5713,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.SearchResourcesRequest() ); @@ -5742,7 +5744,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.SearchResourcesRequest() ); @@ -5796,7 +5798,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.SearchResourcesRequest() ); @@ -5845,7 +5847,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.SearchResourcesRequest() ); @@ -5888,7 +5890,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.SearchResourcesRequest() ); @@ -5930,7 +5932,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListExternalApisRequest() ); @@ -5963,7 +5965,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListExternalApisRequest() ); @@ -6012,7 +6014,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListExternalApisRequest() ); @@ -6043,7 +6045,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListExternalApisRequest() ); @@ -6097,7 +6099,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListExternalApisRequest() ); @@ -6146,7 +6148,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListExternalApisRequest() ); @@ -6189,7 +6191,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListExternalApisRequest() ); @@ -6230,7 +6232,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6260,7 +6262,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6304,7 +6306,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6339,7 +6341,7 @@ describe('v1.ApiHubClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6387,7 +6389,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6424,7 +6426,7 @@ describe('v1.ApiHubClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -6435,7 +6437,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6488,7 +6490,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('apiHubInstance', () => { + describe('apiHubInstance', async () => { const fakePath = '/rendered/path/apiHubInstance'; const expectedParameters = { project: 'projectValue', @@ -6499,7 +6501,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiHubInstancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6553,7 +6555,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('apiOperation', () => { + describe('apiOperation', async () => { const fakePath = '/rendered/path/apiOperation'; const expectedParameters = { project: 'projectValue', @@ -6566,7 +6568,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiOperationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6641,7 +6643,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('attribute', () => { + describe('attribute', async () => { const fakePath = '/rendered/path/attribute'; const expectedParameters = { project: 'projectValue', @@ -6652,7 +6654,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6705,7 +6707,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('definition', () => { + describe('definition', async () => { const fakePath = '/rendered/path/definition'; const expectedParameters = { project: 'projectValue', @@ -6718,7 +6720,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.definitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6793,7 +6795,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('dependency', () => { + describe('dependency', async () => { const fakePath = '/rendered/path/dependency'; const expectedParameters = { project: 'projectValue', @@ -6804,7 +6806,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dependencyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6857,7 +6859,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -6868,7 +6870,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6921,7 +6923,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('externalApi', () => { + describe('externalApi', async () => { const fakePath = '/rendered/path/externalApi'; const expectedParameters = { project: 'projectValue', @@ -6932,7 +6934,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.externalApiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6985,7 +6987,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('hostProjectRegistration', () => { + describe('hostProjectRegistration', async () => { const fakePath = '/rendered/path/hostProjectRegistration'; const expectedParameters = { project: 'projectValue', @@ -6996,7 +6998,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hostProjectRegistrationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7066,7 +7068,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -7076,7 +7078,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7115,7 +7117,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('plugin', () => { + describe('plugin', async () => { const fakePath = '/rendered/path/plugin'; const expectedParameters = { project: 'projectValue', @@ -7126,7 +7128,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pluginPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7179,7 +7181,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -7188,7 +7190,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7217,7 +7219,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('runtimeProjectAttachment', () => { + describe('runtimeProjectAttachment', async () => { const fakePath = '/rendered/path/runtimeProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -7228,7 +7230,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7298,7 +7300,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('spec', () => { + describe('spec', async () => { const fakePath = '/rendered/path/spec'; const expectedParameters = { project: 'projectValue', @@ -7311,7 +7313,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.specPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7386,7 +7388,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('styleGuide', () => { + describe('styleGuide', async () => { const fakePath = '/rendered/path/styleGuide'; const expectedParameters = { project: 'projectValue', @@ -7397,7 +7399,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.styleGuidePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7450,7 +7452,7 @@ describe('v1.ApiHubClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -7462,7 +7464,7 @@ describe('v1.ApiHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apihub/test/gapic_host_project_registration_service_v1.ts b/packages/google-cloud-apihub/test/gapic_host_project_registration_service_v1.ts index f3d9542fcdc..b2853388aec 100644 --- a/packages/google-cloud-apihub/test/gapic_host_project_registration_service_v1.ts +++ b/packages/google-cloud-apihub/test/gapic_host_project_registration_service_v1.ts @@ -284,7 +284,9 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.hostProjectRegistrationServiceStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest() ); @@ -390,7 +392,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest() ); @@ -440,7 +442,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest() ); @@ -477,7 +479,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateHostProjectRegistrationRequest() ); @@ -504,7 +506,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetHostProjectRegistrationRequest() ); @@ -539,7 +541,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetHostProjectRegistrationRequest() ); @@ -589,7 +591,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetHostProjectRegistrationRequest() ); @@ -626,7 +628,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetHostProjectRegistrationRequest() ); @@ -653,7 +655,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest() ); @@ -696,7 +698,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest() ); @@ -756,7 +758,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest() ); @@ -793,7 +795,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest() ); @@ -866,7 +868,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest() ); @@ -928,7 +930,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest() ); @@ -985,7 +987,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListHostProjectRegistrationsRequest() ); @@ -1034,7 +1036,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1067,7 +1069,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1152,7 +1154,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -1254,7 +1256,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1307,7 +1309,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('apiHubInstance', () => { + describe('apiHubInstance', async () => { const fakePath = '/rendered/path/apiHubInstance'; const expectedParameters = { project: 'projectValue', @@ -1321,7 +1323,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.apiHubInstancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1375,7 +1377,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('apiOperation', () => { + describe('apiOperation', async () => { const fakePath = '/rendered/path/apiOperation'; const expectedParameters = { project: 'projectValue', @@ -1391,7 +1393,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.apiOperationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1466,7 +1468,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('attribute', () => { + describe('attribute', async () => { const fakePath = '/rendered/path/attribute'; const expectedParameters = { project: 'projectValue', @@ -1480,7 +1482,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1533,7 +1535,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('definition', () => { + describe('definition', async () => { const fakePath = '/rendered/path/definition'; const expectedParameters = { project: 'projectValue', @@ -1549,7 +1551,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.definitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1624,7 +1626,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('dependency', () => { + describe('dependency', async () => { const fakePath = '/rendered/path/dependency'; const expectedParameters = { project: 'projectValue', @@ -1638,7 +1640,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.dependencyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1691,7 +1693,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1705,7 +1707,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1758,7 +1760,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('externalApi', () => { + describe('externalApi', async () => { const fakePath = '/rendered/path/externalApi'; const expectedParameters = { project: 'projectValue', @@ -1772,7 +1774,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.externalApiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1825,7 +1827,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('hostProjectRegistration', () => { + describe('hostProjectRegistration', async () => { const fakePath = '/rendered/path/hostProjectRegistration'; const expectedParameters = { project: 'projectValue', @@ -1839,7 +1841,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.hostProjectRegistrationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1909,7 +1911,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1922,7 +1924,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1961,7 +1963,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('plugin', () => { + describe('plugin', async () => { const fakePath = '/rendered/path/plugin'; const expectedParameters = { project: 'projectValue', @@ -1975,7 +1977,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.pluginPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2028,7 +2030,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2040,7 +2042,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2069,7 +2071,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('runtimeProjectAttachment', () => { + describe('runtimeProjectAttachment', async () => { const fakePath = '/rendered/path/runtimeProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -2083,7 +2085,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2153,7 +2155,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('spec', () => { + describe('spec', async () => { const fakePath = '/rendered/path/spec'; const expectedParameters = { project: 'projectValue', @@ -2169,7 +2171,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.specPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2244,7 +2246,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('styleGuide', () => { + describe('styleGuide', async () => { const fakePath = '/rendered/path/styleGuide'; const expectedParameters = { project: 'projectValue', @@ -2258,7 +2260,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.styleGuidePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2311,7 +2313,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -2326,7 +2328,7 @@ describe('v1.HostProjectRegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apihub/test/gapic_linting_service_v1.ts b/packages/google-cloud-apihub/test/gapic_linting_service_v1.ts index ccc3a12fe45..f3eb4753c4f 100644 --- a/packages/google-cloud-apihub/test/gapic_linting_service_v1.ts +++ b/packages/google-cloud-apihub/test/gapic_linting_service_v1.ts @@ -225,7 +225,9 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.lintingServiceStub); client.close().then(() => { done(); @@ -284,7 +286,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideRequest() ); @@ -315,7 +317,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideRequest() ); @@ -362,7 +364,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideRequest() ); @@ -393,7 +395,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideRequest() ); @@ -414,7 +416,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateStyleGuideRequest() ); @@ -446,7 +448,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateStyleGuideRequest() ); @@ -494,7 +496,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateStyleGuideRequest() ); @@ -526,7 +528,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.UpdateStyleGuideRequest() ); @@ -548,7 +550,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideContentsRequest() ); @@ -580,7 +582,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideContentsRequest() ); @@ -627,7 +629,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideContentsRequest() ); @@ -661,7 +663,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetStyleGuideContentsRequest() ); @@ -685,7 +687,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LintSpecRequest() ); @@ -716,7 +718,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LintSpecRequest() ); @@ -763,7 +765,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LintSpecRequest() ); @@ -791,7 +793,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LintSpecRequest() ); @@ -811,7 +813,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -841,7 +843,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -885,7 +887,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -920,7 +922,7 @@ describe('v1.LintingServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -968,7 +970,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.LintingServiceClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -1016,7 +1018,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1069,7 +1071,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('apiHubInstance', () => { + describe('apiHubInstance', async () => { const fakePath = '/rendered/path/apiHubInstance'; const expectedParameters = { project: 'projectValue', @@ -1080,7 +1082,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiHubInstancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1134,7 +1136,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('apiOperation', () => { + describe('apiOperation', async () => { const fakePath = '/rendered/path/apiOperation'; const expectedParameters = { project: 'projectValue', @@ -1147,7 +1149,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiOperationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1222,7 +1224,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('attribute', () => { + describe('attribute', async () => { const fakePath = '/rendered/path/attribute'; const expectedParameters = { project: 'projectValue', @@ -1233,7 +1235,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1286,7 +1288,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('definition', () => { + describe('definition', async () => { const fakePath = '/rendered/path/definition'; const expectedParameters = { project: 'projectValue', @@ -1299,7 +1301,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.definitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1374,7 +1376,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('dependency', () => { + describe('dependency', async () => { const fakePath = '/rendered/path/dependency'; const expectedParameters = { project: 'projectValue', @@ -1385,7 +1387,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dependencyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1438,7 +1440,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1449,7 +1451,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1502,7 +1504,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('externalApi', () => { + describe('externalApi', async () => { const fakePath = '/rendered/path/externalApi'; const expectedParameters = { project: 'projectValue', @@ -1513,7 +1515,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.externalApiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1566,7 +1568,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('hostProjectRegistration', () => { + describe('hostProjectRegistration', async () => { const fakePath = '/rendered/path/hostProjectRegistration'; const expectedParameters = { project: 'projectValue', @@ -1577,7 +1579,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hostProjectRegistrationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1647,7 +1649,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('plugin', () => { + describe('plugin', async () => { const fakePath = '/rendered/path/plugin'; const expectedParameters = { project: 'projectValue', @@ -1658,7 +1660,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pluginPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1711,7 +1713,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('runtimeProjectAttachment', () => { + describe('runtimeProjectAttachment', async () => { const fakePath = '/rendered/path/runtimeProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -1722,7 +1724,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1792,7 +1794,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('spec', () => { + describe('spec', async () => { const fakePath = '/rendered/path/spec'; const expectedParameters = { project: 'projectValue', @@ -1805,7 +1807,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.specPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1880,7 +1882,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('styleGuide', () => { + describe('styleGuide', async () => { const fakePath = '/rendered/path/styleGuide'; const expectedParameters = { project: 'projectValue', @@ -1891,7 +1893,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.styleGuidePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1944,7 +1946,7 @@ describe('v1.LintingServiceClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -1956,7 +1958,7 @@ describe('v1.LintingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apihub/test/gapic_provisioning_v1.ts b/packages/google-cloud-apihub/test/gapic_provisioning_v1.ts index ddc18f8ea41..a0083f3aef7 100644 --- a/packages/google-cloud-apihub/test/gapic_provisioning_v1.ts +++ b/packages/google-cloud-apihub/test/gapic_provisioning_v1.ts @@ -263,7 +263,9 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.provisioningStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiHubInstanceRequest() ); @@ -353,7 +355,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiHubInstanceRequest() ); @@ -400,7 +402,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiHubInstanceRequest() ); @@ -431,7 +433,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetApiHubInstanceRequest() ); @@ -452,7 +454,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupApiHubInstanceRequest() ); @@ -484,7 +486,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupApiHubInstanceRequest() ); @@ -531,7 +533,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupApiHubInstanceRequest() ); @@ -562,7 +564,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupApiHubInstanceRequest() ); @@ -583,7 +585,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiHubInstanceRequest() ); @@ -616,7 +618,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiHubInstanceRequest() ); @@ -670,7 +672,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiHubInstanceRequest() ); @@ -701,7 +703,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateApiHubInstanceRequest() ); @@ -734,7 +736,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -756,7 +758,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -776,7 +778,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -806,7 +808,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -850,7 +852,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -885,7 +887,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -933,7 +935,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -974,7 +976,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1053,7 +1055,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.ProvisioningClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1229,8 +1231,7 @@ describe('v1.ProvisioningClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1249,7 +1250,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1258,8 +1259,7 @@ describe('v1.ProvisioningClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1275,7 +1275,7 @@ describe('v1.ProvisioningClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -1286,7 +1286,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1339,7 +1339,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('apiHubInstance', () => { + describe('apiHubInstance', async () => { const fakePath = '/rendered/path/apiHubInstance'; const expectedParameters = { project: 'projectValue', @@ -1350,7 +1350,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiHubInstancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1404,7 +1404,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('apiOperation', () => { + describe('apiOperation', async () => { const fakePath = '/rendered/path/apiOperation'; const expectedParameters = { project: 'projectValue', @@ -1417,7 +1417,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.apiOperationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1492,7 +1492,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('attribute', () => { + describe('attribute', async () => { const fakePath = '/rendered/path/attribute'; const expectedParameters = { project: 'projectValue', @@ -1503,7 +1503,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1556,7 +1556,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('definition', () => { + describe('definition', async () => { const fakePath = '/rendered/path/definition'; const expectedParameters = { project: 'projectValue', @@ -1569,7 +1569,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.definitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1644,7 +1644,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('dependency', () => { + describe('dependency', async () => { const fakePath = '/rendered/path/dependency'; const expectedParameters = { project: 'projectValue', @@ -1655,7 +1655,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dependencyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1708,7 +1708,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1719,7 +1719,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1772,7 +1772,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('externalApi', () => { + describe('externalApi', async () => { const fakePath = '/rendered/path/externalApi'; const expectedParameters = { project: 'projectValue', @@ -1783,7 +1783,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.externalApiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1836,7 +1836,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('hostProjectRegistration', () => { + describe('hostProjectRegistration', async () => { const fakePath = '/rendered/path/hostProjectRegistration'; const expectedParameters = { project: 'projectValue', @@ -1847,7 +1847,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hostProjectRegistrationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1917,7 +1917,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1927,7 +1927,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1966,7 +1966,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('plugin', () => { + describe('plugin', async () => { const fakePath = '/rendered/path/plugin'; const expectedParameters = { project: 'projectValue', @@ -1977,7 +1977,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pluginPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2030,7 +2030,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2039,7 +2039,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2068,7 +2068,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('runtimeProjectAttachment', () => { + describe('runtimeProjectAttachment', async () => { const fakePath = '/rendered/path/runtimeProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -2079,7 +2079,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2149,7 +2149,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('spec', () => { + describe('spec', async () => { const fakePath = '/rendered/path/spec'; const expectedParameters = { project: 'projectValue', @@ -2162,7 +2162,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.specPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2237,7 +2237,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('styleGuide', () => { + describe('styleGuide', async () => { const fakePath = '/rendered/path/styleGuide'; const expectedParameters = { project: 'projectValue', @@ -2248,7 +2248,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.styleGuidePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2301,7 +2301,7 @@ describe('v1.ProvisioningClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -2313,7 +2313,7 @@ describe('v1.ProvisioningClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-apihub/test/gapic_runtime_project_attachment_service_v1.ts b/packages/google-cloud-apihub/test/gapic_runtime_project_attachment_service_v1.ts index 7ee0a320e05..46af3c2c0b5 100644 --- a/packages/google-cloud-apihub/test/gapic_runtime_project_attachment_service_v1.ts +++ b/packages/google-cloud-apihub/test/gapic_runtime_project_attachment_service_v1.ts @@ -284,7 +284,9 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.runtimeProjectAttachmentServiceStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest() ); @@ -390,7 +392,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest() ); @@ -440,7 +442,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest() ); @@ -477,7 +479,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.CreateRuntimeProjectAttachmentRequest() ); @@ -504,7 +506,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest() ); @@ -539,7 +541,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest() ); @@ -589,7 +591,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest() ); @@ -626,7 +628,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.GetRuntimeProjectAttachmentRequest() ); @@ -653,7 +655,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest() ); @@ -688,7 +690,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest() ); @@ -738,7 +740,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest() ); @@ -775,7 +777,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.DeleteRuntimeProjectAttachmentRequest() ); @@ -802,7 +804,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest() ); @@ -837,7 +839,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest() ); @@ -887,7 +889,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest() ); @@ -924,7 +926,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.LookupRuntimeProjectAttachmentRequest() ); @@ -951,7 +953,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest() ); @@ -994,7 +996,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest() ); @@ -1054,7 +1056,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest() ); @@ -1166,7 +1168,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest() ); @@ -1230,7 +1232,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest() ); @@ -1287,7 +1289,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apihub.v1.ListRuntimeProjectAttachmentsRequest() ); @@ -1336,7 +1338,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1369,7 +1371,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1454,7 +1456,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1505,7 +1507,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1542,7 +1544,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); describe('Path templates', () => { - describe('api', () => { + describe('api', async () => { const fakePath = '/rendered/path/api'; const expectedParameters = { project: 'projectValue', @@ -1556,7 +1558,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.apiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1609,7 +1611,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('apiHubInstance', () => { + describe('apiHubInstance', async () => { const fakePath = '/rendered/path/apiHubInstance'; const expectedParameters = { project: 'projectValue', @@ -1623,7 +1625,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.apiHubInstancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1677,7 +1679,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('apiOperation', () => { + describe('apiOperation', async () => { const fakePath = '/rendered/path/apiOperation'; const expectedParameters = { project: 'projectValue', @@ -1693,7 +1695,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.apiOperationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1768,7 +1770,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('attribute', () => { + describe('attribute', async () => { const fakePath = '/rendered/path/attribute'; const expectedParameters = { project: 'projectValue', @@ -1782,7 +1784,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1835,7 +1837,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('definition', () => { + describe('definition', async () => { const fakePath = '/rendered/path/definition'; const expectedParameters = { project: 'projectValue', @@ -1851,7 +1853,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.definitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1926,7 +1928,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('dependency', () => { + describe('dependency', async () => { const fakePath = '/rendered/path/dependency'; const expectedParameters = { project: 'projectValue', @@ -1940,7 +1942,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.dependencyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1993,7 +1995,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2007,7 +2009,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2060,7 +2062,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('externalApi', () => { + describe('externalApi', async () => { const fakePath = '/rendered/path/externalApi'; const expectedParameters = { project: 'projectValue', @@ -2074,7 +2076,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.externalApiPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2127,7 +2129,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('hostProjectRegistration', () => { + describe('hostProjectRegistration', async () => { const fakePath = '/rendered/path/hostProjectRegistration'; const expectedParameters = { project: 'projectValue', @@ -2141,7 +2143,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.hostProjectRegistrationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2211,7 +2213,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2224,7 +2226,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2263,7 +2265,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('plugin', () => { + describe('plugin', async () => { const fakePath = '/rendered/path/plugin'; const expectedParameters = { project: 'projectValue', @@ -2277,7 +2279,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.pluginPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2330,7 +2332,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2342,7 +2344,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2371,7 +2373,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('runtimeProjectAttachment', () => { + describe('runtimeProjectAttachment', async () => { const fakePath = '/rendered/path/runtimeProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -2385,7 +2387,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2455,7 +2457,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('spec', () => { + describe('spec', async () => { const fakePath = '/rendered/path/spec'; const expectedParameters = { project: 'projectValue', @@ -2471,7 +2473,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.specPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2546,7 +2548,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('styleGuide', () => { + describe('styleGuide', async () => { const fakePath = '/rendered/path/styleGuide'; const expectedParameters = { project: 'projectValue', @@ -2560,7 +2562,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.styleGuidePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2613,7 +2615,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -2628,7 +2630,7 @@ describe('v1.RuntimeProjectAttachmentServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json index 1aea1755166..2b96b95558c 100644 --- a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json +++ b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json index 7578b39f185..0facc058265 100644 --- a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json +++ b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json index 04cff4adc9d..7b8a7531374 100644 --- a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json index dbc52c7b70c..f21da6bb38f 100644 --- a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json index 4866ce3bd34..c5f47763042 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json index f1d1d035622..39dd4280cc7 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json b/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json index 823dac2d438..313d30061b5 100644 --- a/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json index e3d41eacb8e..70806af09d9 100644 --- a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json index e3d41eacb8e..70806af09d9 100644 --- a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json index f3caceed6e0..cadbc36001f 100644 --- a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json index f3caceed6e0..cadbc36001f 100644 --- a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "5.7.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dns/README.md b/packages/google-cloud-dns/README.md index b8aaf0ed5f1..5097a551443 100644 --- a/packages/google-cloud-dns/README.md +++ b/packages/google-cloud-dns/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud DNS API][enable_api]. -1. [Set up authentication][auth] so you can access the +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -151,4 +151,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dns.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-dns/package.json b/packages/google-cloud-dns/package.json index 353ad1d7a9f..49f0af3ecd1 100644 --- a/packages/google-cloud-dns/package.json +++ b/packages/google-cloud-dns/package.json @@ -53,6 +53,7 @@ "@google-cloud/promisify": "^5.0.0", "arrify": "^2.0.0", "dns-zonefile": "0.2.10", + "google-gax": "^5.0.1-rc.0", "lodash.groupby": "^4.6.0", "string-format-obj": "^1.1.1" }, @@ -79,4 +80,4 @@ "uuid": "^11.1.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dns" -} \ No newline at end of file +} diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json index cacbec90bc5..b3a24c0f26d 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json index 219ce52da5d..c3b734fd845 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json index 0d9ffcabc2a..8b247b84060 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json index 0d9ffcabc2a..8b247b84060 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json index 566b3e292b4..78308e6ce7e 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json index 566b3e292b4..78308e6ce7e 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json index 3fe7cea3ccc..3f4257bbe21 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json index 3fe7cea3ccc..3f4257bbe21 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json index e5e6291e23a..407bda4be0b 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json index e5e6291e23a..407bda4be0b 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "4.3.3", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/package.json b/packages/google-devtools-containeranalysis/package.json index 4a20a9c7143..f1210298dff 100644 --- a/packages/google-devtools-containeranalysis/package.json +++ b/packages/google-devtools-containeranalysis/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@google-cloud/grafeas": "^6.0.0", - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json index 28681111a5c..150db45913c 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "5.6.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json index 28681111a5c..150db45913c 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "5.6.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json index 171f143fb91..813b819564a 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "5.6.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json index f993f8cbd5a..c9827de79a1 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "5.6.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { From f91c71f71c7a08ac17a15b7bb2233cbc041ee69b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:21:14 -0700 Subject: [PATCH 25/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFwcGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFzc2V0Ly5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFzc3VyZWR3b3JrbG9hZHMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWF1dG9tbC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhcmVtZXRhbHNvbHV0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJleW9uZGNvcnAtYXBwY29ubmVjdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJleW9uZGNvcnAtYXBwY29ubmVjdG9ycy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJleW9uZGNvcnAtYXBwZ2F0ZXdheXMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJleW9uZGNvcnAtY2xpZW50Y29ubmVjdG9yc2VydmljZXMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJleW9uZGNvcnAtY2xpZW50Z2F0ZXdheXMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWFuYWx5dGljc2h1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWNvbm5lY3Rpb24vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFleGNoYW5nZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFwb2xpY2llcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXJlc2VydmF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbGxpbmctYnVkZ2V0cy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Delete do.cjs --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-apphub/package.json | 2 +- ...ippet_metadata_google.cloud.apphub.v1.json | 2 +- .../src/v1/app_hub_client.ts | 158 +++-- .../test/gapic_app_hub_v1.ts | 374 ++++++------ packages/google-cloud-asset/package.json | 2 +- .../src/v1/asset_service_client.ts | 150 +++-- .../src/v1p1beta1/asset_service_client.ts | 24 +- .../src/v1p2beta1/asset_service_client.ts | 20 +- .../src/v1p5beta1/asset_service_client.ts | 12 +- .../src/v1p7beta1/asset_service_client.ts | 6 +- .../test/gapic_asset_service_v1.ts | 296 ++++----- .../test/gapic_asset_service_v1p1beta1.ts | 32 +- .../test/gapic_asset_service_v1p2beta1.ts | 68 ++- .../test/gapic_asset_service_v1p5beta1.ts | 30 +- .../test/gapic_asset_service_v1p7beta1.ts | 42 +- .../package.json | 2 +- ...data.google.cloud.assuredworkloads.v1.json | 2 +- ...data_google.cloud.assuredworkloads.v1.json | 2 +- ...google.cloud.assuredworkloads.v1beta1.json | 2 +- ...google.cloud.assuredworkloads.v1beta1.json | 2 +- .../v1/assured_workloads_service_client.ts | 54 +- .../assured_workloads_service_client.ts | 38 +- .../gapic_assured_workloads_service_v1.ts | 122 ++-- ...gapic_assured_workloads_service_v1beta1.ts | 88 +-- packages/google-cloud-automl/package.json | 2 +- ...ippet_metadata.google.cloud.automl.v1.json | 2 +- ...ippet_metadata_google.cloud.automl.v1.json | 2 +- ..._metadata.google.cloud.automl.v1beta1.json | 2 +- ..._metadata_google.cloud.automl.v1beta1.json | 2 +- .../src/v1/auto_ml_client.ts | 96 ++- .../src/v1/prediction_service_client.ts | 8 +- .../src/v1beta1/auto_ml_client.ts | 136 +++-- .../src/v1beta1/prediction_service_client.ts | 8 +- .../test/gapic_auto_ml_v1.ts | 222 +++---- .../test/gapic_auto_ml_v1beta1.ts | 290 ++++----- .../test/gapic_prediction_service_v1.ts | 40 +- .../test/gapic_prediction_service_v1beta1.ts | 48 +- packages/google-cloud-backupdr/package.json | 2 +- ...pet_metadata_google.cloud.backupdr.v1.json | 2 +- .../src/v1/backup_d_r_client.ts | 170 ++++-- .../test/gapic_backup_d_r_v1.ts | 404 ++++++------ .../package.json | 2 +- ...ata.google.cloud.baremetalsolution.v2.json | 2 +- ...ata_google.cloud.baremetalsolution.v2.json | 2 +- .../src/v2/bare_metal_solution_client.ts | 250 ++++++-- .../test/gapic_bare_metal_solution_v2.ts | 576 +++++++++--------- packages/google-cloud-batch/package.json | 2 +- ...nippet_metadata.google.cloud.batch.v1.json | 2 +- ...nippet_metadata_google.cloud.batch.v1.json | 2 +- ...t_metadata.google.cloud.batch.v1alpha.json | 2 +- ...t_metadata_google.cloud.batch.v1alpha.json | 2 +- .../src/v1/batch_service_client.ts | 46 +- .../src/v1alpha/batch_service_client.ts | 78 ++- .../test/gapic_batch_service_v1.ts | 124 ++-- .../test/gapic_batch_service_v1alpha.ts | 186 +++--- .../package.json | 2 +- ...le.cloud.beyondcorp.appconnections.v1.json | 2 +- ...le.cloud.beyondcorp.appconnections.v1.json | 2 +- .../src/v1/app_connections_service_client.ts | 42 +- .../test/gapic_app_connections_service_v1.ts | 134 ++-- .../package.json | 2 +- ...gle.cloud.beyondcorp.appconnectors.v1.json | 2 +- ...gle.cloud.beyondcorp.appconnectors.v1.json | 2 +- .../src/v1/app_connectors_service_client.ts | 34 +- .../test/gapic_app_connectors_service_v1.ts | 128 ++-- .../package.json | 2 +- ...oogle.cloud.beyondcorp.appgateways.v1.json | 2 +- ...oogle.cloud.beyondcorp.appgateways.v1.json | 2 +- .../src/v1/app_gateways_service_client.ts | 26 +- .../test/gapic_app_gateways_service_v1.ts | 104 ++-- .../package.json | 2 +- ...beyondcorp.clientconnectorservices.v1.json | 2 +- ...beyondcorp.clientconnectorservices.v1.json | 2 +- ...lient_connector_services_service_client.ts | 30 +- ...ic_client_connector_services_service_v1.ts | 116 ++-- .../package.json | 2 +- ...le.cloud.beyondcorp.clientgateways.v1.json | 2 +- ...le.cloud.beyondcorp.clientgateways.v1.json | 2 +- .../src/v1/client_gateways_service_client.ts | 26 +- .../test/gapic_client_gateways_service_v1.ts | 104 ++-- .../package.json | 2 +- ...google.cloud.bigquery.analyticshub.v1.json | 2 +- ...google.cloud.bigquery.analyticshub.v1.json | 2 +- .../src/v1/analytics_hub_service_client.ts | 130 +++- .../test/gapic_analytics_hub_service_v1.ts | 256 ++++---- .../package.json | 2 +- ...a.google.cloud.bigquery.connection.v1.json | 2 +- ...a_google.cloud.bigquery.connection.v1.json | 2 +- ...gle.cloud.bigquery.connection.v1beta1.json | 2 +- ...gle.cloud.bigquery.connection.v1beta1.json | 2 +- .../src/v1/connection_service_client.ts | 40 +- .../src/v1beta1/connection_service_client.ts | 36 +- .../test/gapic_connection_service_v1.ts | 90 +-- .../test/gapic_connection_service_v1beta1.ts | 84 +-- .../package.json | 2 +- ...e.cloud.bigquery.dataexchange.v1beta1.json | 2 +- ...e.cloud.bigquery.dataexchange.v1beta1.json | 2 +- .../v1beta1/analytics_hub_service_client.ts | 84 ++- .../gapic_analytics_hub_service_v1beta1.ts | 164 ++--- .../package.json | 2 +- ...google.cloud.bigquery.datapolicies.v1.json | 2 +- ...google.cloud.bigquery.datapolicies.v1.json | 2 +- ...e.cloud.bigquery.datapolicies.v1beta1.json | 2 +- ...e.cloud.bigquery.datapolicies.v1beta1.json | 2 +- .../src/v1/data_policy_service_client.ts | 44 +- .../src/v1beta1/data_policy_service_client.ts | 40 +- .../test/gapic_data_policy_service_v1.ts | 94 +-- .../test/gapic_data_policy_service_v1beta1.ts | 86 +-- .../package.json | 2 +- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- .../src/v1/data_transfer_service_client.ts | 96 ++- .../test/gapic_data_transfer_service_v1.ts | 194 +++--- .../package.json | 2 +- ...ta.google.cloud.bigquery.migration.v2.json | 2 +- ...ta_google.cloud.bigquery.migration.v2.json | 2 +- ...ogle.cloud.bigquery.migration.v2alpha.json | 2 +- ...ogle.cloud.bigquery.migration.v2alpha.json | 2 +- .../src/v2/migration_service_client.ts | 44 +- .../src/v2alpha/migration_service_client.ts | 44 +- .../v2alpha/sql_translation_service_client.ts | 4 +- .../test/gapic_migration_service_v2.ts | 84 +-- .../test/gapic_migration_service_v2alpha.ts | 84 +-- .../gapic_sql_translation_service_v2alpha.ts | 24 +- .../package.json | 2 +- ....google.cloud.bigquery.reservation.v1.json | 2 +- ..._google.cloud.bigquery.reservation.v1.json | 2 +- .../src/v1/reservation_service_client.ts | 128 +++- .../test/gapic_reservation_service_v1.ts | 234 +++---- ...adata.google.cloud.billing.budgets.v1.json | 2 +- ...adata_google.cloud.billing.budgets.v1.json | 2 +- ....google.cloud.billing.budgets.v1beta1.json | 2 +- ..._google.cloud.billing.budgets.v1beta1.json | 2 +- .../src/v1/budget_service_client.ts | 28 +- .../src/v1beta1/budget_service_client.ts | 28 +- .../test/gapic_budget_service_v1.ts | 58 +- .../test/gapic_budget_service_v1beta1.ts | 58 +- packages/google-cloud-billing/package.json | 2 +- ...ppet_metadata.google.cloud.billing.v1.json | 2 +- ...ppet_metadata_google.cloud.billing.v1.json | 2 +- 140 files changed, 4221 insertions(+), 3119 deletions(-) diff --git a/packages/google-cloud-apphub/package.json b/packages/google-cloud-apphub/package.json index f532d9e8494..857dc2564ce 100644 --- a/packages/google-cloud-apphub/package.json +++ b/packages/google-cloud-apphub/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json b/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json index b03efb44d26..990d09f08df 100644 --- a/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json +++ b/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apphub", - "version": "0.3.1", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apphub/src/v1/app_hub_client.ts b/packages/google-cloud-apphub/src/v1/app_hub_client.ts index cf16b338ba8..21a8ff765a7 100644 --- a/packages/google-cloud-apphub/src/v1/app_hub_client.ts +++ b/packages/google-cloud-apphub/src/v1/app_hub_client.ts @@ -757,7 +757,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupServiceProjectAttachment request %j', request); const wrappedCallback: | Callback< @@ -890,7 +892,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServiceProjectAttachment request %j', request); const wrappedCallback: | Callback< @@ -1019,7 +1023,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detachServiceProjectAttachment request %j', request); const wrappedCallback: | Callback< @@ -1146,7 +1152,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDiscoveredService request %j', request); const wrappedCallback: | Callback< @@ -1271,7 +1279,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupDiscoveredService request %j', request); const wrappedCallback: | Callback< @@ -1384,7 +1394,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -1500,7 +1512,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDiscoveredWorkload request %j', request); const wrappedCallback: | Callback< @@ -1631,7 +1645,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupDiscoveredWorkload request %j', request); const wrappedCallback: | Callback< @@ -1744,7 +1760,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkload request %j', request); const wrappedCallback: | Callback< @@ -1854,7 +1872,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getApplication request %j', request); const wrappedCallback: | Callback< @@ -2005,7 +2025,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2194,7 +2216,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2390,7 +2414,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2581,7 +2607,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ 'service.name': request.service!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2764,7 +2792,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2954,7 +2984,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3145,7 +3177,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ 'workload.name': request.workload!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3328,7 +3362,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3517,7 +3553,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3708,7 +3746,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ 'application.name': request.application!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3891,7 +3931,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4060,7 +4102,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apphub.v1.IListServiceProjectAttachmentsRequest, @@ -4132,7 +4176,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listServiceProjectAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceProjectAttachments stream %j', request); return this.descriptors.page.listServiceProjectAttachments.createStream( this.innerApiCalls.listServiceProjectAttachments as GaxCall, @@ -4186,7 +4232,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listServiceProjectAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceProjectAttachments iterate %j', request); return this.descriptors.page.listServiceProjectAttachments.asyncIterate( this.innerApiCalls['listServiceProjectAttachments'] as GaxCall, @@ -4295,7 +4343,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apphub.v1.IListDiscoveredServicesRequest, @@ -4366,7 +4416,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listDiscoveredServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDiscoveredServices stream %j', request); return this.descriptors.page.listDiscoveredServices.createStream( this.innerApiCalls.listDiscoveredServices as GaxCall, @@ -4419,7 +4471,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listDiscoveredServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDiscoveredServices iterate %j', request); return this.descriptors.page.listDiscoveredServices.asyncIterate( this.innerApiCalls['listDiscoveredServices'] as GaxCall, @@ -4522,7 +4576,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apphub.v1.IListServicesRequest, @@ -4594,7 +4650,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -4648,7 +4706,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -4757,7 +4817,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apphub.v1.IListDiscoveredWorkloadsRequest, @@ -4828,7 +4890,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listDiscoveredWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDiscoveredWorkloads stream %j', request); return this.descriptors.page.listDiscoveredWorkloads.createStream( this.innerApiCalls.listDiscoveredWorkloads as GaxCall, @@ -4881,7 +4945,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listDiscoveredWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDiscoveredWorkloads iterate %j', request); return this.descriptors.page.listDiscoveredWorkloads.asyncIterate( this.innerApiCalls['listDiscoveredWorkloads'] as GaxCall, @@ -4984,7 +5050,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apphub.v1.IListWorkloadsRequest, @@ -5056,7 +5124,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads stream %j', request); return this.descriptors.page.listWorkloads.createStream( this.innerApiCalls.listWorkloads as GaxCall, @@ -5110,7 +5180,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads iterate %j', request); return this.descriptors.page.listWorkloads.asyncIterate( this.innerApiCalls['listWorkloads'] as GaxCall, @@ -5218,7 +5290,9 @@ export class AppHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.apphub.v1.IListApplicationsRequest, @@ -5289,7 +5363,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listApplications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApplications stream %j', request); return this.descriptors.page.listApplications.createStream( this.innerApiCalls.listApplications as GaxCall, @@ -5342,7 +5418,9 @@ export class AppHubClient { }); const defaultCallSettings = this._defaults['listApplications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listApplications iterate %j', request); return this.descriptors.page.listApplications.asyncIterate( this.innerApiCalls['listApplications'] as GaxCall, @@ -5660,7 +5738,7 @@ export class AppHubClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-apphub/test/gapic_app_hub_v1.ts b/packages/google-cloud-apphub/test/gapic_app_hub_v1.ts index 6f807c10745..9525b16654e 100644 --- a/packages/google-cloud-apphub/test/gapic_app_hub_v1.ts +++ b/packages/google-cloud-apphub/test/gapic_app_hub_v1.ts @@ -288,7 +288,9 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.appHubStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest() ); @@ -379,7 +381,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest() ); @@ -426,7 +428,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest() ); @@ -460,7 +462,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupServiceProjectAttachmentRequest() ); @@ -484,7 +486,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest() ); @@ -516,7 +518,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest() ); @@ -563,7 +565,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest() ); @@ -597,7 +599,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceProjectAttachmentRequest() ); @@ -621,7 +623,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest() ); @@ -653,7 +655,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest() ); @@ -700,7 +702,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest() ); @@ -734,7 +736,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DetachServiceProjectAttachmentRequest() ); @@ -758,7 +760,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredServiceRequest() ); @@ -790,7 +792,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredServiceRequest() ); @@ -837,7 +839,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredServiceRequest() ); @@ -868,7 +870,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredServiceRequest() ); @@ -889,7 +891,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredServiceRequest() ); @@ -921,7 +923,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredServiceRequest() ); @@ -968,7 +970,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredServiceRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredServiceRequest() ); @@ -1026,7 +1028,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceRequest() ); @@ -1057,7 +1059,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceRequest() ); @@ -1104,7 +1106,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetServiceRequest() ); @@ -1156,7 +1158,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest() ); @@ -1188,7 +1190,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest() ); @@ -1235,7 +1237,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest() ); @@ -1269,7 +1271,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetDiscoveredWorkloadRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest() ); @@ -1325,7 +1327,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest() ); @@ -1372,7 +1374,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest() ); @@ -1406,7 +1408,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.LookupDiscoveredWorkloadRequest() ); @@ -1430,7 +1432,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetWorkloadRequest() ); @@ -1461,7 +1463,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetWorkloadRequest() ); @@ -1508,7 +1510,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetWorkloadRequest() ); @@ -1539,7 +1541,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetWorkloadRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetApplicationRequest() ); @@ -1591,7 +1593,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetApplicationRequest() ); @@ -1638,7 +1640,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetApplicationRequest() ); @@ -1669,7 +1671,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.GetApplicationRequest() ); @@ -1690,7 +1692,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest() ); @@ -1723,7 +1725,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest() ); @@ -1811,7 +1813,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceProjectAttachmentRequest() ); @@ -1844,7 +1846,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1867,7 +1869,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1888,7 +1890,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest() ); @@ -1921,7 +1923,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest() ); @@ -1975,7 +1977,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest() ); @@ -2009,7 +2011,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceProjectAttachmentRequest() ); @@ -2042,7 +2044,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2065,7 +2067,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2086,7 +2088,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceRequest() ); @@ -2119,7 +2121,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceRequest() ); @@ -2173,7 +2175,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceRequest() ); @@ -2204,7 +2206,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateServiceRequest() ); @@ -2237,7 +2239,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2259,7 +2261,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2280,7 +2282,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateServiceRequest() ); @@ -2314,7 +2316,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateServiceRequest() ); @@ -2369,7 +2371,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateServiceRequest() ); @@ -2401,7 +2403,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateServiceRequest() ); @@ -2435,7 +2437,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2457,7 +2459,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2478,7 +2480,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceRequest() ); @@ -2511,7 +2513,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceRequest() ); @@ -2565,7 +2567,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceRequest() ); @@ -2596,7 +2598,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteServiceRequest() ); @@ -2629,7 +2631,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2651,7 +2653,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2672,7 +2674,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateWorkloadRequest() ); @@ -2705,7 +2707,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateWorkloadRequest() ); @@ -2759,7 +2761,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateWorkloadRequest() ); @@ -2790,7 +2792,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateWorkloadRequest() ); @@ -2823,7 +2825,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2845,7 +2847,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2866,7 +2868,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateWorkloadRequest() ); @@ -2900,7 +2902,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateWorkloadRequest() ); @@ -2955,7 +2957,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateWorkloadRequest() ); @@ -2987,7 +2989,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateWorkloadRequest() ); @@ -3021,7 +3023,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3043,7 +3045,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3064,7 +3066,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteWorkloadRequest() ); @@ -3097,7 +3099,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteWorkloadRequest() ); @@ -3151,7 +3153,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteWorkloadRequest() ); @@ -3182,7 +3184,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteWorkloadRequest() ); @@ -3215,7 +3217,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3237,7 +3239,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3258,7 +3260,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateApplicationRequest() ); @@ -3291,7 +3293,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateApplicationRequest() ); @@ -3345,7 +3347,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateApplicationRequest() ); @@ -3376,7 +3378,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.CreateApplicationRequest() ); @@ -3409,7 +3411,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3431,7 +3433,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3452,7 +3454,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateApplicationRequest() ); @@ -3486,7 +3488,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateApplicationRequest() ); @@ -3541,7 +3543,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateApplicationRequest() ); @@ -3573,7 +3575,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.UpdateApplicationRequest() ); @@ -3607,7 +3609,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3629,7 +3631,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3650,7 +3652,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteApplicationRequest() ); @@ -3683,7 +3685,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteApplicationRequest() ); @@ -3737,7 +3739,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteApplicationRequest() ); @@ -3768,7 +3770,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.DeleteApplicationRequest() ); @@ -3801,7 +3803,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3823,7 +3825,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3844,7 +3846,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest() ); @@ -3884,7 +3886,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest() ); @@ -3941,7 +3943,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest() ); @@ -3975,7 +3977,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest() ); @@ -4047,7 +4049,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest() ); @@ -4108,7 +4110,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest() ); @@ -4162,7 +4164,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServiceProjectAttachmentsRequest() ); @@ -4209,7 +4211,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredServicesRequest() ); @@ -4249,7 +4251,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredServicesRequest() ); @@ -4304,7 +4306,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredServicesRequest() ); @@ -4338,7 +4340,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredServicesRequest() ); @@ -4404,7 +4406,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredServicesRequest() ); @@ -4459,7 +4461,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredServicesRequest() ); @@ -4512,7 +4514,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredServicesRequest() ); @@ -4559,7 +4561,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServicesRequest() ); @@ -4592,7 +4594,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServicesRequest() ); @@ -4641,7 +4643,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServicesRequest() ); @@ -4672,7 +4674,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServicesRequest() ); @@ -4723,7 +4725,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServicesRequest() ); @@ -4771,7 +4773,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServicesRequest() ); @@ -4814,7 +4816,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListServicesRequest() ); @@ -4856,7 +4858,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest() ); @@ -4896,7 +4898,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest() ); @@ -4951,7 +4953,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest() ); @@ -4985,7 +4987,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest() ); @@ -5052,7 +5054,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest() ); @@ -5108,7 +5110,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest() ); @@ -5161,7 +5163,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListDiscoveredWorkloadsRequest() ); @@ -5208,7 +5210,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListWorkloadsRequest() ); @@ -5241,7 +5243,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListWorkloadsRequest() ); @@ -5290,7 +5292,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListWorkloadsRequest() ); @@ -5321,7 +5323,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListWorkloadsRequest() ); @@ -5375,7 +5377,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListWorkloadsRequest() ); @@ -5424,7 +5426,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListWorkloadsRequest() ); @@ -5467,7 +5469,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListWorkloadsRequest() ); @@ -5509,7 +5511,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListApplicationsRequest() ); @@ -5542,7 +5544,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListApplicationsRequest() ); @@ -5591,7 +5593,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListApplicationsRequest() ); @@ -5622,7 +5624,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListApplicationsRequest() ); @@ -5676,7 +5678,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListApplicationsRequest() ); @@ -5725,7 +5727,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListApplicationsRequest() ); @@ -5768,7 +5770,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.apphub.v1.ListApplicationsRequest() ); @@ -5809,7 +5811,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5839,7 +5841,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5883,7 +5885,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5915,7 +5917,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5945,7 +5947,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5989,7 +5991,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6021,7 +6023,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6054,7 +6056,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6098,7 +6100,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6133,7 +6135,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6163,7 +6165,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6207,7 +6209,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6242,7 +6244,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6290,7 +6292,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6331,7 +6333,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -6410,7 +6412,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -6490,7 +6492,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -6586,8 +6588,7 @@ describe('v1.AppHubClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -6606,7 +6607,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -6615,8 +6616,7 @@ describe('v1.AppHubClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -6632,7 +6632,7 @@ describe('v1.AppHubClient', () => { }); describe('Path templates', () => { - describe('application', () => { + describe('application', async () => { const fakePath = '/rendered/path/application'; const expectedParameters = { project: 'projectValue', @@ -6643,7 +6643,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.applicationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6696,7 +6696,7 @@ describe('v1.AppHubClient', () => { }); }); - describe('discoveredService', () => { + describe('discoveredService', async () => { const fakePath = '/rendered/path/discoveredService'; const expectedParameters = { project: 'projectValue', @@ -6707,7 +6707,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.discoveredServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6773,7 +6773,7 @@ describe('v1.AppHubClient', () => { }); }); - describe('discoveredWorkload', () => { + describe('discoveredWorkload', async () => { const fakePath = '/rendered/path/discoveredWorkload'; const expectedParameters = { project: 'projectValue', @@ -6784,7 +6784,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.discoveredWorkloadPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6850,7 +6850,7 @@ describe('v1.AppHubClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -6860,7 +6860,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6899,7 +6899,7 @@ describe('v1.AppHubClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -6908,7 +6908,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6937,7 +6937,7 @@ describe('v1.AppHubClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -6949,7 +6949,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7013,7 +7013,7 @@ describe('v1.AppHubClient', () => { }); }); - describe('serviceProjectAttachment', () => { + describe('serviceProjectAttachment', async () => { const fakePath = '/rendered/path/serviceProjectAttachment'; const expectedParameters = { project: 'projectValue', @@ -7024,7 +7024,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceProjectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7094,7 +7094,7 @@ describe('v1.AppHubClient', () => { }); }); - describe('workload', () => { + describe('workload', async () => { const fakePath = '/rendered/path/workload'; const expectedParameters = { project: 'projectValue', @@ -7106,7 +7106,7 @@ describe('v1.AppHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workloadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-asset/package.json b/packages/google-cloud-asset/package.json index 587fe52aca8..308c7b1f87e 100644 --- a/packages/google-cloud-asset/package.json +++ b/packages/google-cloud-asset/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-asset/src/v1/asset_service_client.ts b/packages/google-cloud-asset/src/v1/asset_service_client.ts index 8b974bcfe3e..942d4e23384 100644 --- a/packages/google-cloud-asset/src/v1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1/asset_service_client.ts @@ -651,7 +651,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetAssetsHistory request %j', request); const wrappedCallback: | Callback< @@ -775,7 +777,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFeed request %j', request); const wrappedCallback: | Callback< @@ -884,7 +888,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFeed request %j', request); const wrappedCallback: | Callback< @@ -992,7 +998,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeeds request %j', request); const wrappedCallback: | Callback< @@ -1106,7 +1114,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ 'feed.name': request.feed!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFeed request %j', request); const wrappedCallback: | Callback< @@ -1215,7 +1225,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFeed request %j', request); const wrappedCallback: | Callback< @@ -1353,7 +1365,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ 'analysis_query.scope': request.analysisQuery!.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1477,7 +1491,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeMove request %j', request); const wrappedCallback: | Callback< @@ -1648,7 +1664,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryAssets request %j', request); const wrappedCallback: | Callback< @@ -1773,7 +1791,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSavedQuery request %j', request); const wrappedCallback: | Callback< @@ -1885,7 +1905,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSavedQuery request %j', request); const wrappedCallback: | Callback< @@ -2002,7 +2024,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ 'saved_query.name': request.savedQuery!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSavedQuery request %j', request); const wrappedCallback: | Callback< @@ -2117,7 +2141,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSavedQuery request %j', request); const wrappedCallback: | Callback< @@ -2255,7 +2281,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetEffectiveIamPolicies request %j', request); const wrappedCallback: | Callback< @@ -2447,7 +2475,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2643,7 +2673,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ 'analysis_query.scope': request.analysisQuery!.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2855,7 +2887,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1.IListAssetsRequest, @@ -2969,7 +3003,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets stream %j', request); return this.descriptors.page.listAssets.createStream( this.innerApiCalls.listAssets as GaxCall, @@ -3067,7 +3103,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets iterate %j', request); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, @@ -3336,7 +3374,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1.ISearchAllResourcesRequest, @@ -3565,7 +3605,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllResources stream %j', request); return this.descriptors.page.searchAllResources.createStream( this.innerApiCalls.searchAllResources as GaxCall, @@ -3776,7 +3818,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllResources iterate %j', request); return this.descriptors.page.searchAllResources.asyncIterate( this.innerApiCalls['searchAllResources'] as GaxCall, @@ -3971,7 +4015,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1.ISearchAllIamPoliciesRequest, @@ -4126,7 +4172,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllIamPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllIamPolicies stream %j', request); return this.descriptors.page.searchAllIamPolicies.createStream( this.innerApiCalls.searchAllIamPolicies as GaxCall, @@ -4263,7 +4311,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllIamPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllIamPolicies iterate %j', request); return this.descriptors.page.searchAllIamPolicies.asyncIterate( this.innerApiCalls['searchAllIamPolicies'] as GaxCall, @@ -4376,7 +4426,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1.IListSavedQueriesRequest, @@ -4458,7 +4510,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['listSavedQueries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSavedQueries stream %j', request); return this.descriptors.page.listSavedQueries.createStream( this.innerApiCalls.listSavedQueries as GaxCall, @@ -4522,7 +4576,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['listSavedQueries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSavedQueries iterate %j', request); return this.descriptors.page.listSavedQueries.asyncIterate( this.innerApiCalls['listSavedQueries'] as GaxCall, @@ -4645,7 +4701,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1.IAnalyzeOrgPoliciesRequest, @@ -4731,7 +4789,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['analyzeOrgPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeOrgPolicies stream %j', request); return this.descriptors.page.analyzeOrgPolicies.createStream( this.innerApiCalls.analyzeOrgPolicies as GaxCall, @@ -4799,7 +4859,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['analyzeOrgPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeOrgPolicies iterate %j', request); return this.descriptors.page.analyzeOrgPolicies.asyncIterate( this.innerApiCalls['analyzeOrgPolicies'] as GaxCall, @@ -4925,7 +4987,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1.IAnalyzeOrgPolicyGovernedContainersRequest, @@ -5020,7 +5084,9 @@ export class AssetServiceClient { const defaultCallSettings = this._defaults['analyzeOrgPolicyGovernedContainers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeOrgPolicyGovernedContainers stream %j', request); return this.descriptors.page.analyzeOrgPolicyGovernedContainers.createStream( this.innerApiCalls.analyzeOrgPolicyGovernedContainers as GaxCall, @@ -5091,7 +5157,9 @@ export class AssetServiceClient { const defaultCallSettings = this._defaults['analyzeOrgPolicyGovernedContainers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeOrgPolicyGovernedContainers iterate %j', request); return this.descriptors.page.analyzeOrgPolicyGovernedContainers.asyncIterate( this.innerApiCalls['analyzeOrgPolicyGovernedContainers'] as GaxCall, @@ -5280,7 +5348,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1.IAnalyzeOrgPolicyGovernedAssetsRequest, @@ -5385,7 +5455,9 @@ export class AssetServiceClient { const defaultCallSettings = this._defaults['analyzeOrgPolicyGovernedAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeOrgPolicyGovernedAssets stream %j', request); return this.descriptors.page.analyzeOrgPolicyGovernedAssets.createStream( this.innerApiCalls.analyzeOrgPolicyGovernedAssets as GaxCall, @@ -5472,7 +5544,9 @@ export class AssetServiceClient { const defaultCallSettings = this._defaults['analyzeOrgPolicyGovernedAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeOrgPolicyGovernedAssets iterate %j', request); return this.descriptors.page.analyzeOrgPolicyGovernedAssets.asyncIterate( this.innerApiCalls['analyzeOrgPolicyGovernedAssets'] as GaxCall, @@ -5574,7 +5648,7 @@ export class AssetServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts index e74501cc931..a1b2a577d8a 100644 --- a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts @@ -502,7 +502,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, @@ -590,7 +592,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllResources stream %j', request); return this.descriptors.page.searchAllResources.createStream( this.innerApiCalls.searchAllResources as GaxCall, @@ -660,7 +664,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllResources iterate %j', request); return this.descriptors.page.searchAllResources.asyncIterate( this.innerApiCalls['searchAllResources'] as GaxCall, @@ -785,7 +791,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, @@ -868,7 +876,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllIamPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllIamPolicies stream %j', request); return this.descriptors.page.searchAllIamPolicies.createStream( this.innerApiCalls.searchAllIamPolicies as GaxCall, @@ -933,7 +943,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['searchAllIamPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllIamPolicies iterate %j', request); return this.descriptors.page.searchAllIamPolicies.asyncIterate( this.innerApiCalls['searchAllIamPolicies'] as GaxCall, diff --git a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts index 12f5f911dd8..a8841778d80 100644 --- a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts @@ -483,7 +483,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFeed request %j', request); const wrappedCallback: | Callback< @@ -596,7 +598,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFeed request %j', request); const wrappedCallback: | Callback< @@ -708,7 +712,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeeds request %j', request); const wrappedCallback: | Callback< @@ -826,7 +832,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ 'feed.name': request.feed!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFeed request %j', request); const wrappedCallback: | Callback< @@ -939,7 +947,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFeed request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts index b22c8c8ae90..95bb643b89b 100644 --- a/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts @@ -517,7 +517,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.asset.v1p5beta1.IListAssetsRequest, @@ -616,7 +618,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets stream %j', request); return this.descriptors.page.listAssets.createStream( this.innerApiCalls.listAssets as GaxCall, @@ -697,7 +701,9 @@ export class AssetServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets iterate %j', request); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, diff --git a/packages/google-cloud-asset/src/v1p7beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p7beta1/asset_service_client.ts index d481ffb3c2a..6f066a06a2c 100644 --- a/packages/google-cloud-asset/src/v1p7beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p7beta1/asset_service_client.ts @@ -567,7 +567,9 @@ export class AssetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -729,7 +731,7 @@ export class AssetServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-asset/test/gapic_asset_service_v1.ts b/packages/google-cloud-asset/test/gapic_asset_service_v1.ts index e985ffe139d..ed69745dbf1 100644 --- a/packages/google-cloud-asset/test/gapic_asset_service_v1.ts +++ b/packages/google-cloud-asset/test/gapic_asset_service_v1.ts @@ -284,7 +284,9 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.assetServiceStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetAssetsHistoryRequest() ); @@ -375,7 +377,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetAssetsHistoryRequest() ); @@ -422,7 +424,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetAssetsHistoryRequest() ); @@ -456,7 +458,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetAssetsHistoryRequest() ); @@ -480,7 +482,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateFeedRequest() ); @@ -511,7 +513,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateFeedRequest() ); @@ -558,7 +560,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateFeedRequest() ); @@ -589,7 +591,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateFeedRequest() ); @@ -610,7 +612,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetFeedRequest() ); @@ -641,7 +643,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetFeedRequest() ); @@ -688,7 +690,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetFeedRequest() ); @@ -716,7 +718,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetFeedRequest() ); @@ -737,7 +739,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListFeedsRequest() ); @@ -768,7 +770,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListFeedsRequest() ); @@ -815,7 +817,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListFeedsRequest() ); @@ -843,7 +845,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListFeedsRequest() ); @@ -864,7 +866,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateFeedRequest() ); @@ -896,7 +898,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateFeedRequest() ); @@ -944,7 +946,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateFeedRequest() ); @@ -976,7 +978,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateFeedRequest() ); @@ -998,7 +1000,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteFeedRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteFeedRequest() ); @@ -1076,7 +1078,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteFeedRequest() ); @@ -1107,7 +1109,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteFeedRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyRequest() ); @@ -1208,7 +1210,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeMoveRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeMoveRequest() ); @@ -1340,7 +1342,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeMoveRequest() ); @@ -1371,7 +1373,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeMoveRequest() ); @@ -1392,7 +1394,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.QueryAssetsRequest() ); @@ -1423,7 +1425,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.QueryAssetsRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.QueryAssetsRequest() ); @@ -1501,7 +1503,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.QueryAssetsRequest() ); @@ -1522,7 +1524,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateSavedQueryRequest() ); @@ -1553,7 +1555,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateSavedQueryRequest() ); @@ -1600,7 +1602,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateSavedQueryRequest() ); @@ -1631,7 +1633,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.CreateSavedQueryRequest() ); @@ -1652,7 +1654,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetSavedQueryRequest() ); @@ -1683,7 +1685,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetSavedQueryRequest() ); @@ -1730,7 +1732,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetSavedQueryRequest() ); @@ -1761,7 +1763,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.GetSavedQueryRequest() ); @@ -1782,7 +1784,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateSavedQueryRequest() ); @@ -1814,7 +1816,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateSavedQueryRequest() ); @@ -1862,7 +1864,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateSavedQueryRequest() ); @@ -1894,7 +1896,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.UpdateSavedQueryRequest() ); @@ -1916,7 +1918,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteSavedQueryRequest() ); @@ -1947,7 +1949,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteSavedQueryRequest() ); @@ -1994,7 +1996,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteSavedQueryRequest() ); @@ -2025,7 +2027,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.DeleteSavedQueryRequest() ); @@ -2046,7 +2048,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest() ); @@ -2078,7 +2080,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest() ); @@ -2125,7 +2127,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest() ); @@ -2159,7 +2161,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest() ); @@ -2183,7 +2185,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ExportAssetsRequest() ); @@ -2215,7 +2217,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ExportAssetsRequest() ); @@ -2269,7 +2271,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ExportAssetsRequest() ); @@ -2300,7 +2302,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ExportAssetsRequest() ); @@ -2333,7 +2335,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2355,7 +2357,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2373,7 +2375,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest() ); @@ -2407,7 +2409,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest() ); @@ -2462,7 +2464,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest() ); @@ -2497,7 +2499,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest() ); @@ -2531,7 +2533,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2554,7 +2556,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2575,7 +2577,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListAssetsRequest() ); @@ -2608,7 +2610,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListAssetsRequest() ); @@ -2657,7 +2659,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListAssetsRequest() ); @@ -2688,7 +2690,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListAssetsRequest() ); @@ -2739,7 +2741,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListAssetsRequest() ); @@ -2787,7 +2789,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListAssetsRequest() ); @@ -2830,7 +2832,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListAssetsRequest() ); @@ -2874,7 +2876,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllResourcesRequest() ); @@ -2914,7 +2916,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllResourcesRequest() ); @@ -2969,7 +2971,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllResourcesRequest() ); @@ -3000,7 +3002,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllResourcesRequest() ); @@ -3061,7 +3063,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllResourcesRequest() ); @@ -3111,7 +3113,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllResourcesRequest() ); @@ -3161,7 +3163,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllResourcesRequest() ); @@ -3204,7 +3206,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllIamPoliciesRequest() ); @@ -3244,7 +3246,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllIamPoliciesRequest() ); @@ -3301,7 +3303,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllIamPoliciesRequest() ); @@ -3332,7 +3334,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllIamPoliciesRequest() ); @@ -3393,7 +3395,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllIamPoliciesRequest() ); @@ -3443,7 +3445,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllIamPoliciesRequest() ); @@ -3493,7 +3495,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.SearchAllIamPoliciesRequest() ); @@ -3536,7 +3538,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListSavedQueriesRequest() ); @@ -3569,7 +3571,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListSavedQueriesRequest() ); @@ -3618,7 +3620,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListSavedQueriesRequest() ); @@ -3649,7 +3651,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListSavedQueriesRequest() ); @@ -3703,7 +3705,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListSavedQueriesRequest() ); @@ -3752,7 +3754,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListSavedQueriesRequest() ); @@ -3795,7 +3797,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.ListSavedQueriesRequest() ); @@ -3837,7 +3839,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest() ); @@ -3877,7 +3879,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest() ); @@ -3934,7 +3936,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest() ); @@ -3965,7 +3967,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest() ); @@ -4028,7 +4030,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest() ); @@ -4080,7 +4082,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest() ); @@ -4130,7 +4132,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPoliciesRequest() ); @@ -4173,7 +4175,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest() ); @@ -4214,7 +4216,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest() ); @@ -4271,7 +4273,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest() ); @@ -4305,7 +4307,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest() ); @@ -4377,7 +4379,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest() ); @@ -4438,7 +4440,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest() ); @@ -4492,7 +4494,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest() ); @@ -4539,7 +4541,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest() ); @@ -4579,7 +4581,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest() ); @@ -4636,7 +4638,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest() ); @@ -4670,7 +4672,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest() ); @@ -4742,7 +4744,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest() ); @@ -4803,7 +4805,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest() ); @@ -4857,7 +4859,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest() ); @@ -4903,7 +4905,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4982,7 +4984,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5062,7 +5064,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5158,8 +5160,7 @@ describe('v1.AssetServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5178,7 +5179,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5187,8 +5188,7 @@ describe('v1.AssetServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5204,7 +5204,7 @@ describe('v1.AssetServiceClient', () => { }); describe('Path templates', () => { - describe('accessLevel', () => { + describe('accessLevel', async () => { const fakePath = '/rendered/path/accessLevel'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -5214,7 +5214,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessLevelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5256,7 +5256,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('accessPolicy', () => { + describe('accessPolicy', async () => { const fakePath = '/rendered/path/accessPolicy'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -5265,7 +5265,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5294,7 +5294,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('folderFeed', () => { + describe('folderFeed', async () => { const fakePath = '/rendered/path/folderFeed'; const expectedParameters = { folder: 'folderValue', @@ -5304,7 +5304,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderFeedPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5343,7 +5343,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('folderSavedQuery', () => { + describe('folderSavedQuery', async () => { const fakePath = '/rendered/path/folderSavedQuery'; const expectedParameters = { folder: 'folderValue', @@ -5353,7 +5353,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSavedQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5398,7 +5398,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('inventory', () => { + describe('inventory', async () => { const fakePath = '/rendered/path/inventory'; const expectedParameters = { project: 'projectValue', @@ -5409,7 +5409,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.inventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5462,7 +5462,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('organizationFeed', () => { + describe('organizationFeed', async () => { const fakePath = '/rendered/path/organizationFeed'; const expectedParameters = { organization: 'organizationValue', @@ -5472,7 +5472,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationFeedPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5518,7 +5518,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('organizationSavedQuery', () => { + describe('organizationSavedQuery', async () => { const fakePath = '/rendered/path/organizationSavedQuery'; const expectedParameters = { organization: 'organizationValue', @@ -5528,7 +5528,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSavedQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5581,7 +5581,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5590,7 +5590,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5619,7 +5619,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('projectFeed', () => { + describe('projectFeed', async () => { const fakePath = '/rendered/path/projectFeed'; const expectedParameters = { project: 'projectValue', @@ -5629,7 +5629,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectFeedPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5668,7 +5668,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('projectSavedQuery', () => { + describe('projectSavedQuery', async () => { const fakePath = '/rendered/path/projectSavedQuery'; const expectedParameters = { project: 'projectValue', @@ -5678,7 +5678,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSavedQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5730,7 +5730,7 @@ describe('v1.AssetServiceClient', () => { }); }); - describe('servicePerimeter', () => { + describe('servicePerimeter', async () => { const fakePath = '/rendered/path/servicePerimeter'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -5740,7 +5740,7 @@ describe('v1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePerimeterPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-asset/test/gapic_asset_service_v1p1beta1.ts b/packages/google-cloud-asset/test/gapic_asset_service_v1p1beta1.ts index ee91f1e1a65..ecb4ffd5b89 100644 --- a/packages/google-cloud-asset/test/gapic_asset_service_v1p1beta1.ts +++ b/packages/google-cloud-asset/test/gapic_asset_service_v1p1beta1.ts @@ -252,7 +252,9 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.assetServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest() ); @@ -351,7 +353,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest() ); @@ -408,7 +410,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest() ); @@ -439,7 +441,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest() ); @@ -502,7 +504,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest() ); @@ -554,7 +556,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest() ); @@ -604,7 +606,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest() ); @@ -647,7 +649,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest() ); @@ -687,7 +689,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest() ); @@ -744,7 +746,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest() ); @@ -775,7 +777,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest() ); @@ -838,7 +840,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest() ); @@ -890,7 +892,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest() ); @@ -940,7 +942,7 @@ describe('v1p1beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest() ); diff --git a/packages/google-cloud-asset/test/gapic_asset_service_v1p2beta1.ts b/packages/google-cloud-asset/test/gapic_asset_service_v1p2beta1.ts index 774518a5c61..b617a3bc097 100644 --- a/packages/google-cloud-asset/test/gapic_asset_service_v1p2beta1.ts +++ b/packages/google-cloud-asset/test/gapic_asset_service_v1p2beta1.ts @@ -189,7 +189,9 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.assetServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.CreateFeedRequest() ); @@ -279,7 +281,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.CreateFeedRequest() ); @@ -326,7 +328,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.CreateFeedRequest() ); @@ -357,7 +359,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.CreateFeedRequest() ); @@ -378,7 +380,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.GetFeedRequest() ); @@ -409,7 +411,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.GetFeedRequest() ); @@ -456,7 +458,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.GetFeedRequest() ); @@ -484,7 +486,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.GetFeedRequest() ); @@ -505,7 +507,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.ListFeedsRequest() ); @@ -536,7 +538,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.ListFeedsRequest() ); @@ -583,7 +585,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.ListFeedsRequest() ); @@ -611,7 +613,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.ListFeedsRequest() ); @@ -632,7 +634,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.UpdateFeedRequest() ); @@ -664,7 +666,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.UpdateFeedRequest() ); @@ -712,7 +714,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.UpdateFeedRequest() ); @@ -744,7 +746,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.UpdateFeedRequest() ); @@ -766,7 +768,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.DeleteFeedRequest() ); @@ -797,7 +799,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.DeleteFeedRequest() ); @@ -844,7 +846,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.DeleteFeedRequest() ); @@ -875,7 +877,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p2beta1.DeleteFeedRequest() ); @@ -891,7 +893,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); describe('Path templates', () => { - describe('accessLevel', () => { + describe('accessLevel', async () => { const fakePath = '/rendered/path/accessLevel'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -901,7 +903,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessLevelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -943,7 +945,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); }); - describe('accessPolicy', () => { + describe('accessPolicy', async () => { const fakePath = '/rendered/path/accessPolicy'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -952,7 +954,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -981,7 +983,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); }); - describe('folderFeed', () => { + describe('folderFeed', async () => { const fakePath = '/rendered/path/folderFeed'; const expectedParameters = { folder: 'folderValue', @@ -991,7 +993,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderFeedPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1030,7 +1032,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); }); - describe('organizationFeed', () => { + describe('organizationFeed', async () => { const fakePath = '/rendered/path/organizationFeed'; const expectedParameters = { organization: 'organizationValue', @@ -1040,7 +1042,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationFeedPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1086,7 +1088,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); }); - describe('projectFeed', () => { + describe('projectFeed', async () => { const fakePath = '/rendered/path/projectFeed'; const expectedParameters = { project: 'projectValue', @@ -1096,7 +1098,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectFeedPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1135,7 +1137,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); }); - describe('servicePerimeter', () => { + describe('servicePerimeter', async () => { const fakePath = '/rendered/path/servicePerimeter'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -1145,7 +1147,7 @@ describe('v1p2beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePerimeterPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-asset/test/gapic_asset_service_v1p5beta1.ts b/packages/google-cloud-asset/test/gapic_asset_service_v1p5beta1.ts index 5417df6b1a1..ef0bc4aa438 100644 --- a/packages/google-cloud-asset/test/gapic_asset_service_v1p5beta1.ts +++ b/packages/google-cloud-asset/test/gapic_asset_service_v1p5beta1.ts @@ -252,7 +252,9 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.assetServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p5beta1.ListAssetsRequest() ); @@ -344,7 +346,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p5beta1.ListAssetsRequest() ); @@ -393,7 +395,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p5beta1.ListAssetsRequest() ); @@ -424,7 +426,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p5beta1.ListAssetsRequest() ); @@ -478,7 +480,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p5beta1.ListAssetsRequest() ); @@ -529,7 +531,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p5beta1.ListAssetsRequest() ); @@ -572,7 +574,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p5beta1.ListAssetsRequest() ); @@ -611,7 +613,7 @@ describe('v1p5beta1.AssetServiceClient', () => { }); describe('Path templates', () => { - describe('accessLevel', () => { + describe('accessLevel', async () => { const fakePath = '/rendered/path/accessLevel'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -621,7 +623,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessLevelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -663,7 +665,7 @@ describe('v1p5beta1.AssetServiceClient', () => { }); }); - describe('accessPolicy', () => { + describe('accessPolicy', async () => { const fakePath = '/rendered/path/accessPolicy'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -672,7 +674,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -701,7 +703,7 @@ describe('v1p5beta1.AssetServiceClient', () => { }); }); - describe('servicePerimeter', () => { + describe('servicePerimeter', async () => { const fakePath = '/rendered/path/servicePerimeter'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -711,7 +713,7 @@ describe('v1p5beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePerimeterPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-asset/test/gapic_asset_service_v1p7beta1.ts b/packages/google-cloud-asset/test/gapic_asset_service_v1p7beta1.ts index 5230b69520a..ade37a2fe67 100644 --- a/packages/google-cloud-asset/test/gapic_asset_service_v1p7beta1.ts +++ b/packages/google-cloud-asset/test/gapic_asset_service_v1p7beta1.ts @@ -235,7 +235,9 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.assetServiceStub); client.close().then(() => { done(); @@ -294,7 +296,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p7beta1.ExportAssetsRequest() ); @@ -326,7 +328,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p7beta1.ExportAssetsRequest() ); @@ -380,7 +382,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p7beta1.ExportAssetsRequest() ); @@ -411,7 +413,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.asset.v1p7beta1.ExportAssetsRequest() ); @@ -444,7 +446,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -466,7 +468,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -483,7 +485,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -562,7 +564,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -642,7 +644,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -738,8 +740,7 @@ describe('v1p7beta1.AssetServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -758,7 +759,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -767,8 +768,7 @@ describe('v1p7beta1.AssetServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -784,7 +784,7 @@ describe('v1p7beta1.AssetServiceClient', () => { }); describe('Path templates', () => { - describe('accessLevel', () => { + describe('accessLevel', async () => { const fakePath = '/rendered/path/accessLevel'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -794,7 +794,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessLevelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -836,7 +836,7 @@ describe('v1p7beta1.AssetServiceClient', () => { }); }); - describe('accessPolicy', () => { + describe('accessPolicy', async () => { const fakePath = '/rendered/path/accessPolicy'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -845,7 +845,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -874,7 +874,7 @@ describe('v1p7beta1.AssetServiceClient', () => { }); }); - describe('servicePerimeter', () => { + describe('servicePerimeter', async () => { const fakePath = '/rendered/path/servicePerimeter'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -884,7 +884,7 @@ describe('v1p7beta1.AssetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePerimeterPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-assuredworkloads/package.json b/packages/google-cloud-assuredworkloads/package.json index d48a09cd5fa..e79f7f8ae14 100644 --- a/packages/google-cloud-assuredworkloads/package.json +++ b/packages/google-cloud-assuredworkloads/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json index 300cd797441..f93569c6a7e 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json index 300cd797441..f93569c6a7e 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json index 5bd72d331e4..650d2e29d4f 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json index 5bd72d331e4..650d2e29d4f 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/src/v1/assured_workloads_service_client.ts b/packages/google-cloud-assuredworkloads/src/v1/assured_workloads_service_client.ts index f4800f6bfe9..2f7baf856be 100644 --- a/packages/google-cloud-assuredworkloads/src/v1/assured_workloads_service_client.ts +++ b/packages/google-cloud-assuredworkloads/src/v1/assured_workloads_service_client.ts @@ -553,7 +553,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ 'workload.name': request.workload!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateWorkload request %j', request); const wrappedCallback: | Callback< @@ -689,7 +691,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restrictAllowedResources request %j', request); const wrappedCallback: | Callback< @@ -821,7 +825,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWorkload request %j', request); const wrappedCallback: | Callback< @@ -944,7 +950,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkload request %j', request); const wrappedCallback: | Callback< @@ -1061,7 +1069,9 @@ export class AssuredWorkloadsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getViolation request %j', request); const wrappedCallback: | Callback< @@ -1197,7 +1207,9 @@ export class AssuredWorkloadsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acknowledgeViolation request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1349,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1505,7 +1519,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.assuredworkloads.v1.IListWorkloadsRequest, @@ -1576,7 +1592,9 @@ export class AssuredWorkloadsServiceClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads stream %j', request); return this.descriptors.page.listWorkloads.createStream( this.innerApiCalls.listWorkloads as GaxCall, @@ -1629,7 +1647,9 @@ export class AssuredWorkloadsServiceClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads iterate %j', request); return this.descriptors.page.listWorkloads.asyncIterate( this.innerApiCalls['listWorkloads'] as GaxCall, @@ -1738,7 +1758,9 @@ export class AssuredWorkloadsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.assuredworkloads.v1.IListViolationsRequest, @@ -1806,7 +1828,9 @@ export class AssuredWorkloadsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listViolations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViolations stream %j', request); return this.descriptors.page.listViolations.createStream( this.innerApiCalls.listViolations as GaxCall, @@ -1856,7 +1880,9 @@ export class AssuredWorkloadsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listViolations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViolations iterate %j', request); return this.descriptors.page.listViolations.asyncIterate( this.innerApiCalls['listViolations'] as GaxCall, @@ -1958,7 +1984,7 @@ export class AssuredWorkloadsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-assuredworkloads/src/v1beta1/assured_workloads_service_client.ts b/packages/google-cloud-assuredworkloads/src/v1beta1/assured_workloads_service_client.ts index b10345731bf..70836dd1c50 100644 --- a/packages/google-cloud-assuredworkloads/src/v1beta1/assured_workloads_service_client.ts +++ b/packages/google-cloud-assuredworkloads/src/v1beta1/assured_workloads_service_client.ts @@ -533,7 +533,9 @@ export class AssuredWorkloadsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateWorkload request %j', request); const wrappedCallback: | Callback< @@ -669,7 +671,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restrictAllowedResources request %j', request); const wrappedCallback: | Callback< @@ -804,7 +808,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWorkload request %j', request); const wrappedCallback: | Callback< @@ -929,7 +935,9 @@ export class AssuredWorkloadsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkload request %j', request); const wrappedCallback: | Callback< @@ -1069,7 +1077,9 @@ export class AssuredWorkloadsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeWorkloadMove request %j', request); const wrappedCallback: | Callback< @@ -1209,7 +1219,9 @@ export class AssuredWorkloadsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1373,7 +1385,9 @@ export class AssuredWorkloadsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.assuredworkloads.v1beta1.IListWorkloadsRequest, @@ -1440,7 +1454,9 @@ export class AssuredWorkloadsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads stream %j', request); return this.descriptors.page.listWorkloads.createStream( this.innerApiCalls.listWorkloads as GaxCall, @@ -1489,7 +1505,9 @@ export class AssuredWorkloadsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads iterate %j', request); return this.descriptors.page.listWorkloads.asyncIterate( this.innerApiCalls['listWorkloads'] as GaxCall, @@ -1591,7 +1609,7 @@ export class AssuredWorkloadsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1.ts b/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1.ts index c02f312e0a8..751fcf71fb0 100644 --- a/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1.ts +++ b/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1.ts @@ -300,7 +300,9 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.assuredWorkloadsServiceStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest() ); @@ -396,7 +398,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest() ); @@ -445,7 +447,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest() ); @@ -478,7 +480,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest() ); @@ -501,7 +503,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest() ); @@ -534,7 +536,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest() ); @@ -582,7 +584,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest() ); @@ -617,7 +619,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest() ); @@ -642,7 +644,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest() ); @@ -674,7 +676,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest() ); @@ -722,7 +724,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest() ); @@ -754,7 +756,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest() ); @@ -776,7 +778,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest() ); @@ -808,7 +810,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest() ); @@ -856,7 +858,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest() ); @@ -888,7 +890,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetWorkloadRequest() ); @@ -910,7 +912,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetViolationRequest() ); @@ -928,7 +930,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetViolationRequest() ); @@ -962,7 +964,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetViolationRequest() ); @@ -980,7 +982,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.GetViolationRequest() ); @@ -997,7 +999,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest() ); @@ -1016,7 +1018,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest() ); @@ -1050,7 +1052,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest() ); @@ -1085,7 +1087,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest() ); @@ -1206,7 +1208,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.CreateWorkloadRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1263,7 +1265,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1285,7 +1287,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest() ); @@ -1325,7 +1327,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest() ); @@ -1381,7 +1383,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest() ); @@ -1413,7 +1415,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest() ); @@ -1475,7 +1477,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest() ); @@ -1526,7 +1528,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest() ); @@ -1576,7 +1578,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListWorkloadsRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListViolationsRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListViolationsRequest() ); @@ -1688,7 +1690,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListViolationsRequest() ); @@ -1706,7 +1708,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListViolationsRequest() ); @@ -1755,7 +1757,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListViolationsRequest() ); @@ -1793,7 +1795,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListViolationsRequest() ); @@ -1831,7 +1833,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1.ListViolationsRequest() ); @@ -1861,7 +1863,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1943,7 +1945,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2026,7 +2028,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2125,8 +2127,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2146,7 +2147,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2155,8 +2156,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2172,7 +2172,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { organization: 'organizationValue', @@ -2183,7 +2183,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2225,7 +2225,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2235,7 +2235,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2264,7 +2264,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { }); }); - describe('violation', () => { + describe('violation', async () => { const fakePath = '/rendered/path/violation'; const expectedParameters = { organization: 'organizationValue', @@ -2277,7 +2277,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.violationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2341,7 +2341,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { }); }); - describe('workload', () => { + describe('workload', async () => { const fakePath = '/rendered/path/workload'; const expectedParameters = { organization: 'organizationValue', @@ -2353,7 +2353,7 @@ describe('v1.AssuredWorkloadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workloadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1beta1.ts b/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1beta1.ts index d2583246205..b661f302bf2 100644 --- a/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1beta1.ts +++ b/packages/google-cloud-assuredworkloads/test/gapic_assured_workloads_service_v1beta1.ts @@ -306,7 +306,9 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.assuredWorkloadsServiceStub); client.close().then(() => { done(); @@ -377,7 +379,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest() ); @@ -397,7 +399,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest() ); @@ -433,7 +435,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest() ); @@ -453,7 +455,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest() ); @@ -472,7 +474,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest() ); @@ -507,7 +509,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest() ); @@ -557,7 +559,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest() ); @@ -594,7 +596,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest() ); @@ -621,7 +623,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest() ); @@ -655,7 +657,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest() ); @@ -705,7 +707,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest() ); @@ -739,7 +741,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest() ); @@ -763,7 +765,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest() ); @@ -783,7 +785,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest() ); @@ -819,7 +821,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest() ); @@ -839,7 +841,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest() ); @@ -858,7 +860,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest() ); @@ -879,7 +881,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest() ); @@ -915,7 +917,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest() ); @@ -935,7 +937,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest() ); @@ -954,7 +956,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest() ); @@ -990,7 +992,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest() ); @@ -1047,7 +1049,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest() ); @@ -1081,7 +1083,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest() ); @@ -1117,7 +1119,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1142,7 +1144,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1166,7 +1168,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest() ); @@ -1194,7 +1196,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest() ); @@ -1240,7 +1242,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest() ); @@ -1260,7 +1262,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest() ); @@ -1311,7 +1313,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest() ); @@ -1351,7 +1353,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest() ); @@ -1391,7 +1393,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest() ); @@ -1423,7 +1425,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1511,7 +1513,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1600,7 +1602,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1705,8 +1707,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1728,7 +1729,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1737,8 +1738,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1754,7 +1754,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { }); describe('Path templates', () => { - describe('workload', () => { + describe('workload', async () => { const fakePath = '/rendered/path/workload'; const expectedParameters = { organization: 'organizationValue', @@ -1768,7 +1768,7 @@ describe('v1beta1.AssuredWorkloadsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.workloadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-automl/package.json b/packages/google-cloud-automl/package.json index ca475fcd591..7b97e414ef3 100644 --- a/packages/google-cloud-automl/package.json +++ b/packages/google-cloud-automl/package.json @@ -47,7 +47,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json index 8d9f1caaa67..0475fa1a605 100644 --- a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json +++ b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json index 8d9f1caaa67..0475fa1a605 100644 --- a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json +++ b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json index 0be4a6ed013..8befc84198e 100644 --- a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json +++ b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json index 0be4a6ed013..8befc84198e 100644 --- a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json +++ b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/src/v1/auto_ml_client.ts b/packages/google-cloud-automl/src/v1/auto_ml_client.ts index 69d45bb17d5..4e7217e5efc 100644 --- a/packages/google-cloud-automl/src/v1/auto_ml_client.ts +++ b/packages/google-cloud-automl/src/v1/auto_ml_client.ts @@ -701,7 +701,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataset request %j', request); const wrappedCallback: | Callback< @@ -811,7 +813,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ 'dataset.name': request.dataset!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataset request %j', request); const wrappedCallback: | Callback< @@ -927,7 +931,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnnotationSpec request %j', request); const wrappedCallback: | Callback< @@ -1035,7 +1041,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -1143,7 +1151,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ 'model.name': request.model!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateModel request %j', request); const wrappedCallback: | Callback< @@ -1257,7 +1267,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModelEvaluation request %j', request); const wrappedCallback: | Callback< @@ -1388,7 +1400,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1559,7 +1573,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1738,7 +1754,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1909,7 +1927,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2082,7 +2102,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2253,7 +2275,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2434,7 +2458,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2607,7 +2633,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2782,7 +2810,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2950,7 +2980,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1.IListDatasetsRequest, @@ -3027,7 +3059,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets stream %j', request); return this.descriptors.page.listDatasets.createStream( this.innerApiCalls.listDatasets as GaxCall, @@ -3086,7 +3120,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets iterate %j', request); return this.descriptors.page.listDatasets.asyncIterate( this.innerApiCalls['listDatasets'] as GaxCall, @@ -3193,7 +3229,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1.IListModelsRequest, @@ -3269,7 +3307,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -3329,7 +3369,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -3448,7 +3490,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1.IListModelEvaluationsRequest, @@ -3530,7 +3574,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModelEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModelEvaluations stream %j', request); return this.descriptors.page.listModelEvaluations.createStream( this.innerApiCalls.listModelEvaluations as GaxCall, @@ -3594,7 +3640,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModelEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModelEvaluations iterate %j', request); return this.descriptors.page.listModelEvaluations.asyncIterate( this.innerApiCalls['listModelEvaluations'] as GaxCall, diff --git a/packages/google-cloud-automl/src/v1/prediction_service_client.ts b/packages/google-cloud-automl/src/v1/prediction_service_client.ts index abd71f8e013..69377d32bd4 100644 --- a/packages/google-cloud-automl/src/v1/prediction_service_client.ts +++ b/packages/google-cloud-automl/src/v1/prediction_service_client.ts @@ -624,7 +624,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('predict request %j', request); const wrappedCallback: | Callback< @@ -855,7 +857,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts index 293a99121b6..40e3af71a25 100644 --- a/packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts +++ b/packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts @@ -729,7 +729,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataset request %j', request); const wrappedCallback: | Callback< @@ -839,7 +841,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataset request %j', request); const wrappedCallback: | Callback< @@ -957,7 +961,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ 'dataset.name': request.dataset!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataset request %j', request); const wrappedCallback: | Callback< @@ -1073,7 +1079,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnnotationSpec request %j', request); const wrappedCallback: | Callback< @@ -1194,7 +1202,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTableSpec request %j', request); const wrappedCallback: | Callback< @@ -1312,7 +1322,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ 'table_spec.name': request.tableSpec!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTableSpec request %j', request); const wrappedCallback: | Callback< @@ -1433,7 +1445,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getColumnSpec request %j', request); const wrappedCallback: | Callback< @@ -1551,7 +1565,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ 'column_spec.name': request.columnSpec!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateColumnSpec request %j', request); const wrappedCallback: | Callback< @@ -1664,7 +1680,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -1780,7 +1798,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModelEvaluation request %j', request); const wrappedCallback: | Callback< @@ -1916,7 +1936,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2095,7 +2117,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2266,7 +2290,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2439,7 +2465,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2610,7 +2638,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2792,7 +2822,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2965,7 +2997,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3141,7 +3175,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3324,7 +3360,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3499,7 +3537,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1beta1.IListDatasetsRequest, @@ -3577,7 +3617,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets stream %j', request); return this.descriptors.page.listDatasets.createStream( this.innerApiCalls.listDatasets as GaxCall, @@ -3637,7 +3679,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets iterate %j', request); return this.descriptors.page.listDatasets.asyncIterate( this.innerApiCalls['listDatasets'] as GaxCall, @@ -3747,7 +3791,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1beta1.IListTableSpecsRequest, @@ -3820,7 +3866,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listTableSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTableSpecs stream %j', request); return this.descriptors.page.listTableSpecs.createStream( this.innerApiCalls.listTableSpecs as GaxCall, @@ -3875,7 +3923,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listTableSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTableSpecs iterate %j', request); return this.descriptors.page.listTableSpecs.asyncIterate( this.innerApiCalls['listTableSpecs'] as GaxCall, @@ -3985,7 +4035,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1beta1.IListColumnSpecsRequest, @@ -4058,7 +4110,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listColumnSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listColumnSpecs stream %j', request); return this.descriptors.page.listColumnSpecs.createStream( this.innerApiCalls.listColumnSpecs as GaxCall, @@ -4113,7 +4167,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listColumnSpecs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listColumnSpecs iterate %j', request); return this.descriptors.page.listColumnSpecs.asyncIterate( this.innerApiCalls['listColumnSpecs'] as GaxCall, @@ -4222,7 +4278,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1beta1.IListModelsRequest, @@ -4300,7 +4358,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -4360,7 +4420,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -4479,7 +4541,9 @@ export class AutoMlClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.automl.v1beta1.IListModelEvaluationsRequest, @@ -4561,7 +4625,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModelEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModelEvaluations stream %j', request); return this.descriptors.page.listModelEvaluations.createStream( this.innerApiCalls.listModelEvaluations as GaxCall, @@ -4625,7 +4691,9 @@ export class AutoMlClient { }); const defaultCallSettings = this._defaults['listModelEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModelEvaluations iterate %j', request); return this.descriptors.page.listModelEvaluations.asyncIterate( this.innerApiCalls['listModelEvaluations'] as GaxCall, diff --git a/packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts b/packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts index 3f264fe8724..80a2dfcddc8 100644 --- a/packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts +++ b/packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts @@ -595,7 +595,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('predict request %j', request); const wrappedCallback: | Callback< @@ -809,7 +811,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-automl/test/gapic_auto_ml_v1.ts b/packages/google-cloud-automl/test/gapic_auto_ml_v1.ts index c7f482c2b8e..e34e842b7ec 100644 --- a/packages/google-cloud-automl/test/gapic_auto_ml_v1.ts +++ b/packages/google-cloud-automl/test/gapic_auto_ml_v1.ts @@ -282,7 +282,9 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autoMlStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetDatasetRequest() ); @@ -372,7 +374,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetDatasetRequest() ); @@ -419,7 +421,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetDatasetRequest() ); @@ -450,7 +452,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetDatasetRequest() ); @@ -471,7 +473,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateDatasetRequest() ); @@ -503,7 +505,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateDatasetRequest() ); @@ -551,7 +553,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateDatasetRequest() ); @@ -583,7 +585,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateDatasetRequest() ); @@ -605,7 +607,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetAnnotationSpecRequest() ); @@ -636,7 +638,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetAnnotationSpecRequest() ); @@ -683,7 +685,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetAnnotationSpecRequest() ); @@ -714,7 +716,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetAnnotationSpecRequest() ); @@ -735,7 +737,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelRequest() ); @@ -766,7 +768,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelRequest() ); @@ -813,7 +815,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelRequest() ); @@ -841,7 +843,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelRequest() ); @@ -862,7 +864,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateModelRequest() ); @@ -894,7 +896,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateModelRequest() ); @@ -942,7 +944,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateModelRequest() ); @@ -974,7 +976,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UpdateModelRequest() ); @@ -996,7 +998,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelEvaluationRequest() ); @@ -1028,7 +1030,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelEvaluationRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelEvaluationRequest() ); @@ -1106,7 +1108,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.GetModelEvaluationRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateDatasetRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateDatasetRequest() ); @@ -1214,7 +1216,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateDatasetRequest() ); @@ -1245,7 +1247,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateDatasetRequest() ); @@ -1278,7 +1280,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1300,7 +1302,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1321,7 +1323,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteDatasetRequest() ); @@ -1354,7 +1356,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteDatasetRequest() ); @@ -1408,7 +1410,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteDatasetRequest() ); @@ -1439,7 +1441,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteDatasetRequest() ); @@ -1472,7 +1474,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1494,7 +1496,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1515,7 +1517,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ImportDataRequest() ); @@ -1547,7 +1549,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ImportDataRequest() ); @@ -1601,7 +1603,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ImportDataRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ImportDataRequest() ); @@ -1665,7 +1667,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1687,7 +1689,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1705,7 +1707,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportDataRequest() ); @@ -1737,7 +1739,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportDataRequest() ); @@ -1791,7 +1793,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportDataRequest() ); @@ -1822,7 +1824,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportDataRequest() ); @@ -1855,7 +1857,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1877,7 +1879,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1895,7 +1897,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateModelRequest() ); @@ -1927,7 +1929,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateModelRequest() ); @@ -1981,7 +1983,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateModelRequest() ); @@ -2012,7 +2014,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.CreateModelRequest() ); @@ -2045,7 +2047,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2067,7 +2069,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2085,7 +2087,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteModelRequest() ); @@ -2117,7 +2119,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteModelRequest() ); @@ -2171,7 +2173,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteModelRequest() ); @@ -2202,7 +2204,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeleteModelRequest() ); @@ -2235,7 +2237,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2257,7 +2259,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2275,7 +2277,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeployModelRequest() ); @@ -2307,7 +2309,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeployModelRequest() ); @@ -2361,7 +2363,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeployModelRequest() ); @@ -2392,7 +2394,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.DeployModelRequest() ); @@ -2425,7 +2427,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2447,7 +2449,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2465,7 +2467,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UndeployModelRequest() ); @@ -2498,7 +2500,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UndeployModelRequest() ); @@ -2552,7 +2554,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UndeployModelRequest() ); @@ -2583,7 +2585,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.UndeployModelRequest() ); @@ -2616,7 +2618,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2638,7 +2640,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2659,7 +2661,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportModelRequest() ); @@ -2691,7 +2693,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportModelRequest() ); @@ -2745,7 +2747,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportModelRequest() ); @@ -2776,7 +2778,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ExportModelRequest() ); @@ -2809,7 +2811,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2831,7 +2833,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2849,7 +2851,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListDatasetsRequest() ); @@ -2882,7 +2884,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListDatasetsRequest() ); @@ -2931,7 +2933,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListDatasetsRequest() ); @@ -2962,7 +2964,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListDatasetsRequest() ); @@ -3013,7 +3015,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListDatasetsRequest() ); @@ -3061,7 +3063,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListDatasetsRequest() ); @@ -3104,7 +3106,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListDatasetsRequest() ); @@ -3146,7 +3148,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelsRequest() ); @@ -3179,7 +3181,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelsRequest() ); @@ -3228,7 +3230,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelsRequest() ); @@ -3259,7 +3261,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelsRequest() ); @@ -3310,7 +3312,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelsRequest() ); @@ -3358,7 +3360,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelsRequest() ); @@ -3401,7 +3403,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelsRequest() ); @@ -3445,7 +3447,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelEvaluationsRequest() ); @@ -3485,7 +3487,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelEvaluationsRequest() ); @@ -3540,7 +3542,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelEvaluationsRequest() ); @@ -3571,7 +3573,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelEvaluationsRequest() ); @@ -3631,7 +3633,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelEvaluationsRequest() ); @@ -3680,7 +3682,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelEvaluationsRequest() ); @@ -3729,7 +3731,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.ListModelEvaluationsRequest() ); @@ -3766,7 +3768,7 @@ describe('v1.AutoMlClient', () => { }); describe('Path templates', () => { - describe('annotationSpec', () => { + describe('annotationSpec', async () => { const fakePath = '/rendered/path/annotationSpec'; const expectedParameters = { project: 'projectValue', @@ -3778,7 +3780,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.annotationSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3843,7 +3845,7 @@ describe('v1.AutoMlClient', () => { }); }); - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -3854,7 +3856,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3907,7 +3909,7 @@ describe('v1.AutoMlClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3917,7 +3919,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3956,7 +3958,7 @@ describe('v1.AutoMlClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -3967,7 +3969,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4020,7 +4022,7 @@ describe('v1.AutoMlClient', () => { }); }); - describe('modelEvaluation', () => { + describe('modelEvaluation', async () => { const fakePath = '/rendered/path/modelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -4032,7 +4034,7 @@ describe('v1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelEvaluationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-automl/test/gapic_auto_ml_v1beta1.ts b/packages/google-cloud-automl/test/gapic_auto_ml_v1beta1.ts index 097728d6817..17d337bca74 100644 --- a/packages/google-cloud-automl/test/gapic_auto_ml_v1beta1.ts +++ b/packages/google-cloud-automl/test/gapic_auto_ml_v1beta1.ts @@ -282,7 +282,9 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autoMlStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateDatasetRequest() ); @@ -372,7 +374,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateDatasetRequest() ); @@ -419,7 +421,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateDatasetRequest() ); @@ -450,7 +452,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateDatasetRequest() ); @@ -471,7 +473,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetDatasetRequest() ); @@ -502,7 +504,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetDatasetRequest() ); @@ -549,7 +551,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetDatasetRequest() ); @@ -580,7 +582,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetDatasetRequest() ); @@ -601,7 +603,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateDatasetRequest() ); @@ -633,7 +635,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateDatasetRequest() ); @@ -681,7 +683,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateDatasetRequest() ); @@ -713,7 +715,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateDatasetRequest() ); @@ -735,7 +737,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetAnnotationSpecRequest() ); @@ -766,7 +768,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetAnnotationSpecRequest() ); @@ -813,7 +815,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetAnnotationSpecRequest() ); @@ -844,7 +846,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetAnnotationSpecRequest() ); @@ -865,7 +867,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetTableSpecRequest() ); @@ -896,7 +898,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetTableSpecRequest() ); @@ -943,7 +945,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetTableSpecRequest() ); @@ -974,7 +976,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetTableSpecRequest() ); @@ -995,7 +997,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateTableSpecRequest() ); @@ -1027,7 +1029,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateTableSpecRequest() ); @@ -1075,7 +1077,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateTableSpecRequest() ); @@ -1107,7 +1109,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateTableSpecRequest() ); @@ -1129,7 +1131,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetColumnSpecRequest() ); @@ -1160,7 +1162,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetColumnSpecRequest() ); @@ -1207,7 +1209,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetColumnSpecRequest() ); @@ -1238,7 +1240,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetColumnSpecRequest() ); @@ -1259,7 +1261,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateColumnSpecRequest() ); @@ -1291,7 +1293,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateColumnSpecRequest() ); @@ -1339,7 +1341,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateColumnSpecRequest() ); @@ -1371,7 +1373,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UpdateColumnSpecRequest() ); @@ -1393,7 +1395,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelRequest() ); @@ -1424,7 +1426,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelRequest() ); @@ -1471,7 +1473,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelRequest() ); @@ -1499,7 +1501,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelRequest() ); @@ -1520,7 +1522,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelEvaluationRequest() ); @@ -1552,7 +1554,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelEvaluationRequest() ); @@ -1599,7 +1601,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelEvaluationRequest() ); @@ -1630,7 +1632,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.GetModelEvaluationRequest() ); @@ -1651,7 +1653,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteDatasetRequest() ); @@ -1684,7 +1686,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteDatasetRequest() ); @@ -1738,7 +1740,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteDatasetRequest() ); @@ -1769,7 +1771,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteDatasetRequest() ); @@ -1802,7 +1804,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1824,7 +1826,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1845,7 +1847,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ImportDataRequest() ); @@ -1877,7 +1879,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ImportDataRequest() ); @@ -1931,7 +1933,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ImportDataRequest() ); @@ -1962,7 +1964,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ImportDataRequest() ); @@ -1995,7 +1997,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2017,7 +2019,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2035,7 +2037,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportDataRequest() ); @@ -2067,7 +2069,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportDataRequest() ); @@ -2121,7 +2123,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportDataRequest() ); @@ -2152,7 +2154,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportDataRequest() ); @@ -2185,7 +2187,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2207,7 +2209,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2225,7 +2227,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateModelRequest() ); @@ -2257,7 +2259,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateModelRequest() ); @@ -2311,7 +2313,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateModelRequest() ); @@ -2342,7 +2344,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.CreateModelRequest() ); @@ -2375,7 +2377,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2397,7 +2399,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2415,7 +2417,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteModelRequest() ); @@ -2447,7 +2449,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteModelRequest() ); @@ -2501,7 +2503,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteModelRequest() ); @@ -2532,7 +2534,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeleteModelRequest() ); @@ -2565,7 +2567,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2587,7 +2589,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2605,7 +2607,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeployModelRequest() ); @@ -2637,7 +2639,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeployModelRequest() ); @@ -2691,7 +2693,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeployModelRequest() ); @@ -2722,7 +2724,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.DeployModelRequest() ); @@ -2755,7 +2757,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2777,7 +2779,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2795,7 +2797,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UndeployModelRequest() ); @@ -2828,7 +2830,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UndeployModelRequest() ); @@ -2882,7 +2884,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UndeployModelRequest() ); @@ -2913,7 +2915,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.UndeployModelRequest() ); @@ -2946,7 +2948,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2968,7 +2970,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2989,7 +2991,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportModelRequest() ); @@ -3021,7 +3023,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportModelRequest() ); @@ -3075,7 +3077,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportModelRequest() ); @@ -3106,7 +3108,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportModelRequest() ); @@ -3139,7 +3141,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3161,7 +3163,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3179,7 +3181,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest() ); @@ -3212,7 +3214,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest() ); @@ -3266,7 +3268,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest() ); @@ -3300,7 +3302,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest() ); @@ -3333,7 +3335,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3356,7 +3358,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3377,7 +3379,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListDatasetsRequest() ); @@ -3410,7 +3412,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListDatasetsRequest() ); @@ -3459,7 +3461,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListDatasetsRequest() ); @@ -3490,7 +3492,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListDatasetsRequest() ); @@ -3544,7 +3546,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListDatasetsRequest() ); @@ -3595,7 +3597,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListDatasetsRequest() ); @@ -3638,7 +3640,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListDatasetsRequest() ); @@ -3680,7 +3682,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListTableSpecsRequest() ); @@ -3719,7 +3721,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListTableSpecsRequest() ); @@ -3774,7 +3776,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListTableSpecsRequest() ); @@ -3805,7 +3807,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListTableSpecsRequest() ); @@ -3865,7 +3867,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListTableSpecsRequest() ); @@ -3914,7 +3916,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListTableSpecsRequest() ); @@ -3963,7 +3965,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListTableSpecsRequest() ); @@ -4005,7 +4007,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListColumnSpecsRequest() ); @@ -4044,7 +4046,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListColumnSpecsRequest() ); @@ -4099,7 +4101,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListColumnSpecsRequest() ); @@ -4130,7 +4132,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListColumnSpecsRequest() ); @@ -4190,7 +4192,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListColumnSpecsRequest() ); @@ -4239,7 +4241,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListColumnSpecsRequest() ); @@ -4288,7 +4290,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListColumnSpecsRequest() ); @@ -4330,7 +4332,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelsRequest() ); @@ -4363,7 +4365,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelsRequest() ); @@ -4412,7 +4414,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelsRequest() ); @@ -4443,7 +4445,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelsRequest() ); @@ -4497,7 +4499,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelsRequest() ); @@ -4548,7 +4550,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelsRequest() ); @@ -4591,7 +4593,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelsRequest() ); @@ -4635,7 +4637,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelEvaluationsRequest() ); @@ -4675,7 +4677,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelEvaluationsRequest() ); @@ -4732,7 +4734,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelEvaluationsRequest() ); @@ -4763,7 +4765,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelEvaluationsRequest() ); @@ -4824,7 +4826,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelEvaluationsRequest() ); @@ -4874,7 +4876,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelEvaluationsRequest() ); @@ -4924,7 +4926,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.ListModelEvaluationsRequest() ); @@ -4962,7 +4964,7 @@ describe('v1beta1.AutoMlClient', () => { }); describe('Path templates', () => { - describe('annotationSpec', () => { + describe('annotationSpec', async () => { const fakePath = '/rendered/path/annotationSpec'; const expectedParameters = { project: 'projectValue', @@ -4974,7 +4976,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.annotationSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5039,7 +5041,7 @@ describe('v1beta1.AutoMlClient', () => { }); }); - describe('columnSpec', () => { + describe('columnSpec', async () => { const fakePath = '/rendered/path/columnSpec'; const expectedParameters = { project: 'projectValue', @@ -5052,7 +5054,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.columnSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5127,7 +5129,7 @@ describe('v1beta1.AutoMlClient', () => { }); }); - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -5138,7 +5140,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5191,7 +5193,7 @@ describe('v1beta1.AutoMlClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5201,7 +5203,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5240,7 +5242,7 @@ describe('v1beta1.AutoMlClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -5251,7 +5253,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5304,7 +5306,7 @@ describe('v1beta1.AutoMlClient', () => { }); }); - describe('modelEvaluation', () => { + describe('modelEvaluation', async () => { const fakePath = '/rendered/path/modelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -5316,7 +5318,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelEvaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5381,7 +5383,7 @@ describe('v1beta1.AutoMlClient', () => { }); }); - describe('tableSpec', () => { + describe('tableSpec', async () => { const fakePath = '/rendered/path/tableSpec'; const expectedParameters = { project: 'projectValue', @@ -5393,7 +5395,7 @@ describe('v1beta1.AutoMlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tableSpecPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-automl/test/gapic_prediction_service_v1.ts b/packages/google-cloud-automl/test/gapic_prediction_service_v1.ts index 715df42b698..3c0fc4eb40b 100644 --- a/packages/google-cloud-automl/test/gapic_prediction_service_v1.ts +++ b/packages/google-cloud-automl/test/gapic_prediction_service_v1.ts @@ -222,7 +222,9 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.predictionServiceStub); client.close().then(() => { done(); @@ -281,7 +283,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.PredictRequest() ); @@ -312,7 +314,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.PredictRequest() ); @@ -359,7 +361,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.PredictRequest() ); @@ -387,7 +389,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.PredictRequest() ); @@ -408,7 +410,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.BatchPredictRequest() ); @@ -440,7 +442,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.BatchPredictRequest() ); @@ -494,7 +496,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.BatchPredictRequest() ); @@ -525,7 +527,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1.BatchPredictRequest() ); @@ -558,7 +560,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -580,7 +582,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -593,7 +595,7 @@ describe('v1.PredictionServiceClient', () => { }); describe('Path templates', () => { - describe('annotationSpec', () => { + describe('annotationSpec', async () => { const fakePath = '/rendered/path/annotationSpec'; const expectedParameters = { project: 'projectValue', @@ -605,7 +607,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.annotationSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -670,7 +672,7 @@ describe('v1.PredictionServiceClient', () => { }); }); - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -681,7 +683,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -734,7 +736,7 @@ describe('v1.PredictionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -745,7 +747,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -798,7 +800,7 @@ describe('v1.PredictionServiceClient', () => { }); }); - describe('modelEvaluation', () => { + describe('modelEvaluation', async () => { const fakePath = '/rendered/path/modelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -810,7 +812,7 @@ describe('v1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelEvaluationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-automl/test/gapic_prediction_service_v1beta1.ts b/packages/google-cloud-automl/test/gapic_prediction_service_v1beta1.ts index f9a4407a086..9815e0bea55 100644 --- a/packages/google-cloud-automl/test/gapic_prediction_service_v1beta1.ts +++ b/packages/google-cloud-automl/test/gapic_prediction_service_v1beta1.ts @@ -231,7 +231,9 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.predictionServiceStub); client.close().then(() => { done(); @@ -294,7 +296,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.PredictRequest() ); @@ -326,7 +328,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.PredictRequest() ); @@ -374,7 +376,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.PredictRequest() ); @@ -403,7 +405,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.PredictRequest() ); @@ -425,7 +427,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.BatchPredictRequest() ); @@ -458,7 +460,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.BatchPredictRequest() ); @@ -513,7 +515,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.BatchPredictRequest() ); @@ -545,7 +547,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.automl.v1beta1.BatchPredictRequest() ); @@ -579,7 +581,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -602,7 +604,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -615,7 +617,7 @@ describe('v1beta1.PredictionServiceClient', () => { }); describe('Path templates', () => { - describe('annotationSpec', () => { + describe('annotationSpec', async () => { const fakePath = '/rendered/path/annotationSpec'; const expectedParameters = { project: 'projectValue', @@ -628,7 +630,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.annotationSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -693,7 +695,7 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); - describe('columnSpec', () => { + describe('columnSpec', async () => { const fakePath = '/rendered/path/columnSpec'; const expectedParameters = { project: 'projectValue', @@ -707,7 +709,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.columnSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -782,7 +784,7 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -794,7 +796,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -847,7 +849,7 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -859,7 +861,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -912,7 +914,7 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); - describe('modelEvaluation', () => { + describe('modelEvaluation', async () => { const fakePath = '/rendered/path/modelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -925,7 +927,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelEvaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -990,7 +992,7 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); - describe('tableSpec', () => { + describe('tableSpec', async () => { const fakePath = '/rendered/path/tableSpec'; const expectedParameters = { project: 'projectValue', @@ -1003,7 +1005,7 @@ describe('v1beta1.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tableSpecPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-backupdr/package.json b/packages/google-cloud-backupdr/package.json index 9cf36206a1f..f1a4b19b591 100644 --- a/packages/google-cloud-backupdr/package.json +++ b/packages/google-cloud-backupdr/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json index 301af59b291..ddddc817bea 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-backupdr", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts index c4f99be1806..a4c780a67ab 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts @@ -807,7 +807,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getManagementServer request %j', request); const wrappedCallback: | Callback< @@ -924,7 +926,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupVault request %j', request); const wrappedCallback: | Callback< @@ -1035,7 +1039,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataSource request %j', request); const wrappedCallback: | Callback< @@ -1147,7 +1153,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1257,7 +1265,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupPlan request %j', request); const wrappedCallback: | Callback< @@ -1380,7 +1390,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupPlanAssociation request %j', request); const wrappedCallback: | Callback< @@ -1534,7 +1546,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1715,7 +1729,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1905,7 +1921,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2098,7 +2116,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ 'backup_vault.name': request.backupVault!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2295,7 +2315,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2484,7 +2506,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ 'data_source.name': request.dataSource!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2671,7 +2695,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2852,7 +2878,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3038,7 +3066,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3228,7 +3258,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3411,7 +3443,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3599,7 +3633,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3787,7 +3823,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3977,7 +4015,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4164,7 +4204,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4336,7 +4378,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.backupdr.v1.IListManagementServersRequest, @@ -4411,7 +4455,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listManagementServers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagementServers stream %j', request); return this.descriptors.page.listManagementServers.createStream( this.innerApiCalls.listManagementServers as GaxCall, @@ -4468,7 +4514,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listManagementServers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagementServers iterate %j', request); return this.descriptors.page.listManagementServers.asyncIterate( this.innerApiCalls['listManagementServers'] as GaxCall, @@ -4583,7 +4631,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, @@ -4661,7 +4711,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackupVaults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupVaults stream %j', request); return this.descriptors.page.listBackupVaults.createStream( this.innerApiCalls.listBackupVaults as GaxCall, @@ -4721,7 +4773,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackupVaults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupVaults iterate %j', request); return this.descriptors.page.listBackupVaults.asyncIterate( this.innerApiCalls['listBackupVaults'] as GaxCall, @@ -4835,7 +4889,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, @@ -4910,7 +4966,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['fetchUsableBackupVaults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchUsableBackupVaults stream %j', request); return this.descriptors.page.fetchUsableBackupVaults.createStream( this.innerApiCalls.fetchUsableBackupVaults as GaxCall, @@ -4967,7 +5025,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['fetchUsableBackupVaults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchUsableBackupVaults iterate %j', request); return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, @@ -5079,7 +5139,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.backupdr.v1.IListDataSourcesRequest, @@ -5154,7 +5216,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listDataSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataSources stream %j', request); return this.descriptors.page.listDataSources.createStream( this.innerApiCalls.listDataSources as GaxCall, @@ -5211,7 +5275,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listDataSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataSources iterate %j', request); return this.descriptors.page.listDataSources.asyncIterate( this.innerApiCalls['listDataSources'] as GaxCall, @@ -5320,7 +5386,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.backupdr.v1.IListBackupsRequest, @@ -5398,7 +5466,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -5458,7 +5528,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -5578,7 +5650,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.backupdr.v1.IListBackupPlansRequest, @@ -5661,7 +5735,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackupPlans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPlans stream %j', request); return this.descriptors.page.listBackupPlans.createStream( this.innerApiCalls.listBackupPlans as GaxCall, @@ -5726,7 +5802,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackupPlans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPlans iterate %j', request); return this.descriptors.page.listBackupPlans.asyncIterate( this.innerApiCalls['listBackupPlans'] as GaxCall, @@ -5836,7 +5914,9 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, @@ -5909,7 +5989,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackupPlanAssociations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPlanAssociations stream %j', request); return this.descriptors.page.listBackupPlanAssociations.createStream( this.innerApiCalls.listBackupPlanAssociations as GaxCall, @@ -5964,7 +6046,9 @@ export class BackupDRClient { }); const defaultCallSettings = this._defaults['listBackupPlanAssociations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPlanAssociations iterate %j', request); return this.descriptors.page.listBackupPlanAssociations.asyncIterate( this.innerApiCalls['listBackupPlanAssociations'] as GaxCall, @@ -6282,7 +6366,7 @@ export class BackupDRClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts index 6b5b8d8695b..35038e20c89 100644 --- a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts +++ b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts @@ -288,7 +288,9 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.backupDRStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetManagementServerRequest() ); @@ -379,7 +381,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetManagementServerRequest() ); @@ -426,7 +428,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetManagementServerRequest() ); @@ -457,7 +459,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetManagementServerRequest() ); @@ -478,7 +480,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); @@ -509,7 +511,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); @@ -556,7 +558,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); @@ -587,7 +589,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); @@ -608,7 +610,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); @@ -639,7 +641,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); @@ -686,7 +688,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); @@ -717,7 +719,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); @@ -738,7 +740,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupRequest() ); @@ -769,7 +771,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupRequest() ); @@ -816,7 +818,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupRequest() ); @@ -844,7 +846,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupRequest() ); @@ -865,7 +867,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); @@ -896,7 +898,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); @@ -943,7 +945,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); @@ -974,7 +976,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); @@ -995,7 +997,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); @@ -1027,7 +1029,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); @@ -1108,7 +1110,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); @@ -1132,7 +1134,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); @@ -1165,7 +1167,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); @@ -1253,7 +1255,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); @@ -1286,7 +1288,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1308,7 +1310,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1329,7 +1331,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); @@ -1362,7 +1364,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); @@ -1450,7 +1452,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); @@ -1483,7 +1485,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1505,7 +1507,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1526,7 +1528,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); @@ -1559,7 +1561,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); @@ -1613,7 +1615,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); @@ -1644,7 +1646,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); @@ -1677,7 +1679,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1699,7 +1701,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1720,7 +1722,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); @@ -1754,7 +1756,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); @@ -1809,7 +1811,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); @@ -1841,7 +1843,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); @@ -1875,7 +1877,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1897,7 +1899,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1918,7 +1920,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); @@ -1951,7 +1953,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); @@ -2005,7 +2007,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); @@ -2036,7 +2038,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); @@ -2069,7 +2071,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2091,7 +2093,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2112,7 +2114,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); @@ -2146,7 +2148,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); @@ -2201,7 +2203,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); @@ -2233,7 +2235,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); @@ -2267,7 +2269,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2289,7 +2291,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2310,7 +2312,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupRequest() ); @@ -2343,7 +2345,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupRequest() ); @@ -2398,7 +2400,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupRequest() ); @@ -2430,7 +2432,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.UpdateBackupRequest() ); @@ -2464,7 +2466,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2486,7 +2488,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2504,7 +2506,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupRequest() ); @@ -2536,7 +2538,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupRequest() ); @@ -2590,7 +2592,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupRequest() ); @@ -2621,7 +2623,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupRequest() ); @@ -2654,7 +2656,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2676,7 +2678,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2694,7 +2696,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.RestoreBackupRequest() ); @@ -2727,7 +2729,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.RestoreBackupRequest() ); @@ -2781,7 +2783,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.RestoreBackupRequest() ); @@ -2812,7 +2814,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.RestoreBackupRequest() ); @@ -2845,7 +2847,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2867,7 +2869,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2888,7 +2890,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() ); @@ -2921,7 +2923,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() ); @@ -2975,7 +2977,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() ); @@ -3006,7 +3008,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() ); @@ -3039,7 +3041,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3061,7 +3063,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3082,7 +3084,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() ); @@ -3115,7 +3117,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() ); @@ -3169,7 +3171,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() ); @@ -3200,7 +3202,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() ); @@ -3233,7 +3235,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3255,7 +3257,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3276,7 +3278,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() ); @@ -3309,7 +3311,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() ); @@ -3363,7 +3365,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() ); @@ -3397,7 +3399,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() ); @@ -3430,7 +3432,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3453,7 +3455,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3474,7 +3476,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() ); @@ -3507,7 +3509,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() ); @@ -3561,7 +3563,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() ); @@ -3595,7 +3597,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() ); @@ -3628,7 +3630,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3651,7 +3653,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3672,7 +3674,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.TriggerBackupRequest() ); @@ -3705,7 +3707,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.TriggerBackupRequest() ); @@ -3759,7 +3761,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.TriggerBackupRequest() ); @@ -3790,7 +3792,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.TriggerBackupRequest() ); @@ -3823,7 +3825,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3845,7 +3847,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3866,7 +3868,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.InitializeServiceRequest() ); @@ -3899,7 +3901,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.InitializeServiceRequest() ); @@ -3953,7 +3955,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.InitializeServiceRequest() ); @@ -3984,7 +3986,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.InitializeServiceRequest() ); @@ -4017,7 +4019,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4039,7 +4041,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4060,7 +4062,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListManagementServersRequest() ); @@ -4100,7 +4102,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListManagementServersRequest() ); @@ -4155,7 +4157,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListManagementServersRequest() ); @@ -4189,7 +4191,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListManagementServersRequest() ); @@ -4256,7 +4258,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListManagementServersRequest() ); @@ -4312,7 +4314,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListManagementServersRequest() ); @@ -4365,7 +4367,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListManagementServersRequest() ); @@ -4412,7 +4414,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() ); @@ -4451,7 +4453,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() ); @@ -4506,7 +4508,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() ); @@ -4537,7 +4539,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() ); @@ -4597,7 +4599,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() ); @@ -4646,7 +4648,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() ); @@ -4695,7 +4697,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() ); @@ -4737,7 +4739,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() ); @@ -4777,7 +4779,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() ); @@ -4832,7 +4834,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() ); @@ -4866,7 +4868,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() ); @@ -4932,7 +4934,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() ); @@ -4987,7 +4989,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() ); @@ -5040,7 +5042,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() ); @@ -5086,7 +5088,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() ); @@ -5119,7 +5121,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() ); @@ -5168,7 +5170,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() ); @@ -5199,7 +5201,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() ); @@ -5253,7 +5255,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() ); @@ -5302,7 +5304,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() ); @@ -5345,7 +5347,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() ); @@ -5387,7 +5389,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupsRequest() ); @@ -5420,7 +5422,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupsRequest() ); @@ -5469,7 +5471,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupsRequest() ); @@ -5500,7 +5502,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupsRequest() ); @@ -5554,7 +5556,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupsRequest() ); @@ -5605,7 +5607,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupsRequest() ); @@ -5648,7 +5650,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupsRequest() ); @@ -5692,7 +5694,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); @@ -5725,7 +5727,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); @@ -5774,7 +5776,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); @@ -5805,7 +5807,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); @@ -5859,7 +5861,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); @@ -5908,7 +5910,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); @@ -5951,7 +5953,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); @@ -5993,7 +5995,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); @@ -6033,7 +6035,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); @@ -6090,7 +6092,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); @@ -6124,7 +6126,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); @@ -6191,7 +6193,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); @@ -6247,7 +6249,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); @@ -6301,7 +6303,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); @@ -6347,7 +6349,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6377,7 +6379,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6421,7 +6423,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6453,7 +6455,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6483,7 +6485,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6527,7 +6529,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6559,7 +6561,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6592,7 +6594,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6636,7 +6638,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6671,7 +6673,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6701,7 +6703,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6745,7 +6747,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6780,7 +6782,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6828,7 +6830,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6869,7 +6871,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -6948,7 +6950,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7028,7 +7030,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7124,8 +7126,7 @@ describe('v1.BackupDRClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7144,7 +7145,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7153,8 +7154,7 @@ describe('v1.BackupDRClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -7170,7 +7170,7 @@ describe('v1.BackupDRClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -7183,7 +7183,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7258,7 +7258,7 @@ describe('v1.BackupDRClient', () => { }); }); - describe('backupPlan', () => { + describe('backupPlan', async () => { const fakePath = '/rendered/path/backupPlan'; const expectedParameters = { project: 'projectValue', @@ -7269,7 +7269,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPlanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7322,7 +7322,7 @@ describe('v1.BackupDRClient', () => { }); }); - describe('backupPlanAssociation', () => { + describe('backupPlanAssociation', async () => { const fakePath = '/rendered/path/backupPlanAssociation'; const expectedParameters = { project: 'projectValue', @@ -7333,7 +7333,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPlanAssociationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7403,7 +7403,7 @@ describe('v1.BackupDRClient', () => { }); }); - describe('backupVault', () => { + describe('backupVault', async () => { const fakePath = '/rendered/path/backupVault'; const expectedParameters = { project: 'projectValue', @@ -7414,7 +7414,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupVaultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7467,7 +7467,7 @@ describe('v1.BackupDRClient', () => { }); }); - describe('dataSource', () => { + describe('dataSource', async () => { const fakePath = '/rendered/path/dataSource'; const expectedParameters = { project: 'projectValue', @@ -7479,7 +7479,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7543,7 +7543,7 @@ describe('v1.BackupDRClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -7553,7 +7553,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7592,7 +7592,7 @@ describe('v1.BackupDRClient', () => { }); }); - describe('managementServer', () => { + describe('managementServer', async () => { const fakePath = '/rendered/path/managementServer'; const expectedParameters = { project: 'projectValue', @@ -7603,7 +7603,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.managementServerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7660,7 +7660,7 @@ describe('v1.BackupDRClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -7669,7 +7669,7 @@ describe('v1.BackupDRClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-baremetalsolution/package.json b/packages/google-cloud-baremetalsolution/package.json index 92d51ebf2e7..30c15d8ff71 100644 --- a/packages/google-cloud-baremetalsolution/package.json +++ b/packages/google-cloud-baremetalsolution/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json index 3a4958e8685..51aa3dc1c99 100644 --- a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json +++ b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-baremetalsolution", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json index b2fd7f08a89..62fc102bf98 100644 --- a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json +++ b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-baremetalsolution", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-baremetalsolution/src/v2/bare_metal_solution_client.ts b/packages/google-cloud-baremetalsolution/src/v2/bare_metal_solution_client.ts index 9dbfa0a75ed..425bb4b79ea 100644 --- a/packages/google-cloud-baremetalsolution/src/v2/bare_metal_solution_client.ts +++ b/packages/google-cloud-baremetalsolution/src/v2/bare_metal_solution_client.ts @@ -836,7 +836,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -965,7 +967,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('renameInstance request %j', request); const wrappedCallback: | Callback< @@ -1093,7 +1097,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSSHKey request %j', request); const wrappedCallback: | Callback< @@ -1213,7 +1219,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSSHKey request %j', request); const wrappedCallback: | Callback< @@ -1332,7 +1340,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVolume request %j', request); const wrappedCallback: | Callback< @@ -1455,7 +1465,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('renameVolume request %j', request); const wrappedCallback: | Callback< @@ -1581,7 +1593,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkUsage request %j', request); const wrappedCallback: | Callback< @@ -1700,7 +1714,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNetwork request %j', request); const wrappedCallback: | Callback< @@ -1828,7 +1844,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createVolumeSnapshot request %j', request); const wrappedCallback: | Callback< @@ -1954,7 +1972,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteVolumeSnapshot request %j', request); const wrappedCallback: | Callback< @@ -2080,7 +2100,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVolumeSnapshot request %j', request); const wrappedCallback: | Callback< @@ -2199,7 +2221,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLun request %j', request); const wrappedCallback: | Callback< @@ -2315,7 +2339,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNfsShare request %j', request); const wrappedCallback: | Callback< @@ -2444,7 +2470,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('renameNfsShare request %j', request); const wrappedCallback: | Callback< @@ -2575,7 +2603,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('submitProvisioningConfig request %j', request); const wrappedCallback: | Callback< @@ -2700,7 +2730,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProvisioningConfig request %j', request); const wrappedCallback: | Callback< @@ -2831,7 +2863,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProvisioningConfig request %j', request); const wrappedCallback: | Callback< @@ -2961,7 +2995,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ 'provisioning_config.name': request.provisioningConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProvisioningConfig request %j', request); const wrappedCallback: | Callback< @@ -3090,7 +3126,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('renameNetwork request %j', request); const wrappedCallback: | Callback< @@ -3231,7 +3269,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3399,7 +3439,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3566,7 +3608,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3733,7 +3777,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3900,7 +3946,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4073,7 +4121,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4250,7 +4300,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4424,7 +4476,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ 'volume.name': request.volume!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4592,7 +4646,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4761,7 +4817,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ volume: request.volume ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4935,7 +4993,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ 'network.name': request.network!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5104,7 +5164,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ volume_snapshot: request.volumeSnapshot ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5272,7 +5334,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5447,7 +5511,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ 'nfs_share.name': request.nfsShare!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5616,7 +5682,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5783,7 +5851,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5948,7 +6018,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListInstancesRequest, @@ -6016,7 +6088,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -6066,7 +6140,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -6170,7 +6246,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListSSHKeysRequest, @@ -6236,7 +6314,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listSshKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSSHKeys stream %j', request); return this.descriptors.page.listSSHKeys.createStream( this.innerApiCalls.listSshKeys as GaxCall, @@ -6284,7 +6364,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listSshKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSSHKeys iterate %j', request); return this.descriptors.page.listSSHKeys.asyncIterate( this.innerApiCalls['listSshKeys'] as GaxCall, @@ -6389,7 +6471,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListVolumesRequest, @@ -6457,7 +6541,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listVolumes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumes stream %j', request); return this.descriptors.page.listVolumes.createStream( this.innerApiCalls.listVolumes as GaxCall, @@ -6507,7 +6593,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listVolumes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumes iterate %j', request); return this.descriptors.page.listVolumes.asyncIterate( this.innerApiCalls['listVolumes'] as GaxCall, @@ -6612,7 +6700,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListNetworksRequest, @@ -6680,7 +6770,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listNetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworks stream %j', request); return this.descriptors.page.listNetworks.createStream( this.innerApiCalls.listNetworks as GaxCall, @@ -6730,7 +6822,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listNetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworks iterate %j', request); return this.descriptors.page.listNetworks.asyncIterate( this.innerApiCalls['listNetworks'] as GaxCall, @@ -6835,7 +6929,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListVolumeSnapshotsRequest, @@ -6901,7 +6997,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listVolumeSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumeSnapshots stream %j', request); return this.descriptors.page.listVolumeSnapshots.createStream( this.innerApiCalls.listVolumeSnapshots as GaxCall, @@ -6949,7 +7047,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listVolumeSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumeSnapshots iterate %j', request); return this.descriptors.page.listVolumeSnapshots.asyncIterate( this.innerApiCalls['listVolumeSnapshots'] as GaxCall, @@ -7052,7 +7152,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListLunsRequest, @@ -7118,7 +7220,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listLuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLuns stream %j', request); return this.descriptors.page.listLuns.createStream( this.innerApiCalls.listLuns as GaxCall, @@ -7166,7 +7270,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listLuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLuns iterate %j', request); return this.descriptors.page.listLuns.asyncIterate( this.innerApiCalls['listLuns'] as GaxCall, @@ -7271,7 +7377,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListNfsSharesRequest, @@ -7339,7 +7447,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listNfsShares']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNfsShares stream %j', request); return this.descriptors.page.listNfsShares.createStream( this.innerApiCalls.listNfsShares as GaxCall, @@ -7389,7 +7499,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listNfsShares']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNfsShares iterate %j', request); return this.descriptors.page.listNfsShares.asyncIterate( this.innerApiCalls['listNfsShares'] as GaxCall, @@ -7494,7 +7606,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListProvisioningQuotasRequest, @@ -7562,7 +7676,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listProvisioningQuotas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProvisioningQuotas stream %j', request); return this.descriptors.page.listProvisioningQuotas.createStream( this.innerApiCalls.listProvisioningQuotas as GaxCall, @@ -7612,7 +7728,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listProvisioningQuotas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProvisioningQuotas iterate %j', request); return this.descriptors.page.listProvisioningQuotas.asyncIterate( this.innerApiCalls['listProvisioningQuotas'] as GaxCall, @@ -7717,7 +7835,9 @@ export class BareMetalSolutionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.baremetalsolution.v2.IListOSImagesRequest, @@ -7785,7 +7905,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listOsImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSImages stream %j', request); return this.descriptors.page.listOSImages.createStream( this.innerApiCalls.listOsImages as GaxCall, @@ -7835,7 +7957,9 @@ export class BareMetalSolutionClient { }); const defaultCallSettings = this._defaults['listOsImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSImages iterate %j', request); return this.descriptors.page.listOSImages.asyncIterate( this.innerApiCalls['listOsImages'] as GaxCall, @@ -8153,7 +8277,7 @@ export class BareMetalSolutionClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-baremetalsolution/test/gapic_bare_metal_solution_v2.ts b/packages/google-cloud-baremetalsolution/test/gapic_bare_metal_solution_v2.ts index ebb4d7a262f..19748b6ca07 100644 --- a/packages/google-cloud-baremetalsolution/test/gapic_bare_metal_solution_v2.ts +++ b/packages/google-cloud-baremetalsolution/test/gapic_bare_metal_solution_v2.ts @@ -294,7 +294,9 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.bareMetalSolutionStub); client.close().then(() => { done(); @@ -353,7 +355,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetInstanceRequest() ); @@ -384,7 +386,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetInstanceRequest() ); @@ -431,7 +433,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetInstanceRequest() ); @@ -462,7 +464,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetInstanceRequest() ); @@ -483,7 +485,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameInstanceRequest() ); @@ -514,7 +516,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameInstanceRequest() ); @@ -561,7 +563,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameInstanceRequest() ); @@ -592,7 +594,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameInstanceRequest() ); @@ -613,7 +615,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest() ); @@ -644,7 +646,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest() ); @@ -691,7 +693,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest() ); @@ -722,7 +724,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateSSHKeyRequest() ); @@ -743,7 +745,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest() ); @@ -774,7 +776,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest() ); @@ -821,7 +823,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest() ); @@ -852,7 +854,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteSSHKeyRequest() ); @@ -873,7 +875,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeRequest() ); @@ -904,7 +906,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeRequest() ); @@ -951,7 +953,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeRequest() ); @@ -979,7 +981,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeRequest() ); @@ -1000,7 +1002,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameVolumeRequest() ); @@ -1031,7 +1033,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameVolumeRequest() ); @@ -1078,7 +1080,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameVolumeRequest() ); @@ -1109,7 +1111,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameVolumeRequest() ); @@ -1130,7 +1132,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest() ); @@ -1161,7 +1163,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest() ); @@ -1208,7 +1210,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest() ); @@ -1239,7 +1241,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworkUsageRequest() ); @@ -1260,7 +1262,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNetworkRequest() ); @@ -1291,7 +1293,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNetworkRequest() ); @@ -1338,7 +1340,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNetworkRequest() ); @@ -1369,7 +1371,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNetworkRequest() ); @@ -1390,7 +1392,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest() ); @@ -1422,7 +1424,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest() ); @@ -1469,7 +1471,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest() ); @@ -1500,7 +1502,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateVolumeSnapshotRequest() ); @@ -1521,7 +1523,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest() ); @@ -1553,7 +1555,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest() ); @@ -1600,7 +1602,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest() ); @@ -1631,7 +1633,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteVolumeSnapshotRequest() ); @@ -1652,7 +1654,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest() ); @@ -1683,7 +1685,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest() ); @@ -1730,7 +1732,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest() ); @@ -1761,7 +1763,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetVolumeSnapshotRequest() ); @@ -1782,7 +1784,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetLunRequest() ); @@ -1813,7 +1815,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetLunRequest() ); @@ -1860,7 +1862,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetLunRequest() ); @@ -1888,7 +1890,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetLunRequest() ); @@ -1909,7 +1911,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNfsShareRequest() ); @@ -1940,7 +1942,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNfsShareRequest() ); @@ -1987,7 +1989,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNfsShareRequest() ); @@ -2018,7 +2020,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetNfsShareRequest() ); @@ -2039,7 +2041,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNfsShareRequest() ); @@ -2070,7 +2072,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNfsShareRequest() ); @@ -2117,7 +2119,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNfsShareRequest() ); @@ -2148,7 +2150,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNfsShareRequest() ); @@ -2169,7 +2171,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest() ); @@ -2201,7 +2203,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest() ); @@ -2248,7 +2250,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest() ); @@ -2282,7 +2284,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest() ); @@ -2306,7 +2308,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest() ); @@ -2338,7 +2340,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest() ); @@ -2385,7 +2387,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest() ); @@ -2419,7 +2421,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.GetProvisioningConfigRequest() ); @@ -2443,7 +2445,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest() ); @@ -2475,7 +2477,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest() ); @@ -2522,7 +2524,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest() ); @@ -2556,7 +2558,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateProvisioningConfigRequest() ); @@ -2580,7 +2582,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest() ); @@ -2613,7 +2615,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest() ); @@ -2661,7 +2663,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest() ); @@ -2696,7 +2698,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateProvisioningConfigRequest() ); @@ -2721,7 +2723,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNetworkRequest() ); @@ -2752,7 +2754,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNetworkRequest() ); @@ -2799,7 +2801,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNetworkRequest() ); @@ -2830,7 +2832,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RenameNetworkRequest() ); @@ -2851,7 +2853,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateInstanceRequest() ); @@ -2885,7 +2887,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateInstanceRequest() ); @@ -2940,7 +2942,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateInstanceRequest() ); @@ -2972,7 +2974,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateInstanceRequest() ); @@ -3006,7 +3008,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3028,7 +3030,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3049,7 +3051,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResetInstanceRequest() ); @@ -3082,7 +3084,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResetInstanceRequest() ); @@ -3136,7 +3138,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResetInstanceRequest() ); @@ -3167,7 +3169,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResetInstanceRequest() ); @@ -3200,7 +3202,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3222,7 +3224,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3243,7 +3245,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StartInstanceRequest() ); @@ -3276,7 +3278,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StartInstanceRequest() ); @@ -3330,7 +3332,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StartInstanceRequest() ); @@ -3361,7 +3363,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StartInstanceRequest() ); @@ -3394,7 +3396,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3416,7 +3418,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3437,7 +3439,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StopInstanceRequest() ); @@ -3469,7 +3471,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StopInstanceRequest() ); @@ -3523,7 +3525,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StopInstanceRequest() ); @@ -3554,7 +3556,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.StopInstanceRequest() ); @@ -3587,7 +3589,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3609,7 +3611,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3627,7 +3629,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest() ); @@ -3660,7 +3662,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest() ); @@ -3714,7 +3716,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest() ); @@ -3748,7 +3750,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest() ); @@ -3781,7 +3783,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3804,7 +3806,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3825,7 +3827,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest() ); @@ -3858,7 +3860,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest() ); @@ -3912,7 +3914,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest() ); @@ -3944,7 +3946,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest() ); @@ -3974,7 +3976,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3997,7 +3999,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4018,7 +4020,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DetachLunRequest() ); @@ -4050,7 +4052,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DetachLunRequest() ); @@ -4104,7 +4106,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DetachLunRequest() ); @@ -4135,7 +4137,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DetachLunRequest() ); @@ -4168,7 +4170,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4190,7 +4192,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4208,7 +4210,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateVolumeRequest() ); @@ -4241,7 +4243,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateVolumeRequest() ); @@ -4296,7 +4298,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateVolumeRequest() ); @@ -4328,7 +4330,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateVolumeRequest() ); @@ -4362,7 +4364,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4384,7 +4386,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4402,7 +4404,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictVolumeRequest() ); @@ -4434,7 +4436,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictVolumeRequest() ); @@ -4488,7 +4490,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictVolumeRequest() ); @@ -4519,7 +4521,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictVolumeRequest() ); @@ -4552,7 +4554,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4574,7 +4576,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4592,7 +4594,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResizeVolumeRequest() ); @@ -4624,7 +4626,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResizeVolumeRequest() ); @@ -4678,7 +4680,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResizeVolumeRequest() ); @@ -4709,7 +4711,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ResizeVolumeRequest() ); @@ -4742,7 +4744,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4764,7 +4766,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4782,7 +4784,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNetworkRequest() ); @@ -4816,7 +4818,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNetworkRequest() ); @@ -4871,7 +4873,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNetworkRequest() ); @@ -4903,7 +4905,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNetworkRequest() ); @@ -4937,7 +4939,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4959,7 +4961,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4980,7 +4982,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest() ); @@ -5013,7 +5015,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest() ); @@ -5067,7 +5069,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest() ); @@ -5101,7 +5103,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.RestoreVolumeSnapshotRequest() ); @@ -5134,7 +5136,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5156,7 +5158,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5177,7 +5179,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictLunRequest() ); @@ -5209,7 +5211,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictLunRequest() ); @@ -5263,7 +5265,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictLunRequest() ); @@ -5294,7 +5296,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.EvictLunRequest() ); @@ -5327,7 +5329,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5349,7 +5351,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5367,7 +5369,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest() ); @@ -5401,7 +5403,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest() ); @@ -5456,7 +5458,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest() ); @@ -5488,7 +5490,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.UpdateNfsShareRequest() ); @@ -5522,7 +5524,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5544,7 +5546,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5565,7 +5567,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateNfsShareRequest() ); @@ -5598,7 +5600,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateNfsShareRequest() ); @@ -5652,7 +5654,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateNfsShareRequest() ); @@ -5683,7 +5685,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.CreateNfsShareRequest() ); @@ -5716,7 +5718,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5738,7 +5740,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5759,7 +5761,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest() ); @@ -5792,7 +5794,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest() ); @@ -5846,7 +5848,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest() ); @@ -5877,7 +5879,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.DeleteNfsShareRequest() ); @@ -5910,7 +5912,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5932,7 +5934,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5953,7 +5955,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListInstancesRequest() ); @@ -5992,7 +5994,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListInstancesRequest() ); @@ -6047,7 +6049,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListInstancesRequest() ); @@ -6078,7 +6080,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListInstancesRequest() ); @@ -6139,7 +6141,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListInstancesRequest() ); @@ -6189,7 +6191,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListInstancesRequest() ); @@ -6239,7 +6241,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListInstancesRequest() ); @@ -6282,7 +6284,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListSSHKeysRequest() ); @@ -6321,7 +6323,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListSSHKeysRequest() ); @@ -6376,7 +6378,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListSSHKeysRequest() ); @@ -6407,7 +6409,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListSSHKeysRequest() ); @@ -6467,7 +6469,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListSSHKeysRequest() ); @@ -6518,7 +6520,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListSSHKeysRequest() ); @@ -6567,7 +6569,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListSSHKeysRequest() ); @@ -6612,7 +6614,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumesRequest() ); @@ -6651,7 +6653,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumesRequest() ); @@ -6706,7 +6708,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumesRequest() ); @@ -6737,7 +6739,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumesRequest() ); @@ -6797,7 +6799,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumesRequest() ); @@ -6848,7 +6850,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumesRequest() ); @@ -6897,7 +6899,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumesRequest() ); @@ -6942,7 +6944,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworksRequest() ); @@ -6981,7 +6983,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworksRequest() ); @@ -7036,7 +7038,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworksRequest() ); @@ -7067,7 +7069,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworksRequest() ); @@ -7128,7 +7130,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworksRequest() ); @@ -7180,7 +7182,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworksRequest() ); @@ -7229,7 +7231,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNetworksRequest() ); @@ -7272,7 +7274,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest() ); @@ -7312,7 +7314,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest() ); @@ -7369,7 +7371,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest() ); @@ -7400,7 +7402,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest() ); @@ -7463,7 +7465,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest() ); @@ -7515,7 +7517,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest() ); @@ -7565,7 +7567,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListVolumeSnapshotsRequest() ); @@ -7608,7 +7610,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListLunsRequest() ); @@ -7647,7 +7649,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListLunsRequest() ); @@ -7702,7 +7704,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListLunsRequest() ); @@ -7730,7 +7732,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListLunsRequest() ); @@ -7790,7 +7792,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListLunsRequest() ); @@ -7841,7 +7843,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListLunsRequest() ); @@ -7889,7 +7891,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListLunsRequest() ); @@ -7932,7 +7934,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNfsSharesRequest() ); @@ -7971,7 +7973,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNfsSharesRequest() ); @@ -8026,7 +8028,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNfsSharesRequest() ); @@ -8057,7 +8059,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNfsSharesRequest() ); @@ -8118,7 +8120,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNfsSharesRequest() ); @@ -8168,7 +8170,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNfsSharesRequest() ); @@ -8218,7 +8220,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListNfsSharesRequest() ); @@ -8261,7 +8263,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest() ); @@ -8301,7 +8303,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest() ); @@ -8358,7 +8360,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest() ); @@ -8392,7 +8394,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest() ); @@ -8461,7 +8463,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest() ); @@ -8519,7 +8521,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest() ); @@ -8573,7 +8575,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListProvisioningQuotasRequest() ); @@ -8620,7 +8622,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListOSImagesRequest() ); @@ -8659,7 +8661,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListOSImagesRequest() ); @@ -8714,7 +8716,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListOSImagesRequest() ); @@ -8745,7 +8747,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListOSImagesRequest() ); @@ -8806,7 +8808,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListOSImagesRequest() ); @@ -8858,7 +8860,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListOSImagesRequest() ); @@ -8907,7 +8909,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.baremetalsolution.v2.ListOSImagesRequest() ); @@ -8949,7 +8951,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8979,7 +8981,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9023,7 +9025,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9055,7 +9057,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9085,7 +9087,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9129,7 +9131,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9161,7 +9163,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9194,7 +9196,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9238,7 +9240,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9273,7 +9275,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9303,7 +9305,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9347,7 +9349,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9382,7 +9384,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9430,7 +9432,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9471,7 +9473,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -9550,7 +9552,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -9630,7 +9632,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -9726,8 +9728,7 @@ describe('v2.BareMetalSolutionClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -9746,7 +9747,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -9755,8 +9756,7 @@ describe('v2.BareMetalSolutionClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -9772,7 +9772,7 @@ describe('v2.BareMetalSolutionClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -9783,7 +9783,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9836,7 +9836,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('instanceConfig', () => { + describe('instanceConfig', async () => { const fakePath = '/rendered/path/instanceConfig'; const expectedParameters = { project: 'projectValue', @@ -9847,7 +9847,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instanceConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9901,7 +9901,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('instanceQuota', () => { + describe('instanceQuota', async () => { const fakePath = '/rendered/path/instanceQuota'; const expectedParameters = { project: 'projectValue', @@ -9912,7 +9912,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instanceQuotaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9965,7 +9965,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('lun', () => { + describe('lun', async () => { const fakePath = '/rendered/path/lun'; const expectedParameters = { project: 'projectValue', @@ -9977,7 +9977,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lunPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10041,7 +10041,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('nFSShare', () => { + describe('nFSShare', async () => { const fakePath = '/rendered/path/nFSShare'; const expectedParameters = { project: 'projectValue', @@ -10052,7 +10052,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nFSSharePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10105,7 +10105,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -10116,7 +10116,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10169,7 +10169,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('networkConfig', () => { + describe('networkConfig', async () => { const fakePath = '/rendered/path/networkConfig'; const expectedParameters = { project: 'projectValue', @@ -10180,7 +10180,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10233,7 +10233,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('osImage', () => { + describe('osImage', async () => { const fakePath = '/rendered/path/osImage'; const expectedParameters = { project: 'projectValue', @@ -10244,7 +10244,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.osImagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10297,7 +10297,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('provisioningConfig', () => { + describe('provisioningConfig', async () => { const fakePath = '/rendered/path/provisioningConfig'; const expectedParameters = { project: 'projectValue', @@ -10308,7 +10308,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.provisioningConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10374,7 +10374,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('provisioningQuota', () => { + describe('provisioningQuota', async () => { const fakePath = '/rendered/path/provisioningQuota'; const expectedParameters = { project: 'projectValue', @@ -10385,7 +10385,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.provisioningQuotaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10451,7 +10451,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('serverNetworkTemplate', () => { + describe('serverNetworkTemplate', async () => { const fakePath = '/rendered/path/serverNetworkTemplate'; const expectedParameters = { project: 'projectValue', @@ -10462,7 +10462,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serverNetworkTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10532,7 +10532,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('sshKey', () => { + describe('sshKey', async () => { const fakePath = '/rendered/path/sshKey'; const expectedParameters = { project: 'projectValue', @@ -10543,7 +10543,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sshKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10596,7 +10596,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('volume', () => { + describe('volume', async () => { const fakePath = '/rendered/path/volume'; const expectedParameters = { project: 'projectValue', @@ -10607,7 +10607,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.volumePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10660,7 +10660,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('volumeConfig', () => { + describe('volumeConfig', async () => { const fakePath = '/rendered/path/volumeConfig'; const expectedParameters = { project: 'projectValue', @@ -10671,7 +10671,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.volumeConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10724,7 +10724,7 @@ describe('v2.BareMetalSolutionClient', () => { }); }); - describe('volumeSnapshot', () => { + describe('volumeSnapshot', async () => { const fakePath = '/rendered/path/volumeSnapshot'; const expectedParameters = { project: 'projectValue', @@ -10736,7 +10736,7 @@ describe('v2.BareMetalSolutionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.volumeSnapshotPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-batch/package.json b/packages/google-cloud-batch/package.json index 55315e72448..3af7d70d498 100644 --- a/packages/google-cloud-batch/package.json +++ b/packages/google-cloud-batch/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json index 075e6927e96..7ac83526a08 100644 --- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json +++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "1.16.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json index 745babdd1bb..2249e5b64cf 100644 --- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json +++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "1.16.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json index a60ff4a9938..30b03b6567b 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json +++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "1.16.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json index 0ea9db176a1..edfa4ad0438 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json +++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "1.16.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/src/v1/batch_service_client.ts b/packages/google-cloud-batch/src/v1/batch_service_client.ts index 5dab0327e64..d83236bf396 100644 --- a/packages/google-cloud-batch/src/v1/batch_service_client.ts +++ b/packages/google-cloud-batch/src/v1/batch_service_client.ts @@ -594,7 +594,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -700,7 +702,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -806,7 +810,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -949,7 +955,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1130,7 +1138,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1289,7 +1299,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.batch.v1.IListJobsRequest, @@ -1357,7 +1369,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -1409,7 +1423,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -1509,7 +1525,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.batch.v1.IListTasksRequest, @@ -1578,7 +1596,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -1631,7 +1651,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, @@ -1811,7 +1833,7 @@ export class BatchServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts b/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts index 60b243db1ee..8a0d84c5dd9 100644 --- a/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts +++ b/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts @@ -625,7 +625,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -733,7 +735,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -874,7 +878,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ 'job.name': request.job!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJob request %j', request); const wrappedCallback: | Callback< @@ -982,7 +988,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -1130,7 +1138,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createResourceAllowance request %j', request); const wrappedCallback: | Callback< @@ -1255,7 +1265,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getResourceAllowance request %j', request); const wrappedCallback: | Callback< @@ -1406,7 +1418,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ 'resource_allowance.name': request.resourceAllowance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateResourceAllowance request %j', request); const wrappedCallback: | Callback< @@ -1554,7 +1568,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1735,7 +1751,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1918,7 +1936,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2079,7 +2099,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.batch.v1alpha.IListJobsRequest, @@ -2149,7 +2171,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -2201,7 +2225,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -2305,7 +2331,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.batch.v1alpha.IListTasksRequest, @@ -2378,7 +2406,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -2433,7 +2463,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, @@ -2535,7 +2567,9 @@ export class BatchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.batch.v1alpha.IListResourceAllowancesRequest, @@ -2600,7 +2634,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listResourceAllowances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResourceAllowances stream %j', request); return this.descriptors.page.listResourceAllowances.createStream( this.innerApiCalls.listResourceAllowances as GaxCall, @@ -2647,7 +2683,9 @@ export class BatchServiceClient { }); const defaultCallSettings = this._defaults['listResourceAllowances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResourceAllowances iterate %j', request); return this.descriptors.page.listResourceAllowances.asyncIterate( this.innerApiCalls['listResourceAllowances'] as GaxCall, @@ -2827,7 +2865,7 @@ export class BatchServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-batch/test/gapic_batch_service_v1.ts b/packages/google-cloud-batch/test/gapic_batch_service_v1.ts index 12e8c9b4b3b..6df1c977ea7 100644 --- a/packages/google-cloud-batch/test/gapic_batch_service_v1.ts +++ b/packages/google-cloud-batch/test/gapic_batch_service_v1.ts @@ -289,7 +289,9 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.batchServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CreateJobRequest() ); @@ -379,7 +381,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CreateJobRequest() ); @@ -426,7 +428,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CreateJobRequest() ); @@ -454,7 +456,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CreateJobRequest() ); @@ -475,7 +477,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetJobRequest() ); @@ -506,7 +508,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetJobRequest() ); @@ -553,7 +555,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetJobRequest() ); @@ -581,7 +583,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetJobRequest() ); @@ -602,7 +604,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetTaskRequest() ); @@ -633,7 +635,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetTaskRequest() ); @@ -680,7 +682,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetTaskRequest() ); @@ -708,7 +710,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.GetTaskRequest() ); @@ -729,7 +731,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.DeleteJobRequest() ); @@ -761,7 +763,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.DeleteJobRequest() ); @@ -815,7 +817,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.DeleteJobRequest() ); @@ -846,7 +848,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.DeleteJobRequest() ); @@ -879,7 +881,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -901,7 +903,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -919,7 +921,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CancelJobRequest() ); @@ -951,7 +953,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CancelJobRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CancelJobRequest() ); @@ -1036,7 +1038,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.CancelJobRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1091,7 +1093,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1109,7 +1111,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListJobsRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListJobsRequest() ); @@ -1191,7 +1193,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListJobsRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListJobsRequest() ); @@ -1270,7 +1272,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListJobsRequest() ); @@ -1318,7 +1320,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListJobsRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListJobsRequest() ); @@ -1403,7 +1405,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListTasksRequest() ); @@ -1436,7 +1438,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListTasksRequest() ); @@ -1485,7 +1487,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListTasksRequest() ); @@ -1513,7 +1515,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListTasksRequest() ); @@ -1564,7 +1566,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListTasksRequest() ); @@ -1612,7 +1614,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListTasksRequest() ); @@ -1654,7 +1656,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1.ListTasksRequest() ); @@ -1696,7 +1698,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1726,7 +1728,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1770,7 +1772,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1805,7 +1807,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1853,7 +1855,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1894,7 +1896,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1973,7 +1975,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2053,7 +2055,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2149,8 +2151,7 @@ describe('v1.BatchServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2169,7 +2170,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2178,8 +2179,7 @@ describe('v1.BatchServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2195,7 +2195,7 @@ describe('v1.BatchServiceClient', () => { }); describe('Path templates', () => { - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -2206,7 +2206,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2259,7 +2259,7 @@ describe('v1.BatchServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2269,7 +2269,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2308,7 +2308,7 @@ describe('v1.BatchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2317,7 +2317,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2346,7 +2346,7 @@ describe('v1.BatchServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -2359,7 +2359,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2434,7 +2434,7 @@ describe('v1.BatchServiceClient', () => { }); }); - describe('taskGroup', () => { + describe('taskGroup', async () => { const fakePath = '/rendered/path/taskGroup'; const expectedParameters = { project: 'projectValue', @@ -2446,7 +2446,7 @@ describe('v1.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskGroupPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts b/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts index 8a36c3575d7..9ec046ee9c1 100644 --- a/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts +++ b/packages/google-cloud-batch/test/gapic_batch_service_v1alpha.ts @@ -289,7 +289,9 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.batchServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateJobRequest() ); @@ -379,7 +381,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateJobRequest() ); @@ -426,7 +428,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateJobRequest() ); @@ -454,7 +456,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateJobRequest() ); @@ -475,7 +477,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetJobRequest() ); @@ -506,7 +508,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetJobRequest() ); @@ -553,7 +555,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetJobRequest() ); @@ -581,7 +583,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetJobRequest() ); @@ -602,7 +604,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateJobRequest() ); @@ -634,7 +636,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateJobRequest() ); @@ -682,7 +684,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateJobRequest() ); @@ -711,7 +713,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateJobRequest() ); @@ -733,7 +735,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetTaskRequest() ); @@ -764,7 +766,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetTaskRequest() ); @@ -811,7 +813,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetTaskRequest() ); @@ -839,7 +841,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetTaskRequest() ); @@ -860,7 +862,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateResourceAllowanceRequest() ); @@ -892,7 +894,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateResourceAllowanceRequest() ); @@ -939,7 +941,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateResourceAllowanceRequest() ); @@ -973,7 +975,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CreateResourceAllowanceRequest() ); @@ -997,7 +999,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetResourceAllowanceRequest() ); @@ -1029,7 +1031,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetResourceAllowanceRequest() ); @@ -1076,7 +1078,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetResourceAllowanceRequest() ); @@ -1107,7 +1109,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.GetResourceAllowanceRequest() ); @@ -1128,7 +1130,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateResourceAllowanceRequest() ); @@ -1161,7 +1163,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateResourceAllowanceRequest() ); @@ -1209,7 +1211,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateResourceAllowanceRequest() ); @@ -1244,7 +1246,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.UpdateResourceAllowanceRequest() ); @@ -1269,7 +1271,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteJobRequest() ); @@ -1301,7 +1303,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteJobRequest() ); @@ -1355,7 +1357,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteJobRequest() ); @@ -1386,7 +1388,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteJobRequest() ); @@ -1419,7 +1421,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1441,7 +1443,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1459,7 +1461,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CancelJobRequest() ); @@ -1491,7 +1493,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CancelJobRequest() ); @@ -1545,7 +1547,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CancelJobRequest() ); @@ -1576,7 +1578,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.CancelJobRequest() ); @@ -1609,7 +1611,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1631,7 +1633,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1649,7 +1651,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteResourceAllowanceRequest() ); @@ -1682,7 +1684,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteResourceAllowanceRequest() ); @@ -1736,7 +1738,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteResourceAllowanceRequest() ); @@ -1770,7 +1772,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.DeleteResourceAllowanceRequest() ); @@ -1803,7 +1805,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1826,7 +1828,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1847,7 +1849,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListJobsRequest() ); @@ -1880,7 +1882,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListJobsRequest() ); @@ -1929,7 +1931,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListJobsRequest() ); @@ -1957,7 +1959,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListJobsRequest() ); @@ -2008,7 +2010,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListJobsRequest() ); @@ -2056,7 +2058,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListJobsRequest() ); @@ -2098,7 +2100,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListJobsRequest() ); @@ -2141,7 +2143,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListTasksRequest() ); @@ -2174,7 +2176,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListTasksRequest() ); @@ -2223,7 +2225,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListTasksRequest() ); @@ -2251,7 +2253,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListTasksRequest() ); @@ -2305,7 +2307,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListTasksRequest() ); @@ -2356,7 +2358,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListTasksRequest() ); @@ -2398,7 +2400,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListTasksRequest() ); @@ -2441,7 +2443,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListResourceAllowancesRequest() ); @@ -2481,7 +2483,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListResourceAllowancesRequest() ); @@ -2538,7 +2540,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListResourceAllowancesRequest() ); @@ -2572,7 +2574,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListResourceAllowancesRequest() ); @@ -2639,7 +2641,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListResourceAllowancesRequest() ); @@ -2695,7 +2697,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListResourceAllowancesRequest() ); @@ -2749,7 +2751,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.batch.v1alpha.ListResourceAllowancesRequest() ); @@ -2795,7 +2797,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2825,7 +2827,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2869,7 +2871,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2904,7 +2906,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2952,7 +2954,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2993,7 +2995,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3072,7 +3074,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3152,7 +3154,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3248,8 +3250,7 @@ describe('v1alpha.BatchServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3268,7 +3269,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3277,8 +3278,7 @@ describe('v1alpha.BatchServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3294,7 +3294,7 @@ describe('v1alpha.BatchServiceClient', () => { }); describe('Path templates', () => { - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -3305,7 +3305,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3358,7 +3358,7 @@ describe('v1alpha.BatchServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3368,7 +3368,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3407,7 +3407,7 @@ describe('v1alpha.BatchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3416,7 +3416,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3445,7 +3445,7 @@ describe('v1alpha.BatchServiceClient', () => { }); }); - describe('resourceAllowance', () => { + describe('resourceAllowance', async () => { const fakePath = '/rendered/path/resourceAllowance'; const expectedParameters = { project: 'projectValue', @@ -3456,7 +3456,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.resourceAllowancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3522,7 +3522,7 @@ describe('v1alpha.BatchServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -3535,7 +3535,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3610,7 +3610,7 @@ describe('v1alpha.BatchServiceClient', () => { }); }); - describe('taskGroup', () => { + describe('taskGroup', async () => { const fakePath = '/rendered/path/taskGroup'; const expectedParameters = { project: 'projectValue', @@ -3622,7 +3622,7 @@ describe('v1alpha.BatchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskGroupPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-beyondcorp-appconnections/package.json b/packages/google-cloud-beyondcorp-appconnections/package.json index 4f6d8c158b4..bca2e8dd10a 100644 --- a/packages/google-cloud-beyondcorp-appconnections/package.json +++ b/packages/google-cloud-beyondcorp-appconnections/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json index 140530ee3be..1f8edca6d76 100644 --- a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnections", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json index 140530ee3be..1f8edca6d76 100644 --- a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnections", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnections/src/v1/app_connections_service_client.ts b/packages/google-cloud-beyondcorp-appconnections/src/v1/app_connections_service_client.ts index ab7eb7f6f72..2ddb779ed37 100644 --- a/packages/google-cloud-beyondcorp-appconnections/src/v1/app_connections_service_client.ts +++ b/packages/google-cloud-beyondcorp-appconnections/src/v1/app_connections_service_client.ts @@ -671,7 +671,9 @@ export class AppConnectionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAppConnection request %j', request); const wrappedCallback: | Callback< @@ -828,7 +830,9 @@ export class AppConnectionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1023,7 +1027,9 @@ export class AppConnectionsServiceClient { this._gaxModule.routingHeader.fromParams({ 'app_connection.name': request.appConnection!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1208,7 +1214,9 @@ export class AppConnectionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1384,7 +1392,9 @@ export class AppConnectionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.beyondcorp.appconnections.v1.IListAppConnectionsRequest, @@ -1463,7 +1473,9 @@ export class AppConnectionsServiceClient { }); const defaultCallSettings = this._defaults['listAppConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAppConnections stream %j', request); return this.descriptors.page.listAppConnections.createStream( this.innerApiCalls.listAppConnections as GaxCall, @@ -1524,7 +1536,9 @@ export class AppConnectionsServiceClient { }); const defaultCallSettings = this._defaults['listAppConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAppConnections iterate %j', request); return this.descriptors.page.listAppConnections.asyncIterate( this.innerApiCalls['listAppConnections'] as GaxCall, @@ -1639,7 +1653,9 @@ export class AppConnectionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.beyondcorp.appconnections.v1.IResolveAppConnectionsRequest, @@ -1715,7 +1731,9 @@ export class AppConnectionsServiceClient { }); const defaultCallSettings = this._defaults['resolveAppConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resolveAppConnections stream %j', request); return this.descriptors.page.resolveAppConnections.createStream( this.innerApiCalls.resolveAppConnections as GaxCall, @@ -1773,7 +1791,9 @@ export class AppConnectionsServiceClient { }); const defaultCallSettings = this._defaults['resolveAppConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resolveAppConnections iterate %j', request); return this.descriptors.page.resolveAppConnections.asyncIterate( this.innerApiCalls['resolveAppConnections'] as GaxCall, @@ -2091,7 +2111,7 @@ export class AppConnectionsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-beyondcorp-appconnections/test/gapic_app_connections_service_v1.ts b/packages/google-cloud-beyondcorp-appconnections/test/gapic_app_connections_service_v1.ts index d80482f40c9..13aba059ced 100644 --- a/packages/google-cloud-beyondcorp-appconnections/test/gapic_app_connections_service_v1.ts +++ b/packages/google-cloud-beyondcorp-appconnections/test/gapic_app_connections_service_v1.ts @@ -303,7 +303,9 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.appConnectionsServiceStub); client.close().then(() => { done(); @@ -366,7 +368,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest() ); @@ -398,7 +400,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest() ); @@ -446,7 +448,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest() ); @@ -478,7 +480,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.GetAppConnectionRequest() ); @@ -500,7 +502,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest() ); @@ -534,7 +536,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest() ); @@ -589,7 +591,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest() ); @@ -621,7 +623,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.CreateAppConnectionRequest() ); @@ -655,7 +657,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -678,7 +680,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -700,7 +702,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest() ); @@ -735,7 +737,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest() ); @@ -791,7 +793,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest() ); @@ -824,7 +826,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.UpdateAppConnectionRequest() ); @@ -859,7 +861,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -882,7 +884,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -904,7 +906,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest() ); @@ -938,7 +940,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest() ); @@ -993,7 +995,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest() ); @@ -1025,7 +1027,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.DeleteAppConnectionRequest() ); @@ -1059,7 +1061,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1082,7 +1084,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1104,7 +1106,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest() ); @@ -1145,7 +1147,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest() ); @@ -1235,7 +1237,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest() ); @@ -1299,7 +1301,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest() ); @@ -1352,7 +1354,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest() ); @@ -1403,7 +1405,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ListAppConnectionsRequest() ); @@ -1447,7 +1449,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest() ); @@ -1488,7 +1490,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest() ); @@ -1546,7 +1548,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest() ); @@ -1581,7 +1583,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest() ); @@ -1710,7 +1712,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest() ); @@ -1765,7 +1767,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnections.v1.ResolveAppConnectionsRequest() ); @@ -1812,7 +1814,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1843,7 +1845,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1888,7 +1890,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1921,7 +1923,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1952,7 +1954,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1997,7 +1999,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2030,7 +2032,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2064,7 +2066,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2109,7 +2111,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2145,7 +2147,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2176,7 +2178,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2221,7 +2223,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2257,7 +2259,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2306,7 +2308,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2348,7 +2350,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2430,7 +2432,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2513,7 +2515,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2612,8 +2614,7 @@ describe('v1.AppConnectionsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2633,7 +2634,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2642,8 +2643,7 @@ describe('v1.AppConnectionsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2659,7 +2659,7 @@ describe('v1.AppConnectionsServiceClient', () => { }); describe('Path templates', () => { - describe('appConnection', () => { + describe('appConnection', async () => { const fakePath = '/rendered/path/appConnection'; const expectedParameters = { project: 'projectValue', @@ -2671,7 +2671,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.appConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2724,7 +2724,7 @@ describe('v1.AppConnectionsServiceClient', () => { }); }); - describe('appConnector', () => { + describe('appConnector', async () => { const fakePath = '/rendered/path/appConnector'; const expectedParameters = { project: 'projectValue', @@ -2736,7 +2736,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.appConnectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2789,7 +2789,7 @@ describe('v1.AppConnectionsServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2800,7 +2800,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2839,7 +2839,7 @@ describe('v1.AppConnectionsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2849,7 +2849,7 @@ describe('v1.AppConnectionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-beyondcorp-appconnectors/package.json b/packages/google-cloud-beyondcorp-appconnectors/package.json index 39e9c874c3d..956388b81a3 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/package.json +++ b/packages/google-cloud-beyondcorp-appconnectors/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json index 71aaf7874a0..6c9920be3b5 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnectors", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json index 71aaf7874a0..6c9920be3b5 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnectors", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnectors/src/v1/app_connectors_service_client.ts b/packages/google-cloud-beyondcorp-appconnectors/src/v1/app_connectors_service_client.ts index d928fc08f57..72d9c78360a 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/src/v1/app_connectors_service_client.ts +++ b/packages/google-cloud-beyondcorp-appconnectors/src/v1/app_connectors_service_client.ts @@ -673,7 +673,9 @@ export class AppConnectorsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAppConnector request %j', request); const wrappedCallback: | Callback< @@ -831,7 +833,9 @@ export class AppConnectorsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1022,7 +1026,9 @@ export class AppConnectorsServiceClient { this._gaxModule.routingHeader.fromParams({ 'app_connector.name': request.appConnector!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1207,7 +1213,9 @@ export class AppConnectorsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1394,7 +1402,9 @@ export class AppConnectorsServiceClient { this._gaxModule.routingHeader.fromParams({ app_connector: request.appConnector ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1570,7 +1580,9 @@ export class AppConnectorsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.beyondcorp.appconnectors.v1.IListAppConnectorsRequest, @@ -1649,7 +1661,9 @@ export class AppConnectorsServiceClient { }); const defaultCallSettings = this._defaults['listAppConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAppConnectors stream %j', request); return this.descriptors.page.listAppConnectors.createStream( this.innerApiCalls.listAppConnectors as GaxCall, @@ -1710,7 +1724,9 @@ export class AppConnectorsServiceClient { }); const defaultCallSettings = this._defaults['listAppConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAppConnectors iterate %j', request); return this.descriptors.page.listAppConnectors.asyncIterate( this.innerApiCalls['listAppConnectors'] as GaxCall, @@ -2028,7 +2044,7 @@ export class AppConnectorsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-beyondcorp-appconnectors/test/gapic_app_connectors_service_v1.ts b/packages/google-cloud-beyondcorp-appconnectors/test/gapic_app_connectors_service_v1.ts index 0241ecf40d5..0c7d88454ae 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/test/gapic_app_connectors_service_v1.ts +++ b/packages/google-cloud-beyondcorp-appconnectors/test/gapic_app_connectors_service_v1.ts @@ -301,7 +301,9 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.appConnectorsServiceStub); client.close().then(() => { done(); @@ -364,7 +366,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest() ); @@ -396,7 +398,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest() ); @@ -444,7 +446,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest() ); @@ -476,7 +478,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.GetAppConnectorRequest() ); @@ -498,7 +500,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest() ); @@ -532,7 +534,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest() ); @@ -587,7 +589,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest() ); @@ -619,7 +621,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.CreateAppConnectorRequest() ); @@ -653,7 +655,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -676,7 +678,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -698,7 +700,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest() ); @@ -733,7 +735,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest() ); @@ -789,7 +791,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest() ); @@ -822,7 +824,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.UpdateAppConnectorRequest() ); @@ -857,7 +859,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -880,7 +882,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -902,7 +904,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest() ); @@ -936,7 +938,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest() ); @@ -991,7 +993,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.DeleteAppConnectorRequest() ); @@ -1057,7 +1059,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1080,7 +1082,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1102,7 +1104,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest() ); @@ -1190,7 +1192,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest() ); @@ -1222,7 +1224,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ReportStatusRequest() ); @@ -1256,7 +1258,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1279,7 +1281,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1298,7 +1300,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest() ); @@ -1396,7 +1398,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest() ); @@ -1428,7 +1430,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest() ); @@ -1492,7 +1494,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest() ); @@ -1545,7 +1547,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest() ); @@ -1596,7 +1598,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appconnectors.v1.ListAppConnectorsRequest() ); @@ -1639,7 +1641,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1670,7 +1672,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1715,7 +1717,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1748,7 +1750,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1779,7 +1781,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1824,7 +1826,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1857,7 +1859,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1891,7 +1893,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1936,7 +1938,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1972,7 +1974,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2003,7 +2005,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2048,7 +2050,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2084,7 +2086,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2133,7 +2135,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2175,7 +2177,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2257,7 +2259,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2340,7 +2342,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2439,8 +2441,7 @@ describe('v1.AppConnectorsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2460,7 +2461,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2469,8 +2470,7 @@ describe('v1.AppConnectorsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2486,7 +2486,7 @@ describe('v1.AppConnectorsServiceClient', () => { }); describe('Path templates', () => { - describe('appConnector', () => { + describe('appConnector', async () => { const fakePath = '/rendered/path/appConnector'; const expectedParameters = { project: 'projectValue', @@ -2498,7 +2498,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.appConnectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2551,7 +2551,7 @@ describe('v1.AppConnectorsServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2562,7 +2562,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2601,7 +2601,7 @@ describe('v1.AppConnectorsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2611,7 +2611,7 @@ describe('v1.AppConnectorsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-beyondcorp-appgateways/package.json b/packages/google-cloud-beyondcorp-appgateways/package.json index b852822d332..6d7d010dd6c 100644 --- a/packages/google-cloud-beyondcorp-appgateways/package.json +++ b/packages/google-cloud-beyondcorp-appgateways/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json index 0feb7752fc2..d8773bb67e5 100644 --- a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appgateways", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json index 0feb7752fc2..d8773bb67e5 100644 --- a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appgateways", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appgateways/src/v1/app_gateways_service_client.ts b/packages/google-cloud-beyondcorp-appgateways/src/v1/app_gateways_service_client.ts index d586d0ae850..0cb2eb64e77 100644 --- a/packages/google-cloud-beyondcorp-appgateways/src/v1/app_gateways_service_client.ts +++ b/packages/google-cloud-beyondcorp-appgateways/src/v1/app_gateways_service_client.ts @@ -649,7 +649,9 @@ export class AppGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAppGateway request %j', request); const wrappedCallback: | Callback< @@ -806,7 +808,9 @@ export class AppGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -991,7 +995,9 @@ export class AppGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1167,7 +1173,9 @@ export class AppGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.beyondcorp.appgateways.v1.IListAppGatewaysRequest, @@ -1246,7 +1254,9 @@ export class AppGatewaysServiceClient { }); const defaultCallSettings = this._defaults['listAppGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAppGateways stream %j', request); return this.descriptors.page.listAppGateways.createStream( this.innerApiCalls.listAppGateways as GaxCall, @@ -1307,7 +1317,9 @@ export class AppGatewaysServiceClient { }); const defaultCallSettings = this._defaults['listAppGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAppGateways iterate %j', request); return this.descriptors.page.listAppGateways.asyncIterate( this.innerApiCalls['listAppGateways'] as GaxCall, @@ -1625,7 +1637,7 @@ export class AppGatewaysServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-beyondcorp-appgateways/test/gapic_app_gateways_service_v1.ts b/packages/google-cloud-beyondcorp-appgateways/test/gapic_app_gateways_service_v1.ts index 227f57ec376..19f9d5f07ff 100644 --- a/packages/google-cloud-beyondcorp-appgateways/test/gapic_app_gateways_service_v1.ts +++ b/packages/google-cloud-beyondcorp-appgateways/test/gapic_app_gateways_service_v1.ts @@ -292,7 +292,9 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.appGatewaysServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest() ); @@ -382,7 +384,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest() ); @@ -429,7 +431,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest() ); @@ -460,7 +462,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.GetAppGatewayRequest() ); @@ -481,7 +483,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest() ); @@ -514,7 +516,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest() ); @@ -568,7 +570,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest() ); @@ -599,7 +601,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.CreateAppGatewayRequest() ); @@ -632,7 +634,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -654,7 +656,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -675,7 +677,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest() ); @@ -708,7 +710,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest() ); @@ -762,7 +764,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest() ); @@ -793,7 +795,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.DeleteAppGatewayRequest() ); @@ -826,7 +828,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -848,7 +850,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -869,7 +871,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest() ); @@ -908,7 +910,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest() ); @@ -965,7 +967,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest() ); @@ -996,7 +998,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest() ); @@ -1059,7 +1061,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest() ); @@ -1161,7 +1163,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.appgateways.v1.ListAppGatewaysRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1233,7 +1235,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1309,7 +1311,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1383,7 +1385,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1415,7 +1417,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1448,7 +1450,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1492,7 +1494,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1527,7 +1529,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1557,7 +1559,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1601,7 +1603,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1636,7 +1638,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1725,7 +1727,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1804,7 +1806,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1884,7 +1886,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1980,8 +1982,7 @@ describe('v1.AppGatewaysServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2000,7 +2001,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2009,8 +2010,7 @@ describe('v1.AppGatewaysServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2026,7 +2026,7 @@ describe('v1.AppGatewaysServiceClient', () => { }); describe('Path templates', () => { - describe('appGateway', () => { + describe('appGateway', async () => { const fakePath = '/rendered/path/appGateway'; const expectedParameters = { project: 'projectValue', @@ -2037,7 +2037,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.appGatewayPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2090,7 +2090,7 @@ describe('v1.AppGatewaysServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2100,7 +2100,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2139,7 +2139,7 @@ describe('v1.AppGatewaysServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2148,7 +2148,7 @@ describe('v1.AppGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json index 76bced82b9c..ed1b4bbfbb4 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json index fed6b6947a0..1d12a0b87e3 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientconnectorservices", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json index fed6b6947a0..1d12a0b87e3 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientconnectorservices", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/src/v1/client_connector_services_service_client.ts b/packages/google-cloud-beyondcorp-clientconnectorservices/src/v1/client_connector_services_service_client.ts index 14be18ba221..2b453671347 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/src/v1/client_connector_services_service_client.ts +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/src/v1/client_connector_services_service_client.ts @@ -670,7 +670,9 @@ export class ClientConnectorServicesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getClientConnectorService request %j', request); const wrappedCallback: | Callback< @@ -829,7 +831,9 @@ export class ClientConnectorServicesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1030,7 +1034,9 @@ export class ClientConnectorServicesServiceClient { 'client_connector_service.name': request.clientConnectorService!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1220,7 +1226,9 @@ export class ClientConnectorServicesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1393,7 +1401,9 @@ export class ClientConnectorServicesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.beyondcorp.clientconnectorservices.v1.IListClientConnectorServicesRequest, @@ -1463,7 +1473,9 @@ export class ClientConnectorServicesServiceClient { }); const defaultCallSettings = this._defaults['listClientConnectorServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientConnectorServices stream %j', request); return this.descriptors.page.listClientConnectorServices.createStream( this.innerApiCalls.listClientConnectorServices as GaxCall, @@ -1515,7 +1527,9 @@ export class ClientConnectorServicesServiceClient { }); const defaultCallSettings = this._defaults['listClientConnectorServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientConnectorServices iterate %j', request); return this.descriptors.page.listClientConnectorServices.asyncIterate( this.innerApiCalls['listClientConnectorServices'] as GaxCall, @@ -1833,7 +1847,7 @@ export class ClientConnectorServicesServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/test/gapic_client_connector_services_service_v1.ts b/packages/google-cloud-beyondcorp-clientconnectorservices/test/gapic_client_connector_services_service_v1.ts index 83598b59ea6..90016a6dad5 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/test/gapic_client_connector_services_service_v1.ts +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/test/gapic_client_connector_services_service_v1.ts @@ -309,7 +309,9 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.clientConnectorServicesServiceStub); client.close().then(() => { done(); @@ -380,7 +382,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest() ); @@ -415,7 +417,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest() ); @@ -465,7 +467,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest() ); @@ -502,7 +504,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest() ); @@ -529,7 +531,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest() ); @@ -565,7 +567,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest() ); @@ -622,7 +624,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest() ); @@ -659,7 +661,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest() ); @@ -695,7 +697,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -721,7 +723,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -745,7 +747,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest() ); @@ -782,7 +784,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest() ); @@ -840,7 +842,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest() ); @@ -878,7 +880,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest() ); @@ -915,7 +917,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -941,7 +943,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -965,7 +967,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest() ); @@ -1058,7 +1060,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1157,7 +1159,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1181,7 +1183,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest() ); @@ -1224,7 +1226,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest() ); @@ -1284,7 +1286,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest() ); @@ -1321,7 +1323,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest() ); @@ -1393,7 +1395,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest() ); @@ -1454,7 +1456,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest() ); @@ -1511,7 +1513,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1593,7 +1595,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1640,7 +1642,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1675,7 +1677,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1708,7 +1710,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1755,7 +1757,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1790,7 +1792,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1826,7 +1828,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1873,7 +1875,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1911,7 +1913,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1944,7 +1946,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1991,7 +1993,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2029,7 +2031,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2080,7 +2082,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2124,7 +2126,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2212,7 +2214,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2301,7 +2303,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2406,8 +2408,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2429,7 +2430,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2438,8 +2439,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2455,7 +2455,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { }); describe('Path templates', () => { - describe('clientConnectorService', () => { + describe('clientConnectorService', async () => { const fakePath = '/rendered/path/clientConnectorService'; const expectedParameters = { project: 'projectValue', @@ -2469,7 +2469,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.clientConnectorServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2539,7 +2539,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2552,7 +2552,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2591,7 +2591,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2603,7 +2603,7 @@ describe('v1.ClientConnectorServicesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-beyondcorp-clientgateways/package.json b/packages/google-cloud-beyondcorp-clientgateways/package.json index d61b749ad71..ced14b4cf00 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/package.json +++ b/packages/google-cloud-beyondcorp-clientgateways/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json index 36b8b21dd34..efa88a1e7e0 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientgateways", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json index 36b8b21dd34..efa88a1e7e0 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientgateways", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientgateways/src/v1/client_gateways_service_client.ts b/packages/google-cloud-beyondcorp-clientgateways/src/v1/client_gateways_service_client.ts index 409d736e7ff..a37719734f1 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/src/v1/client_gateways_service_client.ts +++ b/packages/google-cloud-beyondcorp-clientgateways/src/v1/client_gateways_service_client.ts @@ -646,7 +646,9 @@ export class ClientGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getClientGateway request %j', request); const wrappedCallback: | Callback< @@ -802,7 +804,9 @@ export class ClientGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -986,7 +990,9 @@ export class ClientGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1153,7 +1159,9 @@ export class ClientGatewaysServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.beyondcorp.clientgateways.v1.IListClientGatewaysRequest, @@ -1223,7 +1231,9 @@ export class ClientGatewaysServiceClient { }); const defaultCallSettings = this._defaults['listClientGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientGateways stream %j', request); return this.descriptors.page.listClientGateways.createStream( this.innerApiCalls.listClientGateways as GaxCall, @@ -1275,7 +1285,9 @@ export class ClientGatewaysServiceClient { }); const defaultCallSettings = this._defaults['listClientGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientGateways iterate %j', request); return this.descriptors.page.listClientGateways.asyncIterate( this.innerApiCalls['listClientGateways'] as GaxCall, @@ -1593,7 +1605,7 @@ export class ClientGatewaysServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-beyondcorp-clientgateways/test/gapic_client_gateways_service_v1.ts b/packages/google-cloud-beyondcorp-clientgateways/test/gapic_client_gateways_service_v1.ts index fd8c7d64c4c..c8b7c99bf03 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/test/gapic_client_gateways_service_v1.ts +++ b/packages/google-cloud-beyondcorp-clientgateways/test/gapic_client_gateways_service_v1.ts @@ -303,7 +303,9 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.clientGatewaysServiceStub); client.close().then(() => { done(); @@ -366,7 +368,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest() ); @@ -398,7 +400,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest() ); @@ -446,7 +448,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest() ); @@ -478,7 +480,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.GetClientGatewayRequest() ); @@ -500,7 +502,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest() ); @@ -534,7 +536,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest() ); @@ -589,7 +591,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest() ); @@ -621,7 +623,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.CreateClientGatewayRequest() ); @@ -655,7 +657,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -678,7 +680,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -700,7 +702,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest() ); @@ -734,7 +736,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest() ); @@ -789,7 +791,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest() ); @@ -821,7 +823,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.DeleteClientGatewayRequest() ); @@ -855,7 +857,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -878,7 +880,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -900,7 +902,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest() ); @@ -941,7 +943,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest() ); @@ -999,7 +1001,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest() ); @@ -1148,7 +1150,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest() ); @@ -1199,7 +1201,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.beyondcorp.clientgateways.v1.ListClientGatewaysRequest() ); @@ -1242,7 +1244,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1273,7 +1275,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1318,7 +1320,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1351,7 +1353,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1427,7 +1429,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1494,7 +1496,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1539,7 +1541,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1575,7 +1577,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1606,7 +1608,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1778,7 +1780,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1860,7 +1862,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1943,7 +1945,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2042,8 +2044,7 @@ describe('v1.ClientGatewaysServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2063,7 +2064,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2072,8 +2073,7 @@ describe('v1.ClientGatewaysServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2089,7 +2089,7 @@ describe('v1.ClientGatewaysServiceClient', () => { }); describe('Path templates', () => { - describe('clientGateway', () => { + describe('clientGateway', async () => { const fakePath = '/rendered/path/clientGateway'; const expectedParameters = { project: 'projectValue', @@ -2101,7 +2101,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clientGatewayPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2154,7 +2154,7 @@ describe('v1.ClientGatewaysServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2165,7 +2165,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2204,7 +2204,7 @@ describe('v1.ClientGatewaysServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2214,7 +2214,7 @@ describe('v1.ClientGatewaysServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-analyticshub/package.json b/packages/google-cloud-bigquery-analyticshub/package.json index 147d69b284b..a96f21c0acc 100644 --- a/packages/google-cloud-bigquery-analyticshub/package.json +++ b/packages/google-cloud-bigquery-analyticshub/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json index d8454834aa5..29af92f8340 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-analyticshub", - "version": "1.6.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json index 978dd633cb2..39d782b0cf6 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-analyticshub", - "version": "1.6.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts b/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts index ad647d28cb4..85ce354d762 100644 --- a/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts +++ b/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts @@ -596,7 +596,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataExchange request %j', request); const wrappedCallback: | Callback< @@ -730,7 +732,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataExchange request %j', request); const wrappedCallback: | Callback< @@ -859,7 +863,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_exchange.name': request.dataExchange!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataExchange request %j', request); const wrappedCallback: | Callback< @@ -985,7 +991,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataExchange request %j', request); const wrappedCallback: | Callback< @@ -1111,7 +1119,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getListing request %j', request); const wrappedCallback: | Callback< @@ -1245,7 +1255,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createListing request %j', request); const wrappedCallback: | Callback< @@ -1374,7 +1386,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ 'listing.name': request.listing!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateListing request %j', request); const wrappedCallback: | Callback< @@ -1500,7 +1514,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteListing request %j', request); const wrappedCallback: | Callback< @@ -1633,7 +1649,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('subscribeListing request %j', request); const wrappedCallback: | Callback< @@ -1759,7 +1777,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSubscription request %j', request); const wrappedCallback: | Callback< @@ -1885,7 +1905,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('revokeSubscription request %j', request); const wrappedCallback: | Callback< @@ -2000,7 +2022,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2118,7 +2142,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2230,7 +2256,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2367,7 +2395,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2537,7 +2567,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2705,7 +2737,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2870,7 +2904,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, @@ -2938,7 +2974,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataExchanges stream %j', request); return this.descriptors.page.listDataExchanges.createStream( this.innerApiCalls.listDataExchanges as GaxCall, @@ -2988,7 +3026,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataExchanges iterate %j', request); return this.descriptors.page.listDataExchanges.asyncIterate( this.innerApiCalls['listDataExchanges'] as GaxCall, @@ -3094,7 +3134,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ organization: request.organization ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, @@ -3162,7 +3204,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listOrgDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrgDataExchanges stream %j', request); return this.descriptors.page.listOrgDataExchanges.createStream( this.innerApiCalls.listOrgDataExchanges as GaxCall, @@ -3212,7 +3256,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listOrgDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrgDataExchanges iterate %j', request); return this.descriptors.page.listOrgDataExchanges.asyncIterate( this.innerApiCalls['listOrgDataExchanges'] as GaxCall, @@ -3317,7 +3363,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, @@ -3385,7 +3433,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listListings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listListings stream %j', request); return this.descriptors.page.listListings.createStream( this.innerApiCalls.listListings as GaxCall, @@ -3435,7 +3485,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listListings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listListings iterate %j', request); return this.descriptors.page.listListings.asyncIterate( this.innerApiCalls['listListings'] as GaxCall, @@ -3554,7 +3606,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, @@ -3636,7 +3690,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listSubscriptions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubscriptions stream %j', request); return this.descriptors.page.listSubscriptions.createStream( this.innerApiCalls.listSubscriptions as GaxCall, @@ -3700,7 +3756,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listSubscriptions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubscriptions iterate %j', request); return this.descriptors.page.listSubscriptions.asyncIterate( this.innerApiCalls['listSubscriptions'] as GaxCall, @@ -3808,7 +3866,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, @@ -3880,7 +3940,9 @@ export class AnalyticsHubServiceClient { const defaultCallSettings = this._defaults['listSharedResourceSubscriptions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSharedResourceSubscriptions stream %j', request); return this.descriptors.page.listSharedResourceSubscriptions.createStream( this.innerApiCalls.listSharedResourceSubscriptions as GaxCall, @@ -3934,7 +3996,9 @@ export class AnalyticsHubServiceClient { const defaultCallSettings = this._defaults['listSharedResourceSubscriptions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSharedResourceSubscriptions iterate %j', request); return this.descriptors.page.listSharedResourceSubscriptions.asyncIterate( this.innerApiCalls['listSharedResourceSubscriptions'] as GaxCall, @@ -4036,7 +4100,7 @@ export class AnalyticsHubServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-bigquery-analyticshub/test/gapic_analytics_hub_service_v1.ts b/packages/google-cloud-bigquery-analyticshub/test/gapic_analytics_hub_service_v1.ts index 773d82e0f99..fe5ef591467 100644 --- a/packages/google-cloud-bigquery-analyticshub/test/gapic_analytics_hub_service_v1.ts +++ b/packages/google-cloud-bigquery-analyticshub/test/gapic_analytics_hub_service_v1.ts @@ -298,7 +298,9 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.analyticsHubServiceStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest() ); @@ -398,7 +400,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest() ); @@ -447,7 +449,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest() ); @@ -480,7 +482,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest() ); @@ -503,7 +505,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest() ); @@ -537,7 +539,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest() ); @@ -586,7 +588,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest() ); @@ -619,7 +621,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest() ); @@ -642,7 +644,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest() ); @@ -677,7 +679,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest() ); @@ -727,7 +729,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest() ); @@ -761,7 +763,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest() ); @@ -785,7 +787,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest() ); @@ -819,7 +821,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest() ); @@ -868,7 +870,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest() ); @@ -901,7 +903,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest() ); @@ -924,7 +926,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetListingRequest() ); @@ -957,7 +959,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetListingRequest() ); @@ -1006,7 +1008,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetListingRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetListingRequest() ); @@ -1062,7 +1064,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateListingRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateListingRequest() ); @@ -1144,7 +1146,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateListingRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.CreateListingRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest() ); @@ -1234,7 +1236,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest() ); @@ -1284,7 +1286,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest() ); @@ -1318,7 +1320,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest() ); @@ -1375,7 +1377,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest() ); @@ -1457,7 +1459,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest() ); @@ -1480,7 +1482,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest() ); @@ -1513,7 +1515,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest() ); @@ -1562,7 +1564,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest() ); @@ -1595,7 +1597,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest() ); @@ -1618,7 +1620,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest() ); @@ -1700,7 +1702,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest() ); @@ -1733,7 +1735,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.GetSubscriptionRequest() ); @@ -1756,7 +1758,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest() ); @@ -1790,7 +1792,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest() ); @@ -1839,7 +1841,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest() ); @@ -1872,7 +1874,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RevokeSubscriptionRequest() ); @@ -1895,7 +1897,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1928,7 +1930,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1977,7 +1979,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2010,7 +2012,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2033,7 +2035,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2066,7 +2068,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2115,7 +2117,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2148,7 +2150,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2171,7 +2173,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2205,7 +2207,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2254,7 +2256,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2287,7 +2289,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2310,7 +2312,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest() ); @@ -2345,7 +2347,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest() ); @@ -2401,7 +2403,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest() ); @@ -2437,7 +2439,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeRequest() ); @@ -2472,7 +2474,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2496,7 +2498,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2519,7 +2521,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest() ); @@ -2554,7 +2556,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest() ); @@ -2610,7 +2612,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest() ); @@ -2643,7 +2645,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionRequest() ); @@ -2678,7 +2680,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2702,7 +2704,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2725,7 +2727,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest() ); @@ -2760,7 +2762,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest() ); @@ -2816,7 +2818,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest() ); @@ -2849,7 +2851,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.DeleteSubscriptionRequest() ); @@ -2884,7 +2886,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2908,7 +2910,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2931,7 +2933,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest() ); @@ -2972,7 +2974,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest() ); @@ -3031,7 +3033,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest() ); @@ -3064,7 +3066,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest() ); @@ -3129,7 +3131,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest() ); @@ -3183,7 +3185,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest() ); @@ -3235,7 +3237,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest() ); @@ -3280,7 +3282,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest() ); @@ -3322,7 +3324,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest() ); @@ -3381,7 +3383,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest() ); @@ -3414,7 +3416,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest() ); @@ -3479,7 +3481,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest() ); @@ -3533,7 +3535,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest() ); @@ -3585,7 +3587,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest() ); @@ -3630,7 +3632,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListListingsRequest() ); @@ -3671,7 +3673,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListListingsRequest() ); @@ -3730,7 +3732,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListListingsRequest() ); @@ -3763,7 +3765,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListListingsRequest() ); @@ -3826,7 +3828,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListListingsRequest() ); @@ -3880,7 +3882,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListListingsRequest() ); @@ -3932,7 +3934,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListListingsRequest() ); @@ -3977,7 +3979,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest() ); @@ -4018,7 +4020,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest() ); @@ -4077,7 +4079,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest() ); @@ -4110,7 +4112,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest() ); @@ -4175,7 +4177,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest() ); @@ -4229,7 +4231,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest() ); @@ -4281,7 +4283,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSubscriptionsRequest() ); @@ -4326,7 +4328,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest() ); @@ -4368,7 +4370,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest() ); @@ -4427,7 +4429,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest() ); @@ -4463,7 +4465,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest() ); @@ -4537,7 +4539,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest() ); @@ -4600,7 +4602,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest() ); @@ -4656,7 +4658,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.analyticshub.v1.ListSharedResourceSubscriptionsRequest() ); @@ -4704,7 +4706,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4789,7 +4791,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4875,7 +4877,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4977,8 +4979,7 @@ describe('v1.AnalyticsHubServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4999,7 +5000,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5008,8 +5009,7 @@ describe('v1.AnalyticsHubServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5025,7 +5025,7 @@ describe('v1.AnalyticsHubServiceClient', () => { }); describe('Path templates', () => { - describe('dataExchange', () => { + describe('dataExchange', async () => { const fakePath = '/rendered/path/dataExchange'; const expectedParameters = { project: 'projectValue', @@ -5038,7 +5038,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.dataExchangePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5091,7 +5091,7 @@ describe('v1.AnalyticsHubServiceClient', () => { }); }); - describe('listing', () => { + describe('listing', async () => { const fakePath = '/rendered/path/listing'; const expectedParameters = { project: 'projectValue', @@ -5105,7 +5105,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.listingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5169,7 +5169,7 @@ describe('v1.AnalyticsHubServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5181,7 +5181,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5220,7 +5220,7 @@ describe('v1.AnalyticsHubServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5231,7 +5231,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5260,7 +5260,7 @@ describe('v1.AnalyticsHubServiceClient', () => { }); }); - describe('subscription', () => { + describe('subscription', async () => { const fakePath = '/rendered/path/subscription'; const expectedParameters = { project: 'projectValue', @@ -5273,7 +5273,7 @@ describe('v1.AnalyticsHubServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.subscriptionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-connection/package.json b/packages/google-cloud-bigquery-connection/package.json index 99933988313..3d5c6ddd5b8 100644 --- a/packages/google-cloud-bigquery-connection/package.json +++ b/packages/google-cloud-bigquery-connection/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json index 0d920d148a7..b4a461bb55c 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json index 0d920d148a7..b4a461bb55c 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json index f49fba40111..d0fcd63585a 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json index f49fba40111..d0fcd63585a 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/src/v1/connection_service_client.ts b/packages/google-cloud-bigquery-connection/src/v1/connection_service_client.ts index 1aba152d2bf..b4bf89ca988 100644 --- a/packages/google-cloud-bigquery-connection/src/v1/connection_service_client.ts +++ b/packages/google-cloud-bigquery-connection/src/v1/connection_service_client.ts @@ -501,7 +501,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConnection request %j', request); const wrappedCallback: | Callback< @@ -627,7 +629,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnection request %j', request); const wrappedCallback: | Callback< @@ -758,7 +762,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConnection request %j', request); const wrappedCallback: | Callback< @@ -884,7 +890,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConnection request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1009,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1122,7 +1132,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1240,7 +1252,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1363,7 +1377,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.connection.v1.IListConnectionsRequest, @@ -1429,7 +1445,9 @@ export class ConnectionServiceClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections stream %j', request); return this.descriptors.page.listConnections.createStream( this.innerApiCalls.listConnections as GaxCall, @@ -1477,7 +1495,9 @@ export class ConnectionServiceClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections iterate %j', request); return this.descriptors.page.listConnections.asyncIterate( this.innerApiCalls['listConnections'] as GaxCall, diff --git a/packages/google-cloud-bigquery-connection/src/v1beta1/connection_service_client.ts b/packages/google-cloud-bigquery-connection/src/v1beta1/connection_service_client.ts index 0289c20fca3..9a055168927 100644 --- a/packages/google-cloud-bigquery-connection/src/v1beta1/connection_service_client.ts +++ b/packages/google-cloud-bigquery-connection/src/v1beta1/connection_service_client.ts @@ -483,7 +483,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConnection request %j', request); const wrappedCallback: | Callback< @@ -609,7 +611,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnection request %j', request); const wrappedCallback: | Callback< @@ -739,7 +743,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections request %j', request); const wrappedCallback: | Callback< @@ -870,7 +876,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConnection request %j', request); const wrappedCallback: | Callback< @@ -998,7 +1006,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConnectionCredential request %j', request); const wrappedCallback: | Callback< @@ -1124,7 +1134,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConnection request %j', request); const wrappedCallback: | Callback< @@ -1241,7 +1253,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1362,7 +1376,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1480,7 +1496,9 @@ export class ConnectionServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1.ts b/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1.ts index 341ba76c524..7705645646f 100644 --- a/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1.ts +++ b/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1.ts @@ -256,7 +256,9 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.connectionServiceStub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.CreateConnectionRequest() ); @@ -346,7 +348,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.CreateConnectionRequest() ); @@ -393,7 +395,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.CreateConnectionRequest() ); @@ -424,7 +426,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.CreateConnectionRequest() ); @@ -445,7 +447,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.GetConnectionRequest() ); @@ -476,7 +478,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.GetConnectionRequest() ); @@ -523,7 +525,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.GetConnectionRequest() ); @@ -554,7 +556,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.GetConnectionRequest() ); @@ -575,7 +577,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.UpdateConnectionRequest() ); @@ -606,7 +608,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.UpdateConnectionRequest() ); @@ -653,7 +655,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.UpdateConnectionRequest() ); @@ -684,7 +686,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.UpdateConnectionRequest() ); @@ -705,7 +707,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.DeleteConnectionRequest() ); @@ -736,7 +738,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.DeleteConnectionRequest() ); @@ -783,7 +785,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.DeleteConnectionRequest() ); @@ -814,7 +816,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.DeleteConnectionRequest() ); @@ -835,7 +837,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -866,7 +868,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -913,7 +915,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -944,7 +946,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -965,7 +967,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -996,7 +998,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1205,7 +1207,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1226,7 +1228,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.ListConnectionsRequest() ); @@ -1265,7 +1267,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.ListConnectionsRequest() ); @@ -1322,7 +1324,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.ListConnectionsRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.ListConnectionsRequest() ); @@ -1414,7 +1416,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.ListConnectionsRequest() ); @@ -1464,7 +1466,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.ListConnectionsRequest() ); @@ -1514,7 +1516,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1.ListConnectionsRequest() ); @@ -1552,7 +1554,7 @@ describe('v1.ConnectionServiceClient', () => { }); describe('Path templates', () => { - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -1563,7 +1565,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1616,7 +1618,7 @@ describe('v1.ConnectionServiceClient', () => { }); }); - describe('connection', () => { + describe('connection', async () => { const fakePath = '/rendered/path/connection'; const expectedParameters = { project: 'projectValue', @@ -1627,7 +1629,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1680,7 +1682,7 @@ describe('v1.ConnectionServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1690,7 +1692,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1729,7 +1731,7 @@ describe('v1.ConnectionServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -1740,7 +1742,7 @@ describe('v1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1beta1.ts b/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1beta1.ts index 0a26f7867ea..a0068fd6fb0 100644 --- a/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1beta1.ts +++ b/packages/google-cloud-bigquery-connection/test/gapic_connection_service_v1beta1.ts @@ -202,7 +202,9 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.connectionServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.CreateConnectionRequest() ); @@ -297,7 +299,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.CreateConnectionRequest() ); @@ -345,7 +347,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.CreateConnectionRequest() ); @@ -377,7 +379,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.CreateConnectionRequest() ); @@ -399,7 +401,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.GetConnectionRequest() ); @@ -431,7 +433,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.GetConnectionRequest() ); @@ -479,7 +481,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.GetConnectionRequest() ); @@ -511,7 +513,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.GetConnectionRequest() ); @@ -533,7 +535,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.ListConnectionsRequest() ); @@ -565,7 +567,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.ListConnectionsRequest() ); @@ -613,7 +615,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.ListConnectionsRequest() ); @@ -645,7 +647,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.ListConnectionsRequest() ); @@ -667,7 +669,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionRequest() ); @@ -699,7 +701,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionRequest() ); @@ -747,7 +749,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionRequest() ); @@ -779,7 +781,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionRequest() ); @@ -801,7 +803,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionCredentialRequest() ); @@ -834,7 +836,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionCredentialRequest() ); @@ -882,7 +884,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionCredentialRequest() ); @@ -917,7 +919,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.UpdateConnectionCredentialRequest() ); @@ -942,7 +944,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.DeleteConnectionRequest() ); @@ -974,7 +976,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.DeleteConnectionRequest() ); @@ -1022,7 +1024,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.DeleteConnectionRequest() ); @@ -1054,7 +1056,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.connection.v1beta1.DeleteConnectionRequest() ); @@ -1076,7 +1078,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1108,7 +1110,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1156,7 +1158,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1188,7 +1190,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1210,7 +1212,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1242,7 +1244,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1290,7 +1292,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1322,7 +1324,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1344,7 +1346,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1377,7 +1379,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1425,7 +1427,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1457,7 +1459,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1473,7 +1475,7 @@ describe('v1beta1.ConnectionServiceClient', () => { }); describe('Path templates', () => { - describe('connection', () => { + describe('connection', async () => { const fakePath = '/rendered/path/connection'; const expectedParameters = { project: 'projectValue', @@ -1485,7 +1487,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1538,7 +1540,7 @@ describe('v1beta1.ConnectionServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1549,7 +1551,7 @@ describe('v1beta1.ConnectionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-dataexchange/package.json b/packages/google-cloud-bigquery-dataexchange/package.json index dc3ce17cf46..ec3668a6afb 100644 --- a/packages/google-cloud-bigquery-dataexchange/package.json +++ b/packages/google-cloud-bigquery-dataexchange/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json index 05ae10bf6d8..39fb9439abe 100644 --- a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json +++ b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataexchange", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json index 05ae10bf6d8..39fb9439abe 100644 --- a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json +++ b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataexchange", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-dataexchange/src/v1beta1/analytics_hub_service_client.ts b/packages/google-cloud-bigquery-dataexchange/src/v1beta1/analytics_hub_service_client.ts index 72b6e7f7507..f75872cfcf9 100644 --- a/packages/google-cloud-bigquery-dataexchange/src/v1beta1/analytics_hub_service_client.ts +++ b/packages/google-cloud-bigquery-dataexchange/src/v1beta1/analytics_hub_service_client.ts @@ -520,7 +520,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataExchange request %j', request); const wrappedCallback: | Callback< @@ -654,7 +656,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataExchange request %j', request); const wrappedCallback: | Callback< @@ -783,7 +787,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_exchange.name': request.dataExchange!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataExchange request %j', request); const wrappedCallback: | Callback< @@ -909,7 +915,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataExchange request %j', request); const wrappedCallback: | Callback< @@ -1035,7 +1043,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getListing request %j', request); const wrappedCallback: | Callback< @@ -1169,7 +1179,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createListing request %j', request); const wrappedCallback: | Callback< @@ -1298,7 +1310,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ 'listing.name': request.listing!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateListing request %j', request); const wrappedCallback: | Callback< @@ -1424,7 +1438,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteListing request %j', request); const wrappedCallback: | Callback< @@ -1557,7 +1573,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('subscribeListing request %j', request); const wrappedCallback: | Callback< @@ -1672,7 +1690,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1790,7 +1810,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1902,7 +1924,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2027,7 +2051,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.dataexchange.v1beta1.IListDataExchangesRequest, @@ -2095,7 +2121,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataExchanges stream %j', request); return this.descriptors.page.listDataExchanges.createStream( this.innerApiCalls.listDataExchanges as GaxCall, @@ -2145,7 +2173,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataExchanges iterate %j', request); return this.descriptors.page.listDataExchanges.asyncIterate( this.innerApiCalls['listDataExchanges'] as GaxCall, @@ -2251,7 +2281,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ organization: request.organization ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.dataexchange.v1beta1.IListOrgDataExchangesRequest, @@ -2319,7 +2351,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listOrgDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrgDataExchanges stream %j', request); return this.descriptors.page.listOrgDataExchanges.createStream( this.innerApiCalls.listOrgDataExchanges as GaxCall, @@ -2369,7 +2403,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listOrgDataExchanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrgDataExchanges iterate %j', request); return this.descriptors.page.listOrgDataExchanges.asyncIterate( this.innerApiCalls['listOrgDataExchanges'] as GaxCall, @@ -2474,7 +2510,9 @@ export class AnalyticsHubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.dataexchange.v1beta1.IListListingsRequest, @@ -2542,7 +2580,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listListings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listListings stream %j', request); return this.descriptors.page.listListings.createStream( this.innerApiCalls.listListings as GaxCall, @@ -2592,7 +2632,9 @@ export class AnalyticsHubServiceClient { }); const defaultCallSettings = this._defaults['listListings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listListings iterate %j', request); return this.descriptors.page.listListings.asyncIterate( this.innerApiCalls['listListings'] as GaxCall, diff --git a/packages/google-cloud-bigquery-dataexchange/test/gapic_analytics_hub_service_v1beta1.ts b/packages/google-cloud-bigquery-dataexchange/test/gapic_analytics_hub_service_v1beta1.ts index d282a2f4e31..47cc4c8b5bb 100644 --- a/packages/google-cloud-bigquery-dataexchange/test/gapic_analytics_hub_service_v1beta1.ts +++ b/packages/google-cloud-bigquery-dataexchange/test/gapic_analytics_hub_service_v1beta1.ts @@ -268,7 +268,9 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.analyticsHubServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest() ); @@ -363,7 +365,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest() ); @@ -411,7 +413,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest() ); @@ -443,7 +445,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest() ); @@ -465,7 +467,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest() ); @@ -498,7 +500,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest() ); @@ -546,7 +548,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest() ); @@ -578,7 +580,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest() ); @@ -600,7 +602,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest() ); @@ -634,7 +636,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest() ); @@ -683,7 +685,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest() ); @@ -716,7 +718,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest() ); @@ -739,7 +741,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest() ); @@ -772,7 +774,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest() ); @@ -820,7 +822,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest() ); @@ -852,7 +854,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest() ); @@ -874,7 +876,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest() ); @@ -906,7 +908,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest() ); @@ -954,7 +956,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest() ); @@ -986,7 +988,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest() ); @@ -1008,7 +1010,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest() ); @@ -1040,7 +1042,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest() ); @@ -1088,7 +1090,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest() ); @@ -1120,7 +1122,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest() ); @@ -1142,7 +1144,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest() ); @@ -1175,7 +1177,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest() ); @@ -1224,7 +1226,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest() ); @@ -1257,7 +1259,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest() ); @@ -1280,7 +1282,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest() ); @@ -1312,7 +1314,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest() ); @@ -1360,7 +1362,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest() ); @@ -1392,7 +1394,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest() ); @@ -1414,7 +1416,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest() ); @@ -1446,7 +1448,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest() ); @@ -1494,7 +1496,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest() ); @@ -1526,7 +1528,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest() ); @@ -1548,7 +1550,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1580,7 +1582,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1628,7 +1630,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1660,7 +1662,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1682,7 +1684,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1714,7 +1716,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1762,7 +1764,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1794,7 +1796,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1816,7 +1818,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1849,7 +1851,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1897,7 +1899,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1929,7 +1931,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1951,7 +1953,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest() ); @@ -1991,7 +1993,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest() ); @@ -2049,7 +2051,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest() ); @@ -2081,7 +2083,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest() ); @@ -2145,7 +2147,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest() ); @@ -2198,7 +2200,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest() ); @@ -2249,7 +2251,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest() ); @@ -2293,7 +2295,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest() ); @@ -2334,7 +2336,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest() ); @@ -2392,7 +2394,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest() ); @@ -2424,7 +2426,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest() ); @@ -2488,7 +2490,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest() ); @@ -2541,7 +2543,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest() ); @@ -2592,7 +2594,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest() ); @@ -2636,7 +2638,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest() ); @@ -2676,7 +2678,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest() ); @@ -2734,7 +2736,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest() ); @@ -2766,7 +2768,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest() ); @@ -2830,7 +2832,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest() ); @@ -2885,7 +2887,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest() ); @@ -2936,7 +2938,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest() ); @@ -2979,7 +2981,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3010,7 +3012,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3055,7 +3057,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3091,7 +3093,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3140,7 +3142,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3177,7 +3179,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { }); describe('Path templates', () => { - describe('dataExchange', () => { + describe('dataExchange', async () => { const fakePath = '/rendered/path/dataExchange'; const expectedParameters = { project: 'projectValue', @@ -3189,7 +3191,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataExchangePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3242,7 +3244,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { }); }); - describe('listing', () => { + describe('listing', async () => { const fakePath = '/rendered/path/listing'; const expectedParameters = { project: 'projectValue', @@ -3255,7 +3257,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.listingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3319,7 +3321,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3330,7 +3332,7 @@ describe('v1beta1.AnalyticsHubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-datapolicies/package.json b/packages/google-cloud-bigquery-datapolicies/package.json index db3fab3b1c8..224e51847f0 100644 --- a/packages/google-cloud-bigquery-datapolicies/package.json +++ b/packages/google-cloud-bigquery-datapolicies/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json index 6c697030aa6..f218a307fe5 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json index 3a2b3fe7140..c151d89340d 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json index f97750c227c..261865116b8 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json index f97750c227c..261865116b8 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/src/v1/data_policy_service_client.ts b/packages/google-cloud-bigquery-datapolicies/src/v1/data_policy_service_client.ts index b98568cb582..75110b25059 100644 --- a/packages/google-cloud-bigquery-datapolicies/src/v1/data_policy_service_client.ts +++ b/packages/google-cloud-bigquery-datapolicies/src/v1/data_policy_service_client.ts @@ -499,7 +499,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -635,7 +637,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_policy.name': request.dataPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -763,7 +767,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('renameDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -889,7 +895,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -1015,7 +1023,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -1130,7 +1140,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1248,7 +1260,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1360,7 +1374,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1495,7 +1511,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.datapolicies.v1.IListDataPoliciesRequest, @@ -1573,7 +1591,9 @@ export class DataPolicyServiceClient { }); const defaultCallSettings = this._defaults['listDataPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataPolicies stream %j', request); return this.descriptors.page.listDataPolicies.createStream( this.innerApiCalls.listDataPolicies as GaxCall, @@ -1633,7 +1653,9 @@ export class DataPolicyServiceClient { }); const defaultCallSettings = this._defaults['listDataPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataPolicies iterate %j', request); return this.descriptors.page.listDataPolicies.asyncIterate( this.innerApiCalls['listDataPolicies'] as GaxCall, diff --git a/packages/google-cloud-bigquery-datapolicies/src/v1beta1/data_policy_service_client.ts b/packages/google-cloud-bigquery-datapolicies/src/v1beta1/data_policy_service_client.ts index e7683c385a7..09cb296ff22 100644 --- a/packages/google-cloud-bigquery-datapolicies/src/v1beta1/data_policy_service_client.ts +++ b/packages/google-cloud-bigquery-datapolicies/src/v1beta1/data_policy_service_client.ts @@ -495,7 +495,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -631,7 +633,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_policy.name': request.dataPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -757,7 +761,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -883,7 +889,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataPolicy request %j', request); const wrappedCallback: | Callback< @@ -998,7 +1006,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1116,7 +1126,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1228,7 +1240,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1354,7 +1368,9 @@ export class DataPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.datapolicies.v1beta1.IListDataPoliciesRequest, @@ -1423,7 +1439,9 @@ export class DataPolicyServiceClient { }); const defaultCallSettings = this._defaults['listDataPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataPolicies stream %j', request); return this.descriptors.page.listDataPolicies.createStream( this.innerApiCalls.listDataPolicies as GaxCall, @@ -1474,7 +1492,9 @@ export class DataPolicyServiceClient { }); const defaultCallSettings = this._defaults['listDataPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataPolicies iterate %j', request); return this.descriptors.page.listDataPolicies.asyncIterate( this.innerApiCalls['listDataPolicies'] as GaxCall, diff --git a/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1.ts b/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1.ts index bcb03f70540..560a3099f7e 100644 --- a/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1.ts +++ b/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1.ts @@ -256,7 +256,9 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataPolicyServiceStub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest() ); @@ -346,7 +348,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest() ); @@ -393,7 +395,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest() ); @@ -424,7 +426,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest() ); @@ -445,7 +447,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest() ); @@ -477,7 +479,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest() ); @@ -525,7 +527,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest() ); @@ -557,7 +559,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest() ); @@ -579,7 +581,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest() ); @@ -610,7 +612,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest() ); @@ -657,7 +659,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest() ); @@ -688,7 +690,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest() ); @@ -709,7 +711,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest() ); @@ -740,7 +742,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest() ); @@ -787,7 +789,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest() ); @@ -818,7 +820,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest() ); @@ -839,7 +841,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest() ); @@ -870,7 +872,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest() ); @@ -917,7 +919,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest() ); @@ -948,7 +950,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest() ); @@ -969,7 +971,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1000,7 +1002,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1047,7 +1049,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1078,7 +1080,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1208,7 +1210,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1261,7 +1263,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest() ); @@ -1399,7 +1401,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest() ); @@ -1456,7 +1458,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest() ); @@ -1550,7 +1552,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest() ); @@ -1602,7 +1604,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest() ); @@ -1652,7 +1654,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest() ); @@ -1690,7 +1692,7 @@ describe('v1.DataPolicyServiceClient', () => { }); describe('Path templates', () => { - describe('dataPolicy', () => { + describe('dataPolicy', async () => { const fakePath = '/rendered/path/dataPolicy'; const expectedParameters = { project: 'projectValue', @@ -1701,7 +1703,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1754,7 +1756,7 @@ describe('v1.DataPolicyServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1764,7 +1766,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1803,7 +1805,7 @@ describe('v1.DataPolicyServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1812,7 +1814,7 @@ describe('v1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1beta1.ts b/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1beta1.ts index 7866486254f..c33f0a844e4 100644 --- a/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1beta1.ts +++ b/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v1beta1.ts @@ -265,7 +265,9 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataPolicyServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest() ); @@ -360,7 +362,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest() ); @@ -408,7 +410,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest() ); @@ -440,7 +442,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest() ); @@ -462,7 +464,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest() ); @@ -495,7 +497,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest() ); @@ -544,7 +546,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest() ); @@ -577,7 +579,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest() ); @@ -600,7 +602,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest() ); @@ -632,7 +634,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest() ); @@ -680,7 +682,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest() ); @@ -712,7 +714,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest() ); @@ -734,7 +736,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest() ); @@ -766,7 +768,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest() ); @@ -814,7 +816,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest() ); @@ -846,7 +848,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest() ); @@ -868,7 +870,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -900,7 +902,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -948,7 +950,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -980,7 +982,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1002,7 +1004,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1034,7 +1036,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1082,7 +1084,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1114,7 +1116,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1136,7 +1138,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1169,7 +1171,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1217,7 +1219,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1249,7 +1251,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1271,7 +1273,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest() ); @@ -1311,7 +1313,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest() ); @@ -1369,7 +1371,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest() ); @@ -1401,7 +1403,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest() ); @@ -1465,7 +1467,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest() ); @@ -1518,7 +1520,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest() ); @@ -1569,7 +1571,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest() ); @@ -1607,7 +1609,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { }); describe('Path templates', () => { - describe('dataPolicy', () => { + describe('dataPolicy', async () => { const fakePath = '/rendered/path/dataPolicy'; const expectedParameters = { project: 'projectValue', @@ -1619,7 +1621,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1672,7 +1674,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1683,7 +1685,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1722,7 +1724,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1732,7 +1734,7 @@ describe('v1beta1.DataPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-datatransfer/package.json b/packages/google-cloud-bigquery-datatransfer/package.json index 06726ce8360..8a2cee51ce5 100644 --- a/packages/google-cloud-bigquery-datatransfer/package.json +++ b/packages/google-cloud-bigquery-datatransfer/package.json @@ -49,7 +49,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json index c4f6f6f2893..4c5daae8d6c 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datatransfer", - "version": "4.4.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index c55154ecedd..b3196845065 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datatransfer", - "version": "4.4.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts b/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts index 0807198fa1a..5ceda4e3841 100644 --- a/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts +++ b/packages/google-cloud-bigquery-datatransfer/src/v1/data_transfer_service_client.ts @@ -536,7 +536,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataSource request %j', request); const wrappedCallback: | Callback< @@ -712,7 +714,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTransferConfig request %j', request); const wrappedCallback: | Callback< @@ -885,7 +889,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ 'transfer_config.name': request.transferConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTransferConfig request %j', request); const wrappedCallback: | Callback< @@ -1013,7 +1019,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTransferConfig request %j', request); const wrappedCallback: | Callback< @@ -1140,7 +1148,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTransferConfig request %j', request); const wrappedCallback: | Callback< @@ -1278,7 +1288,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTransferService-$ScheduleTransferRuns', 'ScheduleTransferRuns is deprecated and may be removed in a future version.', @@ -1423,7 +1435,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startManualTransferRuns request %j', request); const wrappedCallback: | Callback< @@ -1551,7 +1565,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTransferRun request %j', request); const wrappedCallback: | Callback< @@ -1679,7 +1695,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTransferRun request %j', request); const wrappedCallback: | Callback< @@ -1807,7 +1825,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkValidCreds request %j', request); const wrappedCallback: | Callback< @@ -1943,7 +1963,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enrollDataSources request %j', request); const wrappedCallback: | Callback< @@ -2076,7 +2098,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('unenrollDataSources request %j', request); const wrappedCallback: | Callback< @@ -2209,7 +2233,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, @@ -2280,7 +2306,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listDataSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataSources stream %j', request); return this.descriptors.page.listDataSources.createStream( this.innerApiCalls.listDataSources as GaxCall, @@ -2333,7 +2361,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listDataSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataSources iterate %j', request); return this.descriptors.page.listDataSources.asyncIterate( this.innerApiCalls['listDataSources'] as GaxCall, @@ -2444,7 +2474,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, @@ -2517,7 +2549,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listTransferConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferConfigs stream %j', request); return this.descriptors.page.listTransferConfigs.createStream( this.innerApiCalls.listTransferConfigs as GaxCall, @@ -2572,7 +2606,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listTransferConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferConfigs iterate %j', request); return this.descriptors.page.listTransferConfigs.asyncIterate( this.innerApiCalls['listTransferConfigs'] as GaxCall, @@ -2685,7 +2721,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.datatransfer.v1.IListTransferRunsRequest, @@ -2761,7 +2799,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listTransferRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferRuns stream %j', request); return this.descriptors.page.listTransferRuns.createStream( this.innerApiCalls.listTransferRuns as GaxCall, @@ -2819,7 +2859,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listTransferRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferRuns iterate %j', request); return this.descriptors.page.listTransferRuns.asyncIterate( this.innerApiCalls['listTransferRuns'] as GaxCall, @@ -2930,7 +2972,9 @@ export class DataTransferServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.datatransfer.v1.IListTransferLogsRequest, @@ -3004,7 +3048,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listTransferLogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferLogs stream %j', request); return this.descriptors.page.listTransferLogs.createStream( this.innerApiCalls.listTransferLogs as GaxCall, @@ -3060,7 +3106,9 @@ export class DataTransferServiceClient { }); const defaultCallSettings = this._defaults['listTransferLogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferLogs iterate %j', request); return this.descriptors.page.listTransferLogs.asyncIterate( this.innerApiCalls['listTransferLogs'] as GaxCall, diff --git a/packages/google-cloud-bigquery-datatransfer/test/gapic_data_transfer_service_v1.ts b/packages/google-cloud-bigquery-datatransfer/test/gapic_data_transfer_service_v1.ts index c74672f94ba..02aecf3a469 100644 --- a/packages/google-cloud-bigquery-datatransfer/test/gapic_data_transfer_service_v1.ts +++ b/packages/google-cloud-bigquery-datatransfer/test/gapic_data_transfer_service_v1.ts @@ -266,7 +266,9 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataTransferServiceStub); client.close().then(() => { done(); @@ -333,7 +335,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest() ); @@ -366,7 +368,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest() ); @@ -415,7 +417,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest() ); @@ -448,7 +450,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest() ); @@ -471,7 +473,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest() ); @@ -505,7 +507,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest() ); @@ -554,7 +556,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest() ); @@ -587,7 +589,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest() ); @@ -610,7 +612,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest() ); @@ -645,7 +647,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest() ); @@ -695,7 +697,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest() ); @@ -729,7 +731,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest() ); @@ -753,7 +755,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest() ); @@ -787,7 +789,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest() ); @@ -836,7 +838,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest() ); @@ -869,7 +871,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest() ); @@ -892,7 +894,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest() ); @@ -925,7 +927,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest() ); @@ -974,7 +976,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest() ); @@ -1007,7 +1009,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.DataTransferServiceClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest() ); @@ -1067,7 +1069,7 @@ describe('v1.DataTransferServiceClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.DataTransferServiceClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest() ); @@ -1153,7 +1155,7 @@ describe('v1.DataTransferServiceClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest() ); @@ -1322,7 +1324,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest() ); @@ -1355,7 +1357,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest() ); @@ -1404,7 +1406,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest() ); @@ -1437,7 +1439,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest() ); @@ -1493,7 +1495,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest() ); @@ -1542,7 +1544,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest() ); @@ -1575,7 +1577,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest() ); @@ -1598,7 +1600,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest() ); @@ -1631,7 +1633,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest() ); @@ -1680,7 +1682,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest() ); @@ -1713,7 +1715,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest() ); @@ -1769,7 +1771,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest() ); @@ -1818,7 +1820,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest() ); @@ -1851,7 +1853,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest() ); @@ -1874,7 +1876,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest() ); @@ -1908,7 +1910,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest() ); @@ -1957,7 +1959,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest() ); @@ -1990,7 +1992,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest() ); @@ -2013,7 +2015,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest() ); @@ -2054,7 +2056,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest() ); @@ -2113,7 +2115,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest() ); @@ -2146,7 +2148,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest() ); @@ -2211,7 +2213,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest() ); @@ -2265,7 +2267,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest() ); @@ -2317,7 +2319,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest() ); @@ -2362,7 +2364,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest() ); @@ -2404,7 +2406,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest() ); @@ -2463,7 +2465,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest() ); @@ -2496,7 +2498,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest() ); @@ -2561,7 +2563,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest() ); @@ -2615,7 +2617,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest() ); @@ -2667,7 +2669,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest() ); @@ -2712,7 +2714,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest() ); @@ -2753,7 +2755,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest() ); @@ -2812,7 +2814,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest() ); @@ -2845,7 +2847,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest() ); @@ -2910,7 +2912,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest() ); @@ -2964,7 +2966,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest() ); @@ -3016,7 +3018,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest() ); @@ -3061,7 +3063,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest() ); @@ -3102,7 +3104,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest() ); @@ -3161,7 +3163,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest() ); @@ -3194,7 +3196,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest() ); @@ -3259,7 +3261,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest() ); @@ -3313,7 +3315,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest() ); @@ -3365,7 +3367,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest() ); @@ -3409,7 +3411,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3441,7 +3443,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3487,7 +3489,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3524,7 +3526,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3574,7 +3576,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3611,7 +3613,7 @@ describe('v1.DataTransferServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3622,7 +3624,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3651,7 +3653,7 @@ describe('v1.DataTransferServiceClient', () => { }); }); - describe('projectDataSource', () => { + describe('projectDataSource', async () => { const fakePath = '/rendered/path/projectDataSource'; const expectedParameters = { project: 'projectValue', @@ -3663,7 +3665,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectDataSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3715,7 +3717,7 @@ describe('v1.DataTransferServiceClient', () => { }); }); - describe('projectLocationDataSource', () => { + describe('projectLocationDataSource', async () => { const fakePath = '/rendered/path/projectLocationDataSource'; const expectedParameters = { project: 'projectValue', @@ -3728,7 +3730,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3796,7 +3798,7 @@ describe('v1.DataTransferServiceClient', () => { }); }); - describe('projectLocationTransferConfig', () => { + describe('projectLocationTransferConfig', async () => { const fakePath = '/rendered/path/projectLocationTransferConfig'; const expectedParameters = { project: 'projectValue', @@ -3809,7 +3811,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationTransferConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationTransferConfigPathTemplate.match = @@ -3877,7 +3879,7 @@ describe('v1.DataTransferServiceClient', () => { }); }); - describe('projectLocationTransferConfigRun', () => { + describe('projectLocationTransferConfigRun', async () => { const fakePath = '/rendered/path/projectLocationTransferConfigRun'; const expectedParameters = { project: 'projectValue', @@ -3891,7 +3893,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationTransferConfigRunPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationTransferConfigRunPathTemplate.match = @@ -3976,7 +3978,7 @@ describe('v1.DataTransferServiceClient', () => { }); }); - describe('projectTransferConfig', () => { + describe('projectTransferConfig', async () => { const fakePath = '/rendered/path/projectTransferConfig'; const expectedParameters = { project: 'projectValue', @@ -3988,7 +3990,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTransferConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4041,7 +4043,7 @@ describe('v1.DataTransferServiceClient', () => { }); }); - describe('projectTransferConfigRun', () => { + describe('projectTransferConfigRun', async () => { const fakePath = '/rendered/path/projectTransferConfigRun'; const expectedParameters = { project: 'projectValue', @@ -4054,7 +4056,7 @@ describe('v1.DataTransferServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTransferConfigRunPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-migration/package.json b/packages/google-cloud-bigquery-migration/package.json index 0a72229b962..c8878e54b35 100644 --- a/packages/google-cloud-bigquery-migration/package.json +++ b/packages/google-cloud-bigquery-migration/package.json @@ -43,7 +43,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json index a4b00b0d096..614b64219d7 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json index a4b00b0d096..614b64219d7 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json index 1256b2096a6..b49ddab5e85 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json index 1256b2096a6..b49ddab5e85 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/src/v2/migration_service_client.ts b/packages/google-cloud-bigquery-migration/src/v2/migration_service_client.ts index d94b91d2e5c..72e0b1e49e0 100644 --- a/packages/google-cloud-bigquery-migration/src/v2/migration_service_client.ts +++ b/packages/google-cloud-bigquery-migration/src/v2/migration_service_client.ts @@ -494,7 +494,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -622,7 +624,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -748,7 +752,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -877,7 +883,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -1005,7 +1013,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMigrationSubtask request %j', request); const wrappedCallback: | Callback< @@ -1140,7 +1150,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, @@ -1213,7 +1225,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationWorkflows stream %j', request); return this.descriptors.page.listMigrationWorkflows.createStream( this.innerApiCalls.listMigrationWorkflows as GaxCall, @@ -1268,7 +1282,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationWorkflows iterate %j', request); return this.descriptors.page.listMigrationWorkflows.asyncIterate( this.innerApiCalls['listMigrationWorkflows'] as GaxCall, @@ -1382,7 +1398,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, @@ -1459,7 +1477,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationSubtasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationSubtasks stream %j', request); return this.descriptors.page.listMigrationSubtasks.createStream( this.innerApiCalls.listMigrationSubtasks as GaxCall, @@ -1518,7 +1538,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationSubtasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationSubtasks iterate %j', request); return this.descriptors.page.listMigrationSubtasks.asyncIterate( this.innerApiCalls['listMigrationSubtasks'] as GaxCall, diff --git a/packages/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts b/packages/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts index ecdba508e27..79a85122512 100644 --- a/packages/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts +++ b/packages/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts @@ -494,7 +494,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -622,7 +624,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -748,7 +752,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -877,7 +883,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startMigrationWorkflow request %j', request); const wrappedCallback: | Callback< @@ -1005,7 +1013,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMigrationSubtask request %j', request); const wrappedCallback: | Callback< @@ -1140,7 +1150,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, @@ -1213,7 +1225,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationWorkflows stream %j', request); return this.descriptors.page.listMigrationWorkflows.createStream( this.innerApiCalls.listMigrationWorkflows as GaxCall, @@ -1268,7 +1282,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationWorkflows iterate %j', request); return this.descriptors.page.listMigrationWorkflows.asyncIterate( this.innerApiCalls['listMigrationWorkflows'] as GaxCall, @@ -1382,7 +1398,9 @@ export class MigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, @@ -1459,7 +1477,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationSubtasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationSubtasks stream %j', request); return this.descriptors.page.listMigrationSubtasks.createStream( this.innerApiCalls.listMigrationSubtasks as GaxCall, @@ -1518,7 +1538,9 @@ export class MigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationSubtasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationSubtasks iterate %j', request); return this.descriptors.page.listMigrationSubtasks.asyncIterate( this.innerApiCalls['listMigrationSubtasks'] as GaxCall, diff --git a/packages/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts b/packages/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts index ff1b2f1dc4f..fb66b04fe31 100644 --- a/packages/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts +++ b/packages/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts @@ -471,7 +471,9 @@ export class SqlTranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('translateQuery request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts b/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts index a5d0201303f..eba6a11ca93 100644 --- a/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts +++ b/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts @@ -255,7 +255,9 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.migrationServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest() ); @@ -346,7 +348,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest() ); @@ -393,7 +395,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest() ); @@ -427,7 +429,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest() ); @@ -451,7 +453,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest() ); @@ -483,7 +485,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest() ); @@ -530,7 +532,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest() ); @@ -561,7 +563,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest() ); @@ -582,7 +584,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest() ); @@ -614,7 +616,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest() ); @@ -661,7 +663,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest() ); @@ -695,7 +697,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest() ); @@ -719,7 +721,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest() ); @@ -751,7 +753,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest() ); @@ -798,7 +800,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest() ); @@ -832,7 +834,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest() ); @@ -856,7 +858,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest() ); @@ -888,7 +890,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest() ); @@ -935,7 +937,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest() ); @@ -966,7 +968,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest() ); @@ -987,7 +989,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest() ); @@ -1027,7 +1029,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest() ); @@ -1084,7 +1086,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest() ); @@ -1118,7 +1120,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest() ); @@ -1187,7 +1189,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest() ); @@ -1245,7 +1247,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest() ); @@ -1299,7 +1301,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest() ); @@ -1346,7 +1348,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest() ); @@ -1386,7 +1388,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest() ); @@ -1443,7 +1445,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest() ); @@ -1477,7 +1479,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest() ); @@ -1546,7 +1548,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest() ); @@ -1604,7 +1606,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest() ); @@ -1658,7 +1660,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest() ); @@ -1700,7 +1702,7 @@ describe('v2.MigrationServiceClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1710,7 +1712,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1749,7 +1751,7 @@ describe('v2.MigrationServiceClient', () => { }); }); - describe('migrationSubtask', () => { + describe('migrationSubtask', async () => { const fakePath = '/rendered/path/migrationSubtask'; const expectedParameters = { project: 'projectValue', @@ -1761,7 +1763,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migrationSubtaskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1828,7 +1830,7 @@ describe('v2.MigrationServiceClient', () => { }); }); - describe('migrationWorkflow', () => { + describe('migrationWorkflow', async () => { const fakePath = '/rendered/path/migrationWorkflow'; const expectedParameters = { project: 'projectValue', @@ -1839,7 +1841,7 @@ describe('v2.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migrationWorkflowPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts b/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts index fded8a3ddc5..9c45b4dd0d4 100644 --- a/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts +++ b/packages/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts @@ -260,7 +260,9 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.migrationServiceStub); client.close().then(() => { done(); @@ -319,7 +321,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest() ); @@ -351,7 +353,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest() ); @@ -398,7 +400,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest() ); @@ -432,7 +434,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest() ); @@ -456,7 +458,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest() ); @@ -488,7 +490,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest() ); @@ -535,7 +537,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest() ); @@ -566,7 +568,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest() ); @@ -587,7 +589,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest() ); @@ -619,7 +621,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest() ); @@ -666,7 +668,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest() ); @@ -700,7 +702,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest() ); @@ -724,7 +726,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest() ); @@ -756,7 +758,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest() ); @@ -803,7 +805,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest() ); @@ -837,7 +839,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest() ); @@ -861,7 +863,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest() ); @@ -893,7 +895,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest() ); @@ -940,7 +942,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest() ); @@ -971,7 +973,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest() ); @@ -992,7 +994,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest() ); @@ -1032,7 +1034,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest() ); @@ -1089,7 +1091,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest() ); @@ -1123,7 +1125,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest() ); @@ -1192,7 +1194,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest() ); @@ -1250,7 +1252,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest() ); @@ -1304,7 +1306,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest() ); @@ -1351,7 +1353,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest() ); @@ -1391,7 +1393,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest() ); @@ -1448,7 +1450,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest() ); @@ -1482,7 +1484,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest() ); @@ -1551,7 +1553,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest() ); @@ -1609,7 +1611,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest() ); @@ -1663,7 +1665,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest() ); @@ -1705,7 +1707,7 @@ describe('v2alpha.MigrationServiceClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1715,7 +1717,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1754,7 +1756,7 @@ describe('v2alpha.MigrationServiceClient', () => { }); }); - describe('migrationSubtask', () => { + describe('migrationSubtask', async () => { const fakePath = '/rendered/path/migrationSubtask'; const expectedParameters = { project: 'projectValue', @@ -1766,7 +1768,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migrationSubtaskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1833,7 +1835,7 @@ describe('v2alpha.MigrationServiceClient', () => { }); }); - describe('migrationWorkflow', () => { + describe('migrationWorkflow', async () => { const fakePath = '/rendered/path/migrationWorkflow'; const expectedParameters = { project: 'projectValue', @@ -1844,7 +1846,7 @@ describe('v2alpha.MigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migrationWorkflowPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts b/packages/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts index 2962551b1b0..66ed8d75778 100644 --- a/packages/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts +++ b/packages/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts @@ -205,7 +205,9 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlTranslationServiceStub); client.close().then(() => { done(); @@ -268,7 +270,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest() ); @@ -300,7 +302,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest() ); @@ -348,7 +350,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest() ); @@ -380,7 +382,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest() ); @@ -396,7 +398,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -407,7 +409,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -446,7 +448,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { }); }); - describe('migrationSubtask', () => { + describe('migrationSubtask', async () => { const fakePath = '/rendered/path/migrationSubtask'; const expectedParameters = { project: 'projectValue', @@ -459,7 +461,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migrationSubtaskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -526,7 +528,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { }); }); - describe('migrationWorkflow', () => { + describe('migrationWorkflow', async () => { const fakePath = '/rendered/path/migrationWorkflow'; const expectedParameters = { project: 'projectValue', @@ -538,7 +540,7 @@ describe('v2alpha.SqlTranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migrationWorkflowPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-bigquery-reservation/package.json b/packages/google-cloud-bigquery-reservation/package.json index 5cae87a36c1..f23a7ec8fed 100644 --- a/packages/google-cloud-bigquery-reservation/package.json +++ b/packages/google-cloud-bigquery-reservation/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json index 1d7b2f801f2..0850517881a 100644 --- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json +++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-reservation", - "version": "3.5.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json index 0d5e13bd439..be89853ce53 100644 --- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json +++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-reservation", - "version": "3.5.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts b/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts index 20aefd96b90..4f57af072b5 100644 --- a/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts +++ b/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts @@ -557,7 +557,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReservation request %j', request); const wrappedCallback: | Callback< @@ -683,7 +685,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReservation request %j', request); const wrappedCallback: | Callback< @@ -811,7 +815,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteReservation request %j', request); const wrappedCallback: | Callback< @@ -938,7 +944,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ 'reservation.name': request.reservation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateReservation request %j', request); const wrappedCallback: | Callback< @@ -1068,7 +1076,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('failoverReservation request %j', request); const wrappedCallback: | Callback< @@ -1205,7 +1215,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCapacityCommitment request %j', request); const wrappedCallback: | Callback< @@ -1331,7 +1343,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCapacityCommitment request %j', request); const wrappedCallback: | Callback< @@ -1463,7 +1477,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCapacityCommitment request %j', request); const wrappedCallback: | Callback< @@ -1596,7 +1612,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ 'capacity_commitment.name': request.capacityCommitment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCapacityCommitment request %j', request); const wrappedCallback: | Callback< @@ -1731,7 +1749,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('splitCapacityCommitment request %j', request); const wrappedCallback: | Callback< @@ -1869,7 +1889,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('mergeCapacityCommitments request %j', request); const wrappedCallback: | Callback< @@ -2036,7 +2058,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAssignment request %j', request); const wrappedCallback: | Callback< @@ -2176,7 +2200,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAssignment request %j', request); const wrappedCallback: | Callback< @@ -2316,7 +2342,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moveAssignment request %j', request); const wrappedCallback: | Callback< @@ -2445,7 +2473,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ 'assignment.name': request.assignment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAssignment request %j', request); const wrappedCallback: | Callback< @@ -2571,7 +2601,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBiReservation request %j', request); const wrappedCallback: | Callback< @@ -2705,7 +2737,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ 'bi_reservation.name': request.biReservation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBiReservation request %j', request); const wrappedCallback: | Callback< @@ -2833,7 +2867,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest, @@ -2899,7 +2935,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['listReservations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReservations stream %j', request); return this.descriptors.page.listReservations.createStream( this.innerApiCalls.listReservations as GaxCall, @@ -2947,7 +2985,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['listReservations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReservations iterate %j', request); return this.descriptors.page.listReservations.asyncIterate( this.innerApiCalls['listReservations'] as GaxCall, @@ -3050,7 +3090,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.reservation.v1.IListCapacityCommitmentsRequest, @@ -3116,7 +3158,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['listCapacityCommitments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCapacityCommitments stream %j', request); return this.descriptors.page.listCapacityCommitments.createStream( this.innerApiCalls.listCapacityCommitments as GaxCall, @@ -3164,7 +3208,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['listCapacityCommitments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCapacityCommitments iterate %j', request); return this.descriptors.page.listCapacityCommitments.asyncIterate( this.innerApiCalls['listCapacityCommitments'] as GaxCall, @@ -3292,7 +3338,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest, @@ -3363,7 +3411,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['listAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssignments stream %j', request); return this.descriptors.page.listAssignments.createStream( this.innerApiCalls.listAssignments as GaxCall, @@ -3416,7 +3466,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['listAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssignments iterate %j', request); return this.descriptors.page.listAssignments.asyncIterate( this.innerApiCalls['listAssignments'] as GaxCall, @@ -3551,7 +3603,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ReservationService-$SearchAssignments', 'SearchAssignments is deprecated and may be removed in a future version.', @@ -3632,7 +3686,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['searchAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ReservationService-$SearchAssignments', 'SearchAssignments is deprecated and may be removed in a future version.', @@ -3695,7 +3751,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['searchAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ReservationService-$SearchAssignments', 'SearchAssignments is deprecated and may be removed in a future version.', @@ -3831,7 +3889,9 @@ export class ReservationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest, @@ -3906,7 +3966,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['searchAllAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllAssignments stream %j', request); return this.descriptors.page.searchAllAssignments.createStream( this.innerApiCalls.searchAllAssignments as GaxCall, @@ -3963,7 +4025,9 @@ export class ReservationServiceClient { }); const defaultCallSettings = this._defaults['searchAllAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAllAssignments iterate %j', request); return this.descriptors.page.searchAllAssignments.asyncIterate( this.innerApiCalls['searchAllAssignments'] as GaxCall, diff --git a/packages/google-cloud-bigquery-reservation/test/gapic_reservation_service_v1.ts b/packages/google-cloud-bigquery-reservation/test/gapic_reservation_service_v1.ts index 968609a50f0..78430cfa8db 100644 --- a/packages/google-cloud-bigquery-reservation/test/gapic_reservation_service_v1.ts +++ b/packages/google-cloud-bigquery-reservation/test/gapic_reservation_service_v1.ts @@ -257,7 +257,9 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.reservationServiceStub); client.close().then(() => { done(); @@ -316,7 +318,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateReservationRequest() ); @@ -347,7 +349,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateReservationRequest() ); @@ -394,7 +396,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateReservationRequest() ); @@ -425,7 +427,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateReservationRequest() ); @@ -446,7 +448,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetReservationRequest() ); @@ -477,7 +479,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetReservationRequest() ); @@ -524,7 +526,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetReservationRequest() ); @@ -555,7 +557,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetReservationRequest() ); @@ -576,7 +578,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteReservationRequest() ); @@ -607,7 +609,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteReservationRequest() ); @@ -654,7 +656,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteReservationRequest() ); @@ -685,7 +687,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteReservationRequest() ); @@ -706,7 +708,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateReservationRequest() ); @@ -738,7 +740,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateReservationRequest() ); @@ -786,7 +788,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateReservationRequest() ); @@ -818,7 +820,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateReservationRequest() ); @@ -840,7 +842,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.FailoverReservationRequest() ); @@ -872,7 +874,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.FailoverReservationRequest() ); @@ -919,7 +921,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.FailoverReservationRequest() ); @@ -950,7 +952,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.FailoverReservationRequest() ); @@ -971,7 +973,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest() ); @@ -1050,7 +1052,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest() ); @@ -1084,7 +1086,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest() ); @@ -1108,7 +1110,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest() ); @@ -1140,7 +1142,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest() ); @@ -1187,7 +1189,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest() ); @@ -1221,7 +1223,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest() ); @@ -1245,7 +1247,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest() ); @@ -1324,7 +1326,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest() ); @@ -1415,7 +1417,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest() ); @@ -1463,7 +1465,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest() ); @@ -1498,7 +1500,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest() ); @@ -1523,7 +1525,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest() ); @@ -1555,7 +1557,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest() ); @@ -1602,7 +1604,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest() ); @@ -1636,7 +1638,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest() ); @@ -1660,7 +1662,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest() ); @@ -1692,7 +1694,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest() ); @@ -1739,7 +1741,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest() ); @@ -1773,7 +1775,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest() ); @@ -1797,7 +1799,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateAssignmentRequest() ); @@ -1828,7 +1830,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateAssignmentRequest() ); @@ -1875,7 +1877,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateAssignmentRequest() ); @@ -1906,7 +1908,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.CreateAssignmentRequest() ); @@ -1927,7 +1929,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest() ); @@ -1958,7 +1960,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest() ); @@ -2005,7 +2007,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest() ); @@ -2036,7 +2038,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest() ); @@ -2057,7 +2059,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest() ); @@ -2088,7 +2090,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest() ); @@ -2135,7 +2137,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest() ); @@ -2166,7 +2168,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest() ); @@ -2187,7 +2189,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest() ); @@ -2219,7 +2221,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest() ); @@ -2267,7 +2269,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest() ); @@ -2299,7 +2301,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest() ); @@ -2321,7 +2323,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetBiReservationRequest() ); @@ -2352,7 +2354,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetBiReservationRequest() ); @@ -2399,7 +2401,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetBiReservationRequest() ); @@ -2430,7 +2432,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.GetBiReservationRequest() ); @@ -2451,7 +2453,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest() ); @@ -2484,7 +2486,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest() ); @@ -2532,7 +2534,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest() ); @@ -2564,7 +2566,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest() ); @@ -2586,7 +2588,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListReservationsRequest() ); @@ -2625,7 +2627,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListReservationsRequest() ); @@ -2682,7 +2684,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListReservationsRequest() ); @@ -2713,7 +2715,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListReservationsRequest() ); @@ -2776,7 +2778,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListReservationsRequest() ); @@ -2828,7 +2830,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListReservationsRequest() ); @@ -2878,7 +2880,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListReservationsRequest() ); @@ -2921,7 +2923,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest() ); @@ -2961,7 +2963,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest() ); @@ -3018,7 +3020,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest() ); @@ -3052,7 +3054,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest() ); @@ -3121,7 +3123,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest() ); @@ -3179,7 +3181,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest() ); @@ -3233,7 +3235,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest() ); @@ -3280,7 +3282,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest() ); @@ -3319,7 +3321,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest() ); @@ -3376,7 +3378,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest() ); @@ -3407,7 +3409,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest() ); @@ -3470,7 +3472,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest() ); @@ -3522,7 +3524,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest() ); @@ -3572,7 +3574,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest() ); @@ -3616,7 +3618,7 @@ describe('v1.ReservationServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest() ); @@ -3657,7 +3659,7 @@ describe('v1.ReservationServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest() ); @@ -3716,7 +3718,7 @@ describe('v1.ReservationServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest() ); @@ -3749,7 +3751,7 @@ describe('v1.ReservationServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest() ); @@ -3814,7 +3816,7 @@ describe('v1.ReservationServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest() ); @@ -3868,7 +3870,7 @@ describe('v1.ReservationServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest() ); @@ -3920,7 +3922,7 @@ describe('v1.ReservationServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest() ); @@ -3964,7 +3966,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest() ); @@ -4004,7 +4006,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest() ); @@ -4061,7 +4063,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest() ); @@ -4092,7 +4094,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest() ); @@ -4155,7 +4157,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest() ); @@ -4207,7 +4209,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest() ); @@ -4257,7 +4259,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest() ); @@ -4295,7 +4297,7 @@ describe('v1.ReservationServiceClient', () => { }); describe('Path templates', () => { - describe('assignment', () => { + describe('assignment', async () => { const fakePath = '/rendered/path/assignment'; const expectedParameters = { project: 'projectValue', @@ -4307,7 +4309,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assignmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4371,7 +4373,7 @@ describe('v1.ReservationServiceClient', () => { }); }); - describe('biReservation', () => { + describe('biReservation', async () => { const fakePath = '/rendered/path/biReservation'; const expectedParameters = { project: 'projectValue', @@ -4381,7 +4383,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.biReservationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4423,7 +4425,7 @@ describe('v1.ReservationServiceClient', () => { }); }); - describe('capacityCommitment', () => { + describe('capacityCommitment', async () => { const fakePath = '/rendered/path/capacityCommitment'; const expectedParameters = { project: 'projectValue', @@ -4434,7 +4436,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.capacityCommitmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4500,7 +4502,7 @@ describe('v1.ReservationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4510,7 +4512,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4549,7 +4551,7 @@ describe('v1.ReservationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4558,7 +4560,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4587,7 +4589,7 @@ describe('v1.ReservationServiceClient', () => { }); }); - describe('reservation', () => { + describe('reservation', async () => { const fakePath = '/rendered/path/reservation'; const expectedParameters = { project: 'projectValue', @@ -4598,7 +4600,7 @@ describe('v1.ReservationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reservationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json index 698ff9fff00..e8f8d86abd2 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "5.4.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json index e31b6441fdf..e8ac1b629f1 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "5.4.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json index 4cee6107434..fcfdc5db7e7 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "5.4.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json index 2ac0b3e900e..fa076e0f358 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "5.4.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/src/v1/budget_service_client.ts b/packages/google-cloud-billing-budgets/src/v1/budget_service_client.ts index 3687c50d162..fd3a1287e4a 100644 --- a/packages/google-cloud-billing-budgets/src/v1/budget_service_client.ts +++ b/packages/google-cloud-billing-budgets/src/v1/budget_service_client.ts @@ -486,7 +486,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBudget request %j', request); const wrappedCallback: | Callback< @@ -617,7 +619,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ 'budget.name': request.budget!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBudget request %j', request); const wrappedCallback: | Callback< @@ -742,7 +746,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBudget request %j', request); const wrappedCallback: | Callback< @@ -859,7 +865,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBudget request %j', request); const wrappedCallback: | Callback< @@ -1002,7 +1010,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.billing.budgets.v1.IListBudgetsRequest, @@ -1078,7 +1088,9 @@ export class BudgetServiceClient { }); const defaultCallSettings = this._defaults['listBudgets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBudgets stream %j', request); return this.descriptors.page.listBudgets.createStream( this.innerApiCalls.listBudgets as GaxCall, @@ -1136,7 +1148,9 @@ export class BudgetServiceClient { }); const defaultCallSettings = this._defaults['listBudgets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBudgets iterate %j', request); return this.descriptors.page.listBudgets.asyncIterate( this.innerApiCalls['listBudgets'] as GaxCall, diff --git a/packages/google-cloud-billing-budgets/src/v1beta1/budget_service_client.ts b/packages/google-cloud-billing-budgets/src/v1beta1/budget_service_client.ts index e5b42a81d2b..7c8b55c9e18 100644 --- a/packages/google-cloud-billing-budgets/src/v1beta1/budget_service_client.ts +++ b/packages/google-cloud-billing-budgets/src/v1beta1/budget_service_client.ts @@ -493,7 +493,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBudget request %j', request); const wrappedCallback: | Callback< @@ -630,7 +632,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ 'budget.name': request.budget!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBudget request %j', request); const wrappedCallback: | Callback< @@ -755,7 +759,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBudget request %j', request); const wrappedCallback: | Callback< @@ -881,7 +887,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBudget request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1032,9 @@ export class BudgetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.billing.budgets.v1beta1.IListBudgetsRequest, @@ -1100,7 +1110,9 @@ export class BudgetServiceClient { }); const defaultCallSettings = this._defaults['listBudgets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBudgets stream %j', request); return this.descriptors.page.listBudgets.createStream( this.innerApiCalls.listBudgets as GaxCall, @@ -1158,7 +1170,9 @@ export class BudgetServiceClient { }); const defaultCallSettings = this._defaults['listBudgets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBudgets iterate %j', request); return this.descriptors.page.listBudgets.asyncIterate( this.innerApiCalls['listBudgets'] as GaxCall, diff --git a/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1.ts b/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1.ts index a926616d55f..648466405da 100644 --- a/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1.ts +++ b/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1.ts @@ -255,7 +255,9 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.budgetServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.CreateBudgetRequest() ); @@ -345,7 +347,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.CreateBudgetRequest() ); @@ -392,7 +394,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.CreateBudgetRequest() ); @@ -423,7 +425,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.CreateBudgetRequest() ); @@ -444,7 +446,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.UpdateBudgetRequest() ); @@ -476,7 +478,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.UpdateBudgetRequest() ); @@ -524,7 +526,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.UpdateBudgetRequest() ); @@ -556,7 +558,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.UpdateBudgetRequest() ); @@ -578,7 +580,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.GetBudgetRequest() ); @@ -609,7 +611,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.GetBudgetRequest() ); @@ -656,7 +658,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.GetBudgetRequest() ); @@ -684,7 +686,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.GetBudgetRequest() ); @@ -705,7 +707,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.DeleteBudgetRequest() ); @@ -736,7 +738,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.DeleteBudgetRequest() ); @@ -783,7 +785,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.DeleteBudgetRequest() ); @@ -814,7 +816,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.DeleteBudgetRequest() ); @@ -835,7 +837,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.ListBudgetsRequest() ); @@ -874,7 +876,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.ListBudgetsRequest() ); @@ -929,7 +931,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.ListBudgetsRequest() ); @@ -960,7 +962,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.ListBudgetsRequest() ); @@ -1020,7 +1022,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.ListBudgetsRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.ListBudgetsRequest() ); @@ -1120,7 +1122,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1.ListBudgetsRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.BudgetServiceClient', () => { }); describe('Path templates', () => { - describe('billingAccount', () => { + describe('billingAccount', async () => { const fakePath = '/rendered/path/billingAccount'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1168,7 +1170,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1198,7 +1200,7 @@ describe('v1.BudgetServiceClient', () => { }); }); - describe('budget', () => { + describe('budget', async () => { const fakePath = '/rendered/path/budget'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1208,7 +1210,7 @@ describe('v1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.budgetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1beta1.ts b/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1beta1.ts index 7eef5b8f6c3..74901ea6a96 100644 --- a/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1beta1.ts +++ b/packages/google-cloud-billing-budgets/test/gapic_budget_service_v1beta1.ts @@ -255,7 +255,9 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.budgetServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.CreateBudgetRequest() ); @@ -345,7 +347,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.CreateBudgetRequest() ); @@ -392,7 +394,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.CreateBudgetRequest() ); @@ -423,7 +425,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.CreateBudgetRequest() ); @@ -444,7 +446,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest() ); @@ -476,7 +478,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest() ); @@ -524,7 +526,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest() ); @@ -556,7 +558,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest() ); @@ -578,7 +580,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.GetBudgetRequest() ); @@ -609,7 +611,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.GetBudgetRequest() ); @@ -656,7 +658,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.GetBudgetRequest() ); @@ -684,7 +686,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.GetBudgetRequest() ); @@ -705,7 +707,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest() ); @@ -736,7 +738,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest() ); @@ -783,7 +785,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest() ); @@ -814,7 +816,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest() ); @@ -835,7 +837,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest() ); @@ -874,7 +876,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest() ); @@ -931,7 +933,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest() ); @@ -962,7 +964,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest() ); @@ -1023,7 +1025,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest() ); @@ -1075,7 +1077,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest() ); @@ -1125,7 +1127,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest() ); @@ -1165,7 +1167,7 @@ describe('v1beta1.BudgetServiceClient', () => { }); describe('Path templates', () => { - describe('billingAccount', () => { + describe('billingAccount', async () => { const fakePath = '/rendered/path/billingAccount'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1174,7 +1176,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1204,7 +1206,7 @@ describe('v1beta1.BudgetServiceClient', () => { }); }); - describe('budget', () => { + describe('budget', async () => { const fakePath = '/rendered/path/budget'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1214,7 +1216,7 @@ describe('v1beta1.BudgetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.budgetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-billing/package.json b/packages/google-cloud-billing/package.json index 381b035ad20..97b63e339c4 100644 --- a/packages/google-cloud-billing/package.json +++ b/packages/google-cloud-billing/package.json @@ -32,7 +32,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json index 6baa38d39a9..5f204afec51 100644 --- a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json +++ b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-billing", - "version": "4.6.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json index bb65faf8258..98ab049d508 100644 --- a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json +++ b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-billing", - "version": "4.6.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { From dcfc7b492a2ac3fb86b93ae1375bac1c5153d049 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:23:47 -0700 Subject: [PATCH 26/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdzdWl0ZWFkZG9ucy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWlhcC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWlkcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWlvdC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy1pbnZlbnRvcnkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWxhbmd1YWdlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWxpZmVzY2llbmNlcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWRpZGVudGl0aWVzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWRrYWZrYS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1lZGlhdHJhbnNsYXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1lbWNhY2hlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1lbW9yeXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1ldGFzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1pZ3JhdGlvbmNlbnRlci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vZGVsYXJtb3IvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldGFwcC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmtjb25uZWN0aXZpdHkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmttYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmtzZWN1cml0eS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- .../google-cloud-gsuiteaddons/package.json | 2 +- ...metadata.google.cloud.gsuiteaddons.v1.json | 2 +- ...metadata_google.cloud.gsuiteaddons.v1.json | 2 +- .../src/v1/g_suite_add_ons_client.ts | 44 +- .../test/gapic_g_suite_add_ons_v1.ts | 98 +-- packages/google-cloud-iap/package.json | 2 +- .../snippet_metadata.google.cloud.iap.v1.json | 2 +- .../snippet_metadata_google.cloud.iap.v1.json | 2 +- ...pet_metadata.google.cloud.iap.v1beta1.json | 2 +- ...pet_metadata_google.cloud.iap.v1beta1.json | 2 +- ...entity_aware_proxy_admin_service_client.ts | 48 +- ...ntity_aware_proxy_o_auth_service_client.ts | 40 +- ...ntity_aware_proxy_admin_v1_beta1_client.ts | 12 +- ...c_identity_aware_proxy_admin_service_v1.ts | 102 +-- ...tity_aware_proxy_admin_v1_beta1_v1beta1.ts | 28 +- ..._identity_aware_proxy_o_auth_service_v1.ts | 86 +- packages/google-cloud-ids/package.json | 2 +- .../snippet_metadata.google.cloud.ids.v1.json | 2 +- .../snippet_metadata_google.cloud.ids.v1.json | 2 +- .../google-cloud-ids/src/v1/i_d_s_client.ts | 24 +- .../google-cloud-ids/test/gapic_i_d_s_v1.ts | 62 +- packages/google-cloud-iot/package.json | 2 +- .../snippet_metadata.google.cloud.iot.v1.json | 2 +- .../snippet_metadata_google.cloud.iot.v1.json | 2 +- .../src/v1/device_manager_client.ts | 92 ++- .../test/gapic_device_manager_v1.ts | 180 +++-- .../google-cloud-kms-inventory/package.json | 2 +- ...etadata.google.cloud.kms.inventory.v1.json | 2 +- ...etadata_google.cloud.kms.inventory.v1.json | 2 +- .../src/v1/key_dashboard_service_client.ts | 12 +- .../src/v1/key_tracking_service_client.ts | 16 +- .../test/gapic_key_dashboard_service_v1.ts | 50 +- .../test/gapic_key_tracking_service_v1.ts | 58 +- packages/google-cloud-kms/package.json | 2 +- .../snippet_metadata.google.cloud.kms.v1.json | 2 +- .../snippet_metadata_google.cloud.kms.v1.json | 2 +- .../src/v1/autokey_admin_client.ts | 12 +- .../google-cloud-kms/src/v1/autokey_client.ts | 22 +- .../src/v1/ekm_service_client.ts | 36 +- .../src/v1/key_management_service_client.ts | 144 +++- .../test/gapic_autokey_admin_v1.ts | 96 +-- .../google-cloud-kms/test/gapic_autokey_v1.ts | 120 +-- .../test/gapic_ekm_service_v1.ts | 134 +-- .../test/gapic_key_management_service_v1.ts | 320 ++++---- packages/google-cloud-language/package.json | 2 +- ...pet_metadata.google.cloud.language.v1.json | 2 +- ...pet_metadata_google.cloud.language.v1.json | 2 +- ...etadata.google.cloud.language.v1beta2.json | 2 +- ...etadata_google.cloud.language.v1beta2.json | 2 +- ...pet_metadata_google.cloud.language.v2.json | 2 +- .../src/v1/language_service_client.ts | 28 +- .../src/v1beta2/language_service_client.ts | 28 +- .../src/v2/language_service_client.ts | 20 +- .../test/gapic_language_service_v1.ts | 60 +- .../test/gapic_language_service_v1beta2.ts | 60 +- .../test/gapic_language_service_v2.ts | 44 +- .../google-cloud-lifesciences/package.json | 2 +- ...data.google.cloud.lifesciences.v2beta.json | 2 +- ...data_google.cloud.lifesciences.v2beta.json | 2 +- .../workflows_service_v2_beta_client.ts | 6 +- .../gapic_workflows_service_v2_beta_v2beta.ts | 40 +- .../package.json | 2 +- ...ata.google.cloud.managedidentities.v1.json | 2 +- ...ata_google.cloud.managedidentities.v1.json | 2 +- ...oogle.cloud.managedidentities.v1beta1.json | 2 +- ...oogle.cloud.managedidentities.v1beta1.json | 2 +- .../v1/managed_identities_service_client.ts | 48 +- .../managed_identities_service_client.ts | 48 +- .../gapic_managed_identities_service_v1.ts | 130 +-- ...apic_managed_identities_service_v1beta1.ts | 130 +-- .../google-cloud-managedkafka/package.json | 2 +- .../src/v1/managed_kafka_client.ts | 82 +- .../src/v1/managed_kafka_connect_client.ts | 74 +- .../test/gapic_managed_kafka_connect_v1.ts | 192 ++--- .../test/gapic_managed_kafka_v1.ts | 198 ++--- .../package.json | 2 +- ...google.cloud.mediatranslation.v1beta1.json | 2 +- ...google.cloud.mediatranslation.v1beta1.json | 2 +- .../speech_translation_service_client.ts | 4 +- ...apic_speech_translation_service_v1beta1.ts | 8 +- packages/google-cloud-memcache/package.json | 2 +- ...pet_metadata.google.cloud.memcache.v1.json | 2 +- ...pet_metadata_google.cloud.memcache.v1.json | 2 +- ...etadata.google.cloud.memcache.v1beta2.json | 2 +- ...etadata_google.cloud.memcache.v1beta2.json | 2 +- .../src/v1/cloud_memcache_client.ts | 42 +- .../src/v1beta2/cloud_memcache_client.ts | 46 +- .../test/gapic_cloud_memcache_v1.ts | 130 +-- .../test/gapic_cloud_memcache_v1beta2.ts | 142 ++-- .../google-cloud-memorystore/package.json | 2 +- ..._metadata_google.cloud.memorystore.v1.json | 2 +- ...adata_google.cloud.memorystore.v1beta.json | 2 +- .../src/v1/memorystore_client.ts | 34 +- .../src/v1beta/memorystore_client.ts | 34 +- .../test/gapic_memorystore_v1.ts | 122 +-- .../test/gapic_memorystore_v1beta.ts | 122 +-- packages/google-cloud-metastore/package.json | 2 +- ...et_metadata.google.cloud.metastore.v1.json | 2 +- ...et_metadata_google.cloud.metastore.v1.json | 2 +- ...tadata.google.cloud.metastore.v1alpha.json | 2 +- ...tadata_google.cloud.metastore.v1alpha.json | 2 +- ...etadata.google.cloud.metastore.v1beta.json | 2 +- ...etadata_google.cloud.metastore.v1beta.json | 2 +- .../src/v1/dataproc_metastore_client.ts | 98 ++- .../dataproc_metastore_federation_client.ts | 30 +- .../src/v1alpha/dataproc_metastore_client.ts | 102 ++- .../dataproc_metastore_federation_client.ts | 30 +- .../src/v1beta/dataproc_metastore_client.ts | 102 ++- .../dataproc_metastore_federation_client.ts | 30 +- .../gapic_dataproc_metastore_federation_v1.ts | 128 +-- ...c_dataproc_metastore_federation_v1alpha.ts | 128 +-- ...ic_dataproc_metastore_federation_v1beta.ts | 128 +-- .../test/gapic_dataproc_metastore_v1.ts | 284 +++---- .../test/gapic_dataproc_metastore_v1alpha.ts | 296 +++---- .../test/gapic_dataproc_metastore_v1beta.ts | 296 +++---- .../google-cloud-migrationcenter/package.json | 2 +- ...adata.google.cloud.migrationcenter.v1.json | 2 +- ...adata_google.cloud.migrationcenter.v1.json | 2 +- .../src/v1/migration_center_client.ts | 266 ++++-- .../test/gapic_migration_center_v1.ts | 606 +++++++------- packages/google-cloud-modelarmor/package.json | 2 +- .../google/cloud/modelarmor/v1/service.proto | 4 +- .../protos/protos.d.ts | 10 +- .../google-cloud-modelarmor/protos/protos.js | 38 +- .../protos/protos.json | 4 +- ...t_metadata_google.cloud.modelarmor.v1.json | 2 +- .../src/v1/model_armor_client.ts | 313 ++++++- .../test/gapic_model_armor_v1.ts | 116 +-- .../google-cloud-modelarmor/tsconfig.json | 4 +- packages/google-cloud-monitoring/README.md | 4 +- packages/google-cloud-monitoring/package.json | 2 +- .../protos/protos.json | 3 - packages/google-cloud-netapp/package.json | 2 +- ...ippet_metadata_google.cloud.netapp.v1.json | 2 +- .../src/v1/net_app_client.ts | 322 ++++++-- .../test/gapic_net_app_v1.ts | 764 +++++++++--------- .../package.json | 2 +- ...a.google.cloud.networkconnectivity.v1.json | 2 +- ...a_google.cloud.networkconnectivity.v1.json | 2 +- ...le.cloud.networkconnectivity.v1alpha1.json | 2 +- ...le.cloud.networkconnectivity.v1alpha1.json | 2 +- .../src/v1/hub_service_client.ts | 142 +++- .../v1/policy_based_routing_service_client.ts | 26 +- .../src/v1alpha1/hub_service_client.ts | 56 +- .../test/gapic_hub_service_v1.ts | 336 ++++---- .../test/gapic_hub_service_v1alpha1.ts | 144 ++-- .../gapic_policy_based_routing_service_v1.ts | 124 +-- .../package.json | 2 +- ...ata.google.cloud.networkmanagement.v1.json | 2 +- ...ata_google.cloud.networkmanagement.v1.json | 2 +- ...oogle.cloud.networkmanagement.v1beta1.json | 2 +- ...oogle.cloud.networkmanagement.v1beta1.json | 2 +- .../src/v1/reachability_service_client.ts | 34 +- .../src/v1/vpc_flow_logs_service_client.ts | 30 +- .../v1beta1/reachability_service_client.ts | 34 +- .../v1beta1/vpc_flow_logs_service_client.ts | 30 +- .../test/gapic_reachability_service_v1.ts | 128 +-- .../gapic_reachability_service_v1beta1.ts | 128 +-- .../test/gapic_vpc_flow_logs_service_v1.ts | 120 +-- .../gapic_vpc_flow_logs_service_v1beta1.ts | 120 +-- .../google-cloud-networksecurity/package.json | 2 +- ...adata.google.cloud.networksecurity.v1.json | 2 +- ...adata_google.cloud.networksecurity.v1.json | 2 +- ....google.cloud.networksecurity.v1beta1.json | 2 +- ..._google.cloud.networksecurity.v1beta1.json | 2 +- .../src/v1/network_security_client.ts | 86 +- .../src/v1beta1/network_security_client.ts | 86 +- .../test/gapic_network_security_v1.ts | 232 +++--- .../test/gapic_network_security_v1beta1.ts | 232 +++--- 169 files changed, 5794 insertions(+), 4260 deletions(-) diff --git a/packages/google-cloud-gsuiteaddons/package.json b/packages/google-cloud-gsuiteaddons/package.json index e9773b5c054..7a95fd658ed 100644 --- a/packages/google-cloud-gsuiteaddons/package.json +++ b/packages/google-cloud-gsuiteaddons/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json index a35da8906e6..478a28e3730 100644 --- a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json +++ b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gsuiteaddons", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json index a35da8906e6..478a28e3730 100644 --- a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json +++ b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gsuiteaddons", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gsuiteaddons/src/v1/g_suite_add_ons_client.ts b/packages/google-cloud-gsuiteaddons/src/v1/g_suite_add_ons_client.ts index e39f0434dab..5810fd8a05a 100644 --- a/packages/google-cloud-gsuiteaddons/src/v1/g_suite_add_ons_client.ts +++ b/packages/google-cloud-gsuiteaddons/src/v1/g_suite_add_ons_client.ts @@ -517,7 +517,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAuthorization request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDeployment request %j', request); const wrappedCallback: | Callback< @@ -762,7 +766,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ 'deployment.name': request.deployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('replaceDeployment request %j', request); const wrappedCallback: | Callback< @@ -883,7 +889,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployment request %j', request); const wrappedCallback: | Callback< @@ -1004,7 +1012,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDeployment request %j', request); const wrappedCallback: | Callback< @@ -1127,7 +1137,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('installDeployment request %j', request); const wrappedCallback: | Callback< @@ -1256,7 +1268,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('uninstallDeployment request %j', request); const wrappedCallback: | Callback< @@ -1377,7 +1391,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstallStatus request %j', request); const wrappedCallback: | Callback< @@ -1513,7 +1529,9 @@ export class GSuiteAddOnsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, @@ -1587,7 +1605,9 @@ export class GSuiteAddOnsClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments stream %j', request); return this.descriptors.page.listDeployments.createStream( this.innerApiCalls.listDeployments as GaxCall, @@ -1643,7 +1663,9 @@ export class GSuiteAddOnsClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments iterate %j', request); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, diff --git a/packages/google-cloud-gsuiteaddons/test/gapic_g_suite_add_ons_v1.ts b/packages/google-cloud-gsuiteaddons/test/gapic_g_suite_add_ons_v1.ts index 5cea348e1d2..6551c922d68 100644 --- a/packages/google-cloud-gsuiteaddons/test/gapic_g_suite_add_ons_v1.ts +++ b/packages/google-cloud-gsuiteaddons/test/gapic_g_suite_add_ons_v1.ts @@ -255,7 +255,9 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gSuiteAddOnsStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetAuthorizationRequest() ); @@ -345,7 +347,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetAuthorizationRequest() ); @@ -392,7 +394,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetAuthorizationRequest() ); @@ -423,7 +425,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetAuthorizationRequest() ); @@ -444,7 +446,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest() ); @@ -475,7 +477,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest() ); @@ -522,7 +524,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest() ); @@ -553,7 +555,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest() ); @@ -574,7 +576,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest() ); @@ -606,7 +608,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest() ); @@ -654,7 +656,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest() ); @@ -686,7 +688,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest() ); @@ -708,7 +710,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetDeploymentRequest() ); @@ -739,7 +741,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetDeploymentRequest() ); @@ -786,7 +788,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetDeploymentRequest() ); @@ -817,7 +819,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetDeploymentRequest() ); @@ -838,7 +840,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest() ); @@ -869,7 +871,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest() ); @@ -916,7 +918,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest() ); @@ -947,7 +949,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest() ); @@ -968,7 +970,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.InstallDeploymentRequest() ); @@ -999,7 +1001,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.InstallDeploymentRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.InstallDeploymentRequest() ); @@ -1077,7 +1079,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.InstallDeploymentRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest() ); @@ -1208,7 +1210,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetInstallStatusRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetInstallStatusRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetInstallStatusRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.GetInstallStatusRequest() ); @@ -1359,7 +1361,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest() ); @@ -1398,7 +1400,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest() ); @@ -1453,7 +1455,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest() ); @@ -1484,7 +1486,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest() ); @@ -1544,7 +1546,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest() ); @@ -1593,7 +1595,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest() ); @@ -1642,7 +1644,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest() ); @@ -1679,7 +1681,7 @@ describe('v1.GSuiteAddOnsClient', () => { }); describe('Path templates', () => { - describe('authorization', () => { + describe('authorization', async () => { const fakePath = '/rendered/path/authorization'; const expectedParameters = { project: 'projectValue', @@ -1688,7 +1690,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.authorizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1717,7 +1719,7 @@ describe('v1.GSuiteAddOnsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1727,7 +1729,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1766,7 +1768,7 @@ describe('v1.GSuiteAddOnsClient', () => { }); }); - describe('installStatus', () => { + describe('installStatus', async () => { const fakePath = '/rendered/path/installStatus'; const expectedParameters = { project: 'projectValue', @@ -1776,7 +1778,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.installStatusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1818,7 +1820,7 @@ describe('v1.GSuiteAddOnsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1827,7 +1829,7 @@ describe('v1.GSuiteAddOnsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-iap/package.json b/packages/google-cloud-iap/package.json index 859478a507f..887e81a55ca 100644 --- a/packages/google-cloud-iap/package.json +++ b/packages/google-cloud-iap/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json index f63b106fd12..3a57e08efc0 100644 --- a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json +++ b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json index f63b106fd12..3a57e08efc0 100644 --- a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json +++ b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json index 9a2a3622f84..9ad5a8ef8c5 100644 --- a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json +++ b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json index 9a2a3622f84..9ad5a8ef8c5 100644 --- a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json +++ b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts b/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts index acf4cb9bb10..d4b5c2e6ebe 100644 --- a/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts +++ b/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts @@ -494,7 +494,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -607,7 +609,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -722,7 +726,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -830,7 +836,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIapSettings request %j', request); const wrappedCallback: | Callback< @@ -948,7 +956,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'iap_settings.name': request.iapSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIapSettings request %j', request); const wrappedCallback: | Callback< @@ -1074,7 +1084,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTunnelDestGroup request %j', request); const wrappedCallback: | Callback< @@ -1186,7 +1198,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTunnelDestGroup request %j', request); const wrappedCallback: | Callback< @@ -1304,7 +1318,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTunnelDestGroup request %j', request); const wrappedCallback: | Callback< @@ -1424,7 +1440,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ 'tunnel_dest_group.name': request.tunnelDestGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTunnelDestGroup request %j', request); const wrappedCallback: | Callback< @@ -1561,7 +1579,9 @@ export class IdentityAwareProxyAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.iap.v1.IListTunnelDestGroupsRequest, @@ -1637,7 +1657,9 @@ export class IdentityAwareProxyAdminServiceClient { }); const defaultCallSettings = this._defaults['listTunnelDestGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunnelDestGroups stream %j', request); return this.descriptors.page.listTunnelDestGroups.createStream( this.innerApiCalls.listTunnelDestGroups as GaxCall, @@ -1695,7 +1717,9 @@ export class IdentityAwareProxyAdminServiceClient { }); const defaultCallSettings = this._defaults['listTunnelDestGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTunnelDestGroups iterate %j', request); return this.descriptors.page.listTunnelDestGroups.asyncIterate( this.innerApiCalls['listTunnelDestGroups'] as GaxCall, diff --git a/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts b/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts index f371828ba6c..61f3fad54a3 100644 --- a/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts +++ b/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts @@ -480,7 +480,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBrands request %j', request); const wrappedCallback: | Callback< @@ -596,7 +598,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBrand request %j', request); const wrappedCallback: | Callback< @@ -703,7 +707,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBrand request %j', request); const wrappedCallback: | Callback< @@ -830,7 +836,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createIdentityAwareProxyClient request %j', request); const wrappedCallback: | Callback< @@ -964,7 +972,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIdentityAwareProxyClient request %j', request); const wrappedCallback: | Callback< @@ -1092,7 +1102,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetIdentityAwareProxyClientSecret request %j', request); const wrappedCallback: | Callback< @@ -1227,7 +1239,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteIdentityAwareProxyClient request %j', request); const wrappedCallback: | Callback< @@ -1369,7 +1383,9 @@ export class IdentityAwareProxyOAuthServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, @@ -1443,7 +1459,9 @@ export class IdentityAwareProxyOAuthServiceClient { }); const defaultCallSettings = this._defaults['listIdentityAwareProxyClients']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIdentityAwareProxyClients stream %j', request); return this.descriptors.page.listIdentityAwareProxyClients.createStream( this.innerApiCalls.listIdentityAwareProxyClients as GaxCall, @@ -1499,7 +1517,9 @@ export class IdentityAwareProxyOAuthServiceClient { }); const defaultCallSettings = this._defaults['listIdentityAwareProxyClients']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIdentityAwareProxyClients iterate %j', request); return this.descriptors.page.listIdentityAwareProxyClients.asyncIterate( this.innerApiCalls['listIdentityAwareProxyClients'] as GaxCall, diff --git a/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts b/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts index 380c97480fb..772c5b32bf7 100644 --- a/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts +++ b/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts @@ -458,7 +458,9 @@ export class IdentityAwareProxyAdminV1Beta1Client { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -571,7 +573,9 @@ export class IdentityAwareProxyAdminV1Beta1Client { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -688,7 +692,9 @@ export class IdentityAwareProxyAdminV1Beta1Client { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_service_v1.ts b/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_service_v1.ts index d4609043cff..c889b57f33e 100644 --- a/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_service_v1.ts +++ b/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_service_v1.ts @@ -271,7 +271,9 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.identityAwareProxyAdminServiceStub); client.close().then(() => { done(); @@ -342,7 +344,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -376,7 +378,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -426,7 +428,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -460,7 +462,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -484,7 +486,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -518,7 +520,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -568,7 +570,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -602,7 +604,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -626,7 +628,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -661,7 +663,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -711,7 +713,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -745,7 +747,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -769,7 +771,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIapSettingsRequest() ); @@ -803,7 +805,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIapSettingsRequest() ); @@ -853,7 +855,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIapSettingsRequest() ); @@ -887,7 +889,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIapSettingsRequest() ); @@ -911,7 +913,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateIapSettingsRequest() ); @@ -946,7 +948,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateIapSettingsRequest() ); @@ -997,7 +999,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateIapSettingsRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateIapSettingsRequest() ); @@ -1057,7 +1059,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateTunnelDestGroupRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateTunnelDestGroupRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateTunnelDestGroupRequest() ); @@ -1179,7 +1181,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateTunnelDestGroupRequest() ); @@ -1206,7 +1208,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetTunnelDestGroupRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetTunnelDestGroupRequest() ); @@ -1291,7 +1293,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetTunnelDestGroupRequest() ); @@ -1325,7 +1327,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetTunnelDestGroupRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteTunnelDestGroupRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteTunnelDestGroupRequest() ); @@ -1434,7 +1436,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteTunnelDestGroupRequest() ); @@ -1471,7 +1473,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteTunnelDestGroupRequest() ); @@ -1498,7 +1500,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateTunnelDestGroupRequest() ); @@ -1534,7 +1536,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateTunnelDestGroupRequest() ); @@ -1585,7 +1587,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateTunnelDestGroupRequest() ); @@ -1623,7 +1625,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.UpdateTunnelDestGroupRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListTunnelDestGroupsRequest() ); @@ -1688,7 +1690,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListTunnelDestGroupsRequest() ); @@ -1740,7 +1742,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListTunnelDestGroupsRequest() ); @@ -1774,7 +1776,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListTunnelDestGroupsRequest() ); @@ -1831,7 +1833,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListTunnelDestGroupsRequest() ); @@ -1883,7 +1885,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListTunnelDestGroupsRequest() ); @@ -1929,7 +1931,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListTunnelDestGroupsRequest() ); @@ -1966,7 +1968,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1978,7 +1980,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2007,7 +2009,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { }); }); - describe('tunnelDestGroup', () => { + describe('tunnelDestGroup', async () => { const fakePath = '/rendered/path/tunnelDestGroup'; const expectedParameters = { project: 'projectValue', @@ -2021,7 +2023,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunnelDestGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2074,7 +2076,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { }); }); - describe('tunnelLocation', () => { + describe('tunnelLocation', async () => { const fakePath = '/rendered/path/tunnelLocation'; const expectedParameters = { project: 'projectValue', @@ -2087,7 +2089,7 @@ describe('v1.IdentityAwareProxyAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunnelLocationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_v1_beta1_v1beta1.ts b/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_v1_beta1_v1beta1.ts index d2e5ac1be16..8c6dca70833 100644 --- a/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_v1_beta1_v1beta1.ts +++ b/packages/google-cloud-iap/test/gapic_identity_aware_proxy_admin_v1_beta1_v1beta1.ts @@ -208,7 +208,9 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.identityAwareProxyAdminV1Beta1Stub); client.close().then(() => { done(); @@ -279,7 +281,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -313,7 +315,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -363,7 +365,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -397,7 +399,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -421,7 +423,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -455,7 +457,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -505,7 +507,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -539,7 +541,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -563,7 +565,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -598,7 +600,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -648,7 +650,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -682,7 +684,7 @@ describe('v1beta1.IdentityAwareProxyAdminV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); diff --git a/packages/google-cloud-iap/test/gapic_identity_aware_proxy_o_auth_service_v1.ts b/packages/google-cloud-iap/test/gapic_identity_aware_proxy_o_auth_service_v1.ts index bd951ef313b..fee876ec9b6 100644 --- a/packages/google-cloud-iap/test/gapic_identity_aware_proxy_o_auth_service_v1.ts +++ b/packages/google-cloud-iap/test/gapic_identity_aware_proxy_o_auth_service_v1.ts @@ -271,7 +271,9 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.identityAwareProxyOAuthServiceStub); client.close().then(() => { done(); @@ -342,7 +344,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListBrandsRequest() ); @@ -376,7 +378,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListBrandsRequest() ); @@ -426,7 +428,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListBrandsRequest() ); @@ -460,7 +462,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListBrandsRequest() ); @@ -484,7 +486,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateBrandRequest() ); @@ -518,7 +520,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateBrandRequest() ); @@ -568,7 +570,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateBrandRequest() ); @@ -602,7 +604,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateBrandRequest() ); @@ -626,7 +628,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetBrandRequest() ); @@ -660,7 +662,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetBrandRequest() ); @@ -710,7 +712,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetBrandRequest() ); @@ -741,7 +743,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetBrandRequest() ); @@ -765,7 +767,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest() ); @@ -800,7 +802,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest() ); @@ -850,7 +852,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest() ); @@ -887,7 +889,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest() ); @@ -914,7 +916,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest() ); @@ -949,7 +951,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest() ); @@ -999,7 +1001,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest() ); @@ -1036,7 +1038,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest() ); @@ -1063,7 +1065,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest() ); @@ -1186,7 +1188,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest() ); @@ -1248,7 +1250,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest() ); @@ -1335,7 +1337,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest() ); @@ -1362,7 +1364,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest() ); @@ -1405,7 +1407,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest() ); @@ -1465,7 +1467,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest() ); @@ -1575,7 +1577,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest() ); @@ -1637,7 +1639,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1748,7 +1750,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1777,7 +1779,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { }); }); - describe('tunnelDestGroup', () => { + describe('tunnelDestGroup', async () => { const fakePath = '/rendered/path/tunnelDestGroup'; const expectedParameters = { project: 'projectValue', @@ -1791,7 +1793,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunnelDestGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1844,7 +1846,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { }); }); - describe('tunnelLocation', () => { + describe('tunnelLocation', async () => { const fakePath = '/rendered/path/tunnelLocation'; const expectedParameters = { project: 'projectValue', @@ -1857,7 +1859,7 @@ describe('v1.IdentityAwareProxyOAuthServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.tunnelLocationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-ids/package.json b/packages/google-cloud-ids/package.json index 5d5290d1a77..1526527a332 100644 --- a/packages/google-cloud-ids/package.json +++ b/packages/google-cloud-ids/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json index 88f1ceeb086..bfe74ae376a 100644 --- a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json +++ b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-ids", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json index 88f1ceeb086..bfe74ae376a 100644 --- a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json +++ b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-ids", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-ids/src/v1/i_d_s_client.ts b/packages/google-cloud-ids/src/v1/i_d_s_client.ts index f74139e3742..f8db10f0891 100644 --- a/packages/google-cloud-ids/src/v1/i_d_s_client.ts +++ b/packages/google-cloud-ids/src/v1/i_d_s_client.ts @@ -559,7 +559,9 @@ export class IDSClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEndpoint request %j', request); const wrappedCallback: | Callback< @@ -709,7 +711,9 @@ export class IDSClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -890,7 +894,9 @@ export class IDSClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1055,7 +1061,9 @@ export class IDSClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.ids.v1.IListEndpointsRequest, @@ -1129,7 +1137,9 @@ export class IDSClient { }); const defaultCallSettings = this._defaults['listEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpoints stream %j', request); return this.descriptors.page.listEndpoints.createStream( this.innerApiCalls.listEndpoints as GaxCall, @@ -1187,7 +1197,9 @@ export class IDSClient { }); const defaultCallSettings = this._defaults['listEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpoints iterate %j', request); return this.descriptors.page.listEndpoints.asyncIterate( this.innerApiCalls['listEndpoints'] as GaxCall, diff --git a/packages/google-cloud-ids/test/gapic_i_d_s_v1.ts b/packages/google-cloud-ids/test/gapic_i_d_s_v1.ts index ca79c830ef1..eef845fa8e5 100644 --- a/packages/google-cloud-ids/test/gapic_i_d_s_v1.ts +++ b/packages/google-cloud-ids/test/gapic_i_d_s_v1.ts @@ -282,7 +282,9 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.iDSStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.GetEndpointRequest() ); @@ -372,7 +374,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.GetEndpointRequest() ); @@ -419,7 +421,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.GetEndpointRequest() ); @@ -450,7 +452,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.GetEndpointRequest() ); @@ -471,7 +473,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.CreateEndpointRequest() ); @@ -504,7 +506,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.CreateEndpointRequest() ); @@ -558,7 +560,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.CreateEndpointRequest() ); @@ -589,7 +591,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.CreateEndpointRequest() ); @@ -622,7 +624,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.DeleteEndpointRequest() ); @@ -698,7 +700,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.DeleteEndpointRequest() ); @@ -752,7 +754,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.DeleteEndpointRequest() ); @@ -783,7 +785,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.DeleteEndpointRequest() ); @@ -816,7 +818,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.ListEndpointsRequest() ); @@ -892,7 +894,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.ListEndpointsRequest() ); @@ -941,7 +943,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.ListEndpointsRequest() ); @@ -972,7 +974,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.ListEndpointsRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.ListEndpointsRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.ListEndpointsRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.ids.v1.ListEndpointsRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.IDSClient', () => { }); describe('Path templates', () => { - describe('endpoint', () => { + describe('endpoint', async () => { const fakePath = '/rendered/path/endpoint'; const expectedParameters = { project: 'projectValue', @@ -1160,7 +1162,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1213,7 +1215,7 @@ describe('v1.IDSClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1223,7 +1225,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1262,7 +1264,7 @@ describe('v1.IDSClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1271,7 +1273,7 @@ describe('v1.IDSClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 0bb8ebc31c3..2400f9005f9 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index bcae8dbf6f9..9040c5a69d3 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json index bcae8dbf6f9..9040c5a69d3 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/src/v1/device_manager_client.ts b/packages/google-cloud-iot/src/v1/device_manager_client.ts index cee1bd55ca6..83fea518766 100644 --- a/packages/google-cloud-iot/src/v1/device_manager_client.ts +++ b/packages/google-cloud-iot/src/v1/device_manager_client.ts @@ -507,7 +507,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDeviceRegistry request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeviceRegistry request %j', request); const wrappedCallback: | Callback< @@ -742,7 +746,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ 'device_registry.name': request.deviceRegistry!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDeviceRegistry request %j', request); const wrappedCallback: | Callback< @@ -859,7 +865,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDeviceRegistry request %j', request); const wrappedCallback: | Callback< @@ -973,7 +981,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDevice request %j', request); const wrappedCallback: | Callback< @@ -1085,7 +1095,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDevice request %j', request); const wrappedCallback: | Callback< @@ -1199,7 +1211,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ 'device.name': request.device!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDevice request %j', request); const wrappedCallback: | Callback< @@ -1307,7 +1321,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDevice request %j', request); const wrappedCallback: | Callback< @@ -1433,7 +1449,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('modifyCloudToDeviceConfig request %j', request); const wrappedCallback: | Callback< @@ -1559,7 +1577,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeviceConfigVersions request %j', request); const wrappedCallback: | Callback< @@ -1679,7 +1699,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeviceStates request %j', request); const wrappedCallback: | Callback< @@ -1800,7 +1822,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1912,7 +1936,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2026,7 +2052,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2156,7 +2184,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('sendCommandToDevice request %j', request); const wrappedCallback: | Callback< @@ -2274,7 +2304,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('bindDeviceToGateway request %j', request); const wrappedCallback: | Callback< @@ -2398,7 +2430,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('unbindDeviceFromGateway request %j', request); const wrappedCallback: | Callback< @@ -2531,7 +2565,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.iot.v1.IListDeviceRegistriesRequest, @@ -2602,7 +2638,9 @@ export class DeviceManagerClient { }); const defaultCallSettings = this._defaults['listDeviceRegistries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeviceRegistries stream %j', request); return this.descriptors.page.listDeviceRegistries.createStream( this.innerApiCalls.listDeviceRegistries as GaxCall, @@ -2655,7 +2693,9 @@ export class DeviceManagerClient { }); const defaultCallSettings = this._defaults['listDeviceRegistries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeviceRegistries iterate %j', request); return this.descriptors.page.listDeviceRegistries.asyncIterate( this.innerApiCalls['listDeviceRegistries'] as GaxCall, @@ -2768,7 +2808,9 @@ export class DeviceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.iot.v1.IListDevicesRequest, @@ -2850,7 +2892,9 @@ export class DeviceManagerClient { }); const defaultCallSettings = this._defaults['listDevices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDevices stream %j', request); return this.descriptors.page.listDevices.createStream( this.innerApiCalls.listDevices as GaxCall, @@ -2916,7 +2960,9 @@ export class DeviceManagerClient { }); const defaultCallSettings = this._defaults['listDevices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDevices iterate %j', request); return this.descriptors.page.listDevices.asyncIterate( this.innerApiCalls['listDevices'] as GaxCall, diff --git a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts index 16f550f6e30..c67444b99f6 100644 --- a/packages/google-cloud-iot/test/gapic_device_manager_v1.ts +++ b/packages/google-cloud-iot/test/gapic_device_manager_v1.ts @@ -252,7 +252,9 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.deviceManagerStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); @@ -343,7 +345,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); @@ -390,7 +392,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); @@ -421,7 +423,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRegistryRequest() ); @@ -442,7 +444,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); @@ -473,7 +475,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); @@ -520,7 +522,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); @@ -551,7 +553,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRegistryRequest() ); @@ -572,7 +574,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); @@ -605,7 +607,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); @@ -653,7 +655,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); @@ -685,7 +687,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRegistryRequest() ); @@ -707,7 +709,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); @@ -739,7 +741,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); @@ -786,7 +788,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); @@ -817,7 +819,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRegistryRequest() ); @@ -838,7 +840,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); @@ -869,7 +871,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); @@ -916,7 +918,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); @@ -947,7 +949,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.CreateDeviceRequest() ); @@ -968,7 +970,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); @@ -999,7 +1001,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.GetDeviceRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UpdateDeviceRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.DeleteDeviceRequest() ); @@ -1359,7 +1361,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); @@ -1391,7 +1393,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); @@ -1438,7 +1440,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); @@ -1472,7 +1474,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest() ); @@ -1496,7 +1498,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); @@ -1528,7 +1530,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); @@ -1575,7 +1577,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); @@ -1609,7 +1611,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceConfigVersionsRequest() ); @@ -1633,7 +1635,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); @@ -1664,7 +1666,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); @@ -1711,7 +1713,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); @@ -1742,7 +1744,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceStatesRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1794,7 +1796,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1841,7 +1843,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1872,7 +1874,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1893,7 +1895,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1924,7 +1926,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1971,7 +1973,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2002,7 +2004,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2023,7 +2025,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2055,7 +2057,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2102,7 +2104,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2133,7 +2135,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2154,7 +2156,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); @@ -2186,7 +2188,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); @@ -2233,7 +2235,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); @@ -2264,7 +2266,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.SendCommandToDeviceRequest() ); @@ -2285,7 +2287,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); @@ -2317,7 +2319,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); @@ -2364,7 +2366,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); @@ -2395,7 +2397,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.BindDeviceToGatewayRequest() ); @@ -2416,7 +2418,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); @@ -2448,7 +2450,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); @@ -2495,7 +2497,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); @@ -2529,7 +2531,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.UnbindDeviceFromGatewayRequest() ); @@ -2553,7 +2555,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); @@ -2587,7 +2589,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); @@ -2636,7 +2638,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); @@ -2667,7 +2669,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); @@ -2721,7 +2723,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); @@ -2770,7 +2772,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); @@ -2813,7 +2815,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDeviceRegistriesRequest() ); @@ -2855,7 +2857,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); @@ -2888,7 +2890,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); @@ -2937,7 +2939,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); @@ -2968,7 +2970,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); @@ -3019,7 +3021,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); @@ -3067,7 +3069,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); @@ -3110,7 +3112,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.iot.v1.ListDevicesRequest() ); @@ -3149,7 +3151,7 @@ describe('v1.DeviceManagerClient', () => { }); describe('Path templates', () => { - describe('device', () => { + describe('device', async () => { const fakePath = '/rendered/path/device'; const expectedParameters = { project: 'projectValue', @@ -3161,7 +3163,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.devicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3225,7 +3227,7 @@ describe('v1.DeviceManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3235,7 +3237,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3274,7 +3276,7 @@ describe('v1.DeviceManagerClient', () => { }); }); - describe('registry', () => { + describe('registry', async () => { const fakePath = '/rendered/path/registry'; const expectedParameters = { project: 'projectValue', @@ -3285,7 +3287,7 @@ describe('v1.DeviceManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.registryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-kms-inventory/package.json b/packages/google-cloud-kms-inventory/package.json index b86b452983c..d9c711089d3 100644 --- a/packages/google-cloud-kms-inventory/package.json +++ b/packages/google-cloud-kms-inventory/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json index f8e762770dc..54075b40f4c 100644 --- a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-inventory", - "version": "1.5.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json index f8e762770dc..54075b40f4c 100644 --- a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-inventory", - "version": "1.5.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts index 44d69169234..b4eeca93283 100644 --- a/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts +++ b/packages/google-cloud-kms-inventory/src/v1/key_dashboard_service_client.ts @@ -506,7 +506,9 @@ export class KeyDashboardServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.inventory.v1.IListCryptoKeysRequest, @@ -575,7 +577,9 @@ export class KeyDashboardServiceClient { }); const defaultCallSettings = this._defaults['listCryptoKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCryptoKeys stream %j', request); return this.descriptors.page.listCryptoKeys.createStream( this.innerApiCalls.listCryptoKeys as GaxCall, @@ -626,7 +630,9 @@ export class KeyDashboardServiceClient { }); const defaultCallSettings = this._defaults['listCryptoKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCryptoKeys iterate %j', request); return this.descriptors.page.listCryptoKeys.asyncIterate( this.innerApiCalls['listCryptoKeys'] as GaxCall, diff --git a/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts index 9e7cc228b60..f1ce7d9599c 100644 --- a/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts +++ b/packages/google-cloud-kms-inventory/src/v1/key_tracking_service_client.ts @@ -507,7 +507,9 @@ export class KeyTrackingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProtectedResourcesSummary request %j', request); const wrappedCallback: | Callback< @@ -663,7 +665,9 @@ export class KeyTrackingServiceClient { this._gaxModule.routingHeader.fromParams({ scope: request.scope ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.inventory.v1.ISearchProtectedResourcesRequest, @@ -756,7 +760,9 @@ export class KeyTrackingServiceClient { }); const defaultCallSettings = this._defaults['searchProtectedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchProtectedResources stream %j', request); return this.descriptors.page.searchProtectedResources.createStream( this.innerApiCalls.searchProtectedResources as GaxCall, @@ -831,7 +837,9 @@ export class KeyTrackingServiceClient { }); const defaultCallSettings = this._defaults['searchProtectedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchProtectedResources iterate %j', request); return this.descriptors.page.searchProtectedResources.asyncIterate( this.innerApiCalls['searchProtectedResources'] as GaxCall, diff --git a/packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts b/packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts index d4ebf59c223..c7bfb353091 100644 --- a/packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts +++ b/packages/google-cloud-kms-inventory/test/gapic_key_dashboard_service_v1.ts @@ -266,7 +266,9 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.keyDashboardServiceStub); client.close().then(() => { done(); @@ -333,7 +335,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() ); @@ -368,7 +370,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() ); @@ -419,7 +421,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() ); @@ -452,7 +454,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() ); @@ -505,7 +507,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() ); @@ -553,7 +555,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() ); @@ -598,7 +600,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.ListCryptoKeysRequest() ); @@ -635,7 +637,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -649,7 +651,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -713,7 +715,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -728,7 +730,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -807,7 +809,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); }); - describe('importJob', () => { + describe('importJob', async () => { const fakePath = '/rendered/path/importJob'; const expectedParameters = { project: 'projectValue', @@ -821,7 +823,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.importJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -885,7 +887,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); }); - describe('keyRing', () => { + describe('keyRing', async () => { const fakePath = '/rendered/path/keyRing'; const expectedParameters = { project: 'projectValue', @@ -898,7 +900,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.keyRingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -951,7 +953,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -962,7 +964,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -991,7 +993,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); }); - describe('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary', () => { + describe('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary', async () => { const fakePath = '/rendered/path/projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary'; const expectedParameters = { @@ -1007,7 +1009,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match = @@ -1120,7 +1122,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); }); - describe('projectLocationKeyRingCryptoKeyProtectedResourcesSummary', () => { + describe('projectLocationKeyRingCryptoKeyProtectedResourcesSummary', async () => { const fakePath = '/rendered/path/projectLocationKeyRingCryptoKeyProtectedResourcesSummary'; const expectedParameters = { @@ -1135,7 +1137,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match = @@ -1230,7 +1232,7 @@ describe('v1.KeyDashboardServiceClient', () => { }); }); - describe('publicKey', () => { + describe('publicKey', async () => { const fakePath = '/rendered/path/publicKey'; const expectedParameters = { project: 'projectValue', @@ -1245,7 +1247,7 @@ describe('v1.KeyDashboardServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.publicKeyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts b/packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts index bfa1cd5013d..7736d084857 100644 --- a/packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts +++ b/packages/google-cloud-kms-inventory/test/gapic_key_tracking_service_v1.ts @@ -257,7 +257,9 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.keyTrackingServiceStub); client.close().then(() => { done(); @@ -316,7 +318,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() ); @@ -348,7 +350,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() ); @@ -395,7 +397,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() ); @@ -429,7 +431,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.GetProtectedResourcesSummaryRequest() ); @@ -453,7 +455,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() ); @@ -493,7 +495,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() ); @@ -550,7 +552,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() ); @@ -584,7 +586,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() ); @@ -653,7 +655,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() ); @@ -711,7 +713,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() ); @@ -765,7 +767,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest() ); @@ -807,7 +809,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -819,7 +821,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -883,7 +885,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -896,7 +898,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -975,7 +977,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); }); - describe('importJob', () => { + describe('importJob', async () => { const fakePath = '/rendered/path/importJob'; const expectedParameters = { project: 'projectValue', @@ -987,7 +989,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.importJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1051,7 +1053,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); }); - describe('keyRing', () => { + describe('keyRing', async () => { const fakePath = '/rendered/path/keyRing'; const expectedParameters = { project: 'projectValue', @@ -1062,7 +1064,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyRingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1115,7 +1117,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -1124,7 +1126,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1153,7 +1155,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); }); - describe('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary', () => { + describe('projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary', async () => { const fakePath = '/rendered/path/projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummary'; const expectedParameters = { @@ -1167,7 +1169,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKeyRingCryptoKeyCryptoKeyVersionProtectedResourcesSummaryPathTemplate.match = @@ -1280,7 +1282,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); }); - describe('projectLocationKeyRingCryptoKeyProtectedResourcesSummary', () => { + describe('projectLocationKeyRingCryptoKeyProtectedResourcesSummary', async () => { const fakePath = '/rendered/path/projectLocationKeyRingCryptoKeyProtectedResourcesSummary'; const expectedParameters = { @@ -1293,7 +1295,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKeyRingCryptoKeyProtectedResourcesSummaryPathTemplate.match = @@ -1388,7 +1390,7 @@ describe('v1.KeyTrackingServiceClient', () => { }); }); - describe('publicKey', () => { + describe('publicKey', async () => { const fakePath = '/rendered/path/publicKey'; const expectedParameters = { project: 'projectValue', @@ -1401,7 +1403,7 @@ describe('v1.KeyTrackingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.publicKeyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-kms/package.json b/packages/google-cloud-kms/package.json index 0871d425454..d3639ecd59b 100644 --- a/packages/google-cloud-kms/package.json +++ b/packages/google-cloud-kms/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json index f8c176e65dc..9dad8422867 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-kms", - "version": "4.5.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json index 96995e26781..4eeff8ff58e 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-kms", - "version": "4.5.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms/src/v1/autokey_admin_client.ts b/packages/google-cloud-kms/src/v1/autokey_admin_client.ts index 8b1f01a634e..7ab7216a5c9 100644 --- a/packages/google-cloud-kms/src/v1/autokey_admin_client.ts +++ b/packages/google-cloud-kms/src/v1/autokey_admin_client.ts @@ -513,7 +513,9 @@ export class AutokeyAdminClient { this._gaxModule.routingHeader.fromParams({ 'autokey_config.name': request.autokeyConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAutokeyConfig request %j', request); const wrappedCallback: | Callback< @@ -625,7 +627,9 @@ export class AutokeyAdminClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAutokeyConfig request %j', request); const wrappedCallback: | Callback< @@ -743,7 +747,9 @@ export class AutokeyAdminClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('showEffectiveAutokeyConfig request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-kms/src/v1/autokey_client.ts b/packages/google-cloud-kms/src/v1/autokey_client.ts index 54816f8b3ce..2ad1331e62e 100644 --- a/packages/google-cloud-kms/src/v1/autokey_client.ts +++ b/packages/google-cloud-kms/src/v1/autokey_client.ts @@ -638,7 +638,9 @@ export class AutokeyClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKeyHandle request %j', request); const wrappedCallback: | Callback< @@ -779,7 +781,9 @@ export class AutokeyClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -947,7 +951,9 @@ export class AutokeyClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.v1.IListKeyHandlesRequest, @@ -1024,7 +1030,9 @@ export class AutokeyClient { }); const defaultCallSettings = this._defaults['listKeyHandles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyHandles stream %j', request); return this.descriptors.page.listKeyHandles.createStream( this.innerApiCalls.listKeyHandles as GaxCall, @@ -1085,7 +1093,9 @@ export class AutokeyClient { }); const defaultCallSettings = this._defaults['listKeyHandles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyHandles iterate %j', request); return this.descriptors.page.listKeyHandles.asyncIterate( this.innerApiCalls['listKeyHandles'] as GaxCall, @@ -1403,7 +1413,7 @@ export class AutokeyClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-kms/src/v1/ekm_service_client.ts b/packages/google-cloud-kms/src/v1/ekm_service_client.ts index ab5d4dd11f6..3c287e5cb76 100644 --- a/packages/google-cloud-kms/src/v1/ekm_service_client.ts +++ b/packages/google-cloud-kms/src/v1/ekm_service_client.ts @@ -518,7 +518,9 @@ export class EkmServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEkmConnection request %j', request); const wrappedCallback: | Callback< @@ -637,7 +639,9 @@ export class EkmServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEkmConnection request %j', request); const wrappedCallback: | Callback< @@ -750,7 +754,9 @@ export class EkmServiceClient { this._gaxModule.routingHeader.fromParams({ 'ekm_connection.name': request.ekmConnection!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEkmConnection request %j', request); const wrappedCallback: | Callback< @@ -860,7 +866,9 @@ export class EkmServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEkmConfig request %j', request); const wrappedCallback: | Callback< @@ -969,7 +977,9 @@ export class EkmServiceClient { this._gaxModule.routingHeader.fromParams({ 'ekm_config.name': request.ekmConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEkmConfig request %j', request); const wrappedCallback: | Callback< @@ -1082,7 +1092,9 @@ export class EkmServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('verifyConnectivity request %j', request); const wrappedCallback: | Callback< @@ -1219,7 +1231,9 @@ export class EkmServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.v1.IListEkmConnectionsRequest, @@ -1303,7 +1317,9 @@ export class EkmServiceClient { }); const defaultCallSettings = this._defaults['listEkmConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEkmConnections stream %j', request); return this.descriptors.page.listEkmConnections.createStream( this.innerApiCalls.listEkmConnections as GaxCall, @@ -1369,7 +1385,9 @@ export class EkmServiceClient { }); const defaultCallSettings = this._defaults['listEkmConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEkmConnections iterate %j', request); return this.descriptors.page.listEkmConnections.asyncIterate( this.innerApiCalls['listEkmConnections'] as GaxCall, diff --git a/packages/google-cloud-kms/src/v1/key_management_service_client.ts b/packages/google-cloud-kms/src/v1/key_management_service_client.ts index 4ab39901441..5320edfd30f 100644 --- a/packages/google-cloud-kms/src/v1/key_management_service_client.ts +++ b/packages/google-cloud-kms/src/v1/key_management_service_client.ts @@ -558,7 +558,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKeyRing request %j', request); const wrappedCallback: | Callback< @@ -667,7 +669,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCryptoKey request %j', request); const wrappedCallback: | Callback< @@ -777,7 +781,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCryptoKeyVersion request %j', request); const wrappedCallback: | Callback< @@ -899,7 +905,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPublicKey request %j', request); const wrappedCallback: | Callback< @@ -1006,7 +1014,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getImportJob request %j', request); const wrappedCallback: | Callback< @@ -1121,7 +1131,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createKeyRing request %j', request); const wrappedCallback: | Callback< @@ -1248,7 +1260,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCryptoKey request %j', request); const wrappedCallback: | Callback< @@ -1372,7 +1386,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCryptoKeyVersion request %j', request); const wrappedCallback: | Callback< @@ -1577,7 +1593,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importCryptoKeyVersion request %j', request); const wrappedCallback: | Callback< @@ -1697,7 +1715,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createImportJob request %j', request); const wrappedCallback: | Callback< @@ -1805,7 +1825,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ 'crypto_key.name': request.cryptoKey!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCryptoKey request %j', request); const wrappedCallback: | Callback< @@ -1933,7 +1955,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ 'crypto_key_version.name': request.cryptoKeyVersion!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCryptoKeyVersion request %j', request); const wrappedCallback: | Callback< @@ -2064,7 +2088,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCryptoKeyPrimaryVersion request %j', request); const wrappedCallback: | Callback< @@ -2204,7 +2230,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('destroyCryptoKeyVersion request %j', request); const wrappedCallback: | Callback< @@ -2332,7 +2360,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restoreCryptoKeyVersion request %j', request); const wrappedCallback: | Callback< @@ -2518,7 +2548,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('encrypt request %j', request); const wrappedCallback: | Callback< @@ -2675,7 +2707,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('decrypt request %j', request); const wrappedCallback: | Callback< @@ -2869,7 +2903,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rawEncrypt request %j', request); const wrappedCallback: | Callback< @@ -3043,7 +3079,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rawDecrypt request %j', request); const wrappedCallback: | Callback< @@ -3208,7 +3246,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('asymmetricSign request %j', request); const wrappedCallback: | Callback< @@ -3346,7 +3386,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('asymmetricDecrypt request %j', request); const wrappedCallback: | Callback< @@ -3479,7 +3521,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('macSign request %j', request); const wrappedCallback: | Callback< @@ -3633,7 +3677,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('macVerify request %j', request); const wrappedCallback: | Callback< @@ -3751,7 +3797,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateRandomBytes request %j', request); const wrappedCallback: | Callback< @@ -3886,7 +3934,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.v1.IListKeyRingsRequest, @@ -3968,7 +4018,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listKeyRings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyRings stream %j', request); return this.descriptors.page.listKeyRings.createStream( this.innerApiCalls.listKeyRings as GaxCall, @@ -4034,7 +4086,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listKeyRings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeyRings iterate %j', request); return this.descriptors.page.listKeyRings.asyncIterate( this.innerApiCalls['listKeyRings'] as GaxCall, @@ -4148,7 +4202,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.v1.IListCryptoKeysRequest, @@ -4231,7 +4287,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listCryptoKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCryptoKeys stream %j', request); return this.descriptors.page.listCryptoKeys.createStream( this.innerApiCalls.listCryptoKeys as GaxCall, @@ -4298,7 +4356,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listCryptoKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCryptoKeys iterate %j', request); return this.descriptors.page.listCryptoKeys.asyncIterate( this.innerApiCalls['listCryptoKeys'] as GaxCall, @@ -4421,7 +4481,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.v1.IListCryptoKeyVersionsRequest, @@ -4507,7 +4569,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listCryptoKeyVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCryptoKeyVersions stream %j', request); return this.descriptors.page.listCryptoKeyVersions.createStream( this.innerApiCalls.listCryptoKeyVersions as GaxCall, @@ -4575,7 +4639,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listCryptoKeyVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCryptoKeyVersions iterate %j', request); return this.descriptors.page.listCryptoKeyVersions.asyncIterate( this.innerApiCalls['listCryptoKeyVersions'] as GaxCall, @@ -4687,7 +4753,9 @@ export class KeyManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.kms.v1.IListImportJobsRequest, @@ -4768,7 +4836,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listImportJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImportJobs stream %j', request); return this.descriptors.page.listImportJobs.createStream( this.innerApiCalls.listImportJobs as GaxCall, @@ -4833,7 +4903,9 @@ export class KeyManagementServiceClient { }); const defaultCallSettings = this._defaults['listImportJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImportJobs iterate %j', request); return this.descriptors.page.listImportJobs.asyncIterate( this.innerApiCalls['listImportJobs'] as GaxCall, diff --git a/packages/google-cloud-kms/test/gapic_autokey_admin_v1.ts b/packages/google-cloud-kms/test/gapic_autokey_admin_v1.ts index 490383c9d6f..794495ab7cc 100644 --- a/packages/google-cloud-kms/test/gapic_autokey_admin_v1.ts +++ b/packages/google-cloud-kms/test/gapic_autokey_admin_v1.ts @@ -212,7 +212,9 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autokeyAdminStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateAutokeyConfigRequest() ); @@ -304,7 +306,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateAutokeyConfigRequest() ); @@ -352,7 +354,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateAutokeyConfigRequest() ); @@ -384,7 +386,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateAutokeyConfigRequest() ); @@ -406,7 +408,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetAutokeyConfigRequest() ); @@ -437,7 +439,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetAutokeyConfigRequest() ); @@ -484,7 +486,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetAutokeyConfigRequest() ); @@ -515,7 +517,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetAutokeyConfigRequest() ); @@ -536,7 +538,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest() ); @@ -568,7 +570,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest() ); @@ -615,7 +617,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest() ); @@ -649,7 +651,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest() ); @@ -672,7 +674,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -702,7 +704,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -746,7 +748,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -778,7 +780,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -808,7 +810,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -852,7 +854,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -884,7 +886,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -917,7 +919,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -961,7 +963,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -996,7 +998,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1026,7 +1028,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1153,7 +1155,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1190,7 +1192,7 @@ describe('v1.AutokeyAdminClient', () => { }); describe('Path templates', () => { - describe('autokeyConfig', () => { + describe('autokeyConfig', async () => { const fakePath = '/rendered/path/autokeyConfig'; const expectedParameters = { folder: 'folderValue', @@ -1199,7 +1201,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autokeyConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1228,7 +1230,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -1240,7 +1242,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1304,7 +1306,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -1317,7 +1319,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1396,7 +1398,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('ekmConfig', () => { + describe('ekmConfig', async () => { const fakePath = '/rendered/path/ekmConfig'; const expectedParameters = { project: 'projectValue', @@ -1406,7 +1408,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1445,7 +1447,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('ekmConnection', () => { + describe('ekmConnection', async () => { const fakePath = '/rendered/path/ekmConnection'; const expectedParameters = { project: 'projectValue', @@ -1456,7 +1458,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1509,7 +1511,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('importJob', () => { + describe('importJob', async () => { const fakePath = '/rendered/path/importJob'; const expectedParameters = { project: 'projectValue', @@ -1521,7 +1523,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.importJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1585,7 +1587,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('keyHandle', () => { + describe('keyHandle', async () => { const fakePath = '/rendered/path/keyHandle'; const expectedParameters = { project: 'projectValue', @@ -1596,7 +1598,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyHandlePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1649,7 +1651,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('keyRing', () => { + describe('keyRing', async () => { const fakePath = '/rendered/path/keyRing'; const expectedParameters = { project: 'projectValue', @@ -1660,7 +1662,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyRingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1713,7 +1715,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1722,7 +1724,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1751,7 +1753,7 @@ describe('v1.AutokeyAdminClient', () => { }); }); - describe('publicKey', () => { + describe('publicKey', async () => { const fakePath = '/rendered/path/publicKey'; const expectedParameters = { project: 'projectValue', @@ -1764,7 +1766,7 @@ describe('v1.AutokeyAdminClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.publicKeyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-kms/test/gapic_autokey_v1.ts b/packages/google-cloud-kms/test/gapic_autokey_v1.ts index fc2a3986fef..5b42782393f 100644 --- a/packages/google-cloud-kms/test/gapic_autokey_v1.ts +++ b/packages/google-cloud-kms/test/gapic_autokey_v1.ts @@ -288,7 +288,9 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autokeyStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyHandleRequest() ); @@ -378,7 +380,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyHandleRequest() ); @@ -425,7 +427,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyHandleRequest() ); @@ -456,7 +458,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyHandleRequest() ); @@ -477,7 +479,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyHandleRequest() ); @@ -510,7 +512,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyHandleRequest() ); @@ -564,7 +566,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyHandleRequest() ); @@ -595,7 +597,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyHandleRequest() ); @@ -628,7 +630,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -650,7 +652,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -671,7 +673,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyHandlesRequest() ); @@ -704,7 +706,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyHandlesRequest() ); @@ -753,7 +755,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyHandlesRequest() ); @@ -784,7 +786,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyHandlesRequest() ); @@ -835,7 +837,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyHandlesRequest() ); @@ -881,7 +883,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyHandlesRequest() ); @@ -924,7 +926,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyHandlesRequest() ); @@ -965,7 +967,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -995,7 +997,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1101,7 +1103,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1145,7 +1147,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1319,7 +1321,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1363,7 +1365,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1398,7 +1400,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1566,7 +1568,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1742,8 +1744,7 @@ describe('v1.AutokeyClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1762,7 +1763,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1771,8 +1772,7 @@ describe('v1.AutokeyClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1788,7 +1788,7 @@ describe('v1.AutokeyClient', () => { }); describe('Path templates', () => { - describe('autokeyConfig', () => { + describe('autokeyConfig', async () => { const fakePath = '/rendered/path/autokeyConfig'; const expectedParameters = { folder: 'folderValue', @@ -1797,7 +1797,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autokeyConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1826,7 +1826,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -1838,7 +1838,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1902,7 +1902,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -1915,7 +1915,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1994,7 +1994,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('ekmConfig', () => { + describe('ekmConfig', async () => { const fakePath = '/rendered/path/ekmConfig'; const expectedParameters = { project: 'projectValue', @@ -2004,7 +2004,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2043,7 +2043,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('ekmConnection', () => { + describe('ekmConnection', async () => { const fakePath = '/rendered/path/ekmConnection'; const expectedParameters = { project: 'projectValue', @@ -2054,7 +2054,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2107,7 +2107,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('importJob', () => { + describe('importJob', async () => { const fakePath = '/rendered/path/importJob'; const expectedParameters = { project: 'projectValue', @@ -2119,7 +2119,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.importJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2183,7 +2183,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('keyHandle', () => { + describe('keyHandle', async () => { const fakePath = '/rendered/path/keyHandle'; const expectedParameters = { project: 'projectValue', @@ -2194,7 +2194,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyHandlePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2247,7 +2247,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('keyRing', () => { + describe('keyRing', async () => { const fakePath = '/rendered/path/keyRing'; const expectedParameters = { project: 'projectValue', @@ -2258,7 +2258,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyRingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2311,7 +2311,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2321,7 +2321,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2360,7 +2360,7 @@ describe('v1.AutokeyClient', () => { }); }); - describe('publicKey', () => { + describe('publicKey', async () => { const fakePath = '/rendered/path/publicKey'; const expectedParameters = { project: 'projectValue', @@ -2373,7 +2373,7 @@ describe('v1.AutokeyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.publicKeyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts b/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts index 80fe8a49434..e494a22ddc6 100644 --- a/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts +++ b/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts @@ -250,7 +250,9 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.ekmServiceStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConnectionRequest() ); @@ -340,7 +342,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConnectionRequest() ); @@ -387,7 +389,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConnectionRequest() ); @@ -418,7 +420,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConnectionRequest() ); @@ -439,7 +441,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateEkmConnectionRequest() ); @@ -471,7 +473,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateEkmConnectionRequest() ); @@ -518,7 +520,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateEkmConnectionRequest() ); @@ -549,7 +551,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateEkmConnectionRequest() ); @@ -570,7 +572,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest() ); @@ -603,7 +605,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest() ); @@ -651,7 +653,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest() ); @@ -683,7 +685,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConnectionRequest() ); @@ -705,7 +707,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConfigRequest() ); @@ -736,7 +738,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConfigRequest() ); @@ -783,7 +785,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConfigRequest() ); @@ -814,7 +816,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetEkmConfigRequest() ); @@ -835,7 +837,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConfigRequest() ); @@ -867,7 +869,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConfigRequest() ); @@ -915,7 +917,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConfigRequest() ); @@ -947,7 +949,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateEkmConfigRequest() ); @@ -969,7 +971,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.VerifyConnectivityRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.VerifyConnectivityRequest() ); @@ -1048,7 +1050,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.VerifyConnectivityRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.VerifyConnectivityRequest() ); @@ -1100,7 +1102,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListEkmConnectionsRequest() ); @@ -1134,7 +1136,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListEkmConnectionsRequest() ); @@ -1183,7 +1185,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListEkmConnectionsRequest() ); @@ -1214,7 +1216,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListEkmConnectionsRequest() ); @@ -1268,7 +1270,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListEkmConnectionsRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListEkmConnectionsRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListEkmConnectionsRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1431,7 +1433,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1475,7 +1477,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1507,7 +1509,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1581,7 +1583,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1613,7 +1615,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1690,7 +1692,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1725,7 +1727,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1755,7 +1757,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1799,7 +1801,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1834,7 +1836,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1882,7 +1884,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1919,7 +1921,7 @@ describe('v1.EkmServiceClient', () => { }); describe('Path templates', () => { - describe('autokeyConfig', () => { + describe('autokeyConfig', async () => { const fakePath = '/rendered/path/autokeyConfig'; const expectedParameters = { folder: 'folderValue', @@ -1928,7 +1930,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autokeyConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1957,7 +1959,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -1969,7 +1971,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2033,7 +2035,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -2046,7 +2048,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2125,7 +2127,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('ekmConfig', () => { + describe('ekmConfig', async () => { const fakePath = '/rendered/path/ekmConfig'; const expectedParameters = { project: 'projectValue', @@ -2135,7 +2137,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2174,7 +2176,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('ekmConnection', () => { + describe('ekmConnection', async () => { const fakePath = '/rendered/path/ekmConnection'; const expectedParameters = { project: 'projectValue', @@ -2185,7 +2187,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2238,7 +2240,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('importJob', () => { + describe('importJob', async () => { const fakePath = '/rendered/path/importJob'; const expectedParameters = { project: 'projectValue', @@ -2250,7 +2252,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.importJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2314,7 +2316,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('keyHandle', () => { + describe('keyHandle', async () => { const fakePath = '/rendered/path/keyHandle'; const expectedParameters = { project: 'projectValue', @@ -2325,7 +2327,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyHandlePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2378,7 +2380,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('keyRing', () => { + describe('keyRing', async () => { const fakePath = '/rendered/path/keyRing'; const expectedParameters = { project: 'projectValue', @@ -2389,7 +2391,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyRingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2442,7 +2444,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2452,7 +2454,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2491,7 +2493,7 @@ describe('v1.EkmServiceClient', () => { }); }); - describe('publicKey', () => { + describe('publicKey', async () => { const fakePath = '/rendered/path/publicKey'; const expectedParameters = { project: 'projectValue', @@ -2504,7 +2506,7 @@ describe('v1.EkmServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.publicKeyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts b/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts index e9f7dba94dd..9d986ee705b 100644 --- a/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts +++ b/packages/google-cloud-kms/test/gapic_key_management_service_v1.ts @@ -263,7 +263,9 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.keyManagementServiceStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyRingRequest() ); @@ -358,7 +360,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyRingRequest() ); @@ -406,7 +408,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyRingRequest() ); @@ -438,7 +440,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetKeyRingRequest() ); @@ -460,7 +462,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyRequest() ); @@ -492,7 +494,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyRequest() ); @@ -540,7 +542,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyRequest() ); @@ -572,7 +574,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyRequest() ); @@ -594,7 +596,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyVersionRequest() ); @@ -627,7 +629,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyVersionRequest() ); @@ -675,7 +677,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyVersionRequest() ); @@ -707,7 +709,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetCryptoKeyVersionRequest() ); @@ -729,7 +731,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetPublicKeyRequest() ); @@ -761,7 +763,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetPublicKeyRequest() ); @@ -809,7 +811,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetPublicKeyRequest() ); @@ -841,7 +843,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetPublicKeyRequest() ); @@ -863,7 +865,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetImportJobRequest() ); @@ -895,7 +897,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetImportJobRequest() ); @@ -943,7 +945,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetImportJobRequest() ); @@ -975,7 +977,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GetImportJobRequest() ); @@ -997,7 +999,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyRingRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyRingRequest() ); @@ -1077,7 +1079,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyRingRequest() ); @@ -1109,7 +1111,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateKeyRingRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyRequest() ); @@ -1163,7 +1165,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyRequest() ); @@ -1243,7 +1245,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyRequest() ); @@ -1265,7 +1267,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyVersionRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyVersionRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyVersionRequest() ); @@ -1381,7 +1383,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateCryptoKeyVersionRequest() ); @@ -1406,7 +1408,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ImportCryptoKeyVersionRequest() ); @@ -1439,7 +1441,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ImportCryptoKeyVersionRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ImportCryptoKeyVersionRequest() ); @@ -1522,7 +1524,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ImportCryptoKeyVersionRequest() ); @@ -1547,7 +1549,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateImportJobRequest() ); @@ -1579,7 +1581,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateImportJobRequest() ); @@ -1627,7 +1629,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateImportJobRequest() ); @@ -1659,7 +1661,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.CreateImportJobRequest() ); @@ -1681,7 +1683,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyRequest() ); @@ -1714,7 +1716,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyRequest() ); @@ -1796,7 +1798,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyRequest() ); @@ -1819,7 +1821,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest() ); @@ -1853,7 +1855,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest() ); @@ -1902,7 +1904,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest() ); @@ -1938,7 +1940,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyVersionRequest() ); @@ -1964,7 +1966,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest() ); @@ -1997,7 +1999,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest() ); @@ -2045,7 +2047,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest() ); @@ -2080,7 +2082,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest() ); @@ -2105,7 +2107,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest() ); @@ -2138,7 +2140,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest() ); @@ -2186,7 +2188,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest() ); @@ -2221,7 +2223,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DestroyCryptoKeyVersionRequest() ); @@ -2246,7 +2248,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest() ); @@ -2279,7 +2281,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest() ); @@ -2327,7 +2329,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest() ); @@ -2362,7 +2364,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RestoreCryptoKeyVersionRequest() ); @@ -2387,7 +2389,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.EncryptRequest() ); @@ -2419,7 +2421,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.EncryptRequest() ); @@ -2467,7 +2469,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.EncryptRequest() ); @@ -2496,7 +2498,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.EncryptRequest() ); @@ -2518,7 +2520,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DecryptRequest() ); @@ -2550,7 +2552,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DecryptRequest() ); @@ -2598,7 +2600,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DecryptRequest() ); @@ -2627,7 +2629,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.DecryptRequest() ); @@ -2649,7 +2651,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawEncryptRequest() ); @@ -2681,7 +2683,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawEncryptRequest() ); @@ -2729,7 +2731,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawEncryptRequest() ); @@ -2761,7 +2763,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawEncryptRequest() ); @@ -2783,7 +2785,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawDecryptRequest() ); @@ -2815,7 +2817,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawDecryptRequest() ); @@ -2863,7 +2865,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawDecryptRequest() ); @@ -2895,7 +2897,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.RawDecryptRequest() ); @@ -2917,7 +2919,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricSignRequest() ); @@ -2949,7 +2951,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricSignRequest() ); @@ -2997,7 +2999,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricSignRequest() ); @@ -3029,7 +3031,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricSignRequest() ); @@ -3051,7 +3053,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricDecryptRequest() ); @@ -3083,7 +3085,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricDecryptRequest() ); @@ -3131,7 +3133,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricDecryptRequest() ); @@ -3163,7 +3165,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.AsymmetricDecryptRequest() ); @@ -3185,7 +3187,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacSignRequest() ); @@ -3217,7 +3219,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacSignRequest() ); @@ -3265,7 +3267,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacSignRequest() ); @@ -3294,7 +3296,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacSignRequest() ); @@ -3316,7 +3318,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacVerifyRequest() ); @@ -3348,7 +3350,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacVerifyRequest() ); @@ -3396,7 +3398,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacVerifyRequest() ); @@ -3425,7 +3427,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.MacVerifyRequest() ); @@ -3447,7 +3449,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GenerateRandomBytesRequest() ); @@ -3480,7 +3482,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GenerateRandomBytesRequest() ); @@ -3528,7 +3530,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GenerateRandomBytesRequest() ); @@ -3560,7 +3562,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.GenerateRandomBytesRequest() ); @@ -3582,7 +3584,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyRingsRequest() ); @@ -3616,7 +3618,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyRingsRequest() ); @@ -3666,7 +3668,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyRingsRequest() ); @@ -3698,7 +3700,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyRingsRequest() ); @@ -3750,7 +3752,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyRingsRequest() ); @@ -3799,7 +3801,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyRingsRequest() ); @@ -3843,7 +3845,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListKeyRingsRequest() ); @@ -3886,7 +3888,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeysRequest() ); @@ -3920,7 +3922,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeysRequest() ); @@ -3970,7 +3972,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeysRequest() ); @@ -4002,7 +4004,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeysRequest() ); @@ -4054,7 +4056,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeysRequest() ); @@ -4101,7 +4103,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeysRequest() ); @@ -4145,7 +4147,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeysRequest() ); @@ -4188,7 +4190,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeyVersionsRequest() ); @@ -4229,7 +4231,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeyVersionsRequest() ); @@ -4285,7 +4287,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeyVersionsRequest() ); @@ -4320,7 +4322,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeyVersionsRequest() ); @@ -4387,7 +4389,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeyVersionsRequest() ); @@ -4443,7 +4445,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeyVersionsRequest() ); @@ -4497,7 +4499,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListCryptoKeyVersionsRequest() ); @@ -4544,7 +4546,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListImportJobsRequest() ); @@ -4578,7 +4580,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListImportJobsRequest() ); @@ -4628,7 +4630,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListImportJobsRequest() ); @@ -4660,7 +4662,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListImportJobsRequest() ); @@ -4712,7 +4714,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListImportJobsRequest() ); @@ -4759,7 +4761,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListImportJobsRequest() ); @@ -4803,7 +4805,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.kms.v1.ListImportJobsRequest() ); @@ -4845,7 +4847,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4876,7 +4878,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4921,7 +4923,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4954,7 +4956,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4985,7 +4987,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5030,7 +5032,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5063,7 +5065,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5097,7 +5099,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5142,7 +5144,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5178,7 +5180,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5209,7 +5211,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5254,7 +5256,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5290,7 +5292,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5339,7 +5341,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5376,7 +5378,7 @@ describe('v1.KeyManagementServiceClient', () => { }); describe('Path templates', () => { - describe('autokeyConfig', () => { + describe('autokeyConfig', async () => { const fakePath = '/rendered/path/autokeyConfig'; const expectedParameters = { folder: 'folderValue', @@ -5386,7 +5388,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autokeyConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5415,7 +5417,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -5428,7 +5430,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5492,7 +5494,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -5506,7 +5508,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5585,7 +5587,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('ekmConfig', () => { + describe('ekmConfig', async () => { const fakePath = '/rendered/path/ekmConfig'; const expectedParameters = { project: 'projectValue', @@ -5596,7 +5598,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5635,7 +5637,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('ekmConnection', () => { + describe('ekmConnection', async () => { const fakePath = '/rendered/path/ekmConnection'; const expectedParameters = { project: 'projectValue', @@ -5647,7 +5649,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5700,7 +5702,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('importJob', () => { + describe('importJob', async () => { const fakePath = '/rendered/path/importJob'; const expectedParameters = { project: 'projectValue', @@ -5713,7 +5715,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.importJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5777,7 +5779,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('keyHandle', () => { + describe('keyHandle', async () => { const fakePath = '/rendered/path/keyHandle'; const expectedParameters = { project: 'projectValue', @@ -5789,7 +5791,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyHandlePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5842,7 +5844,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('keyRing', () => { + describe('keyRing', async () => { const fakePath = '/rendered/path/keyRing'; const expectedParameters = { project: 'projectValue', @@ -5854,7 +5856,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.keyRingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5907,7 +5909,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5918,7 +5920,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5957,7 +5959,7 @@ describe('v1.KeyManagementServiceClient', () => { }); }); - describe('publicKey', () => { + describe('publicKey', async () => { const fakePath = '/rendered/path/publicKey'; const expectedParameters = { project: 'projectValue', @@ -5971,7 +5973,7 @@ describe('v1.KeyManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.publicKeyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index c120bfedada..67468602b0f 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -52,7 +52,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 9bb820aa23f..1be1f3113f1 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "6.5.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json index 9bb820aa23f..1be1f3113f1 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "6.5.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index 209bbd0bc64..6509339299e 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "6.5.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json index 209bbd0bc64..6509339299e 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "6.5.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json b/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json index abe43f41865..ce365aaf5a1 100644 --- a/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json +++ b/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "6.5.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 70d35c34cc6..870e2b37ed1 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -455,7 +455,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeSentiment request %j', request); const wrappedCallback: | Callback< @@ -571,7 +573,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeEntities request %j', request); const wrappedCallback: | Callback< @@ -694,7 +698,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeEntitySentiment request %j', request); const wrappedCallback: | Callback< @@ -807,7 +813,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeSyntax request %j', request); const wrappedCallback: | Callback< @@ -916,7 +924,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('classifyText request %j', request); const wrappedCallback: | Callback< @@ -1022,7 +1032,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moderateText request %j', request); const wrappedCallback: | Callback< @@ -1133,7 +1145,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('annotateText request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-language/src/v1beta2/language_service_client.ts b/packages/google-cloud-language/src/v1beta2/language_service_client.ts index ee01c20d6dd..93f2a8bfc19 100644 --- a/packages/google-cloud-language/src/v1beta2/language_service_client.ts +++ b/packages/google-cloud-language/src/v1beta2/language_service_client.ts @@ -456,7 +456,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeSentiment request %j', request); const wrappedCallback: | Callback< @@ -575,7 +577,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeEntities request %j', request); const wrappedCallback: | Callback< @@ -701,7 +705,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeEntitySentiment request %j', request); const wrappedCallback: | Callback< @@ -820,7 +826,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeSyntax request %j', request); const wrappedCallback: | Callback< @@ -938,7 +946,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('classifyText request %j', request); const wrappedCallback: | Callback< @@ -1050,7 +1060,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moderateText request %j', request); const wrappedCallback: | Callback< @@ -1167,7 +1179,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('annotateText request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-language/src/v2/language_service_client.ts b/packages/google-cloud-language/src/v2/language_service_client.ts index f08b456bfae..08ed97c7cca 100644 --- a/packages/google-cloud-language/src/v2/language_service_client.ts +++ b/packages/google-cloud-language/src/v2/language_service_client.ts @@ -453,7 +453,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeSentiment request %j', request); const wrappedCallback: | Callback< @@ -569,7 +571,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeEntities request %j', request); const wrappedCallback: | Callback< @@ -675,7 +679,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('classifyText request %j', request); const wrappedCallback: | Callback< @@ -783,7 +789,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moderateText request %j', request); const wrappedCallback: | Callback< @@ -893,7 +901,9 @@ export class LanguageServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('annotateText request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-language/test/gapic_language_service_v1.ts b/packages/google-cloud-language/test/gapic_language_service_v1.ts index 9c37c1620dc..1a6ba81b1ec 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1.ts @@ -189,7 +189,9 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.languageServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); @@ -265,7 +267,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); @@ -298,7 +300,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); @@ -315,7 +317,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSentimentRequest() ); @@ -331,7 +333,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); @@ -348,7 +350,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); @@ -381,7 +383,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); @@ -398,7 +400,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitiesRequest() ); @@ -414,7 +416,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); @@ -432,7 +434,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); @@ -465,7 +467,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); @@ -485,7 +487,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeEntitySentimentRequest() ); @@ -504,7 +506,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); @@ -521,7 +523,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); @@ -554,7 +556,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); @@ -571,7 +573,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnalyzeSyntaxRequest() ); @@ -587,7 +589,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); @@ -604,7 +606,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); @@ -637,7 +639,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); @@ -654,7 +656,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ClassifyTextRequest() ); @@ -670,7 +672,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ModerateTextRequest() ); @@ -687,7 +689,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ModerateTextRequest() ); @@ -720,7 +722,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ModerateTextRequest() ); @@ -737,7 +739,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.ModerateTextRequest() ); @@ -753,7 +755,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); @@ -770,7 +772,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); @@ -803,7 +805,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); @@ -820,7 +822,7 @@ describe('v1.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1.AnnotateTextRequest() ); diff --git a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts index 6fd3604e157..e568bc869d1 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v1beta2.ts @@ -191,7 +191,9 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.languageServiceStub); client.close().then(() => { done(); @@ -250,7 +252,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); @@ -267,7 +269,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); @@ -300,7 +302,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); @@ -317,7 +319,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSentimentRequest() ); @@ -333,7 +335,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); @@ -350,7 +352,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); @@ -383,7 +385,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); @@ -400,7 +402,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitiesRequest() ); @@ -416,7 +418,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); @@ -434,7 +436,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); @@ -467,7 +469,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); @@ -487,7 +489,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest() ); @@ -506,7 +508,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); @@ -523,7 +525,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); @@ -556,7 +558,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); @@ -573,7 +575,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnalyzeSyntaxRequest() ); @@ -589,7 +591,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); @@ -606,7 +608,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); @@ -639,7 +641,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); @@ -656,7 +658,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ClassifyTextRequest() ); @@ -672,7 +674,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ModerateTextRequest() ); @@ -689,7 +691,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ModerateTextRequest() ); @@ -722,7 +724,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ModerateTextRequest() ); @@ -739,7 +741,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.ModerateTextRequest() ); @@ -755,7 +757,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); @@ -772,7 +774,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); @@ -805,7 +807,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); @@ -822,7 +824,7 @@ describe('v1beta2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v1beta2.AnnotateTextRequest() ); diff --git a/packages/google-cloud-language/test/gapic_language_service_v2.ts b/packages/google-cloud-language/test/gapic_language_service_v2.ts index a6368e73cd8..6850f64dad5 100644 --- a/packages/google-cloud-language/test/gapic_language_service_v2.ts +++ b/packages/google-cloud-language/test/gapic_language_service_v2.ts @@ -189,7 +189,9 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.languageServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeSentimentRequest() ); @@ -265,7 +267,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeSentimentRequest() ); @@ -298,7 +300,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeSentimentRequest() ); @@ -315,7 +317,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeSentimentRequest() ); @@ -331,7 +333,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeEntitiesRequest() ); @@ -348,7 +350,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeEntitiesRequest() ); @@ -381,7 +383,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeEntitiesRequest() ); @@ -398,7 +400,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnalyzeEntitiesRequest() ); @@ -414,7 +416,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ClassifyTextRequest() ); @@ -431,7 +433,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ClassifyTextRequest() ); @@ -464,7 +466,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ClassifyTextRequest() ); @@ -481,7 +483,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ClassifyTextRequest() ); @@ -497,7 +499,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ModerateTextRequest() ); @@ -514,7 +516,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ModerateTextRequest() ); @@ -547,7 +549,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ModerateTextRequest() ); @@ -564,7 +566,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.ModerateTextRequest() ); @@ -580,7 +582,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnnotateTextRequest() ); @@ -597,7 +599,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnnotateTextRequest() ); @@ -630,7 +632,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnnotateTextRequest() ); @@ -647,7 +649,7 @@ describe('v2.LanguageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.language.v2.AnnotateTextRequest() ); diff --git a/packages/google-cloud-lifesciences/package.json b/packages/google-cloud-lifesciences/package.json index b5fc304d8dc..f2c33c8111c 100644 --- a/packages/google-cloud-lifesciences/package.json +++ b/packages/google-cloud-lifesciences/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json index 4206298220b..fc2570b1934 100644 --- a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json +++ b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lifesciences", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json index 4206298220b..fc2570b1934 100644 --- a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json +++ b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lifesciences", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-lifesciences/src/v2beta/workflows_service_v2_beta_client.ts b/packages/google-cloud-lifesciences/src/v2beta/workflows_service_v2_beta_client.ts index 7bf6ad73f0c..28058e4718b 100644 --- a/packages/google-cloud-lifesciences/src/v2beta/workflows_service_v2_beta_client.ts +++ b/packages/google-cloud-lifesciences/src/v2beta/workflows_service_v2_beta_client.ts @@ -553,7 +553,9 @@ export class WorkflowsServiceV2BetaClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -793,7 +795,7 @@ export class WorkflowsServiceV2BetaClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-lifesciences/test/gapic_workflows_service_v2_beta_v2beta.ts b/packages/google-cloud-lifesciences/test/gapic_workflows_service_v2_beta_v2beta.ts index 135e41301e1..9acdc7245ad 100644 --- a/packages/google-cloud-lifesciences/test/gapic_workflows_service_v2_beta_v2beta.ts +++ b/packages/google-cloud-lifesciences/test/gapic_workflows_service_v2_beta_v2beta.ts @@ -256,7 +256,9 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.workflowsServiceV2BetaStub); client.close().then(() => { done(); @@ -319,7 +321,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.lifesciences.v2beta.RunPipelineRequest() ); @@ -352,7 +354,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.lifesciences.v2beta.RunPipelineRequest() ); @@ -407,7 +409,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.lifesciences.v2beta.RunPipelineRequest() ); @@ -439,7 +441,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.lifesciences.v2beta.RunPipelineRequest() ); @@ -473,7 +475,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -496,7 +498,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -514,7 +516,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -545,7 +547,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -590,7 +592,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -626,7 +628,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -675,7 +677,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -717,7 +719,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -799,7 +801,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -882,7 +884,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -981,8 +983,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1002,7 +1003,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1011,8 +1012,7 @@ describe('v2beta.WorkflowsServiceV2BetaClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-cloud-managedidentities/package.json b/packages/google-cloud-managedidentities/package.json index 68907353743..6d54a121611 100644 --- a/packages/google-cloud-managedidentities/package.json +++ b/packages/google-cloud-managedidentities/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json index bd9da67b4fb..bf8661098fe 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json index bd9da67b4fb..bf8661098fe 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json index 33039a96ad8..1a48c109310 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json index 33039a96ad8..1a48c109310 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts b/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts index 6cc02d947a1..e54db0cc774 100644 --- a/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts +++ b/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts @@ -699,7 +699,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetAdminPassword request %j', request); const wrappedCallback: | Callback< @@ -819,7 +821,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDomain request %j', request); const wrappedCallback: | Callback< @@ -967,7 +971,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1142,7 +1148,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ 'domain.name': request.domain!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1310,7 +1318,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1480,7 +1490,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1654,7 +1666,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1824,7 +1838,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1995,7 +2011,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2172,7 +2190,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.managedidentities.v1.IListDomainsRequest, @@ -2252,7 +2272,9 @@ export class ManagedIdentitiesServiceClient { }); const defaultCallSettings = this._defaults['listDomains']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDomains stream %j', request); return this.descriptors.page.listDomains.createStream( this.innerApiCalls.listDomains as GaxCall, @@ -2314,7 +2336,9 @@ export class ManagedIdentitiesServiceClient { }); const defaultCallSettings = this._defaults['listDomains']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDomains iterate %j', request); return this.descriptors.page.listDomains.asyncIterate( this.innerApiCalls['listDomains'] as GaxCall, diff --git a/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts b/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts index 170852645c1..e70f103ba79 100644 --- a/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts +++ b/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts @@ -667,7 +667,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetAdminPassword request %j', request); const wrappedCallback: | Callback< @@ -793,7 +795,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDomain request %j', request); const wrappedCallback: | Callback< @@ -939,7 +943,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1115,7 +1121,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ 'domain.name': request.domain!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1283,7 +1291,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1453,7 +1463,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1627,7 +1639,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1797,7 +1811,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1968,7 +1984,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2145,7 +2163,9 @@ export class ManagedIdentitiesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, @@ -2225,7 +2245,9 @@ export class ManagedIdentitiesServiceClient { }); const defaultCallSettings = this._defaults['listDomains']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDomains stream %j', request); return this.descriptors.page.listDomains.createStream( this.innerApiCalls.listDomains as GaxCall, @@ -2287,7 +2309,9 @@ export class ManagedIdentitiesServiceClient { }); const defaultCallSettings = this._defaults['listDomains']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDomains iterate %j', request); return this.descriptors.page.listDomains.asyncIterate( this.innerApiCalls['listDomains'] as GaxCall, diff --git a/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1.ts b/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1.ts index 579d938d095..b9128c4d49b 100644 --- a/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1.ts +++ b/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1.ts @@ -300,7 +300,9 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.managedIdentitiesServiceStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ResetAdminPasswordRequest() ); @@ -396,7 +398,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ResetAdminPasswordRequest() ); @@ -444,7 +446,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ResetAdminPasswordRequest() ); @@ -476,7 +478,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ResetAdminPasswordRequest() ); @@ -498,7 +500,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.GetDomainRequest() ); @@ -530,7 +532,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.GetDomainRequest() ); @@ -578,7 +580,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.GetDomainRequest() ); @@ -607,7 +609,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.GetDomainRequest() ); @@ -629,7 +631,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest() ); @@ -663,7 +665,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest() ); @@ -718,7 +720,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest() ); @@ -753,7 +755,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest() ); @@ -787,7 +789,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -811,7 +813,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -833,7 +835,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.UpdateDomainRequest() ); @@ -867,7 +869,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.UpdateDomainRequest() ); @@ -923,7 +925,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.UpdateDomainRequest() ); @@ -956,7 +958,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.UpdateDomainRequest() ); @@ -991,7 +993,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1014,7 +1016,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1033,7 +1035,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DeleteDomainRequest() ); @@ -1066,7 +1068,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DeleteDomainRequest() ); @@ -1121,7 +1123,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DeleteDomainRequest() ); @@ -1153,7 +1155,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DeleteDomainRequest() ); @@ -1187,7 +1189,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1210,7 +1212,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1229,7 +1231,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.AttachTrustRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.AttachTrustRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.AttachTrustRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.AttachTrustRequest() ); @@ -1383,7 +1385,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1406,7 +1408,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1425,7 +1427,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ReconfigureTrustRequest() ); @@ -1459,7 +1461,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ReconfigureTrustRequest() ); @@ -1514,7 +1516,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ReconfigureTrustRequest() ); @@ -1546,7 +1548,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ReconfigureTrustRequest() ); @@ -1580,7 +1582,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1603,7 +1605,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1625,7 +1627,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DetachTrustRequest() ); @@ -1658,7 +1660,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DetachTrustRequest() ); @@ -1713,7 +1715,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DetachTrustRequest() ); @@ -1745,7 +1747,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.DetachTrustRequest() ); @@ -1779,7 +1781,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1802,7 +1804,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1821,7 +1823,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ValidateTrustRequest() ); @@ -1855,7 +1857,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ValidateTrustRequest() ); @@ -1910,7 +1912,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ValidateTrustRequest() ); @@ -1942,7 +1944,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ValidateTrustRequest() ); @@ -1976,7 +1978,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1999,7 +2001,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2021,7 +2023,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ListDomainsRequest() ); @@ -2061,7 +2063,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ListDomainsRequest() ); @@ -2117,7 +2119,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ListDomainsRequest() ); @@ -2149,7 +2151,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ListDomainsRequest() ); @@ -2210,7 +2212,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ListDomainsRequest() ); @@ -2262,7 +2264,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ListDomainsRequest() ); @@ -2312,7 +2314,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1.ListDomainsRequest() ); @@ -2352,7 +2354,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { }); describe('Path templates', () => { - describe('domain', () => { + describe('domain', async () => { const fakePath = '/rendered/path/domain'; const expectedParameters = { project: 'projectValue', @@ -2364,7 +2366,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.domainPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2417,7 +2419,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2428,7 +2430,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2467,7 +2469,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2477,7 +2479,7 @@ describe('v1.ManagedIdentitiesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1beta1.ts b/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1beta1.ts index 4d74c76e858..75165eaf1c8 100644 --- a/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1beta1.ts +++ b/packages/google-cloud-managedidentities/test/gapic_managed_identities_service_v1beta1.ts @@ -306,7 +306,9 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.managedIdentitiesServiceStub); client.close().then(() => { done(); @@ -377,7 +379,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ResetAdminPasswordRequest() ); @@ -412,7 +414,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ResetAdminPasswordRequest() ); @@ -462,7 +464,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ResetAdminPasswordRequest() ); @@ -496,7 +498,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ResetAdminPasswordRequest() ); @@ -520,7 +522,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.GetDomainRequest() ); @@ -554,7 +556,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.GetDomainRequest() ); @@ -604,7 +606,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.GetDomainRequest() ); @@ -635,7 +637,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.GetDomainRequest() ); @@ -659,7 +661,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.CreateMicrosoftAdDomainRequest() ); @@ -695,7 +697,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.CreateMicrosoftAdDomainRequest() ); @@ -752,7 +754,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.CreateMicrosoftAdDomainRequest() ); @@ -789,7 +791,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.CreateMicrosoftAdDomainRequest() ); @@ -825,7 +827,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -851,7 +853,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -875,7 +877,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.UpdateDomainRequest() ); @@ -911,7 +913,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.UpdateDomainRequest() ); @@ -969,7 +971,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.UpdateDomainRequest() ); @@ -1004,7 +1006,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.UpdateDomainRequest() ); @@ -1041,7 +1043,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1066,7 +1068,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1087,7 +1089,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DeleteDomainRequest() ); @@ -1122,7 +1124,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DeleteDomainRequest() ); @@ -1179,7 +1181,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DeleteDomainRequest() ); @@ -1213,7 +1215,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DeleteDomainRequest() ); @@ -1249,7 +1251,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1274,7 +1276,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1295,7 +1297,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.AttachTrustRequest() ); @@ -1330,7 +1332,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.AttachTrustRequest() ); @@ -1387,7 +1389,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.AttachTrustRequest() ); @@ -1421,7 +1423,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.AttachTrustRequest() ); @@ -1457,7 +1459,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1482,7 +1484,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1503,7 +1505,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ReconfigureTrustRequest() ); @@ -1539,7 +1541,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ReconfigureTrustRequest() ); @@ -1596,7 +1598,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ReconfigureTrustRequest() ); @@ -1630,7 +1632,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ReconfigureTrustRequest() ); @@ -1666,7 +1668,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1691,7 +1693,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1715,7 +1717,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DetachTrustRequest() ); @@ -1750,7 +1752,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DetachTrustRequest() ); @@ -1807,7 +1809,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DetachTrustRequest() ); @@ -1841,7 +1843,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.DetachTrustRequest() ); @@ -1877,7 +1879,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1902,7 +1904,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1923,7 +1925,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ValidateTrustRequest() ); @@ -1959,7 +1961,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ValidateTrustRequest() ); @@ -2016,7 +2018,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ValidateTrustRequest() ); @@ -2050,7 +2052,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ValidateTrustRequest() ); @@ -2086,7 +2088,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2111,7 +2113,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2135,7 +2137,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ListDomainsRequest() ); @@ -2177,7 +2179,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ListDomainsRequest() ); @@ -2237,7 +2239,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ListDomainsRequest() ); @@ -2271,7 +2273,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ListDomainsRequest() ); @@ -2335,7 +2337,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ListDomainsRequest() ); @@ -2390,7 +2392,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ListDomainsRequest() ); @@ -2443,7 +2445,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedidentities.v1beta1.ListDomainsRequest() ); @@ -2483,7 +2485,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { }); describe('Path templates', () => { - describe('domain', () => { + describe('domain', async () => { const fakePath = '/rendered/path/domain'; const expectedParameters = { project: 'projectValue', @@ -2497,7 +2499,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.domainPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2550,7 +2552,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2563,7 +2565,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2602,7 +2604,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2614,7 +2616,7 @@ describe('v1beta1.ManagedIdentitiesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-managedkafka/package.json b/packages/google-cloud-managedkafka/package.json index b3003ea9a1c..6fd60ba2d24 100644 --- a/packages/google-cloud-managedkafka/package.json +++ b/packages/google-cloud-managedkafka/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts b/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts index de7d594438d..848fc38ff2e 100644 --- a/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts +++ b/packages/google-cloud-managedkafka/src/v1/managed_kafka_client.ts @@ -597,7 +597,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -709,7 +711,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTopic request %j', request); const wrappedCallback: | Callback< @@ -835,7 +839,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTopic request %j', request); const wrappedCallback: | Callback< @@ -957,7 +963,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ 'topic.name': request.topic!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTopic request %j', request); const wrappedCallback: | Callback< @@ -1074,7 +1082,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTopic request %j', request); const wrappedCallback: | Callback< @@ -1191,7 +1201,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConsumerGroup request %j', request); const wrappedCallback: | Callback< @@ -1322,7 +1334,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ 'consumer_group.name': request.consumerGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConsumerGroup request %j', request); const wrappedCallback: | Callback< @@ -1448,7 +1462,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConsumerGroup request %j', request); const wrappedCallback: | Callback< @@ -1606,7 +1622,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1794,7 +1812,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1976,7 +1996,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2149,7 +2171,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.managedkafka.v1.IListClustersRequest, @@ -2225,7 +2249,9 @@ export class ManagedKafkaClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -2283,7 +2309,9 @@ export class ManagedKafkaClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -2392,7 +2420,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.managedkafka.v1.IListTopicsRequest, @@ -2464,7 +2494,9 @@ export class ManagedKafkaClient { }); const defaultCallSettings = this._defaults['listTopics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTopics stream %j', request); return this.descriptors.page.listTopics.createStream( this.innerApiCalls.listTopics as GaxCall, @@ -2518,7 +2550,9 @@ export class ManagedKafkaClient { }); const defaultCallSettings = this._defaults['listTopics']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTopics iterate %j', request); return this.descriptors.page.listTopics.asyncIterate( this.innerApiCalls['listTopics'] as GaxCall, @@ -2628,7 +2662,9 @@ export class ManagedKafkaClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.managedkafka.v1.IListConsumerGroupsRequest, @@ -2701,7 +2737,9 @@ export class ManagedKafkaClient { }); const defaultCallSettings = this._defaults['listConsumerGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConsumerGroups stream %j', request); return this.descriptors.page.listConsumerGroups.createStream( this.innerApiCalls.listConsumerGroups as GaxCall, @@ -2756,7 +2794,9 @@ export class ManagedKafkaClient { }); const defaultCallSettings = this._defaults['listConsumerGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConsumerGroups iterate %j', request); return this.descriptors.page.listConsumerGroups.asyncIterate( this.innerApiCalls['listConsumerGroups'] as GaxCall, @@ -2936,7 +2976,7 @@ export class ManagedKafkaClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts index 3008a2192c8..23b2d58a043 100644 --- a/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts +++ b/packages/google-cloud-managedkafka/src/v1/managed_kafka_connect_client.ts @@ -601,7 +601,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectCluster request %j', request); const wrappedCallback: | Callback< @@ -722,7 +724,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnector request %j', request); const wrappedCallback: | Callback< @@ -849,7 +853,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConnector request %j', request); const wrappedCallback: | Callback< @@ -974,7 +980,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ 'connector.name': request.connector!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConnector request %j', request); const wrappedCallback: | Callback< @@ -1095,7 +1103,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConnector request %j', request); const wrappedCallback: | Callback< @@ -1216,7 +1226,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseConnector request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1349,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeConnector request %j', request); const wrappedCallback: | Callback< @@ -1458,7 +1472,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restartConnector request %j', request); const wrappedCallback: | Callback< @@ -1579,7 +1595,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopConnector request %j', request); const wrappedCallback: | Callback< @@ -1735,7 +1753,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1924,7 +1944,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ 'connect_cluster.name': request.connectCluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2108,7 +2130,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2281,7 +2305,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, @@ -2357,7 +2383,9 @@ export class ManagedKafkaConnectClient { }); const defaultCallSettings = this._defaults['listConnectClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectClusters stream %j', request); return this.descriptors.page.listConnectClusters.createStream( this.innerApiCalls.listConnectClusters as GaxCall, @@ -2415,7 +2443,9 @@ export class ManagedKafkaConnectClient { }); const defaultCallSettings = this._defaults['listConnectClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectClusters iterate %j', request); return this.descriptors.page.listConnectClusters.asyncIterate( this.innerApiCalls['listConnectClusters'] as GaxCall, @@ -2525,7 +2555,9 @@ export class ManagedKafkaConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.managedkafka.v1.IListConnectorsRequest, @@ -2598,7 +2630,9 @@ export class ManagedKafkaConnectClient { }); const defaultCallSettings = this._defaults['listConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectors stream %j', request); return this.descriptors.page.listConnectors.createStream( this.innerApiCalls.listConnectors as GaxCall, @@ -2653,7 +2687,9 @@ export class ManagedKafkaConnectClient { }); const defaultCallSettings = this._defaults['listConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectors iterate %j', request); return this.descriptors.page.listConnectors.asyncIterate( this.innerApiCalls['listConnectors'] as GaxCall, @@ -2833,7 +2869,7 @@ export class ManagedKafkaConnectClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts index 321b4ada298..13bac01d863 100644 --- a/packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts +++ b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_connect_v1.ts @@ -303,7 +303,9 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.managedKafkaConnectStub); client.close().then(() => { done(); @@ -370,7 +372,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() ); @@ -403,7 +405,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() ); @@ -452,7 +454,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() ); @@ -485,7 +487,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectClusterRequest() ); @@ -508,7 +510,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectorRequest() ); @@ -541,7 +543,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectorRequest() ); @@ -590,7 +592,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectorRequest() ); @@ -623,7 +625,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConnectorRequest() ); @@ -646,7 +648,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() ); @@ -679,7 +681,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() ); @@ -728,7 +730,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() ); @@ -761,7 +763,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectorRequest() ); @@ -784,7 +786,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() ); @@ -818,7 +820,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() ); @@ -868,7 +870,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() ); @@ -902,7 +904,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectorRequest() ); @@ -926,7 +928,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() ); @@ -959,7 +961,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() ); @@ -1008,7 +1010,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectorRequest() ); @@ -1064,7 +1066,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() ); @@ -1097,7 +1099,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() ); @@ -1146,7 +1148,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() ); @@ -1179,7 +1181,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.PauseConnectorRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() ); @@ -1235,7 +1237,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() ); @@ -1284,7 +1286,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ResumeConnectorRequest() ); @@ -1340,7 +1342,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() ); @@ -1422,7 +1424,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() ); @@ -1455,7 +1457,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.RestartConnectorRequest() ); @@ -1478,7 +1480,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.StopConnectorRequest() ); @@ -1511,7 +1513,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.StopConnectorRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.StopConnectorRequest() ); @@ -1593,7 +1595,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.StopConnectorRequest() ); @@ -1616,7 +1618,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() ); @@ -1707,7 +1709,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() ); @@ -1740,7 +1742,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateConnectClusterRequest() ); @@ -1775,7 +1777,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1799,7 +1801,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1822,7 +1824,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() ); @@ -1858,7 +1860,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() ); @@ -1915,7 +1917,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() ); @@ -1949,7 +1951,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConnectClusterRequest() ); @@ -1985,7 +1987,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2009,7 +2011,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2032,7 +2034,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() ); @@ -2067,7 +2069,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() ); @@ -2123,7 +2125,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() ); @@ -2156,7 +2158,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConnectClusterRequest() ); @@ -2191,7 +2193,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2215,7 +2217,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2238,7 +2240,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() ); @@ -2280,7 +2282,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() ); @@ -2339,7 +2341,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() ); @@ -2372,7 +2374,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() ); @@ -2435,7 +2437,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() ); @@ -2487,7 +2489,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() ); @@ -2539,7 +2541,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectClustersRequest() ); @@ -2584,7 +2586,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() ); @@ -2625,7 +2627,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() ); @@ -2682,7 +2684,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() ); @@ -2715,7 +2717,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() ); @@ -2777,7 +2779,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() ); @@ -2828,7 +2830,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() ); @@ -2879,7 +2881,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConnectorsRequest() ); @@ -2922,7 +2924,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2954,7 +2956,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3000,7 +3002,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3037,7 +3039,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3087,7 +3089,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3130,7 +3132,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3215,7 +3217,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3301,7 +3303,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3403,8 +3405,7 @@ describe('v1.ManagedKafkaConnectClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3425,7 +3426,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3434,8 +3435,7 @@ describe('v1.ManagedKafkaConnectClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3451,7 +3451,7 @@ describe('v1.ManagedKafkaConnectClient', () => { }); describe('Path templates', () => { - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -3464,7 +3464,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3517,7 +3517,7 @@ describe('v1.ManagedKafkaConnectClient', () => { }); }); - describe('connectCluster', () => { + describe('connectCluster', async () => { const fakePath = '/rendered/path/connectCluster'; const expectedParameters = { project: 'projectValue', @@ -3530,7 +3530,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.connectClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3584,7 +3584,7 @@ describe('v1.ManagedKafkaConnectClient', () => { }); }); - describe('connector', () => { + describe('connector', async () => { const fakePath = '/rendered/path/connector'; const expectedParameters = { project: 'projectValue', @@ -3598,7 +3598,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3662,7 +3662,7 @@ describe('v1.ManagedKafkaConnectClient', () => { }); }); - describe('consumerGroup', () => { + describe('consumerGroup', async () => { const fakePath = '/rendered/path/consumerGroup'; const expectedParameters = { project: 'projectValue', @@ -3676,7 +3676,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.consumerGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3740,7 +3740,7 @@ describe('v1.ManagedKafkaConnectClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3752,7 +3752,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3791,7 +3791,7 @@ describe('v1.ManagedKafkaConnectClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3802,7 +3802,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3831,7 +3831,7 @@ describe('v1.ManagedKafkaConnectClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -3845,7 +3845,7 @@ describe('v1.ManagedKafkaConnectClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts index 41d7e79ee32..1b89a16edf8 100644 --- a/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts +++ b/packages/google-cloud-managedkafka/test/gapic_managed_kafka_v1.ts @@ -292,7 +292,9 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.managedKafkaStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetClusterRequest() ); @@ -382,7 +384,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetClusterRequest() ); @@ -429,7 +431,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetClusterRequest() ); @@ -460,7 +462,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetClusterRequest() ); @@ -481,7 +483,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetTopicRequest() ); @@ -512,7 +514,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetTopicRequest() ); @@ -559,7 +561,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetTopicRequest() ); @@ -587,7 +589,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetTopicRequest() ); @@ -608,7 +610,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateTopicRequest() ); @@ -639,7 +641,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateTopicRequest() ); @@ -686,7 +688,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateTopicRequest() ); @@ -717,7 +719,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateTopicRequest() ); @@ -738,7 +740,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateTopicRequest() ); @@ -770,7 +772,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateTopicRequest() ); @@ -818,7 +820,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateTopicRequest() ); @@ -850,7 +852,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateTopicRequest() ); @@ -872,7 +874,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteTopicRequest() ); @@ -903,7 +905,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteTopicRequest() ); @@ -950,7 +952,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteTopicRequest() ); @@ -981,7 +983,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteTopicRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConsumerGroupRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConsumerGroupRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConsumerGroupRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.GetConsumerGroupRequest() ); @@ -1132,7 +1134,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest() ); @@ -1165,7 +1167,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest() ); @@ -1245,7 +1247,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest() ); @@ -1267,7 +1269,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest() ); @@ -1299,7 +1301,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest() ); @@ -1377,7 +1379,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest() ); @@ -1398,7 +1400,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateClusterRequest() ); @@ -1431,7 +1433,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateClusterRequest() ); @@ -1485,7 +1487,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateClusterRequest() ); @@ -1516,7 +1518,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.CreateClusterRequest() ); @@ -1549,7 +1551,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1571,7 +1573,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1592,7 +1594,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateClusterRequest() ); @@ -1626,7 +1628,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateClusterRequest() ); @@ -1681,7 +1683,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateClusterRequest() ); @@ -1713,7 +1715,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.UpdateClusterRequest() ); @@ -1747,7 +1749,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1769,7 +1771,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1790,7 +1792,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteClusterRequest() ); @@ -1823,7 +1825,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteClusterRequest() ); @@ -1877,7 +1879,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteClusterRequest() ); @@ -1908,7 +1910,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.DeleteClusterRequest() ); @@ -1941,7 +1943,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1963,7 +1965,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1984,7 +1986,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListClustersRequest() ); @@ -2023,7 +2025,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListClustersRequest() ); @@ -2078,7 +2080,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListClustersRequest() ); @@ -2109,7 +2111,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListClustersRequest() ); @@ -2169,7 +2171,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListClustersRequest() ); @@ -2220,7 +2222,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListClustersRequest() ); @@ -2269,7 +2271,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListClustersRequest() ); @@ -2311,7 +2313,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListTopicsRequest() ); @@ -2344,7 +2346,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListTopicsRequest() ); @@ -2393,7 +2395,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListTopicsRequest() ); @@ -2424,7 +2426,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListTopicsRequest() ); @@ -2478,7 +2480,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListTopicsRequest() ); @@ -2529,7 +2531,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListTopicsRequest() ); @@ -2572,7 +2574,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListTopicsRequest() ); @@ -2616,7 +2618,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConsumerGroupsRequest() ); @@ -2656,7 +2658,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConsumerGroupsRequest() ); @@ -2711,7 +2713,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConsumerGroupsRequest() ); @@ -2742,7 +2744,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConsumerGroupsRequest() ); @@ -2803,7 +2805,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConsumerGroupsRequest() ); @@ -2853,7 +2855,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConsumerGroupsRequest() ); @@ -2903,7 +2905,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.managedkafka.v1.ListConsumerGroupsRequest() ); @@ -2945,7 +2947,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2975,7 +2977,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3019,7 +3021,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3054,7 +3056,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3102,7 +3104,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3143,7 +3145,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3222,7 +3224,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3302,7 +3304,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3398,8 +3400,7 @@ describe('v1.ManagedKafkaClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3418,7 +3419,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3427,8 +3428,7 @@ describe('v1.ManagedKafkaClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3444,7 +3444,7 @@ describe('v1.ManagedKafkaClient', () => { }); describe('Path templates', () => { - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -3455,7 +3455,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3508,7 +3508,7 @@ describe('v1.ManagedKafkaClient', () => { }); }); - describe('connectCluster', () => { + describe('connectCluster', async () => { const fakePath = '/rendered/path/connectCluster'; const expectedParameters = { project: 'projectValue', @@ -3519,7 +3519,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3573,7 +3573,7 @@ describe('v1.ManagedKafkaClient', () => { }); }); - describe('connector', () => { + describe('connector', async () => { const fakePath = '/rendered/path/connector'; const expectedParameters = { project: 'projectValue', @@ -3585,7 +3585,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3649,7 +3649,7 @@ describe('v1.ManagedKafkaClient', () => { }); }); - describe('consumerGroup', () => { + describe('consumerGroup', async () => { const fakePath = '/rendered/path/consumerGroup'; const expectedParameters = { project: 'projectValue', @@ -3661,7 +3661,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.consumerGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3725,7 +3725,7 @@ describe('v1.ManagedKafkaClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3735,7 +3735,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3774,7 +3774,7 @@ describe('v1.ManagedKafkaClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3783,7 +3783,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3812,7 +3812,7 @@ describe('v1.ManagedKafkaClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -3824,7 +3824,7 @@ describe('v1.ManagedKafkaClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-mediatranslation/package.json b/packages/google-cloud-mediatranslation/package.json index 0fd328d8298..fb07dcbd71f 100644 --- a/packages/google-cloud-mediatranslation/package.json +++ b/packages/google-cloud-mediatranslation/package.json @@ -33,7 +33,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json index f2b2c15c135..0f3b5949424 100644 --- a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json +++ b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mediatranslation", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json index f2b2c15c135..0f3b5949424 100644 --- a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json +++ b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mediatranslation", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-mediatranslation/src/v1beta1/speech_translation_service_client.ts b/packages/google-cloud-mediatranslation/src/v1beta1/speech_translation_service_client.ts index 1f88d9e8a1b..f88852c14ed 100644 --- a/packages/google-cloud-mediatranslation/src/v1beta1/speech_translation_service_client.ts +++ b/packages/google-cloud-mediatranslation/src/v1beta1/speech_translation_service_client.ts @@ -399,7 +399,9 @@ export class SpeechTranslationServiceClient { * region_tag:mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_async */ streamingTranslateSpeech(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingTranslateSpeech stream %j', options); return this.innerApiCalls.streamingTranslateSpeech(null, options); } diff --git a/packages/google-cloud-mediatranslation/test/gapic_speech_translation_service_v1beta1.ts b/packages/google-cloud-mediatranslation/test/gapic_speech_translation_service_v1beta1.ts index c59ba6d713f..e89aee49b6b 100644 --- a/packages/google-cloud-mediatranslation/test/gapic_speech_translation_service_v1beta1.ts +++ b/packages/google-cloud-mediatranslation/test/gapic_speech_translation_service_v1beta1.ts @@ -212,7 +212,9 @@ describe('v1beta1.SpeechTranslationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.speechTranslationServiceStub); client.close().then(() => { done(); @@ -283,7 +285,7 @@ describe('v1beta1.SpeechTranslationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest() ); @@ -331,7 +333,7 @@ describe('v1beta1.SpeechTranslationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest() ); diff --git a/packages/google-cloud-memcache/package.json b/packages/google-cloud-memcache/package.json index 9b43f93106c..7d6d0ea45e3 100644 --- a/packages/google-cloud-memcache/package.json +++ b/packages/google-cloud-memcache/package.json @@ -33,7 +33,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json index 965f9a9fb96..7be272d41e7 100644 --- a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json +++ b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json index 965f9a9fb96..7be272d41e7 100644 --- a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json +++ b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json index 504a0d3b9ec..b987b8a1c38 100644 --- a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json +++ b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json index 504a0d3b9ec..b987b8a1c38 100644 --- a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json +++ b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/src/v1/cloud_memcache_client.ts b/packages/google-cloud-memcache/src/v1/cloud_memcache_client.ts index 7648542e54b..1aacc753e61 100644 --- a/packages/google-cloud-memcache/src/v1/cloud_memcache_client.ts +++ b/packages/google-cloud-memcache/src/v1/cloud_memcache_client.ts @@ -616,7 +616,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -760,7 +762,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -932,7 +936,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1107,7 +1113,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1276,7 +1284,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1451,7 +1461,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1626,7 +1638,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1795,7 +1809,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.memcache.v1.IListInstancesRequest, @@ -1873,7 +1889,9 @@ export class CloudMemcacheClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1933,7 +1951,9 @@ export class CloudMemcacheClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2113,7 +2133,7 @@ export class CloudMemcacheClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-memcache/src/v1beta2/cloud_memcache_client.ts b/packages/google-cloud-memcache/src/v1beta2/cloud_memcache_client.ts index c19bcb84bf5..eecb1ef9bbd 100644 --- a/packages/google-cloud-memcache/src/v1beta2/cloud_memcache_client.ts +++ b/packages/google-cloud-memcache/src/v1beta2/cloud_memcache_client.ts @@ -634,7 +634,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -778,7 +780,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -950,7 +954,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ 'resource.name': request.resource!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1125,7 +1131,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1294,7 +1302,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1469,7 +1479,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1644,7 +1656,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1819,7 +1833,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1994,7 +2010,9 @@ export class CloudMemcacheClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.memcache.v1beta2.IListInstancesRequest, @@ -2072,7 +2090,9 @@ export class CloudMemcacheClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -2132,7 +2152,9 @@ export class CloudMemcacheClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2312,7 +2334,7 @@ export class CloudMemcacheClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1.ts b/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1.ts index 4b68cd8af0b..a2dc1588d6a 100644 --- a/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1.ts +++ b/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1.ts @@ -289,7 +289,9 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudMemcacheStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.GetInstanceRequest() ); @@ -379,7 +381,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.GetInstanceRequest() ); @@ -426,7 +428,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.GetInstanceRequest() ); @@ -457,7 +459,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.GetInstanceRequest() ); @@ -478,7 +480,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.CreateInstanceRequest() ); @@ -511,7 +513,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.CreateInstanceRequest() ); @@ -565,7 +567,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.CreateInstanceRequest() ); @@ -596,7 +598,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.CreateInstanceRequest() ); @@ -629,7 +631,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -651,7 +653,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -672,7 +674,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateInstanceRequest() ); @@ -706,7 +708,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateInstanceRequest() ); @@ -761,7 +763,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateInstanceRequest() ); @@ -793,7 +795,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateInstanceRequest() ); @@ -827,7 +829,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -849,7 +851,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -870,7 +872,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateParametersRequest() ); @@ -903,7 +905,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateParametersRequest() ); @@ -957,7 +959,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateParametersRequest() ); @@ -988,7 +990,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.UpdateParametersRequest() ); @@ -1021,7 +1023,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1043,7 +1045,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1064,7 +1066,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.DeleteInstanceRequest() ); @@ -1097,7 +1099,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.DeleteInstanceRequest() ); @@ -1151,7 +1153,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.DeleteInstanceRequest() ); @@ -1182,7 +1184,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.DeleteInstanceRequest() ); @@ -1215,7 +1217,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1237,7 +1239,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1258,7 +1260,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ApplyParametersRequest() ); @@ -1291,7 +1293,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ApplyParametersRequest() ); @@ -1345,7 +1347,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ApplyParametersRequest() ); @@ -1376,7 +1378,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ApplyParametersRequest() ); @@ -1409,7 +1411,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1431,7 +1433,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1452,7 +1454,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.RescheduleMaintenanceRequest() ); @@ -1485,7 +1487,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.RescheduleMaintenanceRequest() ); @@ -1539,7 +1541,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.RescheduleMaintenanceRequest() ); @@ -1573,7 +1575,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.RescheduleMaintenanceRequest() ); @@ -1606,7 +1608,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1628,7 +1630,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1649,7 +1651,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ListInstancesRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ListInstancesRequest() ); @@ -1731,7 +1733,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ListInstancesRequest() ); @@ -1762,7 +1764,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ListInstancesRequest() ); @@ -1816,7 +1818,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ListInstancesRequest() ); @@ -1865,7 +1867,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ListInstancesRequest() ); @@ -1908,7 +1910,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1.ListInstancesRequest() ); @@ -1949,7 +1951,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1979,7 +1981,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2023,7 +2025,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2058,7 +2060,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2106,7 +2108,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2147,7 +2149,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2226,7 +2228,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2306,7 +2308,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2402,8 +2404,7 @@ describe('v1.CloudMemcacheClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2422,7 +2423,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2431,8 +2432,7 @@ describe('v1.CloudMemcacheClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2448,7 +2448,7 @@ describe('v1.CloudMemcacheClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2459,7 +2459,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2512,7 +2512,7 @@ describe('v1.CloudMemcacheClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2522,7 +2522,7 @@ describe('v1.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1beta2.ts b/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1beta2.ts index 67d77d5e6a9..560f3df9f86 100644 --- a/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1beta2.ts +++ b/packages/google-cloud-memcache/test/gapic_cloud_memcache_v1beta2.ts @@ -289,7 +289,9 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudMemcacheStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.GetInstanceRequest() ); @@ -379,7 +381,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.GetInstanceRequest() ); @@ -426,7 +428,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.GetInstanceRequest() ); @@ -457,7 +459,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.GetInstanceRequest() ); @@ -478,7 +480,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.CreateInstanceRequest() ); @@ -511,7 +513,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.CreateInstanceRequest() ); @@ -565,7 +567,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.CreateInstanceRequest() ); @@ -596,7 +598,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.CreateInstanceRequest() ); @@ -629,7 +631,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -651,7 +653,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -672,7 +674,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateInstanceRequest() ); @@ -706,7 +708,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateInstanceRequest() ); @@ -761,7 +763,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateInstanceRequest() ); @@ -793,7 +795,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateInstanceRequest() ); @@ -827,7 +829,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -849,7 +851,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -870,7 +872,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateParametersRequest() ); @@ -903,7 +905,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateParametersRequest() ); @@ -957,7 +959,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateParametersRequest() ); @@ -988,7 +990,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.UpdateParametersRequest() ); @@ -1021,7 +1023,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1043,7 +1045,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1064,7 +1066,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.DeleteInstanceRequest() ); @@ -1097,7 +1099,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.DeleteInstanceRequest() ); @@ -1151,7 +1153,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.DeleteInstanceRequest() ); @@ -1182,7 +1184,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.DeleteInstanceRequest() ); @@ -1215,7 +1217,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1237,7 +1239,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1258,7 +1260,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplyParametersRequest() ); @@ -1291,7 +1293,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplyParametersRequest() ); @@ -1345,7 +1347,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplyParametersRequest() ); @@ -1376,7 +1378,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplyParametersRequest() ); @@ -1409,7 +1411,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1431,7 +1433,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1452,7 +1454,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplySoftwareUpdateRequest() ); @@ -1485,7 +1487,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplySoftwareUpdateRequest() ); @@ -1539,7 +1541,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplySoftwareUpdateRequest() ); @@ -1570,7 +1572,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ApplySoftwareUpdateRequest() ); @@ -1603,7 +1605,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1625,7 +1627,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1646,7 +1648,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.RescheduleMaintenanceRequest() ); @@ -1679,7 +1681,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.RescheduleMaintenanceRequest() ); @@ -1733,7 +1735,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.RescheduleMaintenanceRequest() ); @@ -1767,7 +1769,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.RescheduleMaintenanceRequest() ); @@ -1800,7 +1802,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1822,7 +1824,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1843,7 +1845,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ListInstancesRequest() ); @@ -1882,7 +1884,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ListInstancesRequest() ); @@ -1937,7 +1939,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ListInstancesRequest() ); @@ -1968,7 +1970,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ListInstancesRequest() ); @@ -2028,7 +2030,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ListInstancesRequest() ); @@ -2077,7 +2079,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ListInstancesRequest() ); @@ -2126,7 +2128,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memcache.v1beta2.ListInstancesRequest() ); @@ -2167,7 +2169,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2197,7 +2199,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2241,7 +2243,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2276,7 +2278,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2324,7 +2326,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2365,7 +2367,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2444,7 +2446,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2524,7 +2526,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2620,8 +2622,7 @@ describe('v1beta2.CloudMemcacheClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2640,7 +2641,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2649,8 +2650,7 @@ describe('v1beta2.CloudMemcacheClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2666,7 +2666,7 @@ describe('v1beta2.CloudMemcacheClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2677,7 +2677,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2730,7 +2730,7 @@ describe('v1beta2.CloudMemcacheClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2740,7 +2740,7 @@ describe('v1beta2.CloudMemcacheClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-memorystore/package.json b/packages/google-cloud-memorystore/package.json index cdcd2c115cd..32dbe6b0ba1 100644 --- a/packages/google-cloud-memorystore/package.json +++ b/packages/google-cloud-memorystore/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json b/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json index 1876601e312..d04cd332b7b 100644 --- a/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json +++ b/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memorystore", - "version": "0.1.1", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json b/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json index c092c8c2c15..ff054812155 100644 --- a/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json +++ b/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memorystore", - "version": "0.1.1", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memorystore/src/v1/memorystore_client.ts b/packages/google-cloud-memorystore/src/v1/memorystore_client.ts index 576e2270e82..6c612647abc 100644 --- a/packages/google-cloud-memorystore/src/v1/memorystore_client.ts +++ b/packages/google-cloud-memorystore/src/v1/memorystore_client.ts @@ -584,7 +584,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -708,7 +710,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateAuthority request %j', request); const wrappedCallback: | Callback< @@ -868,7 +872,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1052,7 +1058,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1234,7 +1242,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1403,7 +1413,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.memorystore.v1.IListInstancesRequest, @@ -1475,7 +1487,9 @@ export class MemorystoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1529,7 +1543,9 @@ export class MemorystoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -1709,7 +1725,7 @@ export class MemorystoreClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts b/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts index 0b95de6e3bd..698d527dd81 100644 --- a/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts +++ b/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts @@ -590,7 +590,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -717,7 +719,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateAuthority request %j', request); const wrappedCallback: | Callback< @@ -877,7 +881,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1061,7 +1067,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1243,7 +1251,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1412,7 +1422,9 @@ export class MemorystoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.memorystore.v1beta.IListInstancesRequest, @@ -1484,7 +1496,9 @@ export class MemorystoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1538,7 +1552,9 @@ export class MemorystoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -1718,7 +1734,7 @@ export class MemorystoreClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts b/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts index 643f851db7d..234d10ecbff 100644 --- a/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts +++ b/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts @@ -301,7 +301,9 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.memorystoreStub); client.close().then(() => { done(); @@ -360,7 +362,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetInstanceRequest() ); @@ -391,7 +393,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetInstanceRequest() ); @@ -438,7 +440,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetInstanceRequest() ); @@ -469,7 +471,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetInstanceRequest() ); @@ -490,7 +492,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetCertificateAuthorityRequest() ); @@ -522,7 +524,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetCertificateAuthorityRequest() ); @@ -569,7 +571,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetCertificateAuthorityRequest() ); @@ -603,7 +605,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.GetCertificateAuthorityRequest() ); @@ -627,7 +629,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.CreateInstanceRequest() ); @@ -660,7 +662,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.CreateInstanceRequest() ); @@ -714,7 +716,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.CreateInstanceRequest() ); @@ -745,7 +747,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.CreateInstanceRequest() ); @@ -778,7 +780,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -800,7 +802,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -821,7 +823,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.UpdateInstanceRequest() ); @@ -855,7 +857,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.UpdateInstanceRequest() ); @@ -910,7 +912,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.UpdateInstanceRequest() ); @@ -942,7 +944,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.UpdateInstanceRequest() ); @@ -976,7 +978,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -998,7 +1000,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1019,7 +1021,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.DeleteInstanceRequest() ); @@ -1052,7 +1054,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.DeleteInstanceRequest() ); @@ -1106,7 +1108,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.DeleteInstanceRequest() ); @@ -1137,7 +1139,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.DeleteInstanceRequest() ); @@ -1170,7 +1172,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1192,7 +1194,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1213,7 +1215,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.ListInstancesRequest() ); @@ -1252,7 +1254,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.ListInstancesRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.ListInstancesRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.ListInstancesRequest() ); @@ -1398,7 +1400,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.ListInstancesRequest() ); @@ -1447,7 +1449,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.ListInstancesRequest() ); @@ -1496,7 +1498,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1.ListInstancesRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1567,7 +1569,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1611,7 +1613,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1735,7 +1737,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1814,7 +1816,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1894,7 +1896,7 @@ describe('v1.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1990,8 +1992,7 @@ describe('v1.MemorystoreClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2010,7 +2011,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2019,8 +2020,7 @@ describe('v1.MemorystoreClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2036,7 +2036,7 @@ describe('v1.MemorystoreClient', () => { }); describe('Path templates', () => { - describe('certificateAuthority', () => { + describe('certificateAuthority', async () => { const fakePath = '/rendered/path/certificateAuthority'; const expectedParameters = { project: 'projectValue', @@ -2047,7 +2047,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2115,7 +2115,7 @@ describe('v1.MemorystoreClient', () => { }); }); - describe('forwardingRule', () => { + describe('forwardingRule', async () => { const fakePath = '/rendered/path/forwardingRule'; const expectedParameters = { project: 'projectValue', @@ -2126,7 +2126,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.forwardingRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2180,7 +2180,7 @@ describe('v1.MemorystoreClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2191,7 +2191,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2244,7 +2244,7 @@ describe('v1.MemorystoreClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2254,7 +2254,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2293,7 +2293,7 @@ describe('v1.MemorystoreClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -2303,7 +2303,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2342,7 +2342,7 @@ describe('v1.MemorystoreClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2351,7 +2351,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2380,7 +2380,7 @@ describe('v1.MemorystoreClient', () => { }); }); - describe('serviceAttachment', () => { + describe('serviceAttachment', async () => { const fakePath = '/rendered/path/serviceAttachment'; const expectedParameters = { project: 'projectValue', @@ -2391,7 +2391,7 @@ describe('v1.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts b/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts index cf07262e19d..857d1a2d14e 100644 --- a/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts +++ b/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts @@ -303,7 +303,9 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.memorystoreStub); client.close().then(() => { done(); @@ -362,7 +364,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetInstanceRequest() ); @@ -393,7 +395,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetInstanceRequest() ); @@ -440,7 +442,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetInstanceRequest() ); @@ -471,7 +473,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetInstanceRequest() ); @@ -492,7 +494,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest() ); @@ -524,7 +526,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest() ); @@ -571,7 +573,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest() ); @@ -605,7 +607,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest() ); @@ -629,7 +631,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.CreateInstanceRequest() ); @@ -662,7 +664,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.CreateInstanceRequest() ); @@ -716,7 +718,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.CreateInstanceRequest() ); @@ -747,7 +749,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.CreateInstanceRequest() ); @@ -780,7 +782,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -802,7 +804,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -823,7 +825,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.UpdateInstanceRequest() ); @@ -857,7 +859,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.UpdateInstanceRequest() ); @@ -912,7 +914,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.UpdateInstanceRequest() ); @@ -944,7 +946,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.UpdateInstanceRequest() ); @@ -978,7 +980,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1000,7 +1002,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1021,7 +1023,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.DeleteInstanceRequest() ); @@ -1054,7 +1056,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.DeleteInstanceRequest() ); @@ -1108,7 +1110,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.DeleteInstanceRequest() ); @@ -1139,7 +1141,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.DeleteInstanceRequest() ); @@ -1172,7 +1174,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1194,7 +1196,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1215,7 +1217,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.ListInstancesRequest() ); @@ -1254,7 +1256,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.ListInstancesRequest() ); @@ -1309,7 +1311,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.ListInstancesRequest() ); @@ -1340,7 +1342,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.ListInstancesRequest() ); @@ -1400,7 +1402,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.ListInstancesRequest() ); @@ -1449,7 +1451,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.ListInstancesRequest() ); @@ -1498,7 +1500,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.memorystore.v1beta.ListInstancesRequest() ); @@ -1540,7 +1542,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1570,7 +1572,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1614,7 +1616,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1649,7 +1651,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1697,7 +1699,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1738,7 +1740,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1817,7 +1819,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1897,7 +1899,7 @@ describe('v1beta.MemorystoreClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1993,8 +1995,7 @@ describe('v1beta.MemorystoreClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2013,7 +2014,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2022,8 +2023,7 @@ describe('v1beta.MemorystoreClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2039,7 +2039,7 @@ describe('v1beta.MemorystoreClient', () => { }); describe('Path templates', () => { - describe('certificateAuthority', () => { + describe('certificateAuthority', async () => { const fakePath = '/rendered/path/certificateAuthority'; const expectedParameters = { project: 'projectValue', @@ -2050,7 +2050,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2118,7 +2118,7 @@ describe('v1beta.MemorystoreClient', () => { }); }); - describe('forwardingRule', () => { + describe('forwardingRule', async () => { const fakePath = '/rendered/path/forwardingRule'; const expectedParameters = { project: 'projectValue', @@ -2129,7 +2129,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.forwardingRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2183,7 +2183,7 @@ describe('v1beta.MemorystoreClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2194,7 +2194,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2247,7 +2247,7 @@ describe('v1beta.MemorystoreClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2257,7 +2257,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2296,7 +2296,7 @@ describe('v1beta.MemorystoreClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -2306,7 +2306,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2345,7 +2345,7 @@ describe('v1beta.MemorystoreClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2354,7 +2354,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2383,7 +2383,7 @@ describe('v1beta.MemorystoreClient', () => { }); }); - describe('serviceAttachment', () => { + describe('serviceAttachment', async () => { const fakePath = '/rendered/path/serviceAttachment'; const expectedParameters = { project: 'projectValue', @@ -2394,7 +2394,7 @@ describe('v1beta.MemorystoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-metastore/package.json b/packages/google-cloud-metastore/package.json index cafa8a344e3..66e48be6468 100644 --- a/packages/google-cloud-metastore/package.json +++ b/packages/google-cloud-metastore/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json index df94895e087..b1ed718789b 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json +++ b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "4.4.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json index df94895e087..b1ed718789b 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json +++ b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "4.4.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json index 0a431a50de5..62eeffd17de 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "4.4.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json index 0a431a50de5..62eeffd17de 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "4.4.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json index fc1613e187d..11d75c7aabd 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json +++ b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "4.4.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json index fc1613e187d..11d75c7aabd 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json +++ b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "4.4.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts index 3b7c0c24d43..4748b6c63df 100644 --- a/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts @@ -765,7 +765,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -884,7 +886,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMetadataImport request %j', request); const wrappedCallback: | Callback< @@ -998,7 +1002,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1152,7 +1158,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1341,7 +1349,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ 'service.name': request.service!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1524,7 +1534,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1718,7 +1730,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1908,7 +1922,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ 'metadata_import.name': request.metadataImport!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2098,7 +2114,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2288,7 +2306,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2481,7 +2501,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2664,7 +2686,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2837,7 +2861,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3013,7 +3039,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3196,7 +3224,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3378,7 +3408,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1.IListServicesRequest, @@ -3463,7 +3495,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -3530,7 +3564,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -3651,7 +3687,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1.IListMetadataImportsRequest, @@ -3735,7 +3773,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listMetadataImports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataImports stream %j', request); return this.descriptors.page.listMetadataImports.createStream( this.innerApiCalls.listMetadataImports as GaxCall, @@ -3801,7 +3841,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listMetadataImports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataImports iterate %j', request); return this.descriptors.page.listMetadataImports.asyncIterate( this.innerApiCalls['listMetadataImports'] as GaxCall, @@ -3916,7 +3958,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1.IListBackupsRequest, @@ -4000,7 +4044,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -4066,7 +4112,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -4384,7 +4432,7 @@ export class DataprocMetastoreClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts index 366cdd4eac9..ba6bd8aed9f 100644 --- a/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts @@ -634,7 +634,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFederation request %j', request); const wrappedCallback: | Callback< @@ -790,7 +792,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -979,7 +983,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ 'federation.name': request.federation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1162,7 +1168,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1342,7 +1350,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1.IListFederationsRequest, @@ -1425,7 +1435,9 @@ export class DataprocMetastoreFederationClient { }); const defaultCallSettings = this._defaults['listFederations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFederations stream %j', request); return this.descriptors.page.listFederations.createStream( this.innerApiCalls.listFederations as GaxCall, @@ -1490,7 +1502,9 @@ export class DataprocMetastoreFederationClient { }); const defaultCallSettings = this._defaults['listFederations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFederations iterate %j', request); return this.descriptors.page.listFederations.asyncIterate( this.innerApiCalls['listFederations'] as GaxCall, @@ -1808,7 +1822,7 @@ export class DataprocMetastoreFederationClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts index 6bbd9ecfcf3..66ea3bc30c5 100644 --- a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts @@ -802,7 +802,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -927,7 +929,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMetadataImport request %j', request); const wrappedCallback: | Callback< @@ -1049,7 +1053,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1173,7 +1179,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1332,7 +1340,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1521,7 +1531,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ 'service.name': request.service!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1704,7 +1716,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1898,7 +1912,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2088,7 +2104,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ 'metadata_import.name': request.metadataImport!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2278,7 +2296,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2468,7 +2488,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2661,7 +2683,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2844,7 +2868,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3017,7 +3043,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3193,7 +3221,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3376,7 +3406,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3564,7 +3596,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1alpha.IListServicesRequest, @@ -3649,7 +3683,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -3716,7 +3752,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -3837,7 +3875,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1alpha.IListMetadataImportsRequest, @@ -3921,7 +3961,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listMetadataImports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataImports stream %j', request); return this.descriptors.page.listMetadataImports.createStream( this.innerApiCalls.listMetadataImports as GaxCall, @@ -3987,7 +4029,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listMetadataImports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataImports iterate %j', request); return this.descriptors.page.listMetadataImports.asyncIterate( this.innerApiCalls['listMetadataImports'] as GaxCall, @@ -4108,7 +4152,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1alpha.IListBackupsRequest, @@ -4192,7 +4238,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -4258,7 +4306,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -4576,7 +4626,7 @@ export class DataprocMetastoreClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts index 46a6a0e0df1..af066a76bee 100644 --- a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts @@ -666,7 +666,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFederation request %j', request); const wrappedCallback: | Callback< @@ -825,7 +827,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1014,7 +1018,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ 'federation.name': request.federation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1197,7 +1203,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1377,7 +1385,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1alpha.IListFederationsRequest, @@ -1460,7 +1470,9 @@ export class DataprocMetastoreFederationClient { }); const defaultCallSettings = this._defaults['listFederations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFederations stream %j', request); return this.descriptors.page.listFederations.createStream( this.innerApiCalls.listFederations as GaxCall, @@ -1525,7 +1537,9 @@ export class DataprocMetastoreFederationClient { }); const defaultCallSettings = this._defaults['listFederations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFederations iterate %j', request); return this.descriptors.page.listFederations.asyncIterate( this.innerApiCalls['listFederations'] as GaxCall, @@ -1843,7 +1857,7 @@ export class DataprocMetastoreFederationClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts index 5e06796ae91..dad2d6f819a 100644 --- a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts @@ -801,7 +801,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -926,7 +928,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMetadataImport request %j', request); const wrappedCallback: | Callback< @@ -1042,7 +1046,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1166,7 +1172,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1325,7 +1333,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1514,7 +1524,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ 'service.name': request.service!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1697,7 +1709,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1891,7 +1905,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2081,7 +2097,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ 'metadata_import.name': request.metadataImport!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2271,7 +2289,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2461,7 +2481,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2654,7 +2676,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2837,7 +2861,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3010,7 +3036,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3186,7 +3214,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3369,7 +3399,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ service: request.service ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3557,7 +3589,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1beta.IListServicesRequest, @@ -3642,7 +3676,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -3709,7 +3745,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -3830,7 +3868,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1beta.IListMetadataImportsRequest, @@ -3914,7 +3954,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listMetadataImports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataImports stream %j', request); return this.descriptors.page.listMetadataImports.createStream( this.innerApiCalls.listMetadataImports as GaxCall, @@ -3980,7 +4022,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listMetadataImports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataImports iterate %j', request); return this.descriptors.page.listMetadataImports.asyncIterate( this.innerApiCalls['listMetadataImports'] as GaxCall, @@ -4101,7 +4145,9 @@ export class DataprocMetastoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1beta.IListBackupsRequest, @@ -4185,7 +4231,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -4251,7 +4299,9 @@ export class DataprocMetastoreClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -4569,7 +4619,7 @@ export class DataprocMetastoreClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts index ba5594c52ca..89577ef14c9 100644 --- a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts @@ -666,7 +666,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFederation request %j', request); const wrappedCallback: | Callback< @@ -825,7 +827,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1014,7 +1018,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ 'federation.name': request.federation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1197,7 +1203,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1377,7 +1385,9 @@ export class DataprocMetastoreFederationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.metastore.v1beta.IListFederationsRequest, @@ -1460,7 +1470,9 @@ export class DataprocMetastoreFederationClient { }); const defaultCallSettings = this._defaults['listFederations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFederations stream %j', request); return this.descriptors.page.listFederations.createStream( this.innerApiCalls.listFederations as GaxCall, @@ -1525,7 +1537,9 @@ export class DataprocMetastoreFederationClient { }); const defaultCallSettings = this._defaults['listFederations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFederations iterate %j', request); return this.descriptors.page.listFederations.asyncIterate( this.innerApiCalls['listFederations'] as GaxCall, @@ -1843,7 +1857,7 @@ export class DataprocMetastoreFederationClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1.ts index f20119247ca..1fc445f0494 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1.ts @@ -309,7 +309,9 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataprocMetastoreFederationStub); client.close().then(() => { done(); @@ -380,7 +382,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetFederationRequest() ); @@ -414,7 +416,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetFederationRequest() ); @@ -464,7 +466,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetFederationRequest() ); @@ -498,7 +500,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetFederationRequest() ); @@ -522,7 +524,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateFederationRequest() ); @@ -558,7 +560,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateFederationRequest() ); @@ -615,7 +617,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateFederationRequest() ); @@ -649,7 +651,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateFederationRequest() ); @@ -685,7 +687,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -710,7 +712,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -734,7 +736,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateFederationRequest() ); @@ -771,7 +773,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateFederationRequest() ); @@ -829,7 +831,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateFederationRequest() ); @@ -864,7 +866,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateFederationRequest() ); @@ -901,7 +903,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -926,7 +928,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -950,7 +952,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteFederationRequest() ); @@ -986,7 +988,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteFederationRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteFederationRequest() ); @@ -1077,7 +1079,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteFederationRequest() ); @@ -1113,7 +1115,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1138,7 +1140,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1162,7 +1164,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListFederationsRequest() ); @@ -1204,7 +1206,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListFederationsRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListFederationsRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListFederationsRequest() ); @@ -1359,7 +1361,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListFederationsRequest() ); @@ -1411,7 +1413,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListFederationsRequest() ); @@ -1463,7 +1465,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListFederationsRequest() ); @@ -1507,7 +1509,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1540,7 +1542,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1587,7 +1589,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1622,7 +1624,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1655,7 +1657,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1702,7 +1704,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1737,7 +1739,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1773,7 +1775,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1820,7 +1822,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1858,7 +1860,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1891,7 +1893,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1938,7 +1940,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1976,7 +1978,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2027,7 +2029,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2071,7 +2073,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2159,7 +2161,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2248,7 +2250,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2353,8 +2355,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2376,7 +2377,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2385,8 +2386,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2402,7 +2402,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -2417,7 +2417,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2481,7 +2481,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { }); }); - describe('federation', () => { + describe('federation', async () => { const fakePath = '/rendered/path/federation'; const expectedParameters = { project: 'projectValue', @@ -2495,7 +2495,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.federationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2548,7 +2548,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2561,7 +2561,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2600,7 +2600,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { }); }); - describe('metadataImport', () => { + describe('metadataImport', async () => { const fakePath = '/rendered/path/metadataImport'; const expectedParameters = { project: 'projectValue', @@ -2615,7 +2615,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataImportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2680,7 +2680,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2692,7 +2692,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2721,7 +2721,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -2735,7 +2735,7 @@ describe('v1.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1alpha.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1alpha.ts index f55c1d44db5..09827fc78f4 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1alpha.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1alpha.ts @@ -309,7 +309,9 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataprocMetastoreFederationStub); client.close().then(() => { done(); @@ -380,7 +382,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetFederationRequest() ); @@ -414,7 +416,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetFederationRequest() ); @@ -464,7 +466,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetFederationRequest() ); @@ -498,7 +500,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetFederationRequest() ); @@ -522,7 +524,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() ); @@ -558,7 +560,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() ); @@ -615,7 +617,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() ); @@ -649,7 +651,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateFederationRequest() ); @@ -685,7 +687,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -710,7 +712,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -734,7 +736,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() ); @@ -771,7 +773,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() ); @@ -829,7 +831,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() ); @@ -864,7 +866,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateFederationRequest() ); @@ -901,7 +903,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -926,7 +928,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -950,7 +952,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() ); @@ -986,7 +988,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() ); @@ -1043,7 +1045,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() ); @@ -1077,7 +1079,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteFederationRequest() ); @@ -1113,7 +1115,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1138,7 +1140,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1162,7 +1164,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() ); @@ -1204,7 +1206,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() ); @@ -1262,7 +1264,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() ); @@ -1296,7 +1298,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() ); @@ -1360,7 +1362,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() ); @@ -1413,7 +1415,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() ); @@ -1465,7 +1467,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListFederationsRequest() ); @@ -1510,7 +1512,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1543,7 +1545,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1590,7 +1592,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1625,7 +1627,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1658,7 +1660,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1705,7 +1707,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1740,7 +1742,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1776,7 +1778,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1823,7 +1825,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1861,7 +1863,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1894,7 +1896,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1941,7 +1943,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1979,7 +1981,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2030,7 +2032,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2074,7 +2076,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2162,7 +2164,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2251,7 +2253,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2356,8 +2358,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2379,7 +2380,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2388,8 +2389,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2405,7 +2405,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -2420,7 +2420,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2484,7 +2484,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { }); }); - describe('federation', () => { + describe('federation', async () => { const fakePath = '/rendered/path/federation'; const expectedParameters = { project: 'projectValue', @@ -2498,7 +2498,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.federationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2551,7 +2551,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2564,7 +2564,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2603,7 +2603,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { }); }); - describe('metadataImport', () => { + describe('metadataImport', async () => { const fakePath = '/rendered/path/metadataImport'; const expectedParameters = { project: 'projectValue', @@ -2618,7 +2618,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataImportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2683,7 +2683,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2695,7 +2695,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2724,7 +2724,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -2738,7 +2738,7 @@ describe('v1alpha.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1beta.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1beta.ts index a229f41b099..f84dc6f8fde 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1beta.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_federation_v1beta.ts @@ -309,7 +309,9 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataprocMetastoreFederationStub); client.close().then(() => { done(); @@ -380,7 +382,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetFederationRequest() ); @@ -414,7 +416,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetFederationRequest() ); @@ -464,7 +466,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetFederationRequest() ); @@ -498,7 +500,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetFederationRequest() ); @@ -522,7 +524,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateFederationRequest() ); @@ -558,7 +560,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateFederationRequest() ); @@ -615,7 +617,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateFederationRequest() ); @@ -649,7 +651,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateFederationRequest() ); @@ -685,7 +687,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -710,7 +712,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -734,7 +736,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() ); @@ -771,7 +773,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() ); @@ -829,7 +831,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() ); @@ -864,7 +866,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateFederationRequest() ); @@ -901,7 +903,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -926,7 +928,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -950,7 +952,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() ); @@ -986,7 +988,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() ); @@ -1043,7 +1045,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() ); @@ -1077,7 +1079,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteFederationRequest() ); @@ -1113,7 +1115,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1138,7 +1140,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1162,7 +1164,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListFederationsRequest() ); @@ -1204,7 +1206,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListFederationsRequest() ); @@ -1262,7 +1264,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListFederationsRequest() ); @@ -1296,7 +1298,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListFederationsRequest() ); @@ -1359,7 +1361,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListFederationsRequest() ); @@ -1411,7 +1413,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListFederationsRequest() ); @@ -1463,7 +1465,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListFederationsRequest() ); @@ -1508,7 +1510,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1541,7 +1543,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1588,7 +1590,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1623,7 +1625,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1656,7 +1658,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1703,7 +1705,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1738,7 +1740,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1774,7 +1776,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1821,7 +1823,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1859,7 +1861,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1892,7 +1894,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1939,7 +1941,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1977,7 +1979,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2028,7 +2030,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2072,7 +2074,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2160,7 +2162,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2249,7 +2251,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2354,8 +2356,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2377,7 +2378,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2386,8 +2387,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2403,7 +2403,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -2418,7 +2418,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2482,7 +2482,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { }); }); - describe('federation', () => { + describe('federation', async () => { const fakePath = '/rendered/path/federation'; const expectedParameters = { project: 'projectValue', @@ -2496,7 +2496,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.federationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2549,7 +2549,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2562,7 +2562,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2601,7 +2601,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { }); }); - describe('metadataImport', () => { + describe('metadataImport', async () => { const fakePath = '/rendered/path/metadataImport'; const expectedParameters = { project: 'projectValue', @@ -2616,7 +2616,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataImportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2681,7 +2681,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2693,7 +2693,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2722,7 +2722,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -2736,7 +2736,7 @@ describe('v1beta.DataprocMetastoreFederationClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts index 0bdc1f8a313..b6971db5524 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1.ts @@ -291,7 +291,9 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataprocMetastoreStub); client.close().then(() => { done(); @@ -350,7 +352,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetServiceRequest() ); @@ -381,7 +383,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetServiceRequest() ); @@ -428,7 +430,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetServiceRequest() ); @@ -459,7 +461,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetServiceRequest() ); @@ -480,7 +482,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetMetadataImportRequest() ); @@ -511,7 +513,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetMetadataImportRequest() ); @@ -558,7 +560,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetMetadataImportRequest() ); @@ -589,7 +591,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetMetadataImportRequest() ); @@ -610,7 +612,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetBackupRequest() ); @@ -641,7 +643,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetBackupRequest() ); @@ -688,7 +690,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetBackupRequest() ); @@ -716,7 +718,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.GetBackupRequest() ); @@ -737,7 +739,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateServiceRequest() ); @@ -770,7 +772,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateServiceRequest() ); @@ -824,7 +826,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateServiceRequest() ); @@ -855,7 +857,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateServiceRequest() ); @@ -888,7 +890,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -910,7 +912,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -931,7 +933,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateServiceRequest() ); @@ -965,7 +967,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateServiceRequest() ); @@ -1020,7 +1022,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateServiceRequest() ); @@ -1052,7 +1054,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateServiceRequest() ); @@ -1086,7 +1088,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1108,7 +1110,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1129,7 +1131,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteServiceRequest() ); @@ -1162,7 +1164,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteServiceRequest() ); @@ -1216,7 +1218,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteServiceRequest() ); @@ -1247,7 +1249,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteServiceRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1302,7 +1304,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1323,7 +1325,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateMetadataImportRequest() ); @@ -1356,7 +1358,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateMetadataImportRequest() ); @@ -1410,7 +1412,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateMetadataImportRequest() ); @@ -1441,7 +1443,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateMetadataImportRequest() ); @@ -1474,7 +1476,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1496,7 +1498,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1517,7 +1519,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateMetadataImportRequest() ); @@ -1551,7 +1553,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateMetadataImportRequest() ); @@ -1606,7 +1608,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateMetadataImportRequest() ); @@ -1638,7 +1640,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.UpdateMetadataImportRequest() ); @@ -1672,7 +1674,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1694,7 +1696,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1715,7 +1717,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ExportMetadataRequest() ); @@ -1748,7 +1750,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ExportMetadataRequest() ); @@ -1802,7 +1804,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ExportMetadataRequest() ); @@ -1833,7 +1835,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ExportMetadataRequest() ); @@ -1866,7 +1868,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1888,7 +1890,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1909,7 +1911,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.RestoreServiceRequest() ); @@ -1942,7 +1944,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.RestoreServiceRequest() ); @@ -1996,7 +1998,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.RestoreServiceRequest() ); @@ -2027,7 +2029,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.RestoreServiceRequest() ); @@ -2060,7 +2062,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2082,7 +2084,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2103,7 +2105,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateBackupRequest() ); @@ -2135,7 +2137,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateBackupRequest() ); @@ -2189,7 +2191,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateBackupRequest() ); @@ -2220,7 +2222,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.CreateBackupRequest() ); @@ -2253,7 +2255,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2275,7 +2277,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2293,7 +2295,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteBackupRequest() ); @@ -2325,7 +2327,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteBackupRequest() ); @@ -2379,7 +2381,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteBackupRequest() ); @@ -2410,7 +2412,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.DeleteBackupRequest() ); @@ -2443,7 +2445,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2465,7 +2467,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2483,7 +2485,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.QueryMetadataRequest() ); @@ -2516,7 +2518,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.QueryMetadataRequest() ); @@ -2570,7 +2572,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.QueryMetadataRequest() ); @@ -2601,7 +2603,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.QueryMetadataRequest() ); @@ -2634,7 +2636,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2656,7 +2658,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2677,7 +2679,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.MoveTableToDatabaseRequest() ); @@ -2710,7 +2712,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.MoveTableToDatabaseRequest() ); @@ -2764,7 +2766,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.MoveTableToDatabaseRequest() ); @@ -2795,7 +2797,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.MoveTableToDatabaseRequest() ); @@ -2828,7 +2830,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2850,7 +2852,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2871,7 +2873,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest() ); @@ -2904,7 +2906,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest() ); @@ -2958,7 +2960,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest() ); @@ -2992,7 +2994,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest() ); @@ -3025,7 +3027,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3048,7 +3050,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3069,7 +3071,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListServicesRequest() ); @@ -3102,7 +3104,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListServicesRequest() ); @@ -3151,7 +3153,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListServicesRequest() ); @@ -3182,7 +3184,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListServicesRequest() ); @@ -3236,7 +3238,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListServicesRequest() ); @@ -3287,7 +3289,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListServicesRequest() ); @@ -3330,7 +3332,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListServicesRequest() ); @@ -3372,7 +3374,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListMetadataImportsRequest() ); @@ -3412,7 +3414,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListMetadataImportsRequest() ); @@ -3467,7 +3469,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListMetadataImportsRequest() ); @@ -3498,7 +3500,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListMetadataImportsRequest() ); @@ -3558,7 +3560,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListMetadataImportsRequest() ); @@ -3607,7 +3609,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListMetadataImportsRequest() ); @@ -3656,7 +3658,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListMetadataImportsRequest() ); @@ -3699,7 +3701,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListBackupsRequest() ); @@ -3732,7 +3734,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListBackupsRequest() ); @@ -3781,7 +3783,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListBackupsRequest() ); @@ -3812,7 +3814,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListBackupsRequest() ); @@ -3866,7 +3868,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListBackupsRequest() ); @@ -3917,7 +3919,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListBackupsRequest() ); @@ -3960,7 +3962,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1.ListBackupsRequest() ); @@ -4003,7 +4005,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4033,7 +4035,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4077,7 +4079,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4109,7 +4111,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4139,7 +4141,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4183,7 +4185,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4215,7 +4217,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4248,7 +4250,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4292,7 +4294,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4327,7 +4329,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4357,7 +4359,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4401,7 +4403,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4436,7 +4438,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4484,7 +4486,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4525,7 +4527,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4604,7 +4606,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4684,7 +4686,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4780,8 +4782,7 @@ describe('v1.DataprocMetastoreClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4800,7 +4801,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4809,8 +4810,7 @@ describe('v1.DataprocMetastoreClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4826,7 +4826,7 @@ describe('v1.DataprocMetastoreClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -4838,7 +4838,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4902,7 +4902,7 @@ describe('v1.DataprocMetastoreClient', () => { }); }); - describe('federation', () => { + describe('federation', async () => { const fakePath = '/rendered/path/federation'; const expectedParameters = { project: 'projectValue', @@ -4913,7 +4913,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.federationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4966,7 +4966,7 @@ describe('v1.DataprocMetastoreClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4976,7 +4976,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5015,7 +5015,7 @@ describe('v1.DataprocMetastoreClient', () => { }); }); - describe('metadataImport', () => { + describe('metadataImport', async () => { const fakePath = '/rendered/path/metadataImport'; const expectedParameters = { project: 'projectValue', @@ -5027,7 +5027,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataImportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5092,7 +5092,7 @@ describe('v1.DataprocMetastoreClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -5102,7 +5102,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5141,7 +5141,7 @@ describe('v1.DataprocMetastoreClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5150,7 +5150,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5179,7 +5179,7 @@ describe('v1.DataprocMetastoreClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -5190,7 +5190,7 @@ describe('v1.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts index ecc3e7b253b..c7d05989c60 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1alpha.ts @@ -300,7 +300,9 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataprocMetastoreStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetServiceRequest() ); @@ -395,7 +397,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetServiceRequest() ); @@ -443,7 +445,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetServiceRequest() ); @@ -475,7 +477,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetServiceRequest() ); @@ -497,7 +499,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetMetadataImportRequest() ); @@ -529,7 +531,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetMetadataImportRequest() ); @@ -577,7 +579,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetMetadataImportRequest() ); @@ -609,7 +611,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetMetadataImportRequest() ); @@ -631,7 +633,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetBackupRequest() ); @@ -663,7 +665,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetBackupRequest() ); @@ -711,7 +713,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetBackupRequest() ); @@ -740,7 +742,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.GetBackupRequest() ); @@ -762,7 +764,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest() ); @@ -794,7 +796,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest() ); @@ -842,7 +844,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest() ); @@ -874,7 +876,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RemoveIamPolicyRequest() ); @@ -896,7 +898,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateServiceRequest() ); @@ -930,7 +932,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateServiceRequest() ); @@ -985,7 +987,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateServiceRequest() ); @@ -1017,7 +1019,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateServiceRequest() ); @@ -1051,7 +1053,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1074,7 +1076,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1096,7 +1098,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateServiceRequest() ); @@ -1131,7 +1133,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateServiceRequest() ); @@ -1187,7 +1189,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateServiceRequest() ); @@ -1220,7 +1222,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateServiceRequest() ); @@ -1255,7 +1257,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1278,7 +1280,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1300,7 +1302,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteServiceRequest() ); @@ -1334,7 +1336,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteServiceRequest() ); @@ -1389,7 +1391,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteServiceRequest() ); @@ -1421,7 +1423,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteServiceRequest() ); @@ -1455,7 +1457,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1478,7 +1480,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1500,7 +1502,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateMetadataImportRequest() ); @@ -1534,7 +1536,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateMetadataImportRequest() ); @@ -1589,7 +1591,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateMetadataImportRequest() ); @@ -1621,7 +1623,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateMetadataImportRequest() ); @@ -1655,7 +1657,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1678,7 +1680,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1700,7 +1702,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest() ); @@ -1735,7 +1737,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest() ); @@ -1791,7 +1793,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest() ); @@ -1824,7 +1826,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.UpdateMetadataImportRequest() ); @@ -1859,7 +1861,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1882,7 +1884,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1904,7 +1906,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ExportMetadataRequest() ); @@ -1938,7 +1940,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ExportMetadataRequest() ); @@ -1993,7 +1995,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ExportMetadataRequest() ); @@ -2025,7 +2027,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ExportMetadataRequest() ); @@ -2059,7 +2061,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2082,7 +2084,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2104,7 +2106,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RestoreServiceRequest() ); @@ -2138,7 +2140,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RestoreServiceRequest() ); @@ -2193,7 +2195,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RestoreServiceRequest() ); @@ -2225,7 +2227,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.RestoreServiceRequest() ); @@ -2259,7 +2261,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2282,7 +2284,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2304,7 +2306,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateBackupRequest() ); @@ -2337,7 +2339,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateBackupRequest() ); @@ -2392,7 +2394,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateBackupRequest() ); @@ -2424,7 +2426,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.CreateBackupRequest() ); @@ -2458,7 +2460,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2481,7 +2483,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2500,7 +2502,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteBackupRequest() ); @@ -2533,7 +2535,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteBackupRequest() ); @@ -2588,7 +2590,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteBackupRequest() ); @@ -2620,7 +2622,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.DeleteBackupRequest() ); @@ -2654,7 +2656,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2677,7 +2679,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2696,7 +2698,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.QueryMetadataRequest() ); @@ -2730,7 +2732,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.QueryMetadataRequest() ); @@ -2785,7 +2787,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.QueryMetadataRequest() ); @@ -2817,7 +2819,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.QueryMetadataRequest() ); @@ -2851,7 +2853,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2874,7 +2876,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2896,7 +2898,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest() ); @@ -2930,7 +2932,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest() ); @@ -2985,7 +2987,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest() ); @@ -3017,7 +3019,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest() ); @@ -3051,7 +3053,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3074,7 +3076,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3096,7 +3098,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest() ); @@ -3130,7 +3132,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest() ); @@ -3185,7 +3187,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest() ); @@ -3220,7 +3222,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest() ); @@ -3254,7 +3256,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3278,7 +3280,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3300,7 +3302,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListServicesRequest() ); @@ -3340,7 +3342,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListServicesRequest() ); @@ -3396,7 +3398,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListServicesRequest() ); @@ -3428,7 +3430,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListServicesRequest() ); @@ -3489,7 +3491,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListServicesRequest() ); @@ -3541,7 +3543,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListServicesRequest() ); @@ -3591,7 +3593,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListServicesRequest() ); @@ -3634,7 +3636,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListMetadataImportsRequest() ); @@ -3675,7 +3677,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListMetadataImportsRequest() ); @@ -3733,7 +3735,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListMetadataImportsRequest() ); @@ -3765,7 +3767,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListMetadataImportsRequest() ); @@ -3827,7 +3829,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListMetadataImportsRequest() ); @@ -3878,7 +3880,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListMetadataImportsRequest() ); @@ -3929,7 +3931,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListMetadataImportsRequest() ); @@ -3973,7 +3975,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListBackupsRequest() ); @@ -4013,7 +4015,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListBackupsRequest() ); @@ -4069,7 +4071,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListBackupsRequest() ); @@ -4101,7 +4103,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListBackupsRequest() ); @@ -4162,7 +4164,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListBackupsRequest() ); @@ -4214,7 +4216,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListBackupsRequest() ); @@ -4264,7 +4266,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1alpha.ListBackupsRequest() ); @@ -4308,7 +4310,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4339,7 +4341,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4384,7 +4386,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4417,7 +4419,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4448,7 +4450,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4493,7 +4495,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4526,7 +4528,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4560,7 +4562,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4605,7 +4607,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4641,7 +4643,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4672,7 +4674,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4717,7 +4719,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4753,7 +4755,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4802,7 +4804,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4844,7 +4846,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4926,7 +4928,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5009,7 +5011,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5108,8 +5110,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5129,7 +5130,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5138,8 +5139,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5155,7 +5155,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -5168,7 +5168,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5232,7 +5232,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); - describe('federation', () => { + describe('federation', async () => { const fakePath = '/rendered/path/federation'; const expectedParameters = { project: 'projectValue', @@ -5244,7 +5244,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.federationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5297,7 +5297,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); - describe('lake', () => { + describe('lake', async () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { project: 'projectValue', @@ -5309,7 +5309,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lakePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5362,7 +5362,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5373,7 +5373,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5412,7 +5412,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); - describe('metadataImport', () => { + describe('metadataImport', async () => { const fakePath = '/rendered/path/metadataImport'; const expectedParameters = { project: 'projectValue', @@ -5425,7 +5425,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataImportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5490,7 +5490,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -5501,7 +5501,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5540,7 +5540,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5550,7 +5550,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5579,7 +5579,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -5591,7 +5591,7 @@ describe('v1alpha.DataprocMetastoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts index c449ae0d41d..85a076627f6 100644 --- a/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts +++ b/packages/google-cloud-metastore/test/gapic_dataproc_metastore_v1beta.ts @@ -301,7 +301,9 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataprocMetastoreStub); client.close().then(() => { done(); @@ -368,7 +370,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetServiceRequest() ); @@ -401,7 +403,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetServiceRequest() ); @@ -450,7 +452,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetServiceRequest() ); @@ -483,7 +485,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetServiceRequest() ); @@ -506,7 +508,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetMetadataImportRequest() ); @@ -539,7 +541,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetMetadataImportRequest() ); @@ -588,7 +590,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetMetadataImportRequest() ); @@ -621,7 +623,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetMetadataImportRequest() ); @@ -644,7 +646,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetBackupRequest() ); @@ -677,7 +679,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetBackupRequest() ); @@ -726,7 +728,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetBackupRequest() ); @@ -756,7 +758,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.GetBackupRequest() ); @@ -779,7 +781,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RemoveIamPolicyRequest() ); @@ -812,7 +814,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RemoveIamPolicyRequest() ); @@ -861,7 +863,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RemoveIamPolicyRequest() ); @@ -894,7 +896,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RemoveIamPolicyRequest() ); @@ -917,7 +919,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateServiceRequest() ); @@ -952,7 +954,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateServiceRequest() ); @@ -1008,7 +1010,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateServiceRequest() ); @@ -1041,7 +1043,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateServiceRequest() ); @@ -1076,7 +1078,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1100,7 +1102,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1123,7 +1125,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateServiceRequest() ); @@ -1159,7 +1161,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateServiceRequest() ); @@ -1216,7 +1218,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateServiceRequest() ); @@ -1250,7 +1252,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateServiceRequest() ); @@ -1286,7 +1288,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1310,7 +1312,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1333,7 +1335,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteServiceRequest() ); @@ -1368,7 +1370,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteServiceRequest() ); @@ -1424,7 +1426,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteServiceRequest() ); @@ -1457,7 +1459,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteServiceRequest() ); @@ -1492,7 +1494,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1516,7 +1518,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1539,7 +1541,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateMetadataImportRequest() ); @@ -1574,7 +1576,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateMetadataImportRequest() ); @@ -1630,7 +1632,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateMetadataImportRequest() ); @@ -1663,7 +1665,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateMetadataImportRequest() ); @@ -1698,7 +1700,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1722,7 +1724,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1745,7 +1747,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateMetadataImportRequest() ); @@ -1781,7 +1783,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateMetadataImportRequest() ); @@ -1838,7 +1840,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateMetadataImportRequest() ); @@ -1872,7 +1874,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.UpdateMetadataImportRequest() ); @@ -1908,7 +1910,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1932,7 +1934,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1955,7 +1957,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ExportMetadataRequest() ); @@ -1990,7 +1992,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ExportMetadataRequest() ); @@ -2046,7 +2048,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ExportMetadataRequest() ); @@ -2079,7 +2081,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ExportMetadataRequest() ); @@ -2114,7 +2116,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2138,7 +2140,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2161,7 +2163,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RestoreServiceRequest() ); @@ -2196,7 +2198,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RestoreServiceRequest() ); @@ -2252,7 +2254,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RestoreServiceRequest() ); @@ -2285,7 +2287,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.RestoreServiceRequest() ); @@ -2320,7 +2322,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2344,7 +2346,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2367,7 +2369,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateBackupRequest() ); @@ -2401,7 +2403,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateBackupRequest() ); @@ -2457,7 +2459,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateBackupRequest() ); @@ -2490,7 +2492,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.CreateBackupRequest() ); @@ -2525,7 +2527,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2549,7 +2551,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2569,7 +2571,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteBackupRequest() ); @@ -2603,7 +2605,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteBackupRequest() ); @@ -2659,7 +2661,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteBackupRequest() ); @@ -2692,7 +2694,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.DeleteBackupRequest() ); @@ -2727,7 +2729,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2751,7 +2753,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2771,7 +2773,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.QueryMetadataRequest() ); @@ -2806,7 +2808,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.QueryMetadataRequest() ); @@ -2862,7 +2864,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.QueryMetadataRequest() ); @@ -2895,7 +2897,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.QueryMetadataRequest() ); @@ -2930,7 +2932,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2954,7 +2956,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2977,7 +2979,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest() ); @@ -3012,7 +3014,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest() ); @@ -3068,7 +3070,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest() ); @@ -3101,7 +3103,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.MoveTableToDatabaseRequest() ); @@ -3136,7 +3138,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3160,7 +3162,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3183,7 +3185,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest() ); @@ -3218,7 +3220,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest() ); @@ -3274,7 +3276,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest() ); @@ -3310,7 +3312,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest() ); @@ -3345,7 +3347,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3370,7 +3372,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3393,7 +3395,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListServicesRequest() ); @@ -3434,7 +3436,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListServicesRequest() ); @@ -3491,7 +3493,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListServicesRequest() ); @@ -3524,7 +3526,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListServicesRequest() ); @@ -3586,7 +3588,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListServicesRequest() ); @@ -3639,7 +3641,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListServicesRequest() ); @@ -3690,7 +3692,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListServicesRequest() ); @@ -3734,7 +3736,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListMetadataImportsRequest() ); @@ -3776,7 +3778,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListMetadataImportsRequest() ); @@ -3835,7 +3837,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListMetadataImportsRequest() ); @@ -3868,7 +3870,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListMetadataImportsRequest() ); @@ -3931,7 +3933,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListMetadataImportsRequest() ); @@ -3983,7 +3985,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListMetadataImportsRequest() ); @@ -4035,7 +4037,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListMetadataImportsRequest() ); @@ -4080,7 +4082,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListBackupsRequest() ); @@ -4121,7 +4123,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListBackupsRequest() ); @@ -4178,7 +4180,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListBackupsRequest() ); @@ -4211,7 +4213,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListBackupsRequest() ); @@ -4273,7 +4275,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListBackupsRequest() ); @@ -4326,7 +4328,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListBackupsRequest() ); @@ -4377,7 +4379,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.metastore.v1beta.ListBackupsRequest() ); @@ -4422,7 +4424,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4454,7 +4456,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4500,7 +4502,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4534,7 +4536,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4566,7 +4568,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4612,7 +4614,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4646,7 +4648,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4681,7 +4683,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4727,7 +4729,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4764,7 +4766,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4796,7 +4798,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4842,7 +4844,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4879,7 +4881,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4929,7 +4931,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4972,7 +4974,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5057,7 +5059,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5143,7 +5145,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5245,8 +5247,7 @@ describe('v1beta.DataprocMetastoreClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5267,7 +5268,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5276,8 +5277,7 @@ describe('v1beta.DataprocMetastoreClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5293,7 +5293,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -5307,7 +5307,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5371,7 +5371,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); - describe('federation', () => { + describe('federation', async () => { const fakePath = '/rendered/path/federation'; const expectedParameters = { project: 'projectValue', @@ -5384,7 +5384,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.federationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5437,7 +5437,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); - describe('lake', () => { + describe('lake', async () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { project: 'projectValue', @@ -5450,7 +5450,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.lakePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5503,7 +5503,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5515,7 +5515,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5554,7 +5554,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); - describe('metadataImport', () => { + describe('metadataImport', async () => { const fakePath = '/rendered/path/metadataImport'; const expectedParameters = { project: 'projectValue', @@ -5568,7 +5568,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataImportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5633,7 +5633,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -5645,7 +5645,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5684,7 +5684,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5695,7 +5695,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5724,7 +5724,7 @@ describe('v1beta.DataprocMetastoreClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -5737,7 +5737,7 @@ describe('v1beta.DataprocMetastoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-migrationcenter/package.json b/packages/google-cloud-migrationcenter/package.json index 2fd031324d2..2530349ff8c 100644 --- a/packages/google-cloud-migrationcenter/package.json +++ b/packages/google-cloud-migrationcenter/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json index a5af1da265c..cc0d7d22b55 100644 --- a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json +++ b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migrationcenter", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json index a5af1da265c..cc0d7d22b55 100644 --- a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json +++ b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migrationcenter", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-migrationcenter/src/v1/migration_center_client.ts b/packages/google-cloud-migrationcenter/src/v1/migration_center_client.ts index 0ac9e54bcd7..d5e722de5c3 100644 --- a/packages/google-cloud-migrationcenter/src/v1/migration_center_client.ts +++ b/packages/google-cloud-migrationcenter/src/v1/migration_center_client.ts @@ -905,7 +905,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAsset request %j', request); const wrappedCallback: | Callback< @@ -1042,7 +1044,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ 'asset.name': request.asset!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAsset request %j', request); const wrappedCallback: | Callback< @@ -1170,7 +1174,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateAssets request %j', request); const wrappedCallback: | Callback< @@ -1303,7 +1309,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAsset request %j', request); const wrappedCallback: | Callback< @@ -1436,7 +1444,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteAssets request %j', request); const wrappedCallback: | Callback< @@ -1565,7 +1575,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reportAssetFrames request %j', request); const wrappedCallback: | Callback< @@ -1695,7 +1707,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregateAssetsValues request %j', request); const wrappedCallback: | Callback< @@ -1817,7 +1831,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getImportJob request %j', request); const wrappedCallback: | Callback< @@ -1942,7 +1958,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getImportDataFile request %j', request); const wrappedCallback: | Callback< @@ -2061,7 +2079,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGroup request %j', request); const wrappedCallback: | Callback< @@ -2182,7 +2202,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getErrorFrame request %j', request); const wrappedCallback: | Callback< @@ -2301,7 +2323,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSource request %j', request); const wrappedCallback: | Callback< @@ -2423,7 +2447,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPreferenceSet request %j', request); const wrappedCallback: | Callback< @@ -2542,7 +2568,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSettings request %j', request); const wrappedCallback: | Callback< @@ -2667,7 +2695,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReportConfig request %j', request); const wrappedCallback: | Callback< @@ -2788,7 +2818,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReport request %j', request); const wrappedCallback: | Callback< @@ -2935,7 +2967,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3120,7 +3154,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3308,7 +3344,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ 'import_job.name': request.importJob!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3489,7 +3527,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3670,7 +3710,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3855,7 +3897,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4036,7 +4080,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4225,7 +4271,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4412,7 +4460,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ 'group.name': request.group!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4593,7 +4643,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4785,7 +4837,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ group: request.group ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4976,7 +5030,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ group: request.group ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5165,7 +5221,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5353,7 +5411,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ 'source.name': request.source!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5534,7 +5594,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5724,7 +5786,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5912,7 +5976,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ 'preference_set.name': request.preferenceSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6093,7 +6159,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6281,7 +6349,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ 'settings.name': request.settings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6470,7 +6540,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6655,7 +6727,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6844,7 +6918,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7025,7 +7101,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7194,7 +7272,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListAssetsRequest, @@ -7266,7 +7346,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets stream %j', request); return this.descriptors.page.listAssets.createStream( this.innerApiCalls.listAssets as GaxCall, @@ -7320,7 +7402,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets iterate %j', request); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, @@ -7430,7 +7514,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, @@ -7503,7 +7589,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listImportJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImportJobs stream %j', request); return this.descriptors.page.listImportJobs.createStream( this.innerApiCalls.listImportJobs as GaxCall, @@ -7558,7 +7646,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listImportJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImportJobs iterate %j', request); return this.descriptors.page.listImportJobs.asyncIterate( this.innerApiCalls['listImportJobs'] as GaxCall, @@ -7671,7 +7761,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, @@ -7747,7 +7839,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listImportDataFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImportDataFiles stream %j', request); return this.descriptors.page.listImportDataFiles.createStream( this.innerApiCalls.listImportDataFiles as GaxCall, @@ -7805,7 +7899,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listImportDataFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImportDataFiles iterate %j', request); return this.descriptors.page.listImportDataFiles.asyncIterate( this.innerApiCalls['listImportDataFiles'] as GaxCall, @@ -7912,7 +8008,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListGroupsRequest, @@ -7982,7 +8080,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGroups stream %j', request); return this.descriptors.page.listGroups.createStream( this.innerApiCalls.listGroups as GaxCall, @@ -8034,7 +8134,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGroups iterate %j', request); return this.descriptors.page.listGroups.asyncIterate( this.innerApiCalls['listGroups'] as GaxCall, @@ -8140,7 +8242,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, @@ -8209,7 +8313,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listErrorFrames']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listErrorFrames stream %j', request); return this.descriptors.page.listErrorFrames.createStream( this.innerApiCalls.listErrorFrames as GaxCall, @@ -8260,7 +8366,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listErrorFrames']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listErrorFrames iterate %j', request); return this.descriptors.page.listErrorFrames.asyncIterate( this.innerApiCalls['listErrorFrames'] as GaxCall, @@ -8367,7 +8475,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListSourcesRequest, @@ -8437,7 +8547,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources stream %j', request); return this.descriptors.page.listSources.createStream( this.innerApiCalls.listSources as GaxCall, @@ -8489,7 +8601,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources iterate %j', request); return this.descriptors.page.listSources.asyncIterate( this.innerApiCalls['listSources'] as GaxCall, @@ -8595,7 +8709,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, @@ -8664,7 +8780,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listPreferenceSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPreferenceSets stream %j', request); return this.descriptors.page.listPreferenceSets.createStream( this.innerApiCalls.listPreferenceSets as GaxCall, @@ -8715,7 +8833,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listPreferenceSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPreferenceSets iterate %j', request); return this.descriptors.page.listPreferenceSets.asyncIterate( this.innerApiCalls['listPreferenceSets'] as GaxCall, @@ -8822,7 +8942,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, @@ -8892,7 +9014,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listReportConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportConfigs stream %j', request); return this.descriptors.page.listReportConfigs.createStream( this.innerApiCalls.listReportConfigs as GaxCall, @@ -8944,7 +9068,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listReportConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportConfigs iterate %j', request); return this.descriptors.page.listReportConfigs.asyncIterate( this.innerApiCalls['listReportConfigs'] as GaxCall, @@ -9053,7 +9179,9 @@ export class MigrationCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.migrationcenter.v1.IListReportsRequest, @@ -9125,7 +9253,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReports stream %j', request); return this.descriptors.page.listReports.createStream( this.innerApiCalls.listReports as GaxCall, @@ -9179,7 +9309,9 @@ export class MigrationCenterClient { }); const defaultCallSettings = this._defaults['listReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReports iterate %j', request); return this.descriptors.page.listReports.asyncIterate( this.innerApiCalls['listReports'] as GaxCall, @@ -9359,7 +9491,7 @@ export class MigrationCenterClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-migrationcenter/test/gapic_migration_center_v1.ts b/packages/google-cloud-migrationcenter/test/gapic_migration_center_v1.ts index d289bcccc16..28655396d66 100644 --- a/packages/google-cloud-migrationcenter/test/gapic_migration_center_v1.ts +++ b/packages/google-cloud-migrationcenter/test/gapic_migration_center_v1.ts @@ -292,7 +292,9 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.migrationCenterStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetAssetRequest() ); @@ -382,7 +384,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetAssetRequest() ); @@ -429,7 +431,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetAssetRequest() ); @@ -457,7 +459,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetAssetRequest() ); @@ -478,7 +480,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateAssetRequest() ); @@ -510,7 +512,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateAssetRequest() ); @@ -558,7 +560,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateAssetRequest() ); @@ -590,7 +592,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateAssetRequest() ); @@ -612,7 +614,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest() ); @@ -643,7 +645,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest() ); @@ -690,7 +692,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest() ); @@ -721,7 +723,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest() ); @@ -742,7 +744,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteAssetRequest() ); @@ -773,7 +775,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteAssetRequest() ); @@ -820,7 +822,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteAssetRequest() ); @@ -851,7 +853,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteAssetRequest() ); @@ -872,7 +874,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest() ); @@ -903,7 +905,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest() ); @@ -950,7 +952,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest() ); @@ -981,7 +983,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ReportAssetFramesRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ReportAssetFramesRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ReportAssetFramesRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ReportAssetFramesRequest() ); @@ -1132,7 +1134,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest() ); @@ -1245,7 +1247,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest() ); @@ -1269,7 +1271,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportJobRequest() ); @@ -1300,7 +1302,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportJobRequest() ); @@ -1347,7 +1349,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportJobRequest() ); @@ -1378,7 +1380,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportJobRequest() ); @@ -1399,7 +1401,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportDataFileRequest() ); @@ -1430,7 +1432,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportDataFileRequest() ); @@ -1477,7 +1479,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportDataFileRequest() ); @@ -1508,7 +1510,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetImportDataFileRequest() ); @@ -1529,7 +1531,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetGroupRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetGroupRequest() ); @@ -1607,7 +1609,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetGroupRequest() ); @@ -1635,7 +1637,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetGroupRequest() ); @@ -1656,7 +1658,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetErrorFrameRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetErrorFrameRequest() ); @@ -1734,7 +1736,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetErrorFrameRequest() ); @@ -1765,7 +1767,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetErrorFrameRequest() ); @@ -1786,7 +1788,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSourceRequest() ); @@ -1817,7 +1819,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSourceRequest() ); @@ -1864,7 +1866,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSourceRequest() ); @@ -1892,7 +1894,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSourceRequest() ); @@ -1913,7 +1915,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetPreferenceSetRequest() ); @@ -1944,7 +1946,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetPreferenceSetRequest() ); @@ -1991,7 +1993,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetPreferenceSetRequest() ); @@ -2022,7 +2024,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetPreferenceSetRequest() ); @@ -2043,7 +2045,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSettingsRequest() ); @@ -2074,7 +2076,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSettingsRequest() ); @@ -2121,7 +2123,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSettingsRequest() ); @@ -2152,7 +2154,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetSettingsRequest() ); @@ -2173,7 +2175,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportConfigRequest() ); @@ -2204,7 +2206,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportConfigRequest() ); @@ -2251,7 +2253,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportConfigRequest() ); @@ -2282,7 +2284,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportConfigRequest() ); @@ -2303,7 +2305,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportRequest() ); @@ -2334,7 +2336,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportRequest() ); @@ -2381,7 +2383,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportRequest() ); @@ -2409,7 +2411,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.GetReportRequest() ); @@ -2430,7 +2432,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportJobRequest() ); @@ -2463,7 +2465,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportJobRequest() ); @@ -2517,7 +2519,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportJobRequest() ); @@ -2548,7 +2550,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportJobRequest() ); @@ -2581,7 +2583,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2603,7 +2605,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2624,7 +2626,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportJobRequest() ); @@ -2657,7 +2659,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportJobRequest() ); @@ -2711,7 +2713,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportJobRequest() ); @@ -2742,7 +2744,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportJobRequest() ); @@ -2775,7 +2777,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2797,7 +2799,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2818,7 +2820,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateImportJobRequest() ); @@ -2852,7 +2854,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateImportJobRequest() ); @@ -2907,7 +2909,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateImportJobRequest() ); @@ -2939,7 +2941,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateImportJobRequest() ); @@ -2973,7 +2975,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2995,7 +2997,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3016,7 +3018,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ValidateImportJobRequest() ); @@ -3049,7 +3051,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ValidateImportJobRequest() ); @@ -3103,7 +3105,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ValidateImportJobRequest() ); @@ -3134,7 +3136,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ValidateImportJobRequest() ); @@ -3167,7 +3169,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3189,7 +3191,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3210,7 +3212,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RunImportJobRequest() ); @@ -3242,7 +3244,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RunImportJobRequest() ); @@ -3296,7 +3298,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RunImportJobRequest() ); @@ -3327,7 +3329,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RunImportJobRequest() ); @@ -3360,7 +3362,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3382,7 +3384,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3400,7 +3402,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportDataFileRequest() ); @@ -3433,7 +3435,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportDataFileRequest() ); @@ -3487,7 +3489,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportDataFileRequest() ); @@ -3518,7 +3520,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateImportDataFileRequest() ); @@ -3551,7 +3553,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3573,7 +3575,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3594,7 +3596,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest() ); @@ -3627,7 +3629,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest() ); @@ -3681,7 +3683,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest() ); @@ -3712,7 +3714,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest() ); @@ -3745,7 +3747,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3767,7 +3769,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3788,7 +3790,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateGroupRequest() ); @@ -3820,7 +3822,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateGroupRequest() ); @@ -3874,7 +3876,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateGroupRequest() ); @@ -3905,7 +3907,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateGroupRequest() ); @@ -3938,7 +3940,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3960,7 +3962,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3978,7 +3980,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateGroupRequest() ); @@ -4011,7 +4013,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateGroupRequest() ); @@ -4066,7 +4068,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateGroupRequest() ); @@ -4098,7 +4100,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateGroupRequest() ); @@ -4132,7 +4134,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4154,7 +4156,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4172,7 +4174,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteGroupRequest() ); @@ -4204,7 +4206,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteGroupRequest() ); @@ -4258,7 +4260,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteGroupRequest() ); @@ -4289,7 +4291,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteGroupRequest() ); @@ -4322,7 +4324,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4344,7 +4346,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4362,7 +4364,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest() ); @@ -4395,7 +4397,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest() ); @@ -4449,7 +4451,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest() ); @@ -4480,7 +4482,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.AddAssetsToGroupRequest() ); @@ -4513,7 +4515,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4535,7 +4537,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4556,7 +4558,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest() ); @@ -4589,7 +4591,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest() ); @@ -4643,7 +4645,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest() ); @@ -4677,7 +4679,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest() ); @@ -4710,7 +4712,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4732,7 +4734,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4753,7 +4755,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateSourceRequest() ); @@ -4785,7 +4787,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateSourceRequest() ); @@ -4839,7 +4841,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateSourceRequest() ); @@ -4870,7 +4872,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateSourceRequest() ); @@ -4903,7 +4905,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4925,7 +4927,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4943,7 +4945,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSourceRequest() ); @@ -4976,7 +4978,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSourceRequest() ); @@ -5031,7 +5033,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSourceRequest() ); @@ -5063,7 +5065,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSourceRequest() ); @@ -5097,7 +5099,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5119,7 +5121,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5137,7 +5139,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteSourceRequest() ); @@ -5169,7 +5171,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteSourceRequest() ); @@ -5223,7 +5225,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteSourceRequest() ); @@ -5254,7 +5256,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteSourceRequest() ); @@ -5287,7 +5289,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5309,7 +5311,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5327,7 +5329,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest() ); @@ -5360,7 +5362,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest() ); @@ -5414,7 +5416,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest() ); @@ -5445,7 +5447,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest() ); @@ -5478,7 +5480,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5500,7 +5502,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5521,7 +5523,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest() ); @@ -5555,7 +5557,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest() ); @@ -5610,7 +5612,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest() ); @@ -5642,7 +5644,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest() ); @@ -5676,7 +5678,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5698,7 +5700,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5719,7 +5721,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest() ); @@ -5752,7 +5754,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest() ); @@ -5806,7 +5808,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest() ); @@ -5837,7 +5839,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest() ); @@ -5870,7 +5872,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5892,7 +5894,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5913,7 +5915,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSettingsRequest() ); @@ -5947,7 +5949,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSettingsRequest() ); @@ -6002,7 +6004,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSettingsRequest() ); @@ -6034,7 +6036,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.UpdateSettingsRequest() ); @@ -6068,7 +6070,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6090,7 +6092,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6111,7 +6113,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportConfigRequest() ); @@ -6144,7 +6146,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportConfigRequest() ); @@ -6198,7 +6200,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportConfigRequest() ); @@ -6229,7 +6231,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportConfigRequest() ); @@ -6262,7 +6264,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6284,7 +6286,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6305,7 +6307,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportConfigRequest() ); @@ -6338,7 +6340,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportConfigRequest() ); @@ -6392,7 +6394,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportConfigRequest() ); @@ -6423,7 +6425,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportConfigRequest() ); @@ -6456,7 +6458,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6478,7 +6480,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6499,7 +6501,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportRequest() ); @@ -6531,7 +6533,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportRequest() ); @@ -6585,7 +6587,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportRequest() ); @@ -6616,7 +6618,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.CreateReportRequest() ); @@ -6649,7 +6651,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6671,7 +6673,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6689,7 +6691,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportRequest() ); @@ -6721,7 +6723,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportRequest() ); @@ -6775,7 +6777,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportRequest() ); @@ -6806,7 +6808,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.DeleteReportRequest() ); @@ -6839,7 +6841,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6861,7 +6863,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6879,7 +6881,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListAssetsRequest() ); @@ -6918,7 +6920,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListAssetsRequest() ); @@ -6973,7 +6975,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListAssetsRequest() ); @@ -7004,7 +7006,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListAssetsRequest() ); @@ -7064,7 +7066,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListAssetsRequest() ); @@ -7115,7 +7117,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListAssetsRequest() ); @@ -7164,7 +7166,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListAssetsRequest() ); @@ -7208,7 +7210,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportJobsRequest() ); @@ -7247,7 +7249,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportJobsRequest() ); @@ -7302,7 +7304,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportJobsRequest() ); @@ -7333,7 +7335,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportJobsRequest() ); @@ -7394,7 +7396,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportJobsRequest() ); @@ -7444,7 +7446,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportJobsRequest() ); @@ -7493,7 +7495,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportJobsRequest() ); @@ -7536,7 +7538,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportDataFilesRequest() ); @@ -7576,7 +7578,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportDataFilesRequest() ); @@ -7633,7 +7635,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportDataFilesRequest() ); @@ -7664,7 +7666,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportDataFilesRequest() ); @@ -7725,7 +7727,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportDataFilesRequest() ); @@ -7775,7 +7777,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportDataFilesRequest() ); @@ -7825,7 +7827,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListImportDataFilesRequest() ); @@ -7868,7 +7870,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListGroupsRequest() ); @@ -7907,7 +7909,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListGroupsRequest() ); @@ -7962,7 +7964,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListGroupsRequest() ); @@ -7993,7 +7995,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListGroupsRequest() ); @@ -8053,7 +8055,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListGroupsRequest() ); @@ -8104,7 +8106,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListGroupsRequest() ); @@ -8153,7 +8155,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListGroupsRequest() ); @@ -8197,7 +8199,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListErrorFramesRequest() ); @@ -8236,7 +8238,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListErrorFramesRequest() ); @@ -8291,7 +8293,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListErrorFramesRequest() ); @@ -8322,7 +8324,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListErrorFramesRequest() ); @@ -8383,7 +8385,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListErrorFramesRequest() ); @@ -8433,7 +8435,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListErrorFramesRequest() ); @@ -8483,7 +8485,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListErrorFramesRequest() ); @@ -8526,7 +8528,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListSourcesRequest() ); @@ -8565,7 +8567,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListSourcesRequest() ); @@ -8620,7 +8622,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListSourcesRequest() ); @@ -8651,7 +8653,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListSourcesRequest() ); @@ -8711,7 +8713,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListSourcesRequest() ); @@ -8762,7 +8764,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListSourcesRequest() ); @@ -8811,7 +8813,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListSourcesRequest() ); @@ -8855,7 +8857,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest() ); @@ -8895,7 +8897,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest() ); @@ -8952,7 +8954,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest() ); @@ -8983,7 +8985,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest() ); @@ -9044,7 +9046,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest() ); @@ -9094,7 +9096,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest() ); @@ -9144,7 +9146,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest() ); @@ -9187,7 +9189,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportConfigsRequest() ); @@ -9226,7 +9228,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportConfigsRequest() ); @@ -9283,7 +9285,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportConfigsRequest() ); @@ -9314,7 +9316,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportConfigsRequest() ); @@ -9375,7 +9377,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportConfigsRequest() ); @@ -9425,7 +9427,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportConfigsRequest() ); @@ -9475,7 +9477,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportConfigsRequest() ); @@ -9518,7 +9520,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportsRequest() ); @@ -9557,7 +9559,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportsRequest() ); @@ -9612,7 +9614,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportsRequest() ); @@ -9643,7 +9645,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportsRequest() ); @@ -9703,7 +9705,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportsRequest() ); @@ -9754,7 +9756,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportsRequest() ); @@ -9803,7 +9805,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.migrationcenter.v1.ListReportsRequest() ); @@ -9846,7 +9848,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9876,7 +9878,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9920,7 +9922,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9955,7 +9957,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10003,7 +10005,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10044,7 +10046,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -10123,7 +10125,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -10203,7 +10205,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -10299,8 +10301,7 @@ describe('v1.MigrationCenterClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -10319,7 +10320,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -10328,8 +10329,7 @@ describe('v1.MigrationCenterClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -10345,7 +10345,7 @@ describe('v1.MigrationCenterClient', () => { }); describe('Path templates', () => { - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { project: 'projectValue', @@ -10356,7 +10356,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10409,7 +10409,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('errorFrame', () => { + describe('errorFrame', async () => { const fakePath = '/rendered/path/errorFrame'; const expectedParameters = { project: 'projectValue', @@ -10421,7 +10421,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.errorFramePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10485,7 +10485,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('group', () => { + describe('group', async () => { const fakePath = '/rendered/path/group'; const expectedParameters = { project: 'projectValue', @@ -10496,7 +10496,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10549,7 +10549,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('importDataFile', () => { + describe('importDataFile', async () => { const fakePath = '/rendered/path/importDataFile'; const expectedParameters = { project: 'projectValue', @@ -10561,7 +10561,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.importDataFilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10626,7 +10626,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('importJob', () => { + describe('importJob', async () => { const fakePath = '/rendered/path/importJob'; const expectedParameters = { project: 'projectValue', @@ -10637,7 +10637,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.importJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10690,7 +10690,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -10700,7 +10700,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10739,7 +10739,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('preferenceSet', () => { + describe('preferenceSet', async () => { const fakePath = '/rendered/path/preferenceSet'; const expectedParameters = { project: 'projectValue', @@ -10750,7 +10750,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.preferenceSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10803,7 +10803,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -10812,7 +10812,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10841,7 +10841,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('report', () => { + describe('report', async () => { const fakePath = '/rendered/path/report'; const expectedParameters = { project: 'projectValue', @@ -10853,7 +10853,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10917,7 +10917,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('reportConfig', () => { + describe('reportConfig', async () => { const fakePath = '/rendered/path/reportConfig'; const expectedParameters = { project: 'projectValue', @@ -10928,7 +10928,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10981,7 +10981,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('settings', () => { + describe('settings', async () => { const fakePath = '/rendered/path/settings'; const expectedParameters = { project: 'projectValue', @@ -10991,7 +10991,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.settingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11030,7 +11030,7 @@ describe('v1.MigrationCenterClient', () => { }); }); - describe('source', () => { + describe('source', async () => { const fakePath = '/rendered/path/source'; const expectedParameters = { project: 'projectValue', @@ -11041,7 +11041,7 @@ describe('v1.MigrationCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sourcePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-modelarmor/package.json b/packages/google-cloud-modelarmor/package.json index 6121645cfed..2bc2724134a 100644 --- a/packages/google-cloud-modelarmor/package.json +++ b/packages/google-cloud-modelarmor/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^4.0.3" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-modelarmor/protos/google/cloud/modelarmor/v1/service.proto b/packages/google-cloud-modelarmor/protos/google/cloud/modelarmor/v1/service.proto index 43208927837..89fd7992bb6 100644 --- a/packages/google-cloud-modelarmor/protos/google/cloud/modelarmor/v1/service.proto +++ b/packages/google-cloud-modelarmor/protos/google/cloud/modelarmor/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -749,7 +749,7 @@ message FilterResult { MaliciousUriFilterResult malicious_uri_filter_result = 4; // CSAM filter results. - CsamFilterResult csam_filter_result = 5; + CsamFilterResult csam_filter_filter_result = 5; // Virus scan results. VirusScanFilterResult virus_scan_filter_result = 6; diff --git a/packages/google-cloud-modelarmor/protos/protos.d.ts b/packages/google-cloud-modelarmor/protos/protos.d.ts index b8a2715697f..bc7867c7aa6 100644 --- a/packages/google-cloud-modelarmor/protos/protos.d.ts +++ b/packages/google-cloud-modelarmor/protos/protos.d.ts @@ -3025,8 +3025,8 @@ export namespace google { /** FilterResult maliciousUriFilterResult */ maliciousUriFilterResult?: (google.cloud.modelarmor.v1.IMaliciousUriFilterResult|null); - /** FilterResult csamFilterResult */ - csamFilterResult?: (google.cloud.modelarmor.v1.ICsamFilterResult|null); + /** FilterResult csamFilterFilterResult */ + csamFilterFilterResult?: (google.cloud.modelarmor.v1.ICsamFilterResult|null); /** FilterResult virusScanFilterResult */ virusScanFilterResult?: (google.cloud.modelarmor.v1.IVirusScanFilterResult|null); @@ -3053,14 +3053,14 @@ export namespace google { /** FilterResult maliciousUriFilterResult. */ public maliciousUriFilterResult?: (google.cloud.modelarmor.v1.IMaliciousUriFilterResult|null); - /** FilterResult csamFilterResult. */ - public csamFilterResult?: (google.cloud.modelarmor.v1.ICsamFilterResult|null); + /** FilterResult csamFilterFilterResult. */ + public csamFilterFilterResult?: (google.cloud.modelarmor.v1.ICsamFilterResult|null); /** FilterResult virusScanFilterResult. */ public virusScanFilterResult?: (google.cloud.modelarmor.v1.IVirusScanFilterResult|null); /** FilterResult filterResult. */ - public filterResult?: ("raiFilterResult"|"sdpFilterResult"|"piAndJailbreakFilterResult"|"maliciousUriFilterResult"|"csamFilterResult"|"virusScanFilterResult"); + public filterResult?: ("raiFilterResult"|"sdpFilterResult"|"piAndJailbreakFilterResult"|"maliciousUriFilterResult"|"csamFilterFilterResult"|"virusScanFilterResult"); /** * Creates a new FilterResult instance using the specified properties. diff --git a/packages/google-cloud-modelarmor/protos/protos.js b/packages/google-cloud-modelarmor/protos/protos.js index 8d5f860d2bf..3718ce28c9f 100644 --- a/packages/google-cloud-modelarmor/protos/protos.js +++ b/packages/google-cloud-modelarmor/protos/protos.js @@ -7153,7 +7153,7 @@ * @property {google.cloud.modelarmor.v1.ISdpFilterResult|null} [sdpFilterResult] FilterResult sdpFilterResult * @property {google.cloud.modelarmor.v1.IPiAndJailbreakFilterResult|null} [piAndJailbreakFilterResult] FilterResult piAndJailbreakFilterResult * @property {google.cloud.modelarmor.v1.IMaliciousUriFilterResult|null} [maliciousUriFilterResult] FilterResult maliciousUriFilterResult - * @property {google.cloud.modelarmor.v1.ICsamFilterResult|null} [csamFilterResult] FilterResult csamFilterResult + * @property {google.cloud.modelarmor.v1.ICsamFilterResult|null} [csamFilterFilterResult] FilterResult csamFilterFilterResult * @property {google.cloud.modelarmor.v1.IVirusScanFilterResult|null} [virusScanFilterResult] FilterResult virusScanFilterResult */ @@ -7205,12 +7205,12 @@ FilterResult.prototype.maliciousUriFilterResult = null; /** - * FilterResult csamFilterResult. - * @member {google.cloud.modelarmor.v1.ICsamFilterResult|null|undefined} csamFilterResult + * FilterResult csamFilterFilterResult. + * @member {google.cloud.modelarmor.v1.ICsamFilterResult|null|undefined} csamFilterFilterResult * @memberof google.cloud.modelarmor.v1.FilterResult * @instance */ - FilterResult.prototype.csamFilterResult = null; + FilterResult.prototype.csamFilterFilterResult = null; /** * FilterResult virusScanFilterResult. @@ -7225,12 +7225,12 @@ /** * FilterResult filterResult. - * @member {"raiFilterResult"|"sdpFilterResult"|"piAndJailbreakFilterResult"|"maliciousUriFilterResult"|"csamFilterResult"|"virusScanFilterResult"|undefined} filterResult + * @member {"raiFilterResult"|"sdpFilterResult"|"piAndJailbreakFilterResult"|"maliciousUriFilterResult"|"csamFilterFilterResult"|"virusScanFilterResult"|undefined} filterResult * @memberof google.cloud.modelarmor.v1.FilterResult * @instance */ Object.defineProperty(FilterResult.prototype, "filterResult", { - get: $util.oneOfGetter($oneOfFields = ["raiFilterResult", "sdpFilterResult", "piAndJailbreakFilterResult", "maliciousUriFilterResult", "csamFilterResult", "virusScanFilterResult"]), + get: $util.oneOfGetter($oneOfFields = ["raiFilterResult", "sdpFilterResult", "piAndJailbreakFilterResult", "maliciousUriFilterResult", "csamFilterFilterResult", "virusScanFilterResult"]), set: $util.oneOfSetter($oneOfFields) }); @@ -7266,8 +7266,8 @@ $root.google.cloud.modelarmor.v1.PiAndJailbreakFilterResult.encode(message.piAndJailbreakFilterResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.maliciousUriFilterResult != null && Object.hasOwnProperty.call(message, "maliciousUriFilterResult")) $root.google.cloud.modelarmor.v1.MaliciousUriFilterResult.encode(message.maliciousUriFilterResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.csamFilterResult != null && Object.hasOwnProperty.call(message, "csamFilterResult")) - $root.google.cloud.modelarmor.v1.CsamFilterResult.encode(message.csamFilterResult, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.csamFilterFilterResult != null && Object.hasOwnProperty.call(message, "csamFilterFilterResult")) + $root.google.cloud.modelarmor.v1.CsamFilterResult.encode(message.csamFilterFilterResult, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.virusScanFilterResult != null && Object.hasOwnProperty.call(message, "virusScanFilterResult")) $root.google.cloud.modelarmor.v1.VirusScanFilterResult.encode(message.virusScanFilterResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; @@ -7321,7 +7321,7 @@ break; } case 5: { - message.csamFilterResult = $root.google.cloud.modelarmor.v1.CsamFilterResult.decode(reader, reader.uint32()); + message.csamFilterFilterResult = $root.google.cloud.modelarmor.v1.CsamFilterResult.decode(reader, reader.uint32()); break; } case 6: { @@ -7402,14 +7402,14 @@ return "maliciousUriFilterResult." + error; } } - if (message.csamFilterResult != null && message.hasOwnProperty("csamFilterResult")) { + if (message.csamFilterFilterResult != null && message.hasOwnProperty("csamFilterFilterResult")) { if (properties.filterResult === 1) return "filterResult: multiple values"; properties.filterResult = 1; { - var error = $root.google.cloud.modelarmor.v1.CsamFilterResult.verify(message.csamFilterResult); + var error = $root.google.cloud.modelarmor.v1.CsamFilterResult.verify(message.csamFilterFilterResult); if (error) - return "csamFilterResult." + error; + return "csamFilterFilterResult." + error; } } if (message.virusScanFilterResult != null && message.hasOwnProperty("virusScanFilterResult")) { @@ -7457,10 +7457,10 @@ throw TypeError(".google.cloud.modelarmor.v1.FilterResult.maliciousUriFilterResult: object expected"); message.maliciousUriFilterResult = $root.google.cloud.modelarmor.v1.MaliciousUriFilterResult.fromObject(object.maliciousUriFilterResult); } - if (object.csamFilterResult != null) { - if (typeof object.csamFilterResult !== "object") - throw TypeError(".google.cloud.modelarmor.v1.FilterResult.csamFilterResult: object expected"); - message.csamFilterResult = $root.google.cloud.modelarmor.v1.CsamFilterResult.fromObject(object.csamFilterResult); + if (object.csamFilterFilterResult != null) { + if (typeof object.csamFilterFilterResult !== "object") + throw TypeError(".google.cloud.modelarmor.v1.FilterResult.csamFilterFilterResult: object expected"); + message.csamFilterFilterResult = $root.google.cloud.modelarmor.v1.CsamFilterResult.fromObject(object.csamFilterFilterResult); } if (object.virusScanFilterResult != null) { if (typeof object.virusScanFilterResult !== "object") @@ -7503,10 +7503,10 @@ if (options.oneofs) object.filterResult = "maliciousUriFilterResult"; } - if (message.csamFilterResult != null && message.hasOwnProperty("csamFilterResult")) { - object.csamFilterResult = $root.google.cloud.modelarmor.v1.CsamFilterResult.toObject(message.csamFilterResult, options); + if (message.csamFilterFilterResult != null && message.hasOwnProperty("csamFilterFilterResult")) { + object.csamFilterFilterResult = $root.google.cloud.modelarmor.v1.CsamFilterResult.toObject(message.csamFilterFilterResult, options); if (options.oneofs) - object.filterResult = "csamFilterResult"; + object.filterResult = "csamFilterFilterResult"; } if (message.virusScanFilterResult != null && message.hasOwnProperty("virusScanFilterResult")) { object.virusScanFilterResult = $root.google.cloud.modelarmor.v1.VirusScanFilterResult.toObject(message.virusScanFilterResult, options); diff --git a/packages/google-cloud-modelarmor/protos/protos.json b/packages/google-cloud-modelarmor/protos/protos.json index c004075c814..be6837b97c1 100644 --- a/packages/google-cloud-modelarmor/protos/protos.json +++ b/packages/google-cloud-modelarmor/protos/protos.json @@ -894,7 +894,7 @@ "sdpFilterResult", "piAndJailbreakFilterResult", "maliciousUriFilterResult", - "csamFilterResult", + "csamFilterFilterResult", "virusScanFilterResult" ] } @@ -916,7 +916,7 @@ "type": "MaliciousUriFilterResult", "id": 4 }, - "csamFilterResult": { + "csamFilterFilterResult": { "type": "CsamFilterResult", "id": 5 }, diff --git a/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json b/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json index 24ede320752..4a45efbb0b9 100644 --- a/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json +++ b/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-modelarmor", - "version": "0.0.0", + "version": "0.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-modelarmor/src/v1/model_armor_client.ts b/packages/google-cloud-modelarmor/src/v1/model_armor_client.ts index 4af3ef0af00..f927d59da5d 100644 --- a/packages/google-cloud-modelarmor/src/v1/model_armor_client.ts +++ b/packages/google-cloud-modelarmor/src/v1/model_armor_client.ts @@ -31,6 +31,7 @@ import type { import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging} from 'google-gax'; /** * Client JSON configuration object, loaded from @@ -55,6 +56,8 @@ export class ModelArmorClient { private _defaults: {[method: string]: gax.CallSettings}; private _universeDomain: string; private _servicePath: string; + private _log = logging.log('modelarmor'); + auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -90,7 +93,7 @@ export class ModelArmorClient { * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. @@ -492,8 +495,36 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); - return this.innerApiCalls.getTemplate(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.modelarmor.v1.ITemplate, + | protos.google.cloud.modelarmor.v1.IGetTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.modelarmor.v1.ITemplate, + protos.google.cloud.modelarmor.v1.IGetTemplateRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getTemplate response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Creates a new Template in a given project and location. @@ -602,8 +633,36 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); - return this.innerApiCalls.createTemplate(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('createTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.modelarmor.v1.ITemplate, + | protos.google.cloud.modelarmor.v1.ICreateTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.modelarmor.v1.ITemplate, + protos.google.cloud.modelarmor.v1.ICreateTemplateRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createTemplate response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Updates the parameters of a single Template. @@ -712,8 +771,36 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ 'template.name': request.template!.name ?? '', }); - this.initialize(); - return this.innerApiCalls.updateTemplate(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('updateTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.modelarmor.v1.ITemplate, + | protos.google.cloud.modelarmor.v1.IUpdateTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.modelarmor.v1.ITemplate, + protos.google.cloud.modelarmor.v1.IUpdateTemplateRequest | undefined, + {} | undefined, + ]) => { + this._log.info('updateTemplate response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Deletes a single Template. @@ -816,8 +903,36 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); - return this.innerApiCalls.deleteTemplate(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('deleteTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.modelarmor.v1.IDeleteTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.modelarmor.v1.IDeleteTemplateRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteTemplate response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Gets details of a single floor setting of a project @@ -907,8 +1022,36 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); - return this.innerApiCalls.getFloorSetting(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getFloorSetting request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.modelarmor.v1.IFloorSetting, + | protos.google.cloud.modelarmor.v1.IGetFloorSettingRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFloorSetting response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getFloorSetting(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.modelarmor.v1.IFloorSetting, + protos.google.cloud.modelarmor.v1.IGetFloorSettingRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getFloorSetting response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Updates the parameters of a single floor setting of a project @@ -1003,8 +1146,39 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ 'floor_setting.name': request.floorSetting!.name ?? '', }); - this.initialize(); - return this.innerApiCalls.updateFloorSetting(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('updateFloorSetting request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.modelarmor.v1.IFloorSetting, + | protos.google.cloud.modelarmor.v1.IUpdateFloorSettingRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateFloorSetting response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateFloorSetting(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.modelarmor.v1.IFloorSetting, + ( + | protos.google.cloud.modelarmor.v1.IUpdateFloorSettingRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('updateFloorSetting response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Sanitizes User Prompt. @@ -1096,8 +1270,39 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); - return this.innerApiCalls.sanitizeUserPrompt(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('sanitizeUserPrompt request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.modelarmor.v1.ISanitizeUserPromptResponse, + | protos.google.cloud.modelarmor.v1.ISanitizeUserPromptRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('sanitizeUserPrompt response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .sanitizeUserPrompt(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.modelarmor.v1.ISanitizeUserPromptResponse, + ( + | protos.google.cloud.modelarmor.v1.ISanitizeUserPromptRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('sanitizeUserPrompt response %j', response); + return [response, options, rawResponse]; + } + ); } /** * Sanitizes Model Response. @@ -1197,8 +1402,39 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); - return this.innerApiCalls.sanitizeModelResponse(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + this._log.info('sanitizeModelResponse request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.modelarmor.v1.ISanitizeModelResponseResponse, + | protos.google.cloud.modelarmor.v1.ISanitizeModelResponseRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('sanitizeModelResponse response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .sanitizeModelResponse(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.modelarmor.v1.ISanitizeModelResponseResponse, + ( + | protos.google.cloud.modelarmor.v1.ISanitizeModelResponseRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('sanitizeModelResponse response %j', response); + return [response, options, rawResponse]; + } + ); } /** @@ -1300,8 +1536,36 @@ export class ModelArmorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); - return this.innerApiCalls.listTemplates(request, options, callback); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.modelarmor.v1.IListTemplatesRequest, + | protos.google.cloud.modelarmor.v1.IListTemplatesResponse + | null + | undefined, + protos.google.cloud.modelarmor.v1.ITemplate + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTemplates values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTemplates request %j', request); + return this.innerApiCalls + .listTemplates(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.modelarmor.v1.ITemplate[], + protos.google.cloud.modelarmor.v1.IListTemplatesRequest | null, + protos.google.cloud.modelarmor.v1.IListTemplatesResponse, + ]) => { + this._log.info('listTemplates values %j', response); + return [response, input, output]; + } + ); } /** @@ -1344,7 +1608,10 @@ export class ModelArmorClient { }); const defaultCallSettings = this._defaults['listTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listTemplates stream %j', request); return this.descriptors.page.listTemplates.createStream( this.innerApiCalls.listTemplates as GaxCall, request, @@ -1395,7 +1662,10 @@ export class ModelArmorClient { }); const defaultCallSettings = this._defaults['listTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listTemplates iterate %j', request); return this.descriptors.page.listTemplates.asyncIterate( this.innerApiCalls['listTemplates'] as GaxCall, request as {}, @@ -1735,6 +2005,7 @@ export class ModelArmorClient { close(): Promise { if (this.modelArmorStub && !this._terminated) { return this.modelArmorStub.then(stub => { + this._log.info('ending gRPC channel'); this._terminated = true; stub.close(); this.locationsClient.close(); diff --git a/packages/google-cloud-modelarmor/test/gapic_model_armor_v1.ts b/packages/google-cloud-modelarmor/test/gapic_model_armor_v1.ts index 4b0ca3fb342..a100cc2c28d 100644 --- a/packages/google-cloud-modelarmor/test/gapic_model_armor_v1.ts +++ b/packages/google-cloud-modelarmor/test/gapic_model_armor_v1.ts @@ -250,7 +250,9 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelArmorStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetTemplateRequest() ); @@ -340,7 +342,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetTemplateRequest() ); @@ -387,7 +389,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetTemplateRequest() ); @@ -418,7 +420,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetTemplateRequest() ); @@ -439,7 +441,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.CreateTemplateRequest() ); @@ -470,7 +472,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.CreateTemplateRequest() ); @@ -517,7 +519,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.CreateTemplateRequest() ); @@ -548,7 +550,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.CreateTemplateRequest() ); @@ -569,7 +571,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateTemplateRequest() ); @@ -601,7 +603,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateTemplateRequest() ); @@ -649,7 +651,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateTemplateRequest() ); @@ -681,7 +683,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateTemplateRequest() ); @@ -703,7 +705,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.DeleteTemplateRequest() ); @@ -734,7 +736,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.DeleteTemplateRequest() ); @@ -781,7 +783,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.DeleteTemplateRequest() ); @@ -812,7 +814,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.DeleteTemplateRequest() ); @@ -833,7 +835,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetFloorSettingRequest() ); @@ -864,7 +866,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetFloorSettingRequest() ); @@ -911,7 +913,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetFloorSettingRequest() ); @@ -942,7 +944,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.GetFloorSettingRequest() ); @@ -963,7 +965,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateFloorSettingRequest() ); @@ -996,7 +998,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateFloorSettingRequest() ); @@ -1044,7 +1046,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateFloorSettingRequest() ); @@ -1076,7 +1078,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.UpdateFloorSettingRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeUserPromptRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeUserPromptRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeUserPromptRequest() ); @@ -1208,7 +1210,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeUserPromptRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeModelResponseRequest() ); @@ -1261,7 +1263,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeModelResponseRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeModelResponseRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.SanitizeModelResponseRequest() ); @@ -1366,7 +1368,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.ListTemplatesRequest() ); @@ -1399,7 +1401,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.ListTemplatesRequest() ); @@ -1448,7 +1450,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.ListTemplatesRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.ListTemplatesRequest() ); @@ -1533,7 +1535,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.ListTemplatesRequest() ); @@ -1582,7 +1584,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.ListTemplatesRequest() ); @@ -1625,7 +1627,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.modelarmor.v1.ListTemplatesRequest() ); @@ -1666,7 +1668,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1696,7 +1698,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1740,7 +1742,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1775,7 +1777,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1823,7 +1825,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1860,7 +1862,7 @@ describe('v1.ModelArmorClient', () => { }); describe('Path templates', () => { - describe('folderLocationFloorSetting', () => { + describe('folderLocationFloorSetting', async () => { const fakePath = '/rendered/path/folderLocationFloorSetting'; const expectedParameters = { folder: 'folderValue', @@ -1870,7 +1872,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationFloorSettingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1923,7 +1925,7 @@ describe('v1.ModelArmorClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1933,7 +1935,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1972,7 +1974,7 @@ describe('v1.ModelArmorClient', () => { }); }); - describe('organizationLocationFloorSetting', () => { + describe('organizationLocationFloorSetting', async () => { const fakePath = '/rendered/path/organizationLocationFloorSetting'; const expectedParameters = { organization: 'organizationValue', @@ -1982,7 +1984,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationFloorSettingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationFloorSettingPathTemplate.match = @@ -2037,7 +2039,7 @@ describe('v1.ModelArmorClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2046,7 +2048,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2075,7 +2077,7 @@ describe('v1.ModelArmorClient', () => { }); }); - describe('projectLocationFloorSetting', () => { + describe('projectLocationFloorSetting', async () => { const fakePath = '/rendered/path/projectLocationFloorSetting'; const expectedParameters = { project: 'projectValue', @@ -2085,7 +2087,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationFloorSettingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationFloorSettingPathTemplate.match = sinon @@ -2137,7 +2139,7 @@ describe('v1.ModelArmorClient', () => { }); }); - describe('template', () => { + describe('template', async () => { const fakePath = '/rendered/path/template'; const expectedParameters = { project: 'projectValue', @@ -2148,7 +2150,7 @@ describe('v1.ModelArmorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.templatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-modelarmor/tsconfig.json b/packages/google-cloud-modelarmor/tsconfig.json index c78f1c884ef..860d6bf027b 100644 --- a/packages/google-cloud-modelarmor/tsconfig.json +++ b/packages/google-cloud-modelarmor/tsconfig.json @@ -14,6 +14,8 @@ "src/**/*.ts", "test/*.ts", "test/**/*.ts", - "system-test/*.ts" + "system-test/*.ts", + "src/**/*.json", + "protos/protos.json" ] } diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 1ea43b2e9aa..34af828ad50 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Stackdriver Monitoring API][enable_api]. -1. [Set up authentication][auth] so you can access the +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -189,4 +189,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=monitoring.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 6bb6d4a9938..cb1caa6802d 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index aaf3be56186..8bc24c063ef 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -1,7 +1,4 @@ { - "options": { - "syntax": "proto3" - }, "nested": { "google": { "nested": { diff --git a/packages/google-cloud-netapp/package.json b/packages/google-cloud-netapp/package.json index ff1d89ee378..a8b7c28a931 100644 --- a/packages/google-cloud-netapp/package.json +++ b/packages/google-cloud-netapp/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json index bdb651c693e..e9c430befc1 100644 --- a/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json +++ b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-netapp", - "version": "0.9.0", + "version": "0.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-netapp/src/v1/net_app_client.ts b/packages/google-cloud-netapp/src/v1/net_app_client.ts index 6985c679843..e373b8e4ff1 100644 --- a/packages/google-cloud-netapp/src/v1/net_app_client.ts +++ b/packages/google-cloud-netapp/src/v1/net_app_client.ts @@ -1100,7 +1100,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStoragePool request %j', request); const wrappedCallback: | Callback< @@ -1208,7 +1210,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVolume request %j', request); const wrappedCallback: | Callback< @@ -1315,7 +1319,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSnapshot request %j', request); const wrappedCallback: | Callback< @@ -1429,7 +1435,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getActiveDirectory request %j', request); const wrappedCallback: | Callback< @@ -1537,7 +1545,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKmsConfig request %j', request); const wrappedCallback: | Callback< @@ -1645,7 +1655,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('verifyKmsConfig request %j', request); const wrappedCallback: | Callback< @@ -1756,7 +1768,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReplication request %j', request); const wrappedCallback: | Callback< @@ -1867,7 +1881,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupVault request %j', request); const wrappedCallback: | Callback< @@ -1976,7 +1992,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -2085,7 +2103,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupPolicy request %j', request); const wrappedCallback: | Callback< @@ -2193,7 +2213,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQuotaRule request %j', request); const wrappedCallback: | Callback< @@ -2327,7 +2349,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2500,7 +2524,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'storage_pool.name': request.storagePool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2667,7 +2693,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2837,7 +2865,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3005,7 +3035,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3179,7 +3211,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3352,7 +3386,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'volume.name': request.volume!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3523,7 +3559,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3697,7 +3735,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3872,7 +3912,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4040,7 +4082,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4210,7 +4254,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'snapshot.name': request.snapshot!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4385,7 +4431,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4558,7 +4606,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'active_directory.name': request.activeDirectory!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4725,7 +4775,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4899,7 +4951,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5072,7 +5126,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'kms_config.name': request.kmsConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5240,7 +5296,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5407,7 +5465,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5582,7 +5642,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5750,7 +5812,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5920,7 +5984,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'replication.name': request.replication!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6095,7 +6161,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6263,7 +6331,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6432,7 +6502,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6617,7 +6689,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6786,7 +6860,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6962,7 +7038,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7135,7 +7213,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'backup_vault.name': request.backupVault!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7303,7 +7383,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7482,7 +7564,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7650,7 +7734,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7823,7 +7909,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7999,7 +8087,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8172,7 +8262,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'backup_policy.name': request.backupPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8340,7 +8432,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8514,7 +8608,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8687,7 +8783,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ 'quota_rule.name': request.quotaRule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8854,7 +8952,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9022,7 +9122,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListStoragePoolsRequest, @@ -9093,7 +9195,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listStoragePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStoragePools stream %j', request); return this.descriptors.page.listStoragePools.createStream( this.innerApiCalls.listStoragePools as GaxCall, @@ -9146,7 +9250,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listStoragePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStoragePools iterate %j', request); return this.descriptors.page.listStoragePools.asyncIterate( this.innerApiCalls['listStoragePools'] as GaxCall, @@ -9245,7 +9351,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListVolumesRequest, @@ -9313,7 +9421,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listVolumes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumes stream %j', request); return this.descriptors.page.listVolumes.createStream( this.innerApiCalls.listVolumes as GaxCall, @@ -9365,7 +9475,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listVolumes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumes iterate %j', request); return this.descriptors.page.listVolumes.asyncIterate( this.innerApiCalls['listVolumes'] as GaxCall, @@ -9468,7 +9580,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListSnapshotsRequest, @@ -9540,7 +9654,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSnapshots stream %j', request); return this.descriptors.page.listSnapshots.createStream( this.innerApiCalls.listSnapshots as GaxCall, @@ -9594,7 +9710,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSnapshots iterate %j', request); return this.descriptors.page.listSnapshots.asyncIterate( this.innerApiCalls['listSnapshots'] as GaxCall, @@ -9701,7 +9819,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, @@ -9771,7 +9891,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listActiveDirectories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listActiveDirectories stream %j', request); return this.descriptors.page.listActiveDirectories.createStream( this.innerApiCalls.listActiveDirectories as GaxCall, @@ -9823,7 +9945,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listActiveDirectories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listActiveDirectories iterate %j', request); return this.descriptors.page.listActiveDirectories.asyncIterate( this.innerApiCalls['listActiveDirectories'] as GaxCall, @@ -9924,7 +10048,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListKmsConfigsRequest, @@ -9994,7 +10120,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listKmsConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKmsConfigs stream %j', request); return this.descriptors.page.listKmsConfigs.createStream( this.innerApiCalls.listKmsConfigs as GaxCall, @@ -10046,7 +10174,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listKmsConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKmsConfigs iterate %j', request); return this.descriptors.page.listKmsConfigs.asyncIterate( this.innerApiCalls['listKmsConfigs'] as GaxCall, @@ -10155,7 +10285,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListReplicationsRequest, @@ -10227,7 +10359,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listReplications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReplications stream %j', request); return this.descriptors.page.listReplications.createStream( this.innerApiCalls.listReplications as GaxCall, @@ -10281,7 +10415,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listReplications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReplications iterate %j', request); return this.descriptors.page.listReplications.asyncIterate( this.innerApiCalls['listReplications'] as GaxCall, @@ -10390,7 +10526,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListBackupVaultsRequest, @@ -10462,7 +10600,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listBackupVaults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupVaults stream %j', request); return this.descriptors.page.listBackupVaults.createStream( this.innerApiCalls.listBackupVaults as GaxCall, @@ -10516,7 +10656,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listBackupVaults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupVaults iterate %j', request); return this.descriptors.page.listBackupVaults.asyncIterate( this.innerApiCalls['listBackupVaults'] as GaxCall, @@ -10628,7 +10770,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListBackupsRequest, @@ -10709,7 +10853,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -10774,7 +10920,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -10881,7 +11029,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, @@ -10951,7 +11101,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listBackupPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPolicies stream %j', request); return this.descriptors.page.listBackupPolicies.createStream( this.innerApiCalls.listBackupPolicies as GaxCall, @@ -11003,7 +11155,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listBackupPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPolicies iterate %j', request); return this.descriptors.page.listBackupPolicies.asyncIterate( this.innerApiCalls['listBackupPolicies'] as GaxCall, @@ -11104,7 +11258,9 @@ export class NetAppClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.netapp.v1.IListQuotaRulesRequest, @@ -11174,7 +11330,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listQuotaRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaRules stream %j', request); return this.descriptors.page.listQuotaRules.createStream( this.innerApiCalls.listQuotaRules as GaxCall, @@ -11226,7 +11384,9 @@ export class NetAppClient { }); const defaultCallSettings = this._defaults['listQuotaRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaRules iterate %j', request); return this.descriptors.page.listQuotaRules.asyncIterate( this.innerApiCalls['listQuotaRules'] as GaxCall, @@ -11406,7 +11566,7 @@ export class NetAppClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-netapp/test/gapic_net_app_v1.ts b/packages/google-cloud-netapp/test/gapic_net_app_v1.ts index 46246ebb63e..03f25931aaa 100644 --- a/packages/google-cloud-netapp/test/gapic_net_app_v1.ts +++ b/packages/google-cloud-netapp/test/gapic_net_app_v1.ts @@ -287,7 +287,9 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.netAppStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetStoragePoolRequest() ); @@ -377,7 +379,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetStoragePoolRequest() ); @@ -424,7 +426,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetStoragePoolRequest() ); @@ -455,7 +457,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetStoragePoolRequest() ); @@ -476,7 +478,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetVolumeRequest() ); @@ -507,7 +509,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetVolumeRequest() ); @@ -554,7 +556,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetVolumeRequest() ); @@ -582,7 +584,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetVolumeRequest() ); @@ -603,7 +605,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetSnapshotRequest() ); @@ -634,7 +636,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetSnapshotRequest() ); @@ -681,7 +683,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetSnapshotRequest() ); @@ -712,7 +714,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetSnapshotRequest() ); @@ -733,7 +735,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() ); @@ -765,7 +767,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() ); @@ -812,7 +814,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() ); @@ -843,7 +845,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() ); @@ -864,7 +866,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetKmsConfigRequest() ); @@ -895,7 +897,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetKmsConfigRequest() ); @@ -942,7 +944,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetKmsConfigRequest() ); @@ -973,7 +975,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetKmsConfigRequest() ); @@ -994,7 +996,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() ); @@ -1025,7 +1027,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() ); @@ -1072,7 +1074,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() ); @@ -1103,7 +1105,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() ); @@ -1124,7 +1126,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetReplicationRequest() ); @@ -1155,7 +1157,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetReplicationRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetReplicationRequest() ); @@ -1233,7 +1235,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetReplicationRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupVaultRequest() ); @@ -1285,7 +1287,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupVaultRequest() ); @@ -1332,7 +1334,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupVaultRequest() ); @@ -1363,7 +1365,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupVaultRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupRequest() ); @@ -1415,7 +1417,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupRequest() ); @@ -1462,7 +1464,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupRequest() ); @@ -1490,7 +1492,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupRequest() ); @@ -1511,7 +1513,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() ); @@ -1542,7 +1544,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() ); @@ -1589,7 +1591,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() ); @@ -1641,7 +1643,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() ); @@ -1672,7 +1674,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() ); @@ -1719,7 +1721,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() ); @@ -1750,7 +1752,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() ); @@ -1771,7 +1773,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() ); @@ -1804,7 +1806,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() ); @@ -1858,7 +1860,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() ); @@ -1889,7 +1891,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() ); @@ -1922,7 +1924,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1944,7 +1946,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1965,7 +1967,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() ); @@ -1999,7 +2001,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() ); @@ -2054,7 +2056,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() ); @@ -2086,7 +2088,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() ); @@ -2120,7 +2122,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2142,7 +2144,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2163,7 +2165,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() ); @@ -2196,7 +2198,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() ); @@ -2250,7 +2252,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() ); @@ -2281,7 +2283,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() ); @@ -2314,7 +2316,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2336,7 +2338,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2357,7 +2359,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() ); @@ -2390,7 +2392,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() ); @@ -2444,7 +2446,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() ); @@ -2478,7 +2480,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() ); @@ -2511,7 +2513,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2534,7 +2536,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2555,7 +2557,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() ); @@ -2588,7 +2590,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() ); @@ -2642,7 +2644,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() ); @@ -2676,7 +2678,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() ); @@ -2709,7 +2711,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2732,7 +2734,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2753,7 +2755,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateVolumeRequest() ); @@ -2785,7 +2787,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateVolumeRequest() ); @@ -2839,7 +2841,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateVolumeRequest() ); @@ -2870,7 +2872,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateVolumeRequest() ); @@ -2903,7 +2905,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2925,7 +2927,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2943,7 +2945,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateVolumeRequest() ); @@ -2976,7 +2978,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateVolumeRequest() ); @@ -3031,7 +3033,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateVolumeRequest() ); @@ -3063,7 +3065,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateVolumeRequest() ); @@ -3097,7 +3099,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3119,7 +3121,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3137,7 +3139,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteVolumeRequest() ); @@ -3169,7 +3171,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteVolumeRequest() ); @@ -3223,7 +3225,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteVolumeRequest() ); @@ -3254,7 +3256,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteVolumeRequest() ); @@ -3287,7 +3289,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3309,7 +3311,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3327,7 +3329,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.RevertVolumeRequest() ); @@ -3359,7 +3361,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.RevertVolumeRequest() ); @@ -3413,7 +3415,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.RevertVolumeRequest() ); @@ -3444,7 +3446,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.RevertVolumeRequest() ); @@ -3477,7 +3479,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3499,7 +3501,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3517,7 +3519,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateSnapshotRequest() ); @@ -3550,7 +3552,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateSnapshotRequest() ); @@ -3604,7 +3606,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateSnapshotRequest() ); @@ -3635,7 +3637,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateSnapshotRequest() ); @@ -3668,7 +3670,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3690,7 +3692,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3711,7 +3713,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() ); @@ -3744,7 +3746,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() ); @@ -3798,7 +3800,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() ); @@ -3829,7 +3831,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() ); @@ -3862,7 +3864,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3884,7 +3886,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3905,7 +3907,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() ); @@ -3939,7 +3941,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() ); @@ -3994,7 +3996,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() ); @@ -4026,7 +4028,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() ); @@ -4060,7 +4062,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4082,7 +4084,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4103,7 +4105,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() ); @@ -4136,7 +4138,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() ); @@ -4190,7 +4192,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() ); @@ -4224,7 +4226,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() ); @@ -4257,7 +4259,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4279,7 +4281,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4300,7 +4302,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() ); @@ -4334,7 +4336,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() ); @@ -4389,7 +4391,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() ); @@ -4424,7 +4426,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() ); @@ -4458,7 +4460,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4480,7 +4482,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4501,7 +4503,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() ); @@ -4534,7 +4536,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() ); @@ -4588,7 +4590,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() ); @@ -4622,7 +4624,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() ); @@ -4655,7 +4657,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4677,7 +4679,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4698,7 +4700,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() ); @@ -4731,7 +4733,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() ); @@ -4785,7 +4787,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() ); @@ -4816,7 +4818,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() ); @@ -4849,7 +4851,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4871,7 +4873,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4892,7 +4894,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() ); @@ -4926,7 +4928,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() ); @@ -4981,7 +4983,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() ); @@ -5013,7 +5015,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() ); @@ -5047,7 +5049,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5069,7 +5071,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5090,7 +5092,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EncryptVolumesRequest() ); @@ -5123,7 +5125,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EncryptVolumesRequest() ); @@ -5177,7 +5179,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EncryptVolumesRequest() ); @@ -5208,7 +5210,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EncryptVolumesRequest() ); @@ -5241,7 +5243,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5263,7 +5265,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5284,7 +5286,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() ); @@ -5317,7 +5319,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() ); @@ -5371,7 +5373,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() ); @@ -5402,7 +5404,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() ); @@ -5435,7 +5437,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5457,7 +5459,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5478,7 +5480,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateReplicationRequest() ); @@ -5511,7 +5513,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateReplicationRequest() ); @@ -5565,7 +5567,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateReplicationRequest() ); @@ -5596,7 +5598,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateReplicationRequest() ); @@ -5629,7 +5631,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5651,7 +5653,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5672,7 +5674,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteReplicationRequest() ); @@ -5705,7 +5707,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteReplicationRequest() ); @@ -5759,7 +5761,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteReplicationRequest() ); @@ -5790,7 +5792,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteReplicationRequest() ); @@ -5823,7 +5825,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5845,7 +5847,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5866,7 +5868,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateReplicationRequest() ); @@ -5900,7 +5902,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateReplicationRequest() ); @@ -5955,7 +5957,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateReplicationRequest() ); @@ -5987,7 +5989,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateReplicationRequest() ); @@ -6021,7 +6023,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6043,7 +6045,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6064,7 +6066,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.StopReplicationRequest() ); @@ -6097,7 +6099,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.StopReplicationRequest() ); @@ -6151,7 +6153,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.StopReplicationRequest() ); @@ -6182,7 +6184,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.StopReplicationRequest() ); @@ -6215,7 +6217,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6237,7 +6239,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6258,7 +6260,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ResumeReplicationRequest() ); @@ -6291,7 +6293,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ResumeReplicationRequest() ); @@ -6345,7 +6347,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ResumeReplicationRequest() ); @@ -6376,7 +6378,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ResumeReplicationRequest() ); @@ -6409,7 +6411,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6431,7 +6433,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6452,7 +6454,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() ); @@ -6485,7 +6487,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() ); @@ -6539,7 +6541,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() ); @@ -6573,7 +6575,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() ); @@ -6606,7 +6608,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6629,7 +6631,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6650,7 +6652,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EstablishPeeringRequest() ); @@ -6683,7 +6685,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EstablishPeeringRequest() ); @@ -6737,7 +6739,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EstablishPeeringRequest() ); @@ -6768,7 +6770,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.EstablishPeeringRequest() ); @@ -6801,7 +6803,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6823,7 +6825,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6844,7 +6846,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SyncReplicationRequest() ); @@ -6877,7 +6879,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SyncReplicationRequest() ); @@ -6931,7 +6933,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SyncReplicationRequest() ); @@ -6962,7 +6964,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.SyncReplicationRequest() ); @@ -6995,7 +6997,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7017,7 +7019,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7038,7 +7040,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() ); @@ -7071,7 +7073,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() ); @@ -7125,7 +7127,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() ); @@ -7156,7 +7158,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() ); @@ -7189,7 +7191,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7211,7 +7213,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7232,7 +7234,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() ); @@ -7266,7 +7268,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() ); @@ -7321,7 +7323,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() ); @@ -7353,7 +7355,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() ); @@ -7387,7 +7389,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7409,7 +7411,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7430,7 +7432,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() ); @@ -7463,7 +7465,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() ); @@ -7517,7 +7519,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() ); @@ -7548,7 +7550,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() ); @@ -7581,7 +7583,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7603,7 +7605,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7624,7 +7626,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupRequest() ); @@ -7656,7 +7658,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupRequest() ); @@ -7710,7 +7712,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupRequest() ); @@ -7741,7 +7743,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupRequest() ); @@ -7774,7 +7776,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7796,7 +7798,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7814,7 +7816,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupRequest() ); @@ -7846,7 +7848,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupRequest() ); @@ -7900,7 +7902,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupRequest() ); @@ -7931,7 +7933,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupRequest() ); @@ -7964,7 +7966,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7986,7 +7988,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8004,7 +8006,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupRequest() ); @@ -8037,7 +8039,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupRequest() ); @@ -8092,7 +8094,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupRequest() ); @@ -8124,7 +8126,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupRequest() ); @@ -8158,7 +8160,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8180,7 +8182,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8198,7 +8200,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() ); @@ -8231,7 +8233,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() ); @@ -8285,7 +8287,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() ); @@ -8316,7 +8318,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() ); @@ -8349,7 +8351,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8371,7 +8373,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8392,7 +8394,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() ); @@ -8426,7 +8428,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() ); @@ -8481,7 +8483,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() ); @@ -8513,7 +8515,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() ); @@ -8547,7 +8549,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8569,7 +8571,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8590,7 +8592,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() ); @@ -8623,7 +8625,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() ); @@ -8677,7 +8679,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() ); @@ -8708,7 +8710,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() ); @@ -8741,7 +8743,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8763,7 +8765,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8784,7 +8786,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() ); @@ -8817,7 +8819,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() ); @@ -8871,7 +8873,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() ); @@ -8902,7 +8904,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() ); @@ -8935,7 +8937,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8957,7 +8959,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8978,7 +8980,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() ); @@ -9012,7 +9014,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() ); @@ -9067,7 +9069,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() ); @@ -9099,7 +9101,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() ); @@ -9133,7 +9135,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9155,7 +9157,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9176,7 +9178,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() ); @@ -9209,7 +9211,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() ); @@ -9263,7 +9265,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() ); @@ -9294,7 +9296,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() ); @@ -9327,7 +9329,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9349,7 +9351,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9370,7 +9372,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() ); @@ -9403,7 +9405,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() ); @@ -9452,7 +9454,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() ); @@ -9483,7 +9485,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() ); @@ -9537,7 +9539,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() ); @@ -9586,7 +9588,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() ); @@ -9629,7 +9631,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() ); @@ -9671,7 +9673,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListVolumesRequest() ); @@ -9704,7 +9706,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListVolumesRequest() ); @@ -9753,7 +9755,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListVolumesRequest() ); @@ -9784,7 +9786,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListVolumesRequest() ); @@ -9835,7 +9837,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListVolumesRequest() ); @@ -9883,7 +9885,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListVolumesRequest() ); @@ -9926,7 +9928,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListVolumesRequest() ); @@ -9970,7 +9972,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListSnapshotsRequest() ); @@ -10003,7 +10005,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListSnapshotsRequest() ); @@ -10052,7 +10054,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListSnapshotsRequest() ); @@ -10083,7 +10085,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListSnapshotsRequest() ); @@ -10137,7 +10139,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListSnapshotsRequest() ); @@ -10186,7 +10188,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListSnapshotsRequest() ); @@ -10229,7 +10231,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListSnapshotsRequest() ); @@ -10271,7 +10273,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() ); @@ -10311,7 +10313,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() ); @@ -10366,7 +10368,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() ); @@ -10400,7 +10402,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() ); @@ -10466,7 +10468,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() ); @@ -10521,7 +10523,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() ); @@ -10574,7 +10576,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() ); @@ -10620,7 +10622,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() ); @@ -10653,7 +10655,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() ); @@ -10702,7 +10704,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() ); @@ -10733,7 +10735,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() ); @@ -10787,7 +10789,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() ); @@ -10836,7 +10838,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() ); @@ -10879,7 +10881,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() ); @@ -10921,7 +10923,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListReplicationsRequest() ); @@ -10954,7 +10956,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListReplicationsRequest() ); @@ -11003,7 +11005,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListReplicationsRequest() ); @@ -11034,7 +11036,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListReplicationsRequest() ); @@ -11088,7 +11090,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListReplicationsRequest() ); @@ -11137,7 +11139,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListReplicationsRequest() ); @@ -11180,7 +11182,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListReplicationsRequest() ); @@ -11222,7 +11224,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() ); @@ -11255,7 +11257,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() ); @@ -11304,7 +11306,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() ); @@ -11335,7 +11337,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() ); @@ -11389,7 +11391,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() ); @@ -11438,7 +11440,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() ); @@ -11481,7 +11483,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() ); @@ -11523,7 +11525,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupsRequest() ); @@ -11556,7 +11558,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupsRequest() ); @@ -11605,7 +11607,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupsRequest() ); @@ -11636,7 +11638,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupsRequest() ); @@ -11687,7 +11689,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupsRequest() ); @@ -11735,7 +11737,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupsRequest() ); @@ -11778,7 +11780,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupsRequest() ); @@ -11822,7 +11824,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() ); @@ -11856,7 +11858,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() ); @@ -11905,7 +11907,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() ); @@ -11936,7 +11938,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() ); @@ -11990,7 +11992,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() ); @@ -12039,7 +12041,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() ); @@ -12082,7 +12084,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() ); @@ -12124,7 +12126,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() ); @@ -12157,7 +12159,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() ); @@ -12206,7 +12208,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() ); @@ -12237,7 +12239,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() ); @@ -12291,7 +12293,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() ); @@ -12340,7 +12342,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() ); @@ -12383,7 +12385,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() ); @@ -12424,7 +12426,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -12454,7 +12456,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -12498,7 +12500,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -12533,7 +12535,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -12581,7 +12583,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -12622,7 +12624,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -12701,7 +12703,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -12781,7 +12783,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -12877,8 +12879,7 @@ describe('v1.NetAppClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -12897,7 +12898,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -12906,8 +12907,7 @@ describe('v1.NetAppClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -12923,7 +12923,7 @@ describe('v1.NetAppClient', () => { }); describe('Path templates', () => { - describe('activeDirectory', () => { + describe('activeDirectory', async () => { const fakePath = '/rendered/path/activeDirectory'; const expectedParameters = { project: 'projectValue', @@ -12934,7 +12934,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.activeDirectoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -12988,7 +12988,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -13000,7 +13000,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13064,7 +13064,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('backupPolicy', () => { + describe('backupPolicy', async () => { const fakePath = '/rendered/path/backupPolicy'; const expectedParameters = { project: 'projectValue', @@ -13075,7 +13075,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13128,7 +13128,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('backupVault', () => { + describe('backupVault', async () => { const fakePath = '/rendered/path/backupVault'; const expectedParameters = { project: 'projectValue', @@ -13139,7 +13139,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupVaultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13192,7 +13192,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('kmsConfig', () => { + describe('kmsConfig', async () => { const fakePath = '/rendered/path/kmsConfig'; const expectedParameters = { project: 'projectValue', @@ -13203,7 +13203,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.kmsConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13256,7 +13256,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('quotaRule', () => { + describe('quotaRule', async () => { const fakePath = '/rendered/path/quotaRule'; const expectedParameters = { project: 'projectValue', @@ -13268,7 +13268,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.quotaRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -13332,7 +13332,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('replication', () => { + describe('replication', async () => { const fakePath = '/rendered/path/replication'; const expectedParameters = { project: 'projectValue', @@ -13344,7 +13344,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.replicationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13408,7 +13408,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('snapshot', () => { + describe('snapshot', async () => { const fakePath = '/rendered/path/snapshot'; const expectedParameters = { project: 'projectValue', @@ -13420,7 +13420,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.snapshotPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13484,7 +13484,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('storagePool', () => { + describe('storagePool', async () => { const fakePath = '/rendered/path/storagePool'; const expectedParameters = { project: 'projectValue', @@ -13495,7 +13495,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.storagePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13548,7 +13548,7 @@ describe('v1.NetAppClient', () => { }); }); - describe('volume', () => { + describe('volume', async () => { const fakePath = '/rendered/path/volume'; const expectedParameters = { project: 'projectValue', @@ -13559,7 +13559,7 @@ describe('v1.NetAppClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.volumePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkconnectivity/package.json b/packages/google-cloud-networkconnectivity/package.json index 37cd6f82706..414ad2e12f5 100644 --- a/packages/google-cloud-networkconnectivity/package.json +++ b/packages/google-cloud-networkconnectivity/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json index 29d5a96e163..df25f9ac4b4 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json index 8d7673870a1..c5d7adc21a0 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json index 5d2c4e0b4b6..d4c5eaf9466 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json index 5d2c4e0b4b6..d4c5eaf9466 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/src/v1/hub_service_client.ts b/packages/google-cloud-networkconnectivity/src/v1/hub_service_client.ts index 0520e2c9d84..2754d4ba166 100644 --- a/packages/google-cloud-networkconnectivity/src/v1/hub_service_client.ts +++ b/packages/google-cloud-networkconnectivity/src/v1/hub_service_client.ts @@ -767,7 +767,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHub request %j', request); const wrappedCallback: | Callback< @@ -883,7 +885,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpoke request %j', request); const wrappedCallback: | Callback< @@ -1008,7 +1012,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRouteTable request %j', request); const wrappedCallback: | Callback< @@ -1127,7 +1133,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRoute request %j', request); const wrappedCallback: | Callback< @@ -1246,7 +1254,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGroup request %j', request); const wrappedCallback: | Callback< @@ -1397,7 +1407,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1586,7 +1598,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ 'hub.name': request.hub!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1768,7 +1782,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1954,7 +1970,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2142,7 +2160,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ 'spoke.name': request.spoke!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2331,7 +2351,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2516,7 +2538,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2698,7 +2722,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2886,7 +2912,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ 'group.name': request.group!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3052,7 +3080,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IListHubsRequest, @@ -3121,7 +3151,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listHubs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHubs stream %j', request); return this.descriptors.page.listHubs.createStream( this.innerApiCalls.listHubs as GaxCall, @@ -3172,7 +3204,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listHubs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHubs iterate %j', request); return this.descriptors.page.listHubs.asyncIterate( this.innerApiCalls['listHubs'] as GaxCall, @@ -3293,7 +3327,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IListHubSpokesRequest, @@ -3375,7 +3411,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listHubSpokes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHubSpokes stream %j', request); return this.descriptors.page.listHubSpokes.createStream( this.innerApiCalls.listHubSpokes as GaxCall, @@ -3439,7 +3477,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listHubSpokes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHubSpokes iterate %j', request); return this.descriptors.page.listHubSpokes.asyncIterate( this.innerApiCalls['listHubSpokes'] as GaxCall, @@ -3572,7 +3612,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IQueryHubStatusRequest, @@ -3667,7 +3709,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['queryHubStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryHubStatus stream %j', request); return this.descriptors.page.queryHubStatus.createStream( this.innerApiCalls.queryHubStatus as GaxCall, @@ -3744,7 +3788,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['queryHubStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryHubStatus iterate %j', request); return this.descriptors.page.queryHubStatus.asyncIterate( this.innerApiCalls['queryHubStatus'] as GaxCall, @@ -3851,7 +3897,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IListSpokesRequest, @@ -3920,7 +3968,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listSpokes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpokes stream %j', request); return this.descriptors.page.listSpokes.createStream( this.innerApiCalls.listSpokes as GaxCall, @@ -3971,7 +4021,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listSpokes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpokes iterate %j', request); return this.descriptors.page.listSpokes.asyncIterate( this.innerApiCalls['listSpokes'] as GaxCall, @@ -4077,7 +4129,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IListRoutesRequest, @@ -4146,7 +4200,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutes stream %j', request); return this.descriptors.page.listRoutes.createStream( this.innerApiCalls.listRoutes as GaxCall, @@ -4197,7 +4253,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutes iterate %j', request); return this.descriptors.page.listRoutes.asyncIterate( this.innerApiCalls['listRoutes'] as GaxCall, @@ -4303,7 +4361,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IListRouteTablesRequest, @@ -4372,7 +4432,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listRouteTables']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRouteTables stream %j', request); return this.descriptors.page.listRouteTables.createStream( this.innerApiCalls.listRouteTables as GaxCall, @@ -4423,7 +4485,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listRouteTables']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRouteTables iterate %j', request); return this.descriptors.page.listRouteTables.asyncIterate( this.innerApiCalls['listRouteTables'] as GaxCall, @@ -4529,7 +4593,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IListGroupsRequest, @@ -4598,7 +4664,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGroups stream %j', request); return this.descriptors.page.listGroups.createStream( this.innerApiCalls.listGroups as GaxCall, @@ -4649,7 +4717,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGroups iterate %j', request); return this.descriptors.page.listGroups.asyncIterate( this.innerApiCalls['listGroups'] as GaxCall, @@ -4967,7 +5037,7 @@ export class HubServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkconnectivity/src/v1/policy_based_routing_service_client.ts b/packages/google-cloud-networkconnectivity/src/v1/policy_based_routing_service_client.ts index 69ce0f7abc9..e91b0851672 100644 --- a/packages/google-cloud-networkconnectivity/src/v1/policy_based_routing_service_client.ts +++ b/packages/google-cloud-networkconnectivity/src/v1/policy_based_routing_service_client.ts @@ -649,7 +649,9 @@ export class PolicyBasedRoutingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicyBasedRoute request %j', request); const wrappedCallback: | Callback< @@ -799,7 +801,9 @@ export class PolicyBasedRoutingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -980,7 +984,9 @@ export class PolicyBasedRoutingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1146,7 +1152,9 @@ export class PolicyBasedRoutingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1.IListPolicyBasedRoutesRequest, @@ -1215,7 +1223,9 @@ export class PolicyBasedRoutingServiceClient { }); const defaultCallSettings = this._defaults['listPolicyBasedRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyBasedRoutes stream %j', request); return this.descriptors.page.listPolicyBasedRoutes.createStream( this.innerApiCalls.listPolicyBasedRoutes as GaxCall, @@ -1266,7 +1276,9 @@ export class PolicyBasedRoutingServiceClient { }); const defaultCallSettings = this._defaults['listPolicyBasedRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyBasedRoutes iterate %j', request); return this.descriptors.page.listPolicyBasedRoutes.asyncIterate( this.innerApiCalls['listPolicyBasedRoutes'] as GaxCall, @@ -1584,7 +1596,7 @@ export class PolicyBasedRoutingServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkconnectivity/src/v1alpha1/hub_service_client.ts b/packages/google-cloud-networkconnectivity/src/v1alpha1/hub_service_client.ts index 8e38d921d24..fafdc7b6b81 100644 --- a/packages/google-cloud-networkconnectivity/src/v1alpha1/hub_service_client.ts +++ b/packages/google-cloud-networkconnectivity/src/v1alpha1/hub_service_client.ts @@ -657,7 +657,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHub request %j', request); const wrappedCallback: | Callback< @@ -782,7 +784,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSpoke request %j', request); const wrappedCallback: | Callback< @@ -932,7 +936,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1119,7 +1125,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ 'hub.name': request.hub!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1300,7 +1308,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1485,7 +1495,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1672,7 +1684,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ 'spoke.name': request.spoke!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1853,7 +1867,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2019,7 +2035,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1alpha1.IListHubsRequest, @@ -2088,7 +2106,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listHubs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHubs stream %j', request); return this.descriptors.page.listHubs.createStream( this.innerApiCalls.listHubs as GaxCall, @@ -2139,7 +2159,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listHubs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHubs iterate %j', request); return this.descriptors.page.listHubs.asyncIterate( this.innerApiCalls['listHubs'] as GaxCall, @@ -2245,7 +2267,9 @@ export class HubServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkconnectivity.v1alpha1.IListSpokesRequest, @@ -2314,7 +2338,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listSpokes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpokes stream %j', request); return this.descriptors.page.listSpokes.createStream( this.innerApiCalls.listSpokes as GaxCall, @@ -2365,7 +2391,9 @@ export class HubServiceClient { }); const defaultCallSettings = this._defaults['listSpokes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSpokes iterate %j', request); return this.descriptors.page.listSpokes.asyncIterate( this.innerApiCalls['listSpokes'] as GaxCall, diff --git a/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1.ts b/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1.ts index df5d0ce12c4..fb29e5af5ac 100644 --- a/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1.ts +++ b/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1.ts @@ -291,7 +291,9 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.hubServiceStub); client.close().then(() => { done(); @@ -350,7 +352,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetHubRequest() ); @@ -381,7 +383,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetHubRequest() ); @@ -428,7 +430,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetHubRequest() ); @@ -456,7 +458,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetHubRequest() ); @@ -477,7 +479,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetSpokeRequest() ); @@ -508,7 +510,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetSpokeRequest() ); @@ -555,7 +557,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetSpokeRequest() ); @@ -583,7 +585,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetSpokeRequest() ); @@ -604,7 +606,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteTableRequest() ); @@ -635,7 +637,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteTableRequest() ); @@ -682,7 +684,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteTableRequest() ); @@ -713,7 +715,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteTableRequest() ); @@ -734,7 +736,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteRequest() ); @@ -765,7 +767,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteRequest() ); @@ -812,7 +814,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteRequest() ); @@ -840,7 +842,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetRouteRequest() ); @@ -861,7 +863,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetGroupRequest() ); @@ -892,7 +894,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetGroupRequest() ); @@ -939,7 +941,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetGroupRequest() ); @@ -967,7 +969,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetGroupRequest() ); @@ -988,7 +990,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateHubRequest() ); @@ -1020,7 +1022,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateHubRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateHubRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateHubRequest() ); @@ -1138,7 +1140,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1160,7 +1162,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1178,7 +1180,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateHubRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateHubRequest() ); @@ -1266,7 +1268,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateHubRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateHubRequest() ); @@ -1332,7 +1334,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1354,7 +1356,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1372,7 +1374,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteHubRequest() ); @@ -1404,7 +1406,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteHubRequest() ); @@ -1458,7 +1460,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteHubRequest() ); @@ -1489,7 +1491,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteHubRequest() ); @@ -1522,7 +1524,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1544,7 +1546,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1562,7 +1564,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateSpokeRequest() ); @@ -1594,7 +1596,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateSpokeRequest() ); @@ -1648,7 +1650,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateSpokeRequest() ); @@ -1679,7 +1681,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreateSpokeRequest() ); @@ -1712,7 +1714,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1734,7 +1736,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1752,7 +1754,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateSpokeRequest() ); @@ -1785,7 +1787,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateSpokeRequest() ); @@ -1840,7 +1842,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateSpokeRequest() ); @@ -1872,7 +1874,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateSpokeRequest() ); @@ -1906,7 +1908,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1928,7 +1930,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1946,7 +1948,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest() ); @@ -1979,7 +1981,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest() ); @@ -2033,7 +2035,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest() ); @@ -2064,7 +2066,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest() ); @@ -2097,7 +2099,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2119,7 +2121,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2140,7 +2142,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest() ); @@ -2173,7 +2175,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest() ); @@ -2227,7 +2229,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest() ); @@ -2258,7 +2260,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest() ); @@ -2291,7 +2293,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2313,7 +2315,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2334,7 +2336,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteSpokeRequest() ); @@ -2366,7 +2368,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteSpokeRequest() ); @@ -2420,7 +2422,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteSpokeRequest() ); @@ -2451,7 +2453,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeleteSpokeRequest() ); @@ -2484,7 +2486,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2506,7 +2508,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2524,7 +2526,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateGroupRequest() ); @@ -2557,7 +2559,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateGroupRequest() ); @@ -2612,7 +2614,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateGroupRequest() ); @@ -2644,7 +2646,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.UpdateGroupRequest() ); @@ -2678,7 +2680,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2700,7 +2702,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2718,7 +2720,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubsRequest() ); @@ -2757,7 +2759,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubsRequest() ); @@ -2812,7 +2814,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubsRequest() ); @@ -2840,7 +2842,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubsRequest() ); @@ -2900,7 +2902,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubsRequest() ); @@ -2951,7 +2953,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubsRequest() ); @@ -2999,7 +3001,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubsRequest() ); @@ -3042,7 +3044,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubSpokesRequest() ); @@ -3081,7 +3083,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubSpokesRequest() ); @@ -3136,7 +3138,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubSpokesRequest() ); @@ -3167,7 +3169,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubSpokesRequest() ); @@ -3228,7 +3230,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubSpokesRequest() ); @@ -3278,7 +3280,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubSpokesRequest() ); @@ -3327,7 +3329,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListHubSpokesRequest() ); @@ -3370,7 +3372,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.QueryHubStatusRequest() ); @@ -3409,7 +3411,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.QueryHubStatusRequest() ); @@ -3466,7 +3468,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.QueryHubStatusRequest() ); @@ -3497,7 +3499,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.QueryHubStatusRequest() ); @@ -3560,7 +3562,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.QueryHubStatusRequest() ); @@ -3612,7 +3614,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.QueryHubStatusRequest() ); @@ -3662,7 +3664,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.QueryHubStatusRequest() ); @@ -3705,7 +3707,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListSpokesRequest() ); @@ -3744,7 +3746,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListSpokesRequest() ); @@ -3799,7 +3801,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListSpokesRequest() ); @@ -3830,7 +3832,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListSpokesRequest() ); @@ -3891,7 +3893,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListSpokesRequest() ); @@ -3943,7 +3945,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListSpokesRequest() ); @@ -3992,7 +3994,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListSpokesRequest() ); @@ -4037,7 +4039,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRoutesRequest() ); @@ -4076,7 +4078,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRoutesRequest() ); @@ -4131,7 +4133,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRoutesRequest() ); @@ -4162,7 +4164,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRoutesRequest() ); @@ -4223,7 +4225,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRoutesRequest() ); @@ -4275,7 +4277,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRoutesRequest() ); @@ -4324,7 +4326,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRoutesRequest() ); @@ -4369,7 +4371,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRouteTablesRequest() ); @@ -4408,7 +4410,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRouteTablesRequest() ); @@ -4465,7 +4467,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRouteTablesRequest() ); @@ -4496,7 +4498,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRouteTablesRequest() ); @@ -4557,7 +4559,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRouteTablesRequest() ); @@ -4607,7 +4609,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRouteTablesRequest() ); @@ -4657,7 +4659,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListRouteTablesRequest() ); @@ -4700,7 +4702,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListGroupsRequest() ); @@ -4739,7 +4741,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListGroupsRequest() ); @@ -4794,7 +4796,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListGroupsRequest() ); @@ -4825,7 +4827,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListGroupsRequest() ); @@ -4886,7 +4888,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListGroupsRequest() ); @@ -4938,7 +4940,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListGroupsRequest() ); @@ -4987,7 +4989,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListGroupsRequest() ); @@ -5031,7 +5033,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5061,7 +5063,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5105,7 +5107,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5137,7 +5139,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5167,7 +5169,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5211,7 +5213,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5243,7 +5245,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5276,7 +5278,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5320,7 +5322,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5355,7 +5357,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5385,7 +5387,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5429,7 +5431,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5464,7 +5466,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5512,7 +5514,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5553,7 +5555,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5632,7 +5634,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5712,7 +5714,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5808,8 +5810,7 @@ describe('v1.HubServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5828,7 +5829,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5837,8 +5838,7 @@ describe('v1.HubServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5854,7 +5854,7 @@ describe('v1.HubServiceClient', () => { }); describe('Path templates', () => { - describe('group', () => { + describe('group', async () => { const fakePath = '/rendered/path/group'; const expectedParameters = { project: 'projectValue', @@ -5865,7 +5865,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5918,7 +5918,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('hub', () => { + describe('hub', async () => { const fakePath = '/rendered/path/hub'; const expectedParameters = { project: 'projectValue', @@ -5928,7 +5928,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hubPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5967,7 +5967,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('hubRoute', () => { + describe('hubRoute', async () => { const fakePath = '/rendered/path/hubRoute'; const expectedParameters = { project: 'projectValue', @@ -5979,7 +5979,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hubRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6043,7 +6043,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -6054,7 +6054,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6107,7 +6107,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('interconnectAttachment', () => { + describe('interconnectAttachment', async () => { const fakePath = '/rendered/path/interconnectAttachment'; const expectedParameters = { project: 'projectValue', @@ -6118,7 +6118,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.interconnectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6186,7 +6186,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -6196,7 +6196,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6235,7 +6235,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -6245,7 +6245,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6284,7 +6284,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('policyBasedRoute', () => { + describe('policyBasedRoute', async () => { const fakePath = '/rendered/path/policyBasedRoute'; const expectedParameters = { project: 'projectValue', @@ -6294,7 +6294,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.policyBasedRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6340,7 +6340,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('routeTable', () => { + describe('routeTable', async () => { const fakePath = '/rendered/path/routeTable'; const expectedParameters = { project: 'projectValue', @@ -6351,7 +6351,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.routeTablePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6404,7 +6404,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('spoke', () => { + describe('spoke', async () => { const fakePath = '/rendered/path/spoke'; const expectedParameters = { project: 'projectValue', @@ -6415,7 +6415,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spokePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6468,7 +6468,7 @@ describe('v1.HubServiceClient', () => { }); }); - describe('vpnTunnel', () => { + describe('vpnTunnel', async () => { const fakePath = '/rendered/path/vpnTunnel'; const expectedParameters = { project: 'projectValue', @@ -6479,7 +6479,7 @@ describe('v1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vpnTunnelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1alpha1.ts b/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1alpha1.ts index d192c8b5599..2676fd5cb2c 100644 --- a/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1alpha1.ts +++ b/packages/google-cloud-networkconnectivity/test/gapic_hub_service_v1alpha1.ts @@ -287,7 +287,9 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.hubServiceStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetHubRequest() ); @@ -377,7 +379,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetHubRequest() ); @@ -424,7 +426,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetHubRequest() ); @@ -452,7 +454,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetHubRequest() ); @@ -473,7 +475,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetSpokeRequest() ); @@ -504,7 +506,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetSpokeRequest() ); @@ -551,7 +553,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetSpokeRequest() ); @@ -579,7 +581,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.GetSpokeRequest() ); @@ -600,7 +602,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateHubRequest() ); @@ -632,7 +634,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateHubRequest() ); @@ -686,7 +688,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateHubRequest() ); @@ -717,7 +719,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateHubRequest() ); @@ -750,7 +752,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -772,7 +774,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -790,7 +792,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateHubRequest() ); @@ -823,7 +825,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateHubRequest() ); @@ -878,7 +880,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateHubRequest() ); @@ -910,7 +912,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateHubRequest() ); @@ -944,7 +946,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -966,7 +968,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -984,7 +986,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteHubRequest() ); @@ -1016,7 +1018,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteHubRequest() ); @@ -1070,7 +1072,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteHubRequest() ); @@ -1101,7 +1103,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteHubRequest() ); @@ -1134,7 +1136,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1156,7 +1158,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1174,7 +1176,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateSpokeRequest() ); @@ -1206,7 +1208,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateSpokeRequest() ); @@ -1260,7 +1262,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateSpokeRequest() ); @@ -1291,7 +1293,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.CreateSpokeRequest() ); @@ -1324,7 +1326,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1346,7 +1348,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1364,7 +1366,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateSpokeRequest() ); @@ -1397,7 +1399,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateSpokeRequest() ); @@ -1452,7 +1454,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateSpokeRequest() ); @@ -1484,7 +1486,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.UpdateSpokeRequest() ); @@ -1518,7 +1520,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1540,7 +1542,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1558,7 +1560,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteSpokeRequest() ); @@ -1590,7 +1592,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteSpokeRequest() ); @@ -1644,7 +1646,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteSpokeRequest() ); @@ -1675,7 +1677,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.DeleteSpokeRequest() ); @@ -1708,7 +1710,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1730,7 +1732,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1748,7 +1750,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest() ); @@ -1787,7 +1789,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest() ); @@ -1844,7 +1846,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest() ); @@ -1872,7 +1874,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest() ); @@ -1933,7 +1935,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest() ); @@ -1985,7 +1987,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest() ); @@ -2034,7 +2036,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest() ); @@ -2078,7 +2080,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest() ); @@ -2117,7 +2119,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest() ); @@ -2174,7 +2176,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest() ); @@ -2205,7 +2207,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest() ); @@ -2268,7 +2270,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest() ); @@ -2322,7 +2324,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest() ); @@ -2372,7 +2374,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest() ); @@ -2412,7 +2414,7 @@ describe('v1alpha1.HubServiceClient', () => { }); describe('Path templates', () => { - describe('hub', () => { + describe('hub', async () => { const fakePath = '/rendered/path/hub'; const expectedParameters = { project: 'projectValue', @@ -2422,7 +2424,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hubPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2461,7 +2463,7 @@ describe('v1alpha1.HubServiceClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2472,7 +2474,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2525,7 +2527,7 @@ describe('v1alpha1.HubServiceClient', () => { }); }); - describe('interconnectAttachment', () => { + describe('interconnectAttachment', async () => { const fakePath = '/rendered/path/interconnectAttachment'; const expectedParameters = { project: 'projectValue', @@ -2536,7 +2538,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.interconnectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2604,7 +2606,7 @@ describe('v1alpha1.HubServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2614,7 +2616,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2653,7 +2655,7 @@ describe('v1alpha1.HubServiceClient', () => { }); }); - describe('spoke', () => { + describe('spoke', async () => { const fakePath = '/rendered/path/spoke'; const expectedParameters = { project: 'projectValue', @@ -2664,7 +2666,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spokePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2717,7 +2719,7 @@ describe('v1alpha1.HubServiceClient', () => { }); }); - describe('vpnTunnel', () => { + describe('vpnTunnel', async () => { const fakePath = '/rendered/path/vpnTunnel'; const expectedParameters = { project: 'projectValue', @@ -2728,7 +2730,7 @@ describe('v1alpha1.HubServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vpnTunnelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkconnectivity/test/gapic_policy_based_routing_service_v1.ts b/packages/google-cloud-networkconnectivity/test/gapic_policy_based_routing_service_v1.ts index 1ac0d042875..051932f0f98 100644 --- a/packages/google-cloud-networkconnectivity/test/gapic_policy_based_routing_service_v1.ts +++ b/packages/google-cloud-networkconnectivity/test/gapic_policy_based_routing_service_v1.ts @@ -306,7 +306,9 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyBasedRoutingServiceStub); client.close().then(() => { done(); @@ -369,7 +371,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest() ); @@ -402,7 +404,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest() ); @@ -450,7 +452,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest() ); @@ -482,7 +484,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest() ); @@ -504,7 +506,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest() ); @@ -538,7 +540,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest() ); @@ -593,7 +595,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest() ); @@ -628,7 +630,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest() ); @@ -662,7 +664,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -685,7 +687,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -707,7 +709,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest() ); @@ -741,7 +743,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest() ); @@ -796,7 +798,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest() ); @@ -831,7 +833,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest() ); @@ -865,7 +867,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -888,7 +890,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -910,7 +912,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest() ); @@ -951,7 +953,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest() ); @@ -1044,7 +1046,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest() ); @@ -1173,7 +1175,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest() ); @@ -1228,7 +1230,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1351,7 +1353,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1415,7 +1417,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1493,7 +1495,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1527,7 +1529,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1572,7 +1574,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1608,7 +1610,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1639,7 +1641,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1720,7 +1722,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1769,7 +1771,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1811,7 +1813,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1893,7 +1895,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1976,7 +1978,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2075,8 +2077,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2096,7 +2097,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2105,8 +2106,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2122,7 +2122,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); describe('Path templates', () => { - describe('group', () => { + describe('group', async () => { const fakePath = '/rendered/path/group'; const expectedParameters = { project: 'projectValue', @@ -2134,7 +2134,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2187,7 +2187,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); }); - describe('hub', () => { + describe('hub', async () => { const fakePath = '/rendered/path/hub'; const expectedParameters = { project: 'projectValue', @@ -2198,7 +2198,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hubPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2237,7 +2237,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); }); - describe('hubRoute', () => { + describe('hubRoute', async () => { const fakePath = '/rendered/path/hubRoute'; const expectedParameters = { project: 'projectValue', @@ -2250,7 +2250,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hubRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2314,7 +2314,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2325,7 +2325,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2364,7 +2364,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -2375,7 +2375,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2414,7 +2414,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); }); - describe('policyBasedRoute', () => { + describe('policyBasedRoute', async () => { const fakePath = '/rendered/path/policyBasedRoute'; const expectedParameters = { project: 'projectValue', @@ -2425,7 +2425,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.policyBasedRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2471,7 +2471,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); }); - describe('routeTable', () => { + describe('routeTable', async () => { const fakePath = '/rendered/path/routeTable'; const expectedParameters = { project: 'projectValue', @@ -2483,7 +2483,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.routeTablePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2536,7 +2536,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { }); }); - describe('spoke', () => { + describe('spoke', async () => { const fakePath = '/rendered/path/spoke'; const expectedParameters = { project: 'projectValue', @@ -2548,7 +2548,7 @@ describe('v1.PolicyBasedRoutingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.spokePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkmanagement/package.json b/packages/google-cloud-networkmanagement/package.json index 704836f019f..b7d3d1b85a6 100644 --- a/packages/google-cloud-networkmanagement/package.json +++ b/packages/google-cloud-networkmanagement/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json index ad097fffbc3..290e64a0d4a 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "3.11.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json index dc0800e1fea..dc8bea74d87 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "3.11.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json index 259287f5329..2cd3b6e786a 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "3.11.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json index 9fae89900e4..b123048fc44 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "3.11.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/src/v1/reachability_service_client.ts b/packages/google-cloud-networkmanagement/src/v1/reachability_service_client.ts index 610d54beb01..3cff686811a 100644 --- a/packages/google-cloud-networkmanagement/src/v1/reachability_service_client.ts +++ b/packages/google-cloud-networkmanagement/src/v1/reachability_service_client.ts @@ -631,7 +631,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectivityTest request %j', request); const wrappedCallback: | Callback< @@ -787,7 +789,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -970,7 +974,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ 'resource.name': request.resource!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1149,7 +1155,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1317,7 +1325,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1501,7 +1511,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, @@ -1588,7 +1600,9 @@ export class ReachabilityServiceClient { }); const defaultCallSettings = this._defaults['listConnectivityTests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectivityTests stream %j', request); return this.descriptors.page.listConnectivityTests.createStream( this.innerApiCalls.listConnectivityTests as GaxCall, @@ -1657,7 +1671,9 @@ export class ReachabilityServiceClient { }); const defaultCallSettings = this._defaults['listConnectivityTests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectivityTests iterate %j', request); return this.descriptors.page.listConnectivityTests.asyncIterate( this.innerApiCalls['listConnectivityTests'] as GaxCall, @@ -1975,7 +1991,7 @@ export class ReachabilityServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkmanagement/src/v1/vpc_flow_logs_service_client.ts b/packages/google-cloud-networkmanagement/src/v1/vpc_flow_logs_service_client.ts index a8e6118cd1b..5fba72af0a6 100644 --- a/packages/google-cloud-networkmanagement/src/v1/vpc_flow_logs_service_client.ts +++ b/packages/google-cloud-networkmanagement/src/v1/vpc_flow_logs_service_client.ts @@ -615,7 +615,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVpcFlowLogsConfig request %j', request); const wrappedCallback: | Callback< @@ -766,7 +768,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -950,7 +954,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ 'vpc_flow_logs_config.name': request.vpcFlowLogsConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1118,7 +1124,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1288,7 +1296,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkmanagement.v1.IListVpcFlowLogsConfigsRequest, @@ -1361,7 +1371,9 @@ export class VpcFlowLogsServiceClient { }); const defaultCallSettings = this._defaults['listVpcFlowLogsConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVpcFlowLogsConfigs stream %j', request); return this.descriptors.page.listVpcFlowLogsConfigs.createStream( this.innerApiCalls.listVpcFlowLogsConfigs as GaxCall, @@ -1416,7 +1428,9 @@ export class VpcFlowLogsServiceClient { }); const defaultCallSettings = this._defaults['listVpcFlowLogsConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVpcFlowLogsConfigs iterate %j', request); return this.descriptors.page.listVpcFlowLogsConfigs.asyncIterate( this.innerApiCalls['listVpcFlowLogsConfigs'] as GaxCall, @@ -1734,7 +1748,7 @@ export class VpcFlowLogsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkmanagement/src/v1beta1/reachability_service_client.ts b/packages/google-cloud-networkmanagement/src/v1beta1/reachability_service_client.ts index 94ec7015261..52b79fbce39 100644 --- a/packages/google-cloud-networkmanagement/src/v1beta1/reachability_service_client.ts +++ b/packages/google-cloud-networkmanagement/src/v1beta1/reachability_service_client.ts @@ -631,7 +631,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectivityTest request %j', request); const wrappedCallback: | Callback< @@ -787,7 +789,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -970,7 +974,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ 'resource.name': request.resource!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1149,7 +1155,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1317,7 +1325,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1501,7 +1511,9 @@ export class ReachabilityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, @@ -1588,7 +1600,9 @@ export class ReachabilityServiceClient { }); const defaultCallSettings = this._defaults['listConnectivityTests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectivityTests stream %j', request); return this.descriptors.page.listConnectivityTests.createStream( this.innerApiCalls.listConnectivityTests as GaxCall, @@ -1657,7 +1671,9 @@ export class ReachabilityServiceClient { }); const defaultCallSettings = this._defaults['listConnectivityTests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectivityTests iterate %j', request); return this.descriptors.page.listConnectivityTests.asyncIterate( this.innerApiCalls['listConnectivityTests'] as GaxCall, @@ -1975,7 +1991,7 @@ export class ReachabilityServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkmanagement/src/v1beta1/vpc_flow_logs_service_client.ts b/packages/google-cloud-networkmanagement/src/v1beta1/vpc_flow_logs_service_client.ts index 169399861da..d11a5381544 100644 --- a/packages/google-cloud-networkmanagement/src/v1beta1/vpc_flow_logs_service_client.ts +++ b/packages/google-cloud-networkmanagement/src/v1beta1/vpc_flow_logs_service_client.ts @@ -615,7 +615,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVpcFlowLogsConfig request %j', request); const wrappedCallback: | Callback< @@ -765,7 +767,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -947,7 +951,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ 'vpc_flow_logs_config.name': request.vpcFlowLogsConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1115,7 +1121,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1285,7 +1293,9 @@ export class VpcFlowLogsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, @@ -1358,7 +1368,9 @@ export class VpcFlowLogsServiceClient { }); const defaultCallSettings = this._defaults['listVpcFlowLogsConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVpcFlowLogsConfigs stream %j', request); return this.descriptors.page.listVpcFlowLogsConfigs.createStream( this.innerApiCalls.listVpcFlowLogsConfigs as GaxCall, @@ -1413,7 +1425,9 @@ export class VpcFlowLogsServiceClient { }); const defaultCallSettings = this._defaults['listVpcFlowLogsConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVpcFlowLogsConfigs iterate %j', request); return this.descriptors.page.listVpcFlowLogsConfigs.asyncIterate( this.innerApiCalls['listVpcFlowLogsConfigs'] as GaxCall, @@ -1731,7 +1745,7 @@ export class VpcFlowLogsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1.ts b/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1.ts index 848ab8d9a30..b3a37843d5c 100644 --- a/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1.ts +++ b/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1.ts @@ -304,7 +304,9 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.reachabilityServiceStub); client.close().then(() => { done(); @@ -371,7 +373,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() ); @@ -405,7 +407,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() ); @@ -454,7 +456,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() ); @@ -487,7 +489,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() ); @@ -510,7 +512,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() ); @@ -545,7 +547,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() ); @@ -601,7 +603,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() ); @@ -637,7 +639,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() ); @@ -672,7 +674,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -696,7 +698,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -719,7 +721,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() ); @@ -755,7 +757,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() ); @@ -812,7 +814,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() ); @@ -849,7 +851,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() ); @@ -885,7 +887,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -909,7 +911,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -932,7 +934,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() ); @@ -967,7 +969,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() ); @@ -1059,7 +1061,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() ); @@ -1094,7 +1096,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1118,7 +1120,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1141,7 +1143,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() ); @@ -1176,7 +1178,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() ); @@ -1268,7 +1270,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() ); @@ -1303,7 +1305,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1327,7 +1329,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1350,7 +1352,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() ); @@ -1392,7 +1394,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() ); @@ -1451,7 +1453,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() ); @@ -1558,7 +1560,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() ); @@ -1618,7 +1620,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() ); @@ -1674,7 +1676,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() ); @@ -1722,7 +1724,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1754,7 +1756,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1800,7 +1802,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1834,7 +1836,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1866,7 +1868,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1912,7 +1914,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1946,7 +1948,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1981,7 +1983,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2027,7 +2029,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2064,7 +2066,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2096,7 +2098,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2142,7 +2144,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2179,7 +2181,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2229,7 +2231,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2272,7 +2274,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2357,7 +2359,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2443,7 +2445,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2545,8 +2547,7 @@ describe('v1.ReachabilityServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2567,7 +2568,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2576,8 +2577,7 @@ describe('v1.ReachabilityServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2593,7 +2593,7 @@ describe('v1.ReachabilityServiceClient', () => { }); describe('Path templates', () => { - describe('connectivityTest', () => { + describe('connectivityTest', async () => { const fakePath = '/rendered/path/connectivityTest'; const expectedParameters = { project: 'projectValue', @@ -2605,7 +2605,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.connectivityTestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2647,7 +2647,7 @@ describe('v1.ReachabilityServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2658,7 +2658,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2687,7 +2687,7 @@ describe('v1.ReachabilityServiceClient', () => { }); }); - describe('vpcFlowLogsConfig', () => { + describe('vpcFlowLogsConfig', async () => { const fakePath = '/rendered/path/vpcFlowLogsConfig'; const expectedParameters = { project: 'projectValue', @@ -2700,7 +2700,7 @@ describe('v1.ReachabilityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1beta1.ts b/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1beta1.ts index a6422336fb6..e42478bd675 100644 --- a/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1beta1.ts +++ b/packages/google-cloud-networkmanagement/test/gapic_reachability_service_v1beta1.ts @@ -306,7 +306,9 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.reachabilityServiceStub); client.close().then(() => { done(); @@ -369,7 +371,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() ); @@ -402,7 +404,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() ); @@ -450,7 +452,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() ); @@ -482,7 +484,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() ); @@ -504,7 +506,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() ); @@ -538,7 +540,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() ); @@ -593,7 +595,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() ); @@ -628,7 +630,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() ); @@ -662,7 +664,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -685,7 +687,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -707,7 +709,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() ); @@ -742,7 +744,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() ); @@ -798,7 +800,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() ); @@ -834,7 +836,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() ); @@ -869,7 +871,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -892,7 +894,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -914,7 +916,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() ); @@ -948,7 +950,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() ); @@ -1003,7 +1005,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() ); @@ -1038,7 +1040,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() ); @@ -1072,7 +1074,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1095,7 +1097,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1117,7 +1119,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() ); @@ -1151,7 +1153,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() ); @@ -1206,7 +1208,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() ); @@ -1241,7 +1243,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() ); @@ -1275,7 +1277,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1298,7 +1300,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1320,7 +1322,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() ); @@ -1361,7 +1363,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() ); @@ -1419,7 +1421,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() ); @@ -1454,7 +1456,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() ); @@ -1524,7 +1526,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() ); @@ -1583,7 +1585,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() ); @@ -1638,7 +1640,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() ); @@ -1685,7 +1687,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1716,7 +1718,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1761,7 +1763,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1794,7 +1796,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1825,7 +1827,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1870,7 +1872,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1903,7 +1905,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1937,7 +1939,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1982,7 +1984,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2018,7 +2020,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2049,7 +2051,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2094,7 +2096,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2130,7 +2132,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2179,7 +2181,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2221,7 +2223,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2303,7 +2305,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2386,7 +2388,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2485,8 +2487,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2506,7 +2507,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2515,8 +2516,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2532,7 +2532,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { }); describe('Path templates', () => { - describe('connectivityTest', () => { + describe('connectivityTest', async () => { const fakePath = '/rendered/path/connectivityTest'; const expectedParameters = { project: 'projectValue', @@ -2543,7 +2543,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectivityTestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2585,7 +2585,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2595,7 +2595,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2624,7 +2624,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { }); }); - describe('vpcFlowLogsConfig', () => { + describe('vpcFlowLogsConfig', async () => { const fakePath = '/rendered/path/vpcFlowLogsConfig'; const expectedParameters = { project: 'projectValue', @@ -2636,7 +2636,7 @@ describe('v1beta1.ReachabilityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1.ts b/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1.ts index 9ae55da3f51..29b434cbee2 100644 --- a/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1.ts +++ b/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1.ts @@ -295,7 +295,9 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.vpcFlowLogsServiceStub); client.close().then(() => { done(); @@ -354,7 +356,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest() ); @@ -386,7 +388,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest() ); @@ -433,7 +435,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest() ); @@ -464,7 +466,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest() ); @@ -485,7 +487,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest() ); @@ -518,7 +520,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest() ); @@ -572,7 +574,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest() ); @@ -606,7 +608,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest() ); @@ -639,7 +641,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -662,7 +664,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -683,7 +685,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest() ); @@ -717,7 +719,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest() ); @@ -772,7 +774,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest() ); @@ -807,7 +809,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest() ); @@ -841,7 +843,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -864,7 +866,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -885,7 +887,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest() ); @@ -918,7 +920,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest() ); @@ -972,7 +974,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest() ); @@ -1006,7 +1008,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1062,7 +1064,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1083,7 +1085,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest() ); @@ -1180,7 +1182,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest() ); @@ -1214,7 +1216,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest() ); @@ -1283,7 +1285,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest() ); @@ -1341,7 +1343,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest() ); @@ -1395,7 +1397,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest() ); @@ -1441,7 +1443,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1471,7 +1473,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1515,7 +1517,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1547,7 +1549,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1577,7 +1579,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1621,7 +1623,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1653,7 +1655,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1686,7 +1688,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1730,7 +1732,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1765,7 +1767,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1795,7 +1797,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1839,7 +1841,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1874,7 +1876,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1922,7 +1924,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1963,7 +1965,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2042,7 +2044,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2122,7 +2124,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2218,8 +2220,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2238,7 +2239,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2247,8 +2248,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2264,7 +2264,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { }); describe('Path templates', () => { - describe('connectivityTest', () => { + describe('connectivityTest', async () => { const fakePath = '/rendered/path/connectivityTest'; const expectedParameters = { project: 'projectValue', @@ -2274,7 +2274,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectivityTestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2316,7 +2316,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2326,7 +2326,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2365,7 +2365,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2374,7 +2374,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2403,7 +2403,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { }); }); - describe('vpcFlowLogsConfig', () => { + describe('vpcFlowLogsConfig', async () => { const fakePath = '/rendered/path/vpcFlowLogsConfig'; const expectedParameters = { project: 'projectValue', @@ -2414,7 +2414,7 @@ describe('v1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1beta1.ts b/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1beta1.ts index ecf3540ad34..e4423b321ea 100644 --- a/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1beta1.ts +++ b/packages/google-cloud-networkmanagement/test/gapic_vpc_flow_logs_service_v1beta1.ts @@ -304,7 +304,9 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.vpcFlowLogsServiceStub); client.close().then(() => { done(); @@ -367,7 +369,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() ); @@ -400,7 +402,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() ); @@ -448,7 +450,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() ); @@ -480,7 +482,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() ); @@ -502,7 +504,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() ); @@ -536,7 +538,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() ); @@ -591,7 +593,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() ); @@ -626,7 +628,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() ); @@ -660,7 +662,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -684,7 +686,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -706,7 +708,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() ); @@ -741,7 +743,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() ); @@ -797,7 +799,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() ); @@ -833,7 +835,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() ); @@ -868,7 +870,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -892,7 +894,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -914,7 +916,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() ); @@ -948,7 +950,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() ); @@ -1003,7 +1005,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() ); @@ -1038,7 +1040,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() ); @@ -1072,7 +1074,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1096,7 +1098,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1118,7 +1120,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() ); @@ -1159,7 +1161,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() ); @@ -1217,7 +1219,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() ); @@ -1252,7 +1254,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() ); @@ -1322,7 +1324,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() ); @@ -1381,7 +1383,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() ); @@ -1436,7 +1438,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() ); @@ -1483,7 +1485,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1514,7 +1516,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1559,7 +1561,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1592,7 +1594,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1623,7 +1625,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1668,7 +1670,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1701,7 +1703,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1735,7 +1737,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1780,7 +1782,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1816,7 +1818,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1847,7 +1849,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1892,7 +1894,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1928,7 +1930,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1977,7 +1979,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2019,7 +2021,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2101,7 +2103,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2184,7 +2186,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2283,8 +2285,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2304,7 +2305,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2313,8 +2314,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2330,7 +2330,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { }); describe('Path templates', () => { - describe('connectivityTest', () => { + describe('connectivityTest', async () => { const fakePath = '/rendered/path/connectivityTest'; const expectedParameters = { project: 'projectValue', @@ -2341,7 +2341,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectivityTestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2383,7 +2383,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2394,7 +2394,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2433,7 +2433,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2443,7 +2443,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2472,7 +2472,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { }); }); - describe('vpcFlowLogsConfig', () => { + describe('vpcFlowLogsConfig', async () => { const fakePath = '/rendered/path/vpcFlowLogsConfig'; const expectedParameters = { project: 'projectValue', @@ -2484,7 +2484,7 @@ describe('v1beta1.VpcFlowLogsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networksecurity/package.json b/packages/google-cloud-networksecurity/package.json index 6a6947e341c..989f574a8ac 100644 --- a/packages/google-cloud-networksecurity/package.json +++ b/packages/google-cloud-networksecurity/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json index 65a55bbe0a7..9bb3950413c 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json index 65a55bbe0a7..9bb3950413c 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json index 791404c2d47..402d2410d45 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json index 791404c2d47..402d2410d45 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "2.3.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/src/v1/network_security_client.ts b/packages/google-cloud-networksecurity/src/v1/network_security_client.ts index 5769ea55d8c..994de7eb328 100644 --- a/packages/google-cloud-networksecurity/src/v1/network_security_client.ts +++ b/packages/google-cloud-networksecurity/src/v1/network_security_client.ts @@ -737,7 +737,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAuthorizationPolicy request %j', request); const wrappedCallback: | Callback< @@ -863,7 +865,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServerTlsPolicy request %j', request); const wrappedCallback: | Callback< @@ -989,7 +993,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getClientTlsPolicy request %j', request); const wrappedCallback: | Callback< @@ -1129,7 +1135,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1302,7 +1310,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ 'authorization_policy.name': request.authorizationPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1470,7 +1480,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1644,7 +1656,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1818,7 +1832,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ 'server_tls_policy.name': request.serverTlsPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1986,7 +2002,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2160,7 +2178,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2334,7 +2354,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ 'client_tls_policy.name': request.clientTlsPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2502,7 +2524,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2669,7 +2693,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networksecurity.v1.IListAuthorizationPoliciesRequest, @@ -2739,7 +2765,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listAuthorizationPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizationPolicies stream %j', request); return this.descriptors.page.listAuthorizationPolicies.createStream( this.innerApiCalls.listAuthorizationPolicies as GaxCall, @@ -2791,7 +2819,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listAuthorizationPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizationPolicies iterate %j', request); return this.descriptors.page.listAuthorizationPolicies.asyncIterate( this.innerApiCalls['listAuthorizationPolicies'] as GaxCall, @@ -2897,7 +2927,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networksecurity.v1.IListServerTlsPoliciesRequest, @@ -2966,7 +2998,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listServerTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServerTlsPolicies stream %j', request); return this.descriptors.page.listServerTlsPolicies.createStream( this.innerApiCalls.listServerTlsPolicies as GaxCall, @@ -3017,7 +3051,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listServerTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServerTlsPolicies iterate %j', request); return this.descriptors.page.listServerTlsPolicies.asyncIterate( this.innerApiCalls['listServerTlsPolicies'] as GaxCall, @@ -3123,7 +3159,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networksecurity.v1.IListClientTlsPoliciesRequest, @@ -3192,7 +3230,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listClientTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientTlsPolicies stream %j', request); return this.descriptors.page.listClientTlsPolicies.createStream( this.innerApiCalls.listClientTlsPolicies as GaxCall, @@ -3243,7 +3283,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listClientTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientTlsPolicies iterate %j', request); return this.descriptors.page.listClientTlsPolicies.asyncIterate( this.innerApiCalls['listClientTlsPolicies'] as GaxCall, @@ -3561,7 +3603,7 @@ export class NetworkSecurityClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networksecurity/src/v1beta1/network_security_client.ts b/packages/google-cloud-networksecurity/src/v1beta1/network_security_client.ts index 539acedae8a..7c2fa466edb 100644 --- a/packages/google-cloud-networksecurity/src/v1beta1/network_security_client.ts +++ b/packages/google-cloud-networksecurity/src/v1beta1/network_security_client.ts @@ -738,7 +738,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAuthorizationPolicy request %j', request); const wrappedCallback: | Callback< @@ -864,7 +866,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServerTlsPolicy request %j', request); const wrappedCallback: | Callback< @@ -990,7 +994,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getClientTlsPolicy request %j', request); const wrappedCallback: | Callback< @@ -1130,7 +1136,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1303,7 +1311,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ 'authorization_policy.name': request.authorizationPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1471,7 +1481,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1646,7 +1658,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1820,7 +1834,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ 'server_tls_policy.name': request.serverTlsPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1988,7 +2004,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2163,7 +2181,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2337,7 +2357,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ 'client_tls_policy.name': request.clientTlsPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2505,7 +2527,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2672,7 +2696,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest, @@ -2742,7 +2768,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listAuthorizationPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizationPolicies stream %j', request); return this.descriptors.page.listAuthorizationPolicies.createStream( this.innerApiCalls.listAuthorizationPolicies as GaxCall, @@ -2794,7 +2822,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listAuthorizationPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAuthorizationPolicies iterate %j', request); return this.descriptors.page.listAuthorizationPolicies.asyncIterate( this.innerApiCalls['listAuthorizationPolicies'] as GaxCall, @@ -2900,7 +2930,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest, @@ -2969,7 +3001,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listServerTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServerTlsPolicies stream %j', request); return this.descriptors.page.listServerTlsPolicies.createStream( this.innerApiCalls.listServerTlsPolicies as GaxCall, @@ -3020,7 +3054,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listServerTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServerTlsPolicies iterate %j', request); return this.descriptors.page.listServerTlsPolicies.asyncIterate( this.innerApiCalls['listServerTlsPolicies'] as GaxCall, @@ -3126,7 +3162,9 @@ export class NetworkSecurityClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest, @@ -3195,7 +3233,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listClientTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientTlsPolicies stream %j', request); return this.descriptors.page.listClientTlsPolicies.createStream( this.innerApiCalls.listClientTlsPolicies as GaxCall, @@ -3246,7 +3286,9 @@ export class NetworkSecurityClient { }); const defaultCallSettings = this._defaults['listClientTlsPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClientTlsPolicies iterate %j', request); return this.descriptors.page.listClientTlsPolicies.asyncIterate( this.innerApiCalls['listClientTlsPolicies'] as GaxCall, @@ -3564,7 +3606,7 @@ export class NetworkSecurityClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networksecurity/test/gapic_network_security_v1.ts b/packages/google-cloud-networksecurity/test/gapic_network_security_v1.ts index 5fdc3a78699..95d6556e054 100644 --- a/packages/google-cloud-networksecurity/test/gapic_network_security_v1.ts +++ b/packages/google-cloud-networksecurity/test/gapic_network_security_v1.ts @@ -293,7 +293,9 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkSecurityStub); client.close().then(() => { done(); @@ -352,7 +354,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest() ); @@ -384,7 +386,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest() ); @@ -431,7 +433,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest() ); @@ -465,7 +467,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest() ); @@ -489,7 +491,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest() ); @@ -521,7 +523,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest() ); @@ -568,7 +570,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest() ); @@ -599,7 +601,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest() ); @@ -620,7 +622,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest() ); @@ -652,7 +654,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest() ); @@ -699,7 +701,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest() ); @@ -730,7 +732,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest() ); @@ -751,7 +753,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest() ); @@ -784,7 +786,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest() ); @@ -838,7 +840,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest() ); @@ -872,7 +874,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest() ); @@ -905,7 +907,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -928,7 +930,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -949,7 +951,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest() ); @@ -983,7 +985,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest() ); @@ -1038,7 +1040,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest() ); @@ -1073,7 +1075,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest() ); @@ -1107,7 +1109,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1130,7 +1132,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1151,7 +1153,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest() ); @@ -1184,7 +1186,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest() ); @@ -1238,7 +1240,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest() ); @@ -1305,7 +1307,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1328,7 +1330,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1349,7 +1351,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest() ); @@ -1436,7 +1438,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest() ); @@ -1503,7 +1505,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1525,7 +1527,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1546,7 +1548,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest() ); @@ -1580,7 +1582,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest() ); @@ -1635,7 +1637,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest() ); @@ -1670,7 +1672,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest() ); @@ -1704,7 +1706,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1726,7 +1728,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1747,7 +1749,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest() ); @@ -1780,7 +1782,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest() ); @@ -1834,7 +1836,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest() ); @@ -1868,7 +1870,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest() ); @@ -1901,7 +1903,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1923,7 +1925,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1944,7 +1946,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest() ); @@ -1977,7 +1979,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest() ); @@ -2031,7 +2033,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest() ); @@ -2065,7 +2067,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest() ); @@ -2098,7 +2100,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2120,7 +2122,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2141,7 +2143,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest() ); @@ -2175,7 +2177,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest() ); @@ -2230,7 +2232,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest() ); @@ -2265,7 +2267,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest() ); @@ -2299,7 +2301,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2321,7 +2323,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2342,7 +2344,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest() ); @@ -2375,7 +2377,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest() ); @@ -2429,7 +2431,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest() ); @@ -2463,7 +2465,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest() ); @@ -2496,7 +2498,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2518,7 +2520,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2539,7 +2541,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest() ); @@ -2579,7 +2581,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest() ); @@ -2636,7 +2638,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest() ); @@ -2670,7 +2672,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest() ); @@ -2739,7 +2741,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest() ); @@ -2797,7 +2799,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest() ); @@ -2851,7 +2853,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest() ); @@ -2898,7 +2900,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest() ); @@ -2938,7 +2940,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest() ); @@ -2995,7 +2997,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest() ); @@ -3029,7 +3031,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest() ); @@ -3098,7 +3100,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest() ); @@ -3156,7 +3158,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest() ); @@ -3210,7 +3212,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest() ); @@ -3257,7 +3259,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest() ); @@ -3297,7 +3299,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest() ); @@ -3354,7 +3356,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest() ); @@ -3388,7 +3390,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest() ); @@ -3457,7 +3459,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest() ); @@ -3515,7 +3517,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest() ); @@ -3569,7 +3571,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest() ); @@ -3615,7 +3617,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3645,7 +3647,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3689,7 +3691,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3721,7 +3723,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3751,7 +3753,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3795,7 +3797,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3827,7 +3829,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3860,7 +3862,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3904,7 +3906,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3939,7 +3941,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3969,7 +3971,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4013,7 +4015,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4048,7 +4050,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4096,7 +4098,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4137,7 +4139,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4216,7 +4218,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4296,7 +4298,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4392,8 +4394,7 @@ describe('v1.NetworkSecurityClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4412,7 +4413,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4421,8 +4422,7 @@ describe('v1.NetworkSecurityClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4438,7 +4438,7 @@ describe('v1.NetworkSecurityClient', () => { }); describe('Path templates', () => { - describe('authorizationPolicy', () => { + describe('authorizationPolicy', async () => { const fakePath = '/rendered/path/authorizationPolicy'; const expectedParameters = { project: 'projectValue', @@ -4449,7 +4449,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.authorizationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4516,7 +4516,7 @@ describe('v1.NetworkSecurityClient', () => { }); }); - describe('clientTlsPolicy', () => { + describe('clientTlsPolicy', async () => { const fakePath = '/rendered/path/clientTlsPolicy'; const expectedParameters = { project: 'projectValue', @@ -4527,7 +4527,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clientTlsPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4581,7 +4581,7 @@ describe('v1.NetworkSecurityClient', () => { }); }); - describe('serverTlsPolicy', () => { + describe('serverTlsPolicy', async () => { const fakePath = '/rendered/path/serverTlsPolicy'; const expectedParameters = { project: 'projectValue', @@ -4592,7 +4592,7 @@ describe('v1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serverTlsPolicyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networksecurity/test/gapic_network_security_v1beta1.ts b/packages/google-cloud-networksecurity/test/gapic_network_security_v1beta1.ts index 35497525a24..128370b26a4 100644 --- a/packages/google-cloud-networksecurity/test/gapic_network_security_v1beta1.ts +++ b/packages/google-cloud-networksecurity/test/gapic_network_security_v1beta1.ts @@ -295,7 +295,9 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkSecurityStub); client.close().then(() => { done(); @@ -354,7 +356,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest() ); @@ -386,7 +388,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest() ); @@ -433,7 +435,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest() ); @@ -467,7 +469,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest() ); @@ -491,7 +493,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest() ); @@ -523,7 +525,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest() ); @@ -570,7 +572,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest() ); @@ -601,7 +603,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest() ); @@ -622,7 +624,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest() ); @@ -654,7 +656,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest() ); @@ -701,7 +703,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest() ); @@ -732,7 +734,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest() ); @@ -753,7 +755,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest() ); @@ -786,7 +788,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest() ); @@ -840,7 +842,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest() ); @@ -874,7 +876,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest() ); @@ -907,7 +909,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -930,7 +932,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -951,7 +953,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest() ); @@ -985,7 +987,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest() ); @@ -1040,7 +1042,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest() ); @@ -1075,7 +1077,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest() ); @@ -1109,7 +1111,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1132,7 +1134,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1153,7 +1155,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest() ); @@ -1186,7 +1188,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest() ); @@ -1240,7 +1242,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest() ); @@ -1274,7 +1276,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest() ); @@ -1307,7 +1309,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1330,7 +1332,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1351,7 +1353,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest() ); @@ -1384,7 +1386,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest() ); @@ -1438,7 +1440,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest() ); @@ -1472,7 +1474,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest() ); @@ -1505,7 +1507,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1527,7 +1529,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1548,7 +1550,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest() ); @@ -1582,7 +1584,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest() ); @@ -1637,7 +1639,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest() ); @@ -1672,7 +1674,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest() ); @@ -1706,7 +1708,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1728,7 +1730,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1749,7 +1751,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest() ); @@ -1782,7 +1784,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest() ); @@ -1836,7 +1838,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest() ); @@ -1870,7 +1872,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest() ); @@ -1903,7 +1905,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1925,7 +1927,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1946,7 +1948,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest() ); @@ -1979,7 +1981,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest() ); @@ -2033,7 +2035,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest() ); @@ -2067,7 +2069,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest() ); @@ -2100,7 +2102,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2122,7 +2124,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2143,7 +2145,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest() ); @@ -2177,7 +2179,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest() ); @@ -2232,7 +2234,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest() ); @@ -2267,7 +2269,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest() ); @@ -2301,7 +2303,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2323,7 +2325,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2344,7 +2346,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest() ); @@ -2377,7 +2379,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest() ); @@ -2431,7 +2433,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest() ); @@ -2465,7 +2467,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest() ); @@ -2498,7 +2500,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2520,7 +2522,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2541,7 +2543,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest() ); @@ -2581,7 +2583,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest() ); @@ -2638,7 +2640,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest() ); @@ -2672,7 +2674,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest() ); @@ -2741,7 +2743,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest() ); @@ -2799,7 +2801,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest() ); @@ -2853,7 +2855,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest() ); @@ -2900,7 +2902,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest() ); @@ -2940,7 +2942,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest() ); @@ -2997,7 +2999,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest() ); @@ -3031,7 +3033,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest() ); @@ -3100,7 +3102,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest() ); @@ -3158,7 +3160,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest() ); @@ -3212,7 +3214,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest() ); @@ -3259,7 +3261,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest() ); @@ -3299,7 +3301,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest() ); @@ -3356,7 +3358,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest() ); @@ -3390,7 +3392,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest() ); @@ -3459,7 +3461,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest() ); @@ -3517,7 +3519,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest() ); @@ -3571,7 +3573,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest() ); @@ -3617,7 +3619,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3647,7 +3649,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3691,7 +3693,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3723,7 +3725,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3753,7 +3755,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3797,7 +3799,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3829,7 +3831,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3862,7 +3864,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3906,7 +3908,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3941,7 +3943,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3971,7 +3973,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4015,7 +4017,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4050,7 +4052,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4098,7 +4100,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4139,7 +4141,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4218,7 +4220,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4298,7 +4300,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4394,8 +4396,7 @@ describe('v1beta1.NetworkSecurityClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4414,7 +4415,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4423,8 +4424,7 @@ describe('v1beta1.NetworkSecurityClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4440,7 +4440,7 @@ describe('v1beta1.NetworkSecurityClient', () => { }); describe('Path templates', () => { - describe('authorizationPolicy', () => { + describe('authorizationPolicy', async () => { const fakePath = '/rendered/path/authorizationPolicy'; const expectedParameters = { project: 'projectValue', @@ -4451,7 +4451,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.authorizationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4518,7 +4518,7 @@ describe('v1beta1.NetworkSecurityClient', () => { }); }); - describe('clientTlsPolicy', () => { + describe('clientTlsPolicy', async () => { const fakePath = '/rendered/path/clientTlsPolicy'; const expectedParameters = { project: 'projectValue', @@ -4529,7 +4529,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clientTlsPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4583,7 +4583,7 @@ describe('v1beta1.NetworkSecurityClient', () => { }); }); - describe('serverTlsPolicy', () => { + describe('serverTlsPolicy', async () => { const fakePath = '/rendered/path/serverTlsPolicy'; const expectedParameters = { project: 'projectValue', @@ -4594,7 +4594,7 @@ describe('v1beta1.NetworkSecurityClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serverTlsPolicyPathTemplate.render = sinon .stub() .returns(fakePath); From a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:24:09 -0700 Subject: [PATCH 27/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6188) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlc291cmNlbWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJ1bi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNjaGVkdWxlci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3JldG1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyZXNvdXJjZW1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXByaXZhdGVjYS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXB1YmxpY2NhLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVybWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlcnZpY2VkaXJlY3RvcnkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlcnZpY2VoZWFsdGgvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNoZWxsLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNxbC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN0b3JhZ2VpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN1cHBvcnQvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhbGVudC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhc2tzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRlbGNvYXV0b21hdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- .../google-cloud-resourcemanager/package.json | 2 +- ...adata.google.cloud.resourcemanager.v3.json | 2 +- ...adata_google.cloud.resourcemanager.v3.json | 2 +- .../src/v3/folders_client.ts | 62 +- .../src/v3/organizations_client.ts | 28 +- .../src/v3/projects_client.ts | 62 +- .../src/v3/tag_bindings_client.ts | 34 +- .../src/v3/tag_holds_client.ts | 22 +- .../src/v3/tag_keys_client.ts | 46 +- .../src/v3/tag_values_client.ts | 46 +- .../test/gapic_folders_v3.ts | 166 ++-- .../test/gapic_organizations_v3.ts | 78 +- .../test/gapic_projects_v3.ts | 166 ++-- .../test/gapic_tag_bindings_v3.ts | 98 +- .../test/gapic_tag_holds_v3.ts | 84 +- .../test/gapic_tag_keys_v3.ts | 136 +-- .../test/gapic_tag_values_v3.ts | 136 +-- packages/google-cloud-retail/package.json | 2 +- ...ippet_metadata.google.cloud.retail.v2.json | 2 +- ...ippet_metadata_google.cloud.retail.v2.json | 2 +- ..._metadata.google.cloud.retail.v2alpha.json | 2 +- ..._metadata_google.cloud.retail.v2alpha.json | 2 +- ...t_metadata.google.cloud.retail.v2beta.json | 2 +- ...t_metadata_google.cloud.retail.v2beta.json | 2 +- .../src/v2/analytics_service_client.ts | 6 +- .../src/v2/catalog_service_client.ts | 54 +- .../src/v2/completion_service_client.ts | 10 +- .../src/v2/control_service_client.ts | 30 +- .../v2/generative_question_service_client.ts | 22 +- .../src/v2/model_service_client.ts | 42 +- .../src/v2/prediction_service_client.ts | 6 +- .../src/v2/product_service_client.ts | 58 +- .../src/v2/search_service_client.ts | 14 +- .../src/v2/serving_config_service_client.ts | 38 +- .../src/v2/user_event_service_client.ts | 22 +- .../src/v2alpha/analytics_service_client.ts | 6 +- .../src/v2alpha/branch_service_client.ts | 10 +- .../src/v2alpha/catalog_service_client.ts | 58 +- .../src/v2alpha/completion_service_client.ts | 10 +- .../src/v2alpha/control_service_client.ts | 30 +- .../generative_question_service_client.ts | 22 +- ...hant_center_account_link_service_client.ts | 14 +- .../src/v2alpha/model_service_client.ts | 42 +- .../src/v2alpha/prediction_service_client.ts | 6 +- .../src/v2alpha/product_service_client.ts | 62 +- .../src/v2alpha/project_service_client.ts | 34 +- .../src/v2alpha/search_service_client.ts | 14 +- .../v2alpha/serving_config_service_client.ts | 38 +- .../src/v2alpha/user_event_service_client.ts | 26 +- .../src/v2beta/analytics_service_client.ts | 6 +- .../src/v2beta/catalog_service_client.ts | 58 +- .../src/v2beta/completion_service_client.ts | 10 +- .../src/v2beta/control_service_client.ts | 30 +- .../generative_question_service_client.ts | 22 +- .../src/v2beta/model_service_client.ts | 42 +- .../src/v2beta/prediction_service_client.ts | 6 +- .../src/v2beta/product_service_client.ts | 62 +- .../src/v2beta/project_service_client.ts | 10 +- .../src/v2beta/search_service_client.ts | 14 +- .../v2beta/serving_config_service_client.ts | 38 +- .../src/v2beta/user_event_service_client.ts | 26 +- .../test/gapic_analytics_service_v2.ts | 68 +- .../test/gapic_analytics_service_v2alpha.ts | 88 +- .../test/gapic_analytics_service_v2beta.ts | 72 +- .../test/gapic_branch_service_v2alpha.ts | 92 +- .../test/gapic_catalog_service_v2.ts | 158 ++-- .../test/gapic_catalog_service_v2alpha.ts | 182 ++-- .../test/gapic_catalog_service_v2beta.ts | 170 ++-- .../test/gapic_completion_service_v2.ts | 76 +- .../test/gapic_completion_service_v2alpha.ts | 96 +- .../test/gapic_completion_service_v2beta.ts | 80 +- .../test/gapic_control_service_v2.ts | 102 +-- .../test/gapic_control_service_v2alpha.ts | 122 +-- .../test/gapic_control_service_v2beta.ts | 106 +-- .../gapic_generative_question_service_v2.ts | 96 +- ...pic_generative_question_service_v2alpha.ts | 116 +-- ...apic_generative_question_service_v2beta.ts | 100 +-- ...ant_center_account_link_service_v2alpha.ts | 104 +-- .../test/gapic_model_service_v2.ts | 134 +-- .../test/gapic_model_service_v2alpha.ts | 154 ++-- .../test/gapic_model_service_v2beta.ts | 138 +-- .../test/gapic_prediction_service_v2.ts | 64 +- .../test/gapic_prediction_service_v2alpha.ts | 84 +- .../test/gapic_prediction_service_v2beta.ts | 68 +- .../test/gapic_product_service_v2.ts | 190 ++-- .../test/gapic_product_service_v2alpha.ts | 218 ++--- .../test/gapic_product_service_v2beta.ts | 206 ++--- .../test/gapic_project_service_v2alpha.ts | 148 ++-- .../test/gapic_project_service_v2beta.ts | 76 +- .../test/gapic_search_service_v2.ts | 78 +- .../test/gapic_search_service_v2alpha.ts | 94 +- .../test/gapic_search_service_v2beta.ts | 82 +- .../test/gapic_serving_config_service_v2.ts | 118 +-- .../gapic_serving_config_service_v2alpha.ts | 138 +-- .../gapic_serving_config_service_v2beta.ts | 122 +-- .../test/gapic_user_event_service_v2.ts | 108 +-- .../test/gapic_user_event_service_v2alpha.ts | 140 +-- .../test/gapic_user_event_service_v2beta.ts | 124 +-- packages/google-cloud-run/package.json | 2 +- .../snippet_metadata.google.cloud.run.v2.json | 2 +- .../snippet_metadata_google.cloud.run.v2.json | 2 +- .../google-cloud-run/src/v2/builds_client.ts | 4 +- .../src/v2/executions_client.ts | 26 +- .../google-cloud-run/src/v2/jobs_client.ts | 46 +- .../src/v2/revisions_client.ts | 22 +- .../src/v2/services_client.ts | 42 +- .../google-cloud-run/src/v2/tasks_client.ts | 16 +- .../google-cloud-run/test/gapic_builds_v2.ts | 46 +- .../test/gapic_executions_v2.ts | 102 +-- .../google-cloud-run/test/gapic_jobs_v2.ts | 150 ++-- .../test/gapic_revisions_v2.ts | 94 +- .../test/gapic_services_v2.ts | 138 +-- .../google-cloud-run/test/gapic_tasks_v2.ts | 68 +- packages/google-cloud-scheduler/package.json | 2 +- ...et_metadata.google.cloud.scheduler.v1.json | 2 +- ...et_metadata_google.cloud.scheduler.v1.json | 2 +- ...tadata.google.cloud.scheduler.v1beta1.json | 2 +- ...tadata_google.cloud.scheduler.v1beta1.json | 2 +- .../src/v1/cloud_scheduler_client.ts | 40 +- .../src/v1beta1/cloud_scheduler_client.ts | 40 +- .../test/gapic_cloud_scheduler_v1.ts | 96 +- .../test/gapic_cloud_scheduler_v1beta1.ts | 96 +- .../google-cloud-secretmanager/package.json | 2 +- ...etadata.google.cloud.secretmanager.v1.json | 2 +- ...etadata_google.cloud.secretmanager.v1.json | 2 +- ...ta_google.cloud.secretmanager.v1beta2.json | 2 +- .../src/v1/secret_manager_service_client.ts | 76 +- .../v1beta2/secret_manager_service_client.ts | 76 +- .../test/gapic_secret_manager_service_v1.ts | 170 ++-- .../gapic_secret_manager_service_v1beta2.ts | 170 ++-- .../package.json | 2 +- ...a_google.cloud.securesourcemanager.v1.json | 2 +- .../src/v1/secure_source_manager_client.ts | 90 +- .../test/gapic_secure_source_manager_v1.ts | 244 ++--- .../package.json | 2 +- ...ta.google.cloud.security.privateca.v1.json | 2 +- ...ta_google.cloud.security.privateca.v1.json | 2 +- ...ogle.cloud.security.privateca.v1beta1.json | 2 +- ...ogle.cloud.security.privateca.v1beta1.json | 2 +- .../certificate_authority_service_client.ts | 158 +++- .../certificate_authority_service_client.ts | 112 ++- .../gapic_certificate_authority_service_v1.ts | 388 ++++---- ...c_certificate_authority_service_v1beta1.ts | 240 ++--- .../package.json | 2 +- ...ata_google.cloud.security.publicca.v1.json | 2 +- ...oogle.cloud.security.publicca.v1beta1.json | 2 +- ...oogle.cloud.security.publicca.v1beta1.json | 2 +- ...ic_certificate_authority_service_client.ts | 4 +- ...ic_certificate_authority_service_client.ts | 4 +- ...public_certificate_authority_service_v1.ts | 24 +- ...c_certificate_authority_service_v1beta1.ts | 24 +- .../google-cloud-securitycenter/package.json | 2 +- ...tadata.google.cloud.securitycenter.v1.json | 2 +- ...tadata_google.cloud.securitycenter.v1.json | 2 +- ...a.google.cloud.securitycenter.v1beta1.json | 2 +- ...a_google.cloud.securitycenter.v1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...tadata_google.cloud.securitycenter.v2.json | 2 +- .../src/v1/security_center_client.ts | 390 ++++++-- .../src/v1beta1/security_center_client.ts | 112 ++- .../src/v1p1beta1/security_center_client.ts | 140 ++- .../src/v2/security_center_client.ts | 234 +++-- .../test/gapic_security_center_v1.ts | 836 +++++++++--------- .../test/gapic_security_center_v1beta1.ts | 210 ++--- .../test/gapic_security_center_v1p1beta1.ts | 300 +++---- .../test/gapic_security_center_v2.ts | 592 ++++++------- .../package.json | 2 +- ...gle.cloud.securitycentermanagement.v1.json | 2 +- .../v1/security_center_management_client.ts | 140 ++- .../gapic_security_center_management_v1.ts | 312 +++---- .../package.json | 2 +- ...data.google.cloud.servicedirectory.v1.json | 2 +- ...data_google.cloud.servicedirectory.v1.json | 2 +- ...google.cloud.servicedirectory.v1beta1.json | 2 +- ...google.cloud.servicedirectory.v1beta1.json | 2 +- .../src/v1/lookup_service_client.ts | 4 +- .../src/v1/registration_service_client.ts | 96 +- .../src/v1beta1/lookup_service_client.ts | 4 +- .../v1beta1/registration_service_client.ts | 96 +- .../test/gapic_lookup_service_v1.ts | 34 +- .../test/gapic_lookup_service_v1beta1.ts | 34 +- .../test/gapic_registration_service_v1.ts | 192 ++-- .../gapic_registration_service_v1beta1.ts | 192 ++-- .../google-cloud-servicehealth/package.json | 2 +- ...etadata_google.cloud.servicehealth.v1.json | 2 +- .../src/v1/service_health_client.ts | 48 +- .../test/gapic_service_health_v1.ts | 92 +- packages/google-cloud-shell/package.json | 2 +- ...nippet_metadata.google.cloud.shell.v1.json | 2 +- ...nippet_metadata_google.cloud.shell.v1.json | 2 +- .../src/v1/cloud_shell_service_client.ts | 22 +- .../test/gapic_cloud_shell_service_v1.ts | 78 +- packages/google-cloud-speech/package.json | 2 +- ...ippet_metadata.google.cloud.speech.v1.json | 2 +- ...ippet_metadata_google.cloud.speech.v1.json | 2 +- ...etadata.google.cloud.speech.v1p1beta1.json | 2 +- ...etadata_google.cloud.speech.v1p1beta1.json | 2 +- ...ippet_metadata.google.cloud.speech.v2.json | 2 +- ...ippet_metadata_google.cloud.speech.v2.json | 2 +- .../src/v1/adaptation_client.ts | 56 +- .../src/v1/speech_client.ts | 14 +- .../src/v1p1beta1/adaptation_client.ts | 56 +- .../src/v1p1beta1/speech_client.ts | 14 +- .../src/v2/speech_client.ts | 118 ++- .../test/gapic_adaptation_v1.ts | 112 +-- .../test/gapic_adaptation_v1p1beta1.ts | 112 +-- .../test/gapic_speech_v1.ts | 50 +- .../test/gapic_speech_v1p1beta1.ts | 50 +- .../test/gapic_speech_v2.ts | 310 +++---- packages/google-cloud-sql/package.json | 2 +- .../snippet_metadata_google.cloud.sql.v1.json | 2 +- ...pet_metadata_google.cloud.sql.v1beta4.json | 2 +- .../src/v1/sql_backup_runs_service_client.ts | 16 +- .../src/v1/sql_connect_service_client.ts | 8 +- .../src/v1/sql_databases_service_client.ts | 24 +- .../src/v1/sql_flags_service_client.ts | 4 +- .../src/v1/sql_instances_service_client.ts | 136 ++- .../src/v1/sql_operations_service_client.ts | 12 +- .../src/v1/sql_ssl_certs_service_client.ts | 16 +- .../src/v1/sql_tiers_service_client.ts | 4 +- .../src/v1/sql_users_service_client.ts | 20 +- .../v1beta4/sql_backup_runs_service_client.ts | 16 +- .../src/v1beta4/sql_connect_service_client.ts | 8 +- .../v1beta4/sql_databases_service_client.ts | 24 +- .../src/v1beta4/sql_flags_service_client.ts | 4 +- .../v1beta4/sql_instances_service_client.ts | 136 ++- .../v1beta4/sql_operations_service_client.ts | 12 +- .../v1beta4/sql_ssl_certs_service_client.ts | 16 +- .../src/v1beta4/sql_tiers_service_client.ts | 4 +- .../src/v1beta4/sql_users_service_client.ts | 20 +- .../test/gapic_sql_backup_runs_service_v1.ts | 46 +- .../gapic_sql_backup_runs_service_v1beta4.ts | 46 +- .../test/gapic_sql_connect_service_v1.ts | 30 +- .../test/gapic_sql_connect_service_v1beta4.ts | 30 +- .../test/gapic_sql_databases_service_v1.ts | 62 +- .../gapic_sql_databases_service_v1beta4.ts | 62 +- .../test/gapic_sql_flags_service_v1.ts | 22 +- .../test/gapic_sql_flags_service_v1beta4.ts | 22 +- .../test/gapic_sql_instances_service_v1.ts | 286 +++--- .../gapic_sql_instances_service_v1beta4.ts | 286 +++--- .../test/gapic_sql_operations_service_v1.ts | 38 +- .../gapic_sql_operations_service_v1beta4.ts | 38 +- .../test/gapic_sql_ssl_certs_service_v1.ts | 46 +- .../gapic_sql_ssl_certs_service_v1beta4.ts | 46 +- .../test/gapic_sql_tiers_service_v1.ts | 22 +- .../test/gapic_sql_tiers_service_v1beta4.ts | 22 +- .../test/gapic_sql_users_service_v1.ts | 54 +- .../test/gapic_sql_users_service_v1beta4.ts | 54 +- .../google-cloud-storageinsights/package.json | 2 +- ...adata.google.cloud.storageinsights.v1.json | 2 +- ...adata_google.cloud.storageinsights.v1.json | 2 +- .../src/v1/storage_insights_client.ts | 44 +- .../test/gapic_storage_insights_v1.ts | 98 +- packages/google-cloud-support/package.json | 2 +- ...ppet_metadata.google.cloud.support.v2.json | 2 +- ...ppet_metadata_google.cloud.support.v2.json | 2 +- .../src/v2/case_attachment_service_client.ts | 12 +- .../src/v2/case_service_client.ts | 56 +- .../src/v2/comment_service_client.ts | 16 +- .../test/gapic_case_attachment_service_v2.ts | 42 +- .../test/gapic_case_service_v2.ts | 114 +-- .../test/gapic_comment_service_v2.ts | 50 +- packages/google-cloud-talent/package.json | 2 +- ...ippet_metadata.google.cloud.talent.v4.json | 2 +- ...ippet_metadata_google.cloud.talent.v4.json | 2 +- ..._metadata.google.cloud.talent.v4beta1.json | 2 +- ..._metadata_google.cloud.talent.v4beta1.json | 2 +- .../src/v4/company_service_client.ts | 28 +- .../src/v4/completion_client.ts | 4 +- .../src/v4/event_service_client.ts | 4 +- .../src/v4/job_service_client.ts | 50 +- .../src/v4/tenant_service_client.ts | 28 +- .../src/v4beta1/company_service_client.ts | 28 +- .../src/v4beta1/completion_client.ts | 4 +- .../src/v4beta1/event_service_client.ts | 4 +- .../src/v4beta1/job_service_client.ts | 50 +- .../src/v4beta1/tenant_service_client.ts | 28 +- .../test/gapic_company_service_v4.ts | 62 +- .../test/gapic_company_service_v4beta1.ts | 74 +- .../test/gapic_completion_v4.ts | 24 +- .../test/gapic_completion_v4beta1.ts | 36 +- .../test/gapic_event_service_v4.ts | 24 +- .../test/gapic_event_service_v4beta1.ts | 36 +- .../test/gapic_job_service_v4.ts | 132 +-- .../test/gapic_job_service_v4beta1.ts | 136 +-- .../test/gapic_tenant_service_v4.ts | 66 +- .../test/gapic_tenant_service_v4beta1.ts | 74 +- packages/google-cloud-tasks/.gitignore | 3 +- .../esm/src/v2/cloud_tasks_client.ts | 80 +- .../esm/src/v2beta2/cloud_tasks_client.ts | 100 ++- .../esm/src/v2beta3/cloud_tasks_client.ts | 80 +- .../esm/test/gapic_cloud_tasks_v2.ts | 170 ++-- .../esm/test/gapic_cloud_tasks_v2beta2.ts | 210 ++--- .../esm/test/gapic_cloud_tasks_v2beta3.ts | 170 ++-- ...nippet_metadata.google.cloud.tasks.v2.json | 2 +- ...nippet_metadata_google.cloud.tasks.v2.json | 2 +- ...t_metadata.google.cloud.tasks.v2beta2.json | 2 +- ...t_metadata_google.cloud.tasks.v2beta2.json | 2 +- ...t_metadata.google.cloud.tasks.v2beta3.json | 2 +- ...t_metadata_google.cloud.tasks.v2beta3.json | 2 +- packages/google-cloud-tasks/tsconfig.json | 3 +- .../google-cloud-telcoautomation/package.json | 2 +- ...adata_google.cloud.telcoautomation.v1.json | 2 +- ...google.cloud.telcoautomation.v1alpha1.json | 2 +- .../src/v1/telco_automation_client.ts | 226 +++-- .../src/v1alpha1/telco_automation_client.ts | 226 +++-- .../test/gapic_telco_automation_v1.ts | 424 ++++----- .../test/gapic_telco_automation_v1alpha1.ts | 424 ++++----- 309 files changed, 11135 insertions(+), 8493 deletions(-) diff --git a/packages/google-cloud-resourcemanager/package.json b/packages/google-cloud-resourcemanager/package.json index 7fbf076b30a..819697cbe90 100644 --- a/packages/google-cloud-resourcemanager/package.json +++ b/packages/google-cloud-resourcemanager/package.json @@ -49,7 +49,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json index 24fcbfbca01..f9f83357a4f 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-resourcemanager", - "version": "5.3.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json index 24fcbfbca01..f9f83357a4f 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-resourcemanager", - "version": "5.3.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-resourcemanager/src/v3/folders_client.ts b/packages/google-cloud-resourcemanager/src/v3/folders_client.ts index ea8ec2454a9..76d657481b6 100644 --- a/packages/google-cloud-resourcemanager/src/v3/folders_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/folders_client.ts @@ -594,7 +594,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFolder request %j', request); const wrappedCallback: | Callback< @@ -710,7 +712,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -832,7 +836,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -948,7 +954,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1098,7 +1106,9 @@ export class FoldersClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1285,7 +1295,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ 'folder.name': request.folder!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1473,7 +1485,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1651,7 +1665,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1829,7 +1845,9 @@ export class FoldersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2008,7 +2026,9 @@ export class FoldersClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.IListFoldersRequest, @@ -2084,7 +2104,9 @@ export class FoldersClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFolders stream %j', request); return this.descriptors.page.listFolders.createStream( this.innerApiCalls.listFolders as GaxCall, @@ -2142,7 +2164,9 @@ export class FoldersClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFolders iterate %j', request); return this.descriptors.page.listFolders.asyncIterate( this.innerApiCalls['listFolders'] as GaxCall, @@ -2278,7 +2302,9 @@ export class FoldersClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.ISearchFoldersRequest, @@ -2372,7 +2398,9 @@ export class FoldersClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchFolders stream %j', request); return this.descriptors.page.searchFolders.createStream( this.innerApiCalls.searchFolders as GaxCall, @@ -2448,7 +2476,9 @@ export class FoldersClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchFolders iterate %j', request); return this.descriptors.page.searchFolders.asyncIterate( this.innerApiCalls['searchFolders'] as GaxCall, @@ -2550,7 +2580,7 @@ export class FoldersClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts b/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts index b0000003398..d797944f65c 100644 --- a/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts @@ -499,7 +499,9 @@ export class OrganizationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrganization request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class OrganizationsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -742,7 +746,9 @@ export class OrganizationsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -858,7 +864,9 @@ export class OrganizationsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1003,7 +1011,9 @@ export class OrganizationsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.ISearchOrganizationsRequest, @@ -1085,7 +1095,9 @@ export class OrganizationsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchOrganizations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchOrganizations stream %j', request); return this.descriptors.page.searchOrganizations.createStream( this.innerApiCalls.searchOrganizations as GaxCall, @@ -1149,7 +1161,9 @@ export class OrganizationsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchOrganizations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchOrganizations iterate %j', request); return this.descriptors.page.searchOrganizations.asyncIterate( this.innerApiCalls['searchOrganizations'] as GaxCall, diff --git a/packages/google-cloud-resourcemanager/src/v3/projects_client.ts b/packages/google-cloud-resourcemanager/src/v3/projects_client.ts index 3974de09fe1..cae79de3990 100644 --- a/packages/google-cloud-resourcemanager/src/v3/projects_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/projects_client.ts @@ -591,7 +591,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProject request %j', request); const wrappedCallback: | Callback< @@ -705,7 +707,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -863,7 +867,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -976,7 +982,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1111,7 +1119,9 @@ export class ProjectsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1285,7 +1295,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ 'project.name': request.project!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1469,7 +1481,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1668,7 +1682,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1845,7 +1861,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2020,7 +2038,9 @@ export class ProjectsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.IListProjectsRequest, @@ -2093,7 +2113,9 @@ export class ProjectsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProjects stream %j', request); return this.descriptors.page.listProjects.createStream( this.innerApiCalls.listProjects as GaxCall, @@ -2148,7 +2170,9 @@ export class ProjectsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProjects iterate %j', request); return this.descriptors.page.listProjects.asyncIterate( this.innerApiCalls['listProjects'] as GaxCall, @@ -2291,7 +2315,9 @@ export class ProjectsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.ISearchProjectsRequest, @@ -2388,7 +2414,9 @@ export class ProjectsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchProjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchProjects stream %j', request); return this.descriptors.page.searchProjects.createStream( this.innerApiCalls.searchProjects as GaxCall, @@ -2467,7 +2495,9 @@ export class ProjectsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchProjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchProjects iterate %j', request); return this.descriptors.page.searchProjects.asyncIterate( this.innerApiCalls['searchProjects'] as GaxCall, @@ -2569,7 +2599,7 @@ export class ProjectsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts index ffaebab8862..5a4dc21e52f 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts @@ -560,7 +560,9 @@ export class TagBindingsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -729,7 +731,9 @@ export class TagBindingsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -896,7 +900,9 @@ export class TagBindingsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.IListTagBindingsRequest, @@ -962,7 +968,9 @@ export class TagBindingsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTagBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagBindings stream %j', request); return this.descriptors.page.listTagBindings.createStream( this.innerApiCalls.listTagBindings as GaxCall, @@ -1010,7 +1018,9 @@ export class TagBindingsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTagBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagBindings iterate %j', request); return this.descriptors.page.listTagBindings.asyncIterate( this.innerApiCalls['listTagBindings'] as GaxCall, @@ -1114,7 +1124,9 @@ export class TagBindingsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, @@ -1180,7 +1192,9 @@ export class TagBindingsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listEffectiveTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEffectiveTags stream %j', request); return this.descriptors.page.listEffectiveTags.createStream( this.innerApiCalls.listEffectiveTags as GaxCall, @@ -1228,7 +1242,9 @@ export class TagBindingsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listEffectiveTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEffectiveTags iterate %j', request); return this.descriptors.page.listEffectiveTags.asyncIterate( this.innerApiCalls['listEffectiveTags'] as GaxCall, @@ -1330,7 +1346,7 @@ export class TagBindingsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts index b944c7c2d53..092d7aa2e02 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts @@ -565,7 +565,9 @@ export class TagHoldsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -736,7 +738,9 @@ export class TagHoldsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -914,7 +918,9 @@ export class TagHoldsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, @@ -995,7 +1001,9 @@ export class TagHoldsClient { }); const defaultCallSettings = this._defaults['listTagHolds']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagHolds stream %j', request); return this.descriptors.page.listTagHolds.createStream( this.innerApiCalls.listTagHolds as GaxCall, @@ -1058,7 +1066,9 @@ export class TagHoldsClient { }); const defaultCallSettings = this._defaults['listTagHolds']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagHolds iterate %j', request); return this.descriptors.page.listTagHolds.asyncIterate( this.innerApiCalls['listTagHolds'] as GaxCall, @@ -1160,7 +1170,7 @@ export class TagHoldsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts index c5ed147f38c..b982fd12463 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts @@ -560,7 +560,9 @@ export class TagKeysClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTagKey request %j', request); const wrappedCallback: | Callback< @@ -683,7 +685,9 @@ export class TagKeysClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNamespacedTagKey request %j', request); const wrappedCallback: | Callback< @@ -803,7 +807,9 @@ export class TagKeysClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -925,7 +931,9 @@ export class TagKeysClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1041,7 +1049,9 @@ export class TagKeysClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1171,7 +1181,9 @@ export class TagKeysClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1348,7 +1360,9 @@ export class TagKeysClient { this._gaxModule.routingHeader.fromParams({ 'tag_key.name': request.tagKey!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1524,7 +1538,9 @@ export class TagKeysClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1687,7 +1703,9 @@ export class TagKeysClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.IListTagKeysRequest, @@ -1753,7 +1771,9 @@ export class TagKeysClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTagKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagKeys stream %j', request); return this.descriptors.page.listTagKeys.createStream( this.innerApiCalls.listTagKeys as GaxCall, @@ -1801,7 +1821,9 @@ export class TagKeysClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTagKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagKeys iterate %j', request); return this.descriptors.page.listTagKeys.asyncIterate( this.innerApiCalls['listTagKeys'] as GaxCall, @@ -1903,7 +1925,7 @@ export class TagKeysClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts index aeb1cb57993..def24bf3459 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts @@ -560,7 +560,9 @@ export class TagValuesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTagValue request %j', request); const wrappedCallback: | Callback< @@ -691,7 +693,9 @@ export class TagValuesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNamespacedTagValue request %j', request); const wrappedCallback: | Callback< @@ -811,7 +815,9 @@ export class TagValuesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -933,7 +939,9 @@ export class TagValuesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1049,7 +1057,9 @@ export class TagValuesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1179,7 +1189,9 @@ export class TagValuesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1354,7 +1366,9 @@ export class TagValuesClient { this._gaxModule.routingHeader.fromParams({ 'tag_value.name': request.tagValue!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1529,7 +1543,9 @@ export class TagValuesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1690,7 +1706,9 @@ export class TagValuesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.resourcemanager.v3.IListTagValuesRequest, @@ -1754,7 +1772,9 @@ export class TagValuesClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTagValues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagValues stream %j', request); return this.descriptors.page.listTagValues.createStream( this.innerApiCalls.listTagValues as GaxCall, @@ -1800,7 +1820,9 @@ export class TagValuesClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTagValues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTagValues iterate %j', request); return this.descriptors.page.listTagValues.asyncIterate( this.innerApiCalls['listTagValues'] as GaxCall, @@ -1902,7 +1924,7 @@ export class TagValuesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts index f094a5bc686..fd7ab967720 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts @@ -285,7 +285,9 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.foldersStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetFolderRequest() ); @@ -375,7 +377,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetFolderRequest() ); @@ -422,7 +424,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetFolderRequest() ); @@ -450,7 +452,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetFolderRequest() ); @@ -471,7 +473,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -502,7 +504,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -549,7 +551,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -580,7 +582,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -601,7 +603,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -632,7 +634,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -679,7 +681,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -710,7 +712,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -731,7 +733,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -763,7 +765,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -810,7 +812,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -841,7 +843,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -862,7 +864,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateFolderRequest() ); @@ -880,7 +882,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateFolderRequest() ); @@ -920,7 +922,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateFolderRequest() ); @@ -937,7 +939,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateFolderRequest() ); @@ -956,7 +958,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -978,7 +980,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -996,7 +998,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateFolderRequest() ); @@ -1029,7 +1031,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateFolderRequest() ); @@ -1084,7 +1086,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateFolderRequest() ); @@ -1116,7 +1118,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateFolderRequest() ); @@ -1150,7 +1152,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1172,7 +1174,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1190,7 +1192,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveFolderRequest() ); @@ -1222,7 +1224,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveFolderRequest() ); @@ -1276,7 +1278,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveFolderRequest() ); @@ -1307,7 +1309,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveFolderRequest() ); @@ -1340,7 +1342,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1362,7 +1364,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1380,7 +1382,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteFolderRequest() ); @@ -1412,7 +1414,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteFolderRequest() ); @@ -1466,7 +1468,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteFolderRequest() ); @@ -1497,7 +1499,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteFolderRequest() ); @@ -1530,7 +1532,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1552,7 +1554,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1570,7 +1572,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteFolderRequest() ); @@ -1603,7 +1605,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteFolderRequest() ); @@ -1657,7 +1659,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteFolderRequest() ); @@ -1688,7 +1690,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteFolderRequest() ); @@ -1721,7 +1723,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1743,7 +1745,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1764,7 +1766,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListFoldersRequest() ); @@ -1789,7 +1791,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListFoldersRequest() ); @@ -1830,7 +1832,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListFoldersRequest() ); @@ -1847,7 +1849,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListFoldersRequest() ); @@ -1894,7 +1896,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListFoldersRequest() ); @@ -1932,7 +1934,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListFoldersRequest() ); @@ -1968,7 +1970,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListFoldersRequest() ); @@ -1999,7 +2001,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchFoldersRequest() ); @@ -2024,7 +2026,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchFoldersRequest() ); @@ -2065,7 +2067,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchFoldersRequest() ); @@ -2082,7 +2084,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchFoldersRequest() ); @@ -2129,7 +2131,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchFoldersRequest() ); @@ -2165,7 +2167,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchFoldersRequest() ); @@ -2201,7 +2203,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchFoldersRequest() ); @@ -2229,7 +2231,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2308,7 +2310,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2388,7 +2390,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2484,8 +2486,7 @@ describe('v3.FoldersClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2504,7 +2505,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2513,8 +2514,7 @@ describe('v3.FoldersClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2530,7 +2530,7 @@ describe('v3.FoldersClient', () => { }); describe('Path templates', () => { - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { folder: 'folderValue', @@ -2539,7 +2539,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2568,7 +2568,7 @@ describe('v3.FoldersClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2577,7 +2577,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2606,7 +2606,7 @@ describe('v3.FoldersClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2615,7 +2615,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2644,7 +2644,7 @@ describe('v3.FoldersClient', () => { }); }); - describe('tagBinding', () => { + describe('tagBinding', async () => { const fakePath = '/rendered/path/tagBinding'; const expectedParameters = { tag_binding: 'tagBindingValue', @@ -2653,7 +2653,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2682,7 +2682,7 @@ describe('v3.FoldersClient', () => { }); }); - describe('tagHold', () => { + describe('tagHold', async () => { const fakePath = '/rendered/path/tagHold'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2692,7 +2692,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagHoldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2731,7 +2731,7 @@ describe('v3.FoldersClient', () => { }); }); - describe('tagKey', () => { + describe('tagKey', async () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { tag_key: 'tagKeyValue', @@ -2740,7 +2740,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2769,7 +2769,7 @@ describe('v3.FoldersClient', () => { }); }); - describe('tagValue', () => { + describe('tagValue', async () => { const fakePath = '/rendered/path/tagValue'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2778,7 +2778,7 @@ describe('v3.FoldersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagValuePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts index 70c984d984f..43d1fece9fb 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts @@ -255,7 +255,9 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.organizationsStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetOrganizationRequest() ); @@ -345,7 +347,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetOrganizationRequest() ); @@ -392,7 +394,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetOrganizationRequest() ); @@ -423,7 +425,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetOrganizationRequest() ); @@ -444,7 +446,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -475,7 +477,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -522,7 +524,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -553,7 +555,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -574,7 +576,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -605,7 +607,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -652,7 +654,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -683,7 +685,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -704,7 +706,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -736,7 +738,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -783,7 +785,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -814,7 +816,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -835,7 +837,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchOrganizationsRequest() ); @@ -861,7 +863,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchOrganizationsRequest() ); @@ -904,7 +906,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchOrganizationsRequest() ); @@ -921,7 +923,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchOrganizationsRequest() ); @@ -969,7 +971,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchOrganizationsRequest() ); @@ -1006,7 +1008,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchOrganizationsRequest() ); @@ -1043,7 +1045,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchOrganizationsRequest() ); @@ -1068,7 +1070,7 @@ describe('v3.OrganizationsClient', () => { }); describe('Path templates', () => { - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { folder: 'folderValue', @@ -1077,7 +1079,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1106,7 +1108,7 @@ describe('v3.OrganizationsClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -1115,7 +1117,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1144,7 +1146,7 @@ describe('v3.OrganizationsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1153,7 +1155,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1182,7 +1184,7 @@ describe('v3.OrganizationsClient', () => { }); }); - describe('tagBinding', () => { + describe('tagBinding', async () => { const fakePath = '/rendered/path/tagBinding'; const expectedParameters = { tag_binding: 'tagBindingValue', @@ -1191,7 +1193,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1220,7 +1222,7 @@ describe('v3.OrganizationsClient', () => { }); }); - describe('tagHold', () => { + describe('tagHold', async () => { const fakePath = '/rendered/path/tagHold'; const expectedParameters = { tag_value: 'tagValueValue', @@ -1230,7 +1232,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagHoldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1269,7 +1271,7 @@ describe('v3.OrganizationsClient', () => { }); }); - describe('tagKey', () => { + describe('tagKey', async () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { tag_key: 'tagKeyValue', @@ -1278,7 +1280,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1307,7 +1309,7 @@ describe('v3.OrganizationsClient', () => { }); }); - describe('tagValue', () => { + describe('tagValue', async () => { const fakePath = '/rendered/path/tagValue'; const expectedParameters = { tag_value: 'tagValueValue', @@ -1316,7 +1318,7 @@ describe('v3.OrganizationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagValuePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts index 39e250d0706..e008ad65c6d 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts @@ -285,7 +285,9 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.projectsStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetProjectRequest() ); @@ -375,7 +377,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetProjectRequest() ); @@ -422,7 +424,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetProjectRequest() ); @@ -453,7 +455,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetProjectRequest() ); @@ -474,7 +476,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -505,7 +507,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -552,7 +554,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -583,7 +585,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -604,7 +606,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -635,7 +637,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -682,7 +684,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -713,7 +715,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -734,7 +736,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -766,7 +768,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -813,7 +815,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -844,7 +846,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -865,7 +867,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateProjectRequest() ); @@ -884,7 +886,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateProjectRequest() ); @@ -924,7 +926,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateProjectRequest() ); @@ -941,7 +943,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateProjectRequest() ); @@ -960,7 +962,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -982,7 +984,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1003,7 +1005,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateProjectRequest() ); @@ -1037,7 +1039,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateProjectRequest() ); @@ -1092,7 +1094,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateProjectRequest() ); @@ -1124,7 +1126,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateProjectRequest() ); @@ -1158,7 +1160,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1180,7 +1182,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1201,7 +1203,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveProjectRequest() ); @@ -1233,7 +1235,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveProjectRequest() ); @@ -1287,7 +1289,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveProjectRequest() ); @@ -1318,7 +1320,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.MoveProjectRequest() ); @@ -1351,7 +1353,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1373,7 +1375,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1391,7 +1393,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteProjectRequest() ); @@ -1424,7 +1426,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteProjectRequest() ); @@ -1478,7 +1480,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteProjectRequest() ); @@ -1509,7 +1511,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteProjectRequest() ); @@ -1542,7 +1544,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1564,7 +1566,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1585,7 +1587,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteProjectRequest() ); @@ -1618,7 +1620,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteProjectRequest() ); @@ -1672,7 +1674,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteProjectRequest() ); @@ -1703,7 +1705,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UndeleteProjectRequest() ); @@ -1736,7 +1738,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1758,7 +1760,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1779,7 +1781,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListProjectsRequest() ); @@ -1804,7 +1806,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListProjectsRequest() ); @@ -1845,7 +1847,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListProjectsRequest() ); @@ -1862,7 +1864,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListProjectsRequest() ); @@ -1909,7 +1911,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListProjectsRequest() ); @@ -1947,7 +1949,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListProjectsRequest() ); @@ -1983,7 +1985,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListProjectsRequest() ); @@ -2012,7 +2014,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchProjectsRequest() ); @@ -2037,7 +2039,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchProjectsRequest() ); @@ -2078,7 +2080,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchProjectsRequest() ); @@ -2095,7 +2097,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchProjectsRequest() ); @@ -2142,7 +2144,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchProjectsRequest() ); @@ -2178,7 +2180,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchProjectsRequest() ); @@ -2214,7 +2216,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.SearchProjectsRequest() ); @@ -2242,7 +2244,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2321,7 +2323,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2401,7 +2403,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2497,8 +2499,7 @@ describe('v3.ProjectsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2517,7 +2518,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2526,8 +2527,7 @@ describe('v3.ProjectsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2543,7 +2543,7 @@ describe('v3.ProjectsClient', () => { }); describe('Path templates', () => { - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { folder: 'folderValue', @@ -2552,7 +2552,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2581,7 +2581,7 @@ describe('v3.ProjectsClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2590,7 +2590,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2619,7 +2619,7 @@ describe('v3.ProjectsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2628,7 +2628,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2657,7 +2657,7 @@ describe('v3.ProjectsClient', () => { }); }); - describe('tagBinding', () => { + describe('tagBinding', async () => { const fakePath = '/rendered/path/tagBinding'; const expectedParameters = { tag_binding: 'tagBindingValue', @@ -2666,7 +2666,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2695,7 +2695,7 @@ describe('v3.ProjectsClient', () => { }); }); - describe('tagHold', () => { + describe('tagHold', async () => { const fakePath = '/rendered/path/tagHold'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2705,7 +2705,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagHoldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2744,7 +2744,7 @@ describe('v3.ProjectsClient', () => { }); }); - describe('tagKey', () => { + describe('tagKey', async () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { tag_key: 'tagKeyValue', @@ -2753,7 +2753,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2782,7 +2782,7 @@ describe('v3.ProjectsClient', () => { }); }); - describe('tagValue', () => { + describe('tagValue', async () => { const fakePath = '/rendered/path/tagValue'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2791,7 +2791,7 @@ describe('v3.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagValuePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts index 212180100fc..9a00152248a 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts @@ -285,7 +285,9 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tagBindingsStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagBindingRequest() ); @@ -363,7 +365,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagBindingRequest() ); @@ -403,7 +405,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagBindingRequest() ); @@ -420,7 +422,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagBindingRequest() ); @@ -439,7 +441,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -461,7 +463,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -482,7 +484,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagBindingRequest() ); @@ -515,7 +517,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagBindingRequest() ); @@ -569,7 +571,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagBindingRequest() ); @@ -600,7 +602,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagBindingRequest() ); @@ -633,7 +635,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -655,7 +657,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -676,7 +678,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagBindingsRequest() ); @@ -701,7 +703,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagBindingsRequest() ); @@ -742,7 +744,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagBindingsRequest() ); @@ -759,7 +761,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagBindingsRequest() ); @@ -807,7 +809,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagBindingsRequest() ); @@ -844,7 +846,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagBindingsRequest() ); @@ -881,7 +883,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagBindingsRequest() ); @@ -911,7 +913,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() ); @@ -936,7 +938,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() ); @@ -979,7 +981,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() ); @@ -996,7 +998,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() ); @@ -1044,7 +1046,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() ); @@ -1081,7 +1083,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() ); @@ -1118,7 +1120,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() ); @@ -1147,7 +1149,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1226,7 +1228,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1306,7 +1308,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1402,8 +1404,7 @@ describe('v3.TagBindingsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1422,7 +1423,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1431,8 +1432,7 @@ describe('v3.TagBindingsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1448,7 +1448,7 @@ describe('v3.TagBindingsClient', () => { }); describe('Path templates', () => { - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { folder: 'folderValue', @@ -1457,7 +1457,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1486,7 +1486,7 @@ describe('v3.TagBindingsClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -1495,7 +1495,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1524,7 +1524,7 @@ describe('v3.TagBindingsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1533,7 +1533,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1562,7 +1562,7 @@ describe('v3.TagBindingsClient', () => { }); }); - describe('tagBinding', () => { + describe('tagBinding', async () => { const fakePath = '/rendered/path/tagBinding'; const expectedParameters = { tag_binding: 'tagBindingValue', @@ -1571,7 +1571,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1600,7 +1600,7 @@ describe('v3.TagBindingsClient', () => { }); }); - describe('tagHold', () => { + describe('tagHold', async () => { const fakePath = '/rendered/path/tagHold'; const expectedParameters = { tag_value: 'tagValueValue', @@ -1610,7 +1610,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagHoldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1649,7 +1649,7 @@ describe('v3.TagBindingsClient', () => { }); }); - describe('tagKey', () => { + describe('tagKey', async () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { tag_key: 'tagKeyValue', @@ -1658,7 +1658,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1687,7 +1687,7 @@ describe('v3.TagBindingsClient', () => { }); }); - describe('tagValue', () => { + describe('tagValue', async () => { const fakePath = '/rendered/path/tagValue'; const expectedParameters = { tag_value: 'tagValueValue', @@ -1696,7 +1696,7 @@ describe('v3.TagBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagValuePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_holds_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_holds_v3.ts index 8cf7c4af135..a2bca080c3e 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_tag_holds_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_holds_v3.ts @@ -285,7 +285,9 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tagHoldsStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() ); @@ -377,7 +379,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() ); @@ -431,7 +433,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() ); @@ -462,7 +464,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() ); @@ -495,7 +497,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -517,7 +519,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -538,7 +540,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() ); @@ -571,7 +573,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() ); @@ -625,7 +627,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() ); @@ -656,7 +658,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() ); @@ -689,7 +691,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -711,7 +713,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -732,7 +734,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() ); @@ -771,7 +773,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() ); @@ -826,7 +828,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() ); @@ -857,7 +859,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() ); @@ -917,7 +919,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() ); @@ -968,7 +970,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() ); @@ -1017,7 +1019,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() ); @@ -1058,7 +1060,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1137,7 +1139,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1217,7 +1219,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1313,8 +1315,7 @@ describe('v3.TagHoldsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1333,7 +1334,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1342,8 +1343,7 @@ describe('v3.TagHoldsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1359,7 +1359,7 @@ describe('v3.TagHoldsClient', () => { }); describe('Path templates', () => { - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { folder: 'folderValue', @@ -1368,7 +1368,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1397,7 +1397,7 @@ describe('v3.TagHoldsClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -1406,7 +1406,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1435,7 +1435,7 @@ describe('v3.TagHoldsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1444,7 +1444,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1473,7 +1473,7 @@ describe('v3.TagHoldsClient', () => { }); }); - describe('tagBinding', () => { + describe('tagBinding', async () => { const fakePath = '/rendered/path/tagBinding'; const expectedParameters = { tag_binding: 'tagBindingValue', @@ -1482,7 +1482,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1511,7 +1511,7 @@ describe('v3.TagHoldsClient', () => { }); }); - describe('tagHold', () => { + describe('tagHold', async () => { const fakePath = '/rendered/path/tagHold'; const expectedParameters = { tag_value: 'tagValueValue', @@ -1521,7 +1521,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagHoldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1560,7 +1560,7 @@ describe('v3.TagHoldsClient', () => { }); }); - describe('tagKey', () => { + describe('tagKey', async () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { tag_key: 'tagKeyValue', @@ -1569,7 +1569,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1598,7 +1598,7 @@ describe('v3.TagHoldsClient', () => { }); }); - describe('tagValue', () => { + describe('tagValue', async () => { const fakePath = '/rendered/path/tagValue'; const expectedParameters = { tag_value: 'tagValueValue', @@ -1607,7 +1607,7 @@ describe('v3.TagHoldsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagValuePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts index a058dc8c99f..400f6cf6b0f 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts @@ -285,7 +285,9 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tagKeysStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagKeyRequest() ); @@ -375,7 +377,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagKeyRequest() ); @@ -422,7 +424,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagKeyRequest() ); @@ -450,7 +452,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagKeyRequest() ); @@ -471,7 +473,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() ); @@ -489,7 +491,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() ); @@ -522,7 +524,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() ); @@ -539,7 +541,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() ); @@ -555,7 +557,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -586,7 +588,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -633,7 +635,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -664,7 +666,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -685,7 +687,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -716,7 +718,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -763,7 +765,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -794,7 +796,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -815,7 +817,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -847,7 +849,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -894,7 +896,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -925,7 +927,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -946,7 +948,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagKeyRequest() ); @@ -964,7 +966,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagKeyRequest() ); @@ -1004,7 +1006,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagKeyRequest() ); @@ -1021,7 +1023,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagKeyRequest() ); @@ -1040,7 +1042,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1062,7 +1064,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1080,7 +1082,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagKeyRequest() ); @@ -1113,7 +1115,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagKeyRequest() ); @@ -1168,7 +1170,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagKeyRequest() ); @@ -1200,7 +1202,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagKeyRequest() ); @@ -1234,7 +1236,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1256,7 +1258,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1274,7 +1276,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagKeyRequest() ); @@ -1306,7 +1308,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagKeyRequest() ); @@ -1360,7 +1362,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagKeyRequest() ); @@ -1391,7 +1393,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagKeyRequest() ); @@ -1424,7 +1426,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1446,7 +1448,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1464,7 +1466,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagKeysRequest() ); @@ -1489,7 +1491,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagKeysRequest() ); @@ -1530,7 +1532,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagKeysRequest() ); @@ -1547,7 +1549,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagKeysRequest() ); @@ -1594,7 +1596,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagKeysRequest() ); @@ -1632,7 +1634,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagKeysRequest() ); @@ -1668,7 +1670,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagKeysRequest() ); @@ -1698,7 +1700,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1777,7 +1779,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1857,7 +1859,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1953,8 +1955,7 @@ describe('v3.TagKeysClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1973,7 +1974,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1982,8 +1983,7 @@ describe('v3.TagKeysClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1999,7 +1999,7 @@ describe('v3.TagKeysClient', () => { }); describe('Path templates', () => { - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { folder: 'folderValue', @@ -2008,7 +2008,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2037,7 +2037,7 @@ describe('v3.TagKeysClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2046,7 +2046,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2075,7 +2075,7 @@ describe('v3.TagKeysClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2084,7 +2084,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2113,7 +2113,7 @@ describe('v3.TagKeysClient', () => { }); }); - describe('tagBinding', () => { + describe('tagBinding', async () => { const fakePath = '/rendered/path/tagBinding'; const expectedParameters = { tag_binding: 'tagBindingValue', @@ -2122,7 +2122,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2151,7 +2151,7 @@ describe('v3.TagKeysClient', () => { }); }); - describe('tagHold', () => { + describe('tagHold', async () => { const fakePath = '/rendered/path/tagHold'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2161,7 +2161,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagHoldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2200,7 +2200,7 @@ describe('v3.TagKeysClient', () => { }); }); - describe('tagKey', () => { + describe('tagKey', async () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { tag_key: 'tagKeyValue', @@ -2209,7 +2209,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2238,7 +2238,7 @@ describe('v3.TagKeysClient', () => { }); }); - describe('tagValue', () => { + describe('tagValue', async () => { const fakePath = '/rendered/path/tagValue'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2247,7 +2247,7 @@ describe('v3.TagKeysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagValuePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts index fa55d3160ea..6776f1023f9 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts @@ -285,7 +285,9 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tagValuesStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagValueRequest() ); @@ -375,7 +377,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagValueRequest() ); @@ -422,7 +424,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagValueRequest() ); @@ -453,7 +455,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetTagValueRequest() ); @@ -474,7 +476,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() ); @@ -492,7 +494,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() ); @@ -525,7 +527,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() ); @@ -545,7 +547,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() ); @@ -564,7 +566,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -595,7 +597,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -642,7 +644,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -673,7 +675,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -694,7 +696,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -725,7 +727,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -772,7 +774,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -803,7 +805,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -824,7 +826,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -856,7 +858,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -903,7 +905,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -934,7 +936,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -955,7 +957,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagValueRequest() ); @@ -974,7 +976,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagValueRequest() ); @@ -1014,7 +1016,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagValueRequest() ); @@ -1031,7 +1033,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.CreateTagValueRequest() ); @@ -1050,7 +1052,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1072,7 +1074,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1093,7 +1095,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagValueRequest() ); @@ -1127,7 +1129,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagValueRequest() ); @@ -1182,7 +1184,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagValueRequest() ); @@ -1214,7 +1216,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.UpdateTagValueRequest() ); @@ -1248,7 +1250,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1270,7 +1272,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1291,7 +1293,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagValueRequest() ); @@ -1324,7 +1326,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagValueRequest() ); @@ -1378,7 +1380,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagValueRequest() ); @@ -1409,7 +1411,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.DeleteTagValueRequest() ); @@ -1442,7 +1444,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1464,7 +1466,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1485,7 +1487,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagValuesRequest() ); @@ -1510,7 +1512,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagValuesRequest() ); @@ -1551,7 +1553,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagValuesRequest() ); @@ -1568,7 +1570,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagValuesRequest() ); @@ -1615,7 +1617,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagValuesRequest() ); @@ -1651,7 +1653,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagValuesRequest() ); @@ -1687,7 +1689,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.resourcemanager.v3.ListTagValuesRequest() ); @@ -1716,7 +1718,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1795,7 +1797,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1875,7 +1877,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1971,8 +1973,7 @@ describe('v3.TagValuesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1991,7 +1992,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2000,8 +2001,7 @@ describe('v3.TagValuesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2017,7 +2017,7 @@ describe('v3.TagValuesClient', () => { }); describe('Path templates', () => { - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { folder: 'folderValue', @@ -2026,7 +2026,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2055,7 +2055,7 @@ describe('v3.TagValuesClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2064,7 +2064,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2093,7 +2093,7 @@ describe('v3.TagValuesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2102,7 +2102,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2131,7 +2131,7 @@ describe('v3.TagValuesClient', () => { }); }); - describe('tagBinding', () => { + describe('tagBinding', async () => { const fakePath = '/rendered/path/tagBinding'; const expectedParameters = { tag_binding: 'tagBindingValue', @@ -2140,7 +2140,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2169,7 +2169,7 @@ describe('v3.TagValuesClient', () => { }); }); - describe('tagHold', () => { + describe('tagHold', async () => { const fakePath = '/rendered/path/tagHold'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2179,7 +2179,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagHoldPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2218,7 +2218,7 @@ describe('v3.TagValuesClient', () => { }); }); - describe('tagKey', () => { + describe('tagKey', async () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { tag_key: 'tagKeyValue', @@ -2227,7 +2227,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2256,7 +2256,7 @@ describe('v3.TagValuesClient', () => { }); }); - describe('tagValue', () => { + describe('tagValue', async () => { const fakePath = '/rendered/path/tagValue'; const expectedParameters = { tag_value: 'tagValueValue', @@ -2265,7 +2265,7 @@ describe('v3.TagValuesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagValuePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/package.json b/packages/google-cloud-retail/package.json index a78ab4ae41c..5bf50ce383d 100644 --- a/packages/google-cloud-retail/package.json +++ b/packages/google-cloud-retail/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json index d51d02d72ba..6740b94d1da 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json index 3e1873c6778..eb684d04a3e 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json index ae4be4439f6..40fc1082191 100644 --- a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json +++ b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json index 8d55992d4e6..a96c8cd91a0 100644 --- a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json +++ b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json index 62229492711..5727069462f 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json index d317df6a9c4..ca6fb4ec77b 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/src/v2/analytics_service_client.ts b/packages/google-cloud-retail/src/v2/analytics_service_client.ts index d0a46519209..072b69f45a7 100644 --- a/packages/google-cloud-retail/src/v2/analytics_service_client.ts +++ b/packages/google-cloud-retail/src/v2/analytics_service_client.ts @@ -575,7 +575,9 @@ export class AnalyticsServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -815,7 +817,7 @@ export class AnalyticsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/catalog_service_client.ts b/packages/google-cloud-retail/src/v2/catalog_service_client.ts index 36ca70376ce..cec37567ad5 100644 --- a/packages/google-cloud-retail/src/v2/catalog_service_client.ts +++ b/packages/google-cloud-retail/src/v2/catalog_service_client.ts @@ -558,7 +558,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'catalog.name': request.catalog!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCatalog request %j', request); const wrappedCallback: | Callback< @@ -721,7 +723,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setDefaultBranch request %j', request); const wrappedCallback: | Callback< @@ -834,7 +838,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDefaultBranch request %j', request); const wrappedCallback: | Callback< @@ -951,7 +957,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCompletionConfig request %j', request); const wrappedCallback: | Callback< @@ -1086,7 +1094,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'completion_config.name': request.completionConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCompletionConfig request %j', request); const wrappedCallback: | Callback< @@ -1206,7 +1216,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttributesConfig request %j', request); const wrappedCallback: | Callback< @@ -1338,7 +1350,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'attributes_config.name': request.attributesConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAttributesConfig request %j', request); const wrappedCallback: | Callback< @@ -1466,7 +1480,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -1591,7 +1607,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -1729,7 +1747,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('replaceCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -1869,7 +1889,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2.IListCatalogsRequest, @@ -1952,7 +1974,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCatalogs stream %j', request); return this.descriptors.page.listCatalogs.createStream( this.innerApiCalls.listCatalogs as GaxCall, @@ -2017,7 +2041,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCatalogs iterate %j', request); return this.descriptors.page.listCatalogs.asyncIterate( this.innerApiCalls['listCatalogs'] as GaxCall, @@ -2197,7 +2223,7 @@ export class CatalogServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/completion_service_client.ts b/packages/google-cloud-retail/src/v2/completion_service_client.ts index 47dd4f715fc..ef1598328e7 100644 --- a/packages/google-cloud-retail/src/v2/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2/completion_service_client.ts @@ -610,7 +610,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< @@ -757,7 +759,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -997,7 +1001,7 @@ export class CompletionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/control_service_client.ts b/packages/google-cloud-retail/src/v2/control_service_client.ts index 02375b1f11c..0e4ffb82ddd 100644 --- a/packages/google-cloud-retail/src/v2/control_service_client.ts +++ b/packages/google-cloud-retail/src/v2/control_service_client.ts @@ -545,7 +545,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createControl request %j', request); const wrappedCallback: | Callback< @@ -659,7 +661,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteControl request %j', request); const wrappedCallback: | Callback< @@ -782,7 +786,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ 'control.name': request.control!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateControl request %j', request); const wrappedCallback: | Callback< @@ -891,7 +897,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getControl request %j', request); const wrappedCallback: | Callback< @@ -1018,7 +1026,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2.IListControlsRequest, @@ -1093,7 +1103,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls stream %j', request); return this.descriptors.page.listControls.createStream( this.innerApiCalls.listControls as GaxCall, @@ -1150,7 +1162,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls iterate %j', request); return this.descriptors.page.listControls.asyncIterate( this.innerApiCalls['listControls'] as GaxCall, @@ -1330,7 +1344,7 @@ export class ControlServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/generative_question_service_client.ts b/packages/google-cloud-retail/src/v2/generative_question_service_client.ts index 6d7d989c42d..981f214360a 100644 --- a/packages/google-cloud-retail/src/v2/generative_question_service_client.ts +++ b/packages/google-cloud-retail/src/v2/generative_question_service_client.ts @@ -540,7 +540,9 @@ export class GenerativeQuestionServiceClient { 'generative_questions_feature_config.catalog': request.generativeQuestionsFeatureConfig!.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateGenerativeQuestionsFeatureConfig request %j', request @@ -676,7 +678,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerativeQuestionsFeatureConfig request %j', request); const wrappedCallback: | Callback< @@ -808,7 +812,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerativeQuestionConfigs request %j', request); const wrappedCallback: | Callback< @@ -942,7 +948,9 @@ export class GenerativeQuestionServiceClient { 'generative_question_config.catalog': request.generativeQuestionConfig!.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerativeQuestionConfig request %j', request); const wrappedCallback: | Callback< @@ -1076,7 +1084,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateGenerativeQuestionConfigs request %j', request); const wrappedCallback: | Callback< @@ -1287,7 +1297,7 @@ export class GenerativeQuestionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/model_service_client.ts b/packages/google-cloud-retail/src/v2/model_service_client.ts index ee9b4ac932e..0ab33eb1036 100644 --- a/packages/google-cloud-retail/src/v2/model_service_client.ts +++ b/packages/google-cloud-retail/src/v2/model_service_client.ts @@ -574,7 +574,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -682,7 +684,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseModel request %j', request); const wrappedCallback: | Callback< @@ -790,7 +794,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeModel request %j', request); const wrappedCallback: | Callback< @@ -898,7 +904,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteModel request %j', request); const wrappedCallback: | Callback< @@ -1010,7 +1018,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ 'model.name': request.model!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateModel request %j', request); const wrappedCallback: | Callback< @@ -1144,7 +1154,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1313,7 +1325,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1471,7 +1485,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2.IListModelsRequest, @@ -1538,7 +1554,9 @@ export class ModelServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -1589,7 +1607,9 @@ export class ModelServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -1769,7 +1789,7 @@ export class ModelServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/prediction_service_client.ts b/packages/google-cloud-retail/src/v2/prediction_service_client.ts index a1346c992ee..383637c1c9d 100644 --- a/packages/google-cloud-retail/src/v2/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2/prediction_service_client.ts @@ -638,7 +638,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ placement: request.placement ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('predict request %j', request); const wrappedCallback: | Callback< @@ -838,7 +840,7 @@ export class PredictionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/product_service_client.ts b/packages/google-cloud-retail/src/v2/product_service_client.ts index a5ab81d3bd0..00dac1cf23a 100644 --- a/packages/google-cloud-retail/src/v2/product_service_client.ts +++ b/packages/google-cloud-retail/src/v2/product_service_client.ts @@ -653,7 +653,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProduct request %j', request); const wrappedCallback: | Callback< @@ -770,7 +772,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProduct request %j', request); const wrappedCallback: | Callback< @@ -904,7 +908,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ 'product.name': request.product!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProduct request %j', request); const wrappedCallback: | Callback< @@ -1034,7 +1040,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProduct request %j', request); const wrappedCallback: | Callback< @@ -1225,7 +1233,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1433,7 +1443,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1724,7 +1736,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ 'inventory.name': request.inventory!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1974,7 +1988,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2219,7 +2235,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2449,7 +2467,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2661,7 +2681,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2884,7 +2906,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2.IListProductsRequest, @@ -3016,7 +3040,9 @@ export class ProductServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -3130,7 +3156,9 @@ export class ProductServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, @@ -3310,7 +3338,7 @@ export class ProductServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/search_service_client.ts b/packages/google-cloud-retail/src/v2/search_service_client.ts index a066d6f09f8..f1a79170526 100644 --- a/packages/google-cloud-retail/src/v2/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2/search_service_client.ts @@ -782,7 +782,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ placement: request.placement ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2.ISearchRequest, @@ -1082,7 +1084,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search stream %j', request); return this.descriptors.page.search.createStream( this.innerApiCalls.search as GaxCall, @@ -1366,7 +1370,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search iterate %j', request); return this.descriptors.page.search.asyncIterate( this.innerApiCalls['search'] as GaxCall, @@ -1546,7 +1552,7 @@ export class SearchServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/serving_config_service_client.ts b/packages/google-cloud-retail/src/v2/serving_config_service_client.ts index b5686c93e29..3cff3f7f035 100644 --- a/packages/google-cloud-retail/src/v2/serving_config_service_client.ts +++ b/packages/google-cloud-retail/src/v2/serving_config_service_client.ts @@ -554,7 +554,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createServingConfig request %j', request); const wrappedCallback: | Callback< @@ -673,7 +675,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteServingConfig request %j', request); const wrappedCallback: | Callback< @@ -797,7 +801,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'serving_config.name': request.servingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateServingConfig request %j', request); const wrappedCallback: | Callback< @@ -910,7 +916,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServingConfig request %j', request); const wrappedCallback: | Callback< @@ -1028,7 +1036,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addControl request %j', request); const wrappedCallback: | Callback< @@ -1143,7 +1153,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeControl request %j', request); const wrappedCallback: | Callback< @@ -1271,7 +1283,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2.IListServingConfigsRequest, @@ -1340,7 +1354,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs stream %j', request); return this.descriptors.page.listServingConfigs.createStream( this.innerApiCalls.listServingConfigs as GaxCall, @@ -1391,7 +1407,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs iterate %j', request); return this.descriptors.page.listServingConfigs.asyncIterate( this.innerApiCalls['listServingConfigs'] as GaxCall, @@ -1571,7 +1589,7 @@ export class ServingConfigServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2/user_event_service_client.ts b/packages/google-cloud-retail/src/v2/user_event_service_client.ts index 0ded2c442ff..2e5fcafface 100644 --- a/packages/google-cloud-retail/src/v2/user_event_service_client.ts +++ b/packages/google-cloud-retail/src/v2/user_event_service_client.ts @@ -563,7 +563,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('writeUserEvent request %j', request); const wrappedCallback: | Callback< @@ -698,7 +700,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('collectUserEvent request %j', request); const wrappedCallback: | Callback< @@ -860,7 +864,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1038,7 +1044,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1218,7 +1226,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1458,7 +1468,7 @@ export class UserEventServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/analytics_service_client.ts b/packages/google-cloud-retail/src/v2alpha/analytics_service_client.ts index 9931a33c7ed..e22deeb69f9 100644 --- a/packages/google-cloud-retail/src/v2alpha/analytics_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/analytics_service_client.ts @@ -593,7 +593,9 @@ export class AnalyticsServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -833,7 +835,7 @@ export class AnalyticsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/branch_service_client.ts b/packages/google-cloud-retail/src/v2alpha/branch_service_client.ts index e61f15ec3ed..c112fff38d6 100644 --- a/packages/google-cloud-retail/src/v2alpha/branch_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/branch_service_client.ts @@ -551,7 +551,9 @@ export class BranchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBranches request %j', request); const wrappedCallback: | Callback< @@ -672,7 +674,9 @@ export class BranchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBranch request %j', request); const wrappedCallback: | Callback< @@ -874,7 +878,7 @@ export class BranchServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts b/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts index 7ef74123153..d076c55f6c3 100644 --- a/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/catalog_service_client.ts @@ -580,7 +580,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'catalog.name': request.catalog!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCatalog request %j', request); const wrappedCallback: | Callback< @@ -749,7 +751,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setDefaultBranch request %j', request); const wrappedCallback: | Callback< @@ -871,7 +875,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDefaultBranch request %j', request); const wrappedCallback: | Callback< @@ -997,7 +1003,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCompletionConfig request %j', request); const wrappedCallback: | Callback< @@ -1142,7 +1150,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'completion_config.name': request.completionConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCompletionConfig request %j', request); const wrappedCallback: | Callback< @@ -1268,7 +1278,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttributesConfig request %j', request); const wrappedCallback: | Callback< @@ -1410,7 +1422,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'attributes_config.name': request.attributesConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAttributesConfig request %j', request); const wrappedCallback: | Callback< @@ -1544,7 +1558,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -1678,7 +1694,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -1811,7 +1829,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchRemoveCatalogAttributes request %j', request); const wrappedCallback: | Callback< @@ -1955,7 +1975,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('replaceCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -2101,7 +2123,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2alpha.IListCatalogsRequest, @@ -2184,7 +2208,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCatalogs stream %j', request); return this.descriptors.page.listCatalogs.createStream( this.innerApiCalls.listCatalogs as GaxCall, @@ -2249,7 +2275,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCatalogs iterate %j', request); return this.descriptors.page.listCatalogs.asyncIterate( this.innerApiCalls['listCatalogs'] as GaxCall, @@ -2429,7 +2457,7 @@ export class CatalogServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts b/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts index f245edb8b97..56d3d80f7f8 100644 --- a/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/completion_service_client.ts @@ -634,7 +634,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< @@ -781,7 +783,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1021,7 +1025,7 @@ export class CompletionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/control_service_client.ts b/packages/google-cloud-retail/src/v2alpha/control_service_client.ts index 011878ef0b8..2ce47ee5ffa 100644 --- a/packages/google-cloud-retail/src/v2alpha/control_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/control_service_client.ts @@ -569,7 +569,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createControl request %j', request); const wrappedCallback: | Callback< @@ -689,7 +691,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteControl request %j', request); const wrappedCallback: | Callback< @@ -818,7 +822,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ 'control.name': request.control!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateControl request %j', request); const wrappedCallback: | Callback< @@ -929,7 +935,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getControl request %j', request); const wrappedCallback: | Callback< @@ -1064,7 +1072,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2alpha.IListControlsRequest, @@ -1139,7 +1149,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls stream %j', request); return this.descriptors.page.listControls.createStream( this.innerApiCalls.listControls as GaxCall, @@ -1196,7 +1208,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls iterate %j', request); return this.descriptors.page.listControls.asyncIterate( this.innerApiCalls['listControls'] as GaxCall, @@ -1376,7 +1390,7 @@ export class ControlServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/generative_question_service_client.ts b/packages/google-cloud-retail/src/v2alpha/generative_question_service_client.ts index 3dcb9ff8514..5afe88bcc78 100644 --- a/packages/google-cloud-retail/src/v2alpha/generative_question_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/generative_question_service_client.ts @@ -558,7 +558,9 @@ export class GenerativeQuestionServiceClient { 'generative_questions_feature_config.catalog': request.generativeQuestionsFeatureConfig!.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateGenerativeQuestionsFeatureConfig request %j', request @@ -694,7 +696,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerativeQuestionsFeatureConfig request %j', request); const wrappedCallback: | Callback< @@ -826,7 +830,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerativeQuestionConfigs request %j', request); const wrappedCallback: | Callback< @@ -960,7 +966,9 @@ export class GenerativeQuestionServiceClient { 'generative_question_config.catalog': request.generativeQuestionConfig!.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerativeQuestionConfig request %j', request); const wrappedCallback: | Callback< @@ -1094,7 +1102,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateGenerativeQuestionConfigs request %j', request); const wrappedCallback: | Callback< @@ -1305,7 +1315,7 @@ export class GenerativeQuestionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts b/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts index 5bcaaee5251..29a8df41813 100644 --- a/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts @@ -572,7 +572,9 @@ export class MerchantCenterAccountLinkServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMerchantCenterAccountLinks request %j', request); const wrappedCallback: | Callback< @@ -708,7 +710,9 @@ export class MerchantCenterAccountLinkServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMerchantCenterAccountLink request %j', request); const wrappedCallback: | Callback< @@ -858,7 +862,9 @@ export class MerchantCenterAccountLinkServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1104,7 +1110,7 @@ export class MerchantCenterAccountLinkServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/model_service_client.ts b/packages/google-cloud-retail/src/v2alpha/model_service_client.ts index 4b4305a4b74..0682ef9b13c 100644 --- a/packages/google-cloud-retail/src/v2alpha/model_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/model_service_client.ts @@ -594,7 +594,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -706,7 +708,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseModel request %j', request); const wrappedCallback: | Callback< @@ -818,7 +822,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeModel request %j', request); const wrappedCallback: | Callback< @@ -930,7 +936,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteModel request %j', request); const wrappedCallback: | Callback< @@ -1047,7 +1055,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ 'model.name': request.model!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateModel request %j', request); const wrappedCallback: | Callback< @@ -1183,7 +1193,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1352,7 +1364,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1512,7 +1526,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2alpha.IListModelsRequest, @@ -1581,7 +1597,9 @@ export class ModelServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -1632,7 +1650,9 @@ export class ModelServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -1812,7 +1832,7 @@ export class ModelServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts b/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts index a1945c44d46..deb94e676e9 100644 --- a/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/prediction_service_client.ts @@ -656,7 +656,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ placement: request.placement ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('predict request %j', request); const wrappedCallback: | Callback< @@ -856,7 +858,7 @@ export class PredictionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/product_service_client.ts b/packages/google-cloud-retail/src/v2alpha/product_service_client.ts index 97276909f1b..8fd04bedb66 100644 --- a/packages/google-cloud-retail/src/v2alpha/product_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/product_service_client.ts @@ -686,7 +686,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProduct request %j', request); const wrappedCallback: | Callback< @@ -805,7 +807,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProduct request %j', request); const wrappedCallback: | Callback< @@ -947,7 +951,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ 'product.name': request.product!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProduct request %j', request); const wrappedCallback: | Callback< @@ -1093,7 +1099,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProduct request %j', request); const wrappedCallback: | Callback< @@ -1285,7 +1293,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1501,7 +1511,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1717,7 +1729,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2008,7 +2022,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ 'inventory.name': request.inventory!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2258,7 +2274,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2503,7 +2521,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2734,7 +2754,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2946,7 +2968,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3185,7 +3209,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2alpha.IListProductsRequest, @@ -3327,7 +3353,9 @@ export class ProductServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -3451,7 +3479,9 @@ export class ProductServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, @@ -3631,7 +3661,7 @@ export class ProductServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/project_service_client.ts b/packages/google-cloud-retail/src/v2alpha/project_service_client.ts index 45eb589a11a..8040d29eae8 100644 --- a/packages/google-cloud-retail/src/v2alpha/project_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/project_service_client.ts @@ -561,7 +561,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProject request %j', request); const wrappedCallback: | Callback< @@ -675,7 +677,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acceptTerms request %j', request); const wrappedCallback: | Callback< @@ -798,7 +802,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnrolledSolutions request %j', request); const wrappedCallback: | Callback< @@ -919,7 +925,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLoggingConfig request %j', request); const wrappedCallback: | Callback< @@ -1062,7 +1070,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ 'logging_config.name': request.loggingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateLoggingConfig request %j', request); const wrappedCallback: | Callback< @@ -1183,7 +1193,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAlertConfig request %j', request); const wrappedCallback: | Callback< @@ -1311,7 +1323,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ 'alert_config.name': request.alertConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAlertConfig request %j', request); const wrappedCallback: | Callback< @@ -1453,7 +1467,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1693,7 +1709,7 @@ export class ProjectServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/search_service_client.ts b/packages/google-cloud-retail/src/v2alpha/search_service_client.ts index 33ffe01329e..7d024965bd9 100644 --- a/packages/google-cloud-retail/src/v2alpha/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/search_service_client.ts @@ -815,7 +815,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ placement: request.placement ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2alpha.ISearchRequest, @@ -1133,7 +1135,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search stream %j', request); return this.descriptors.page.search.createStream( this.innerApiCalls.search as GaxCall, @@ -1435,7 +1439,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search iterate %j', request); return this.descriptors.page.search.asyncIterate( this.innerApiCalls['search'] as GaxCall, @@ -1615,7 +1621,7 @@ export class SearchServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/serving_config_service_client.ts b/packages/google-cloud-retail/src/v2alpha/serving_config_service_client.ts index 3d36615c58e..931b942fbfe 100644 --- a/packages/google-cloud-retail/src/v2alpha/serving_config_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/serving_config_service_client.ts @@ -580,7 +580,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createServingConfig request %j', request); const wrappedCallback: | Callback< @@ -708,7 +710,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteServingConfig request %j', request); const wrappedCallback: | Callback< @@ -841,7 +845,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'serving_config.name': request.servingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateServingConfig request %j', request); const wrappedCallback: | Callback< @@ -963,7 +969,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServingConfig request %j', request); const wrappedCallback: | Callback< @@ -1086,7 +1094,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addControl request %j', request); const wrappedCallback: | Callback< @@ -1209,7 +1219,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeControl request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1349,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2alpha.IListServingConfigsRequest, @@ -1406,7 +1420,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs stream %j', request); return this.descriptors.page.listServingConfigs.createStream( this.innerApiCalls.listServingConfigs as GaxCall, @@ -1457,7 +1473,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs iterate %j', request); return this.descriptors.page.listServingConfigs.asyncIterate( this.innerApiCalls['listServingConfigs'] as GaxCall, @@ -1637,7 +1655,7 @@ export class ServingConfigServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts b/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts index 5055b9e139d..4604260f2a8 100644 --- a/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/user_event_service_client.ts @@ -599,7 +599,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('writeUserEvent request %j', request); const wrappedCallback: | Callback< @@ -740,7 +742,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('collectUserEvent request %j', request); const wrappedCallback: | Callback< @@ -906,7 +910,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1084,7 +1090,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1295,7 +1303,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1475,7 +1485,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1715,7 +1727,7 @@ export class UserEventServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/analytics_service_client.ts b/packages/google-cloud-retail/src/v2beta/analytics_service_client.ts index edf7ef8a3b1..0e9a241cbe9 100644 --- a/packages/google-cloud-retail/src/v2beta/analytics_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/analytics_service_client.ts @@ -578,7 +578,9 @@ export class AnalyticsServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -818,7 +820,7 @@ export class AnalyticsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts b/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts index 191451126fa..b6396b34e49 100644 --- a/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/catalog_service_client.ts @@ -568,7 +568,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'catalog.name': request.catalog!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCatalog request %j', request); const wrappedCallback: | Callback< @@ -737,7 +739,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setDefaultBranch request %j', request); const wrappedCallback: | Callback< @@ -859,7 +863,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDefaultBranch request %j', request); const wrappedCallback: | Callback< @@ -979,7 +985,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCompletionConfig request %j', request); const wrappedCallback: | Callback< @@ -1124,7 +1132,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'completion_config.name': request.completionConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCompletionConfig request %j', request); const wrappedCallback: | Callback< @@ -1244,7 +1254,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttributesConfig request %j', request); const wrappedCallback: | Callback< @@ -1386,7 +1398,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'attributes_config.name': request.attributesConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAttributesConfig request %j', request); const wrappedCallback: | Callback< @@ -1514,7 +1528,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -1648,7 +1664,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -1781,7 +1799,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchRemoveCatalogAttributes request %j', request); const wrappedCallback: | Callback< @@ -1925,7 +1945,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ attributes_config: request.attributesConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('replaceCatalogAttribute request %j', request); const wrappedCallback: | Callback< @@ -2071,7 +2093,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2beta.IListCatalogsRequest, @@ -2154,7 +2178,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCatalogs stream %j', request); return this.descriptors.page.listCatalogs.createStream( this.innerApiCalls.listCatalogs as GaxCall, @@ -2219,7 +2245,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCatalogs iterate %j', request); return this.descriptors.page.listCatalogs.asyncIterate( this.innerApiCalls['listCatalogs'] as GaxCall, @@ -2399,7 +2427,7 @@ export class CatalogServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/completion_service_client.ts b/packages/google-cloud-retail/src/v2beta/completion_service_client.ts index 3dc2220e69c..bb9b4b96a7d 100644 --- a/packages/google-cloud-retail/src/v2beta/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/completion_service_client.ts @@ -619,7 +619,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< @@ -766,7 +768,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1006,7 +1010,7 @@ export class CompletionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/control_service_client.ts b/packages/google-cloud-retail/src/v2beta/control_service_client.ts index 943f7fef1d7..3457bf248bc 100644 --- a/packages/google-cloud-retail/src/v2beta/control_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/control_service_client.ts @@ -554,7 +554,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createControl request %j', request); const wrappedCallback: | Callback< @@ -674,7 +676,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteControl request %j', request); const wrappedCallback: | Callback< @@ -803,7 +807,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ 'control.name': request.control!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateControl request %j', request); const wrappedCallback: | Callback< @@ -914,7 +920,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getControl request %j', request); const wrappedCallback: | Callback< @@ -1049,7 +1057,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2beta.IListControlsRequest, @@ -1124,7 +1134,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls stream %j', request); return this.descriptors.page.listControls.createStream( this.innerApiCalls.listControls as GaxCall, @@ -1181,7 +1193,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls iterate %j', request); return this.descriptors.page.listControls.asyncIterate( this.innerApiCalls['listControls'] as GaxCall, @@ -1361,7 +1375,7 @@ export class ControlServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/generative_question_service_client.ts b/packages/google-cloud-retail/src/v2beta/generative_question_service_client.ts index ae3025359ac..21754aa6e93 100644 --- a/packages/google-cloud-retail/src/v2beta/generative_question_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/generative_question_service_client.ts @@ -543,7 +543,9 @@ export class GenerativeQuestionServiceClient { 'generative_questions_feature_config.catalog': request.generativeQuestionsFeatureConfig!.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateGenerativeQuestionsFeatureConfig request %j', request @@ -679,7 +681,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ catalog: request.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerativeQuestionsFeatureConfig request %j', request); const wrappedCallback: | Callback< @@ -811,7 +815,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerativeQuestionConfigs request %j', request); const wrappedCallback: | Callback< @@ -945,7 +951,9 @@ export class GenerativeQuestionServiceClient { 'generative_question_config.catalog': request.generativeQuestionConfig!.catalog ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerativeQuestionConfig request %j', request); const wrappedCallback: | Callback< @@ -1079,7 +1087,9 @@ export class GenerativeQuestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdateGenerativeQuestionConfigs request %j', request); const wrappedCallback: | Callback< @@ -1290,7 +1300,7 @@ export class GenerativeQuestionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/model_service_client.ts b/packages/google-cloud-retail/src/v2beta/model_service_client.ts index 01fdb1ce673..9bffecb25d6 100644 --- a/packages/google-cloud-retail/src/v2beta/model_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/model_service_client.ts @@ -577,7 +577,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -687,7 +689,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseModel request %j', request); const wrappedCallback: | Callback< @@ -799,7 +803,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeModel request %j', request); const wrappedCallback: | Callback< @@ -911,7 +917,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteModel request %j', request); const wrappedCallback: | Callback< @@ -1028,7 +1036,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ 'model.name': request.model!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateModel request %j', request); const wrappedCallback: | Callback< @@ -1164,7 +1174,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1333,7 +1345,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1493,7 +1507,9 @@ export class ModelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2beta.IListModelsRequest, @@ -1562,7 +1578,9 @@ export class ModelServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -1613,7 +1631,9 @@ export class ModelServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -1793,7 +1813,7 @@ export class ModelServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts b/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts index e7ea9029b7f..39803504ec8 100644 --- a/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/prediction_service_client.ts @@ -641,7 +641,9 @@ export class PredictionServiceClient { this._gaxModule.routingHeader.fromParams({ placement: request.placement ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('predict request %j', request); const wrappedCallback: | Callback< @@ -841,7 +843,7 @@ export class PredictionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/product_service_client.ts b/packages/google-cloud-retail/src/v2beta/product_service_client.ts index 0482d53b38f..ec8045369a5 100644 --- a/packages/google-cloud-retail/src/v2beta/product_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/product_service_client.ts @@ -674,7 +674,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProduct request %j', request); const wrappedCallback: | Callback< @@ -793,7 +795,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProduct request %j', request); const wrappedCallback: | Callback< @@ -935,7 +939,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ 'product.name': request.product!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProduct request %j', request); const wrappedCallback: | Callback< @@ -1072,7 +1078,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProduct request %j', request); const wrappedCallback: | Callback< @@ -1264,7 +1272,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1472,7 +1482,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1688,7 +1700,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1979,7 +1993,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ 'inventory.name': request.inventory!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2229,7 +2245,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2474,7 +2492,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2705,7 +2725,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2917,7 +2939,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ product: request.product ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3148,7 +3172,9 @@ export class ProductServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2beta.IListProductsRequest, @@ -3282,7 +3308,9 @@ export class ProductServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -3398,7 +3426,9 @@ export class ProductServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, @@ -3578,7 +3608,7 @@ export class ProductServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/project_service_client.ts b/packages/google-cloud-retail/src/v2beta/project_service_client.ts index 73e2b452931..21b9b3467a4 100644 --- a/packages/google-cloud-retail/src/v2beta/project_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/project_service_client.ts @@ -525,7 +525,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAlertConfig request %j', request); const wrappedCallback: | Callback< @@ -653,7 +655,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ 'alert_config.name': request.alertConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAlertConfig request %j', request); const wrappedCallback: | Callback< @@ -858,7 +862,7 @@ export class ProjectServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/search_service_client.ts b/packages/google-cloud-retail/src/v2beta/search_service_client.ts index 0d391a7fece..dab8bca1966 100644 --- a/packages/google-cloud-retail/src/v2beta/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/search_service_client.ts @@ -785,7 +785,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ placement: request.placement ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2beta.ISearchRequest, @@ -1085,7 +1087,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search stream %j', request); return this.descriptors.page.search.createStream( this.innerApiCalls.search as GaxCall, @@ -1369,7 +1373,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search iterate %j', request); return this.descriptors.page.search.asyncIterate( this.innerApiCalls['search'] as GaxCall, @@ -1549,7 +1555,7 @@ export class SearchServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/serving_config_service_client.ts b/packages/google-cloud-retail/src/v2beta/serving_config_service_client.ts index 46c8b4eb7be..e4161d4faf4 100644 --- a/packages/google-cloud-retail/src/v2beta/serving_config_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/serving_config_service_client.ts @@ -557,7 +557,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createServingConfig request %j', request); const wrappedCallback: | Callback< @@ -679,7 +681,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteServingConfig request %j', request); const wrappedCallback: | Callback< @@ -806,7 +810,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'serving_config.name': request.servingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateServingConfig request %j', request); const wrappedCallback: | Callback< @@ -928,7 +934,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServingConfig request %j', request); const wrappedCallback: | Callback< @@ -1051,7 +1059,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addControl request %j', request); const wrappedCallback: | Callback< @@ -1174,7 +1184,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeControl request %j', request); const wrappedCallback: | Callback< @@ -1302,7 +1314,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.retail.v2beta.IListServingConfigsRequest, @@ -1371,7 +1385,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs stream %j', request); return this.descriptors.page.listServingConfigs.createStream( this.innerApiCalls.listServingConfigs as GaxCall, @@ -1422,7 +1438,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs iterate %j', request); return this.descriptors.page.listServingConfigs.asyncIterate( this.innerApiCalls['listServingConfigs'] as GaxCall, @@ -1602,7 +1620,7 @@ export class ServingConfigServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts b/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts index 0915c9e1e6f..64c5c5be5b3 100644 --- a/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts +++ b/packages/google-cloud-retail/src/v2beta/user_event_service_client.ts @@ -584,7 +584,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('writeUserEvent request %j', request); const wrappedCallback: | Callback< @@ -725,7 +727,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('collectUserEvent request %j', request); const wrappedCallback: | Callback< @@ -891,7 +895,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1069,7 +1075,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1279,7 +1287,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1459,7 +1469,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1699,7 +1711,7 @@ export class UserEventServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-retail/test/gapic_analytics_service_v2.ts b/packages/google-cloud-retail/test/gapic_analytics_service_v2.ts index 1104902157b..ae6ae73f512 100644 --- a/packages/google-cloud-retail/test/gapic_analytics_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_analytics_service_v2.ts @@ -240,7 +240,9 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.analyticsServiceStub); client.close().then(() => { done(); @@ -299,7 +301,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ExportAnalyticsMetricsRequest() ); @@ -332,7 +334,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ExportAnalyticsMetricsRequest() ); @@ -386,7 +388,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ExportAnalyticsMetricsRequest() ); @@ -420,7 +422,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ExportAnalyticsMetricsRequest() ); @@ -453,7 +455,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -475,7 +477,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -495,7 +497,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -525,7 +527,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -569,7 +571,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -604,7 +606,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -652,7 +654,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -693,7 +695,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -772,7 +774,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -852,7 +854,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -948,8 +950,7 @@ describe('v2.AnalyticsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -968,7 +969,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -977,8 +978,7 @@ describe('v2.AnalyticsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -994,7 +994,7 @@ describe('v2.AnalyticsServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1005,7 +1005,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1061,7 +1061,7 @@ describe('v2.AnalyticsServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1072,7 +1072,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1125,7 +1125,7 @@ describe('v2.AnalyticsServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1136,7 +1136,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1192,7 +1192,7 @@ describe('v2.AnalyticsServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1204,7 +1204,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1268,7 +1268,7 @@ describe('v2.AnalyticsServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1280,7 +1280,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1344,7 +1344,7 @@ describe('v2.AnalyticsServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1357,7 +1357,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1432,7 +1432,7 @@ describe('v2.AnalyticsServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1444,7 +1444,7 @@ describe('v2.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_analytics_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_analytics_service_v2alpha.ts index bd4914587dc..5f17f7f0b58 100644 --- a/packages/google-cloud-retail/test/gapic_analytics_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_analytics_service_v2alpha.ts @@ -245,7 +245,9 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.analyticsServiceStub); client.close().then(() => { done(); @@ -304,7 +306,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportAnalyticsMetricsRequest() ); @@ -337,7 +339,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportAnalyticsMetricsRequest() ); @@ -391,7 +393,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportAnalyticsMetricsRequest() ); @@ -425,7 +427,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportAnalyticsMetricsRequest() ); @@ -458,7 +460,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -480,7 +482,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -500,7 +502,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -530,7 +532,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -574,7 +576,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -609,7 +611,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -657,7 +659,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -698,7 +700,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -777,7 +779,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -857,7 +859,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -953,8 +955,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -973,7 +974,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -982,8 +983,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -999,7 +999,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1008,7 +1008,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1037,7 +1037,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1048,7 +1048,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1104,7 +1104,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1116,7 +1116,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1180,7 +1180,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1191,7 +1191,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1244,7 +1244,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1255,7 +1255,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1311,7 +1311,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1323,7 +1323,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1387,7 +1387,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -1396,7 +1396,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1425,7 +1425,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -1437,7 +1437,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1522,7 +1522,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1534,7 +1534,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1598,7 +1598,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1611,7 +1611,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1686,7 +1686,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -1695,7 +1695,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1724,7 +1724,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1736,7 +1736,7 @@ describe('v2alpha.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_analytics_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_analytics_service_v2beta.ts index 69721261211..18ca4a88731 100644 --- a/packages/google-cloud-retail/test/gapic_analytics_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_analytics_service_v2beta.ts @@ -242,7 +242,9 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.analyticsServiceStub); client.close().then(() => { done(); @@ -301,7 +303,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportAnalyticsMetricsRequest() ); @@ -334,7 +336,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportAnalyticsMetricsRequest() ); @@ -388,7 +390,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportAnalyticsMetricsRequest() ); @@ -422,7 +424,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportAnalyticsMetricsRequest() ); @@ -455,7 +457,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -477,7 +479,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -497,7 +499,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -527,7 +529,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -571,7 +573,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -606,7 +608,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -654,7 +656,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -695,7 +697,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -774,7 +776,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -854,7 +856,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -950,8 +952,7 @@ describe('v2beta.AnalyticsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -970,7 +971,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -979,8 +980,7 @@ describe('v2beta.AnalyticsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -996,7 +996,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1005,7 +1005,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1034,7 +1034,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1045,7 +1045,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1101,7 +1101,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1112,7 +1112,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1165,7 +1165,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1176,7 +1176,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1232,7 +1232,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1244,7 +1244,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1308,7 +1308,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1320,7 +1320,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1384,7 +1384,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1397,7 +1397,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1472,7 +1472,7 @@ describe('v2beta.AnalyticsServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1484,7 +1484,7 @@ describe('v2beta.AnalyticsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_branch_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_branch_service_v2alpha.ts index 91ffb51e540..4c88e4281ef 100644 --- a/packages/google-cloud-retail/test/gapic_branch_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_branch_service_v2alpha.ts @@ -212,7 +212,9 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.branchServiceStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListBranchesRequest() ); @@ -302,7 +304,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListBranchesRequest() ); @@ -349,7 +351,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListBranchesRequest() ); @@ -380,7 +382,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListBranchesRequest() ); @@ -401,7 +403,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetBranchRequest() ); @@ -432,7 +434,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetBranchRequest() ); @@ -479,7 +481,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetBranchRequest() ); @@ -507,7 +509,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetBranchRequest() ); @@ -527,7 +529,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -557,7 +559,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -601,7 +603,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -636,7 +638,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -684,7 +686,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -725,7 +727,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -804,7 +806,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -884,7 +886,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -980,8 +982,7 @@ describe('v2alpha.BranchServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1000,7 +1001,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1009,8 +1010,7 @@ describe('v2alpha.BranchServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1026,7 +1026,7 @@ describe('v2alpha.BranchServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1035,7 +1035,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1064,7 +1064,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1075,7 +1075,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1131,7 +1131,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1143,7 +1143,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1207,7 +1207,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1218,7 +1218,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1271,7 +1271,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1282,7 +1282,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1338,7 +1338,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1350,7 +1350,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1414,7 +1414,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -1423,7 +1423,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1452,7 +1452,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -1464,7 +1464,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1549,7 +1549,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1561,7 +1561,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1625,7 +1625,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1638,7 +1638,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1713,7 +1713,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -1722,7 +1722,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1751,7 +1751,7 @@ describe('v2alpha.BranchServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1763,7 +1763,7 @@ describe('v2alpha.BranchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_catalog_service_v2.ts b/packages/google-cloud-retail/test/gapic_catalog_service_v2.ts index 380f7120a46..938ee4c6d4f 100644 --- a/packages/google-cloud-retail/test/gapic_catalog_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_catalog_service_v2.ts @@ -252,7 +252,9 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.catalogServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCatalogRequest() ); @@ -343,7 +345,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCatalogRequest() ); @@ -391,7 +393,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCatalogRequest() ); @@ -423,7 +425,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCatalogRequest() ); @@ -445,7 +447,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetDefaultBranchRequest() ); @@ -476,7 +478,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetDefaultBranchRequest() ); @@ -523,7 +525,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetDefaultBranchRequest() ); @@ -554,7 +556,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetDefaultBranchRequest() ); @@ -575,7 +577,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetDefaultBranchRequest() ); @@ -606,7 +608,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetDefaultBranchRequest() ); @@ -653,7 +655,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetDefaultBranchRequest() ); @@ -684,7 +686,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetDefaultBranchRequest() ); @@ -705,7 +707,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetCompletionConfigRequest() ); @@ -737,7 +739,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetCompletionConfigRequest() ); @@ -784,7 +786,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetCompletionConfigRequest() ); @@ -815,7 +817,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetCompletionConfigRequest() ); @@ -836,7 +838,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCompletionConfigRequest() ); @@ -869,7 +871,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCompletionConfigRequest() ); @@ -917,7 +919,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCompletionConfigRequest() ); @@ -952,7 +954,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateCompletionConfigRequest() ); @@ -977,7 +979,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetAttributesConfigRequest() ); @@ -1009,7 +1011,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetAttributesConfigRequest() ); @@ -1056,7 +1058,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetAttributesConfigRequest() ); @@ -1087,7 +1089,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetAttributesConfigRequest() ); @@ -1108,7 +1110,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateAttributesConfigRequest() ); @@ -1141,7 +1143,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateAttributesConfigRequest() ); @@ -1189,7 +1191,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateAttributesConfigRequest() ); @@ -1224,7 +1226,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateAttributesConfigRequest() ); @@ -1249,7 +1251,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddCatalogAttributeRequest() ); @@ -1281,7 +1283,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddCatalogAttributeRequest() ); @@ -1328,7 +1330,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddCatalogAttributeRequest() ); @@ -1359,7 +1361,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddCatalogAttributeRequest() ); @@ -1380,7 +1382,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveCatalogAttributeRequest() ); @@ -1412,7 +1414,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveCatalogAttributeRequest() ); @@ -1459,7 +1461,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveCatalogAttributeRequest() ); @@ -1493,7 +1495,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveCatalogAttributeRequest() ); @@ -1517,7 +1519,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ReplaceCatalogAttributeRequest() ); @@ -1549,7 +1551,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ReplaceCatalogAttributeRequest() ); @@ -1596,7 +1598,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ReplaceCatalogAttributeRequest() ); @@ -1630,7 +1632,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ReplaceCatalogAttributeRequest() ); @@ -1654,7 +1656,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListCatalogsRequest() ); @@ -1687,7 +1689,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListCatalogsRequest() ); @@ -1736,7 +1738,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListCatalogsRequest() ); @@ -1767,7 +1769,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListCatalogsRequest() ); @@ -1818,7 +1820,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListCatalogsRequest() ); @@ -1866,7 +1868,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListCatalogsRequest() ); @@ -1909,7 +1911,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListCatalogsRequest() ); @@ -1950,7 +1952,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1980,7 +1982,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2024,7 +2026,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2059,7 +2061,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2107,7 +2109,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2148,7 +2150,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2227,7 +2229,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2307,7 +2309,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2403,8 +2405,7 @@ describe('v2.CatalogServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2423,7 +2424,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2432,8 +2433,7 @@ describe('v2.CatalogServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2449,7 +2449,7 @@ describe('v2.CatalogServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2460,7 +2460,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2516,7 +2516,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -2528,7 +2528,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2592,7 +2592,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2603,7 +2603,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2656,7 +2656,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2667,7 +2667,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2723,7 +2723,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2735,7 +2735,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2799,7 +2799,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2809,7 +2809,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2848,7 +2848,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2860,7 +2860,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2924,7 +2924,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2937,7 +2937,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3012,7 +3012,7 @@ describe('v2.CatalogServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -3024,7 +3024,7 @@ describe('v2.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_catalog_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_catalog_service_v2alpha.ts index 1e7fc779f4a..e28c4c42da7 100644 --- a/packages/google-cloud-retail/test/gapic_catalog_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_catalog_service_v2alpha.ts @@ -253,7 +253,9 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.catalogServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCatalogRequest() ); @@ -344,7 +346,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCatalogRequest() ); @@ -392,7 +394,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCatalogRequest() ); @@ -424,7 +426,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCatalogRequest() ); @@ -446,7 +448,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetDefaultBranchRequest() ); @@ -477,7 +479,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetDefaultBranchRequest() ); @@ -524,7 +526,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetDefaultBranchRequest() ); @@ -555,7 +557,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetDefaultBranchRequest() ); @@ -576,7 +578,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetDefaultBranchRequest() ); @@ -607,7 +609,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetDefaultBranchRequest() ); @@ -654,7 +656,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetDefaultBranchRequest() ); @@ -685,7 +687,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetDefaultBranchRequest() ); @@ -706,7 +708,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetCompletionConfigRequest() ); @@ -738,7 +740,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetCompletionConfigRequest() ); @@ -785,7 +787,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetCompletionConfigRequest() ); @@ -816,7 +818,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetCompletionConfigRequest() ); @@ -837,7 +839,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCompletionConfigRequest() ); @@ -870,7 +872,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCompletionConfigRequest() ); @@ -918,7 +920,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCompletionConfigRequest() ); @@ -953,7 +955,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateCompletionConfigRequest() ); @@ -978,7 +980,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAttributesConfigRequest() ); @@ -1010,7 +1012,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAttributesConfigRequest() ); @@ -1057,7 +1059,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAttributesConfigRequest() ); @@ -1088,7 +1090,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAttributesConfigRequest() ); @@ -1109,7 +1111,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest() ); @@ -1142,7 +1144,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest() ); @@ -1190,7 +1192,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest() ); @@ -1225,7 +1227,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest() ); @@ -1250,7 +1252,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddCatalogAttributeRequest() ); @@ -1282,7 +1284,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddCatalogAttributeRequest() ); @@ -1329,7 +1331,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddCatalogAttributeRequest() ); @@ -1360,7 +1362,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddCatalogAttributeRequest() ); @@ -1381,7 +1383,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveCatalogAttributeRequest() ); @@ -1413,7 +1415,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveCatalogAttributeRequest() ); @@ -1460,7 +1462,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveCatalogAttributeRequest() ); @@ -1494,7 +1496,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveCatalogAttributeRequest() ); @@ -1518,7 +1520,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchRemoveCatalogAttributesRequest() ); @@ -1550,7 +1552,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchRemoveCatalogAttributesRequest() ); @@ -1597,7 +1599,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchRemoveCatalogAttributesRequest() ); @@ -1631,7 +1633,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchRemoveCatalogAttributesRequest() ); @@ -1655,7 +1657,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ReplaceCatalogAttributeRequest() ); @@ -1687,7 +1689,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ReplaceCatalogAttributeRequest() ); @@ -1734,7 +1736,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ReplaceCatalogAttributeRequest() ); @@ -1768,7 +1770,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ReplaceCatalogAttributeRequest() ); @@ -1792,7 +1794,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListCatalogsRequest() ); @@ -1825,7 +1827,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListCatalogsRequest() ); @@ -1874,7 +1876,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListCatalogsRequest() ); @@ -1905,7 +1907,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListCatalogsRequest() ); @@ -1959,7 +1961,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListCatalogsRequest() ); @@ -2010,7 +2012,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListCatalogsRequest() ); @@ -2053,7 +2055,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListCatalogsRequest() ); @@ -2094,7 +2096,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2124,7 +2126,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2168,7 +2170,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2203,7 +2205,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2251,7 +2253,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2292,7 +2294,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2371,7 +2373,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2451,7 +2453,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2547,8 +2549,7 @@ describe('v2alpha.CatalogServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2567,7 +2568,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2576,8 +2577,7 @@ describe('v2alpha.CatalogServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2593,7 +2593,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -2602,7 +2602,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2631,7 +2631,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2642,7 +2642,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2698,7 +2698,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -2710,7 +2710,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2774,7 +2774,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2785,7 +2785,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2838,7 +2838,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2849,7 +2849,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2905,7 +2905,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2917,7 +2917,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2981,7 +2981,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2991,7 +2991,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3030,7 +3030,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -3039,7 +3039,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3068,7 +3068,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -3080,7 +3080,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3165,7 +3165,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -3177,7 +3177,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3241,7 +3241,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -3254,7 +3254,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3329,7 +3329,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -3338,7 +3338,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3367,7 +3367,7 @@ describe('v2alpha.CatalogServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -3379,7 +3379,7 @@ describe('v2alpha.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_catalog_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_catalog_service_v2beta.ts index 0afd3b44f9b..08c02285c1c 100644 --- a/packages/google-cloud-retail/test/gapic_catalog_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_catalog_service_v2beta.ts @@ -252,7 +252,9 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.catalogServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCatalogRequest() ); @@ -343,7 +345,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCatalogRequest() ); @@ -391,7 +393,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCatalogRequest() ); @@ -423,7 +425,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCatalogRequest() ); @@ -445,7 +447,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetDefaultBranchRequest() ); @@ -476,7 +478,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetDefaultBranchRequest() ); @@ -523,7 +525,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetDefaultBranchRequest() ); @@ -554,7 +556,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetDefaultBranchRequest() ); @@ -575,7 +577,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetDefaultBranchRequest() ); @@ -606,7 +608,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetDefaultBranchRequest() ); @@ -653,7 +655,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetDefaultBranchRequest() ); @@ -684,7 +686,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetDefaultBranchRequest() ); @@ -705,7 +707,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetCompletionConfigRequest() ); @@ -737,7 +739,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetCompletionConfigRequest() ); @@ -784,7 +786,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetCompletionConfigRequest() ); @@ -815,7 +817,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetCompletionConfigRequest() ); @@ -836,7 +838,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCompletionConfigRequest() ); @@ -869,7 +871,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCompletionConfigRequest() ); @@ -917,7 +919,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCompletionConfigRequest() ); @@ -952,7 +954,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateCompletionConfigRequest() ); @@ -977,7 +979,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAttributesConfigRequest() ); @@ -1009,7 +1011,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAttributesConfigRequest() ); @@ -1056,7 +1058,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAttributesConfigRequest() ); @@ -1087,7 +1089,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAttributesConfigRequest() ); @@ -1108,7 +1110,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAttributesConfigRequest() ); @@ -1141,7 +1143,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAttributesConfigRequest() ); @@ -1189,7 +1191,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAttributesConfigRequest() ); @@ -1224,7 +1226,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAttributesConfigRequest() ); @@ -1249,7 +1251,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddCatalogAttributeRequest() ); @@ -1281,7 +1283,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddCatalogAttributeRequest() ); @@ -1328,7 +1330,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddCatalogAttributeRequest() ); @@ -1359,7 +1361,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddCatalogAttributeRequest() ); @@ -1380,7 +1382,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest() ); @@ -1412,7 +1414,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest() ); @@ -1459,7 +1461,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest() ); @@ -1493,7 +1495,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest() ); @@ -1517,7 +1519,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest() ); @@ -1549,7 +1551,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest() ); @@ -1596,7 +1598,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest() ); @@ -1630,7 +1632,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest() ); @@ -1654,7 +1656,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest() ); @@ -1686,7 +1688,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest() ); @@ -1733,7 +1735,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest() ); @@ -1767,7 +1769,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest() ); @@ -1791,7 +1793,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListCatalogsRequest() ); @@ -1824,7 +1826,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListCatalogsRequest() ); @@ -1873,7 +1875,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListCatalogsRequest() ); @@ -1904,7 +1906,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListCatalogsRequest() ); @@ -1958,7 +1960,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListCatalogsRequest() ); @@ -2009,7 +2011,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListCatalogsRequest() ); @@ -2052,7 +2054,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListCatalogsRequest() ); @@ -2093,7 +2095,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2123,7 +2125,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2167,7 +2169,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2202,7 +2204,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2250,7 +2252,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2291,7 +2293,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2370,7 +2372,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2450,7 +2452,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2546,8 +2548,7 @@ describe('v2beta.CatalogServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2566,7 +2567,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2575,8 +2576,7 @@ describe('v2beta.CatalogServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2592,7 +2592,7 @@ describe('v2beta.CatalogServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -2601,7 +2601,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2630,7 +2630,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2641,7 +2641,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2697,7 +2697,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -2709,7 +2709,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2773,7 +2773,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2784,7 +2784,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2837,7 +2837,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2848,7 +2848,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2904,7 +2904,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2916,7 +2916,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2980,7 +2980,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2990,7 +2990,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3029,7 +3029,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -3041,7 +3041,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3105,7 +3105,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -3118,7 +3118,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3193,7 +3193,7 @@ describe('v2beta.CatalogServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -3205,7 +3205,7 @@ describe('v2beta.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_completion_service_v2.ts b/packages/google-cloud-retail/test/gapic_completion_service_v2.ts index 0f80ebb8d0f..e40384d0304 100644 --- a/packages/google-cloud-retail/test/gapic_completion_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_completion_service_v2.ts @@ -250,7 +250,9 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionServiceStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CompleteQueryRequest() ); @@ -340,7 +342,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CompleteQueryRequest() ); @@ -387,7 +389,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CompleteQueryRequest() ); @@ -418,7 +420,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CompleteQueryRequest() ); @@ -439,7 +441,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportCompletionDataRequest() ); @@ -472,7 +474,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportCompletionDataRequest() ); @@ -526,7 +528,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportCompletionDataRequest() ); @@ -557,7 +559,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportCompletionDataRequest() ); @@ -590,7 +592,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -612,7 +614,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -632,7 +634,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -662,7 +664,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -706,7 +708,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -741,7 +743,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -789,7 +791,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -830,7 +832,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -909,7 +911,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -989,7 +991,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1085,8 +1087,7 @@ describe('v2.CompletionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1105,7 +1106,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1114,8 +1115,7 @@ describe('v2.CompletionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1131,7 +1131,7 @@ describe('v2.CompletionServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1142,7 +1142,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1198,7 +1198,7 @@ describe('v2.CompletionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1209,7 +1209,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1262,7 +1262,7 @@ describe('v2.CompletionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1273,7 +1273,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1329,7 +1329,7 @@ describe('v2.CompletionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1341,7 +1341,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1405,7 +1405,7 @@ describe('v2.CompletionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1417,7 +1417,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1481,7 +1481,7 @@ describe('v2.CompletionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1494,7 +1494,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1569,7 +1569,7 @@ describe('v2.CompletionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1581,7 +1581,7 @@ describe('v2.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_completion_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_completion_service_v2alpha.ts index cdb83b3cb07..6ef801d6a57 100644 --- a/packages/google-cloud-retail/test/gapic_completion_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_completion_service_v2alpha.ts @@ -259,7 +259,9 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionServiceStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CompleteQueryRequest() ); @@ -354,7 +356,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CompleteQueryRequest() ); @@ -402,7 +404,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CompleteQueryRequest() ); @@ -434,7 +436,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CompleteQueryRequest() ); @@ -456,7 +458,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportCompletionDataRequest() ); @@ -490,7 +492,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportCompletionDataRequest() ); @@ -545,7 +547,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportCompletionDataRequest() ); @@ -577,7 +579,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportCompletionDataRequest() ); @@ -611,7 +613,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -634,7 +636,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -655,7 +657,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -686,7 +688,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -731,7 +733,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -767,7 +769,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -816,7 +818,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -858,7 +860,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -940,7 +942,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1023,7 +1025,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1122,8 +1124,7 @@ describe('v2alpha.CompletionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1143,7 +1144,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1152,8 +1153,7 @@ describe('v2alpha.CompletionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1169,7 +1169,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1179,7 +1179,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1208,7 +1208,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1220,7 +1220,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1276,7 +1276,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1289,7 +1289,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1353,7 +1353,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1365,7 +1365,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1418,7 +1418,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1430,7 +1430,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1486,7 +1486,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1499,7 +1499,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1563,7 +1563,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -1573,7 +1573,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1602,7 +1602,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -1615,7 +1615,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1700,7 +1700,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1713,7 +1713,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1777,7 +1777,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1791,7 +1791,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1866,7 +1866,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -1876,7 +1876,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1905,7 +1905,7 @@ describe('v2alpha.CompletionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1918,7 +1918,7 @@ describe('v2alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_completion_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_completion_service_v2beta.ts index 5c4f7c91e72..848c010b063 100644 --- a/packages/google-cloud-retail/test/gapic_completion_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_completion_service_v2beta.ts @@ -260,7 +260,9 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionServiceStub); client.close().then(() => { done(); @@ -327,7 +329,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CompleteQueryRequest() ); @@ -360,7 +362,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CompleteQueryRequest() ); @@ -409,7 +411,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CompleteQueryRequest() ); @@ -442,7 +444,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CompleteQueryRequest() ); @@ -465,7 +467,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportCompletionDataRequest() ); @@ -500,7 +502,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportCompletionDataRequest() ); @@ -556,7 +558,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportCompletionDataRequest() ); @@ -589,7 +591,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportCompletionDataRequest() ); @@ -624,7 +626,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -648,7 +650,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -670,7 +672,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -702,7 +704,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -748,7 +750,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -785,7 +787,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -835,7 +837,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -878,7 +880,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -963,7 +965,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1049,7 +1051,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1151,8 +1153,7 @@ describe('v2beta.CompletionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1173,7 +1174,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1182,8 +1183,7 @@ describe('v2beta.CompletionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1199,7 +1199,7 @@ describe('v2beta.CompletionServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1210,7 +1210,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1239,7 +1239,7 @@ describe('v2beta.CompletionServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1252,7 +1252,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1308,7 +1308,7 @@ describe('v2beta.CompletionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1321,7 +1321,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1374,7 +1374,7 @@ describe('v2beta.CompletionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1387,7 +1387,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1443,7 +1443,7 @@ describe('v2beta.CompletionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1457,7 +1457,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1521,7 +1521,7 @@ describe('v2beta.CompletionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1535,7 +1535,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1599,7 +1599,7 @@ describe('v2beta.CompletionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1614,7 +1614,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1689,7 +1689,7 @@ describe('v2beta.CompletionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1703,7 +1703,7 @@ describe('v2beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_control_service_v2.ts b/packages/google-cloud-retail/test/gapic_control_service_v2.ts index 5f8e79fa2bb..c5f23d18dca 100644 --- a/packages/google-cloud-retail/test/gapic_control_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_control_service_v2.ts @@ -252,7 +252,9 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.controlServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateControlRequest() ); @@ -342,7 +344,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateControlRequest() ); @@ -389,7 +391,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateControlRequest() ); @@ -420,7 +422,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateControlRequest() ); @@ -441,7 +443,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteControlRequest() ); @@ -472,7 +474,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteControlRequest() ); @@ -519,7 +521,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteControlRequest() ); @@ -550,7 +552,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteControlRequest() ); @@ -571,7 +573,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateControlRequest() ); @@ -603,7 +605,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateControlRequest() ); @@ -651,7 +653,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateControlRequest() ); @@ -683,7 +685,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateControlRequest() ); @@ -705,7 +707,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetControlRequest() ); @@ -736,7 +738,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetControlRequest() ); @@ -783,7 +785,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetControlRequest() ); @@ -814,7 +816,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetControlRequest() ); @@ -835,7 +837,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListControlsRequest() ); @@ -868,7 +870,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListControlsRequest() ); @@ -917,7 +919,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListControlsRequest() ); @@ -948,7 +950,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListControlsRequest() ); @@ -999,7 +1001,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListControlsRequest() ); @@ -1047,7 +1049,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListControlsRequest() ); @@ -1090,7 +1092,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListControlsRequest() ); @@ -1131,7 +1133,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1161,7 +1163,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1205,7 +1207,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1240,7 +1242,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1288,7 +1290,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1329,7 +1331,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1408,7 +1410,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1488,7 +1490,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1584,8 +1586,7 @@ describe('v2.ControlServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1604,7 +1605,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1613,8 +1614,7 @@ describe('v2.ControlServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1630,7 +1630,7 @@ describe('v2.ControlServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1641,7 +1641,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1697,7 +1697,7 @@ describe('v2.ControlServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1708,7 +1708,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1761,7 +1761,7 @@ describe('v2.ControlServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1772,7 +1772,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1828,7 +1828,7 @@ describe('v2.ControlServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1840,7 +1840,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1904,7 +1904,7 @@ describe('v2.ControlServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1916,7 +1916,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1980,7 +1980,7 @@ describe('v2.ControlServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1993,7 +1993,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2068,7 +2068,7 @@ describe('v2.ControlServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2080,7 +2080,7 @@ describe('v2.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_control_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_control_service_v2alpha.ts index a47a3543f08..50ff7183c05 100644 --- a/packages/google-cloud-retail/test/gapic_control_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_control_service_v2alpha.ts @@ -253,7 +253,9 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.controlServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateControlRequest() ); @@ -343,7 +345,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateControlRequest() ); @@ -390,7 +392,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateControlRequest() ); @@ -421,7 +423,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateControlRequest() ); @@ -442,7 +444,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteControlRequest() ); @@ -473,7 +475,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteControlRequest() ); @@ -520,7 +522,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteControlRequest() ); @@ -551,7 +553,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteControlRequest() ); @@ -572,7 +574,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateControlRequest() ); @@ -604,7 +606,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateControlRequest() ); @@ -652,7 +654,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateControlRequest() ); @@ -684,7 +686,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateControlRequest() ); @@ -706,7 +708,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetControlRequest() ); @@ -737,7 +739,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetControlRequest() ); @@ -784,7 +786,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetControlRequest() ); @@ -815,7 +817,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetControlRequest() ); @@ -836,7 +838,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListControlsRequest() ); @@ -869,7 +871,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListControlsRequest() ); @@ -918,7 +920,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListControlsRequest() ); @@ -949,7 +951,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListControlsRequest() ); @@ -1003,7 +1005,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListControlsRequest() ); @@ -1054,7 +1056,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListControlsRequest() ); @@ -1097,7 +1099,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListControlsRequest() ); @@ -1138,7 +1140,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1168,7 +1170,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1212,7 +1214,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1247,7 +1249,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1295,7 +1297,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1336,7 +1338,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1415,7 +1417,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1495,7 +1497,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1591,8 +1593,7 @@ describe('v2alpha.ControlServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1611,7 +1612,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1620,8 +1621,7 @@ describe('v2alpha.ControlServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1637,7 +1637,7 @@ describe('v2alpha.ControlServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1646,7 +1646,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1675,7 +1675,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1686,7 +1686,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1742,7 +1742,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1754,7 +1754,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1818,7 +1818,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1829,7 +1829,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1882,7 +1882,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1893,7 +1893,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1949,7 +1949,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1961,7 +1961,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2025,7 +2025,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -2034,7 +2034,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2063,7 +2063,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -2075,7 +2075,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2160,7 +2160,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2172,7 +2172,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2236,7 +2236,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2249,7 +2249,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2324,7 +2324,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -2333,7 +2333,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2362,7 +2362,7 @@ describe('v2alpha.ControlServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2374,7 +2374,7 @@ describe('v2alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_control_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_control_service_v2beta.ts index b88df34f80a..2b59c62b842 100644 --- a/packages/google-cloud-retail/test/gapic_control_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_control_service_v2beta.ts @@ -252,7 +252,9 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.controlServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateControlRequest() ); @@ -342,7 +344,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateControlRequest() ); @@ -389,7 +391,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateControlRequest() ); @@ -420,7 +422,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateControlRequest() ); @@ -441,7 +443,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteControlRequest() ); @@ -472,7 +474,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteControlRequest() ); @@ -519,7 +521,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteControlRequest() ); @@ -550,7 +552,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteControlRequest() ); @@ -571,7 +573,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateControlRequest() ); @@ -603,7 +605,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateControlRequest() ); @@ -651,7 +653,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateControlRequest() ); @@ -683,7 +685,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateControlRequest() ); @@ -705,7 +707,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetControlRequest() ); @@ -736,7 +738,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetControlRequest() ); @@ -783,7 +785,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetControlRequest() ); @@ -814,7 +816,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetControlRequest() ); @@ -835,7 +837,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListControlsRequest() ); @@ -868,7 +870,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListControlsRequest() ); @@ -917,7 +919,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListControlsRequest() ); @@ -948,7 +950,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListControlsRequest() ); @@ -1002,7 +1004,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListControlsRequest() ); @@ -1053,7 +1055,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListControlsRequest() ); @@ -1096,7 +1098,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListControlsRequest() ); @@ -1137,7 +1139,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1167,7 +1169,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1211,7 +1213,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1246,7 +1248,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1294,7 +1296,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1335,7 +1337,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1414,7 +1416,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1494,7 +1496,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1590,8 +1592,7 @@ describe('v2beta.ControlServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1610,7 +1611,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1619,8 +1620,7 @@ describe('v2beta.ControlServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1636,7 +1636,7 @@ describe('v2beta.ControlServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1645,7 +1645,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1674,7 +1674,7 @@ describe('v2beta.ControlServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1685,7 +1685,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1741,7 +1741,7 @@ describe('v2beta.ControlServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1752,7 +1752,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1805,7 +1805,7 @@ describe('v2beta.ControlServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1816,7 +1816,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1872,7 +1872,7 @@ describe('v2beta.ControlServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1884,7 +1884,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1948,7 +1948,7 @@ describe('v2beta.ControlServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1960,7 +1960,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2024,7 +2024,7 @@ describe('v2beta.ControlServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2037,7 +2037,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2112,7 +2112,7 @@ describe('v2beta.ControlServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2124,7 +2124,7 @@ describe('v2beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_generative_question_service_v2.ts b/packages/google-cloud-retail/test/gapic_generative_question_service_v2.ts index 69d3064aeee..563516345ea 100644 --- a/packages/google-cloud-retail/test/gapic_generative_question_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_generative_question_service_v2.ts @@ -225,7 +225,9 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generativeQuestionServiceStub); client.close().then(() => { done(); @@ -288,7 +290,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -323,7 +325,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -372,7 +374,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -406,7 +408,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -432,7 +434,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -466,7 +468,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -514,7 +516,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -549,7 +551,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -574,7 +576,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListGenerativeQuestionConfigsRequest() ); @@ -607,7 +609,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListGenerativeQuestionConfigsRequest() ); @@ -655,7 +657,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListGenerativeQuestionConfigsRequest() ); @@ -690,7 +692,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListGenerativeQuestionConfigsRequest() ); @@ -715,7 +717,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionConfigRequest() ); @@ -749,7 +751,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionConfigRequest() ); @@ -798,7 +800,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionConfigRequest() ); @@ -834,7 +836,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateGenerativeQuestionConfigRequest() ); @@ -860,7 +862,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -894,7 +896,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -942,7 +944,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -975,7 +977,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -999,7 +1001,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1030,7 +1032,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1075,7 +1077,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1111,7 +1113,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1160,7 +1162,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1202,7 +1204,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1284,7 +1286,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1367,7 +1369,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1466,8 +1468,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1487,7 +1488,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1496,8 +1497,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1513,7 +1513,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1525,7 +1525,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1581,7 +1581,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1593,7 +1593,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1646,7 +1646,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1658,7 +1658,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1714,7 +1714,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1727,7 +1727,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1791,7 +1791,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1804,7 +1804,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1868,7 +1868,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1882,7 +1882,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1957,7 +1957,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1970,7 +1970,7 @@ describe('v2.GenerativeQuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_generative_question_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_generative_question_service_v2alpha.ts index eb3d30f1daa..bc0537c3cd0 100644 --- a/packages/google-cloud-retail/test/gapic_generative_question_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_generative_question_service_v2alpha.ts @@ -231,7 +231,9 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generativeQuestionServiceStub); client.close().then(() => { done(); @@ -302,7 +304,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -339,7 +341,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -390,7 +392,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -426,7 +428,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -454,7 +456,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -490,7 +492,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -540,7 +542,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -577,7 +579,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -604,7 +606,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListGenerativeQuestionConfigsRequest() ); @@ -639,7 +641,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListGenerativeQuestionConfigsRequest() ); @@ -689,7 +691,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListGenerativeQuestionConfigsRequest() ); @@ -726,7 +728,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListGenerativeQuestionConfigsRequest() ); @@ -753,7 +755,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionConfigRequest() ); @@ -789,7 +791,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionConfigRequest() ); @@ -840,7 +842,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionConfigRequest() ); @@ -878,7 +880,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateGenerativeQuestionConfigRequest() ); @@ -906,7 +908,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -942,7 +944,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -992,7 +994,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -1027,7 +1029,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -1053,7 +1055,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1086,7 +1088,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1133,7 +1135,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1171,7 +1173,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1222,7 +1224,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1266,7 +1268,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1354,7 +1356,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1443,7 +1445,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1548,8 +1550,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1571,7 +1572,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1580,8 +1581,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1597,7 +1597,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1609,7 +1609,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1638,7 +1638,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1652,7 +1652,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1708,7 +1708,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1723,7 +1723,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1787,7 +1787,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1801,7 +1801,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1854,7 +1854,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1868,7 +1868,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1924,7 +1924,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1939,7 +1939,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2003,7 +2003,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -2015,7 +2015,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2044,7 +2044,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -2059,7 +2059,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2144,7 +2144,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2159,7 +2159,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2223,7 +2223,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2239,7 +2239,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2314,7 +2314,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -2326,7 +2326,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2355,7 +2355,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2370,7 +2370,7 @@ describe('v2alpha.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_generative_question_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_generative_question_service_v2beta.ts index b3d69c496dd..ebf4f792b6f 100644 --- a/packages/google-cloud-retail/test/gapic_generative_question_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_generative_question_service_v2beta.ts @@ -231,7 +231,9 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generativeQuestionServiceStub); client.close().then(() => { done(); @@ -302,7 +304,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -339,7 +341,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -390,7 +392,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -426,7 +428,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionsFeatureConfigRequest() ); @@ -454,7 +456,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -490,7 +492,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -540,7 +542,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -577,7 +579,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetGenerativeQuestionsFeatureConfigRequest() ); @@ -604,7 +606,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListGenerativeQuestionConfigsRequest() ); @@ -639,7 +641,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListGenerativeQuestionConfigsRequest() ); @@ -689,7 +691,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListGenerativeQuestionConfigsRequest() ); @@ -726,7 +728,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListGenerativeQuestionConfigsRequest() ); @@ -753,7 +755,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionConfigRequest() ); @@ -789,7 +791,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionConfigRequest() ); @@ -840,7 +842,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionConfigRequest() ); @@ -878,7 +880,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateGenerativeQuestionConfigRequest() ); @@ -906,7 +908,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -942,7 +944,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -992,7 +994,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -1027,7 +1029,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.BatchUpdateGenerativeQuestionConfigsRequest() ); @@ -1053,7 +1055,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1086,7 +1088,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1133,7 +1135,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1171,7 +1173,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1222,7 +1224,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1266,7 +1268,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1354,7 +1356,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1443,7 +1445,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1548,8 +1550,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1571,7 +1572,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1580,8 +1581,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1597,7 +1597,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1609,7 +1609,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1638,7 +1638,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1652,7 +1652,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1708,7 +1708,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1722,7 +1722,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1775,7 +1775,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1789,7 +1789,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1845,7 +1845,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1860,7 +1860,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1924,7 +1924,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1939,7 +1939,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2003,7 +2003,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2019,7 +2019,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2094,7 +2094,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2109,7 +2109,7 @@ describe('v2beta.GenerativeQuestionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts index 45d89e1730f..5213a7ce463 100644 --- a/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts @@ -271,7 +271,9 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.merchantCenterAccountLinkServiceStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest() ); @@ -380,7 +382,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest() ); @@ -430,7 +432,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest() ); @@ -467,7 +469,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListMerchantCenterAccountLinksRequest() ); @@ -494,7 +496,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest() ); @@ -529,7 +531,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest() ); @@ -579,7 +581,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest() ); @@ -616,7 +618,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteMerchantCenterAccountLinkRequest() ); @@ -643,7 +645,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); @@ -679,7 +681,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); @@ -736,7 +738,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); @@ -771,7 +773,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); @@ -804,7 +806,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -830,7 +832,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -853,7 +855,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -886,7 +888,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -933,7 +935,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -971,7 +973,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1022,7 +1024,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1066,7 +1068,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1154,7 +1156,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1243,7 +1245,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1348,8 +1350,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1371,7 +1372,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1380,8 +1381,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1397,7 +1397,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1409,7 +1409,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1438,7 +1438,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1452,7 +1452,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1508,7 +1508,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1523,7 +1523,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1587,7 +1587,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1601,7 +1601,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1654,7 +1654,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1668,7 +1668,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1724,7 +1724,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1739,7 +1739,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1803,7 +1803,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -1815,7 +1815,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1844,7 +1844,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -1859,7 +1859,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1944,7 +1944,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1959,7 +1959,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2023,7 +2023,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2039,7 +2039,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2114,7 +2114,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -2126,7 +2126,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2155,7 +2155,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2170,7 +2170,7 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_model_service_v2.ts b/packages/google-cloud-retail/test/gapic_model_service_v2.ts index 61aa20ab386..06a06b3c78d 100644 --- a/packages/google-cloud-retail/test/gapic_model_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_model_service_v2.ts @@ -289,7 +289,9 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetModelRequest() ); @@ -379,7 +381,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetModelRequest() ); @@ -426,7 +428,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetModelRequest() ); @@ -454,7 +456,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetModelRequest() ); @@ -475,7 +477,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PauseModelRequest() ); @@ -506,7 +508,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PauseModelRequest() ); @@ -553,7 +555,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PauseModelRequest() ); @@ -584,7 +586,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PauseModelRequest() ); @@ -605,7 +607,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ResumeModelRequest() ); @@ -636,7 +638,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ResumeModelRequest() ); @@ -683,7 +685,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ResumeModelRequest() ); @@ -714,7 +716,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ResumeModelRequest() ); @@ -735,7 +737,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteModelRequest() ); @@ -766,7 +768,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteModelRequest() ); @@ -813,7 +815,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteModelRequest() ); @@ -844,7 +846,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteModelRequest() ); @@ -865,7 +867,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateModelRequest() ); @@ -897,7 +899,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateModelRequest() ); @@ -945,7 +947,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateModelRequest() ); @@ -977,7 +979,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateModelRequest() ); @@ -999,7 +1001,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateModelRequest() ); @@ -1031,7 +1033,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateModelRequest() ); @@ -1085,7 +1087,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateModelRequest() ); @@ -1116,7 +1118,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateModelRequest() ); @@ -1149,7 +1151,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1171,7 +1173,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1189,7 +1191,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.TuneModelRequest() ); @@ -1221,7 +1223,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.TuneModelRequest() ); @@ -1275,7 +1277,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.TuneModelRequest() ); @@ -1306,7 +1308,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.TuneModelRequest() ); @@ -1339,7 +1341,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1361,7 +1363,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1379,7 +1381,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListModelsRequest() ); @@ -1412,7 +1414,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListModelsRequest() ); @@ -1461,7 +1463,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListModelsRequest() ); @@ -1492,7 +1494,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListModelsRequest() ); @@ -1543,7 +1545,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListModelsRequest() ); @@ -1591,7 +1593,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListModelsRequest() ); @@ -1634,7 +1636,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListModelsRequest() ); @@ -1677,7 +1679,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1707,7 +1709,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1751,7 +1753,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1786,7 +1788,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1834,7 +1836,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1875,7 +1877,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1954,7 +1956,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2034,7 +2036,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2130,8 +2132,7 @@ describe('v2.ModelServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2150,7 +2151,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2159,8 +2160,7 @@ describe('v2.ModelServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2176,7 +2176,7 @@ describe('v2.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2187,7 +2187,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2243,7 +2243,7 @@ describe('v2.ModelServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2254,7 +2254,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2307,7 +2307,7 @@ describe('v2.ModelServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2318,7 +2318,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2374,7 +2374,7 @@ describe('v2.ModelServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2386,7 +2386,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2450,7 +2450,7 @@ describe('v2.ModelServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2462,7 +2462,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2526,7 +2526,7 @@ describe('v2.ModelServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2539,7 +2539,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2614,7 +2614,7 @@ describe('v2.ModelServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2626,7 +2626,7 @@ describe('v2.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_model_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_model_service_v2alpha.ts index cdcd6f6b421..b4bb34ef47d 100644 --- a/packages/google-cloud-retail/test/gapic_model_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_model_service_v2alpha.ts @@ -289,7 +289,9 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetModelRequest() ); @@ -379,7 +381,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetModelRequest() ); @@ -426,7 +428,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetModelRequest() ); @@ -454,7 +456,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetModelRequest() ); @@ -475,7 +477,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PauseModelRequest() ); @@ -506,7 +508,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PauseModelRequest() ); @@ -553,7 +555,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PauseModelRequest() ); @@ -584,7 +586,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PauseModelRequest() ); @@ -605,7 +607,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ResumeModelRequest() ); @@ -636,7 +638,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ResumeModelRequest() ); @@ -683,7 +685,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ResumeModelRequest() ); @@ -714,7 +716,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ResumeModelRequest() ); @@ -735,7 +737,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteModelRequest() ); @@ -766,7 +768,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteModelRequest() ); @@ -813,7 +815,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteModelRequest() ); @@ -844,7 +846,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteModelRequest() ); @@ -865,7 +867,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateModelRequest() ); @@ -897,7 +899,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateModelRequest() ); @@ -945,7 +947,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateModelRequest() ); @@ -977,7 +979,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateModelRequest() ); @@ -999,7 +1001,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateModelRequest() ); @@ -1031,7 +1033,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateModelRequest() ); @@ -1085,7 +1087,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateModelRequest() ); @@ -1116,7 +1118,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateModelRequest() ); @@ -1149,7 +1151,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1171,7 +1173,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1189,7 +1191,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.TuneModelRequest() ); @@ -1221,7 +1223,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.TuneModelRequest() ); @@ -1275,7 +1277,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.TuneModelRequest() ); @@ -1306,7 +1308,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.TuneModelRequest() ); @@ -1339,7 +1341,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1361,7 +1363,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1379,7 +1381,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListModelsRequest() ); @@ -1412,7 +1414,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListModelsRequest() ); @@ -1461,7 +1463,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListModelsRequest() ); @@ -1492,7 +1494,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListModelsRequest() ); @@ -1546,7 +1548,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListModelsRequest() ); @@ -1597,7 +1599,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListModelsRequest() ); @@ -1640,7 +1642,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListModelsRequest() ); @@ -1683,7 +1685,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1713,7 +1715,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1757,7 +1759,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1792,7 +1794,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1840,7 +1842,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1881,7 +1883,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1960,7 +1962,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2040,7 +2042,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2136,8 +2138,7 @@ describe('v2alpha.ModelServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2156,7 +2157,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2165,8 +2166,7 @@ describe('v2alpha.ModelServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2182,7 +2182,7 @@ describe('v2alpha.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -2191,7 +2191,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2220,7 +2220,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2231,7 +2231,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2287,7 +2287,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -2299,7 +2299,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2363,7 +2363,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2374,7 +2374,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2427,7 +2427,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2438,7 +2438,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2494,7 +2494,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2506,7 +2506,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2570,7 +2570,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -2579,7 +2579,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2608,7 +2608,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -2620,7 +2620,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2705,7 +2705,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2717,7 +2717,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2781,7 +2781,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2794,7 +2794,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2869,7 +2869,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -2878,7 +2878,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2907,7 +2907,7 @@ describe('v2alpha.ModelServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2919,7 +2919,7 @@ describe('v2alpha.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_model_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_model_service_v2beta.ts index 96400a284e6..5932b1a3f21 100644 --- a/packages/google-cloud-retail/test/gapic_model_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_model_service_v2beta.ts @@ -289,7 +289,9 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.modelServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetModelRequest() ); @@ -379,7 +381,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetModelRequest() ); @@ -426,7 +428,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetModelRequest() ); @@ -454,7 +456,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetModelRequest() ); @@ -475,7 +477,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PauseModelRequest() ); @@ -506,7 +508,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PauseModelRequest() ); @@ -553,7 +555,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PauseModelRequest() ); @@ -584,7 +586,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PauseModelRequest() ); @@ -605,7 +607,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ResumeModelRequest() ); @@ -636,7 +638,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ResumeModelRequest() ); @@ -683,7 +685,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ResumeModelRequest() ); @@ -714,7 +716,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ResumeModelRequest() ); @@ -735,7 +737,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteModelRequest() ); @@ -766,7 +768,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteModelRequest() ); @@ -813,7 +815,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteModelRequest() ); @@ -844,7 +846,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteModelRequest() ); @@ -865,7 +867,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateModelRequest() ); @@ -897,7 +899,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateModelRequest() ); @@ -945,7 +947,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateModelRequest() ); @@ -977,7 +979,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateModelRequest() ); @@ -999,7 +1001,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateModelRequest() ); @@ -1031,7 +1033,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateModelRequest() ); @@ -1085,7 +1087,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateModelRequest() ); @@ -1116,7 +1118,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateModelRequest() ); @@ -1149,7 +1151,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1171,7 +1173,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1189,7 +1191,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.TuneModelRequest() ); @@ -1221,7 +1223,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.TuneModelRequest() ); @@ -1275,7 +1277,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.TuneModelRequest() ); @@ -1306,7 +1308,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.TuneModelRequest() ); @@ -1339,7 +1341,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1361,7 +1363,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1379,7 +1381,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListModelsRequest() ); @@ -1412,7 +1414,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListModelsRequest() ); @@ -1461,7 +1463,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListModelsRequest() ); @@ -1492,7 +1494,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListModelsRequest() ); @@ -1546,7 +1548,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListModelsRequest() ); @@ -1597,7 +1599,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListModelsRequest() ); @@ -1640,7 +1642,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListModelsRequest() ); @@ -1683,7 +1685,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1713,7 +1715,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1757,7 +1759,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1792,7 +1794,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1840,7 +1842,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1881,7 +1883,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1960,7 +1962,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2040,7 +2042,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2136,8 +2138,7 @@ describe('v2beta.ModelServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2156,7 +2157,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2165,8 +2166,7 @@ describe('v2beta.ModelServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2182,7 +2182,7 @@ describe('v2beta.ModelServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -2191,7 +2191,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2220,7 +2220,7 @@ describe('v2beta.ModelServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2231,7 +2231,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2287,7 +2287,7 @@ describe('v2beta.ModelServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2298,7 +2298,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2351,7 +2351,7 @@ describe('v2beta.ModelServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2362,7 +2362,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2418,7 +2418,7 @@ describe('v2beta.ModelServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2430,7 +2430,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2494,7 +2494,7 @@ describe('v2beta.ModelServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2506,7 +2506,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2570,7 +2570,7 @@ describe('v2beta.ModelServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2583,7 +2583,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2658,7 +2658,7 @@ describe('v2beta.ModelServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2670,7 +2670,7 @@ describe('v2beta.ModelServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_prediction_service_v2.ts b/packages/google-cloud-retail/test/gapic_prediction_service_v2.ts index d47d2a40db6..2634905066b 100644 --- a/packages/google-cloud-retail/test/gapic_prediction_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_prediction_service_v2.ts @@ -213,7 +213,9 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.predictionServiceStub); client.close().then(() => { done(); @@ -272,7 +274,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PredictRequest() ); @@ -303,7 +305,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PredictRequest() ); @@ -350,7 +352,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PredictRequest() ); @@ -378,7 +380,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PredictRequest() ); @@ -398,7 +400,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -428,7 +430,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -472,7 +474,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -507,7 +509,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -555,7 +557,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -596,7 +598,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -675,7 +677,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -755,7 +757,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -851,8 +853,7 @@ describe('v2.PredictionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -871,7 +872,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -880,8 +881,7 @@ describe('v2.PredictionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -897,7 +897,7 @@ describe('v2.PredictionServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -908,7 +908,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -964,7 +964,7 @@ describe('v2.PredictionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -975,7 +975,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1028,7 +1028,7 @@ describe('v2.PredictionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1039,7 +1039,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1095,7 +1095,7 @@ describe('v2.PredictionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1107,7 +1107,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1171,7 +1171,7 @@ describe('v2.PredictionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1183,7 +1183,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1247,7 +1247,7 @@ describe('v2.PredictionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1260,7 +1260,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1335,7 +1335,7 @@ describe('v2.PredictionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1347,7 +1347,7 @@ describe('v2.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_prediction_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_prediction_service_v2alpha.ts index d4f5c982038..1aef5763324 100644 --- a/packages/google-cloud-retail/test/gapic_prediction_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_prediction_service_v2alpha.ts @@ -222,7 +222,9 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.predictionServiceStub); client.close().then(() => { done(); @@ -285,7 +287,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PredictRequest() ); @@ -317,7 +319,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PredictRequest() ); @@ -365,7 +367,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PredictRequest() ); @@ -394,7 +396,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PredictRequest() ); @@ -415,7 +417,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -446,7 +448,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -491,7 +493,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -527,7 +529,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -576,7 +578,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -618,7 +620,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -700,7 +702,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -783,7 +785,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -882,8 +884,7 @@ describe('v2alpha.PredictionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -903,7 +904,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -912,8 +913,7 @@ describe('v2alpha.PredictionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -929,7 +929,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -939,7 +939,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -968,7 +968,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -980,7 +980,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1036,7 +1036,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1049,7 +1049,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1113,7 +1113,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1125,7 +1125,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1178,7 +1178,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1190,7 +1190,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1246,7 +1246,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1259,7 +1259,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1323,7 +1323,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -1333,7 +1333,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1362,7 +1362,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -1375,7 +1375,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1460,7 +1460,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1473,7 +1473,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1537,7 +1537,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1551,7 +1551,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1626,7 +1626,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -1636,7 +1636,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1665,7 +1665,7 @@ describe('v2alpha.PredictionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1678,7 +1678,7 @@ describe('v2alpha.PredictionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_prediction_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_prediction_service_v2beta.ts index 02a1ede2ae9..79b93b2e526 100644 --- a/packages/google-cloud-retail/test/gapic_prediction_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_prediction_service_v2beta.ts @@ -223,7 +223,9 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.predictionServiceStub); client.close().then(() => { done(); @@ -290,7 +292,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PredictRequest() ); @@ -323,7 +325,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PredictRequest() ); @@ -372,7 +374,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PredictRequest() ); @@ -402,7 +404,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PredictRequest() ); @@ -424,7 +426,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -456,7 +458,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -502,7 +504,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -539,7 +541,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -589,7 +591,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -632,7 +634,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -717,7 +719,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -803,7 +805,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -905,8 +907,7 @@ describe('v2beta.PredictionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -927,7 +928,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -936,8 +937,7 @@ describe('v2beta.PredictionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -953,7 +953,7 @@ describe('v2beta.PredictionServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -964,7 +964,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -993,7 +993,7 @@ describe('v2beta.PredictionServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1006,7 +1006,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1062,7 +1062,7 @@ describe('v2beta.PredictionServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1075,7 +1075,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1128,7 +1128,7 @@ describe('v2beta.PredictionServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1141,7 +1141,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1197,7 +1197,7 @@ describe('v2beta.PredictionServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1211,7 +1211,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1275,7 +1275,7 @@ describe('v2beta.PredictionServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1289,7 +1289,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1353,7 +1353,7 @@ describe('v2beta.PredictionServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1368,7 +1368,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1443,7 +1443,7 @@ describe('v2beta.PredictionServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1457,7 +1457,7 @@ describe('v2beta.PredictionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_product_service_v2.ts b/packages/google-cloud-retail/test/gapic_product_service_v2.ts index f4282e858a5..0695472afbd 100644 --- a/packages/google-cloud-retail/test/gapic_product_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_product_service_v2.ts @@ -289,7 +289,9 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateProductRequest() ); @@ -379,7 +381,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateProductRequest() ); @@ -426,7 +428,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateProductRequest() ); @@ -457,7 +459,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateProductRequest() ); @@ -478,7 +480,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetProductRequest() ); @@ -509,7 +511,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetProductRequest() ); @@ -556,7 +558,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetProductRequest() ); @@ -587,7 +589,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetProductRequest() ); @@ -608,7 +610,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateProductRequest() ); @@ -640,7 +642,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateProductRequest() ); @@ -688,7 +690,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateProductRequest() ); @@ -720,7 +722,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateProductRequest() ); @@ -742,7 +744,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteProductRequest() ); @@ -773,7 +775,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteProductRequest() ); @@ -820,7 +822,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteProductRequest() ); @@ -851,7 +853,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteProductRequest() ); @@ -872,7 +874,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeProductsRequest() ); @@ -905,7 +907,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeProductsRequest() ); @@ -959,7 +961,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeProductsRequest() ); @@ -990,7 +992,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeProductsRequest() ); @@ -1023,7 +1025,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1045,7 +1047,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1066,7 +1068,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportProductsRequest() ); @@ -1099,7 +1101,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportProductsRequest() ); @@ -1153,7 +1155,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportProductsRequest() ); @@ -1184,7 +1186,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportProductsRequest() ); @@ -1217,7 +1219,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1239,7 +1241,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1260,7 +1262,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetInventoryRequest() ); @@ -1293,7 +1295,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetInventoryRequest() ); @@ -1348,7 +1350,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetInventoryRequest() ); @@ -1380,7 +1382,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SetInventoryRequest() ); @@ -1414,7 +1416,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1436,7 +1438,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1454,7 +1456,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddFulfillmentPlacesRequest() ); @@ -1487,7 +1489,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddFulfillmentPlacesRequest() ); @@ -1541,7 +1543,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddFulfillmentPlacesRequest() ); @@ -1572,7 +1574,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddFulfillmentPlacesRequest() ); @@ -1605,7 +1607,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1627,7 +1629,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1648,7 +1650,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest() ); @@ -1681,7 +1683,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest() ); @@ -1735,7 +1737,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest() ); @@ -1769,7 +1771,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest() ); @@ -1802,7 +1804,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1825,7 +1827,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1846,7 +1848,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddLocalInventoriesRequest() ); @@ -1879,7 +1881,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddLocalInventoriesRequest() ); @@ -1933,7 +1935,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddLocalInventoriesRequest() ); @@ -1964,7 +1966,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddLocalInventoriesRequest() ); @@ -1997,7 +1999,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2019,7 +2021,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2040,7 +2042,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveLocalInventoriesRequest() ); @@ -2073,7 +2075,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveLocalInventoriesRequest() ); @@ -2127,7 +2129,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveLocalInventoriesRequest() ); @@ -2161,7 +2163,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveLocalInventoriesRequest() ); @@ -2194,7 +2196,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2216,7 +2218,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2237,7 +2239,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListProductsRequest() ); @@ -2270,7 +2272,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListProductsRequest() ); @@ -2319,7 +2321,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListProductsRequest() ); @@ -2350,7 +2352,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListProductsRequest() ); @@ -2401,7 +2403,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListProductsRequest() ); @@ -2449,7 +2451,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListProductsRequest() ); @@ -2492,7 +2494,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListProductsRequest() ); @@ -2533,7 +2535,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2563,7 +2565,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2607,7 +2609,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2642,7 +2644,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2690,7 +2692,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2731,7 +2733,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2810,7 +2812,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2890,7 +2892,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2986,8 +2988,7 @@ describe('v2.ProductServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3006,7 +3007,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3015,8 +3016,7 @@ describe('v2.ProductServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3032,7 +3032,7 @@ describe('v2.ProductServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -3043,7 +3043,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3099,7 +3099,7 @@ describe('v2.ProductServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -3111,7 +3111,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3175,7 +3175,7 @@ describe('v2.ProductServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -3186,7 +3186,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3239,7 +3239,7 @@ describe('v2.ProductServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -3250,7 +3250,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3306,7 +3306,7 @@ describe('v2.ProductServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -3318,7 +3318,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3382,7 +3382,7 @@ describe('v2.ProductServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -3394,7 +3394,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3458,7 +3458,7 @@ describe('v2.ProductServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -3471,7 +3471,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3546,7 +3546,7 @@ describe('v2.ProductServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -3558,7 +3558,7 @@ describe('v2.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_product_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_product_service_v2alpha.ts index 3d2f12b037b..7372d20883c 100644 --- a/packages/google-cloud-retail/test/gapic_product_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_product_service_v2alpha.ts @@ -290,7 +290,9 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productServiceStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateProductRequest() ); @@ -380,7 +382,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateProductRequest() ); @@ -427,7 +429,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateProductRequest() ); @@ -458,7 +460,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateProductRequest() ); @@ -479,7 +481,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProductRequest() ); @@ -510,7 +512,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProductRequest() ); @@ -557,7 +559,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProductRequest() ); @@ -588,7 +590,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProductRequest() ); @@ -609,7 +611,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateProductRequest() ); @@ -641,7 +643,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateProductRequest() ); @@ -689,7 +691,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateProductRequest() ); @@ -721,7 +723,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateProductRequest() ); @@ -743,7 +745,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteProductRequest() ); @@ -774,7 +776,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteProductRequest() ); @@ -821,7 +823,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteProductRequest() ); @@ -852,7 +854,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteProductRequest() ); @@ -873,7 +875,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeProductsRequest() ); @@ -906,7 +908,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeProductsRequest() ); @@ -960,7 +962,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeProductsRequest() ); @@ -991,7 +993,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeProductsRequest() ); @@ -1024,7 +1026,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1046,7 +1048,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1067,7 +1069,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportProductsRequest() ); @@ -1100,7 +1102,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportProductsRequest() ); @@ -1154,7 +1156,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportProductsRequest() ); @@ -1185,7 +1187,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportProductsRequest() ); @@ -1218,7 +1220,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1240,7 +1242,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1261,7 +1263,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportProductsRequest() ); @@ -1294,7 +1296,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportProductsRequest() ); @@ -1348,7 +1350,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportProductsRequest() ); @@ -1379,7 +1381,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportProductsRequest() ); @@ -1412,7 +1414,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1434,7 +1436,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1455,7 +1457,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetInventoryRequest() ); @@ -1488,7 +1490,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetInventoryRequest() ); @@ -1543,7 +1545,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetInventoryRequest() ); @@ -1575,7 +1577,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SetInventoryRequest() ); @@ -1609,7 +1611,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1631,7 +1633,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1649,7 +1651,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest() ); @@ -1682,7 +1684,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest() ); @@ -1736,7 +1738,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest() ); @@ -1767,7 +1769,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest() ); @@ -1800,7 +1802,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1822,7 +1824,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1843,7 +1845,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest() ); @@ -1876,7 +1878,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest() ); @@ -1930,7 +1932,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest() ); @@ -1964,7 +1966,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest() ); @@ -1997,7 +1999,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2020,7 +2022,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2041,7 +2043,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddLocalInventoriesRequest() ); @@ -2074,7 +2076,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddLocalInventoriesRequest() ); @@ -2128,7 +2130,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddLocalInventoriesRequest() ); @@ -2159,7 +2161,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddLocalInventoriesRequest() ); @@ -2192,7 +2194,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2214,7 +2216,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2235,7 +2237,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest() ); @@ -2268,7 +2270,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest() ); @@ -2322,7 +2324,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest() ); @@ -2356,7 +2358,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest() ); @@ -2389,7 +2391,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2411,7 +2413,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2432,7 +2434,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListProductsRequest() ); @@ -2465,7 +2467,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListProductsRequest() ); @@ -2514,7 +2516,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListProductsRequest() ); @@ -2545,7 +2547,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListProductsRequest() ); @@ -2599,7 +2601,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListProductsRequest() ); @@ -2650,7 +2652,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListProductsRequest() ); @@ -2693,7 +2695,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListProductsRequest() ); @@ -2734,7 +2736,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2764,7 +2766,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2808,7 +2810,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2843,7 +2845,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2891,7 +2893,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2932,7 +2934,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3011,7 +3013,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3091,7 +3093,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3187,8 +3189,7 @@ describe('v2alpha.ProductServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3207,7 +3208,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3216,8 +3217,7 @@ describe('v2alpha.ProductServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3233,7 +3233,7 @@ describe('v2alpha.ProductServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -3242,7 +3242,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3271,7 +3271,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -3282,7 +3282,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3338,7 +3338,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -3350,7 +3350,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3414,7 +3414,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -3425,7 +3425,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3478,7 +3478,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -3489,7 +3489,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3545,7 +3545,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -3557,7 +3557,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3621,7 +3621,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -3630,7 +3630,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3659,7 +3659,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -3671,7 +3671,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3756,7 +3756,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -3768,7 +3768,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3832,7 +3832,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -3845,7 +3845,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3920,7 +3920,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -3929,7 +3929,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3958,7 +3958,7 @@ describe('v2alpha.ProductServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -3970,7 +3970,7 @@ describe('v2alpha.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_product_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_product_service_v2beta.ts index 25f4a775219..8bdca94cfa8 100644 --- a/packages/google-cloud-retail/test/gapic_product_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_product_service_v2beta.ts @@ -289,7 +289,9 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateProductRequest() ); @@ -379,7 +381,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateProductRequest() ); @@ -426,7 +428,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateProductRequest() ); @@ -457,7 +459,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateProductRequest() ); @@ -478,7 +480,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetProductRequest() ); @@ -509,7 +511,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetProductRequest() ); @@ -556,7 +558,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetProductRequest() ); @@ -587,7 +589,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetProductRequest() ); @@ -608,7 +610,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateProductRequest() ); @@ -640,7 +642,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateProductRequest() ); @@ -688,7 +690,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateProductRequest() ); @@ -720,7 +722,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateProductRequest() ); @@ -742,7 +744,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteProductRequest() ); @@ -773,7 +775,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteProductRequest() ); @@ -820,7 +822,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteProductRequest() ); @@ -851,7 +853,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteProductRequest() ); @@ -872,7 +874,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeProductsRequest() ); @@ -905,7 +907,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeProductsRequest() ); @@ -959,7 +961,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeProductsRequest() ); @@ -990,7 +992,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeProductsRequest() ); @@ -1023,7 +1025,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1045,7 +1047,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1066,7 +1068,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportProductsRequest() ); @@ -1099,7 +1101,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportProductsRequest() ); @@ -1153,7 +1155,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportProductsRequest() ); @@ -1184,7 +1186,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportProductsRequest() ); @@ -1217,7 +1219,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1239,7 +1241,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1260,7 +1262,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportProductsRequest() ); @@ -1293,7 +1295,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportProductsRequest() ); @@ -1347,7 +1349,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportProductsRequest() ); @@ -1378,7 +1380,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportProductsRequest() ); @@ -1411,7 +1413,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1433,7 +1435,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1454,7 +1456,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetInventoryRequest() ); @@ -1487,7 +1489,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetInventoryRequest() ); @@ -1542,7 +1544,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetInventoryRequest() ); @@ -1574,7 +1576,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SetInventoryRequest() ); @@ -1608,7 +1610,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1630,7 +1632,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1648,7 +1650,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest() ); @@ -1681,7 +1683,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest() ); @@ -1735,7 +1737,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest() ); @@ -1766,7 +1768,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest() ); @@ -1799,7 +1801,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1821,7 +1823,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1842,7 +1844,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest() ); @@ -1875,7 +1877,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest() ); @@ -1929,7 +1931,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest() ); @@ -1963,7 +1965,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest() ); @@ -1996,7 +1998,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2019,7 +2021,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2040,7 +2042,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddLocalInventoriesRequest() ); @@ -2073,7 +2075,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddLocalInventoriesRequest() ); @@ -2127,7 +2129,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddLocalInventoriesRequest() ); @@ -2158,7 +2160,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddLocalInventoriesRequest() ); @@ -2191,7 +2193,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2213,7 +2215,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2234,7 +2236,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveLocalInventoriesRequest() ); @@ -2267,7 +2269,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveLocalInventoriesRequest() ); @@ -2321,7 +2323,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveLocalInventoriesRequest() ); @@ -2355,7 +2357,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveLocalInventoriesRequest() ); @@ -2388,7 +2390,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2410,7 +2412,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2431,7 +2433,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListProductsRequest() ); @@ -2464,7 +2466,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListProductsRequest() ); @@ -2513,7 +2515,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListProductsRequest() ); @@ -2544,7 +2546,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListProductsRequest() ); @@ -2598,7 +2600,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListProductsRequest() ); @@ -2649,7 +2651,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListProductsRequest() ); @@ -2692,7 +2694,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListProductsRequest() ); @@ -2733,7 +2735,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2763,7 +2765,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2807,7 +2809,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2842,7 +2844,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2890,7 +2892,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2931,7 +2933,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3010,7 +3012,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3090,7 +3092,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3186,8 +3188,7 @@ describe('v2beta.ProductServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3206,7 +3207,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3215,8 +3216,7 @@ describe('v2beta.ProductServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3232,7 +3232,7 @@ describe('v2beta.ProductServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -3241,7 +3241,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3270,7 +3270,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -3281,7 +3281,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3337,7 +3337,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -3349,7 +3349,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3413,7 +3413,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -3424,7 +3424,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3477,7 +3477,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -3488,7 +3488,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3544,7 +3544,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -3556,7 +3556,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3620,7 +3620,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -3632,7 +3632,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3696,7 +3696,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -3709,7 +3709,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3784,7 +3784,7 @@ describe('v2beta.ProductServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -3796,7 +3796,7 @@ describe('v2beta.ProductServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_project_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_project_service_v2alpha.ts index 1a8874d1ce3..39d68e4b972 100644 --- a/packages/google-cloud-retail/test/gapic_project_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_project_service_v2alpha.ts @@ -250,7 +250,9 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.projectServiceStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProjectRequest() ); @@ -340,7 +342,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProjectRequest() ); @@ -387,7 +389,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProjectRequest() ); @@ -418,7 +420,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetProjectRequest() ); @@ -439,7 +441,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AcceptTermsRequest() ); @@ -470,7 +472,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AcceptTermsRequest() ); @@ -517,7 +519,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AcceptTermsRequest() ); @@ -548,7 +550,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AcceptTermsRequest() ); @@ -569,7 +571,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest() ); @@ -601,7 +603,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest() ); @@ -648,7 +650,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest() ); @@ -682,7 +684,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListEnrolledSolutionsRequest() ); @@ -706,7 +708,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetLoggingConfigRequest() ); @@ -737,7 +739,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetLoggingConfigRequest() ); @@ -784,7 +786,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetLoggingConfigRequest() ); @@ -815,7 +817,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetLoggingConfigRequest() ); @@ -836,7 +838,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest() ); @@ -869,7 +871,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest() ); @@ -917,7 +919,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest() ); @@ -949,7 +951,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateLoggingConfigRequest() ); @@ -971,7 +973,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAlertConfigRequest() ); @@ -1002,7 +1004,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAlertConfigRequest() ); @@ -1049,7 +1051,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAlertConfigRequest() ); @@ -1080,7 +1082,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetAlertConfigRequest() ); @@ -1101,7 +1103,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAlertConfigRequest() ); @@ -1133,7 +1135,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAlertConfigRequest() ); @@ -1181,7 +1183,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAlertConfigRequest() ); @@ -1213,7 +1215,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateAlertConfigRequest() ); @@ -1235,7 +1237,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.EnrollSolutionRequest() ); @@ -1268,7 +1270,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.EnrollSolutionRequest() ); @@ -1322,7 +1324,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.EnrollSolutionRequest() ); @@ -1353,7 +1355,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.EnrollSolutionRequest() ); @@ -1386,7 +1388,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1408,7 +1410,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1428,7 +1430,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1458,7 +1460,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1502,7 +1504,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1537,7 +1539,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1585,7 +1587,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1626,7 +1628,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1705,7 +1707,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1785,7 +1787,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1881,8 +1883,7 @@ describe('v2alpha.ProjectServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1901,7 +1902,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1910,8 +1911,7 @@ describe('v2alpha.ProjectServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1927,7 +1927,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1936,7 +1936,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1965,7 +1965,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1976,7 +1976,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2032,7 +2032,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -2044,7 +2044,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2108,7 +2108,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2119,7 +2119,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2172,7 +2172,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2183,7 +2183,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2239,7 +2239,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2251,7 +2251,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2315,7 +2315,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -2324,7 +2324,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2353,7 +2353,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -2365,7 +2365,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2450,7 +2450,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2462,7 +2462,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2526,7 +2526,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2539,7 +2539,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2614,7 +2614,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2623,7 +2623,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2652,7 +2652,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -2661,7 +2661,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2690,7 +2690,7 @@ describe('v2alpha.ProjectServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2702,7 +2702,7 @@ describe('v2alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_project_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_project_service_v2beta.ts index 90b25d1bf7e..4a7176d3612 100644 --- a/packages/google-cloud-retail/test/gapic_project_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_project_service_v2beta.ts @@ -212,7 +212,9 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.projectServiceStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAlertConfigRequest() ); @@ -302,7 +304,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAlertConfigRequest() ); @@ -349,7 +351,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAlertConfigRequest() ); @@ -380,7 +382,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetAlertConfigRequest() ); @@ -401,7 +403,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAlertConfigRequest() ); @@ -433,7 +435,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAlertConfigRequest() ); @@ -481,7 +483,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAlertConfigRequest() ); @@ -513,7 +515,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateAlertConfigRequest() ); @@ -534,7 +536,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -564,7 +566,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -608,7 +610,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -643,7 +645,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -691,7 +693,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -732,7 +734,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -811,7 +813,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -891,7 +893,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -987,8 +989,7 @@ describe('v2beta.ProjectServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1007,7 +1008,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1016,8 +1017,7 @@ describe('v2beta.ProjectServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1033,7 +1033,7 @@ describe('v2beta.ProjectServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1042,7 +1042,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1071,7 +1071,7 @@ describe('v2beta.ProjectServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1082,7 +1082,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1138,7 +1138,7 @@ describe('v2beta.ProjectServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1149,7 +1149,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1202,7 +1202,7 @@ describe('v2beta.ProjectServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1213,7 +1213,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1269,7 +1269,7 @@ describe('v2beta.ProjectServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1281,7 +1281,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1345,7 +1345,7 @@ describe('v2beta.ProjectServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1357,7 +1357,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1421,7 +1421,7 @@ describe('v2beta.ProjectServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1434,7 +1434,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1509,7 +1509,7 @@ describe('v2beta.ProjectServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1521,7 +1521,7 @@ describe('v2beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_search_service_v2.ts b/packages/google-cloud-retail/test/gapic_search_service_v2.ts index e73fabebef6..cd3aa5a47ff 100644 --- a/packages/google-cloud-retail/test/gapic_search_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_search_service_v2.ts @@ -252,7 +252,9 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SearchRequest() ); @@ -350,7 +352,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SearchRequest() ); @@ -407,7 +409,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SearchRequest() ); @@ -435,7 +437,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SearchRequest() ); @@ -498,7 +500,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SearchRequest() ); @@ -552,7 +554,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SearchRequest() ); @@ -601,7 +603,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.SearchRequest() ); @@ -644,7 +646,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -674,7 +676,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -718,7 +720,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -753,7 +755,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -801,7 +803,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -842,7 +844,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -921,7 +923,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1001,7 +1003,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1097,8 +1099,7 @@ describe('v2.SearchServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1117,7 +1118,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1126,8 +1127,7 @@ describe('v2.SearchServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1143,7 +1143,7 @@ describe('v2.SearchServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1154,7 +1154,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1210,7 +1210,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1222,7 +1222,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1286,7 +1286,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1297,7 +1297,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1350,7 +1350,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1361,7 +1361,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1417,7 +1417,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1429,7 +1429,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1493,7 +1493,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1505,7 +1505,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1569,7 +1569,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1581,7 +1581,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1645,7 +1645,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1658,7 +1658,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1733,7 +1733,7 @@ describe('v2.SearchServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1745,7 +1745,7 @@ describe('v2.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_search_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_search_service_v2alpha.ts index 804da94cfec..35c77d3879c 100644 --- a/packages/google-cloud-retail/test/gapic_search_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_search_service_v2alpha.ts @@ -252,7 +252,9 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SearchRequest() ); @@ -350,7 +352,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SearchRequest() ); @@ -407,7 +409,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SearchRequest() ); @@ -435,7 +437,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SearchRequest() ); @@ -498,7 +500,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SearchRequest() ); @@ -552,7 +554,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SearchRequest() ); @@ -601,7 +603,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.SearchRequest() ); @@ -644,7 +646,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -674,7 +676,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -718,7 +720,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -753,7 +755,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -801,7 +803,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -842,7 +844,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -921,7 +923,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1001,7 +1003,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1097,8 +1099,7 @@ describe('v2alpha.SearchServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1117,7 +1118,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1126,8 +1127,7 @@ describe('v2alpha.SearchServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1143,7 +1143,7 @@ describe('v2alpha.SearchServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1152,7 +1152,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1181,7 +1181,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1192,7 +1192,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1248,7 +1248,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1260,7 +1260,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1324,7 +1324,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1335,7 +1335,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1388,7 +1388,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1399,7 +1399,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1455,7 +1455,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1467,7 +1467,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1531,7 +1531,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1543,7 +1543,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1607,7 +1607,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -1616,7 +1616,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1645,7 +1645,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -1657,7 +1657,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1742,7 +1742,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1754,7 +1754,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1818,7 +1818,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1831,7 +1831,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1906,7 +1906,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -1915,7 +1915,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1944,7 +1944,7 @@ describe('v2alpha.SearchServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1956,7 +1956,7 @@ describe('v2alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_search_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_search_service_v2beta.ts index 14ddc1d849a..34aae86ae4e 100644 --- a/packages/google-cloud-retail/test/gapic_search_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_search_service_v2beta.ts @@ -252,7 +252,9 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SearchRequest() ); @@ -350,7 +352,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SearchRequest() ); @@ -407,7 +409,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SearchRequest() ); @@ -435,7 +437,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SearchRequest() ); @@ -498,7 +500,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SearchRequest() ); @@ -552,7 +554,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SearchRequest() ); @@ -601,7 +603,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.SearchRequest() ); @@ -644,7 +646,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -674,7 +676,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -718,7 +720,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -753,7 +755,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -801,7 +803,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -842,7 +844,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -921,7 +923,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1001,7 +1003,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1097,8 +1099,7 @@ describe('v2beta.SearchServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1117,7 +1118,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1126,8 +1127,7 @@ describe('v2beta.SearchServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1143,7 +1143,7 @@ describe('v2beta.SearchServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1152,7 +1152,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1181,7 +1181,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1192,7 +1192,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1248,7 +1248,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1260,7 +1260,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1324,7 +1324,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1335,7 +1335,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1388,7 +1388,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1399,7 +1399,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1455,7 +1455,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1467,7 +1467,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1531,7 +1531,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1543,7 +1543,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1607,7 +1607,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1619,7 +1619,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1683,7 +1683,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1696,7 +1696,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1771,7 +1771,7 @@ describe('v2beta.SearchServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -1783,7 +1783,7 @@ describe('v2beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_serving_config_service_v2.ts b/packages/google-cloud-retail/test/gapic_serving_config_service_v2.ts index d7354874aad..9b999e1e03a 100644 --- a/packages/google-cloud-retail/test/gapic_serving_config_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_serving_config_service_v2.ts @@ -263,7 +263,9 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.servingConfigServiceStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateServingConfigRequest() ); @@ -359,7 +361,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateServingConfigRequest() ); @@ -407,7 +409,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateServingConfigRequest() ); @@ -439,7 +441,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CreateServingConfigRequest() ); @@ -461,7 +463,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteServingConfigRequest() ); @@ -494,7 +496,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteServingConfigRequest() ); @@ -542,7 +544,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteServingConfigRequest() ); @@ -574,7 +576,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.DeleteServingConfigRequest() ); @@ -596,7 +598,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateServingConfigRequest() ); @@ -630,7 +632,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateServingConfigRequest() ); @@ -679,7 +681,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateServingConfigRequest() ); @@ -712,7 +714,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.UpdateServingConfigRequest() ); @@ -735,7 +737,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetServingConfigRequest() ); @@ -767,7 +769,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetServingConfigRequest() ); @@ -815,7 +817,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetServingConfigRequest() ); @@ -847,7 +849,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.GetServingConfigRequest() ); @@ -869,7 +871,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddControlRequest() ); @@ -901,7 +903,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddControlRequest() ); @@ -949,7 +951,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddControlRequest() ); @@ -981,7 +983,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.AddControlRequest() ); @@ -1003,7 +1005,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveControlRequest() ); @@ -1035,7 +1037,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveControlRequest() ); @@ -1083,7 +1085,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveControlRequest() ); @@ -1115,7 +1117,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RemoveControlRequest() ); @@ -1137,7 +1139,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListServingConfigsRequest() ); @@ -1178,7 +1180,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListServingConfigsRequest() ); @@ -1234,7 +1236,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListServingConfigsRequest() ); @@ -1266,7 +1268,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListServingConfigsRequest() ); @@ -1327,7 +1329,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListServingConfigsRequest() ); @@ -1377,7 +1379,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListServingConfigsRequest() ); @@ -1427,7 +1429,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ListServingConfigsRequest() ); @@ -1469,7 +1471,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1500,7 +1502,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1545,7 +1547,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1581,7 +1583,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1630,7 +1632,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1672,7 +1674,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1754,7 +1756,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1837,7 +1839,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1936,8 +1938,7 @@ describe('v2.ServingConfigServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1957,7 +1958,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1966,8 +1967,7 @@ describe('v2.ServingConfigServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1983,7 +1983,7 @@ describe('v2.ServingConfigServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1995,7 +1995,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2051,7 +2051,7 @@ describe('v2.ServingConfigServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2063,7 +2063,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2116,7 +2116,7 @@ describe('v2.ServingConfigServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2128,7 +2128,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2184,7 +2184,7 @@ describe('v2.ServingConfigServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2197,7 +2197,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2261,7 +2261,7 @@ describe('v2.ServingConfigServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2274,7 +2274,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2338,7 +2338,7 @@ describe('v2.ServingConfigServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2352,7 +2352,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2427,7 +2427,7 @@ describe('v2.ServingConfigServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2440,7 +2440,7 @@ describe('v2.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_serving_config_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_serving_config_service_v2alpha.ts index 16b479dc46d..89204231261 100644 --- a/packages/google-cloud-retail/test/gapic_serving_config_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_serving_config_service_v2alpha.ts @@ -265,7 +265,9 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.servingConfigServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateServingConfigRequest() ); @@ -361,7 +363,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateServingConfigRequest() ); @@ -409,7 +411,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateServingConfigRequest() ); @@ -441,7 +443,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateServingConfigRequest() ); @@ -463,7 +465,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteServingConfigRequest() ); @@ -496,7 +498,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteServingConfigRequest() ); @@ -544,7 +546,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteServingConfigRequest() ); @@ -576,7 +578,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.DeleteServingConfigRequest() ); @@ -598,7 +600,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateServingConfigRequest() ); @@ -632,7 +634,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateServingConfigRequest() ); @@ -681,7 +683,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateServingConfigRequest() ); @@ -714,7 +716,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.UpdateServingConfigRequest() ); @@ -737,7 +739,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetServingConfigRequest() ); @@ -769,7 +771,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetServingConfigRequest() ); @@ -817,7 +819,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetServingConfigRequest() ); @@ -849,7 +851,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.GetServingConfigRequest() ); @@ -871,7 +873,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddControlRequest() ); @@ -903,7 +905,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddControlRequest() ); @@ -951,7 +953,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddControlRequest() ); @@ -983,7 +985,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.AddControlRequest() ); @@ -1005,7 +1007,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveControlRequest() ); @@ -1037,7 +1039,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveControlRequest() ); @@ -1085,7 +1087,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveControlRequest() ); @@ -1117,7 +1119,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RemoveControlRequest() ); @@ -1139,7 +1141,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListServingConfigsRequest() ); @@ -1180,7 +1182,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListServingConfigsRequest() ); @@ -1236,7 +1238,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListServingConfigsRequest() ); @@ -1268,7 +1270,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListServingConfigsRequest() ); @@ -1330,7 +1332,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListServingConfigsRequest() ); @@ -1381,7 +1383,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListServingConfigsRequest() ); @@ -1431,7 +1433,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ListServingConfigsRequest() ); @@ -1474,7 +1476,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1505,7 +1507,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1550,7 +1552,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1586,7 +1588,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1635,7 +1637,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1677,7 +1679,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1759,7 +1761,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1842,7 +1844,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1941,8 +1943,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1962,7 +1963,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1971,8 +1972,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1988,7 +1988,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1998,7 +1998,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2027,7 +2027,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2039,7 +2039,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2095,7 +2095,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -2108,7 +2108,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2172,7 +2172,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2184,7 +2184,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2237,7 +2237,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2249,7 +2249,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2305,7 +2305,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2318,7 +2318,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2382,7 +2382,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -2392,7 +2392,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2421,7 +2421,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -2434,7 +2434,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2519,7 +2519,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2532,7 +2532,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2596,7 +2596,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2610,7 +2610,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2685,7 +2685,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -2695,7 +2695,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2724,7 +2724,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2737,7 +2737,7 @@ describe('v2alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_serving_config_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_serving_config_service_v2beta.ts index 9352d6304fc..8f75daf7b0b 100644 --- a/packages/google-cloud-retail/test/gapic_serving_config_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_serving_config_service_v2beta.ts @@ -265,7 +265,9 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.servingConfigServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateServingConfigRequest() ); @@ -361,7 +363,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateServingConfigRequest() ); @@ -409,7 +411,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateServingConfigRequest() ); @@ -441,7 +443,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CreateServingConfigRequest() ); @@ -463,7 +465,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteServingConfigRequest() ); @@ -496,7 +498,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteServingConfigRequest() ); @@ -544,7 +546,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteServingConfigRequest() ); @@ -576,7 +578,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.DeleteServingConfigRequest() ); @@ -598,7 +600,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateServingConfigRequest() ); @@ -632,7 +634,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateServingConfigRequest() ); @@ -681,7 +683,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateServingConfigRequest() ); @@ -714,7 +716,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.UpdateServingConfigRequest() ); @@ -737,7 +739,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetServingConfigRequest() ); @@ -769,7 +771,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetServingConfigRequest() ); @@ -817,7 +819,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetServingConfigRequest() ); @@ -849,7 +851,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.GetServingConfigRequest() ); @@ -871,7 +873,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddControlRequest() ); @@ -903,7 +905,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddControlRequest() ); @@ -951,7 +953,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddControlRequest() ); @@ -983,7 +985,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.AddControlRequest() ); @@ -1005,7 +1007,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveControlRequest() ); @@ -1037,7 +1039,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveControlRequest() ); @@ -1085,7 +1087,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveControlRequest() ); @@ -1117,7 +1119,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RemoveControlRequest() ); @@ -1139,7 +1141,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListServingConfigsRequest() ); @@ -1180,7 +1182,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListServingConfigsRequest() ); @@ -1236,7 +1238,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListServingConfigsRequest() ); @@ -1268,7 +1270,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListServingConfigsRequest() ); @@ -1329,7 +1331,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListServingConfigsRequest() ); @@ -1379,7 +1381,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListServingConfigsRequest() ); @@ -1429,7 +1431,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ListServingConfigsRequest() ); @@ -1472,7 +1474,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1503,7 +1505,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1548,7 +1550,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1584,7 +1586,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1633,7 +1635,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1675,7 +1677,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1757,7 +1759,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1840,7 +1842,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1939,8 +1941,7 @@ describe('v2beta.ServingConfigServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1960,7 +1961,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1969,8 +1970,7 @@ describe('v2beta.ServingConfigServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1986,7 +1986,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1996,7 +1996,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2025,7 +2025,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -2037,7 +2037,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2093,7 +2093,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2105,7 +2105,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2158,7 +2158,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2170,7 +2170,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2226,7 +2226,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2239,7 +2239,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2303,7 +2303,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2316,7 +2316,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2380,7 +2380,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2394,7 +2394,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2469,7 +2469,7 @@ describe('v2beta.ServingConfigServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2482,7 +2482,7 @@ describe('v2beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_user_event_service_v2.ts b/packages/google-cloud-retail/test/gapic_user_event_service_v2.ts index a4421e7c607..1631b860d6f 100644 --- a/packages/google-cloud-retail/test/gapic_user_event_service_v2.ts +++ b/packages/google-cloud-retail/test/gapic_user_event_service_v2.ts @@ -249,7 +249,9 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userEventServiceStub); client.close().then(() => { done(); @@ -308,7 +310,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.WriteUserEventRequest() ); @@ -339,7 +341,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.WriteUserEventRequest() ); @@ -386,7 +388,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.WriteUserEventRequest() ); @@ -417,7 +419,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.WriteUserEventRequest() ); @@ -438,7 +440,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CollectUserEventRequest() ); @@ -469,7 +471,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CollectUserEventRequest() ); @@ -513,7 +515,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CollectUserEventRequest() ); @@ -544,7 +546,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.CollectUserEventRequest() ); @@ -565,7 +567,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeUserEventsRequest() ); @@ -598,7 +600,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeUserEventsRequest() ); @@ -652,7 +654,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeUserEventsRequest() ); @@ -683,7 +685,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.PurgeUserEventsRequest() ); @@ -716,7 +718,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -738,7 +740,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -759,7 +761,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportUserEventsRequest() ); @@ -792,7 +794,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportUserEventsRequest() ); @@ -846,7 +848,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportUserEventsRequest() ); @@ -877,7 +879,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.ImportUserEventsRequest() ); @@ -910,7 +912,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -932,7 +934,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -953,7 +955,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RejoinUserEventsRequest() ); @@ -986,7 +988,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RejoinUserEventsRequest() ); @@ -1040,7 +1042,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RejoinUserEventsRequest() ); @@ -1071,7 +1073,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2.RejoinUserEventsRequest() ); @@ -1104,7 +1106,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1126,7 +1128,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1146,7 +1148,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1176,7 +1178,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1220,7 +1222,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1255,7 +1257,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1303,7 +1305,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1344,7 +1346,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1423,7 +1425,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1503,7 +1505,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1599,8 +1601,7 @@ describe('v2.UserEventServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1619,7 +1620,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1628,8 +1629,7 @@ describe('v2.UserEventServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1645,7 +1645,7 @@ describe('v2.UserEventServiceClient', () => { }); describe('Path templates', () => { - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1656,7 +1656,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1712,7 +1712,7 @@ describe('v2.UserEventServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1723,7 +1723,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1776,7 +1776,7 @@ describe('v2.UserEventServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -1787,7 +1787,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1843,7 +1843,7 @@ describe('v2.UserEventServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -1855,7 +1855,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1919,7 +1919,7 @@ describe('v2.UserEventServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -1931,7 +1931,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1995,7 +1995,7 @@ describe('v2.UserEventServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2008,7 +2008,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2083,7 +2083,7 @@ describe('v2.UserEventServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2095,7 +2095,7 @@ describe('v2.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_user_event_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_user_event_service_v2alpha.ts index e3bc5b20cd4..540f72949e1 100644 --- a/packages/google-cloud-retail/test/gapic_user_event_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_user_event_service_v2alpha.ts @@ -254,7 +254,9 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userEventServiceStub); client.close().then(() => { done(); @@ -313,7 +315,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.WriteUserEventRequest() ); @@ -344,7 +346,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.WriteUserEventRequest() ); @@ -391,7 +393,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.WriteUserEventRequest() ); @@ -422,7 +424,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.WriteUserEventRequest() ); @@ -443,7 +445,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CollectUserEventRequest() ); @@ -474,7 +476,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CollectUserEventRequest() ); @@ -518,7 +520,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CollectUserEventRequest() ); @@ -549,7 +551,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CollectUserEventRequest() ); @@ -570,7 +572,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeUserEventsRequest() ); @@ -603,7 +605,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeUserEventsRequest() ); @@ -657,7 +659,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeUserEventsRequest() ); @@ -688,7 +690,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.PurgeUserEventsRequest() ); @@ -721,7 +723,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -743,7 +745,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -764,7 +766,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportUserEventsRequest() ); @@ -797,7 +799,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportUserEventsRequest() ); @@ -851,7 +853,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportUserEventsRequest() ); @@ -882,7 +884,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ImportUserEventsRequest() ); @@ -915,7 +917,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -937,7 +939,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -958,7 +960,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportUserEventsRequest() ); @@ -991,7 +993,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportUserEventsRequest() ); @@ -1045,7 +1047,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportUserEventsRequest() ); @@ -1076,7 +1078,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.ExportUserEventsRequest() ); @@ -1109,7 +1111,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1131,7 +1133,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1152,7 +1154,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RejoinUserEventsRequest() ); @@ -1185,7 +1187,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RejoinUserEventsRequest() ); @@ -1239,7 +1241,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RejoinUserEventsRequest() ); @@ -1270,7 +1272,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.RejoinUserEventsRequest() ); @@ -1303,7 +1305,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1325,7 +1327,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1345,7 +1347,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1375,7 +1377,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1419,7 +1421,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1454,7 +1456,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1502,7 +1504,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1543,7 +1545,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1622,7 +1624,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1702,7 +1704,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1798,8 +1800,7 @@ describe('v2alpha.UserEventServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1818,7 +1819,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1827,8 +1828,7 @@ describe('v2alpha.UserEventServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1844,7 +1844,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1853,7 +1853,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1882,7 +1882,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1893,7 +1893,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1949,7 +1949,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('branch', () => { + describe('branch', async () => { const fakePath = '/rendered/path/branch'; const expectedParameters = { project: 'projectValue', @@ -1961,7 +1961,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.branchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2025,7 +2025,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -2036,7 +2036,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2089,7 +2089,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2100,7 +2100,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2156,7 +2156,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2168,7 +2168,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2232,7 +2232,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('loggingConfig', () => { + describe('loggingConfig', async () => { const fakePath = '/rendered/path/loggingConfig'; const expectedParameters = { project: 'projectValue', @@ -2241,7 +2241,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2270,7 +2270,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('merchantCenterAccountLink', () => { + describe('merchantCenterAccountLink', async () => { const fakePath = '/rendered/path/merchantCenterAccountLink'; const expectedParameters = { project: 'projectValue', @@ -2282,7 +2282,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantCenterAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2367,7 +2367,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2379,7 +2379,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2443,7 +2443,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2456,7 +2456,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2531,7 +2531,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('retailProject', () => { + describe('retailProject', async () => { const fakePath = '/rendered/path/retailProject'; const expectedParameters = { project: 'projectValue', @@ -2540,7 +2540,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.retailProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2569,7 +2569,7 @@ describe('v2alpha.UserEventServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2581,7 +2581,7 @@ describe('v2alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-retail/test/gapic_user_event_service_v2beta.ts b/packages/google-cloud-retail/test/gapic_user_event_service_v2beta.ts index 8f6e4434a70..5597111c6a7 100644 --- a/packages/google-cloud-retail/test/gapic_user_event_service_v2beta.ts +++ b/packages/google-cloud-retail/test/gapic_user_event_service_v2beta.ts @@ -251,7 +251,9 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userEventServiceStub); client.close().then(() => { done(); @@ -310,7 +312,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.WriteUserEventRequest() ); @@ -341,7 +343,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.WriteUserEventRequest() ); @@ -388,7 +390,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.WriteUserEventRequest() ); @@ -419,7 +421,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.WriteUserEventRequest() ); @@ -440,7 +442,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CollectUserEventRequest() ); @@ -471,7 +473,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CollectUserEventRequest() ); @@ -515,7 +517,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CollectUserEventRequest() ); @@ -546,7 +548,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.CollectUserEventRequest() ); @@ -567,7 +569,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeUserEventsRequest() ); @@ -600,7 +602,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeUserEventsRequest() ); @@ -654,7 +656,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeUserEventsRequest() ); @@ -685,7 +687,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.PurgeUserEventsRequest() ); @@ -718,7 +720,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -740,7 +742,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -761,7 +763,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportUserEventsRequest() ); @@ -794,7 +796,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportUserEventsRequest() ); @@ -848,7 +850,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportUserEventsRequest() ); @@ -879,7 +881,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ImportUserEventsRequest() ); @@ -912,7 +914,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -934,7 +936,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -955,7 +957,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportUserEventsRequest() ); @@ -988,7 +990,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportUserEventsRequest() ); @@ -1042,7 +1044,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportUserEventsRequest() ); @@ -1073,7 +1075,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.ExportUserEventsRequest() ); @@ -1106,7 +1108,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1128,7 +1130,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1149,7 +1151,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RejoinUserEventsRequest() ); @@ -1182,7 +1184,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RejoinUserEventsRequest() ); @@ -1236,7 +1238,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RejoinUserEventsRequest() ); @@ -1267,7 +1269,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.retail.v2beta.RejoinUserEventsRequest() ); @@ -1300,7 +1302,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1322,7 +1324,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1342,7 +1344,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1372,7 +1374,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1416,7 +1418,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1451,7 +1453,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1499,7 +1501,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1540,7 +1542,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1619,7 +1621,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1699,7 +1701,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1795,8 +1797,7 @@ describe('v2beta.UserEventServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1815,7 +1816,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1824,8 +1825,7 @@ describe('v2beta.UserEventServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1841,7 +1841,7 @@ describe('v2beta.UserEventServiceClient', () => { }); describe('Path templates', () => { - describe('alertConfig', () => { + describe('alertConfig', async () => { const fakePath = '/rendered/path/alertConfig'; const expectedParameters = { project: 'projectValue', @@ -1850,7 +1850,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1879,7 +1879,7 @@ describe('v2beta.UserEventServiceClient', () => { }); }); - describe('attributesConfig', () => { + describe('attributesConfig', async () => { const fakePath = '/rendered/path/attributesConfig'; const expectedParameters = { project: 'projectValue', @@ -1890,7 +1890,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attributesConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1946,7 +1946,7 @@ describe('v2beta.UserEventServiceClient', () => { }); }); - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { project: 'projectValue', @@ -1957,7 +1957,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2010,7 +2010,7 @@ describe('v2beta.UserEventServiceClient', () => { }); }); - describe('completionConfig', () => { + describe('completionConfig', async () => { const fakePath = '/rendered/path/completionConfig'; const expectedParameters = { project: 'projectValue', @@ -2021,7 +2021,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.completionConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2077,7 +2077,7 @@ describe('v2beta.UserEventServiceClient', () => { }); }); - describe('control', () => { + describe('control', async () => { const fakePath = '/rendered/path/control'; const expectedParameters = { project: 'projectValue', @@ -2089,7 +2089,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.controlPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2153,7 +2153,7 @@ describe('v2beta.UserEventServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -2165,7 +2165,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2229,7 +2229,7 @@ describe('v2beta.UserEventServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -2242,7 +2242,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2317,7 +2317,7 @@ describe('v2beta.UserEventServiceClient', () => { }); }); - describe('servingConfig', () => { + describe('servingConfig', async () => { const fakePath = '/rendered/path/servingConfig'; const expectedParameters = { project: 'projectValue', @@ -2329,7 +2329,7 @@ describe('v2beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-run/package.json b/packages/google-cloud-run/package.json index a32880ea0f5..f900caf08f8 100644 --- a/packages/google-cloud-run/package.json +++ b/packages/google-cloud-run/package.json @@ -41,7 +41,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json index 5ca97f5ef87..cb5632d6760 100644 --- a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json +++ b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-run", - "version": "1.5.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json b/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json index b6ac946739c..672fd5512c9 100644 --- a/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json +++ b/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-run", - "version": "1.5.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-run/src/v2/builds_client.ts b/packages/google-cloud-run/src/v2/builds_client.ts index 7c60c40719e..fede29a70b0 100644 --- a/packages/google-cloud-run/src/v2/builds_client.ts +++ b/packages/google-cloud-run/src/v2/builds_client.ts @@ -492,7 +492,9 @@ export class BuildsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('submitBuild request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-run/src/v2/executions_client.ts b/packages/google-cloud-run/src/v2/executions_client.ts index ce0ad919c9d..1493d27d041 100644 --- a/packages/google-cloud-run/src/v2/executions_client.ts +++ b/packages/google-cloud-run/src/v2/executions_client.ts @@ -558,7 +558,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExecution request %j', request); const wrappedCallback: | Callback< @@ -694,7 +696,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -870,7 +874,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1031,7 +1037,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.run.v2.IListExecutionsRequest, @@ -1100,7 +1108,9 @@ export class ExecutionsClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExecutions stream %j', request); return this.descriptors.page.listExecutions.createStream( this.innerApiCalls.listExecutions as GaxCall, @@ -1153,7 +1163,9 @@ export class ExecutionsClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExecutions iterate %j', request); return this.descriptors.page.listExecutions.asyncIterate( this.innerApiCalls['listExecutions'] as GaxCall, @@ -1333,7 +1345,7 @@ export class ExecutionsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-run/src/v2/jobs_client.ts b/packages/google-cloud-run/src/v2/jobs_client.ts index 64afce1b126..a0909ead32e 100644 --- a/packages/google-cloud-run/src/v2/jobs_client.ts +++ b/packages/google-cloud-run/src/v2/jobs_client.ts @@ -595,7 +595,9 @@ export class JobsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -706,7 +708,9 @@ export class JobsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -825,7 +829,9 @@ export class JobsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -939,7 +945,9 @@ export class JobsClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1087,7 +1095,9 @@ export class JobsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1269,7 +1279,9 @@ export class JobsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1452,7 +1464,9 @@ export class JobsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1638,7 +1652,9 @@ export class JobsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1808,7 +1824,9 @@ export class JobsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.run.v2.IListJobsRequest, @@ -1887,7 +1905,9 @@ export class JobsClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -1950,7 +1970,9 @@ export class JobsClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -2130,7 +2152,7 @@ export class JobsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-run/src/v2/revisions_client.ts b/packages/google-cloud-run/src/v2/revisions_client.ts index 2c953f04191..ed6a2316c05 100644 --- a/packages/google-cloud-run/src/v2/revisions_client.ts +++ b/packages/google-cloud-run/src/v2/revisions_client.ts @@ -559,7 +559,9 @@ export class RevisionsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRevision request %j', request); const wrappedCallback: | Callback< @@ -705,7 +707,9 @@ export class RevisionsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -877,7 +881,9 @@ export class RevisionsClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.run.v2.IListRevisionsRequest, @@ -957,7 +963,9 @@ export class RevisionsClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRevisions stream %j', request); return this.descriptors.page.listRevisions.createStream( this.innerApiCalls.listRevisions as GaxCall, @@ -1021,7 +1029,9 @@ export class RevisionsClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRevisions iterate %j', request); return this.descriptors.page.listRevisions.asyncIterate( this.innerApiCalls['listRevisions'] as GaxCall, @@ -1201,7 +1211,7 @@ export class RevisionsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-run/src/v2/services_client.ts b/packages/google-cloud-run/src/v2/services_client.ts index 313e2ed05be..5061f484fa1 100644 --- a/packages/google-cloud-run/src/v2/services_client.ts +++ b/packages/google-cloud-run/src/v2/services_client.ts @@ -583,7 +583,9 @@ export class ServicesClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -694,7 +696,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -813,7 +817,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -927,7 +933,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1076,7 +1084,9 @@ export class ServicesClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1263,7 +1273,9 @@ export class ServicesClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1451,7 +1463,9 @@ export class ServicesClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1622,7 +1636,9 @@ export class ServicesClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.run.v2.IListServicesRequest, @@ -1702,7 +1718,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -1766,7 +1784,9 @@ export class ServicesClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -1946,7 +1966,7 @@ export class ServicesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-run/src/v2/tasks_client.ts b/packages/google-cloud-run/src/v2/tasks_client.ts index c1970000816..4c3acb7f178 100644 --- a/packages/google-cloud-run/src/v2/tasks_client.ts +++ b/packages/google-cloud-run/src/v2/tasks_client.ts @@ -490,7 +490,9 @@ export class TasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -610,7 +612,9 @@ export class TasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.run.v2.IListTasksRequest, @@ -679,7 +683,9 @@ export class TasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -732,7 +738,9 @@ export class TasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, diff --git a/packages/google-cloud-run/test/gapic_builds_v2.ts b/packages/google-cloud-run/test/gapic_builds_v2.ts index 627b5255921..71832d6eddb 100644 --- a/packages/google-cloud-run/test/gapic_builds_v2.ts +++ b/packages/google-cloud-run/test/gapic_builds_v2.ts @@ -210,7 +210,9 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.buildsStub); client.close().then(() => { done(); @@ -269,7 +271,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.SubmitBuildRequest() ); @@ -300,7 +302,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.SubmitBuildRequest() ); @@ -347,7 +349,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.SubmitBuildRequest() ); @@ -378,7 +380,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.SubmitBuildRequest() ); @@ -398,7 +400,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -428,7 +430,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -472,7 +474,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -507,7 +509,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -555,7 +557,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -592,7 +594,7 @@ describe('v2.BuildsClient', () => { }); describe('Path templates', () => { - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -604,7 +606,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -668,7 +670,7 @@ describe('v2.BuildsClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -679,7 +681,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -732,7 +734,7 @@ describe('v2.BuildsClient', () => { }); }); - describe('revision', () => { + describe('revision', async () => { const fakePath = '/rendered/path/revision'; const expectedParameters = { project: 'projectValue', @@ -744,7 +746,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.revisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -808,7 +810,7 @@ describe('v2.BuildsClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -819,7 +821,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -872,7 +874,7 @@ describe('v2.BuildsClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -885,7 +887,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -960,7 +962,7 @@ describe('v2.BuildsClient', () => { }); }); - describe('workerPool', () => { + describe('workerPool', async () => { const fakePath = '/rendered/path/workerPool'; const expectedParameters = { project: 'projectValue', @@ -971,7 +973,7 @@ describe('v2.BuildsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workerPoolPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-run/test/gapic_executions_v2.ts b/packages/google-cloud-run/test/gapic_executions_v2.ts index 236c82b8184..28e721ce6bb 100644 --- a/packages/google-cloud-run/test/gapic_executions_v2.ts +++ b/packages/google-cloud-run/test/gapic_executions_v2.ts @@ -287,7 +287,9 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.executionsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetExecutionRequest() ); @@ -377,7 +379,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetExecutionRequest() ); @@ -424,7 +426,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetExecutionRequest() ); @@ -455,7 +457,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetExecutionRequest() ); @@ -476,7 +478,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteExecutionRequest() ); @@ -509,7 +511,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteExecutionRequest() ); @@ -563,7 +565,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteExecutionRequest() ); @@ -594,7 +596,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteExecutionRequest() ); @@ -627,7 +629,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -649,7 +651,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -670,7 +672,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CancelExecutionRequest() ); @@ -703,7 +705,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CancelExecutionRequest() ); @@ -757,7 +759,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CancelExecutionRequest() ); @@ -788,7 +790,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CancelExecutionRequest() ); @@ -821,7 +823,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -843,7 +845,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -864,7 +866,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListExecutionsRequest() ); @@ -897,7 +899,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListExecutionsRequest() ); @@ -946,7 +948,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListExecutionsRequest() ); @@ -977,7 +979,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListExecutionsRequest() ); @@ -1028,7 +1030,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListExecutionsRequest() ); @@ -1074,7 +1076,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListExecutionsRequest() ); @@ -1117,7 +1119,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListExecutionsRequest() ); @@ -1158,7 +1160,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1188,7 +1190,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1232,7 +1234,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1267,7 +1269,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1315,7 +1317,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1356,7 +1358,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1435,7 +1437,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1515,7 +1517,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1611,8 +1613,7 @@ describe('v2.ExecutionsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1631,7 +1632,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1640,8 +1641,7 @@ describe('v2.ExecutionsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1657,7 +1657,7 @@ describe('v2.ExecutionsClient', () => { }); describe('Path templates', () => { - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -1669,7 +1669,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1733,7 +1733,7 @@ describe('v2.ExecutionsClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1744,7 +1744,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1797,7 +1797,7 @@ describe('v2.ExecutionsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1807,7 +1807,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1846,7 +1846,7 @@ describe('v2.ExecutionsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1855,7 +1855,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1884,7 +1884,7 @@ describe('v2.ExecutionsClient', () => { }); }); - describe('revision', () => { + describe('revision', async () => { const fakePath = '/rendered/path/revision'; const expectedParameters = { project: 'projectValue', @@ -1896,7 +1896,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.revisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1960,7 +1960,7 @@ describe('v2.ExecutionsClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -1971,7 +1971,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2024,7 +2024,7 @@ describe('v2.ExecutionsClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -2037,7 +2037,7 @@ describe('v2.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-run/test/gapic_jobs_v2.ts b/packages/google-cloud-run/test/gapic_jobs_v2.ts index d9a2a584ceb..3cd08294233 100644 --- a/packages/google-cloud-run/test/gapic_jobs_v2.ts +++ b/packages/google-cloud-run/test/gapic_jobs_v2.ts @@ -287,7 +287,9 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.jobsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetJobRequest() ); @@ -374,7 +376,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetJobRequest() ); @@ -418,7 +420,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetJobRequest() ); @@ -443,7 +445,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetJobRequest() ); @@ -461,7 +463,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -492,7 +494,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -539,7 +541,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -570,7 +572,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -591,7 +593,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -622,7 +624,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -669,7 +671,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -700,7 +702,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -721,7 +723,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -753,7 +755,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -800,7 +802,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -831,7 +833,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -852,7 +854,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateJobRequest() ); @@ -881,7 +883,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateJobRequest() ); @@ -932,7 +934,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateJobRequest() ); @@ -960,7 +962,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateJobRequest() ); @@ -990,7 +992,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1012,7 +1014,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1030,7 +1032,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateJobRequest() ); @@ -1060,7 +1062,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateJobRequest() ); @@ -1112,7 +1114,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateJobRequest() ); @@ -1141,7 +1143,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateJobRequest() ); @@ -1172,7 +1174,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1194,7 +1196,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1212,7 +1214,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteJobRequest() ); @@ -1241,7 +1243,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteJobRequest() ); @@ -1292,7 +1294,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteJobRequest() ); @@ -1320,7 +1322,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteJobRequest() ); @@ -1350,7 +1352,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1372,7 +1374,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1390,7 +1392,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.RunJobRequest() ); @@ -1419,7 +1421,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.RunJobRequest() ); @@ -1470,7 +1472,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.RunJobRequest() ); @@ -1498,7 +1500,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.RunJobRequest() ); @@ -1528,7 +1530,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1550,7 +1552,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1568,7 +1570,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListJobsRequest() ); @@ -1598,7 +1600,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListJobsRequest() ); @@ -1644,7 +1646,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListJobsRequest() ); @@ -1669,7 +1671,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListJobsRequest() ); @@ -1717,7 +1719,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListJobsRequest() ); @@ -1762,7 +1764,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListJobsRequest() ); @@ -1801,7 +1803,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListJobsRequest() ); @@ -1840,7 +1842,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1870,7 +1872,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1914,7 +1916,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1949,7 +1951,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1997,7 +1999,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2038,7 +2040,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2117,7 +2119,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2197,7 +2199,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2293,8 +2295,7 @@ describe('v2.JobsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2313,7 +2314,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2322,8 +2323,7 @@ describe('v2.JobsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2339,7 +2339,7 @@ describe('v2.JobsClient', () => { }); describe('Path templates', () => { - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -2351,7 +2351,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2415,7 +2415,7 @@ describe('v2.JobsClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -2426,7 +2426,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2479,7 +2479,7 @@ describe('v2.JobsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2489,7 +2489,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2528,7 +2528,7 @@ describe('v2.JobsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2537,7 +2537,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2566,7 +2566,7 @@ describe('v2.JobsClient', () => { }); }); - describe('revision', () => { + describe('revision', async () => { const fakePath = '/rendered/path/revision'; const expectedParameters = { project: 'projectValue', @@ -2578,7 +2578,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.revisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2642,7 +2642,7 @@ describe('v2.JobsClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -2653,7 +2653,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2706,7 +2706,7 @@ describe('v2.JobsClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -2719,7 +2719,7 @@ describe('v2.JobsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-run/test/gapic_revisions_v2.ts b/packages/google-cloud-run/test/gapic_revisions_v2.ts index 200c52a9891..a63c4884641 100644 --- a/packages/google-cloud-run/test/gapic_revisions_v2.ts +++ b/packages/google-cloud-run/test/gapic_revisions_v2.ts @@ -287,7 +287,9 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.revisionsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetRevisionRequest() ); @@ -374,7 +376,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetRevisionRequest() ); @@ -418,7 +420,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetRevisionRequest() ); @@ -446,7 +448,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetRevisionRequest() ); @@ -464,7 +466,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteRevisionRequest() ); @@ -494,7 +496,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteRevisionRequest() ); @@ -545,7 +547,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteRevisionRequest() ); @@ -573,7 +575,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteRevisionRequest() ); @@ -603,7 +605,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -625,7 +627,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -646,7 +648,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListRevisionsRequest() ); @@ -676,7 +678,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListRevisionsRequest() ); @@ -722,7 +724,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListRevisionsRequest() ); @@ -750,7 +752,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListRevisionsRequest() ); @@ -798,7 +800,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListRevisionsRequest() ); @@ -841,7 +843,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListRevisionsRequest() ); @@ -881,7 +883,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListRevisionsRequest() ); @@ -919,7 +921,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -949,7 +951,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -993,7 +995,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1028,7 +1030,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1076,7 +1078,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1117,7 +1119,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1196,7 +1198,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1276,7 +1278,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1372,8 +1374,7 @@ describe('v2.RevisionsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1392,7 +1393,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1401,8 +1402,7 @@ describe('v2.RevisionsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1418,7 +1418,7 @@ describe('v2.RevisionsClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -1430,7 +1430,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1494,7 +1494,7 @@ describe('v2.RevisionsClient', () => { }); }); - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -1506,7 +1506,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1570,7 +1570,7 @@ describe('v2.RevisionsClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1581,7 +1581,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1634,7 +1634,7 @@ describe('v2.RevisionsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1644,7 +1644,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1683,7 +1683,7 @@ describe('v2.RevisionsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1692,7 +1692,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1721,7 +1721,7 @@ describe('v2.RevisionsClient', () => { }); }); - describe('revision', () => { + describe('revision', async () => { const fakePath = '/rendered/path/revision'; const expectedParameters = { project: 'projectValue', @@ -1733,7 +1733,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.revisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1797,7 +1797,7 @@ describe('v2.RevisionsClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -1808,7 +1808,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1861,7 +1861,7 @@ describe('v2.RevisionsClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -1874,7 +1874,7 @@ describe('v2.RevisionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-run/test/gapic_services_v2.ts b/packages/google-cloud-run/test/gapic_services_v2.ts index 31d698cc77b..a824765edf4 100644 --- a/packages/google-cloud-run/test/gapic_services_v2.ts +++ b/packages/google-cloud-run/test/gapic_services_v2.ts @@ -287,7 +287,9 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.servicesStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetServiceRequest() ); @@ -374,7 +376,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetServiceRequest() ); @@ -418,7 +420,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetServiceRequest() ); @@ -446,7 +448,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetServiceRequest() ); @@ -464,7 +466,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -495,7 +497,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -542,7 +544,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -573,7 +575,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -594,7 +596,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -625,7 +627,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -672,7 +674,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -703,7 +705,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -724,7 +726,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -756,7 +758,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -803,7 +805,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -834,7 +836,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -855,7 +857,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateServiceRequest() ); @@ -885,7 +887,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateServiceRequest() ); @@ -936,7 +938,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateServiceRequest() ); @@ -964,7 +966,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.CreateServiceRequest() ); @@ -994,7 +996,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1016,7 +1018,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1037,7 +1039,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateServiceRequest() ); @@ -1068,7 +1070,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateServiceRequest() ); @@ -1120,7 +1122,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateServiceRequest() ); @@ -1149,7 +1151,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.UpdateServiceRequest() ); @@ -1180,7 +1182,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1202,7 +1204,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1223,7 +1225,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteServiceRequest() ); @@ -1253,7 +1255,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteServiceRequest() ); @@ -1304,7 +1306,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteServiceRequest() ); @@ -1332,7 +1334,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.DeleteServiceRequest() ); @@ -1362,7 +1364,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1384,7 +1386,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1405,7 +1407,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListServicesRequest() ); @@ -1435,7 +1437,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListServicesRequest() ); @@ -1481,7 +1483,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListServicesRequest() ); @@ -1509,7 +1511,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListServicesRequest() ); @@ -1557,7 +1559,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListServicesRequest() ); @@ -1602,7 +1604,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListServicesRequest() ); @@ -1642,7 +1644,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListServicesRequest() ); @@ -1680,7 +1682,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1710,7 +1712,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1754,7 +1756,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1789,7 +1791,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1837,7 +1839,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1878,7 +1880,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1957,7 +1959,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2037,7 +2039,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2133,8 +2135,7 @@ describe('v2.ServicesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2153,7 +2154,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2162,8 +2163,7 @@ describe('v2.ServicesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2179,7 +2179,7 @@ describe('v2.ServicesClient', () => { }); describe('Path templates', () => { - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -2191,7 +2191,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2255,7 +2255,7 @@ describe('v2.ServicesClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -2266,7 +2266,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2319,7 +2319,7 @@ describe('v2.ServicesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2329,7 +2329,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2368,7 +2368,7 @@ describe('v2.ServicesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2377,7 +2377,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2406,7 +2406,7 @@ describe('v2.ServicesClient', () => { }); }); - describe('revision', () => { + describe('revision', async () => { const fakePath = '/rendered/path/revision'; const expectedParameters = { project: 'projectValue', @@ -2418,7 +2418,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.revisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2482,7 +2482,7 @@ describe('v2.ServicesClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -2493,7 +2493,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2546,7 +2546,7 @@ describe('v2.ServicesClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -2559,7 +2559,7 @@ describe('v2.ServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-run/test/gapic_tasks_v2.ts b/packages/google-cloud-run/test/gapic_tasks_v2.ts index 261f8002e0a..5a15bbe8eb4 100644 --- a/packages/google-cloud-run/test/gapic_tasks_v2.ts +++ b/packages/google-cloud-run/test/gapic_tasks_v2.ts @@ -250,7 +250,9 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tasksStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetTaskRequest() ); @@ -340,7 +342,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetTaskRequest() ); @@ -387,7 +389,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetTaskRequest() ); @@ -415,7 +417,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.GetTaskRequest() ); @@ -436,7 +438,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListTasksRequest() ); @@ -469,7 +471,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListTasksRequest() ); @@ -518,7 +520,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListTasksRequest() ); @@ -546,7 +548,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListTasksRequest() ); @@ -597,7 +599,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListTasksRequest() ); @@ -645,7 +647,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListTasksRequest() ); @@ -687,7 +689,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.run.v2.ListTasksRequest() ); @@ -729,7 +731,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -759,7 +761,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -803,7 +805,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -838,7 +840,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -886,7 +888,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -923,7 +925,7 @@ describe('v2.TasksClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -935,7 +937,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -999,7 +1001,7 @@ describe('v2.TasksClient', () => { }); }); - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -1011,7 +1013,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1075,7 +1077,7 @@ describe('v2.TasksClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1086,7 +1088,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1139,7 +1141,7 @@ describe('v2.TasksClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1149,7 +1151,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1188,7 +1190,7 @@ describe('v2.TasksClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1197,7 +1199,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1226,7 +1228,7 @@ describe('v2.TasksClient', () => { }); }); - describe('revision', () => { + describe('revision', async () => { const fakePath = '/rendered/path/revision'; const expectedParameters = { project: 'projectValue', @@ -1238,7 +1240,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.revisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1302,7 +1304,7 @@ describe('v2.TasksClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -1313,7 +1315,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1366,7 +1368,7 @@ describe('v2.TasksClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -1379,7 +1381,7 @@ describe('v2.TasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-scheduler/package.json b/packages/google-cloud-scheduler/package.json index 9ab561eeab2..1b151d76e9c 100644 --- a/packages/google-cloud-scheduler/package.json +++ b/packages/google-cloud-scheduler/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json index 9ef050b4447..15df73b1bae 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json index 22b238cefd7..2a3b6194ae3 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json index f5269ccd0c1..b0e55669b61 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json index f5269ccd0c1..b0e55669b61 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts b/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts index 782ce93e88e..ed9da65f138 100644 --- a/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts +++ b/packages/google-cloud-scheduler/src/v1/cloud_scheduler_client.ts @@ -484,7 +484,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -598,7 +600,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -719,7 +723,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ 'job.name': request.job!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJob request %j', request); const wrappedCallback: | Callback< @@ -826,7 +832,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJob request %j', request); const wrappedCallback: | Callback< @@ -942,7 +950,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseJob request %j', request); const wrappedCallback: | Callback< @@ -1057,7 +1067,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeJob request %j', request); const wrappedCallback: | Callback< @@ -1167,7 +1179,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runJob request %j', request); const wrappedCallback: | Callback< @@ -1292,7 +1306,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.scheduler.v1.IListJobsRequest, @@ -1366,7 +1382,9 @@ export class CloudSchedulerClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -1424,7 +1442,9 @@ export class CloudSchedulerClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, diff --git a/packages/google-cloud-scheduler/src/v1beta1/cloud_scheduler_client.ts b/packages/google-cloud-scheduler/src/v1beta1/cloud_scheduler_client.ts index b4939439ca6..f8300d60ffc 100644 --- a/packages/google-cloud-scheduler/src/v1beta1/cloud_scheduler_client.ts +++ b/packages/google-cloud-scheduler/src/v1beta1/cloud_scheduler_client.ts @@ -486,7 +486,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -610,7 +612,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -741,7 +745,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ 'job.name': request.job!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJob request %j', request); const wrappedCallback: | Callback< @@ -862,7 +868,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJob request %j', request); const wrappedCallback: | Callback< @@ -983,7 +991,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseJob request %j', request); const wrappedCallback: | Callback< @@ -1110,7 +1120,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeJob request %j', request); const wrappedCallback: | Callback< @@ -1228,7 +1240,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runJob request %j', request); const wrappedCallback: | Callback< @@ -1380,7 +1394,9 @@ export class CloudSchedulerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.scheduler.v1beta1.IListJobsRequest, @@ -1473,7 +1489,9 @@ export class CloudSchedulerClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -1548,7 +1566,9 @@ export class CloudSchedulerClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, diff --git a/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts b/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts index 45c896db298..1cb1804e8b0 100644 --- a/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts +++ b/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1.ts @@ -255,7 +255,9 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudSchedulerStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.GetJobRequest() ); @@ -345,7 +347,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.GetJobRequest() ); @@ -392,7 +394,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.GetJobRequest() ); @@ -420,7 +422,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.GetJobRequest() ); @@ -441,7 +443,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.CreateJobRequest() ); @@ -472,7 +474,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.CreateJobRequest() ); @@ -519,7 +521,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.CreateJobRequest() ); @@ -547,7 +549,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.CreateJobRequest() ); @@ -568,7 +570,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.UpdateJobRequest() ); @@ -600,7 +602,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.UpdateJobRequest() ); @@ -648,7 +650,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.UpdateJobRequest() ); @@ -677,7 +679,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.UpdateJobRequest() ); @@ -699,7 +701,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.DeleteJobRequest() ); @@ -730,7 +732,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.DeleteJobRequest() ); @@ -777,7 +779,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.DeleteJobRequest() ); @@ -805,7 +807,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.DeleteJobRequest() ); @@ -826,7 +828,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.PauseJobRequest() ); @@ -857,7 +859,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.PauseJobRequest() ); @@ -904,7 +906,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.PauseJobRequest() ); @@ -932,7 +934,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.PauseJobRequest() ); @@ -953,7 +955,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ResumeJobRequest() ); @@ -984,7 +986,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ResumeJobRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ResumeJobRequest() ); @@ -1059,7 +1061,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ResumeJobRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.RunJobRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.RunJobRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.RunJobRequest() ); @@ -1186,7 +1188,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.RunJobRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ListJobsRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ListJobsRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ListJobsRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ListJobsRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ListJobsRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ListJobsRequest() ); @@ -1458,7 +1460,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1.ListJobsRequest() ); @@ -1500,7 +1502,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1530,7 +1532,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1574,7 +1576,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1609,7 +1611,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1657,7 +1659,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.CloudSchedulerClient', () => { }); describe('Path templates', () => { - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1705,7 +1707,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1758,7 +1760,7 @@ describe('v1.CloudSchedulerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1768,7 +1770,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1807,7 +1809,7 @@ describe('v1.CloudSchedulerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1816,7 +1818,7 @@ describe('v1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1beta1.ts b/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1beta1.ts index cd455d9dc8a..9dd67c6f7aa 100644 --- a/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1beta1.ts +++ b/packages/google-cloud-scheduler/test/gapic_cloud_scheduler_v1beta1.ts @@ -256,7 +256,9 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudSchedulerStub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.GetJobRequest() ); @@ -346,7 +348,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.GetJobRequest() ); @@ -393,7 +395,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.GetJobRequest() ); @@ -421,7 +423,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.GetJobRequest() ); @@ -442,7 +444,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.CreateJobRequest() ); @@ -473,7 +475,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.CreateJobRequest() ); @@ -520,7 +522,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.CreateJobRequest() ); @@ -548,7 +550,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.CreateJobRequest() ); @@ -569,7 +571,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.UpdateJobRequest() ); @@ -601,7 +603,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.UpdateJobRequest() ); @@ -649,7 +651,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.UpdateJobRequest() ); @@ -678,7 +680,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.UpdateJobRequest() ); @@ -700,7 +702,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.DeleteJobRequest() ); @@ -731,7 +733,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.DeleteJobRequest() ); @@ -778,7 +780,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.DeleteJobRequest() ); @@ -806,7 +808,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.DeleteJobRequest() ); @@ -827,7 +829,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.PauseJobRequest() ); @@ -858,7 +860,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.PauseJobRequest() ); @@ -905,7 +907,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.PauseJobRequest() ); @@ -933,7 +935,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.PauseJobRequest() ); @@ -954,7 +956,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ResumeJobRequest() ); @@ -985,7 +987,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ResumeJobRequest() ); @@ -1032,7 +1034,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ResumeJobRequest() ); @@ -1060,7 +1062,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ResumeJobRequest() ); @@ -1081,7 +1083,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.RunJobRequest() ); @@ -1112,7 +1114,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.RunJobRequest() ); @@ -1159,7 +1161,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.RunJobRequest() ); @@ -1187,7 +1189,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.RunJobRequest() ); @@ -1208,7 +1210,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ListJobsRequest() ); @@ -1241,7 +1243,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ListJobsRequest() ); @@ -1290,7 +1292,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ListJobsRequest() ); @@ -1318,7 +1320,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ListJobsRequest() ); @@ -1372,7 +1374,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ListJobsRequest() ); @@ -1423,7 +1425,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ListJobsRequest() ); @@ -1465,7 +1467,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.scheduler.v1beta1.ListJobsRequest() ); @@ -1507,7 +1509,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1537,7 +1539,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1581,7 +1583,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1616,7 +1618,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1664,7 +1666,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1701,7 +1703,7 @@ describe('v1beta1.CloudSchedulerClient', () => { }); describe('Path templates', () => { - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1712,7 +1714,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1765,7 +1767,7 @@ describe('v1beta1.CloudSchedulerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1775,7 +1777,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1814,7 +1816,7 @@ describe('v1beta1.CloudSchedulerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1823,7 +1825,7 @@ describe('v1beta1.CloudSchedulerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-secretmanager/package.json b/packages/google-cloud-secretmanager/package.json index b6fc0553c3d..239ef2a5c72 100644 --- a/packages/google-cloud-secretmanager/package.json +++ b/packages/google-cloud-secretmanager/package.json @@ -41,7 +41,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json index fe703c056dc..cac04cc27b6 100644 --- a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json +++ b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-secretmanager", - "version": "5.6.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json index e64d697071f..b388ae5b6a1 100644 --- a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json +++ b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-secretmanager", - "version": "5.6.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json b/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json index 192a35ec094..0cb862e353a 100644 --- a/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json +++ b/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-secretmanager", - "version": "5.6.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-secretmanager/src/v1/secret_manager_service_client.ts b/packages/google-cloud-secretmanager/src/v1/secret_manager_service_client.ts index a102d456b16..36f66d67ee4 100644 --- a/packages/google-cloud-secretmanager/src/v1/secret_manager_service_client.ts +++ b/packages/google-cloud-secretmanager/src/v1/secret_manager_service_client.ts @@ -537,7 +537,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSecret request %j', request); const wrappedCallback: | Callback< @@ -661,7 +663,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -776,7 +780,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSecret request %j', request); const wrappedCallback: | Callback< @@ -896,7 +902,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ 'secret.name': request.secret!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecret request %j', request); const wrappedCallback: | Callback< @@ -1018,7 +1026,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSecret request %j', request); const wrappedCallback: | Callback< @@ -1146,7 +1156,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1283,7 +1295,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('accessSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1420,7 +1434,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('disableSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1557,7 +1573,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enableSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1695,7 +1713,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('destroySecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1824,7 +1844,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1935,7 +1957,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2053,7 +2077,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2186,7 +2212,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.secretmanager.v1.IListSecretsRequest, @@ -2262,7 +2290,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecrets stream %j', request); return this.descriptors.page.listSecrets.createStream( this.innerApiCalls.listSecrets as GaxCall, @@ -2320,7 +2350,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecrets iterate %j', request); return this.descriptors.page.listSecrets.asyncIterate( this.innerApiCalls['listSecrets'] as GaxCall, @@ -2435,7 +2467,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.secretmanager.v1.IListSecretVersionsRequest, @@ -2512,7 +2546,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecretVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecretVersions stream %j', request); return this.descriptors.page.listSecretVersions.createStream( this.innerApiCalls.listSecretVersions as GaxCall, @@ -2571,7 +2607,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecretVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecretVersions iterate %j', request); return this.descriptors.page.listSecretVersions.asyncIterate( this.innerApiCalls['listSecretVersions'] as GaxCall, diff --git a/packages/google-cloud-secretmanager/src/v1beta2/secret_manager_service_client.ts b/packages/google-cloud-secretmanager/src/v1beta2/secret_manager_service_client.ts index f7db283e233..d8046f53112 100644 --- a/packages/google-cloud-secretmanager/src/v1beta2/secret_manager_service_client.ts +++ b/packages/google-cloud-secretmanager/src/v1beta2/secret_manager_service_client.ts @@ -538,7 +538,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSecret request %j', request); const wrappedCallback: | Callback< @@ -672,7 +674,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -794,7 +798,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSecret request %j', request); const wrappedCallback: | Callback< @@ -923,7 +929,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ 'secret.name': request.secret!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecret request %j', request); const wrappedCallback: | Callback< @@ -1054,7 +1062,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSecret request %j', request); const wrappedCallback: | Callback< @@ -1191,7 +1201,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1329,7 +1341,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('accessSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1467,7 +1481,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('disableSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1605,7 +1621,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enableSecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1744,7 +1762,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('destroySecretVersion request %j', request); const wrappedCallback: | Callback< @@ -1873,7 +1893,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1984,7 +2006,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2102,7 +2126,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2235,7 +2261,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.secretmanager.v1beta2.IListSecretsRequest, @@ -2311,7 +2339,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecrets stream %j', request); return this.descriptors.page.listSecrets.createStream( this.innerApiCalls.listSecrets as GaxCall, @@ -2369,7 +2399,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecrets iterate %j', request); return this.descriptors.page.listSecrets.asyncIterate( this.innerApiCalls['listSecrets'] as GaxCall, @@ -2484,7 +2516,9 @@ export class SecretManagerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.secretmanager.v1beta2.IListSecretVersionsRequest, @@ -2561,7 +2595,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecretVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecretVersions stream %j', request); return this.descriptors.page.listSecretVersions.createStream( this.innerApiCalls.listSecretVersions as GaxCall, @@ -2620,7 +2656,9 @@ export class SecretManagerServiceClient { }); const defaultCallSettings = this._defaults['listSecretVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecretVersions iterate %j', request); return this.descriptors.page.listSecretVersions.asyncIterate( this.innerApiCalls['listSecretVersions'] as GaxCall, diff --git a/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1.ts b/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1.ts index d03a805e433..79d15e2dc8a 100644 --- a/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1.ts +++ b/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1.ts @@ -266,7 +266,9 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.secretManagerServiceStub); client.close().then(() => { done(); @@ -329,7 +331,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.CreateSecretRequest() ); @@ -361,7 +363,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.CreateSecretRequest() ); @@ -409,7 +411,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.CreateSecretRequest() ); @@ -441,7 +443,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.CreateSecretRequest() ); @@ -463,7 +465,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AddSecretVersionRequest() ); @@ -495,7 +497,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AddSecretVersionRequest() ); @@ -543,7 +545,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AddSecretVersionRequest() ); @@ -575,7 +577,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AddSecretVersionRequest() ); @@ -597,7 +599,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretRequest() ); @@ -629,7 +631,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretRequest() ); @@ -677,7 +679,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretRequest() ); @@ -706,7 +708,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretRequest() ); @@ -728,7 +730,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.UpdateSecretRequest() ); @@ -761,7 +763,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.UpdateSecretRequest() ); @@ -810,7 +812,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.UpdateSecretRequest() ); @@ -843,7 +845,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.UpdateSecretRequest() ); @@ -866,7 +868,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DeleteSecretRequest() ); @@ -898,7 +900,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DeleteSecretRequest() ); @@ -946,7 +948,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DeleteSecretRequest() ); @@ -978,7 +980,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DeleteSecretRequest() ); @@ -1000,7 +1002,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretVersionRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretVersionRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretVersionRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.GetSecretVersionRequest() ); @@ -1134,7 +1136,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AccessSecretVersionRequest() ); @@ -1167,7 +1169,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AccessSecretVersionRequest() ); @@ -1215,7 +1217,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AccessSecretVersionRequest() ); @@ -1247,7 +1249,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.AccessSecretVersionRequest() ); @@ -1269,7 +1271,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DisableSecretVersionRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DisableSecretVersionRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DisableSecretVersionRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DisableSecretVersionRequest() ); @@ -1404,7 +1406,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.EnableSecretVersionRequest() ); @@ -1437,7 +1439,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.EnableSecretVersionRequest() ); @@ -1485,7 +1487,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.EnableSecretVersionRequest() ); @@ -1517,7 +1519,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.EnableSecretVersionRequest() ); @@ -1539,7 +1541,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DestroySecretVersionRequest() ); @@ -1572,7 +1574,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DestroySecretVersionRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DestroySecretVersionRequest() ); @@ -1652,7 +1654,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.DestroySecretVersionRequest() ); @@ -1674,7 +1676,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1706,7 +1708,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1754,7 +1756,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1786,7 +1788,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1808,7 +1810,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1840,7 +1842,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1888,7 +1890,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1920,7 +1922,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1942,7 +1944,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1975,7 +1977,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2023,7 +2025,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2055,7 +2057,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2077,7 +2079,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretsRequest() ); @@ -2117,7 +2119,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretsRequest() ); @@ -2173,7 +2175,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretsRequest() ); @@ -2205,7 +2207,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretsRequest() ); @@ -2266,7 +2268,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretsRequest() ); @@ -2318,7 +2320,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretsRequest() ); @@ -2368,7 +2370,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretsRequest() ); @@ -2413,7 +2415,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretVersionsRequest() ); @@ -2454,7 +2456,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretVersionsRequest() ); @@ -2512,7 +2514,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretVersionsRequest() ); @@ -2544,7 +2546,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretVersionsRequest() ); @@ -2606,7 +2608,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretVersionsRequest() ); @@ -2657,7 +2659,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretVersionsRequest() ); @@ -2708,7 +2710,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1.ListSecretVersionsRequest() ); @@ -2751,7 +2753,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2782,7 +2784,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2827,7 +2829,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2863,7 +2865,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2912,7 +2914,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2949,7 +2951,7 @@ describe('v1.SecretManagerServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2959,7 +2961,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2988,7 +2990,7 @@ describe('v1.SecretManagerServiceClient', () => { }); }); - describe('projectLocationSecret', () => { + describe('projectLocationSecret', async () => { const fakePath = '/rendered/path/projectLocationSecret'; const expectedParameters = { project: 'projectValue', @@ -3000,7 +3002,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationSecretPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3068,7 +3070,7 @@ describe('v1.SecretManagerServiceClient', () => { }); }); - describe('projectLocationSecretSecretVersion', () => { + describe('projectLocationSecretSecretVersion', async () => { const fakePath = '/rendered/path/projectLocationSecretSecretVersion'; const expectedParameters = { project: 'projectValue', @@ -3081,7 +3083,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationSecretSecretVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationSecretSecretVersionPathTemplate.match = @@ -3170,7 +3172,7 @@ describe('v1.SecretManagerServiceClient', () => { }); }); - describe('projectSecret', () => { + describe('projectSecret', async () => { const fakePath = '/rendered/path/projectSecret'; const expectedParameters = { project: 'projectValue', @@ -3181,7 +3183,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSecretPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3220,7 +3222,7 @@ describe('v1.SecretManagerServiceClient', () => { }); }); - describe('projectSecretSecretVersion', () => { + describe('projectSecretSecretVersion', async () => { const fakePath = '/rendered/path/projectSecretSecretVersion'; const expectedParameters = { project: 'projectValue', @@ -3232,7 +3234,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSecretSecretVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3300,7 +3302,7 @@ describe('v1.SecretManagerServiceClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -3311,7 +3313,7 @@ describe('v1.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1beta2.ts b/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1beta2.ts index 4e9e5a5c1ef..b7792283605 100644 --- a/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1beta2.ts +++ b/packages/google-cloud-secretmanager/test/gapic_secret_manager_service_v1beta2.ts @@ -268,7 +268,9 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.secretManagerServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.CreateSecretRequest() ); @@ -363,7 +365,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.CreateSecretRequest() ); @@ -411,7 +413,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.CreateSecretRequest() ); @@ -443,7 +445,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.CreateSecretRequest() ); @@ -465,7 +467,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AddSecretVersionRequest() ); @@ -497,7 +499,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AddSecretVersionRequest() ); @@ -545,7 +547,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AddSecretVersionRequest() ); @@ -577,7 +579,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AddSecretVersionRequest() ); @@ -599,7 +601,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretRequest() ); @@ -631,7 +633,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretRequest() ); @@ -679,7 +681,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretRequest() ); @@ -708,7 +710,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretRequest() ); @@ -730,7 +732,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.UpdateSecretRequest() ); @@ -763,7 +765,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.UpdateSecretRequest() ); @@ -812,7 +814,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.UpdateSecretRequest() ); @@ -845,7 +847,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.UpdateSecretRequest() ); @@ -868,7 +870,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DeleteSecretRequest() ); @@ -900,7 +902,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DeleteSecretRequest() ); @@ -948,7 +950,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DeleteSecretRequest() ); @@ -980,7 +982,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DeleteSecretRequest() ); @@ -1002,7 +1004,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretVersionRequest() ); @@ -1034,7 +1036,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretVersionRequest() ); @@ -1082,7 +1084,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretVersionRequest() ); @@ -1114,7 +1116,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.GetSecretVersionRequest() ); @@ -1136,7 +1138,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest() ); @@ -1169,7 +1171,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest() ); @@ -1217,7 +1219,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest() ); @@ -1249,7 +1251,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest() ); @@ -1271,7 +1273,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest() ); @@ -1304,7 +1306,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest() ); @@ -1352,7 +1354,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest() ); @@ -1384,7 +1386,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest() ); @@ -1406,7 +1408,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest() ); @@ -1439,7 +1441,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest() ); @@ -1487,7 +1489,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest() ); @@ -1519,7 +1521,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest() ); @@ -1541,7 +1543,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest() ); @@ -1574,7 +1576,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest() ); @@ -1622,7 +1624,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest() ); @@ -1654,7 +1656,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest() ); @@ -1676,7 +1678,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1708,7 +1710,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1756,7 +1758,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1788,7 +1790,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1810,7 +1812,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1842,7 +1844,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1890,7 +1892,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1922,7 +1924,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1944,7 +1946,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1977,7 +1979,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2025,7 +2027,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2057,7 +2059,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2079,7 +2081,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretsRequest() ); @@ -2119,7 +2121,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretsRequest() ); @@ -2175,7 +2177,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretsRequest() ); @@ -2207,7 +2209,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretsRequest() ); @@ -2269,7 +2271,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretsRequest() ); @@ -2322,7 +2324,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretsRequest() ); @@ -2372,7 +2374,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretsRequest() ); @@ -2418,7 +2420,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest() ); @@ -2459,7 +2461,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest() ); @@ -2517,7 +2519,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest() ); @@ -2549,7 +2551,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest() ); @@ -2613,7 +2615,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest() ); @@ -2666,7 +2668,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest() ); @@ -2717,7 +2719,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest() ); @@ -2760,7 +2762,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2791,7 +2793,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2836,7 +2838,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2872,7 +2874,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2921,7 +2923,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2958,7 +2960,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2968,7 +2970,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2997,7 +2999,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { }); }); - describe('projectLocationSecret', () => { + describe('projectLocationSecret', async () => { const fakePath = '/rendered/path/projectLocationSecret'; const expectedParameters = { project: 'projectValue', @@ -3009,7 +3011,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationSecretPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3077,7 +3079,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { }); }); - describe('projectLocationSecretSecretVersion', () => { + describe('projectLocationSecretSecretVersion', async () => { const fakePath = '/rendered/path/projectLocationSecretSecretVersion'; const expectedParameters = { project: 'projectValue', @@ -3090,7 +3092,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationSecretSecretVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationSecretSecretVersionPathTemplate.match = @@ -3179,7 +3181,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { }); }); - describe('projectSecret', () => { + describe('projectSecret', async () => { const fakePath = '/rendered/path/projectSecret'; const expectedParameters = { project: 'projectValue', @@ -3190,7 +3192,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSecretPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3229,7 +3231,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { }); }); - describe('projectSecretSecretVersion', () => { + describe('projectSecretSecretVersion', async () => { const fakePath = '/rendered/path/projectSecretSecretVersion'; const expectedParameters = { project: 'projectValue', @@ -3241,7 +3243,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSecretSecretVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3309,7 +3311,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -3320,7 +3322,7 @@ describe('v1beta2.SecretManagerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-securesourcemanager/package.json b/packages/google-cloud-securesourcemanager/package.json index 28e64adc5e2..352f58dd2ca 100644 --- a/packages/google-cloud-securesourcemanager/package.json +++ b/packages/google-cloud-securesourcemanager/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json b/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json index ad7108782b9..a069a791088 100644 --- a/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json +++ b/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securesourcemanager", - "version": "0.4.1", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securesourcemanager/src/v1/secure_source_manager_client.ts b/packages/google-cloud-securesourcemanager/src/v1/secure_source_manager_client.ts index 166d118dbc8..df11edd8fbe 100644 --- a/packages/google-cloud-securesourcemanager/src/v1/secure_source_manager_client.ts +++ b/packages/google-cloud-securesourcemanager/src/v1/secure_source_manager_client.ts @@ -690,7 +690,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -819,7 +821,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRepository request %j', request); const wrappedCallback: | Callback< @@ -934,7 +938,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicyRepo request %j', request); const wrappedCallback: | Callback< @@ -1052,7 +1058,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicyRepo request %j', request); const wrappedCallback: | Callback< @@ -1165,7 +1173,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissionsRepo request %j', request); const wrappedCallback: | Callback< @@ -1287,7 +1297,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBranchRule request %j', request); const wrappedCallback: | Callback< @@ -1437,7 +1449,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1618,7 +1632,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1794,7 +1810,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1968,7 +1986,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2136,7 +2156,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2311,7 +2333,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ 'branch_rule.name': request.branchRule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2480,7 +2504,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2647,7 +2673,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, @@ -2717,7 +2745,9 @@ export class SecureSourceManagerClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -2769,7 +2799,9 @@ export class SecureSourceManagerClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2884,7 +2916,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, @@ -2960,7 +2994,9 @@ export class SecureSourceManagerClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories stream %j', request); return this.descriptors.page.listRepositories.createStream( this.innerApiCalls.listRepositories as GaxCall, @@ -3018,7 +3054,9 @@ export class SecureSourceManagerClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories iterate %j', request); return this.descriptors.page.listRepositories.asyncIterate( this.innerApiCalls['listRepositories'] as GaxCall, @@ -3117,7 +3155,9 @@ export class SecureSourceManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, @@ -3179,7 +3219,9 @@ export class SecureSourceManagerClient { }); const defaultCallSettings = this._defaults['listBranchRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBranchRules stream %j', request); return this.descriptors.page.listBranchRules.createStream( this.innerApiCalls.listBranchRules as GaxCall, @@ -3223,7 +3265,9 @@ export class SecureSourceManagerClient { }); const defaultCallSettings = this._defaults['listBranchRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBranchRules iterate %j', request); return this.descriptors.page.listBranchRules.asyncIterate( this.innerApiCalls['listBranchRules'] as GaxCall, @@ -3541,7 +3585,7 @@ export class SecureSourceManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-securesourcemanager/test/gapic_secure_source_manager_v1.ts b/packages/google-cloud-securesourcemanager/test/gapic_secure_source_manager_v1.ts index f0f9db7b77e..3245f9a7a88 100644 --- a/packages/google-cloud-securesourcemanager/test/gapic_secure_source_manager_v1.ts +++ b/packages/google-cloud-securesourcemanager/test/gapic_secure_source_manager_v1.ts @@ -304,7 +304,9 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.secureSourceManagerStub); client.close().then(() => { done(); @@ -371,7 +373,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetInstanceRequest() ); @@ -404,7 +406,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetInstanceRequest() ); @@ -453,7 +455,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetInstanceRequest() ); @@ -486,7 +488,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetInstanceRequest() ); @@ -509,7 +511,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetRepositoryRequest() ); @@ -542,7 +544,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetRepositoryRequest() ); @@ -591,7 +593,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetRepositoryRequest() ); @@ -624,7 +626,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetRepositoryRequest() ); @@ -647,7 +649,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -680,7 +682,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -729,7 +731,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -762,7 +764,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -785,7 +787,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -818,7 +820,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -867,7 +869,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -900,7 +902,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -923,7 +925,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -957,7 +959,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1006,7 +1008,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetBranchRuleRequest() ); @@ -1101,7 +1103,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetBranchRuleRequest() ); @@ -1150,7 +1152,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetBranchRuleRequest() ); @@ -1183,7 +1185,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.GetBranchRuleRequest() ); @@ -1206,7 +1208,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateInstanceRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateInstanceRequest() ); @@ -1297,7 +1299,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateInstanceRequest() ); @@ -1330,7 +1332,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateInstanceRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1389,7 +1391,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1412,7 +1414,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteInstanceRequest() ); @@ -1447,7 +1449,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteInstanceRequest() ); @@ -1503,7 +1505,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteInstanceRequest() ); @@ -1536,7 +1538,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteInstanceRequest() ); @@ -1571,7 +1573,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1595,7 +1597,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1618,7 +1620,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateRepositoryRequest() ); @@ -1653,7 +1655,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateRepositoryRequest() ); @@ -1709,7 +1711,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateRepositoryRequest() ); @@ -1742,7 +1744,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateRepositoryRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1801,7 +1803,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1824,7 +1826,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest() ); @@ -1859,7 +1861,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest() ); @@ -1915,7 +1917,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest() ); @@ -1948,7 +1950,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest() ); @@ -1983,7 +1985,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2007,7 +2009,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2030,7 +2032,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest() ); @@ -2065,7 +2067,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest() ); @@ -2121,7 +2123,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest() ); @@ -2154,7 +2156,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest() ); @@ -2189,7 +2191,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2213,7 +2215,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2236,7 +2238,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest() ); @@ -2272,7 +2274,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest() ); @@ -2329,7 +2331,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest() ); @@ -2363,7 +2365,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest() ); @@ -2399,7 +2401,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2423,7 +2425,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2446,7 +2448,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest() ); @@ -2481,7 +2483,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest() ); @@ -2537,7 +2539,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest() ); @@ -2570,7 +2572,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest() ); @@ -2605,7 +2607,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2629,7 +2631,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2652,7 +2654,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListInstancesRequest() ); @@ -2693,7 +2695,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListInstancesRequest() ); @@ -2752,7 +2754,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListInstancesRequest() ); @@ -2785,7 +2787,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListInstancesRequest() ); @@ -2848,7 +2850,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListInstancesRequest() ); @@ -2900,7 +2902,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListInstancesRequest() ); @@ -2952,7 +2954,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListInstancesRequest() ); @@ -2997,7 +2999,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListRepositoriesRequest() ); @@ -3038,7 +3040,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListRepositoriesRequest() ); @@ -3097,7 +3099,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListRepositoriesRequest() ); @@ -3130,7 +3132,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListRepositoriesRequest() ); @@ -3193,7 +3195,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListRepositoriesRequest() ); @@ -3245,7 +3247,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListRepositoriesRequest() ); @@ -3297,7 +3299,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListRepositoriesRequest() ); @@ -3342,7 +3344,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListBranchRulesRequest() ); @@ -3383,7 +3385,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListBranchRulesRequest() ); @@ -3442,7 +3444,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListBranchRulesRequest() ); @@ -3475,7 +3477,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListBranchRulesRequest() ); @@ -3538,7 +3540,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListBranchRulesRequest() ); @@ -3590,7 +3592,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListBranchRulesRequest() ); @@ -3642,7 +3644,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securesourcemanager.v1.ListBranchRulesRequest() ); @@ -3686,7 +3688,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3718,7 +3720,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3764,7 +3766,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3798,7 +3800,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3830,7 +3832,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3876,7 +3878,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3910,7 +3912,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3945,7 +3947,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3991,7 +3993,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4028,7 +4030,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4060,7 +4062,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4106,7 +4108,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4143,7 +4145,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4193,7 +4195,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4236,7 +4238,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4321,7 +4323,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4407,7 +4409,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4509,8 +4511,7 @@ describe('v1.SecureSourceManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4531,7 +4532,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4540,8 +4541,7 @@ describe('v1.SecureSourceManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4557,7 +4557,7 @@ describe('v1.SecureSourceManagerClient', () => { }); describe('Path templates', () => { - describe('branchRule', () => { + describe('branchRule', async () => { const fakePath = '/rendered/path/branchRule'; const expectedParameters = { project: 'projectValue', @@ -4571,7 +4571,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.branchRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4635,7 +4635,7 @@ describe('v1.SecureSourceManagerClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -4649,7 +4649,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4713,7 +4713,7 @@ describe('v1.SecureSourceManagerClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -4726,7 +4726,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4779,7 +4779,7 @@ describe('v1.SecureSourceManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4791,7 +4791,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4830,7 +4830,7 @@ describe('v1.SecureSourceManagerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4841,7 +4841,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4870,7 +4870,7 @@ describe('v1.SecureSourceManagerClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -4883,7 +4883,7 @@ describe('v1.SecureSourceManagerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 20e8a82e0cc..8480dbefab9 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index bb32d3c5b8f..08c681034d8 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "5.4.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json index 5a9790012c0..d33e07f5660 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "5.4.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index 6d9225abe1f..6500438ad49 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "5.4.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json index 6d9225abe1f..6500438ad49 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "5.4.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 766d20f3ef7..d9eb82ff8ad 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -904,7 +904,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCertificate request %j', request); const wrappedCallback: | Callback< @@ -1031,7 +1033,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificate request %j', request); const wrappedCallback: | Callback< @@ -1176,7 +1180,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('revokeCertificate request %j', request); const wrappedCallback: | Callback< @@ -1320,7 +1326,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ 'certificate.name': request.certificate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCertificate request %j', request); const wrappedCallback: | Callback< @@ -1457,7 +1465,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchCertificateAuthorityCsr request %j', request); const wrappedCallback: | Callback< @@ -1586,7 +1596,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateAuthority request %j', request); const wrappedCallback: | Callback< @@ -1706,7 +1718,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCaPool request %j', request); const wrappedCallback: | Callback< @@ -1850,7 +1864,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ ca_pool: request.caPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchCaCerts request %j', request); const wrappedCallback: | Callback< @@ -1980,7 +1996,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateRevocationList request %j', request); const wrappedCallback: | Callback< @@ -2109,7 +2127,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateTemplate request %j', request); const wrappedCallback: | Callback< @@ -2272,7 +2292,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2471,7 +2493,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2660,7 +2684,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2850,7 +2876,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3035,7 +3063,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3237,7 +3267,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3423,7 +3455,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ 'certificate_authority.name': request.certificateAuthority!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3612,7 +3646,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3796,7 +3832,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ 'ca_pool.name': request.caPool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3984,7 +4022,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4171,7 +4211,9 @@ export class CertificateAuthorityServiceClient { 'certificate_revocation_list.name': request.certificateRevocationList!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4369,7 +4411,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4553,7 +4597,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4739,7 +4785,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ 'certificate_template.name': request.certificateTemplate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4919,7 +4967,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1.IListCertificatesRequest, @@ -5002,7 +5052,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificates stream %j', request); return this.descriptors.page.listCertificates.createStream( this.innerApiCalls.listCertificates as GaxCall, @@ -5067,7 +5119,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificates iterate %j', request); return this.descriptors.page.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, @@ -5185,7 +5239,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, @@ -5265,7 +5321,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateAuthorities stream %j', request); return this.descriptors.page.listCertificateAuthorities.createStream( this.innerApiCalls.listCertificateAuthorities as GaxCall, @@ -5327,7 +5385,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateAuthorities iterate %j', request); return this.descriptors.page.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, @@ -5442,7 +5502,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, @@ -5520,7 +5582,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCaPools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCaPools stream %j', request); return this.descriptors.page.listCaPools.createStream( this.innerApiCalls.listCaPools as GaxCall, @@ -5580,7 +5644,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCaPools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCaPools iterate %j', request); return this.descriptors.page.listCaPools.asyncIterate( this.innerApiCalls['listCaPools'] as GaxCall, @@ -5697,7 +5763,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, @@ -5777,7 +5845,9 @@ export class CertificateAuthorityServiceClient { const defaultCallSettings = this._defaults['listCertificateRevocationLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateRevocationLists stream %j', request); return this.descriptors.page.listCertificateRevocationLists.createStream( this.innerApiCalls.listCertificateRevocationLists as GaxCall, @@ -5839,7 +5909,9 @@ export class CertificateAuthorityServiceClient { const defaultCallSettings = this._defaults['listCertificateRevocationLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateRevocationLists iterate %j', request); return this.descriptors.page.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, @@ -5956,7 +6028,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, @@ -6035,7 +6109,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificateTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateTemplates stream %j', request); return this.descriptors.page.listCertificateTemplates.createStream( this.innerApiCalls.listCertificateTemplates as GaxCall, @@ -6096,7 +6172,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificateTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateTemplates iterate %j', request); return this.descriptors.page.listCertificateTemplates.asyncIterate( this.innerApiCalls['listCertificateTemplates'] as GaxCall, @@ -6414,7 +6492,7 @@ export class CertificateAuthorityServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index e9ea063d513..d19762b7332 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -714,7 +714,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCertificate request %j', request); const wrappedCallback: | Callback< @@ -839,7 +841,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificate request %j', request); const wrappedCallback: | Callback< @@ -981,7 +985,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('revokeCertificate request %j', request); const wrappedCallback: | Callback< @@ -1123,7 +1129,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ 'certificate.name': request.certificate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCertificate request %j', request); const wrappedCallback: | Callback< @@ -1255,7 +1263,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchCertificateAuthorityCsr request %j', request); const wrappedCallback: | Callback< @@ -1381,7 +1391,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateAuthority request %j', request); const wrappedCallback: | Callback< @@ -1507,7 +1519,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateRevocationList request %j', request); const wrappedCallback: | Callback< @@ -1632,7 +1646,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReusableConfig request %j', request); const wrappedCallback: | Callback< @@ -1790,7 +1806,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1984,7 +2002,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2166,7 +2186,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2354,7 +2376,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2536,7 +2560,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2724,7 +2750,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2913,7 +2941,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ 'certificate_authority.name': request.certificateAuthority!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3097,7 +3127,9 @@ export class CertificateAuthorityServiceClient { 'certificate_revocation_list.name': request.certificateRevocationList!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3281,7 +3313,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, @@ -3362,7 +3396,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificates stream %j', request); return this.descriptors.page.listCertificates.createStream( this.innerApiCalls.listCertificates as GaxCall, @@ -3425,7 +3461,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificates iterate %j', request); return this.descriptors.page.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, @@ -3539,7 +3577,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, @@ -3616,7 +3656,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateAuthorities stream %j', request); return this.descriptors.page.listCertificateAuthorities.createStream( this.innerApiCalls.listCertificateAuthorities as GaxCall, @@ -3675,7 +3717,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateAuthorities iterate %j', request); return this.descriptors.page.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, @@ -3789,7 +3833,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, @@ -3867,7 +3913,9 @@ export class CertificateAuthorityServiceClient { const defaultCallSettings = this._defaults['listCertificateRevocationLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateRevocationLists stream %j', request); return this.descriptors.page.listCertificateRevocationLists.createStream( this.innerApiCalls.listCertificateRevocationLists as GaxCall, @@ -3927,7 +3975,9 @@ export class CertificateAuthorityServiceClient { const defaultCallSettings = this._defaults['listCertificateRevocationLists']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateRevocationLists iterate %j', request); return this.descriptors.page.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, @@ -4041,7 +4091,9 @@ export class CertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, @@ -4118,7 +4170,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listReusableConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReusableConfigs stream %j', request); return this.descriptors.page.listReusableConfigs.createStream( this.innerApiCalls.listReusableConfigs as GaxCall, @@ -4177,7 +4231,9 @@ export class CertificateAuthorityServiceClient { }); const defaultCallSettings = this._defaults['listReusableConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReusableConfigs iterate %j', request); return this.descriptors.page.listReusableConfigs.asyncIterate( this.innerApiCalls['listReusableConfigs'] as GaxCall, diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index eb12b295798..d174d888e9f 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -309,7 +309,9 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.certificateAuthorityServiceStub); client.close().then(() => { done(); @@ -380,7 +382,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); @@ -414,7 +416,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); @@ -464,7 +466,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); @@ -498,7 +500,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); @@ -522,7 +524,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); @@ -556,7 +558,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); @@ -606,7 +608,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); @@ -640,7 +642,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); @@ -664,7 +666,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); @@ -698,7 +700,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); @@ -748,7 +750,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); @@ -782,7 +784,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); @@ -806,7 +808,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); @@ -841,7 +843,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); @@ -892,7 +894,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); @@ -927,7 +929,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); @@ -952,7 +954,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); @@ -987,7 +989,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); @@ -1037,7 +1039,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); @@ -1101,7 +1103,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); @@ -1136,7 +1138,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); @@ -1186,7 +1188,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); @@ -1250,7 +1252,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); @@ -1284,7 +1286,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); @@ -1334,7 +1336,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); @@ -1423,7 +1425,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); @@ -1473,7 +1475,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); @@ -1507,7 +1509,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); @@ -1531,7 +1533,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); @@ -1566,7 +1568,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); @@ -1616,7 +1618,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); @@ -1653,7 +1655,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); @@ -1680,7 +1682,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); @@ -1715,7 +1717,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); @@ -1765,7 +1767,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); @@ -1802,7 +1804,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); @@ -1829,7 +1831,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); @@ -1865,7 +1867,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); @@ -1922,7 +1924,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); @@ -1959,7 +1961,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); @@ -1995,7 +1997,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2021,7 +2023,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2045,7 +2047,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); @@ -2081,7 +2083,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); @@ -2138,7 +2140,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); @@ -2175,7 +2177,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); @@ -2211,7 +2213,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2237,7 +2239,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2261,7 +2263,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); @@ -2297,7 +2299,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); @@ -2354,7 +2356,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); @@ -2391,7 +2393,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); @@ -2427,7 +2429,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2453,7 +2455,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2477,7 +2479,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); @@ -2513,7 +2515,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); @@ -2570,7 +2572,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); @@ -2607,7 +2609,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); @@ -2643,7 +2645,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2669,7 +2671,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2693,7 +2695,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); @@ -2729,7 +2731,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); @@ -2786,7 +2788,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); @@ -2823,7 +2825,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); @@ -2859,7 +2861,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2885,7 +2887,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2909,7 +2911,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); @@ -2945,7 +2947,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); @@ -3002,7 +3004,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); @@ -3039,7 +3041,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); @@ -3075,7 +3077,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3101,7 +3103,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3125,7 +3127,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); @@ -3162,7 +3164,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); @@ -3220,7 +3222,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); @@ -3258,7 +3260,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); @@ -3295,7 +3297,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3321,7 +3323,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3345,7 +3347,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); @@ -3380,7 +3382,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); @@ -3437,7 +3439,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); @@ -3471,7 +3473,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); @@ -3507,7 +3509,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3532,7 +3534,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3553,7 +3555,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); @@ -3589,7 +3591,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); @@ -3647,7 +3649,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); @@ -3682,7 +3684,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); @@ -3719,7 +3721,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3744,7 +3746,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3765,7 +3767,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); @@ -3800,7 +3802,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); @@ -3857,7 +3859,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); @@ -3891,7 +3893,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); @@ -3927,7 +3929,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3952,7 +3954,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3973,7 +3975,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); @@ -4010,7 +4012,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); @@ -4068,7 +4070,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); @@ -4104,7 +4106,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); @@ -4138,7 +4140,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4164,7 +4166,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4188,7 +4190,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); @@ -4224,7 +4226,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); @@ -4281,7 +4283,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); @@ -4318,7 +4320,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); @@ -4354,7 +4356,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4380,7 +4382,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4404,7 +4406,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); @@ -4440,7 +4442,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); @@ -4497,7 +4499,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); @@ -4534,7 +4536,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); @@ -4570,7 +4572,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4596,7 +4598,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4620,7 +4622,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); @@ -4657,7 +4659,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); @@ -4715,7 +4717,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); @@ -4753,7 +4755,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); @@ -4790,7 +4792,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4816,7 +4818,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4840,7 +4842,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); @@ -4882,7 +4884,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); @@ -4942,7 +4944,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); @@ -4976,7 +4978,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); @@ -5040,7 +5042,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); @@ -5093,7 +5095,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); @@ -5146,7 +5148,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); @@ -5192,7 +5194,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); @@ -5235,7 +5237,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); @@ -5295,7 +5297,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); @@ -5332,7 +5334,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); @@ -5404,7 +5406,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); @@ -5465,7 +5467,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); @@ -5522,7 +5524,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); @@ -5572,7 +5574,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); @@ -5614,7 +5616,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); @@ -5672,7 +5674,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); @@ -5706,7 +5708,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); @@ -5770,7 +5772,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); @@ -5825,7 +5827,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); @@ -5877,7 +5879,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); @@ -5925,7 +5927,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); @@ -5968,7 +5970,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); @@ -6028,7 +6030,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); @@ -6065,7 +6067,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); @@ -6140,7 +6142,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); @@ -6204,7 +6206,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); @@ -6261,7 +6263,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); @@ -6311,7 +6313,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); @@ -6354,7 +6356,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); @@ -6414,7 +6416,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); @@ -6451,7 +6453,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); @@ -6523,7 +6525,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); @@ -6584,7 +6586,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); @@ -6641,7 +6643,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); @@ -6690,7 +6692,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6723,7 +6725,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6770,7 +6772,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -6805,7 +6807,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6838,7 +6840,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6885,7 +6887,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -6920,7 +6922,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -6956,7 +6958,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7003,7 +7005,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7041,7 +7043,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7074,7 +7076,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7121,7 +7123,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7159,7 +7161,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7210,7 +7212,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7254,7 +7256,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7342,7 +7344,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7431,7 +7433,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7536,8 +7538,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7559,7 +7560,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7568,8 +7569,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -7585,7 +7585,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); describe('Path templates', () => { - describe('caPool', () => { + describe('caPool', async () => { const fakePath = '/rendered/path/caPool'; const expectedParameters = { project: 'projectValue', @@ -7599,7 +7599,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.caPoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7652,7 +7652,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); }); - describe('certificate', () => { + describe('certificate', async () => { const fakePath = '/rendered/path/certificate'; const expectedParameters = { project: 'projectValue', @@ -7667,7 +7667,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.certificatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7731,7 +7731,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); }); - describe('certificateAuthority', () => { + describe('certificateAuthority', async () => { const fakePath = '/rendered/path/certificateAuthority'; const expectedParameters = { project: 'projectValue', @@ -7746,7 +7746,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7830,7 +7830,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); }); - describe('certificateRevocationList', () => { + describe('certificateRevocationList', async () => { const fakePath = '/rendered/path/certificateRevocationList'; const expectedParameters = { project: 'projectValue', @@ -7846,7 +7846,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateRevocationListPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7948,7 +7948,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); }); - describe('certificateTemplate', () => { + describe('certificateTemplate', async () => { const fakePath = '/rendered/path/certificateTemplate'; const expectedParameters = { project: 'projectValue', @@ -7962,7 +7962,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8029,7 +8029,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8042,7 +8042,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 4f524674abb..85aacf5e95d 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -303,7 +303,9 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.certificateAuthorityServiceStub); client.close().then(() => { done(); @@ -374,7 +376,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); @@ -408,7 +410,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); @@ -458,7 +460,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); @@ -492,7 +494,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); @@ -516,7 +518,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); @@ -550,7 +552,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); @@ -600,7 +602,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); @@ -634,7 +636,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); @@ -658,7 +660,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); @@ -692,7 +694,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); @@ -742,7 +744,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); @@ -776,7 +778,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); @@ -800,7 +802,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); @@ -835,7 +837,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); @@ -886,7 +888,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); @@ -921,7 +923,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); @@ -946,7 +948,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); @@ -981,7 +983,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); @@ -1031,7 +1033,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); @@ -1068,7 +1070,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); @@ -1095,7 +1097,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); @@ -1130,7 +1132,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); @@ -1180,7 +1182,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); @@ -1217,7 +1219,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); @@ -1244,7 +1246,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); @@ -1279,7 +1281,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); @@ -1329,7 +1331,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); @@ -1366,7 +1368,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); @@ -1393,7 +1395,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); @@ -1427,7 +1429,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); @@ -1477,7 +1479,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); @@ -1511,7 +1513,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); @@ -1535,7 +1537,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); @@ -1571,7 +1573,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); @@ -1628,7 +1630,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); @@ -1665,7 +1667,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); @@ -1701,7 +1703,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1727,7 +1729,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1751,7 +1753,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); @@ -1787,7 +1789,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); @@ -1844,7 +1846,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); @@ -1881,7 +1883,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); @@ -1917,7 +1919,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1943,7 +1945,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1967,7 +1969,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); @@ -2003,7 +2005,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); @@ -2060,7 +2062,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); @@ -2097,7 +2099,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); @@ -2133,7 +2135,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2159,7 +2161,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2183,7 +2185,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); @@ -2219,7 +2221,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); @@ -2276,7 +2278,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); @@ -2313,7 +2315,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); @@ -2349,7 +2351,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2375,7 +2377,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2399,7 +2401,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); @@ -2435,7 +2437,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); @@ -2492,7 +2494,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); @@ -2529,7 +2531,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); @@ -2565,7 +2567,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2591,7 +2593,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2615,7 +2617,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); @@ -2652,7 +2654,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); @@ -2709,7 +2711,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); @@ -2744,7 +2746,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); @@ -2778,7 +2780,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2804,7 +2806,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2828,7 +2830,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); @@ -2865,7 +2867,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); @@ -2923,7 +2925,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); @@ -2961,7 +2963,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); @@ -2998,7 +3000,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3024,7 +3026,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3048,7 +3050,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); @@ -3085,7 +3087,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); @@ -3143,7 +3145,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); @@ -3179,7 +3181,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); @@ -3213,7 +3215,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3239,7 +3241,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3263,7 +3265,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); @@ -3305,7 +3307,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); @@ -3365,7 +3367,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); @@ -3399,7 +3401,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); @@ -3465,7 +3467,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); @@ -3520,7 +3522,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); @@ -3573,7 +3575,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); @@ -3619,7 +3621,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); @@ -3662,7 +3664,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); @@ -3722,7 +3724,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); @@ -3759,7 +3761,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); @@ -3831,7 +3833,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); @@ -3892,7 +3894,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); @@ -3949,7 +3951,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); @@ -3999,7 +4001,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); @@ -4042,7 +4044,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); @@ -4102,7 +4104,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); @@ -4139,7 +4141,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); @@ -4214,7 +4216,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); @@ -4278,7 +4280,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); @@ -4335,7 +4337,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); @@ -4385,7 +4387,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); @@ -4428,7 +4430,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); @@ -4488,7 +4490,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); @@ -4522,7 +4524,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); @@ -4588,7 +4590,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); @@ -4643,7 +4645,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); @@ -4696,7 +4698,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); @@ -4734,7 +4736,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); describe('Path templates', () => { - describe('certificate', () => { + describe('certificate', async () => { const fakePath = '/rendered/path/certificate'; const expectedParameters = { project: 'projectValue', @@ -4749,7 +4751,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.certificatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4814,7 +4816,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); }); - describe('certificateAuthority', () => { + describe('certificateAuthority', async () => { const fakePath = '/rendered/path/certificateAuthority'; const expectedParameters = { project: 'projectValue', @@ -4828,7 +4830,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4898,7 +4900,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); }); - describe('certificateRevocationList', () => { + describe('certificateRevocationList', async () => { const fakePath = '/rendered/path/certificateRevocationList'; const expectedParameters = { project: 'projectValue', @@ -4913,7 +4915,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateRevocationListPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5000,7 +5002,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5013,7 +5015,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5052,7 +5054,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); }); - describe('reusableConfig', () => { + describe('reusableConfig', async () => { const fakePath = '/rendered/path/reusableConfig'; const expectedParameters = { project: 'projectValue', @@ -5066,7 +5068,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.reusableConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-security-publicca/package.json b/packages/google-cloud-security-publicca/package.json index aad4eae1abd..8744d63d772 100644 --- a/packages/google-cloud-security-publicca/package.json +++ b/packages/google-cloud-security-publicca/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json b/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json index 7fa13058353..55a6cf9e925 100644 --- a/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json +++ b/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publicca", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json index 8c17a9a715b..9b6ecd554d8 100644 --- a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json +++ b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publicca", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json index 8c17a9a715b..9b6ecd554d8 100644 --- a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json +++ b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publicca", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-publicca/src/v1/public_certificate_authority_service_client.ts b/packages/google-cloud-security-publicca/src/v1/public_certificate_authority_service_client.ts index 79a5c4d9674..88bbb161588 100644 --- a/packages/google-cloud-security-publicca/src/v1/public_certificate_authority_service_client.ts +++ b/packages/google-cloud-security-publicca/src/v1/public_certificate_authority_service_client.ts @@ -482,7 +482,9 @@ export class PublicCertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createExternalAccountKey request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-security-publicca/src/v1beta1/public_certificate_authority_service_client.ts b/packages/google-cloud-security-publicca/src/v1beta1/public_certificate_authority_service_client.ts index ab76199f029..5f7fe7ab77e 100644 --- a/packages/google-cloud-security-publicca/src/v1beta1/public_certificate_authority_service_client.ts +++ b/packages/google-cloud-security-publicca/src/v1beta1/public_certificate_authority_service_client.ts @@ -480,7 +480,9 @@ export class PublicCertificateAuthorityServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createExternalAccountKey request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1.ts b/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1.ts index 02be2039877..8d5866580cd 100644 --- a/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1.ts @@ -211,7 +211,9 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.publicCertificateAuthorityServiceStub); client.close().then(() => { done(); @@ -285,7 +287,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1.CreateExternalAccountKeyRequest() ); @@ -320,7 +322,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1.CreateExternalAccountKeyRequest() ); @@ -370,7 +372,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1.CreateExternalAccountKeyRequest() ); @@ -407,7 +409,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1.CreateExternalAccountKeyRequest() ); @@ -426,7 +428,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { }); describe('Path templates', () => { - describe('externalAccountKey', () => { + describe('externalAccountKey', async () => { const fakePath = '/rendered/path/externalAccountKey'; const expectedParameters = { project: 'projectValue', @@ -440,7 +442,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.externalAccountKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -506,7 +508,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -519,7 +521,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -558,7 +560,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -570,7 +572,7 @@ describe('v1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1beta1.ts index 0b85f91bcb7..fa121d47b2d 100644 --- a/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-publicca/test/gapic_public_certificate_authority_service_v1beta1.ts @@ -211,7 +211,9 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.publicCertificateAuthorityServiceStub); client.close().then(() => { done(); @@ -285,7 +287,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest() ); @@ -320,7 +322,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest() ); @@ -370,7 +372,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest() ); @@ -407,7 +409,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.publicca.v1beta1.CreateExternalAccountKeyRequest() ); @@ -426,7 +428,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { }); describe('Path templates', () => { - describe('externalAccountKey', () => { + describe('externalAccountKey', async () => { const fakePath = '/rendered/path/externalAccountKey'; const expectedParameters = { project: 'projectValue', @@ -440,7 +442,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.externalAccountKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -506,7 +508,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -519,7 +521,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -558,7 +560,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -570,7 +572,7 @@ describe('v1beta1.PublicCertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-securitycenter/package.json b/packages/google-cloud-securitycenter/package.json index 559429762aa..955e17c9a57 100644 --- a/packages/google-cloud-securitycenter/package.json +++ b/packages/google-cloud-securitycenter/package.json @@ -48,7 +48,7 @@ "Security Command Center API" ], "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json index 4f0c0baa7b6..f9fee0f8b2c 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.12.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json index 48669b75561..ac4a8d0c0ec 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.12.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json index e1fa7b3b699..38f02e2817e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.12.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json index e1fa7b3b699..38f02e2817e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.12.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json index 26c0e63ffc6..c3253a9698b 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.12.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json index 26c0e63ffc6..c3253a9698b 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.12.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json index 07876b29b50..67f349c1e9e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json +++ b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.12.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts index dfa2d7d7a6f..18cd2a2528b 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts @@ -867,7 +867,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'createSecurityHealthAnalyticsCustomModule request %j', request @@ -1003,7 +1005,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSource request %j', request); const wrappedCallback: | Callback< @@ -1131,7 +1135,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFinding request %j', request); const wrappedCallback: | Callback< @@ -1265,7 +1271,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -1401,7 +1409,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -1532,7 +1542,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -1660,7 +1672,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -1791,7 +1805,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'deleteSecurityHealthAnalyticsCustomModule request %j', request @@ -1928,7 +1944,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSimulation request %j', request); const wrappedCallback: | Callback< @@ -2056,7 +2074,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getValuedResource request %j', request); const wrappedCallback: | Callback< @@ -2184,7 +2204,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -2299,7 +2321,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2419,7 +2443,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -2547,7 +2573,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -2673,7 +2701,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrganizationSettings request %j', request); const wrappedCallback: | Callback< @@ -2802,7 +2832,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'getEffectiveSecurityHealthAnalyticsCustomModule request %j', request @@ -2944,7 +2976,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'getSecurityHealthAnalyticsCustomModule request %j', request @@ -3073,7 +3107,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSource request %j', request); const wrappedCallback: | Callback< @@ -3198,7 +3234,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setFindingState request %j', request); const wrappedCallback: | Callback< @@ -3318,7 +3356,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMute request %j', request); const wrappedCallback: | Callback< @@ -3438,7 +3478,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -3550,7 +3592,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -3678,7 +3722,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'simulateSecurityHealthAnalyticsCustomModule request %j', request @@ -3820,7 +3866,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'external_system.name': request.externalSystem!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateExternalSystem request %j', request); const wrappedCallback: | Callback< @@ -3953,7 +4001,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'finding.name': request.finding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFinding request %j', request); const wrappedCallback: | Callback< @@ -4081,7 +4131,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'mute_config.name': request.muteConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -4212,7 +4264,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'notification_config.name': request.notificationConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -4341,7 +4395,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'organization_settings.name': request.organizationSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateOrganizationSettings request %j', request); const wrappedCallback: | Callback< @@ -4475,7 +4531,9 @@ export class SecurityCenterClient { 'security_health_analytics_custom_module.name': request.securityHealthAnalyticsCustomModule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateSecurityHealthAnalyticsCustomModule request %j', request @@ -4611,7 +4669,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'source.name': request.source!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSource request %j', request); const wrappedCallback: | Callback< @@ -4747,7 +4807,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'security_marks.name': request.securityMarks!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecurityMarks request %j', request); const wrappedCallback: | Callback< @@ -4881,7 +4943,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -5009,7 +5073,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -5137,7 +5203,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'big_query_export.name': request.bigQueryExport!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -5275,7 +5343,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'createEventThreatDetectionCustomModule request %j', request @@ -5417,7 +5487,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'deleteEventThreatDetectionCustomModule request %j', request @@ -5557,7 +5629,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEventThreatDetectionCustomModule request %j', request); const wrappedCallback: | Callback< @@ -5697,7 +5771,9 @@ export class SecurityCenterClient { 'event_threat_detection_custom_module.name': request.eventThreatDetectionCustomModule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateEventThreatDetectionCustomModule request %j', request @@ -5842,7 +5918,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'validateEventThreatDetectionCustomModule request %j', request @@ -5987,7 +6065,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'getEffectiveEventThreatDetectionCustomModule request %j', request @@ -6130,7 +6210,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateResourceValueConfigs request %j', request); const wrappedCallback: | Callback< @@ -6261,7 +6343,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteResourceValueConfig request %j', request); const wrappedCallback: | Callback< @@ -6387,7 +6471,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getResourceValueConfig request %j', request); const wrappedCallback: | Callback< @@ -6515,7 +6601,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'resource_value_config.name': request.resourceValueConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateResourceValueConfig request %j', request); const wrappedCallback: | Callback< @@ -6679,7 +6767,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6853,7 +6943,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$SecurityCenter-$RunAssetDiscovery', 'RunAssetDiscovery is deprecated and may be removed in a future version.', @@ -7148,7 +7240,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$SecurityCenter-$GroupAssets', 'GroupAssets is deprecated and may be removed in a future version.', @@ -7339,7 +7433,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$SecurityCenter-$GroupAssets', 'GroupAssets is deprecated and may be removed in a future version.', @@ -7512,7 +7608,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$SecurityCenter-$GroupAssets', 'GroupAssets is deprecated and may be removed in a future version.', @@ -7740,7 +7838,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, @@ -7920,7 +8020,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings stream %j', request); return this.descriptors.page.groupFindings.createStream( this.innerApiCalls.groupFindings as GaxCall, @@ -8082,7 +8184,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings iterate %j', request); return this.descriptors.page.groupFindings.asyncIterate( this.innerApiCalls['groupFindings'] as GaxCall, @@ -8311,7 +8415,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$SecurityCenter-$ListAssets', 'ListAssets is deprecated and may be removed in a future version.', @@ -8508,7 +8614,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$SecurityCenter-$ListAssets', 'ListAssets is deprecated and may be removed in a future version.', @@ -8687,7 +8795,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$SecurityCenter-$ListAssets', 'ListAssets is deprecated and may be removed in a future version.', @@ -8799,7 +8909,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, @@ -8882,7 +8994,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantSecurityHealthAnalyticsCustomModules stream %j', request @@ -8938,7 +9052,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantSecurityHealthAnalyticsCustomModules iterate %j', request @@ -9177,7 +9293,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListFindingsRequest, @@ -9371,7 +9489,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings stream %j', request); return this.descriptors.page.listFindings.createStream( this.innerApiCalls.listFindings as GaxCall, @@ -9547,7 +9667,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings iterate %j', request); return this.descriptors.page.listFindings.asyncIterate( this.innerApiCalls['listFindings'] as GaxCall, @@ -9658,7 +9780,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, @@ -9732,7 +9856,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listMuteConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMuteConfigs stream %j', request); return this.descriptors.page.listMuteConfigs.createStream( this.innerApiCalls.listMuteConfigs as GaxCall, @@ -9788,7 +9914,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listMuteConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMuteConfigs iterate %j', request); return this.descriptors.page.listMuteConfigs.asyncIterate( this.innerApiCalls['listMuteConfigs'] as GaxCall, @@ -9895,7 +10023,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, @@ -9965,7 +10095,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listNotificationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationConfigs stream %j', request); return this.descriptors.page.listNotificationConfigs.createStream( this.innerApiCalls.listNotificationConfigs as GaxCall, @@ -10017,7 +10149,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listNotificationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationConfigs iterate %j', request); return this.descriptors.page.listNotificationConfigs.asyncIterate( this.innerApiCalls['listNotificationConfigs'] as GaxCall, @@ -10125,7 +10259,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, @@ -10208,7 +10344,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveSecurityHealthAnalyticsCustomModules stream %j', request @@ -10264,7 +10402,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveSecurityHealthAnalyticsCustomModules iterate %j', request @@ -10377,7 +10517,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, @@ -10460,7 +10602,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listSecurityHealthAnalyticsCustomModules stream %j', request @@ -10515,7 +10659,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listSecurityHealthAnalyticsCustomModules iterate %j', request @@ -10625,7 +10771,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListSourcesRequest, @@ -10695,7 +10843,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources stream %j', request); return this.descriptors.page.listSources.createStream( this.innerApiCalls.listSources as GaxCall, @@ -10747,7 +10897,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources iterate %j', request); return this.descriptors.page.listSources.asyncIterate( this.innerApiCalls['listSources'] as GaxCall, @@ -10861,7 +11013,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, @@ -10934,7 +11088,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listBigQueryExports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBigQueryExports stream %j', request); return this.descriptors.page.listBigQueryExports.createStream( this.innerApiCalls.listBigQueryExports as GaxCall, @@ -10989,7 +11145,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listBigQueryExports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBigQueryExports iterate %j', request); return this.descriptors.page.listBigQueryExports.asyncIterate( this.innerApiCalls['listBigQueryExports'] as GaxCall, @@ -11107,7 +11265,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, @@ -11201,7 +11361,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listDescendantEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantEventThreatDetectionCustomModules stream %j', request @@ -11268,7 +11430,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listDescendantEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantEventThreatDetectionCustomModules iterate %j', request @@ -11392,7 +11556,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, @@ -11479,7 +11645,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventThreatDetectionCustomModules stream %j', request); return this.descriptors.page.listEventThreatDetectionCustomModules.createStream( this.innerApiCalls.listEventThreatDetectionCustomModules as GaxCall, @@ -11542,7 +11710,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventThreatDetectionCustomModules iterate %j', request); return this.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate( this.innerApiCalls['listEventThreatDetectionCustomModules'] as GaxCall, @@ -11661,7 +11831,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, @@ -11755,7 +11927,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listEffectiveEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveEventThreatDetectionCustomModules stream %j', request @@ -11822,7 +11996,9 @@ export class SecurityCenterClient { const defaultCallSettings = this._defaults['listEffectiveEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveEventThreatDetectionCustomModules iterate %j', request @@ -11941,7 +12117,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, @@ -12018,7 +12196,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listResourceValueConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResourceValueConfigs stream %j', request); return this.descriptors.page.listResourceValueConfigs.createStream( this.innerApiCalls.listResourceValueConfigs as GaxCall, @@ -12077,7 +12257,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listResourceValueConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResourceValueConfigs iterate %j', request); return this.descriptors.page.listResourceValueConfigs.asyncIterate( this.innerApiCalls['listResourceValueConfigs'] as GaxCall, @@ -12214,7 +12396,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, @@ -12314,7 +12498,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listValuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listValuedResources stream %j', request); return this.descriptors.page.listValuedResources.createStream( this.innerApiCalls.listValuedResources as GaxCall, @@ -12396,7 +12582,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listValuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listValuedResources iterate %j', request); return this.descriptors.page.listValuedResources.asyncIterate( this.innerApiCalls['listValuedResources'] as GaxCall, @@ -12513,7 +12701,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, @@ -12592,7 +12782,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAttackPaths']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttackPaths stream %j', request); return this.descriptors.page.listAttackPaths.createStream( this.innerApiCalls.listAttackPaths as GaxCall, @@ -12653,7 +12845,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAttackPaths']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttackPaths iterate %j', request); return this.descriptors.page.listAttackPaths.asyncIterate( this.innerApiCalls['listAttackPaths'] as GaxCall, @@ -12755,7 +12949,7 @@ export class SecurityCenterClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.ts b/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.ts index 3bef6e48b3d..3c062626560 100644 --- a/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v1beta1/security_center_client.ts @@ -592,7 +592,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSource request %j', request); const wrappedCallback: | Callback< @@ -726,7 +728,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFinding request %j', request); const wrappedCallback: | Callback< @@ -841,7 +845,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -962,7 +968,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrganizationSettings request %j', request); const wrappedCallback: | Callback< @@ -1082,7 +1090,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSource request %j', request); const wrappedCallback: | Callback< @@ -1214,7 +1224,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setFindingState request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1349,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1449,7 +1463,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1578,7 +1594,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'finding.name': request.finding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFinding request %j', request); const wrappedCallback: | Callback< @@ -1705,7 +1723,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'organization_settings.name': request.organizationSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateOrganizationSettings request %j', request); const wrappedCallback: | Callback< @@ -1832,7 +1852,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'source.name': request.source!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSource request %j', request); const wrappedCallback: | Callback< @@ -1961,7 +1983,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'security_marks.name': request.securityMarks!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecurityMarks request %j', request); const wrappedCallback: | Callback< @@ -2084,7 +2108,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2318,7 +2344,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1beta1.IGroupAssetsRequest, @@ -2457,7 +2485,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupAssets stream %j', request); return this.descriptors.page.groupAssets.createStream( this.innerApiCalls.groupAssets as GaxCall, @@ -2578,7 +2608,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupAssets iterate %j', request); return this.descriptors.page.groupAssets.asyncIterate( this.innerApiCalls['groupAssets'] as GaxCall, @@ -2733,7 +2765,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1beta1.IGroupFindingsRequest, @@ -2847,7 +2881,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings stream %j', request); return this.descriptors.page.groupFindings.createStream( this.innerApiCalls.groupFindings as GaxCall, @@ -2943,7 +2979,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings iterate %j', request); return this.descriptors.page.groupFindings.asyncIterate( this.innerApiCalls['groupFindings'] as GaxCall, @@ -3119,7 +3157,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1beta1.IListAssetsRequest, @@ -3258,7 +3298,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets stream %j', request); return this.descriptors.page.listAssets.createStream( this.innerApiCalls.listAssets as GaxCall, @@ -3379,7 +3421,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets iterate %j', request); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, @@ -3533,7 +3577,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1beta1.IListFindingsRequest, @@ -3647,7 +3693,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings stream %j', request); return this.descriptors.page.listFindings.createStream( this.innerApiCalls.listFindings as GaxCall, @@ -3743,7 +3791,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings iterate %j', request); return this.descriptors.page.listFindings.asyncIterate( this.innerApiCalls['listFindings'] as GaxCall, @@ -3849,7 +3899,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1beta1.IListSourcesRequest, @@ -3918,7 +3970,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources stream %j', request); return this.descriptors.page.listSources.createStream( this.innerApiCalls.listSources as GaxCall, @@ -3969,7 +4023,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources iterate %j', request); return this.descriptors.page.listSources.asyncIterate( this.innerApiCalls['listSources'] as GaxCall, diff --git a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts index b0dae851a28..c5f1104fb8c 100644 --- a/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts @@ -637,7 +637,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSource request %j', request); const wrappedCallback: | Callback< @@ -769,7 +771,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFinding request %j', request); const wrappedCallback: | Callback< @@ -902,7 +906,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -1028,7 +1034,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -1143,7 +1151,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1264,7 +1274,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -1390,7 +1402,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrganizationSettings request %j', request); const wrappedCallback: | Callback< @@ -1516,7 +1530,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSource request %j', request); const wrappedCallback: | Callback< @@ -1648,7 +1664,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setFindingState request %j', request); const wrappedCallback: | Callback< @@ -1771,7 +1789,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1883,7 +1903,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2017,7 +2039,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'finding.name': request.finding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFinding request %j', request); const wrappedCallback: | Callback< @@ -2147,7 +2171,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'notification_config.name': request.notificationConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -2276,7 +2302,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'organization_settings.name': request.organizationSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateOrganizationSettings request %j', request); const wrappedCallback: | Callback< @@ -2405,7 +2433,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'source.name': request.source!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSource request %j', request); const wrappedCallback: | Callback< @@ -2540,7 +2570,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'security_marks.name': request.securityMarks!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecurityMarks request %j', request); const wrappedCallback: | Callback< @@ -2678,7 +2710,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2961,7 +2995,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1p1beta1.IGroupAssetsRequest, @@ -3146,7 +3182,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupAssets stream %j', request); return this.descriptors.page.groupAssets.createStream( this.innerApiCalls.groupAssets as GaxCall, @@ -3313,7 +3351,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupAssets iterate %j', request); return this.descriptors.page.groupAssets.asyncIterate( this.innerApiCalls['groupAssets'] as GaxCall, @@ -3535,7 +3575,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1p1beta1.IGroupFindingsRequest, @@ -3714,7 +3756,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings stream %j', request); return this.descriptors.page.groupFindings.createStream( this.innerApiCalls.groupFindings as GaxCall, @@ -3875,7 +3919,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings iterate %j', request); return this.descriptors.page.groupFindings.asyncIterate( this.innerApiCalls['groupFindings'] as GaxCall, @@ -4101,7 +4147,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1p1beta1.IListAssetsRequest, @@ -4290,7 +4338,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets stream %j', request); return this.descriptors.page.listAssets.createStream( this.innerApiCalls.listAssets as GaxCall, @@ -4461,7 +4511,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets iterate %j', request); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, @@ -4684,7 +4736,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1p1beta1.IListFindingsRequest, @@ -4867,7 +4921,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings stream %j', request); return this.descriptors.page.listFindings.createStream( this.innerApiCalls.listFindings as GaxCall, @@ -5032,7 +5088,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings iterate %j', request); return this.descriptors.page.listFindings.asyncIterate( this.innerApiCalls['listFindings'] as GaxCall, @@ -5138,7 +5196,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1p1beta1.IListNotificationConfigsRequest, @@ -5207,7 +5267,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listNotificationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationConfigs stream %j', request); return this.descriptors.page.listNotificationConfigs.createStream( this.innerApiCalls.listNotificationConfigs as GaxCall, @@ -5258,7 +5320,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listNotificationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationConfigs iterate %j', request); return this.descriptors.page.listNotificationConfigs.asyncIterate( this.innerApiCalls['listNotificationConfigs'] as GaxCall, @@ -5365,7 +5429,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v1p1beta1.IListSourcesRequest, @@ -5435,7 +5501,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources stream %j', request); return this.descriptors.page.listSources.createStream( this.innerApiCalls.listSources as GaxCall, @@ -5487,7 +5555,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources iterate %j', request); return this.descriptors.page.listSources.asyncIterate( this.innerApiCalls['listSources'] as GaxCall, diff --git a/packages/google-cloud-securitycenter/src/v2/security_center_client.ts b/packages/google-cloud-securitycenter/src/v2/security_center_client.ts index 879089491aa..51ff5637fa1 100644 --- a/packages/google-cloud-securitycenter/src/v2/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v2/security_center_client.ts @@ -783,7 +783,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateResourceValueConfigs request %j', request); const wrappedCallback: | Callback< @@ -924,7 +926,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -1056,7 +1060,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFinding request %j', request); const wrappedCallback: | Callback< @@ -1226,7 +1232,9 @@ export class SecurityCenterClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -1363,7 +1371,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -1486,7 +1496,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSource request %j', request); const wrappedCallback: | Callback< @@ -1617,7 +1629,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -1799,7 +1813,9 @@ export class SecurityCenterClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -1932,7 +1948,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -2057,7 +2075,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteResourceValueConfig request %j', request); const wrappedCallback: | Callback< @@ -2188,7 +2208,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -2312,7 +2334,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSimulation request %j', request); const wrappedCallback: | Callback< @@ -2440,7 +2464,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getValuedResource request %j', request); const wrappedCallback: | Callback< @@ -2555,7 +2581,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2726,7 +2754,9 @@ export class SecurityCenterClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -2859,7 +2889,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -2985,7 +3017,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getResourceValueConfig request %j', request); const wrappedCallback: | Callback< @@ -3105,7 +3139,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSource request %j', request); const wrappedCallback: | Callback< @@ -3238,7 +3274,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setFindingState request %j', request); const wrappedCallback: | Callback< @@ -3361,7 +3399,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -3486,7 +3526,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMute request %j', request); const wrappedCallback: | Callback< @@ -3600,7 +3642,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -3723,7 +3767,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'big_query_export.name': request.bigQueryExport!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBigQueryExport request %j', request); const wrappedCallback: | Callback< @@ -3853,7 +3899,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'external_system.name': request.externalSystem!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateExternalSystem request %j', request); const wrappedCallback: | Callback< @@ -3987,7 +4035,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'finding.name': request.finding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFinding request %j', request); const wrappedCallback: | Callback< @@ -4163,7 +4213,9 @@ export class SecurityCenterClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMuteConfig request %j', request); const wrappedCallback: | Callback< @@ -4293,7 +4345,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'notification_config.name': request.notificationConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNotificationConfig request %j', request); const wrappedCallback: | Callback< @@ -4425,7 +4479,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'resource_value_config.name': request.resourceValueConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateResourceValueConfig request %j', request); const wrappedCallback: | Callback< @@ -4558,7 +4614,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'security_marks.name': request.securityMarks!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecurityMarks request %j', request); const wrappedCallback: | Callback< @@ -4681,7 +4739,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ 'source.name': request.source!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSource request %j', request); const wrappedCallback: | Callback< @@ -4850,7 +4910,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5100,7 +5162,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IGroupFindingsRequest, @@ -5240,7 +5304,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings stream %j', request); return this.descriptors.page.groupFindings.createStream( this.innerApiCalls.groupFindings as GaxCall, @@ -5362,7 +5428,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['groupFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('groupFindings iterate %j', request); return this.descriptors.page.groupFindings.asyncIterate( this.innerApiCalls['groupFindings'] as GaxCall, @@ -5479,7 +5547,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListAttackPathsRequest, @@ -5558,7 +5628,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAttackPaths']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttackPaths stream %j', request); return this.descriptors.page.listAttackPaths.createStream( this.innerApiCalls.listAttackPaths as GaxCall, @@ -5619,7 +5691,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listAttackPaths']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttackPaths iterate %j', request); return this.descriptors.page.listAttackPaths.asyncIterate( this.innerApiCalls['listAttackPaths'] as GaxCall, @@ -5734,7 +5808,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListBigQueryExportsRequest, @@ -5808,7 +5884,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listBigQueryExports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBigQueryExports stream %j', request); return this.descriptors.page.listBigQueryExports.createStream( this.innerApiCalls.listBigQueryExports as GaxCall, @@ -5864,7 +5942,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listBigQueryExports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBigQueryExports iterate %j', request); return this.descriptors.page.listBigQueryExports.asyncIterate( this.innerApiCalls['listBigQueryExports'] as GaxCall, @@ -6067,7 +6147,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListFindingsRequest, @@ -6225,7 +6307,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings stream %j', request); return this.descriptors.page.listFindings.createStream( this.innerApiCalls.listFindings as GaxCall, @@ -6365,7 +6449,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings iterate %j', request); return this.descriptors.page.listFindings.asyncIterate( this.innerApiCalls['listFindings'] as GaxCall, @@ -6523,7 +6609,9 @@ export class SecurityCenterClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListMuteConfigsRequest, @@ -6643,7 +6731,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listMuteConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMuteConfigs stream %j', request); return this.descriptors.page.listMuteConfigs.createStream( this.innerApiCalls.listMuteConfigs as GaxCall, @@ -6745,7 +6835,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listMuteConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMuteConfigs iterate %j', request); return this.descriptors.page.listMuteConfigs.asyncIterate( this.innerApiCalls['listMuteConfigs'] as GaxCall, @@ -6854,7 +6946,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListNotificationConfigsRequest, @@ -6926,7 +7020,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listNotificationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationConfigs stream %j', request); return this.descriptors.page.listNotificationConfigs.createStream( this.innerApiCalls.listNotificationConfigs as GaxCall, @@ -6980,7 +7076,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listNotificationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationConfigs iterate %j', request); return this.descriptors.page.listNotificationConfigs.asyncIterate( this.innerApiCalls['listNotificationConfigs'] as GaxCall, @@ -7094,7 +7192,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListResourceValueConfigsRequest, @@ -7171,7 +7271,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listResourceValueConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResourceValueConfigs stream %j', request); return this.descriptors.page.listResourceValueConfigs.createStream( this.innerApiCalls.listResourceValueConfigs as GaxCall, @@ -7230,7 +7332,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listResourceValueConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResourceValueConfigs iterate %j', request); return this.descriptors.page.listResourceValueConfigs.asyncIterate( this.innerApiCalls['listResourceValueConfigs'] as GaxCall, @@ -7337,7 +7441,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListSourcesRequest, @@ -7407,7 +7513,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources stream %j', request); return this.descriptors.page.listSources.createStream( this.innerApiCalls.listSources as GaxCall, @@ -7459,7 +7567,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources iterate %j', request); return this.descriptors.page.listSources.asyncIterate( this.innerApiCalls['listSources'] as GaxCall, @@ -7592,7 +7702,9 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycenter.v2.IListValuedResourcesRequest, @@ -7688,7 +7800,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listValuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listValuedResources stream %j', request); return this.descriptors.page.listValuedResources.createStream( this.innerApiCalls.listValuedResources as GaxCall, @@ -7766,7 +7880,9 @@ export class SecurityCenterClient { }); const defaultCallSettings = this._defaults['listValuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listValuedResources iterate %j', request); return this.descriptors.page.listValuedResources.asyncIterate( this.innerApiCalls['listValuedResources'] as GaxCall, @@ -7868,7 +7984,7 @@ export class SecurityCenterClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts b/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts index 7b198b8c37e..754b21da622 100644 --- a/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts +++ b/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts @@ -287,7 +287,9 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securityCenterStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -381,7 +383,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -430,7 +432,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -464,7 +466,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -488,7 +490,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSourceRequest() ); @@ -519,7 +521,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSourceRequest() ); @@ -566,7 +568,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSourceRequest() ); @@ -597,7 +599,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateSourceRequest() ); @@ -618,7 +620,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateFindingRequest() ); @@ -649,7 +651,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateFindingRequest() ); @@ -696,7 +698,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateFindingRequest() ); @@ -727,7 +729,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateFindingRequest() ); @@ -748,7 +750,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateMuteConfigRequest() ); @@ -779,7 +781,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateMuteConfigRequest() ); @@ -826,7 +828,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateMuteConfigRequest() ); @@ -857,7 +859,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateMuteConfigRequest() ); @@ -878,7 +880,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateNotificationConfigRequest() ); @@ -910,7 +912,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateNotificationConfigRequest() ); @@ -957,7 +959,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateNotificationConfigRequest() ); @@ -991,7 +993,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateNotificationConfigRequest() ); @@ -1015,7 +1017,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteMuteConfigRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteMuteConfigRequest() ); @@ -1093,7 +1095,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteMuteConfigRequest() ); @@ -1124,7 +1126,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteMuteConfigRequest() ); @@ -1145,7 +1147,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest() ); @@ -1224,7 +1226,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest() ); @@ -1258,7 +1260,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest() ); @@ -1282,7 +1284,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1366,7 +1368,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1400,7 +1402,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSimulationRequest() ); @@ -1455,7 +1457,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSimulationRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSimulationRequest() ); @@ -1533,7 +1535,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSimulationRequest() ); @@ -1554,7 +1556,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() ); @@ -1585,7 +1587,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() ); @@ -1663,7 +1665,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetBigQueryExportRequest() ); @@ -1715,7 +1717,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetBigQueryExportRequest() ); @@ -1762,7 +1764,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetBigQueryExportRequest() ); @@ -1793,7 +1795,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetBigQueryExportRequest() ); @@ -1814,7 +1816,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1845,7 +1847,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1892,7 +1894,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1923,7 +1925,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1944,7 +1946,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetMuteConfigRequest() ); @@ -1975,7 +1977,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetMuteConfigRequest() ); @@ -2022,7 +2024,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetMuteConfigRequest() ); @@ -2053,7 +2055,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetMuteConfigRequest() ); @@ -2074,7 +2076,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetNotificationConfigRequest() ); @@ -2106,7 +2108,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetNotificationConfigRequest() ); @@ -2153,7 +2155,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetNotificationConfigRequest() ); @@ -2187,7 +2189,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetNotificationConfigRequest() ); @@ -2211,7 +2213,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest() ); @@ -2243,7 +2245,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest() ); @@ -2290,7 +2292,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest() ); @@ -2324,7 +2326,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest() ); @@ -2348,7 +2350,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2383,7 +2385,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2432,7 +2434,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2466,7 +2468,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2490,7 +2492,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2523,7 +2525,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2570,7 +2572,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2602,7 +2604,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -2626,7 +2628,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSourceRequest() ); @@ -2657,7 +2659,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSourceRequest() ); @@ -2704,7 +2706,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSourceRequest() ); @@ -2732,7 +2734,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetSourceRequest() ); @@ -2753,7 +2755,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetFindingStateRequest() ); @@ -2784,7 +2786,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetFindingStateRequest() ); @@ -2831,7 +2833,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetFindingStateRequest() ); @@ -2862,7 +2864,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetFindingStateRequest() ); @@ -2883,7 +2885,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetMuteRequest() ); @@ -2914,7 +2916,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetMuteRequest() ); @@ -2961,7 +2963,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetMuteRequest() ); @@ -2989,7 +2991,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SetMuteRequest() ); @@ -3010,7 +3012,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -3041,7 +3043,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -3088,7 +3090,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -3119,7 +3121,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -3140,7 +3142,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3172,7 +3174,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3219,7 +3221,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3250,7 +3252,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3271,7 +3273,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -3306,7 +3308,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -3355,7 +3357,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -3389,7 +3391,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -3413,7 +3415,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateExternalSystemRequest() ); @@ -3446,7 +3448,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateExternalSystemRequest() ); @@ -3494,7 +3496,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateExternalSystemRequest() ); @@ -3526,7 +3528,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateExternalSystemRequest() ); @@ -3548,7 +3550,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateFindingRequest() ); @@ -3580,7 +3582,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateFindingRequest() ); @@ -3628,7 +3630,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateFindingRequest() ); @@ -3660,7 +3662,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateFindingRequest() ); @@ -3682,7 +3684,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateMuteConfigRequest() ); @@ -3714,7 +3716,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateMuteConfigRequest() ); @@ -3762,7 +3764,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateMuteConfigRequest() ); @@ -3794,7 +3796,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateMuteConfigRequest() ); @@ -3816,7 +3818,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest() ); @@ -3849,7 +3851,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest() ); @@ -3897,7 +3899,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest() ); @@ -3932,7 +3934,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest() ); @@ -3957,7 +3959,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest() ); @@ -3990,7 +3992,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest() ); @@ -4038,7 +4040,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest() ); @@ -4073,7 +4075,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest() ); @@ -4098,7 +4100,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -4134,7 +4136,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -4184,7 +4186,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -4219,7 +4221,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -4244,7 +4246,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSourceRequest() ); @@ -4276,7 +4278,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSourceRequest() ); @@ -4324,7 +4326,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSourceRequest() ); @@ -4356,7 +4358,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSourceRequest() ); @@ -4378,7 +4380,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest() ); @@ -4411,7 +4413,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest() ); @@ -4459,7 +4461,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest() ); @@ -4491,7 +4493,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest() ); @@ -4513,7 +4515,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateBigQueryExportRequest() ); @@ -4545,7 +4547,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateBigQueryExportRequest() ); @@ -4592,7 +4594,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateBigQueryExportRequest() ); @@ -4623,7 +4625,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateBigQueryExportRequest() ); @@ -4644,7 +4646,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest() ); @@ -4676,7 +4678,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest() ); @@ -4723,7 +4725,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest() ); @@ -4754,7 +4756,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest() ); @@ -4775,7 +4777,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest() ); @@ -4808,7 +4810,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest() ); @@ -4856,7 +4858,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest() ); @@ -4888,7 +4890,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest() ); @@ -4910,7 +4912,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -4943,7 +4945,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -4990,7 +4992,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -5022,7 +5024,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -5046,7 +5048,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -5079,7 +5081,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -5126,7 +5128,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -5158,7 +5160,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -5182,7 +5184,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -5215,7 +5217,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -5262,7 +5264,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -5296,7 +5298,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -5320,7 +5322,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -5354,7 +5356,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -5402,7 +5404,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -5435,7 +5437,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -5460,7 +5462,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -5495,7 +5497,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -5544,7 +5546,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -5578,7 +5580,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -5602,7 +5604,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -5637,7 +5639,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -5686,7 +5688,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -5720,7 +5722,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -5744,7 +5746,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() ); @@ -5776,7 +5778,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() ); @@ -5823,7 +5825,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() ); @@ -5857,7 +5859,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() ); @@ -5881,7 +5883,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() ); @@ -5913,7 +5915,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() ); @@ -5960,7 +5962,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() ); @@ -5994,7 +5996,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() ); @@ -6018,7 +6020,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() ); @@ -6050,7 +6052,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() ); @@ -6097,7 +6099,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() ); @@ -6131,7 +6133,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() ); @@ -6155,7 +6157,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() ); @@ -6188,7 +6190,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() ); @@ -6236,7 +6238,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() ); @@ -6271,7 +6273,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() ); @@ -6296,7 +6298,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() ); @@ -6329,7 +6331,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() ); @@ -6383,7 +6385,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() ); @@ -6414,7 +6416,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() ); @@ -6447,7 +6449,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6469,7 +6471,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6491,7 +6493,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() ); @@ -6526,7 +6528,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() ); @@ -6582,7 +6584,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() ); @@ -6615,7 +6617,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() ); @@ -6650,7 +6652,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6674,7 +6676,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6697,7 +6699,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() ); @@ -6738,7 +6740,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() ); @@ -6795,7 +6797,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() ); @@ -6828,7 +6830,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() ); @@ -6891,7 +6893,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() ); @@ -6945,7 +6947,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() ); @@ -6997,7 +6999,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() ); @@ -7043,7 +7045,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() ); @@ -7082,7 +7084,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() ); @@ -7137,7 +7139,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() ); @@ -7168,7 +7170,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() ); @@ -7229,7 +7231,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() ); @@ -7279,7 +7281,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() ); @@ -7329,7 +7331,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() ); @@ -7373,7 +7375,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAssetsRequest() ); @@ -7414,7 +7416,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAssetsRequest() ); @@ -7473,7 +7475,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAssetsRequest() ); @@ -7506,7 +7508,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAssetsRequest() ); @@ -7571,7 +7573,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAssetsRequest() ); @@ -7627,7 +7629,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAssetsRequest() ); @@ -7679,7 +7681,7 @@ describe('v1.SecurityCenterClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAssetsRequest() ); @@ -7725,7 +7727,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -7770,7 +7772,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -7829,7 +7831,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -7863,7 +7865,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -7941,7 +7943,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -8008,7 +8010,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -8065,7 +8067,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -8115,7 +8117,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListFindingsRequest() ); @@ -8154,7 +8156,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListFindingsRequest() ); @@ -8211,7 +8213,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListFindingsRequest() ); @@ -8242,7 +8244,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListFindingsRequest() ); @@ -8305,7 +8307,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListFindingsRequest() ); @@ -8359,7 +8361,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListFindingsRequest() ); @@ -8409,7 +8411,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListFindingsRequest() ); @@ -8452,7 +8454,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() ); @@ -8491,7 +8493,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() ); @@ -8546,7 +8548,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() ); @@ -8577,7 +8579,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() ); @@ -8638,7 +8640,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() ); @@ -8688,7 +8690,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() ); @@ -8737,7 +8739,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() ); @@ -8780,7 +8782,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); @@ -8820,7 +8822,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); @@ -8877,7 +8879,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); @@ -8911,7 +8913,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); @@ -8980,7 +8982,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); @@ -9038,7 +9040,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); @@ -9092,7 +9094,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); @@ -9139,7 +9141,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9182,7 +9184,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9241,7 +9243,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9275,7 +9277,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9351,7 +9353,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9416,7 +9418,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9473,7 +9475,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9523,7 +9525,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9566,7 +9568,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9625,7 +9627,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9659,7 +9661,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9732,7 +9734,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9794,7 +9796,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9849,7 +9851,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -9897,7 +9899,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); @@ -9936,7 +9938,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); @@ -9991,7 +9993,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); @@ -10022,7 +10024,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); @@ -10082,7 +10084,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); @@ -10133,7 +10135,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); @@ -10182,7 +10184,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); @@ -10226,7 +10228,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); @@ -10266,7 +10268,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); @@ -10323,7 +10325,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); @@ -10354,7 +10356,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); @@ -10415,7 +10417,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); @@ -10465,7 +10467,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); @@ -10515,7 +10517,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); @@ -10558,7 +10560,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -10601,7 +10603,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -10660,7 +10662,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -10694,7 +10696,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -10770,7 +10772,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -10835,7 +10837,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -10892,7 +10894,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -10942,7 +10944,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -10983,7 +10985,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -11040,7 +11042,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -11072,7 +11074,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -11145,7 +11147,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -11207,7 +11209,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -11262,7 +11264,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -11310,7 +11312,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -11353,7 +11355,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -11412,7 +11414,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -11446,7 +11448,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -11519,7 +11521,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -11581,7 +11583,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -11636,7 +11638,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -11684,7 +11686,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); @@ -11724,7 +11726,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); @@ -11781,7 +11783,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); @@ -11815,7 +11817,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); @@ -11884,7 +11886,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); @@ -11942,7 +11944,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); @@ -11996,7 +11998,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); @@ -12043,7 +12045,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); @@ -12083,7 +12085,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); @@ -12140,7 +12142,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); @@ -12171,7 +12173,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); @@ -12232,7 +12234,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); @@ -12282,7 +12284,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); @@ -12332,7 +12334,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); @@ -12375,7 +12377,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); @@ -12414,7 +12416,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); @@ -12469,7 +12471,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); @@ -12500,7 +12502,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); @@ -12561,7 +12563,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); @@ -12611,7 +12613,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); @@ -12660,7 +12662,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); @@ -12702,7 +12704,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -12781,7 +12783,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -12861,7 +12863,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -12957,8 +12959,7 @@ describe('v1.SecurityCenterClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -12977,7 +12978,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -12986,8 +12987,7 @@ describe('v1.SecurityCenterClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -13003,7 +13003,7 @@ describe('v1.SecurityCenterClient', () => { }); describe('Path templates', () => { - describe('attackPath', () => { + describe('attackPath', async () => { const fakePath = '/rendered/path/attackPath'; const expectedParameters = { organization: 'organizationValue', @@ -13015,7 +13015,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attackPathPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13079,7 +13079,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderAsset', () => { + describe('folderAsset', async () => { const fakePath = '/rendered/path/folderAsset'; const expectedParameters = { folder: 'folderValue', @@ -13089,7 +13089,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderAssetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13128,7 +13128,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderAssetSecurityMarks', () => { + describe('folderAssetSecurityMarks', async () => { const fakePath = '/rendered/path/folderAssetSecurityMarks'; const expectedParameters = { folder: 'folderValue', @@ -13138,7 +13138,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderAssetSecurityMarksPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13191,7 +13191,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderConstraintName', () => { + describe('folderConstraintName', async () => { const fakePath = '/rendered/path/folderConstraintName'; const expectedParameters = { folder: 'folderValue', @@ -13201,7 +13201,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderConstraintNamePathTemplate.render = sinon .stub() .returns(fakePath); @@ -13253,7 +13253,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderEventThreatDetectionSettingsModule', () => { + describe('folderEventThreatDetectionSettingsModule', async () => { const fakePath = '/rendered/path/folderEventThreatDetectionSettingsModule'; const expectedParameters = { @@ -13264,7 +13264,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderEventThreatDetectionSettingsModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderEventThreatDetectionSettingsModulePathTemplate.match = @@ -13322,7 +13322,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderExport', () => { + describe('folderExport', async () => { const fakePath = '/rendered/path/folderExport'; const expectedParameters = { folder: 'folderValue', @@ -13332,7 +13332,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderExportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13371,7 +13371,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderLocationMuteConfig', () => { + describe('folderLocationMuteConfig', async () => { const fakePath = '/rendered/path/folderLocationMuteConfig'; const expectedParameters = { folder: 'folderValue', @@ -13382,7 +13382,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13450,7 +13450,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderMuteConfig', () => { + describe('folderMuteConfig', async () => { const fakePath = '/rendered/path/folderMuteConfig'; const expectedParameters = { folder: 'folderValue', @@ -13460,7 +13460,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13505,7 +13505,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderNotificationConfig', () => { + describe('folderNotificationConfig', async () => { const fakePath = '/rendered/path/folderNotificationConfig'; const expectedParameters = { folder: 'folderValue', @@ -13515,7 +13515,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderNotificationConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13570,7 +13570,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderSecurityHealthAnalyticsSettingsCustomModule', () => { + describe('folderSecurityHealthAnalyticsSettingsCustomModule', async () => { const fakePath = '/rendered/path/folderSecurityHealthAnalyticsSettingsCustomModule'; const expectedParameters = { @@ -13581,7 +13581,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSecurityHealthAnalyticsSettingsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSecurityHealthAnalyticsSettingsCustomModulePathTemplate.match = @@ -13640,7 +13640,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderSecurityHealthAnalyticsSettingsEffectiveCustomModule', () => { + describe('folderSecurityHealthAnalyticsSettingsEffectiveCustomModule', async () => { const fakePath = '/rendered/path/folderSecurityHealthAnalyticsSettingsEffectiveCustomModule'; const expectedParameters = { @@ -13651,7 +13651,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSecurityHealthAnalyticsSettingsEffectiveCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSecurityHealthAnalyticsSettingsEffectiveCustomModulePathTemplate.match = @@ -13710,7 +13710,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderSource', () => { + describe('folderSource', async () => { const fakePath = '/rendered/path/folderSource'; const expectedParameters = { folder: 'folderValue', @@ -13720,7 +13720,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -13759,7 +13759,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderSourceFinding', () => { + describe('folderSourceFinding', async () => { const fakePath = '/rendered/path/folderSourceFinding'; const expectedParameters = { folder: 'folderValue', @@ -13770,7 +13770,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -13835,7 +13835,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderSourceFindingExternalsystem', () => { + describe('folderSourceFindingExternalsystem', async () => { const fakePath = '/rendered/path/folderSourceFindingExternalsystem'; const expectedParameters = { folder: 'folderValue', @@ -13847,7 +13847,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceFindingExternalsystemPathTemplate.match = @@ -13932,7 +13932,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('folderSourceFindingSecurityMarks', () => { + describe('folderSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/folderSourceFindingSecurityMarks'; const expectedParameters = { folder: 'folderValue', @@ -13943,7 +13943,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceFindingSecurityMarksPathTemplate.match = @@ -14009,7 +14009,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -14018,7 +14018,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14047,7 +14047,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationAsset', () => { + describe('organizationAsset', async () => { const fakePath = '/rendered/path/organizationAsset'; const expectedParameters = { organization: 'organizationValue', @@ -14057,7 +14057,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationAssetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14109,7 +14109,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationAssetSecurityMarks', () => { + describe('organizationAssetSecurityMarks', async () => { const fakePath = '/rendered/path/organizationAssetSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -14119,7 +14119,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.match = @@ -14172,7 +14172,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationConstraintName', () => { + describe('organizationConstraintName', async () => { const fakePath = '/rendered/path/organizationConstraintName'; const expectedParameters = { organization: 'organizationValue', @@ -14182,7 +14182,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationConstraintNamePathTemplate.render = sinon .stub() .returns(fakePath); @@ -14237,7 +14237,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationEventThreatDetectionSettings', () => { + describe('organizationEventThreatDetectionSettings', async () => { const fakePath = '/rendered/path/organizationEventThreatDetectionSettings'; const expectedParameters = { @@ -14247,7 +14247,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationEventThreatDetectionSettingsPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationEventThreatDetectionSettingsPathTemplate.match = @@ -14288,7 +14288,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationEventThreatDetectionSettingsModule', () => { + describe('organizationEventThreatDetectionSettingsModule', async () => { const fakePath = '/rendered/path/organizationEventThreatDetectionSettingsModule'; const expectedParameters = { @@ -14299,7 +14299,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationEventThreatDetectionSettingsModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationEventThreatDetectionSettingsModulePathTemplate.match = @@ -14358,7 +14358,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationExport', () => { + describe('organizationExport', async () => { const fakePath = '/rendered/path/organizationExport'; const expectedParameters = { organization: 'organizationValue', @@ -14368,7 +14368,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationExportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14420,7 +14420,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationLocationMuteConfig', () => { + describe('organizationLocationMuteConfig', async () => { const fakePath = '/rendered/path/organizationLocationMuteConfig'; const expectedParameters = { organization: 'organizationValue', @@ -14431,7 +14431,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationMuteConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationMuteConfigPathTemplate.match = @@ -14501,7 +14501,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationMuteConfig', () => { + describe('organizationMuteConfig', async () => { const fakePath = '/rendered/path/organizationMuteConfig'; const expectedParameters = { organization: 'organizationValue', @@ -14511,7 +14511,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14564,7 +14564,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationNotificationConfig', () => { + describe('organizationNotificationConfig', async () => { const fakePath = '/rendered/path/organizationNotificationConfig'; const expectedParameters = { organization: 'organizationValue', @@ -14574,7 +14574,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationNotificationConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationNotificationConfigPathTemplate.match = @@ -14629,7 +14629,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSecurityHealthAnalyticsSettings', () => { + describe('organizationSecurityHealthAnalyticsSettings', async () => { const fakePath = '/rendered/path/organizationSecurityHealthAnalyticsSettings'; const expectedParameters = { @@ -14639,7 +14639,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSecurityHealthAnalyticsSettingsPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSecurityHealthAnalyticsSettingsPathTemplate.match = @@ -14680,7 +14680,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSecurityHealthAnalyticsSettingsCustomModule', () => { + describe('organizationSecurityHealthAnalyticsSettingsCustomModule', async () => { const fakePath = '/rendered/path/organizationSecurityHealthAnalyticsSettingsCustomModule'; const expectedParameters = { @@ -14691,7 +14691,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSecurityHealthAnalyticsSettingsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSecurityHealthAnalyticsSettingsCustomModulePathTemplate.match = @@ -14750,7 +14750,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSecurityHealthAnalyticsSettingsEffectiveCustomModule', () => { + describe('organizationSecurityHealthAnalyticsSettingsEffectiveCustomModule', async () => { const fakePath = '/rendered/path/organizationSecurityHealthAnalyticsSettingsEffectiveCustomModule'; const expectedParameters = { @@ -14761,7 +14761,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSecurityHealthAnalyticsSettingsEffectiveCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSecurityHealthAnalyticsSettingsEffectiveCustomModulePathTemplate.match = @@ -14820,7 +14820,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSettings', () => { + describe('organizationSettings', async () => { const fakePath = '/rendered/path/organizationSettings'; const expectedParameters = { organization: 'organizationValue', @@ -14829,7 +14829,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14865,7 +14865,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSimulation', () => { + describe('organizationSimulation', async () => { const fakePath = '/rendered/path/organizationSimulation'; const expectedParameters = { organization: 'organizationValue', @@ -14875,7 +14875,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSimulationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14928,7 +14928,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSource', () => { + describe('organizationSource', async () => { const fakePath = '/rendered/path/organizationSource'; const expectedParameters = { organization: 'organizationValue', @@ -14938,7 +14938,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -14990,7 +14990,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSourceFinding', () => { + describe('organizationSourceFinding', async () => { const fakePath = '/rendered/path/organizationSourceFinding'; const expectedParameters = { organization: 'organizationValue', @@ -15001,7 +15001,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15069,7 +15069,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSourceFindingExternalsystem', () => { + describe('organizationSourceFindingExternalsystem', async () => { const fakePath = '/rendered/path/organizationSourceFindingExternalsystem'; const expectedParameters = { organization: 'organizationValue', @@ -15081,7 +15081,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceFindingExternalsystemPathTemplate.match = @@ -15175,7 +15175,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('organizationSourceFindingSecurityMarks', () => { + describe('organizationSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/organizationSourceFindingSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -15186,7 +15186,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.match = @@ -15262,7 +15262,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectAsset', () => { + describe('projectAsset', async () => { const fakePath = '/rendered/path/projectAsset'; const expectedParameters = { project: 'projectValue', @@ -15272,7 +15272,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAssetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15311,7 +15311,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectAssetSecurityMarks', () => { + describe('projectAssetSecurityMarks', async () => { const fakePath = '/rendered/path/projectAssetSecurityMarks'; const expectedParameters = { project: 'projectValue', @@ -15321,7 +15321,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAssetSecurityMarksPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15374,7 +15374,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectConstraintName', () => { + describe('projectConstraintName', async () => { const fakePath = '/rendered/path/projectConstraintName'; const expectedParameters = { project: 'projectValue', @@ -15384,7 +15384,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConstraintNamePathTemplate.render = sinon .stub() .returns(fakePath); @@ -15437,7 +15437,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectEventThreatDetectionSettingsModule', () => { + describe('projectEventThreatDetectionSettingsModule', async () => { const fakePath = '/rendered/path/projectEventThreatDetectionSettingsModule'; const expectedParameters = { @@ -15448,7 +15448,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectEventThreatDetectionSettingsModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectEventThreatDetectionSettingsModulePathTemplate.match = @@ -15506,7 +15506,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectExport', () => { + describe('projectExport', async () => { const fakePath = '/rendered/path/projectExport'; const expectedParameters = { project: 'projectValue', @@ -15516,7 +15516,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectExportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15555,7 +15555,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectLocationMuteConfig', () => { + describe('projectLocationMuteConfig', async () => { const fakePath = '/rendered/path/projectLocationMuteConfig'; const expectedParameters = { project: 'projectValue', @@ -15566,7 +15566,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15634,7 +15634,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectMuteConfig', () => { + describe('projectMuteConfig', async () => { const fakePath = '/rendered/path/projectMuteConfig'; const expectedParameters = { project: 'projectValue', @@ -15644,7 +15644,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15696,7 +15696,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectNotificationConfig', () => { + describe('projectNotificationConfig', async () => { const fakePath = '/rendered/path/projectNotificationConfig'; const expectedParameters = { project: 'projectValue', @@ -15706,7 +15706,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectNotificationConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15761,7 +15761,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectSecurityHealthAnalyticsSettingsCustomModule', () => { + describe('projectSecurityHealthAnalyticsSettingsCustomModule', async () => { const fakePath = '/rendered/path/projectSecurityHealthAnalyticsSettingsCustomModule'; const expectedParameters = { @@ -15772,7 +15772,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSecurityHealthAnalyticsSettingsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSecurityHealthAnalyticsSettingsCustomModulePathTemplate.match = @@ -15831,7 +15831,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectSecurityHealthAnalyticsSettingsEffectiveCustomModule', () => { + describe('projectSecurityHealthAnalyticsSettingsEffectiveCustomModule', async () => { const fakePath = '/rendered/path/projectSecurityHealthAnalyticsSettingsEffectiveCustomModule'; const expectedParameters = { @@ -15842,7 +15842,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSecurityHealthAnalyticsSettingsEffectiveCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSecurityHealthAnalyticsSettingsEffectiveCustomModulePathTemplate.match = @@ -15901,7 +15901,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectSource', () => { + describe('projectSource', async () => { const fakePath = '/rendered/path/projectSource'; const expectedParameters = { project: 'projectValue', @@ -15911,7 +15911,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -15950,7 +15950,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectSourceFinding', () => { + describe('projectSourceFinding', async () => { const fakePath = '/rendered/path/projectSourceFinding'; const expectedParameters = { project: 'projectValue', @@ -15961,7 +15961,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -16028,7 +16028,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectSourceFindingExternalsystem', () => { + describe('projectSourceFindingExternalsystem', async () => { const fakePath = '/rendered/path/projectSourceFindingExternalsystem'; const expectedParameters = { project: 'projectValue', @@ -16040,7 +16040,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceFindingExternalsystemPathTemplate.match = @@ -16129,7 +16129,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('projectSourceFindingSecurityMarks', () => { + describe('projectSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/projectSourceFindingSecurityMarks'; const expectedParameters = { project: 'projectValue', @@ -16140,7 +16140,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceFindingSecurityMarksPathTemplate.match = @@ -16210,7 +16210,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('resourceValueConfig', () => { + describe('resourceValueConfig', async () => { const fakePath = '/rendered/path/resourceValueConfig'; const expectedParameters = { organization: 'organizationValue', @@ -16220,7 +16220,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.resourceValueConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -16273,7 +16273,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('simulation', () => { + describe('simulation', async () => { const fakePath = '/rendered/path/simulation'; const expectedParameters = { organization: 'organizationValue', @@ -16283,7 +16283,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.simulationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -16325,7 +16325,7 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('valuedResource', () => { + describe('valuedResource', async () => { const fakePath = '/rendered/path/valuedResource'; const expectedParameters = { organization: 'organizationValue', @@ -16336,7 +16336,7 @@ describe('v1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.valuedResourcePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-securitycenter/test/gapic_security_center_v1beta1.ts b/packages/google-cloud-securitycenter/test/gapic_security_center_v1beta1.ts index 83342627848..1c7682628be 100644 --- a/packages/google-cloud-securitycenter/test/gapic_security_center_v1beta1.ts +++ b/packages/google-cloud-securitycenter/test/gapic_security_center_v1beta1.ts @@ -288,7 +288,9 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securityCenterStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateSourceRequest() ); @@ -378,7 +380,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateSourceRequest() ); @@ -425,7 +427,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateSourceRequest() ); @@ -456,7 +458,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateSourceRequest() ); @@ -477,7 +479,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateFindingRequest() ); @@ -508,7 +510,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateFindingRequest() ); @@ -555,7 +557,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateFindingRequest() ); @@ -586,7 +588,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.CreateFindingRequest() ); @@ -607,7 +609,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -638,7 +640,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -685,7 +687,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -716,7 +718,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -737,7 +739,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest() ); @@ -769,7 +771,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest() ); @@ -816,7 +818,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest() ); @@ -850,7 +852,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest() ); @@ -874,7 +876,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetSourceRequest() ); @@ -905,7 +907,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetSourceRequest() ); @@ -952,7 +954,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetSourceRequest() ); @@ -980,7 +982,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GetSourceRequest() ); @@ -1001,7 +1003,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.SetFindingStateRequest() ); @@ -1032,7 +1034,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.SetFindingStateRequest() ); @@ -1079,7 +1081,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.SetFindingStateRequest() ); @@ -1110,7 +1112,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.SetFindingStateRequest() ); @@ -1131,7 +1133,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1162,7 +1164,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1209,7 +1211,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1240,7 +1242,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1261,7 +1263,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1293,7 +1295,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1340,7 +1342,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1371,7 +1373,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1392,7 +1394,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateFindingRequest() ); @@ -1424,7 +1426,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateFindingRequest() ); @@ -1472,7 +1474,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateFindingRequest() ); @@ -1504,7 +1506,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateFindingRequest() ); @@ -1526,7 +1528,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest() ); @@ -1559,7 +1561,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest() ); @@ -1607,7 +1609,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest() ); @@ -1642,7 +1644,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest() ); @@ -1667,7 +1669,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSourceRequest() ); @@ -1699,7 +1701,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSourceRequest() ); @@ -1747,7 +1749,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSourceRequest() ); @@ -1779,7 +1781,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSourceRequest() ); @@ -1801,7 +1803,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest() ); @@ -1834,7 +1836,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest() ); @@ -1882,7 +1884,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest() ); @@ -1914,7 +1916,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest() ); @@ -1936,7 +1938,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest() ); @@ -1969,7 +1971,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest() ); @@ -2023,7 +2025,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest() ); @@ -2054,7 +2056,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.RunAssetDiscoveryRequest() ); @@ -2087,7 +2089,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2109,7 +2111,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2130,7 +2132,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupAssetsRequest() ); @@ -2169,7 +2171,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupAssetsRequest() ); @@ -2226,7 +2228,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupAssetsRequest() ); @@ -2257,7 +2259,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupAssetsRequest() ); @@ -2320,7 +2322,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupAssetsRequest() ); @@ -2374,7 +2376,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupAssetsRequest() ); @@ -2424,7 +2426,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupAssetsRequest() ); @@ -2469,7 +2471,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupFindingsRequest() ); @@ -2508,7 +2510,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupFindingsRequest() ); @@ -2565,7 +2567,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupFindingsRequest() ); @@ -2596,7 +2598,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupFindingsRequest() ); @@ -2659,7 +2661,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupFindingsRequest() ); @@ -2711,7 +2713,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupFindingsRequest() ); @@ -2761,7 +2763,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.GroupFindingsRequest() ); @@ -2804,7 +2806,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListAssetsRequest() ); @@ -2843,7 +2845,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListAssetsRequest() ); @@ -2900,7 +2902,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListAssetsRequest() ); @@ -2931,7 +2933,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListAssetsRequest() ); @@ -2994,7 +2996,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListAssetsRequest() ); @@ -3048,7 +3050,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListAssetsRequest() ); @@ -3098,7 +3100,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListAssetsRequest() ); @@ -3143,7 +3145,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListFindingsRequest() ); @@ -3182,7 +3184,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListFindingsRequest() ); @@ -3239,7 +3241,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListFindingsRequest() ); @@ -3270,7 +3272,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListFindingsRequest() ); @@ -3331,7 +3333,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListFindingsRequest() ); @@ -3383,7 +3385,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListFindingsRequest() ); @@ -3433,7 +3435,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListFindingsRequest() ); @@ -3476,7 +3478,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListSourcesRequest() ); @@ -3515,7 +3517,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListSourcesRequest() ); @@ -3570,7 +3572,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListSourcesRequest() ); @@ -3601,7 +3603,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListSourcesRequest() ); @@ -3662,7 +3664,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListSourcesRequest() ); @@ -3714,7 +3716,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListSourcesRequest() ); @@ -3764,7 +3766,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1beta1.ListSourcesRequest() ); @@ -3804,7 +3806,7 @@ describe('v1beta1.SecurityCenterClient', () => { }); describe('Path templates', () => { - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { organization: 'organizationValue', @@ -3814,7 +3816,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3853,7 +3855,7 @@ describe('v1beta1.SecurityCenterClient', () => { }); }); - describe('finding', () => { + describe('finding', async () => { const fakePath = '/rendered/path/finding'; const expectedParameters = { organization: 'organizationValue', @@ -3864,7 +3866,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.findingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3917,7 +3919,7 @@ describe('v1beta1.SecurityCenterClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -3926,7 +3928,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3955,7 +3957,7 @@ describe('v1beta1.SecurityCenterClient', () => { }); }); - describe('organizationAssetSecurityMarks', () => { + describe('organizationAssetSecurityMarks', async () => { const fakePath = '/rendered/path/organizationAssetSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -3965,7 +3967,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.match = @@ -4018,7 +4020,7 @@ describe('v1beta1.SecurityCenterClient', () => { }); }); - describe('organizationSettings', () => { + describe('organizationSettings', async () => { const fakePath = '/rendered/path/organizationSettings'; const expectedParameters = { organization: 'organizationValue', @@ -4027,7 +4029,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4063,7 +4065,7 @@ describe('v1beta1.SecurityCenterClient', () => { }); }); - describe('organizationSourceFindingSecurityMarks', () => { + describe('organizationSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/organizationSourceFindingSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -4074,7 +4076,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.match = @@ -4150,7 +4152,7 @@ describe('v1beta1.SecurityCenterClient', () => { }); }); - describe('source', () => { + describe('source', async () => { const fakePath = '/rendered/path/source'; const expectedParameters = { organization: 'organizationValue', @@ -4160,7 +4162,7 @@ describe('v1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sourcePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-securitycenter/test/gapic_security_center_v1p1beta1.ts b/packages/google-cloud-securitycenter/test/gapic_security_center_v1p1beta1.ts index 3c3ed8ce793..bb9662aaee8 100644 --- a/packages/google-cloud-securitycenter/test/gapic_security_center_v1p1beta1.ts +++ b/packages/google-cloud-securitycenter/test/gapic_security_center_v1p1beta1.ts @@ -289,7 +289,9 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securityCenterStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateSourceRequest() ); @@ -379,7 +381,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateSourceRequest() ); @@ -426,7 +428,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateSourceRequest() ); @@ -457,7 +459,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateSourceRequest() ); @@ -478,7 +480,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateFindingRequest() ); @@ -509,7 +511,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateFindingRequest() ); @@ -556,7 +558,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateFindingRequest() ); @@ -587,7 +589,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateFindingRequest() ); @@ -608,7 +610,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest() ); @@ -640,7 +642,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest() ); @@ -687,7 +689,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest() ); @@ -721,7 +723,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest() ); @@ -745,7 +747,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest() ); @@ -777,7 +779,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest() ); @@ -824,7 +826,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest() ); @@ -858,7 +860,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest() ); @@ -882,7 +884,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -913,7 +915,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -960,7 +962,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -991,7 +993,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1012,7 +1014,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest() ); @@ -1044,7 +1046,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest() ); @@ -1091,7 +1093,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest() ); @@ -1125,7 +1127,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest() ); @@ -1149,7 +1151,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest() ); @@ -1181,7 +1183,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest() ); @@ -1228,7 +1230,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest() ); @@ -1262,7 +1264,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest() ); @@ -1286,7 +1288,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetSourceRequest() ); @@ -1317,7 +1319,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetSourceRequest() ); @@ -1364,7 +1366,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetSourceRequest() ); @@ -1392,7 +1394,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GetSourceRequest() ); @@ -1413,7 +1415,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest() ); @@ -1444,7 +1446,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest() ); @@ -1491,7 +1493,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest() ); @@ -1522,7 +1524,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest() ); @@ -1543,7 +1545,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1574,7 +1576,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1621,7 +1623,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1652,7 +1654,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1673,7 +1675,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1705,7 +1707,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1752,7 +1754,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1783,7 +1785,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1804,7 +1806,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest() ); @@ -1836,7 +1838,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest() ); @@ -1884,7 +1886,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest() ); @@ -1916,7 +1918,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest() ); @@ -1938,7 +1940,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest() ); @@ -1971,7 +1973,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest() ); @@ -2019,7 +2021,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest() ); @@ -2054,7 +2056,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest() ); @@ -2079,7 +2081,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest() ); @@ -2112,7 +2114,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest() ); @@ -2160,7 +2162,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest() ); @@ -2195,7 +2197,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest() ); @@ -2220,7 +2222,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest() ); @@ -2252,7 +2254,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest() ); @@ -2300,7 +2302,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest() ); @@ -2332,7 +2334,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest() ); @@ -2354,7 +2356,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest() ); @@ -2387,7 +2389,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest() ); @@ -2435,7 +2437,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest() ); @@ -2467,7 +2469,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest() ); @@ -2489,7 +2491,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest() ); @@ -2522,7 +2524,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest() ); @@ -2576,7 +2578,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest() ); @@ -2607,7 +2609,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest() ); @@ -2640,7 +2642,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2662,7 +2664,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2683,7 +2685,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest() ); @@ -2722,7 +2724,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest() ); @@ -2779,7 +2781,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest() ); @@ -2810,7 +2812,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest() ); @@ -2873,7 +2875,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest() ); @@ -2927,7 +2929,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest() ); @@ -2977,7 +2979,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest() ); @@ -3022,7 +3024,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest() ); @@ -3061,7 +3063,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest() ); @@ -3118,7 +3120,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest() ); @@ -3149,7 +3151,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest() ); @@ -3212,7 +3214,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest() ); @@ -3264,7 +3266,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest() ); @@ -3314,7 +3316,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest() ); @@ -3357,7 +3359,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListAssetsRequest() ); @@ -3396,7 +3398,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListAssetsRequest() ); @@ -3453,7 +3455,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListAssetsRequest() ); @@ -3484,7 +3486,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListAssetsRequest() ); @@ -3547,7 +3549,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListAssetsRequest() ); @@ -3601,7 +3603,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListAssetsRequest() ); @@ -3651,7 +3653,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListAssetsRequest() ); @@ -3696,7 +3698,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListFindingsRequest() ); @@ -3735,7 +3737,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListFindingsRequest() ); @@ -3792,7 +3794,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListFindingsRequest() ); @@ -3823,7 +3825,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListFindingsRequest() ); @@ -3886,7 +3888,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListFindingsRequest() ); @@ -3940,7 +3942,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListFindingsRequest() ); @@ -3990,7 +3992,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListFindingsRequest() ); @@ -4033,7 +4035,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest() ); @@ -4073,7 +4075,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest() ); @@ -4130,7 +4132,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest() ); @@ -4164,7 +4166,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest() ); @@ -4233,7 +4235,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest() ); @@ -4291,7 +4293,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest() ); @@ -4345,7 +4347,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest() ); @@ -4392,7 +4394,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListSourcesRequest() ); @@ -4431,7 +4433,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListSourcesRequest() ); @@ -4488,7 +4490,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListSourcesRequest() ); @@ -4519,7 +4521,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListSourcesRequest() ); @@ -4580,7 +4582,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListSourcesRequest() ); @@ -4632,7 +4634,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListSourcesRequest() ); @@ -4682,7 +4684,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v1p1beta1.ListSourcesRequest() ); @@ -4722,7 +4724,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); describe('Path templates', () => { - describe('folderAsset', () => { + describe('folderAsset', async () => { const fakePath = '/rendered/path/folderAsset'; const expectedParameters = { folder: 'folderValue', @@ -4732,7 +4734,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderAssetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4771,7 +4773,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('folderAssetSecurityMarks', () => { + describe('folderAssetSecurityMarks', async () => { const fakePath = '/rendered/path/folderAssetSecurityMarks'; const expectedParameters = { folder: 'folderValue', @@ -4781,7 +4783,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderAssetSecurityMarksPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4834,7 +4836,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('folderSource', () => { + describe('folderSource', async () => { const fakePath = '/rendered/path/folderSource'; const expectedParameters = { folder: 'folderValue', @@ -4844,7 +4846,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4883,7 +4885,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('folderSourceFinding', () => { + describe('folderSourceFinding', async () => { const fakePath = '/rendered/path/folderSourceFinding'; const expectedParameters = { folder: 'folderValue', @@ -4894,7 +4896,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4959,7 +4961,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('folderSourceFindingSecurityMarks', () => { + describe('folderSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/folderSourceFindingSecurityMarks'; const expectedParameters = { folder: 'folderValue', @@ -4970,7 +4972,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceFindingSecurityMarksPathTemplate.match = @@ -5036,7 +5038,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('notificationConfig', () => { + describe('notificationConfig', async () => { const fakePath = '/rendered/path/notificationConfig'; const expectedParameters = { organization: 'organizationValue', @@ -5046,7 +5048,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.notificationConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5099,7 +5101,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -5108,7 +5110,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5137,7 +5139,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('organizationAsset', () => { + describe('organizationAsset', async () => { const fakePath = '/rendered/path/organizationAsset'; const expectedParameters = { organization: 'organizationValue', @@ -5147,7 +5149,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationAssetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5199,7 +5201,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('organizationAssetSecurityMarks', () => { + describe('organizationAssetSecurityMarks', async () => { const fakePath = '/rendered/path/organizationAssetSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -5209,7 +5211,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.match = @@ -5262,7 +5264,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('organizationSettings', () => { + describe('organizationSettings', async () => { const fakePath = '/rendered/path/organizationSettings'; const expectedParameters = { organization: 'organizationValue', @@ -5271,7 +5273,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5307,7 +5309,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('organizationSource', () => { + describe('organizationSource', async () => { const fakePath = '/rendered/path/organizationSource'; const expectedParameters = { organization: 'organizationValue', @@ -5317,7 +5319,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5369,7 +5371,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('organizationSourceFinding', () => { + describe('organizationSourceFinding', async () => { const fakePath = '/rendered/path/organizationSourceFinding'; const expectedParameters = { organization: 'organizationValue', @@ -5380,7 +5382,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5448,7 +5450,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('organizationSourceFindingSecurityMarks', () => { + describe('organizationSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/organizationSourceFindingSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -5459,7 +5461,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.match = @@ -5535,7 +5537,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('projectAsset', () => { + describe('projectAsset', async () => { const fakePath = '/rendered/path/projectAsset'; const expectedParameters = { project: 'projectValue', @@ -5545,7 +5547,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAssetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5584,7 +5586,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('projectAssetSecurityMarks', () => { + describe('projectAssetSecurityMarks', async () => { const fakePath = '/rendered/path/projectAssetSecurityMarks'; const expectedParameters = { project: 'projectValue', @@ -5594,7 +5596,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAssetSecurityMarksPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5647,7 +5649,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('projectSource', () => { + describe('projectSource', async () => { const fakePath = '/rendered/path/projectSource'; const expectedParameters = { project: 'projectValue', @@ -5657,7 +5659,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5696,7 +5698,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('projectSourceFinding', () => { + describe('projectSourceFinding', async () => { const fakePath = '/rendered/path/projectSourceFinding'; const expectedParameters = { project: 'projectValue', @@ -5707,7 +5709,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5774,7 +5776,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { }); }); - describe('projectSourceFindingSecurityMarks', () => { + describe('projectSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/projectSourceFindingSecurityMarks'; const expectedParameters = { project: 'projectValue', @@ -5785,7 +5787,7 @@ describe('v1p1beta1.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceFindingSecurityMarksPathTemplate.match = diff --git a/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts b/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts index f9a0a08a8e4..16373183c94 100644 --- a/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts +++ b/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts @@ -287,7 +287,9 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securityCenterStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest() ); @@ -378,7 +380,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest() ); @@ -425,7 +427,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest() ); @@ -459,7 +461,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest() ); @@ -483,7 +485,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateBigQueryExportRequest() ); @@ -515,7 +517,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateBigQueryExportRequest() ); @@ -562,7 +564,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateBigQueryExportRequest() ); @@ -593,7 +595,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateBigQueryExportRequest() ); @@ -614,7 +616,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateFindingRequest() ); @@ -645,7 +647,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateFindingRequest() ); @@ -692,7 +694,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateFindingRequest() ); @@ -723,7 +725,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateFindingRequest() ); @@ -744,7 +746,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateMuteConfigRequest() ); @@ -776,7 +778,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateMuteConfigRequest() ); @@ -824,7 +826,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateMuteConfigRequest() ); @@ -856,7 +858,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateMuteConfigRequest() ); @@ -878,7 +880,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateNotificationConfigRequest() ); @@ -910,7 +912,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateNotificationConfigRequest() ); @@ -957,7 +959,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateNotificationConfigRequest() ); @@ -991,7 +993,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateNotificationConfigRequest() ); @@ -1015,7 +1017,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateSourceRequest() ); @@ -1046,7 +1048,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateSourceRequest() ); @@ -1093,7 +1095,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateSourceRequest() ); @@ -1124,7 +1126,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.CreateSourceRequest() ); @@ -1145,7 +1147,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest() ); @@ -1177,7 +1179,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest() ); @@ -1224,7 +1226,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest() ); @@ -1255,7 +1257,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteBigQueryExportRequest() ); @@ -1276,7 +1278,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteMuteConfigRequest() ); @@ -1308,7 +1310,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteMuteConfigRequest() ); @@ -1356,7 +1358,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteMuteConfigRequest() ); @@ -1388,7 +1390,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteMuteConfigRequest() ); @@ -1410,7 +1412,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest() ); @@ -1442,7 +1444,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest() ); @@ -1489,7 +1491,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest() ); @@ -1523,7 +1525,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteNotificationConfigRequest() ); @@ -1547,7 +1549,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest() ); @@ -1579,7 +1581,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest() ); @@ -1626,7 +1628,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest() ); @@ -1660,7 +1662,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest() ); @@ -1684,7 +1686,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetBigQueryExportRequest() ); @@ -1715,7 +1717,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetBigQueryExportRequest() ); @@ -1762,7 +1764,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetBigQueryExportRequest() ); @@ -1793,7 +1795,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetBigQueryExportRequest() ); @@ -1814,7 +1816,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSimulationRequest() ); @@ -1845,7 +1847,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSimulationRequest() ); @@ -1892,7 +1894,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSimulationRequest() ); @@ -1923,7 +1925,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSimulationRequest() ); @@ -1944,7 +1946,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetValuedResourceRequest() ); @@ -1975,7 +1977,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetValuedResourceRequest() ); @@ -2022,7 +2024,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetValuedResourceRequest() ); @@ -2053,7 +2055,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetValuedResourceRequest() ); @@ -2074,7 +2076,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2105,7 +2107,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2152,7 +2154,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2183,7 +2185,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2204,7 +2206,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetMuteConfigRequest() ); @@ -2236,7 +2238,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetMuteConfigRequest() ); @@ -2284,7 +2286,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetMuteConfigRequest() ); @@ -2316,7 +2318,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetMuteConfigRequest() ); @@ -2338,7 +2340,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetNotificationConfigRequest() ); @@ -2370,7 +2372,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetNotificationConfigRequest() ); @@ -2417,7 +2419,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetNotificationConfigRequest() ); @@ -2451,7 +2453,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetNotificationConfigRequest() ); @@ -2475,7 +2477,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetResourceValueConfigRequest() ); @@ -2507,7 +2509,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetResourceValueConfigRequest() ); @@ -2554,7 +2556,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetResourceValueConfigRequest() ); @@ -2588,7 +2590,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetResourceValueConfigRequest() ); @@ -2612,7 +2614,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSourceRequest() ); @@ -2643,7 +2645,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSourceRequest() ); @@ -2690,7 +2692,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSourceRequest() ); @@ -2718,7 +2720,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GetSourceRequest() ); @@ -2739,7 +2741,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetFindingStateRequest() ); @@ -2770,7 +2772,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetFindingStateRequest() ); @@ -2817,7 +2819,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetFindingStateRequest() ); @@ -2848,7 +2850,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetFindingStateRequest() ); @@ -2869,7 +2871,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2900,7 +2902,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2947,7 +2949,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2978,7 +2980,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2999,7 +3001,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetMuteRequest() ); @@ -3030,7 +3032,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetMuteRequest() ); @@ -3077,7 +3079,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetMuteRequest() ); @@ -3105,7 +3107,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.SetMuteRequest() ); @@ -3126,7 +3128,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3158,7 +3160,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3205,7 +3207,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3236,7 +3238,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3257,7 +3259,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest() ); @@ -3290,7 +3292,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest() ); @@ -3338,7 +3340,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest() ); @@ -3370,7 +3372,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest() ); @@ -3392,7 +3394,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateExternalSystemRequest() ); @@ -3425,7 +3427,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateExternalSystemRequest() ); @@ -3473,7 +3475,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateExternalSystemRequest() ); @@ -3505,7 +3507,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateExternalSystemRequest() ); @@ -3527,7 +3529,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateFindingRequest() ); @@ -3559,7 +3561,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateFindingRequest() ); @@ -3607,7 +3609,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateFindingRequest() ); @@ -3639,7 +3641,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateFindingRequest() ); @@ -3661,7 +3663,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateMuteConfigRequest() ); @@ -3699,7 +3701,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateMuteConfigRequest() ); @@ -3753,7 +3755,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateMuteConfigRequest() ); @@ -3791,7 +3793,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateMuteConfigRequest() ); @@ -3819,7 +3821,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest() ); @@ -3852,7 +3854,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest() ); @@ -3900,7 +3902,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest() ); @@ -3935,7 +3937,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest() ); @@ -3960,7 +3962,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest() ); @@ -3993,7 +3995,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest() ); @@ -4041,7 +4043,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest() ); @@ -4076,7 +4078,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest() ); @@ -4101,7 +4103,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest() ); @@ -4134,7 +4136,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest() ); @@ -4182,7 +4184,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest() ); @@ -4214,7 +4216,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest() ); @@ -4236,7 +4238,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSourceRequest() ); @@ -4268,7 +4270,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSourceRequest() ); @@ -4316,7 +4318,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSourceRequest() ); @@ -4348,7 +4350,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.UpdateSourceRequest() ); @@ -4370,7 +4372,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BulkMuteFindingsRequest() ); @@ -4403,7 +4405,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BulkMuteFindingsRequest() ); @@ -4457,7 +4459,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BulkMuteFindingsRequest() ); @@ -4488,7 +4490,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.BulkMuteFindingsRequest() ); @@ -4521,7 +4523,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4543,7 +4545,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4564,7 +4566,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GroupFindingsRequest() ); @@ -4603,7 +4605,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GroupFindingsRequest() ); @@ -4658,7 +4660,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GroupFindingsRequest() ); @@ -4689,7 +4691,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GroupFindingsRequest() ); @@ -4750,7 +4752,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GroupFindingsRequest() ); @@ -4800,7 +4802,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GroupFindingsRequest() ); @@ -4850,7 +4852,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.GroupFindingsRequest() ); @@ -4893,7 +4895,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListAttackPathsRequest() ); @@ -4932,7 +4934,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListAttackPathsRequest() ); @@ -4987,7 +4989,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListAttackPathsRequest() ); @@ -5018,7 +5020,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListAttackPathsRequest() ); @@ -5079,7 +5081,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListAttackPathsRequest() ); @@ -5129,7 +5131,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListAttackPathsRequest() ); @@ -5178,7 +5180,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListAttackPathsRequest() ); @@ -5221,7 +5223,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListBigQueryExportsRequest() ); @@ -5261,7 +5263,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListBigQueryExportsRequest() ); @@ -5318,7 +5320,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListBigQueryExportsRequest() ); @@ -5349,7 +5351,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListBigQueryExportsRequest() ); @@ -5410,7 +5412,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListBigQueryExportsRequest() ); @@ -5460,7 +5462,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListBigQueryExportsRequest() ); @@ -5510,7 +5512,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListBigQueryExportsRequest() ); @@ -5553,7 +5555,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListFindingsRequest() ); @@ -5592,7 +5594,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListFindingsRequest() ); @@ -5649,7 +5651,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListFindingsRequest() ); @@ -5680,7 +5682,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListFindingsRequest() ); @@ -5743,7 +5745,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListFindingsRequest() ); @@ -5797,7 +5799,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListFindingsRequest() ); @@ -5847,7 +5849,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListFindingsRequest() ); @@ -5890,7 +5892,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListMuteConfigsRequest() ); @@ -5930,7 +5932,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListMuteConfigsRequest() ); @@ -5986,7 +5988,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListMuteConfigsRequest() ); @@ -6018,7 +6020,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListMuteConfigsRequest() ); @@ -6080,7 +6082,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListMuteConfigsRequest() ); @@ -6131,7 +6133,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListMuteConfigsRequest() ); @@ -6181,7 +6183,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListMuteConfigsRequest() ); @@ -6225,7 +6227,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListNotificationConfigsRequest() ); @@ -6265,7 +6267,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListNotificationConfigsRequest() ); @@ -6322,7 +6324,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListNotificationConfigsRequest() ); @@ -6356,7 +6358,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListNotificationConfigsRequest() ); @@ -6425,7 +6427,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListNotificationConfigsRequest() ); @@ -6483,7 +6485,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListNotificationConfigsRequest() ); @@ -6537,7 +6539,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListNotificationConfigsRequest() ); @@ -6584,7 +6586,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest() ); @@ -6624,7 +6626,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest() ); @@ -6681,7 +6683,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest() ); @@ -6715,7 +6717,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest() ); @@ -6784,7 +6786,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest() ); @@ -6842,7 +6844,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest() ); @@ -6896,7 +6898,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListResourceValueConfigsRequest() ); @@ -6943,7 +6945,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListSourcesRequest() ); @@ -6982,7 +6984,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListSourcesRequest() ); @@ -7037,7 +7039,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListSourcesRequest() ); @@ -7068,7 +7070,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListSourcesRequest() ); @@ -7128,7 +7130,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListSourcesRequest() ); @@ -7179,7 +7181,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListSourcesRequest() ); @@ -7228,7 +7230,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListSourcesRequest() ); @@ -7272,7 +7274,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListValuedResourcesRequest() ); @@ -7312,7 +7314,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListValuedResourcesRequest() ); @@ -7369,7 +7371,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListValuedResourcesRequest() ); @@ -7400,7 +7402,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListValuedResourcesRequest() ); @@ -7461,7 +7463,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListValuedResourcesRequest() ); @@ -7511,7 +7513,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListValuedResourcesRequest() ); @@ -7561,7 +7563,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycenter.v2.ListValuedResourcesRequest() ); @@ -7603,7 +7605,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7682,7 +7684,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7762,7 +7764,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7858,8 +7860,7 @@ describe('v2.SecurityCenterClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7878,7 +7879,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7887,8 +7888,7 @@ describe('v2.SecurityCenterClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -7904,7 +7904,7 @@ describe('v2.SecurityCenterClient', () => { }); describe('Path templates', () => { - describe('folderAssetSecurityMarks', () => { + describe('folderAssetSecurityMarks', async () => { const fakePath = '/rendered/path/folderAssetSecurityMarks'; const expectedParameters = { folder: 'folderValue', @@ -7914,7 +7914,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderAssetSecurityMarksPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7967,7 +7967,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderConstraintName', () => { + describe('folderConstraintName', async () => { const fakePath = '/rendered/path/folderConstraintName'; const expectedParameters = { folder: 'folderValue', @@ -7977,7 +7977,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderConstraintNamePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8029,7 +8029,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderLocationExport', () => { + describe('folderLocationExport', async () => { const fakePath = '/rendered/path/folderLocationExport'; const expectedParameters = { folder: 'folderValue', @@ -8040,7 +8040,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationExportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8106,7 +8106,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderLocationMuteConfig', () => { + describe('folderLocationMuteConfig', async () => { const fakePath = '/rendered/path/folderLocationMuteConfig'; const expectedParameters = { folder: 'folderValue', @@ -8117,7 +8117,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8185,7 +8185,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderLocationNotificationConfig', () => { + describe('folderLocationNotificationConfig', async () => { const fakePath = '/rendered/path/folderLocationNotificationConfig'; const expectedParameters = { folder: 'folderValue', @@ -8196,7 +8196,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationNotificationConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationNotificationConfigPathTemplate.match = @@ -8266,7 +8266,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderMuteConfig', () => { + describe('folderMuteConfig', async () => { const fakePath = '/rendered/path/folderMuteConfig'; const expectedParameters = { folder: 'folderValue', @@ -8276,7 +8276,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8321,7 +8321,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderSource', () => { + describe('folderSource', async () => { const fakePath = '/rendered/path/folderSource'; const expectedParameters = { folder: 'folderValue', @@ -8331,7 +8331,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8370,7 +8370,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderSourceFinding', () => { + describe('folderSourceFinding', async () => { const fakePath = '/rendered/path/folderSourceFinding'; const expectedParameters = { folder: 'folderValue', @@ -8381,7 +8381,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8446,7 +8446,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderSourceFindingExternalsystem', () => { + describe('folderSourceFindingExternalsystem', async () => { const fakePath = '/rendered/path/folderSourceFindingExternalsystem'; const expectedParameters = { folder: 'folderValue', @@ -8458,7 +8458,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceFindingExternalsystemPathTemplate.match = @@ -8543,7 +8543,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderSourceFindingSecurityMarks', () => { + describe('folderSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/folderSourceFindingSecurityMarks'; const expectedParameters = { folder: 'folderValue', @@ -8554,7 +8554,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceFindingSecurityMarksPathTemplate.match = @@ -8620,7 +8620,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderSourceLocationFinding', () => { + describe('folderSourceLocationFinding', async () => { const fakePath = '/rendered/path/folderSourceLocationFinding'; const expectedParameters = { folder: 'folderValue', @@ -8632,7 +8632,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceLocationFindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceLocationFindingPathTemplate.match = sinon @@ -8714,7 +8714,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderSourceLocationFindingExternalsystem', () => { + describe('folderSourceLocationFindingExternalsystem', async () => { const fakePath = '/rendered/path/folderSourceLocationFindingExternalsystem'; const expectedParameters = { @@ -8728,7 +8728,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceLocationFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceLocationFindingExternalsystemPathTemplate.match = @@ -8840,7 +8840,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('folderSourceLocationFindingSecurityMarks', () => { + describe('folderSourceLocationFindingSecurityMarks', async () => { const fakePath = '/rendered/path/folderSourceLocationFindingSecurityMarks'; const expectedParameters = { @@ -8853,7 +8853,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceLocationFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderSourceLocationFindingSecurityMarksPathTemplate.match = @@ -8947,7 +8947,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -8956,7 +8956,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8985,7 +8985,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationAssetSecurityMarks', () => { + describe('organizationAssetSecurityMarks', async () => { const fakePath = '/rendered/path/organizationAssetSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -8995,7 +8995,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationAssetSecurityMarksPathTemplate.match = @@ -9048,7 +9048,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationConstraintName', () => { + describe('organizationConstraintName', async () => { const fakePath = '/rendered/path/organizationConstraintName'; const expectedParameters = { organization: 'organizationValue', @@ -9058,7 +9058,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationConstraintNamePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9113,7 +9113,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocation', () => { + describe('organizationLocation', async () => { const fakePath = '/rendered/path/organizationLocation'; const expectedParameters = { organization: 'organizationValue', @@ -9123,7 +9123,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9176,7 +9176,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationExport', () => { + describe('organizationLocationExport', async () => { const fakePath = '/rendered/path/organizationLocationExport'; const expectedParameters = { organization: 'organizationValue', @@ -9187,7 +9187,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationExportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9255,7 +9255,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationMuteConfig', () => { + describe('organizationLocationMuteConfig', async () => { const fakePath = '/rendered/path/organizationLocationMuteConfig'; const expectedParameters = { organization: 'organizationValue', @@ -9266,7 +9266,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationMuteConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationMuteConfigPathTemplate.match = @@ -9336,7 +9336,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationNotificationConfig', () => { + describe('organizationLocationNotificationConfig', async () => { const fakePath = '/rendered/path/organizationLocationNotificationConfig'; const expectedParameters = { organization: 'organizationValue', @@ -9347,7 +9347,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationNotificationConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationNotificationConfigPathTemplate.match = @@ -9423,7 +9423,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationResourceValueConfig', () => { + describe('organizationLocationResourceValueConfig', async () => { const fakePath = '/rendered/path/organizationLocationResourceValueConfig'; const expectedParameters = { organization: 'organizationValue', @@ -9434,7 +9434,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationResourceValueConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationResourceValueConfigPathTemplate.match = @@ -9510,7 +9510,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationSimluation', () => { + describe('organizationLocationSimluation', async () => { const fakePath = '/rendered/path/organizationLocationSimluation'; const expectedParameters = { organization: 'organizationValue', @@ -9521,7 +9521,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationSimluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationSimluationPathTemplate.match = @@ -9591,7 +9591,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationSimluationValuedResource', () => { + describe('organizationLocationSimluationValuedResource', async () => { const fakePath = '/rendered/path/organizationLocationSimluationValuedResource'; const expectedParameters = { @@ -9604,7 +9604,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.match = @@ -9698,7 +9698,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationSimulationValuedResourceAttackPath', () => { + describe('organizationLocationSimulationValuedResourceAttackPath', async () => { const fakePath = '/rendered/path/organizationLocationSimulationValuedResourceAttackPath'; const expectedParameters = { @@ -9712,7 +9712,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.match = @@ -9825,7 +9825,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationMuteConfig', () => { + describe('organizationMuteConfig', async () => { const fakePath = '/rendered/path/organizationMuteConfig'; const expectedParameters = { organization: 'organizationValue', @@ -9835,7 +9835,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9888,7 +9888,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationResourceValueConfig', () => { + describe('organizationResourceValueConfig', async () => { const fakePath = '/rendered/path/organizationResourceValueConfig'; const expectedParameters = { organization: 'organizationValue', @@ -9898,7 +9898,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationResourceValueConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationResourceValueConfigPathTemplate.match = @@ -9953,7 +9953,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSimulation', () => { + describe('organizationSimulation', async () => { const fakePath = '/rendered/path/organizationSimulation'; const expectedParameters = { organization: 'organizationValue', @@ -9963,7 +9963,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSimulationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10016,7 +10016,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSimulationValuedResource', () => { + describe('organizationSimulationValuedResource', async () => { const fakePath = '/rendered/path/organizationSimulationValuedResource'; const expectedParameters = { organization: 'organizationValue', @@ -10027,7 +10027,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSimulationValuedResourcePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSimulationValuedResourcePathTemplate.match = @@ -10103,7 +10103,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSimulationValuedResourceAttackPath', () => { + describe('organizationSimulationValuedResourceAttackPath', async () => { const fakePath = '/rendered/path/organizationSimulationValuedResourceAttackPath'; const expectedParameters = { @@ -10116,7 +10116,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.match = @@ -10211,7 +10211,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSource', () => { + describe('organizationSource', async () => { const fakePath = '/rendered/path/organizationSource'; const expectedParameters = { organization: 'organizationValue', @@ -10221,7 +10221,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10273,7 +10273,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSourceFinding', () => { + describe('organizationSourceFinding', async () => { const fakePath = '/rendered/path/organizationSourceFinding'; const expectedParameters = { organization: 'organizationValue', @@ -10284,7 +10284,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10352,7 +10352,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSourceFindingExternalsystem', () => { + describe('organizationSourceFindingExternalsystem', async () => { const fakePath = '/rendered/path/organizationSourceFindingExternalsystem'; const expectedParameters = { organization: 'organizationValue', @@ -10364,7 +10364,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceFindingExternalsystemPathTemplate.match = @@ -10458,7 +10458,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSourceFindingSecurityMarks', () => { + describe('organizationSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/organizationSourceFindingSecurityMarks'; const expectedParameters = { organization: 'organizationValue', @@ -10469,7 +10469,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceFindingSecurityMarksPathTemplate.match = @@ -10545,7 +10545,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSourceLocationFinding', () => { + describe('organizationSourceLocationFinding', async () => { const fakePath = '/rendered/path/organizationSourceLocationFinding'; const expectedParameters = { organization: 'organizationValue', @@ -10557,7 +10557,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceLocationFindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceLocationFindingPathTemplate.match = @@ -10644,7 +10644,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSourceLocationFindingExternalsystem', () => { + describe('organizationSourceLocationFindingExternalsystem', async () => { const fakePath = '/rendered/path/organizationSourceLocationFindingExternalsystem'; const expectedParameters = { @@ -10658,7 +10658,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceLocationFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceLocationFindingExternalsystemPathTemplate.match = @@ -10771,7 +10771,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationSourceLocationFindingSecurityMarks', () => { + describe('organizationSourceLocationFindingSecurityMarks', async () => { const fakePath = '/rendered/path/organizationSourceLocationFindingSecurityMarks'; const expectedParameters = { @@ -10784,7 +10784,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceLocationFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationSourceLocationFindingSecurityMarksPathTemplate.match = @@ -10879,7 +10879,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectAssetSecurityMarks', () => { + describe('projectAssetSecurityMarks', async () => { const fakePath = '/rendered/path/projectAssetSecurityMarks'; const expectedParameters = { project: 'projectValue', @@ -10889,7 +10889,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAssetSecurityMarksPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10942,7 +10942,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectConstraintName', () => { + describe('projectConstraintName', async () => { const fakePath = '/rendered/path/projectConstraintName'; const expectedParameters = { project: 'projectValue', @@ -10952,7 +10952,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConstraintNamePathTemplate.render = sinon .stub() .returns(fakePath); @@ -11005,7 +11005,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectLocationExport', () => { + describe('projectLocationExport', async () => { const fakePath = '/rendered/path/projectLocationExport'; const expectedParameters = { project: 'projectValue', @@ -11016,7 +11016,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationExportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11084,7 +11084,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectLocationMuteConfig', () => { + describe('projectLocationMuteConfig', async () => { const fakePath = '/rendered/path/projectLocationMuteConfig'; const expectedParameters = { project: 'projectValue', @@ -11095,7 +11095,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11163,7 +11163,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectLocationNotificationConfig', () => { + describe('projectLocationNotificationConfig', async () => { const fakePath = '/rendered/path/projectLocationNotificationConfig'; const expectedParameters = { project: 'projectValue', @@ -11174,7 +11174,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationNotificationConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationNotificationConfigPathTemplate.match = @@ -11246,7 +11246,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectMuteConfig', () => { + describe('projectMuteConfig', async () => { const fakePath = '/rendered/path/projectMuteConfig'; const expectedParameters = { project: 'projectValue', @@ -11256,7 +11256,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectMuteConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11308,7 +11308,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectSource', () => { + describe('projectSource', async () => { const fakePath = '/rendered/path/projectSource'; const expectedParameters = { project: 'projectValue', @@ -11318,7 +11318,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -11357,7 +11357,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectSourceFinding', () => { + describe('projectSourceFinding', async () => { const fakePath = '/rendered/path/projectSourceFinding'; const expectedParameters = { project: 'projectValue', @@ -11368,7 +11368,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11435,7 +11435,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectSourceFindingExternalsystem', () => { + describe('projectSourceFindingExternalsystem', async () => { const fakePath = '/rendered/path/projectSourceFindingExternalsystem'; const expectedParameters = { project: 'projectValue', @@ -11447,7 +11447,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceFindingExternalsystemPathTemplate.match = @@ -11536,7 +11536,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectSourceFindingSecurityMarks', () => { + describe('projectSourceFindingSecurityMarks', async () => { const fakePath = '/rendered/path/projectSourceFindingSecurityMarks'; const expectedParameters = { project: 'projectValue', @@ -11547,7 +11547,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceFindingSecurityMarksPathTemplate.match = @@ -11617,7 +11617,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectSourceLocationFinding', () => { + describe('projectSourceLocationFinding', async () => { const fakePath = '/rendered/path/projectSourceLocationFinding'; const expectedParameters = { project: 'projectValue', @@ -11629,7 +11629,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceLocationFindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceLocationFindingPathTemplate.match = @@ -11710,7 +11710,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectSourceLocationFindingExternalsystem', () => { + describe('projectSourceLocationFindingExternalsystem', async () => { const fakePath = '/rendered/path/projectSourceLocationFindingExternalsystem'; const expectedParameters = { @@ -11724,7 +11724,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceLocationFindingExternalsystemPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceLocationFindingExternalsystemPathTemplate.match = @@ -11836,7 +11836,7 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('projectSourceLocationFindingSecurityMarks', () => { + describe('projectSourceLocationFindingSecurityMarks', async () => { const fakePath = '/rendered/path/projectSourceLocationFindingSecurityMarks'; const expectedParameters = { @@ -11849,7 +11849,7 @@ describe('v2.SecurityCenterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceLocationFindingSecurityMarksPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectSourceLocationFindingSecurityMarksPathTemplate.match = diff --git a/packages/google-cloud-securitycentermanagement/package.json b/packages/google-cloud-securitycentermanagement/package.json index aa75ad0f0cf..e21725048f6 100644 --- a/packages/google-cloud-securitycentermanagement/package.json +++ b/packages/google-cloud-securitycentermanagement/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json b/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json index 70492e852c1..8b479ccc5f8 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycentermanagement", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts b/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts index 54013c34fef..e13bca877fd 100644 --- a/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts +++ b/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts @@ -621,7 +621,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'getEffectiveSecurityHealthAnalyticsCustomModule request %j', request @@ -761,7 +763,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'getSecurityHealthAnalyticsCustomModule request %j', request @@ -921,7 +925,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'createSecurityHealthAnalyticsCustomModule request %j', request @@ -1088,7 +1094,9 @@ export class SecurityCenterManagementClient { 'security_health_analytics_custom_module.name': request.securityHealthAnalyticsCustomModule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateSecurityHealthAnalyticsCustomModule request %j', request @@ -1248,7 +1256,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'deleteSecurityHealthAnalyticsCustomModule request %j', request @@ -1395,7 +1405,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'simulateSecurityHealthAnalyticsCustomModule request %j', request @@ -1549,7 +1561,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'getEffectiveEventThreatDetectionCustomModule request %j', request @@ -1692,7 +1706,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEventThreatDetectionCustomModule request %j', request); const wrappedCallback: | Callback< @@ -1848,7 +1864,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'createEventThreatDetectionCustomModule request %j', request @@ -2004,7 +2022,9 @@ export class SecurityCenterManagementClient { 'event_threat_detection_custom_module.name': request.eventThreatDetectionCustomModule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'updateEventThreatDetectionCustomModule request %j', request @@ -2159,7 +2179,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'deleteEventThreatDetectionCustomModule request %j', request @@ -2301,7 +2323,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'validateEventThreatDetectionCustomModule request %j', request @@ -2455,7 +2479,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSecurityCenterService request %j', request); const wrappedCallback: | Callback< @@ -2602,7 +2628,9 @@ export class SecurityCenterManagementClient { 'security_center_service.name': request.securityCenterService!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecurityCenterService request %j', request); const wrappedCallback: | Callback< @@ -2743,7 +2771,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, @@ -2832,7 +2862,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveSecurityHealthAnalyticsCustomModules stream %j', request @@ -2894,7 +2926,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveSecurityHealthAnalyticsCustomModules iterate %j', request @@ -3015,7 +3049,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, @@ -3104,7 +3140,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listSecurityHealthAnalyticsCustomModules stream %j', request @@ -3165,7 +3203,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listSecurityHealthAnalyticsCustomModules iterate %j', request @@ -3283,7 +3323,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, @@ -3372,7 +3414,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantSecurityHealthAnalyticsCustomModules stream %j', request @@ -3434,7 +3478,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantSecurityHealthAnalyticsCustomModules iterate %j', request @@ -3553,7 +3599,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, @@ -3642,7 +3690,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listEffectiveEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveEventThreatDetectionCustomModules stream %j', request @@ -3704,7 +3754,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listEffectiveEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listEffectiveEventThreatDetectionCustomModules iterate %j', request @@ -3824,7 +3876,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, @@ -3907,7 +3961,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventThreatDetectionCustomModules stream %j', request); return this.descriptors.page.listEventThreatDetectionCustomModules.createStream( this.innerApiCalls.listEventThreatDetectionCustomModules as GaxCall, @@ -3966,7 +4022,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEventThreatDetectionCustomModules iterate %j', request); return this.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate( this.innerApiCalls['listEventThreatDetectionCustomModules'] as GaxCall, @@ -4080,7 +4138,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, @@ -4170,7 +4230,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listDescendantEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantEventThreatDetectionCustomModules stream %j', request @@ -4233,7 +4295,9 @@ export class SecurityCenterManagementClient { const defaultCallSettings = this._defaults['listDescendantEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'listDescendantEventThreatDetectionCustomModules iterate %j', request @@ -4354,7 +4418,9 @@ export class SecurityCenterManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, @@ -4432,7 +4498,9 @@ export class SecurityCenterManagementClient { }); const defaultCallSettings = this._defaults['listSecurityCenterServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecurityCenterServices stream %j', request); return this.descriptors.page.listSecurityCenterServices.createStream( this.innerApiCalls.listSecurityCenterServices as GaxCall, @@ -4492,7 +4560,9 @@ export class SecurityCenterManagementClient { }); const defaultCallSettings = this._defaults['listSecurityCenterServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecurityCenterServices iterate %j', request); return this.descriptors.page.listSecurityCenterServices.asyncIterate( this.innerApiCalls['listSecurityCenterServices'] as GaxCall, diff --git a/packages/google-cloud-securitycentermanagement/test/gapic_security_center_management_v1.ts b/packages/google-cloud-securitycentermanagement/test/gapic_security_center_management_v1.ts index a447eed9880..969851b898d 100644 --- a/packages/google-cloud-securitycentermanagement/test/gapic_security_center_management_v1.ts +++ b/packages/google-cloud-securitycentermanagement/test/gapic_security_center_management_v1.ts @@ -280,7 +280,9 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securityCenterManagementStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -379,7 +381,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -429,7 +431,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -464,7 +466,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() ); @@ -489,7 +491,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -523,7 +525,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -571,7 +573,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -604,7 +606,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() ); @@ -629,7 +631,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -665,7 +667,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -715,7 +717,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -750,7 +752,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -775,7 +777,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -812,7 +814,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -863,7 +865,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -899,7 +901,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -925,7 +927,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -961,7 +963,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1011,7 +1013,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1107,7 +1109,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1157,7 +1159,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() ); @@ -1217,7 +1219,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -1253,7 +1255,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -1303,7 +1305,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() ); @@ -1363,7 +1365,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -1397,7 +1399,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -1445,7 +1447,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -1480,7 +1482,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() ); @@ -1505,7 +1507,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -1539,7 +1541,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -1587,7 +1589,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() ); @@ -1645,7 +1647,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -1680,7 +1682,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -1729,7 +1731,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() ); @@ -1789,7 +1791,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -1823,7 +1825,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -1871,7 +1873,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -1904,7 +1906,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() ); @@ -1929,7 +1931,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -1965,7 +1967,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -2015,7 +2017,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -2050,7 +2052,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() ); @@ -2075,7 +2077,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() ); @@ -2108,7 +2110,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() ); @@ -2156,7 +2158,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() ); @@ -2191,7 +2193,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() ); @@ -2216,7 +2218,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() ); @@ -2250,7 +2252,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() ); @@ -2299,7 +2301,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() ); @@ -2335,7 +2337,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() ); @@ -2361,7 +2363,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2405,7 +2407,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2465,7 +2467,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2500,7 +2502,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2577,7 +2579,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2643,7 +2645,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2701,7 +2703,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2752,7 +2754,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2796,7 +2798,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2856,7 +2858,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2891,7 +2893,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -2965,7 +2967,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3028,7 +3030,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3084,7 +3086,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3133,7 +3135,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3179,7 +3181,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3239,7 +3241,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3274,7 +3276,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3353,7 +3355,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3421,7 +3423,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3479,7 +3481,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() ); @@ -3530,7 +3532,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -3574,7 +3576,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -3634,7 +3636,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -3669,7 +3671,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -3743,7 +3745,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -3806,7 +3808,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -3862,7 +3864,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); @@ -3911,7 +3913,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -3953,7 +3955,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -4011,7 +4013,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -4044,7 +4046,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -4118,7 +4120,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -4181,7 +4183,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -4237,7 +4239,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() ); @@ -4286,7 +4288,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -4330,7 +4332,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -4390,7 +4392,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -4425,7 +4427,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -4502,7 +4504,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -4568,7 +4570,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -4626,7 +4628,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); @@ -4677,7 +4679,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() ); @@ -4718,7 +4720,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() ); @@ -4776,7 +4778,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() ); @@ -4811,7 +4813,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() ); @@ -4881,7 +4883,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() ); @@ -4940,7 +4942,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() ); @@ -4995,7 +4997,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() ); @@ -5042,7 +5044,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5073,7 +5075,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5118,7 +5120,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5154,7 +5156,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5203,7 +5205,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5240,7 +5242,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); describe('Path templates', () => { - describe('folderLocationEffectiveEventThreatDetectionCustomModule', () => { + describe('folderLocationEffectiveEventThreatDetectionCustomModule', async () => { const fakePath = '/rendered/path/folderLocationEffectiveEventThreatDetectionCustomModule'; const expectedParameters = { @@ -5254,7 +5256,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = @@ -5334,7 +5336,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('folderLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { + describe('folderLocationEffectiveSecurityHealthAnalyticsCustomModule', async () => { const fakePath = '/rendered/path/folderLocationEffectiveSecurityHealthAnalyticsCustomModule'; const expectedParameters = { @@ -5348,7 +5350,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = @@ -5428,7 +5430,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('folderLocationEventThreatDetectionCustomModule', () => { + describe('folderLocationEventThreatDetectionCustomModule', async () => { const fakePath = '/rendered/path/folderLocationEventThreatDetectionCustomModule'; const expectedParameters = { @@ -5442,7 +5444,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match = @@ -5519,7 +5521,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('folderLocationSecurityHealthAnalyticsCustomModule', () => { + describe('folderLocationSecurityHealthAnalyticsCustomModule', async () => { const fakePath = '/rendered/path/folderLocationSecurityHealthAnalyticsCustomModule'; const expectedParameters = { @@ -5533,7 +5535,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = @@ -5610,7 +5612,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('folderLocationService', () => { + describe('folderLocationService', async () => { const fakePath = '/rendered/path/folderLocationService'; const expectedParameters = { folder: 'folderValue', @@ -5622,7 +5624,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5690,7 +5692,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('folderSourceFinding', () => { + describe('folderSourceFinding', async () => { const fakePath = '/rendered/path/folderSourceFinding'; const expectedParameters = { folder: 'folderValue', @@ -5702,7 +5704,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5767,7 +5769,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5778,7 +5780,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5817,7 +5819,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -5827,7 +5829,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5856,7 +5858,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organizationLocation', () => { + describe('organizationLocation', async () => { const fakePath = '/rendered/path/organizationLocation'; const expectedParameters = { organization: 'organizationValue', @@ -5867,7 +5869,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5920,7 +5922,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organizationLocationEffectiveEventThreatDetectionCustomModule', () => { + describe('organizationLocationEffectiveEventThreatDetectionCustomModule', async () => { const fakePath = '/rendered/path/organizationLocationEffectiveEventThreatDetectionCustomModule'; const expectedParameters = { @@ -5934,7 +5936,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = @@ -6014,7 +6016,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organizationLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { + describe('organizationLocationEffectiveSecurityHealthAnalyticsCustomModule', async () => { const fakePath = '/rendered/path/organizationLocationEffectiveSecurityHealthAnalyticsCustomModule'; const expectedParameters = { @@ -6028,7 +6030,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = @@ -6108,7 +6110,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organizationLocationEventThreatDetectionCustomModule', () => { + describe('organizationLocationEventThreatDetectionCustomModule', async () => { const fakePath = '/rendered/path/organizationLocationEventThreatDetectionCustomModule'; const expectedParameters = { @@ -6122,7 +6124,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match = @@ -6199,7 +6201,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organizationLocationSecurityHealthAnalyticsCustomModule', () => { + describe('organizationLocationSecurityHealthAnalyticsCustomModule', async () => { const fakePath = '/rendered/path/organizationLocationSecurityHealthAnalyticsCustomModule'; const expectedParameters = { @@ -6213,7 +6215,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = @@ -6290,7 +6292,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organizationLocationService', () => { + describe('organizationLocationService', async () => { const fakePath = '/rendered/path/organizationLocationService'; const expectedParameters = { organization: 'organizationValue', @@ -6302,7 +6304,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationServicePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationServicePathTemplate.match = sinon @@ -6369,7 +6371,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('organizationSourceFinding', () => { + describe('organizationSourceFinding', async () => { const fakePath = '/rendered/path/organizationSourceFinding'; const expectedParameters = { organization: 'organizationValue', @@ -6381,7 +6383,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6449,7 +6451,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -6459,7 +6461,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6488,7 +6490,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('projectLocationEffectiveEventThreatDetectionCustomModule', () => { + describe('projectLocationEffectiveEventThreatDetectionCustomModule', async () => { const fakePath = '/rendered/path/projectLocationEffectiveEventThreatDetectionCustomModule'; const expectedParameters = { @@ -6502,7 +6504,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = @@ -6582,7 +6584,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('projectLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { + describe('projectLocationEffectiveSecurityHealthAnalyticsCustomModule', async () => { const fakePath = '/rendered/path/projectLocationEffectiveSecurityHealthAnalyticsCustomModule'; const expectedParameters = { @@ -6596,7 +6598,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = @@ -6676,7 +6678,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('projectLocationEventThreatDetectionCustomModule', () => { + describe('projectLocationEventThreatDetectionCustomModule', async () => { const fakePath = '/rendered/path/projectLocationEventThreatDetectionCustomModule'; const expectedParameters = { @@ -6690,7 +6692,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match = @@ -6767,7 +6769,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('projectLocationSecurityHealthAnalyticsCustomModule', () => { + describe('projectLocationSecurityHealthAnalyticsCustomModule', async () => { const fakePath = '/rendered/path/projectLocationSecurityHealthAnalyticsCustomModule'; const expectedParameters = { @@ -6781,7 +6783,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = @@ -6858,7 +6860,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('projectLocationService', () => { + describe('projectLocationService', async () => { const fakePath = '/rendered/path/projectLocationService'; const expectedParameters = { project: 'projectValue', @@ -6870,7 +6872,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6938,7 +6940,7 @@ describe('v1.SecurityCenterManagementClient', () => { }); }); - describe('projectSourceFinding', () => { + describe('projectSourceFinding', async () => { const fakePath = '/rendered/path/projectSourceFinding'; const expectedParameters = { project: 'projectValue', @@ -6950,7 +6952,7 @@ describe('v1.SecurityCenterManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSourceFindingPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-servicedirectory/package.json b/packages/google-cloud-servicedirectory/package.json index 9f6ebb90d2d..262c8f18444 100644 --- a/packages/google-cloud-servicedirectory/package.json +++ b/packages/google-cloud-servicedirectory/package.json @@ -32,7 +32,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0", + "google-gax": "^5.0.1-rc.0", "json-schema": "^0.4.0" }, "devDependencies": { diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json index 3dbc34ffe98..e46b22b3849 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json index 3dbc34ffe98..e46b22b3849 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json index 1b287c7b4fc..62d54fdb4be 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json index 1b287c7b4fc..62d54fdb4be 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/src/v1/lookup_service_client.ts b/packages/google-cloud-servicedirectory/src/v1/lookup_service_client.ts index f5ae551d52c..f5c97664cca 100644 --- a/packages/google-cloud-servicedirectory/src/v1/lookup_service_client.ts +++ b/packages/google-cloud-servicedirectory/src/v1/lookup_service_client.ts @@ -517,7 +517,9 @@ export class LookupServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resolveService request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-servicedirectory/src/v1/registration_service_client.ts b/packages/google-cloud-servicedirectory/src/v1/registration_service_client.ts index 2eace107fae..5f3f7e44232 100644 --- a/packages/google-cloud-servicedirectory/src/v1/registration_service_client.ts +++ b/packages/google-cloud-servicedirectory/src/v1/registration_service_client.ts @@ -545,7 +545,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNamespace request %j', request); const wrappedCallback: | Callback< @@ -664,7 +666,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNamespace request %j', request); const wrappedCallback: | Callback< @@ -791,7 +795,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'namespace.name': request.namespace!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNamespace request %j', request); const wrappedCallback: | Callback< @@ -917,7 +923,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNamespace request %j', request); const wrappedCallback: | Callback< @@ -1046,7 +1054,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createService request %j', request); const wrappedCallback: | Callback< @@ -1165,7 +1175,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -1286,7 +1298,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'service.name': request.service!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateService request %j', request); const wrappedCallback: | Callback< @@ -1406,7 +1420,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteService request %j', request); const wrappedCallback: | Callback< @@ -1541,7 +1557,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEndpoint request %j', request); const wrappedCallback: | Callback< @@ -1660,7 +1678,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEndpoint request %j', request); const wrappedCallback: | Callback< @@ -1787,7 +1807,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'endpoint.name': request.endpoint!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEndpoint request %j', request); const wrappedCallback: | Callback< @@ -1912,7 +1934,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEndpoint request %j', request); const wrappedCallback: | Callback< @@ -2027,7 +2051,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2145,7 +2171,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2257,7 +2285,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2421,7 +2451,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicedirectory.v1.IListNamespacesRequest, @@ -2528,7 +2560,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listNamespaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNamespaces stream %j', request); return this.descriptors.page.listNamespaces.createStream( this.innerApiCalls.listNamespaces as GaxCall, @@ -2617,7 +2651,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listNamespaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNamespaces iterate %j', request); return this.descriptors.page.listNamespaces.asyncIterate( this.innerApiCalls['listNamespaces'] as GaxCall, @@ -2763,7 +2799,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicedirectory.v1.IListServicesRequest, @@ -2872,7 +2910,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -2963,7 +3003,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -3112,7 +3154,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicedirectory.v1.IListEndpointsRequest, @@ -3224,7 +3268,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpoints stream %j', request); return this.descriptors.page.listEndpoints.createStream( this.innerApiCalls.listEndpoints as GaxCall, @@ -3318,7 +3364,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpoints iterate %j', request); return this.descriptors.page.listEndpoints.asyncIterate( this.innerApiCalls['listEndpoints'] as GaxCall, diff --git a/packages/google-cloud-servicedirectory/src/v1beta1/lookup_service_client.ts b/packages/google-cloud-servicedirectory/src/v1beta1/lookup_service_client.ts index 57ce5b60abe..1352651c8b4 100644 --- a/packages/google-cloud-servicedirectory/src/v1beta1/lookup_service_client.ts +++ b/packages/google-cloud-servicedirectory/src/v1beta1/lookup_service_client.ts @@ -518,7 +518,9 @@ export class LookupServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resolveService request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-servicedirectory/src/v1beta1/registration_service_client.ts b/packages/google-cloud-servicedirectory/src/v1beta1/registration_service_client.ts index 60db5997c83..d019f1caaf2 100644 --- a/packages/google-cloud-servicedirectory/src/v1beta1/registration_service_client.ts +++ b/packages/google-cloud-servicedirectory/src/v1beta1/registration_service_client.ts @@ -545,7 +545,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNamespace request %j', request); const wrappedCallback: | Callback< @@ -670,7 +672,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNamespace request %j', request); const wrappedCallback: | Callback< @@ -797,7 +801,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'namespace.name': request.namespace!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNamespace request %j', request); const wrappedCallback: | Callback< @@ -923,7 +929,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNamespace request %j', request); const wrappedCallback: | Callback< @@ -1058,7 +1066,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createService request %j', request); const wrappedCallback: | Callback< @@ -1183,7 +1193,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getService request %j', request); const wrappedCallback: | Callback< @@ -1310,7 +1322,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'service.name': request.service!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateService request %j', request); const wrappedCallback: | Callback< @@ -1436,7 +1450,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteService request %j', request); const wrappedCallback: | Callback< @@ -1571,7 +1587,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEndpoint request %j', request); const wrappedCallback: | Callback< @@ -1696,7 +1714,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEndpoint request %j', request); const wrappedCallback: | Callback< @@ -1823,7 +1843,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'endpoint.name': request.endpoint!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEndpoint request %j', request); const wrappedCallback: | Callback< @@ -1948,7 +1970,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEndpoint request %j', request); const wrappedCallback: | Callback< @@ -2063,7 +2087,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2181,7 +2207,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2294,7 +2322,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2460,7 +2490,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicedirectory.v1beta1.IListNamespacesRequest, @@ -2569,7 +2601,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listNamespaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNamespaces stream %j', request); return this.descriptors.page.listNamespaces.createStream( this.innerApiCalls.listNamespaces as GaxCall, @@ -2660,7 +2694,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listNamespaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNamespaces iterate %j', request); return this.descriptors.page.listNamespaces.asyncIterate( this.innerApiCalls['listNamespaces'] as GaxCall, @@ -2809,7 +2845,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicedirectory.v1beta1.IListServicesRequest, @@ -2921,7 +2959,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -3015,7 +3055,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -3166,7 +3208,9 @@ export class RegistrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicedirectory.v1beta1.IListEndpointsRequest, @@ -3280,7 +3324,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpoints stream %j', request); return this.descriptors.page.listEndpoints.createStream( this.innerApiCalls.listEndpoints as GaxCall, @@ -3376,7 +3422,9 @@ export class RegistrationServiceClient { }); const defaultCallSettings = this._defaults['listEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpoints iterate %j', request); return this.descriptors.page.listEndpoints.asyncIterate( this.innerApiCalls['listEndpoints'] as GaxCall, diff --git a/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1.ts b/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1.ts index 3b00e201397..a417c4ae9a1 100644 --- a/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1.ts +++ b/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1.ts @@ -215,7 +215,9 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.lookupServiceStub); client.close().then(() => { done(); @@ -274,7 +276,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ResolveServiceRequest() ); @@ -305,7 +307,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ResolveServiceRequest() ); @@ -352,7 +354,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ResolveServiceRequest() ); @@ -383,7 +385,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ResolveServiceRequest() ); @@ -403,7 +405,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -433,7 +435,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -477,7 +479,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -512,7 +514,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -560,7 +562,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -597,7 +599,7 @@ describe('v1.LookupServiceClient', () => { }); describe('Path templates', () => { - describe('endpoint', () => { + describe('endpoint', async () => { const fakePath = '/rendered/path/endpoint'; const expectedParameters = { project: 'projectValue', @@ -610,7 +612,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPathTemplate.render = sinon .stub() .returns(fakePath); @@ -685,7 +687,7 @@ describe('v1.LookupServiceClient', () => { }); }); - describe('namespace', () => { + describe('namespace', async () => { const fakePath = '/rendered/path/namespace'; const expectedParameters = { project: 'projectValue', @@ -696,7 +698,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.namespacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -749,7 +751,7 @@ describe('v1.LookupServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -761,7 +763,7 @@ describe('v1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1beta1.ts b/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1beta1.ts index 43fa436b9f7..819eb374bce 100644 --- a/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1beta1.ts +++ b/packages/google-cloud-servicedirectory/test/gapic_lookup_service_v1beta1.ts @@ -215,7 +215,9 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.lookupServiceStub); client.close().then(() => { done(); @@ -274,7 +276,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ResolveServiceRequest() ); @@ -305,7 +307,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ResolveServiceRequest() ); @@ -352,7 +354,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ResolveServiceRequest() ); @@ -383,7 +385,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ResolveServiceRequest() ); @@ -403,7 +405,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -433,7 +435,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -477,7 +479,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -512,7 +514,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -560,7 +562,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -597,7 +599,7 @@ describe('v1beta1.LookupServiceClient', () => { }); describe('Path templates', () => { - describe('endpoint', () => { + describe('endpoint', async () => { const fakePath = '/rendered/path/endpoint'; const expectedParameters = { project: 'projectValue', @@ -610,7 +612,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPathTemplate.render = sinon .stub() .returns(fakePath); @@ -685,7 +687,7 @@ describe('v1beta1.LookupServiceClient', () => { }); }); - describe('namespace', () => { + describe('namespace', async () => { const fakePath = '/rendered/path/namespace'; const expectedParameters = { project: 'projectValue', @@ -696,7 +698,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.namespacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -749,7 +751,7 @@ describe('v1beta1.LookupServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -761,7 +763,7 @@ describe('v1beta1.LookupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1.ts b/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1.ts index 1d9470f826c..6948fcfbbcb 100644 --- a/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1.ts +++ b/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1.ts @@ -266,7 +266,9 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.registrationServiceStub); client.close().then(() => { done(); @@ -333,7 +335,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateNamespaceRequest() ); @@ -366,7 +368,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateNamespaceRequest() ); @@ -415,7 +417,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateNamespaceRequest() ); @@ -448,7 +450,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateNamespaceRequest() ); @@ -471,7 +473,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetNamespaceRequest() ); @@ -504,7 +506,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetNamespaceRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetNamespaceRequest() ); @@ -586,7 +588,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetNamespaceRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateNamespaceRequest() ); @@ -643,7 +645,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateNamespaceRequest() ); @@ -693,7 +695,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateNamespaceRequest() ); @@ -727,7 +729,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateNamespaceRequest() ); @@ -751,7 +753,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteNamespaceRequest() ); @@ -784,7 +786,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteNamespaceRequest() ); @@ -833,7 +835,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteNamespaceRequest() ); @@ -866,7 +868,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteNamespaceRequest() ); @@ -889,7 +891,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateServiceRequest() ); @@ -922,7 +924,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateServiceRequest() ); @@ -971,7 +973,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateServiceRequest() ); @@ -1004,7 +1006,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateServiceRequest() ); @@ -1027,7 +1029,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetServiceRequest() ); @@ -1060,7 +1062,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetServiceRequest() ); @@ -1109,7 +1111,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetServiceRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetServiceRequest() ); @@ -1165,7 +1167,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateServiceRequest() ); @@ -1199,7 +1201,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateServiceRequest() ); @@ -1249,7 +1251,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateServiceRequest() ); @@ -1283,7 +1285,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateServiceRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteServiceRequest() ); @@ -1340,7 +1342,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteServiceRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteServiceRequest() ); @@ -1422,7 +1424,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteServiceRequest() ); @@ -1445,7 +1447,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateEndpointRequest() ); @@ -1478,7 +1480,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateEndpointRequest() ); @@ -1527,7 +1529,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateEndpointRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.CreateEndpointRequest() ); @@ -1583,7 +1585,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetEndpointRequest() ); @@ -1616,7 +1618,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetEndpointRequest() ); @@ -1665,7 +1667,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetEndpointRequest() ); @@ -1698,7 +1700,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.GetEndpointRequest() ); @@ -1721,7 +1723,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateEndpointRequest() ); @@ -1755,7 +1757,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateEndpointRequest() ); @@ -1805,7 +1807,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateEndpointRequest() ); @@ -1839,7 +1841,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.UpdateEndpointRequest() ); @@ -1863,7 +1865,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteEndpointRequest() ); @@ -1896,7 +1898,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteEndpointRequest() ); @@ -1945,7 +1947,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteEndpointRequest() ); @@ -1978,7 +1980,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.DeleteEndpointRequest() ); @@ -2001,7 +2003,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2034,7 +2036,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2083,7 +2085,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2116,7 +2118,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2139,7 +2141,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2172,7 +2174,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2221,7 +2223,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2254,7 +2256,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2277,7 +2279,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2311,7 +2313,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2360,7 +2362,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2393,7 +2395,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2416,7 +2418,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListNamespacesRequest() ); @@ -2457,7 +2459,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListNamespacesRequest() ); @@ -2514,7 +2516,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListNamespacesRequest() ); @@ -2547,7 +2549,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListNamespacesRequest() ); @@ -2610,7 +2612,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListNamespacesRequest() ); @@ -2662,7 +2664,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListNamespacesRequest() ); @@ -2714,7 +2716,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListNamespacesRequest() ); @@ -2759,7 +2761,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListServicesRequest() ); @@ -2800,7 +2802,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListServicesRequest() ); @@ -2857,7 +2859,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListServicesRequest() ); @@ -2890,7 +2892,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListServicesRequest() ); @@ -2952,7 +2954,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListServicesRequest() ); @@ -3005,7 +3007,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListServicesRequest() ); @@ -3056,7 +3058,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListServicesRequest() ); @@ -3101,7 +3103,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListEndpointsRequest() ); @@ -3142,7 +3144,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListEndpointsRequest() ); @@ -3199,7 +3201,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListEndpointsRequest() ); @@ -3232,7 +3234,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListEndpointsRequest() ); @@ -3295,7 +3297,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListEndpointsRequest() ); @@ -3347,7 +3349,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListEndpointsRequest() ); @@ -3398,7 +3400,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1.ListEndpointsRequest() ); @@ -3442,7 +3444,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3474,7 +3476,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3520,7 +3522,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3557,7 +3559,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3607,7 +3609,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3644,7 +3646,7 @@ describe('v1.RegistrationServiceClient', () => { }); describe('Path templates', () => { - describe('endpoint', () => { + describe('endpoint', async () => { const fakePath = '/rendered/path/endpoint'; const expectedParameters = { project: 'projectValue', @@ -3659,7 +3661,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3734,7 +3736,7 @@ describe('v1.RegistrationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3746,7 +3748,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3785,7 +3787,7 @@ describe('v1.RegistrationServiceClient', () => { }); }); - describe('namespace', () => { + describe('namespace', async () => { const fakePath = '/rendered/path/namespace'; const expectedParameters = { project: 'projectValue', @@ -3798,7 +3800,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.namespacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3851,7 +3853,7 @@ describe('v1.RegistrationServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -3865,7 +3867,7 @@ describe('v1.RegistrationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1beta1.ts b/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1beta1.ts index ee44499daae..7ea8100896d 100644 --- a/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1beta1.ts +++ b/packages/google-cloud-servicedirectory/test/gapic_registration_service_v1beta1.ts @@ -268,7 +268,9 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.registrationServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest() ); @@ -363,7 +365,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest() ); @@ -411,7 +413,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest() ); @@ -443,7 +445,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest() ); @@ -465,7 +467,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest() ); @@ -497,7 +499,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest() ); @@ -545,7 +547,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest() ); @@ -577,7 +579,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest() ); @@ -599,7 +601,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest() ); @@ -632,7 +634,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest() ); @@ -681,7 +683,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest() ); @@ -714,7 +716,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest() ); @@ -737,7 +739,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest() ); @@ -769,7 +771,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest() ); @@ -817,7 +819,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest() ); @@ -849,7 +851,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest() ); @@ -871,7 +873,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateServiceRequest() ); @@ -903,7 +905,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateServiceRequest() ); @@ -951,7 +953,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateServiceRequest() ); @@ -983,7 +985,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateServiceRequest() ); @@ -1005,7 +1007,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetServiceRequest() ); @@ -1037,7 +1039,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetServiceRequest() ); @@ -1085,7 +1087,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetServiceRequest() ); @@ -1117,7 +1119,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetServiceRequest() ); @@ -1139,7 +1141,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest() ); @@ -1172,7 +1174,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest() ); @@ -1221,7 +1223,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest() ); @@ -1254,7 +1256,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest() ); @@ -1277,7 +1279,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest() ); @@ -1309,7 +1311,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest() ); @@ -1357,7 +1359,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest() ); @@ -1389,7 +1391,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest() ); @@ -1411,7 +1413,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest() ); @@ -1443,7 +1445,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest() ); @@ -1491,7 +1493,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest() ); @@ -1523,7 +1525,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest() ); @@ -1545,7 +1547,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetEndpointRequest() ); @@ -1577,7 +1579,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetEndpointRequest() ); @@ -1625,7 +1627,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetEndpointRequest() ); @@ -1657,7 +1659,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.GetEndpointRequest() ); @@ -1679,7 +1681,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest() ); @@ -1712,7 +1714,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest() ); @@ -1761,7 +1763,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest() ); @@ -1794,7 +1796,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest() ); @@ -1817,7 +1819,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest() ); @@ -1849,7 +1851,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest() ); @@ -1897,7 +1899,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest() ); @@ -1929,7 +1931,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest() ); @@ -1951,7 +1953,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1983,7 +1985,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2031,7 +2033,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2063,7 +2065,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2085,7 +2087,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2117,7 +2119,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2165,7 +2167,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2197,7 +2199,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2219,7 +2221,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2252,7 +2254,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2300,7 +2302,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2332,7 +2334,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2354,7 +2356,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest() ); @@ -2394,7 +2396,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest() ); @@ -2452,7 +2454,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest() ); @@ -2484,7 +2486,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest() ); @@ -2548,7 +2550,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest() ); @@ -2601,7 +2603,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest() ); @@ -2652,7 +2654,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest() ); @@ -2696,7 +2698,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListServicesRequest() ); @@ -2736,7 +2738,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListServicesRequest() ); @@ -2794,7 +2796,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListServicesRequest() ); @@ -2826,7 +2828,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListServicesRequest() ); @@ -2888,7 +2890,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListServicesRequest() ); @@ -2941,7 +2943,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListServicesRequest() ); @@ -2992,7 +2994,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListServicesRequest() ); @@ -3036,7 +3038,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest() ); @@ -3076,7 +3078,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest() ); @@ -3134,7 +3136,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest() ); @@ -3166,7 +3168,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest() ); @@ -3228,7 +3230,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest() ); @@ -3279,7 +3281,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest() ); @@ -3330,7 +3332,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest() ); @@ -3373,7 +3375,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3404,7 +3406,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3449,7 +3451,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3485,7 +3487,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3534,7 +3536,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3571,7 +3573,7 @@ describe('v1beta1.RegistrationServiceClient', () => { }); describe('Path templates', () => { - describe('endpoint', () => { + describe('endpoint', async () => { const fakePath = '/rendered/path/endpoint'; const expectedParameters = { project: 'projectValue', @@ -3585,7 +3587,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3660,7 +3662,7 @@ describe('v1beta1.RegistrationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3671,7 +3673,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3710,7 +3712,7 @@ describe('v1beta1.RegistrationServiceClient', () => { }); }); - describe('namespace', () => { + describe('namespace', async () => { const fakePath = '/rendered/path/namespace'; const expectedParameters = { project: 'projectValue', @@ -3722,7 +3724,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.namespacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3775,7 +3777,7 @@ describe('v1beta1.RegistrationServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -3788,7 +3790,7 @@ describe('v1beta1.RegistrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-servicehealth/package.json b/packages/google-cloud-servicehealth/package.json index 69ba917fc3a..70f87cd1437 100644 --- a/packages/google-cloud-servicehealth/package.json +++ b/packages/google-cloud-servicehealth/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json b/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json index ef20cbcdf3e..fecdc17c918 100644 --- a/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json +++ b/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicehealth", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicehealth/src/v1/service_health_client.ts b/packages/google-cloud-servicehealth/src/v1/service_health_client.ts index e92de64dd12..402ea130934 100644 --- a/packages/google-cloud-servicehealth/src/v1/service_health_client.ts +++ b/packages/google-cloud-servicehealth/src/v1/service_health_client.ts @@ -498,7 +498,9 @@ export class ServiceHealthClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvent request %j', request); const wrappedCallback: | Callback< @@ -629,7 +631,9 @@ export class ServiceHealthClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrganizationEvent request %j', request); const wrappedCallback: | Callback< @@ -763,7 +767,9 @@ export class ServiceHealthClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrganizationImpact request %j', request); const wrappedCallback: | Callback< @@ -923,7 +929,9 @@ export class ServiceHealthClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicehealth.v1.IListEventsRequest, @@ -1021,7 +1029,9 @@ export class ServiceHealthClient { }); const defaultCallSettings = this._defaults['listEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvents stream %j', request); return this.descriptors.page.listEvents.createStream( this.innerApiCalls.listEvents as GaxCall, @@ -1101,7 +1111,9 @@ export class ServiceHealthClient { }); const defaultCallSettings = this._defaults['listEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvents iterate %j', request); return this.descriptors.page.listEvents.asyncIterate( this.innerApiCalls['listEvents'] as GaxCall, @@ -1241,7 +1253,9 @@ export class ServiceHealthClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicehealth.v1.IListOrganizationEventsRequest, @@ -1344,7 +1358,9 @@ export class ServiceHealthClient { }); const defaultCallSettings = this._defaults['listOrganizationEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrganizationEvents stream %j', request); return this.descriptors.page.listOrganizationEvents.createStream( this.innerApiCalls.listOrganizationEvents as GaxCall, @@ -1429,7 +1445,9 @@ export class ServiceHealthClient { }); const defaultCallSettings = this._defaults['listOrganizationEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrganizationEvents iterate %j', request); return this.descriptors.page.listOrganizationEvents.asyncIterate( this.innerApiCalls['listOrganizationEvents'] as GaxCall, @@ -1568,7 +1586,9 @@ export class ServiceHealthClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.servicehealth.v1.IListOrganizationImpactsRequest, @@ -1669,7 +1689,9 @@ export class ServiceHealthClient { }); const defaultCallSettings = this._defaults['listOrganizationImpacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrganizationImpacts stream %j', request); return this.descriptors.page.listOrganizationImpacts.createStream( this.innerApiCalls.listOrganizationImpacts as GaxCall, @@ -1752,7 +1774,9 @@ export class ServiceHealthClient { }); const defaultCallSettings = this._defaults['listOrganizationImpacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrganizationImpacts iterate %j', request); return this.descriptors.page.listOrganizationImpacts.asyncIterate( this.innerApiCalls['listOrganizationImpacts'] as GaxCall, diff --git a/packages/google-cloud-servicehealth/test/gapic_service_health_v1.ts b/packages/google-cloud-servicehealth/test/gapic_service_health_v1.ts index ae16bdc8aee..e8e7d0dc475 100644 --- a/packages/google-cloud-servicehealth/test/gapic_service_health_v1.ts +++ b/packages/google-cloud-servicehealth/test/gapic_service_health_v1.ts @@ -255,7 +255,9 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.serviceHealthStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetEventRequest() ); @@ -345,7 +347,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetEventRequest() ); @@ -392,7 +394,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetEventRequest() ); @@ -420,7 +422,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetEventRequest() ); @@ -441,7 +443,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationEventRequest() ); @@ -473,7 +475,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationEventRequest() ); @@ -520,7 +522,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationEventRequest() ); @@ -551,7 +553,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationEventRequest() ); @@ -572,7 +574,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationImpactRequest() ); @@ -604,7 +606,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationImpactRequest() ); @@ -651,7 +653,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationImpactRequest() ); @@ -685,7 +687,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.GetOrganizationImpactRequest() ); @@ -709,7 +711,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListEventsRequest() ); @@ -742,7 +744,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListEventsRequest() ); @@ -791,7 +793,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListEventsRequest() ); @@ -822,7 +824,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListEventsRequest() ); @@ -876,7 +878,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListEventsRequest() ); @@ -927,7 +929,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListEventsRequest() ); @@ -970,7 +972,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListEventsRequest() ); @@ -1014,7 +1016,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationEventsRequest() ); @@ -1054,7 +1056,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationEventsRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationEventsRequest() ); @@ -1145,7 +1147,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationEventsRequest() ); @@ -1214,7 +1216,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationEventsRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationEventsRequest() ); @@ -1326,7 +1328,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationEventsRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest() ); @@ -1413,7 +1415,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest() ); @@ -1504,7 +1506,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest() ); @@ -1573,7 +1575,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest() ); @@ -1631,7 +1633,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest() ); @@ -1685,7 +1687,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest() ); @@ -1731,7 +1733,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1761,7 +1763,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1805,7 +1807,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1840,7 +1842,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1888,7 +1890,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1925,7 +1927,7 @@ describe('v1.ServiceHealthClient', () => { }); describe('Path templates', () => { - describe('event', () => { + describe('event', async () => { const fakePath = '/rendered/path/event'; const expectedParameters = { project: 'projectValue', @@ -1936,7 +1938,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.eventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1989,7 +1991,7 @@ describe('v1.ServiceHealthClient', () => { }); }); - describe('organizationEvent', () => { + describe('organizationEvent', async () => { const fakePath = '/rendered/path/organizationEvent'; const expectedParameters = { organization: 'organizationValue', @@ -2000,7 +2002,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationEventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2066,7 +2068,7 @@ describe('v1.ServiceHealthClient', () => { }); }); - describe('organizationImpact', () => { + describe('organizationImpact', async () => { const fakePath = '/rendered/path/organizationImpact'; const expectedParameters = { organization: 'organizationValue', @@ -2077,7 +2079,7 @@ describe('v1.ServiceHealthClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationImpactPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 0172ecf3b7e..5c5918ba7aa 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json index 8b409964fc9..259ac2b978f 100644 --- a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json +++ b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-shell", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json index 8b409964fc9..259ac2b978f 100644 --- a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json +++ b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-shell", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts b/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts index adcb5d4aab1..61fffb695e1 100644 --- a/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts +++ b/packages/google-cloud-shell/src/v1/cloud_shell_service_client.ts @@ -528,7 +528,9 @@ export class CloudShellServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -671,7 +673,9 @@ export class CloudShellServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -850,7 +854,9 @@ export class CloudShellServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1027,7 +1033,9 @@ export class CloudShellServiceClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1200,7 +1208,9 @@ export class CloudShellServiceClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1362,7 +1372,7 @@ export class CloudShellServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts b/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts index 5445fb0b945..cef25d1859e 100644 --- a/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts +++ b/packages/google-cloud-shell/test/gapic_cloud_shell_service_v1.ts @@ -245,7 +245,9 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudShellServiceStub); client.close().then(() => { done(); @@ -304,7 +306,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.GetEnvironmentRequest() ); @@ -335,7 +337,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.GetEnvironmentRequest() ); @@ -382,7 +384,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.GetEnvironmentRequest() ); @@ -413,7 +415,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.GetEnvironmentRequest() ); @@ -434,7 +436,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.StartEnvironmentRequest() ); @@ -467,7 +469,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.StartEnvironmentRequest() ); @@ -521,7 +523,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.StartEnvironmentRequest() ); @@ -552,7 +554,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.StartEnvironmentRequest() ); @@ -585,7 +587,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -607,7 +609,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -628,7 +630,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() ); @@ -661,7 +663,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() ); @@ -715,7 +717,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() ); @@ -746,7 +748,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AuthorizeEnvironmentRequest() ); @@ -779,7 +781,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -801,7 +803,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -822,7 +824,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AddPublicKeyRequest() ); @@ -854,7 +856,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AddPublicKeyRequest() ); @@ -908,7 +910,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AddPublicKeyRequest() ); @@ -939,7 +941,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.AddPublicKeyRequest() ); @@ -972,7 +974,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -994,7 +996,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1012,7 +1014,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.RemovePublicKeyRequest() ); @@ -1045,7 +1047,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.RemovePublicKeyRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.RemovePublicKeyRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.shell.v1.RemovePublicKeyRequest() ); @@ -1163,7 +1165,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1185,7 +1187,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1205,7 +1207,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1284,7 +1286,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1364,7 +1366,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1460,8 +1462,7 @@ describe('v1.CloudShellServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1480,7 +1481,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1489,8 +1490,7 @@ describe('v1.CloudShellServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1506,7 +1506,7 @@ describe('v1.CloudShellServiceClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { user: 'userValue', @@ -1516,7 +1516,7 @@ describe('v1.CloudShellServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-speech/package.json b/packages/google-cloud-speech/package.json index c0ff1c67987..c72ea7ae694 100644 --- a/packages/google-cloud-speech/package.json +++ b/packages/google-cloud-speech/package.json @@ -52,7 +52,7 @@ "dependencies": { "@google-cloud/common": "^6.0.0", "@types/pumpify": "^1.4.4", - "google-gax": "^5.0.0-rc.0", + "google-gax": "^5.0.1-rc.0", "pumpify": "^2.0.1", "stream-events": "^1.0.5", "uuid": "^11.1.0" diff --git a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json index 52a3a5b8e2e..c112115ef5b 100644 --- a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json +++ b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "6.7.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json index 52a3a5b8e2e..c112115ef5b 100644 --- a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json +++ b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "6.7.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json index 395d8e7c697..6fd3cc0c8c0 100644 --- a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json +++ b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "6.7.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json index 395d8e7c697..6fd3cc0c8c0 100644 --- a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json +++ b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "6.7.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json index 72ee8c613a2..fb2ec2301ea 100644 --- a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json +++ b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "6.7.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json index 72ee8c613a2..fb2ec2301ea 100644 --- a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json +++ b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "6.7.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/src/v1/adaptation_client.ts b/packages/google-cloud-speech/src/v1/adaptation_client.ts index 9d0d1ddbaf1..092b74ef4af 100644 --- a/packages/google-cloud-speech/src/v1/adaptation_client.ts +++ b/packages/google-cloud-speech/src/v1/adaptation_client.ts @@ -506,7 +506,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPhraseSet request %j', request); const wrappedCallback: | Callback< @@ -622,7 +624,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPhraseSet request %j', request); const wrappedCallback: | Callback< @@ -743,7 +747,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ 'phrase_set.name': request.phraseSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePhraseSet request %j', request); const wrappedCallback: | Callback< @@ -855,7 +861,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePhraseSet request %j', request); const wrappedCallback: | Callback< @@ -988,7 +996,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1100,7 +1110,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1229,7 +1241,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ 'custom_class.name': request.customClass!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1353,7 +1367,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1486,7 +1502,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.speech.v1.IListPhraseSetRequest, @@ -1566,7 +1584,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listPhraseSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseSet stream %j', request); return this.descriptors.page.listPhraseSet.createStream( this.innerApiCalls.listPhraseSet as GaxCall, @@ -1628,7 +1648,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listPhraseSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseSet iterate %j', request); return this.descriptors.page.listPhraseSet.asyncIterate( this.innerApiCalls['listPhraseSet'] as GaxCall, @@ -1745,7 +1767,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.speech.v1.IListCustomClassesRequest, @@ -1825,7 +1849,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listCustomClasses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomClasses stream %j', request); return this.descriptors.page.listCustomClasses.createStream( this.innerApiCalls.listCustomClasses as GaxCall, @@ -1887,7 +1913,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listCustomClasses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomClasses iterate %j', request); return this.descriptors.page.listCustomClasses.asyncIterate( this.innerApiCalls['listCustomClasses'] as GaxCall, diff --git a/packages/google-cloud-speech/src/v1/speech_client.ts b/packages/google-cloud-speech/src/v1/speech_client.ts index 40ef775517c..ddb1b2cf86c 100644 --- a/packages/google-cloud-speech/src/v1/speech_client.ts +++ b/packages/google-cloud-speech/src/v1/speech_client.ts @@ -521,7 +521,9 @@ export class SpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recognize request %j', request); const wrappedCallback: | Callback< @@ -565,7 +567,9 @@ export class SpeechClient { * region_tag:speech_v1_generated_Speech_StreamingRecognize_async */ _streamingRecognize(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingRecognize stream %j', options); return this.innerApiCalls.streamingRecognize(null, options); } @@ -675,7 +679,9 @@ export class SpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -837,7 +843,7 @@ export class SpeechClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-speech/src/v1p1beta1/adaptation_client.ts b/packages/google-cloud-speech/src/v1p1beta1/adaptation_client.ts index af211456be1..bcca226e005 100644 --- a/packages/google-cloud-speech/src/v1p1beta1/adaptation_client.ts +++ b/packages/google-cloud-speech/src/v1p1beta1/adaptation_client.ts @@ -512,7 +512,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPhraseSet request %j', request); const wrappedCallback: | Callback< @@ -639,7 +641,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPhraseSet request %j', request); const wrappedCallback: | Callback< @@ -768,7 +772,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ 'phrase_set.name': request.phraseSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePhraseSet request %j', request); const wrappedCallback: | Callback< @@ -889,7 +895,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePhraseSet request %j', request); const wrappedCallback: | Callback< @@ -1031,7 +1039,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1152,7 +1162,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1290,7 +1302,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ 'custom_class.name': request.customClass!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1423,7 +1437,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1565,7 +1581,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.speech.v1p1beta1.IListPhraseSetRequest, @@ -1645,7 +1663,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listPhraseSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseSet stream %j', request); return this.descriptors.page.listPhraseSet.createStream( this.innerApiCalls.listPhraseSet as GaxCall, @@ -1707,7 +1727,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listPhraseSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseSet iterate %j', request); return this.descriptors.page.listPhraseSet.asyncIterate( this.innerApiCalls['listPhraseSet'] as GaxCall, @@ -1824,7 +1846,9 @@ export class AdaptationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.speech.v1p1beta1.IListCustomClassesRequest, @@ -1904,7 +1928,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listCustomClasses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomClasses stream %j', request); return this.descriptors.page.listCustomClasses.createStream( this.innerApiCalls.listCustomClasses as GaxCall, @@ -1966,7 +1992,9 @@ export class AdaptationClient { }); const defaultCallSettings = this._defaults['listCustomClasses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomClasses iterate %j', request); return this.descriptors.page.listCustomClasses.asyncIterate( this.innerApiCalls['listCustomClasses'] as GaxCall, diff --git a/packages/google-cloud-speech/src/v1p1beta1/speech_client.ts b/packages/google-cloud-speech/src/v1p1beta1/speech_client.ts index beb06aa97ae..c0bf3c97684 100644 --- a/packages/google-cloud-speech/src/v1p1beta1/speech_client.ts +++ b/packages/google-cloud-speech/src/v1p1beta1/speech_client.ts @@ -523,7 +523,9 @@ export class SpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recognize request %j', request); const wrappedCallback: | Callback< @@ -569,7 +571,9 @@ export class SpeechClient { * region_tag:speech_v1p1beta1_generated_Speech_StreamingRecognize_async */ _streamingRecognize(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingRecognize stream %j', options); return this.innerApiCalls.streamingRecognize(null, options); } @@ -679,7 +683,9 @@ export class SpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -841,7 +847,7 @@ export class SpeechClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-speech/src/v2/speech_client.ts b/packages/google-cloud-speech/src/v2/speech_client.ts index 0458de15199..3543ebd0b5c 100644 --- a/packages/google-cloud-speech/src/v2/speech_client.ts +++ b/packages/google-cloud-speech/src/v2/speech_client.ts @@ -745,7 +745,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecognizer request %j', request); const wrappedCallback: | Callback< @@ -892,7 +894,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ recognizer: request.recognizer ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recognize request %j', request); const wrappedCallback: | Callback< @@ -1000,7 +1004,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConfig request %j', request); const wrappedCallback: | Callback< @@ -1111,7 +1117,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ 'config.name': request.config!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConfig request %j', request); const wrappedCallback: | Callback< @@ -1221,7 +1229,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomClass request %j', request); const wrappedCallback: | Callback< @@ -1331,7 +1341,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPhraseSet request %j', request); const wrappedCallback: | Callback< @@ -1375,7 +1387,9 @@ export class SpeechClient { * region_tag:speech_v2_generated_Speech_StreamingRecognize_async */ _streamingRecognize(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingRecognize stream %j', options); return this.innerApiCalls.streamingRecognize(null, options); } @@ -1491,7 +1505,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1667,7 +1683,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ 'recognizer.name': request.recognizer!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1845,7 +1863,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2020,7 +2040,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2220,7 +2242,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ recognizer: request.recognizer ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2399,7 +2423,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2576,7 +2602,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ 'custom_class.name': request.customClass!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2755,7 +2783,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2931,7 +2961,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3110,7 +3142,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3286,7 +3320,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ 'phrase_set.name': request.phraseSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3464,7 +3500,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3639,7 +3677,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3806,7 +3846,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.speech.v2.IListRecognizersRequest, @@ -3882,7 +3924,9 @@ export class SpeechClient { }); const defaultCallSettings = this._defaults['listRecognizers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecognizers stream %j', request); return this.descriptors.page.listRecognizers.createStream( this.innerApiCalls.listRecognizers as GaxCall, @@ -3940,7 +3984,9 @@ export class SpeechClient { }); const defaultCallSettings = this._defaults['listRecognizers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecognizers iterate %j', request); return this.descriptors.page.listRecognizers.asyncIterate( this.innerApiCalls['listRecognizers'] as GaxCall, @@ -4054,7 +4100,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.speech.v2.IListCustomClassesRequest, @@ -4131,7 +4179,9 @@ export class SpeechClient { }); const defaultCallSettings = this._defaults['listCustomClasses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomClasses stream %j', request); return this.descriptors.page.listCustomClasses.createStream( this.innerApiCalls.listCustomClasses as GaxCall, @@ -4190,7 +4240,9 @@ export class SpeechClient { }); const defaultCallSettings = this._defaults['listCustomClasses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomClasses iterate %j', request); return this.descriptors.page.listCustomClasses.asyncIterate( this.innerApiCalls['listCustomClasses'] as GaxCall, @@ -4297,7 +4349,9 @@ export class SpeechClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.speech.v2.IListPhraseSetsRequest, @@ -4373,7 +4427,9 @@ export class SpeechClient { }); const defaultCallSettings = this._defaults['listPhraseSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseSets stream %j', request); return this.descriptors.page.listPhraseSets.createStream( this.innerApiCalls.listPhraseSets as GaxCall, @@ -4431,7 +4487,9 @@ export class SpeechClient { }); const defaultCallSettings = this._defaults['listPhraseSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseSets iterate %j', request); return this.descriptors.page.listPhraseSets.asyncIterate( this.innerApiCalls['listPhraseSets'] as GaxCall, @@ -4611,7 +4669,7 @@ export class SpeechClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-speech/test/gapic_adaptation_v1.ts b/packages/google-cloud-speech/test/gapic_adaptation_v1.ts index 8751520e1ae..7507a363053 100644 --- a/packages/google-cloud-speech/test/gapic_adaptation_v1.ts +++ b/packages/google-cloud-speech/test/gapic_adaptation_v1.ts @@ -250,7 +250,9 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.adaptationStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreatePhraseSetRequest() ); @@ -340,7 +342,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreatePhraseSetRequest() ); @@ -387,7 +389,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreatePhraseSetRequest() ); @@ -418,7 +420,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreatePhraseSetRequest() ); @@ -439,7 +441,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetPhraseSetRequest() ); @@ -470,7 +472,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetPhraseSetRequest() ); @@ -517,7 +519,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetPhraseSetRequest() ); @@ -548,7 +550,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetPhraseSetRequest() ); @@ -569,7 +571,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdatePhraseSetRequest() ); @@ -601,7 +603,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdatePhraseSetRequest() ); @@ -649,7 +651,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdatePhraseSetRequest() ); @@ -681,7 +683,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdatePhraseSetRequest() ); @@ -703,7 +705,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeletePhraseSetRequest() ); @@ -734,7 +736,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeletePhraseSetRequest() ); @@ -781,7 +783,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeletePhraseSetRequest() ); @@ -812,7 +814,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeletePhraseSetRequest() ); @@ -833,7 +835,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreateCustomClassRequest() ); @@ -864,7 +866,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreateCustomClassRequest() ); @@ -911,7 +913,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreateCustomClassRequest() ); @@ -942,7 +944,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.CreateCustomClassRequest() ); @@ -963,7 +965,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetCustomClassRequest() ); @@ -994,7 +996,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetCustomClassRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetCustomClassRequest() ); @@ -1072,7 +1074,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.GetCustomClassRequest() ); @@ -1093,7 +1095,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdateCustomClassRequest() ); @@ -1125,7 +1127,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdateCustomClassRequest() ); @@ -1173,7 +1175,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdateCustomClassRequest() ); @@ -1205,7 +1207,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.UpdateCustomClassRequest() ); @@ -1227,7 +1229,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeleteCustomClassRequest() ); @@ -1258,7 +1260,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeleteCustomClassRequest() ); @@ -1305,7 +1307,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeleteCustomClassRequest() ); @@ -1336,7 +1338,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.DeleteCustomClassRequest() ); @@ -1357,7 +1359,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListPhraseSetRequest() ); @@ -1390,7 +1392,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListPhraseSetRequest() ); @@ -1439,7 +1441,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListPhraseSetRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListPhraseSetRequest() ); @@ -1524,7 +1526,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListPhraseSetRequest() ); @@ -1573,7 +1575,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListPhraseSetRequest() ); @@ -1616,7 +1618,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListPhraseSetRequest() ); @@ -1658,7 +1660,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListCustomClassesRequest() ); @@ -1691,7 +1693,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListCustomClassesRequest() ); @@ -1740,7 +1742,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListCustomClassesRequest() ); @@ -1771,7 +1773,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListCustomClassesRequest() ); @@ -1825,7 +1827,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListCustomClassesRequest() ); @@ -1874,7 +1876,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListCustomClassesRequest() ); @@ -1917,7 +1919,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.ListCustomClassesRequest() ); @@ -1954,7 +1956,7 @@ describe('v1.AdaptationClient', () => { }); describe('Path templates', () => { - describe('customClass', () => { + describe('customClass', async () => { const fakePath = '/rendered/path/customClass'; const expectedParameters = { project: 'projectValue', @@ -1965,7 +1967,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customClassPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2018,7 +2020,7 @@ describe('v1.AdaptationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2028,7 +2030,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2067,7 +2069,7 @@ describe('v1.AdaptationClient', () => { }); }); - describe('phraseSet', () => { + describe('phraseSet', async () => { const fakePath = '/rendered/path/phraseSet'; const expectedParameters = { project: 'projectValue', @@ -2078,7 +2080,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.phraseSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2131,7 +2133,7 @@ describe('v1.AdaptationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2140,7 +2142,7 @@ describe('v1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-speech/test/gapic_adaptation_v1p1beta1.ts b/packages/google-cloud-speech/test/gapic_adaptation_v1p1beta1.ts index 56f2cadae9f..4c6fc922992 100644 --- a/packages/google-cloud-speech/test/gapic_adaptation_v1p1beta1.ts +++ b/packages/google-cloud-speech/test/gapic_adaptation_v1p1beta1.ts @@ -252,7 +252,9 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.adaptationStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest() ); @@ -342,7 +344,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest() ); @@ -389,7 +391,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest() ); @@ -420,7 +422,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest() ); @@ -441,7 +443,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetPhraseSetRequest() ); @@ -472,7 +474,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetPhraseSetRequest() ); @@ -519,7 +521,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetPhraseSetRequest() ); @@ -550,7 +552,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetPhraseSetRequest() ); @@ -571,7 +573,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest() ); @@ -603,7 +605,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest() ); @@ -651,7 +653,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest() ); @@ -683,7 +685,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest() ); @@ -705,7 +707,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest() ); @@ -736,7 +738,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest() ); @@ -783,7 +785,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest() ); @@ -814,7 +816,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest() ); @@ -835,7 +837,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreateCustomClassRequest() ); @@ -866,7 +868,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreateCustomClassRequest() ); @@ -913,7 +915,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreateCustomClassRequest() ); @@ -944,7 +946,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.CreateCustomClassRequest() ); @@ -965,7 +967,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetCustomClassRequest() ); @@ -996,7 +998,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetCustomClassRequest() ); @@ -1043,7 +1045,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetCustomClassRequest() ); @@ -1074,7 +1076,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.GetCustomClassRequest() ); @@ -1095,7 +1097,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest() ); @@ -1127,7 +1129,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest() ); @@ -1175,7 +1177,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest() ); @@ -1207,7 +1209,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest() ); @@ -1229,7 +1231,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest() ); @@ -1260,7 +1262,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest() ); @@ -1307,7 +1309,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest() ); @@ -1338,7 +1340,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest() ); @@ -1359,7 +1361,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListPhraseSetRequest() ); @@ -1398,7 +1400,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListPhraseSetRequest() ); @@ -1453,7 +1455,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListPhraseSetRequest() ); @@ -1484,7 +1486,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListPhraseSetRequest() ); @@ -1544,7 +1546,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListPhraseSetRequest() ); @@ -1593,7 +1595,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListPhraseSetRequest() ); @@ -1642,7 +1644,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListPhraseSetRequest() ); @@ -1684,7 +1686,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListCustomClassesRequest() ); @@ -1723,7 +1725,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListCustomClassesRequest() ); @@ -1778,7 +1780,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListCustomClassesRequest() ); @@ -1809,7 +1811,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListCustomClassesRequest() ); @@ -1870,7 +1872,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListCustomClassesRequest() ); @@ -1920,7 +1922,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListCustomClassesRequest() ); @@ -1969,7 +1971,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.ListCustomClassesRequest() ); @@ -2007,7 +2009,7 @@ describe('v1p1beta1.AdaptationClient', () => { }); describe('Path templates', () => { - describe('customClass', () => { + describe('customClass', async () => { const fakePath = '/rendered/path/customClass'; const expectedParameters = { project: 'projectValue', @@ -2018,7 +2020,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customClassPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2071,7 +2073,7 @@ describe('v1p1beta1.AdaptationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2081,7 +2083,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2120,7 +2122,7 @@ describe('v1p1beta1.AdaptationClient', () => { }); }); - describe('phraseSet', () => { + describe('phraseSet', async () => { const fakePath = '/rendered/path/phraseSet'; const expectedParameters = { project: 'projectValue', @@ -2131,7 +2133,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.phraseSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2184,7 +2186,7 @@ describe('v1p1beta1.AdaptationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2193,7 +2195,7 @@ describe('v1p1beta1.AdaptationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-speech/test/gapic_speech_v1.ts b/packages/google-cloud-speech/test/gapic_speech_v1.ts index c791908a35d..e24c2285ceb 100644 --- a/packages/google-cloud-speech/test/gapic_speech_v1.ts +++ b/packages/google-cloud-speech/test/gapic_speech_v1.ts @@ -258,7 +258,9 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.speechStub); client.close().then(() => { done(); @@ -317,7 +319,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.RecognizeRequest() ); @@ -334,7 +336,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.RecognizeRequest() ); @@ -367,7 +369,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.RecognizeRequest() ); @@ -381,7 +383,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.RecognizeRequest() ); @@ -397,7 +399,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.LongRunningRecognizeRequest() ); @@ -416,7 +418,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.LongRunningRecognizeRequest() ); @@ -456,7 +458,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.LongRunningRecognizeRequest() ); @@ -473,7 +475,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.LongRunningRecognizeRequest() ); @@ -492,7 +494,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -514,7 +516,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -535,7 +537,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.StreamingRecognizeRequest() ); @@ -580,7 +582,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1.StreamingRecognizeRequest() ); @@ -624,7 +626,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -703,7 +705,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -783,7 +785,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -879,8 +881,7 @@ describe('v1.SpeechClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -899,7 +900,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -908,8 +909,7 @@ describe('v1.SpeechClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -925,7 +925,7 @@ describe('v1.SpeechClient', () => { }); describe('Path templates', () => { - describe('customClass', () => { + describe('customClass', async () => { const fakePath = '/rendered/path/customClass'; const expectedParameters = { project: 'projectValue', @@ -936,7 +936,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customClassPathTemplate.render = sinon .stub() .returns(fakePath); @@ -989,7 +989,7 @@ describe('v1.SpeechClient', () => { }); }); - describe('phraseSet', () => { + describe('phraseSet', async () => { const fakePath = '/rendered/path/phraseSet'; const expectedParameters = { project: 'projectValue', @@ -1000,7 +1000,7 @@ describe('v1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.phraseSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-speech/test/gapic_speech_v1p1beta1.ts b/packages/google-cloud-speech/test/gapic_speech_v1p1beta1.ts index 94e2afc2e8c..0f8a62c79a3 100644 --- a/packages/google-cloud-speech/test/gapic_speech_v1p1beta1.ts +++ b/packages/google-cloud-speech/test/gapic_speech_v1p1beta1.ts @@ -258,7 +258,9 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.speechStub); client.close().then(() => { done(); @@ -317,7 +319,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.RecognizeRequest() ); @@ -334,7 +336,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.RecognizeRequest() ); @@ -367,7 +369,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.RecognizeRequest() ); @@ -381,7 +383,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.RecognizeRequest() ); @@ -397,7 +399,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest() ); @@ -416,7 +418,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest() ); @@ -456,7 +458,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest() ); @@ -473,7 +475,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest() ); @@ -492,7 +494,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -514,7 +516,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -535,7 +537,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest() ); @@ -580,7 +582,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest() ); @@ -624,7 +626,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -703,7 +705,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -783,7 +785,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -879,8 +881,7 @@ describe('v1p1beta1.SpeechClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -899,7 +900,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -908,8 +909,7 @@ describe('v1p1beta1.SpeechClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -925,7 +925,7 @@ describe('v1p1beta1.SpeechClient', () => { }); describe('Path templates', () => { - describe('customClass', () => { + describe('customClass', async () => { const fakePath = '/rendered/path/customClass'; const expectedParameters = { project: 'projectValue', @@ -936,7 +936,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customClassPathTemplate.render = sinon .stub() .returns(fakePath); @@ -989,7 +989,7 @@ describe('v1p1beta1.SpeechClient', () => { }); }); - describe('phraseSet', () => { + describe('phraseSet', async () => { const fakePath = '/rendered/path/phraseSet'; const expectedParameters = { project: 'projectValue', @@ -1000,7 +1000,7 @@ describe('v1p1beta1.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.phraseSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-speech/test/gapic_speech_v2.ts b/packages/google-cloud-speech/test/gapic_speech_v2.ts index b337dbb1e2f..f66c95b29bf 100644 --- a/packages/google-cloud-speech/test/gapic_speech_v2.ts +++ b/packages/google-cloud-speech/test/gapic_speech_v2.ts @@ -301,7 +301,9 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.speechStub); client.close().then(() => { done(); @@ -360,7 +362,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetRecognizerRequest() ); @@ -391,7 +393,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetRecognizerRequest() ); @@ -438,7 +440,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetRecognizerRequest() ); @@ -469,7 +471,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetRecognizerRequest() ); @@ -490,7 +492,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.RecognizeRequest() ); @@ -521,7 +523,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.RecognizeRequest() ); @@ -568,7 +570,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.RecognizeRequest() ); @@ -596,7 +598,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.RecognizeRequest() ); @@ -617,7 +619,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetConfigRequest() ); @@ -648,7 +650,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetConfigRequest() ); @@ -695,7 +697,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetConfigRequest() ); @@ -723,7 +725,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetConfigRequest() ); @@ -744,7 +746,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateConfigRequest() ); @@ -776,7 +778,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateConfigRequest() ); @@ -824,7 +826,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateConfigRequest() ); @@ -856,7 +858,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateConfigRequest() ); @@ -878,7 +880,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetCustomClassRequest() ); @@ -909,7 +911,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetCustomClassRequest() ); @@ -956,7 +958,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetCustomClassRequest() ); @@ -987,7 +989,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetCustomClassRequest() ); @@ -1008,7 +1010,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetPhraseSetRequest() ); @@ -1039,7 +1041,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetPhraseSetRequest() ); @@ -1086,7 +1088,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetPhraseSetRequest() ); @@ -1117,7 +1119,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.GetPhraseSetRequest() ); @@ -1138,7 +1140,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateRecognizerRequest() ); @@ -1171,7 +1173,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateRecognizerRequest() ); @@ -1225,7 +1227,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateRecognizerRequest() ); @@ -1256,7 +1258,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateRecognizerRequest() ); @@ -1289,7 +1291,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1311,7 +1313,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1332,7 +1334,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateRecognizerRequest() ); @@ -1366,7 +1368,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateRecognizerRequest() ); @@ -1421,7 +1423,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateRecognizerRequest() ); @@ -1453,7 +1455,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateRecognizerRequest() ); @@ -1487,7 +1489,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1509,7 +1511,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1530,7 +1532,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteRecognizerRequest() ); @@ -1563,7 +1565,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteRecognizerRequest() ); @@ -1617,7 +1619,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteRecognizerRequest() ); @@ -1648,7 +1650,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteRecognizerRequest() ); @@ -1681,7 +1683,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1703,7 +1705,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1724,7 +1726,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteRecognizerRequest() ); @@ -1757,7 +1759,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteRecognizerRequest() ); @@ -1811,7 +1813,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteRecognizerRequest() ); @@ -1842,7 +1844,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteRecognizerRequest() ); @@ -1875,7 +1877,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1897,7 +1899,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1918,7 +1920,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.BatchRecognizeRequest() ); @@ -1951,7 +1953,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.BatchRecognizeRequest() ); @@ -2005,7 +2007,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.BatchRecognizeRequest() ); @@ -2036,7 +2038,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.BatchRecognizeRequest() ); @@ -2069,7 +2071,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2091,7 +2093,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2112,7 +2114,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateCustomClassRequest() ); @@ -2145,7 +2147,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateCustomClassRequest() ); @@ -2199,7 +2201,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateCustomClassRequest() ); @@ -2230,7 +2232,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreateCustomClassRequest() ); @@ -2263,7 +2265,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2285,7 +2287,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2306,7 +2308,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateCustomClassRequest() ); @@ -2340,7 +2342,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateCustomClassRequest() ); @@ -2395,7 +2397,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateCustomClassRequest() ); @@ -2427,7 +2429,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdateCustomClassRequest() ); @@ -2461,7 +2463,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2483,7 +2485,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2504,7 +2506,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteCustomClassRequest() ); @@ -2537,7 +2539,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteCustomClassRequest() ); @@ -2591,7 +2593,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteCustomClassRequest() ); @@ -2622,7 +2624,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeleteCustomClassRequest() ); @@ -2655,7 +2657,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2677,7 +2679,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2698,7 +2700,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteCustomClassRequest() ); @@ -2731,7 +2733,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteCustomClassRequest() ); @@ -2785,7 +2787,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteCustomClassRequest() ); @@ -2816,7 +2818,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeleteCustomClassRequest() ); @@ -2849,7 +2851,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2871,7 +2873,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2892,7 +2894,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreatePhraseSetRequest() ); @@ -2925,7 +2927,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreatePhraseSetRequest() ); @@ -2979,7 +2981,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreatePhraseSetRequest() ); @@ -3010,7 +3012,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.CreatePhraseSetRequest() ); @@ -3043,7 +3045,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3065,7 +3067,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3086,7 +3088,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdatePhraseSetRequest() ); @@ -3120,7 +3122,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdatePhraseSetRequest() ); @@ -3175,7 +3177,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdatePhraseSetRequest() ); @@ -3207,7 +3209,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UpdatePhraseSetRequest() ); @@ -3241,7 +3243,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3263,7 +3265,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3284,7 +3286,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeletePhraseSetRequest() ); @@ -3317,7 +3319,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeletePhraseSetRequest() ); @@ -3371,7 +3373,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeletePhraseSetRequest() ); @@ -3402,7 +3404,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.DeletePhraseSetRequest() ); @@ -3435,7 +3437,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3457,7 +3459,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3478,7 +3480,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeletePhraseSetRequest() ); @@ -3511,7 +3513,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeletePhraseSetRequest() ); @@ -3565,7 +3567,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeletePhraseSetRequest() ); @@ -3596,7 +3598,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.UndeletePhraseSetRequest() ); @@ -3629,7 +3631,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3651,7 +3653,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3672,7 +3674,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.StreamingRecognizeRequest() ); @@ -3717,7 +3719,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.StreamingRecognizeRequest() ); @@ -3762,7 +3764,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListRecognizersRequest() ); @@ -3795,7 +3797,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListRecognizersRequest() ); @@ -3844,7 +3846,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListRecognizersRequest() ); @@ -3875,7 +3877,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListRecognizersRequest() ); @@ -3929,7 +3931,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListRecognizersRequest() ); @@ -3978,7 +3980,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListRecognizersRequest() ); @@ -4021,7 +4023,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListRecognizersRequest() ); @@ -4063,7 +4065,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListCustomClassesRequest() ); @@ -4096,7 +4098,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListCustomClassesRequest() ); @@ -4145,7 +4147,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListCustomClassesRequest() ); @@ -4176,7 +4178,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListCustomClassesRequest() ); @@ -4230,7 +4232,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListCustomClassesRequest() ); @@ -4279,7 +4281,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListCustomClassesRequest() ); @@ -4322,7 +4324,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListCustomClassesRequest() ); @@ -4364,7 +4366,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListPhraseSetsRequest() ); @@ -4397,7 +4399,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListPhraseSetsRequest() ); @@ -4446,7 +4448,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListPhraseSetsRequest() ); @@ -4477,7 +4479,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListPhraseSetsRequest() ); @@ -4531,7 +4533,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListPhraseSetsRequest() ); @@ -4580,7 +4582,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListPhraseSetsRequest() ); @@ -4623,7 +4625,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.speech.v2.ListPhraseSetsRequest() ); @@ -4664,7 +4666,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4694,7 +4696,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4738,7 +4740,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4773,7 +4775,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4821,7 +4823,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4862,7 +4864,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4941,7 +4943,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5021,7 +5023,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5117,8 +5119,7 @@ describe('v2.SpeechClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5137,7 +5138,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5146,8 +5147,7 @@ describe('v2.SpeechClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5163,7 +5163,7 @@ describe('v2.SpeechClient', () => { }); describe('Path templates', () => { - describe('config', () => { + describe('config', async () => { const fakePath = '/rendered/path/config'; const expectedParameters = { project: 'projectValue', @@ -5173,7 +5173,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.configPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5212,7 +5212,7 @@ describe('v2.SpeechClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -5224,7 +5224,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5288,7 +5288,7 @@ describe('v2.SpeechClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -5301,7 +5301,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5380,7 +5380,7 @@ describe('v2.SpeechClient', () => { }); }); - describe('customClass', () => { + describe('customClass', async () => { const fakePath = '/rendered/path/customClass'; const expectedParameters = { project: 'projectValue', @@ -5391,7 +5391,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customClassPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5444,7 +5444,7 @@ describe('v2.SpeechClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5454,7 +5454,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5493,7 +5493,7 @@ describe('v2.SpeechClient', () => { }); }); - describe('phraseSet', () => { + describe('phraseSet', async () => { const fakePath = '/rendered/path/phraseSet'; const expectedParameters = { project: 'projectValue', @@ -5504,7 +5504,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.phraseSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5557,7 +5557,7 @@ describe('v2.SpeechClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5566,7 +5566,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5595,7 +5595,7 @@ describe('v2.SpeechClient', () => { }); }); - describe('recognizer', () => { + describe('recognizer', async () => { const fakePath = '/rendered/path/recognizer'; const expectedParameters = { project: 'projectValue', @@ -5606,7 +5606,7 @@ describe('v2.SpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.recognizerPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-sql/package.json b/packages/google-cloud-sql/package.json index ae5f6ab95e9..cb10498eaaf 100644 --- a/packages/google-cloud-sql/package.json +++ b/packages/google-cloud-sql/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json b/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json index 21a04581082..53c2687a994 100644 --- a/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json +++ b/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-sql", - "version": "0.19.1", + "version": "0.20.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json b/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json index 43d798023ee..9a77989b38c 100644 --- a/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json +++ b/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-sql", - "version": "0.19.1", + "version": "0.20.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-sql/src/v1/sql_backup_runs_service_client.ts b/packages/google-cloud-sql/src/v1/sql_backup_runs_service_client.ts index fb4625a2424..e3480b64d81 100644 --- a/packages/google-cloud-sql/src/v1/sql_backup_runs_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_backup_runs_service_client.ts @@ -457,7 +457,9 @@ export class SqlBackupRunsServiceClient { instance: request.instance ?? '', id: request.id?.toString() ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -573,7 +575,9 @@ export class SqlBackupRunsServiceClient { instance: request.instance ?? '', id: request.id?.toString() ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -687,7 +691,9 @@ export class SqlBackupRunsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -808,7 +814,9 @@ export class SqlBackupRunsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_connect_service_client.ts b/packages/google-cloud-sql/src/v1/sql_connect_service_client.ts index fe82bacb230..f2038826801 100644 --- a/packages/google-cloud-sql/src/v1/sql_connect_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_connect_service_client.ts @@ -458,7 +458,9 @@ export class SqlConnectServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectSettings request %j', request); const wrappedCallback: | Callback< @@ -589,7 +591,9 @@ export class SqlConnectServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateEphemeralCert request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_databases_service_client.ts b/packages/google-cloud-sql/src/v1/sql_databases_service_client.ts index 910a600dc57..ae904580fb0 100644 --- a/packages/google-cloud-sql/src/v1/sql_databases_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_databases_service_client.ts @@ -462,7 +462,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -577,7 +579,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -692,7 +696,9 @@ export class SqlDatabasesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -805,7 +811,9 @@ export class SqlDatabasesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -923,7 +931,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1041,7 +1051,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_flags_service_client.ts b/packages/google-cloud-sql/src/v1/sql_flags_service_client.ts index a34f8ac8c7c..29aa192607d 100644 --- a/packages/google-cloud-sql/src/v1/sql_flags_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_flags_service_client.ts @@ -444,7 +444,9 @@ export class SqlFlagsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_instances_service_client.ts b/packages/google-cloud-sql/src/v1/sql_instances_service_client.ts index 4cf4b1ce2ae..11a415e80c1 100644 --- a/packages/google-cloud-sql/src/v1/sql_instances_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_instances_service_client.ts @@ -499,7 +499,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addServerCa request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('clone request %j', request); const wrappedCallback: | Callback< @@ -731,7 +735,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -852,7 +858,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('demoteMaster request %j', request); const wrappedCallback: | Callback< @@ -971,7 +979,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('demote request %j', request); const wrappedCallback: | Callback< @@ -1086,7 +1096,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('export request %j', request); const wrappedCallback: | Callback< @@ -1213,7 +1225,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('failover request %j', request); const wrappedCallback: | Callback< @@ -1334,7 +1348,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reencrypt request %j', request); const wrappedCallback: | Callback< @@ -1445,7 +1461,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1558,7 +1576,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('import request %j', request); const wrappedCallback: | Callback< @@ -1670,7 +1690,9 @@ export class SqlInstancesServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1798,7 +1820,9 @@ export class SqlInstancesServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -1921,7 +1945,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServerCas request %j', request); const wrappedCallback: | Callback< @@ -2039,7 +2065,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -2168,7 +2196,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('promoteReplica request %j', request); const wrappedCallback: | Callback< @@ -2295,7 +2325,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('switchover request %j', request); const wrappedCallback: | Callback< @@ -2415,7 +2447,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetSslConfig request %j', request); const wrappedCallback: | Callback< @@ -2531,7 +2565,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restart request %j', request); const wrappedCallback: | Callback< @@ -2652,7 +2688,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restoreBackup request %j', request); const wrappedCallback: | Callback< @@ -2778,7 +2816,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rotateServerCa request %j', request); const wrappedCallback: | Callback< @@ -2900,7 +2940,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startReplica request %j', request); const wrappedCallback: | Callback< @@ -3022,7 +3064,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopReplica request %j', request); const wrappedCallback: | Callback< @@ -3146,7 +3190,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('truncateLog request %j', request); const wrappedCallback: | Callback< @@ -3264,7 +3310,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -3393,7 +3441,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEphemeral request %j', request); const wrappedCallback: | Callback< @@ -3522,7 +3572,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rescheduleMaintenance request %j', request); const wrappedCallback: | Callback< @@ -3665,7 +3717,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('verifyExternalSyncSettings request %j', request); const wrappedCallback: | Callback< @@ -3806,7 +3860,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startExternalSync request %j', request); const wrappedCallback: | Callback< @@ -3936,7 +3992,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('performDiskShrink request %j', request); const wrappedCallback: | Callback< @@ -4064,7 +4122,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDiskShrinkConfig request %j', request); const wrappedCallback: | Callback< @@ -4192,7 +4252,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetReplicaSize request %j', request); const wrappedCallback: | Callback< @@ -4320,7 +4382,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLatestRecoveryTime request %j', request); const wrappedCallback: | Callback< @@ -4454,7 +4518,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acquireSsrsLease request %j', request); const wrappedCallback: | Callback< @@ -4585,7 +4651,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('releaseSsrsLease request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_operations_service_client.ts b/packages/google-cloud-sql/src/v1/sql_operations_service_client.ts index 4b5d1552c6d..8b2f02fe9b3 100644 --- a/packages/google-cloud-sql/src/v1/sql_operations_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_operations_service_client.ts @@ -452,7 +452,9 @@ export class SqlOperationsServiceClient { project: request.project ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -570,7 +572,9 @@ export class SqlOperationsServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -683,7 +687,9 @@ export class SqlOperationsServiceClient { project: request.project ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancel request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_ssl_certs_service_client.ts b/packages/google-cloud-sql/src/v1/sql_ssl_certs_service_client.ts index 5038b5b9baa..287eec4a914 100644 --- a/packages/google-cloud-sql/src/v1/sql_ssl_certs_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_ssl_certs_service_client.ts @@ -456,7 +456,9 @@ export class SqlSslCertsServiceClient { instance: request.instance ?? '', sha1_fingerprint: request.sha1Fingerprint ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -572,7 +574,9 @@ export class SqlSslCertsServiceClient { instance: request.instance ?? '', sha1_fingerprint: request.sha1Fingerprint ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -686,7 +690,9 @@ export class SqlSslCertsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -797,7 +803,9 @@ export class SqlSslCertsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_tiers_service_client.ts b/packages/google-cloud-sql/src/v1/sql_tiers_service_client.ts index f3503dad689..308786512ce 100644 --- a/packages/google-cloud-sql/src/v1/sql_tiers_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_tiers_service_client.ts @@ -449,7 +449,9 @@ export class SqlTiersServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1/sql_users_service_client.ts b/packages/google-cloud-sql/src/v1/sql_users_service_client.ts index c53e7e44f61..5210df2db2c 100644 --- a/packages/google-cloud-sql/src/v1/sql_users_service_client.ts +++ b/packages/google-cloud-sql/src/v1/sql_users_service_client.ts @@ -460,7 +460,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -574,7 +576,9 @@ export class SqlUsersServiceClient { instance: request.instance ?? '', name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -684,7 +688,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -793,7 +799,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -907,7 +915,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_backup_runs_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_backup_runs_service_client.ts index 94042dba819..7758f40f1b3 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_backup_runs_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_backup_runs_service_client.ts @@ -462,7 +462,9 @@ export class SqlBackupRunsServiceClient { instance: request.instance ?? '', id: request.id?.toString() ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -587,7 +589,9 @@ export class SqlBackupRunsServiceClient { instance: request.instance ?? '', id: request.id?.toString() ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -707,7 +711,9 @@ export class SqlBackupRunsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -837,7 +843,9 @@ export class SqlBackupRunsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_connect_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_connect_service_client.ts index 0bb4dbca28e..bb5f28d632d 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_connect_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_connect_service_client.ts @@ -464,7 +464,9 @@ export class SqlConnectServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectSettings request %j', request); const wrappedCallback: | Callback< @@ -598,7 +600,9 @@ export class SqlConnectServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateEphemeralCert request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_databases_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_databases_service_client.ts index e59a3834595..4668c89c606 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_databases_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_databases_service_client.ts @@ -467,7 +467,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -593,7 +595,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -716,7 +720,9 @@ export class SqlDatabasesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -838,7 +844,9 @@ export class SqlDatabasesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -962,7 +970,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1089,7 +1099,9 @@ export class SqlDatabasesServiceClient { instance: request.instance ?? '', database: request.database ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_flags_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_flags_service_client.ts index 0ce78917fe2..0ebb84b0ecc 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_flags_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_flags_service_client.ts @@ -445,7 +445,9 @@ export class SqlFlagsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_instances_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_instances_service_client.ts index a3cd5d8f71c..98735b019ea 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_instances_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_instances_service_client.ts @@ -502,7 +502,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addServerCa request %j', request); const wrappedCallback: | Callback< @@ -627,7 +629,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('clone request %j', request); const wrappedCallback: | Callback< @@ -746,7 +750,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -876,7 +882,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('demoteMaster request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1009,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('demote request %j', request); const wrappedCallback: | Callback< @@ -1125,7 +1135,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('export request %j', request); const wrappedCallback: | Callback< @@ -1255,7 +1267,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('failover request %j', request); const wrappedCallback: | Callback< @@ -1379,7 +1393,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reencrypt request %j', request); const wrappedCallback: | Callback< @@ -1501,7 +1517,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1622,7 +1640,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('import request %j', request); const wrappedCallback: | Callback< @@ -1743,7 +1763,9 @@ export class SqlInstancesServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1880,7 +1902,9 @@ export class SqlInstancesServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -2009,7 +2033,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServerCas request %j', request); const wrappedCallback: | Callback< @@ -2133,7 +2159,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -2268,7 +2296,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('promoteReplica request %j', request); const wrappedCallback: | Callback< @@ -2401,7 +2431,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('switchover request %j', request); const wrappedCallback: | Callback< @@ -2530,7 +2562,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetSslConfig request %j', request); const wrappedCallback: | Callback< @@ -2652,7 +2686,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restart request %j', request); const wrappedCallback: | Callback< @@ -2782,7 +2818,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restoreBackup request %j', request); const wrappedCallback: | Callback< @@ -2912,7 +2950,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rotateServerCa request %j', request); const wrappedCallback: | Callback< @@ -3040,7 +3080,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startReplica request %j', request); const wrappedCallback: | Callback< @@ -3168,7 +3210,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopReplica request %j', request); const wrappedCallback: | Callback< @@ -3298,7 +3342,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('truncateLog request %j', request); const wrappedCallback: | Callback< @@ -3422,7 +3468,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -3554,7 +3602,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEphemeral request %j', request); const wrappedCallback: | Callback< @@ -3683,7 +3733,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rescheduleMaintenance request %j', request); const wrappedCallback: | Callback< @@ -3826,7 +3878,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('verifyExternalSyncSettings request %j', request); const wrappedCallback: | Callback< @@ -3967,7 +4021,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startExternalSync request %j', request); const wrappedCallback: | Callback< @@ -4097,7 +4153,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('performDiskShrink request %j', request); const wrappedCallback: | Callback< @@ -4225,7 +4283,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDiskShrinkConfig request %j', request); const wrappedCallback: | Callback< @@ -4353,7 +4413,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetReplicaSize request %j', request); const wrappedCallback: | Callback< @@ -4481,7 +4543,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLatestRecoveryTime request %j', request); const wrappedCallback: | Callback< @@ -4615,7 +4679,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acquireSsrsLease request %j', request); const wrappedCallback: | Callback< @@ -4747,7 +4813,9 @@ export class SqlInstancesServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('releaseSsrsLease request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_operations_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_operations_service_client.ts index c5f9c7c8fe4..7c2c7bb3729 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_operations_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_operations_service_client.ts @@ -457,7 +457,9 @@ export class SqlOperationsServiceClient { project: request.project ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -581,7 +583,9 @@ export class SqlOperationsServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -700,7 +704,9 @@ export class SqlOperationsServiceClient { project: request.project ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancel request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_ssl_certs_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_ssl_certs_service_client.ts index 9e4a95f9521..f4ed2f2aac3 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_ssl_certs_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_ssl_certs_service_client.ts @@ -461,7 +461,9 @@ export class SqlSslCertsServiceClient { instance: request.instance ?? '', sha1_fingerprint: request.sha1Fingerprint ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -579,7 +581,9 @@ export class SqlSslCertsServiceClient { instance: request.instance ?? '', sha1_fingerprint: request.sha1Fingerprint ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -701,7 +705,9 @@ export class SqlSslCertsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -820,7 +826,9 @@ export class SqlSslCertsServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_tiers_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_tiers_service_client.ts index 6ce224549c2..f358484ff1e 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_tiers_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_tiers_service_client.ts @@ -450,7 +450,9 @@ export class SqlTiersServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/src/v1beta4/sql_users_service_client.ts b/packages/google-cloud-sql/src/v1beta4/sql_users_service_client.ts index d1a172fd394..8f3b3445b91 100644 --- a/packages/google-cloud-sql/src/v1beta4/sql_users_service_client.ts +++ b/packages/google-cloud-sql/src/v1beta4/sql_users_service_client.ts @@ -461,7 +461,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -579,7 +581,9 @@ export class SqlUsersServiceClient { instance: request.instance ?? '', name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -693,7 +697,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -806,7 +812,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list request %j', request); const wrappedCallback: | Callback< @@ -924,7 +932,9 @@ export class SqlUsersServiceClient { project: request.project ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1.ts index 8cbdf30fe14..fe79cefd832 100644 --- a/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1.ts @@ -223,7 +223,9 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlBackupRunsServiceStub); client.close().then(() => { done(); @@ -286,7 +288,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsDeleteRequest() ); @@ -328,7 +330,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsDeleteRequest() ); @@ -386,7 +388,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsDeleteRequest() ); @@ -425,7 +427,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsDeleteRequest() ); @@ -457,7 +459,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsGetRequest() ); @@ -498,7 +500,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsGetRequest() ); @@ -554,7 +556,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsGetRequest() ); @@ -592,7 +594,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsGetRequest() ); @@ -624,7 +626,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsInsertRequest() ); @@ -661,7 +663,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsInsertRequest() ); @@ -714,7 +716,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsInsertRequest() ); @@ -748,7 +750,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsInsertRequest() ); @@ -775,7 +777,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsListRequest() ); @@ -811,7 +813,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsListRequest() ); @@ -862,7 +864,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsListRequest() ); @@ -895,7 +897,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlBackupRunsListRequest() ); @@ -921,7 +923,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -952,7 +954,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -997,7 +999,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1082,7 +1084,7 @@ describe('v1.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1beta4.ts index 789e9be16bf..5bc5900aad5 100644 --- a/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_backup_runs_service_v1beta4.ts @@ -225,7 +225,9 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlBackupRunsServiceStub); client.close().then(() => { done(); @@ -288,7 +290,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsDeleteRequest() ); @@ -330,7 +332,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsDeleteRequest() ); @@ -388,7 +390,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsDeleteRequest() ); @@ -427,7 +429,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsDeleteRequest() ); @@ -459,7 +461,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsGetRequest() ); @@ -500,7 +502,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsGetRequest() ); @@ -556,7 +558,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsGetRequest() ); @@ -594,7 +596,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsGetRequest() ); @@ -626,7 +628,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsInsertRequest() ); @@ -663,7 +665,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsInsertRequest() ); @@ -716,7 +718,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsInsertRequest() ); @@ -750,7 +752,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsInsertRequest() ); @@ -777,7 +779,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsListRequest() ); @@ -813,7 +815,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsListRequest() ); @@ -864,7 +866,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsListRequest() ); @@ -897,7 +899,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlBackupRunsListRequest() ); @@ -923,7 +925,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -954,7 +956,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -999,7 +1001,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1035,7 +1037,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1084,7 +1086,7 @@ describe('v1beta4.SqlBackupRunsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_connect_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_connect_service_v1.ts index 57f08d017b6..bbc572666f9 100644 --- a/packages/google-cloud-sql/test/gapic_sql_connect_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_connect_service_v1.ts @@ -213,7 +213,9 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlConnectServiceStub); client.close().then(() => { done(); @@ -272,7 +274,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GetConnectSettingsRequest() ); @@ -309,7 +311,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GetConnectSettingsRequest() ); @@ -361,7 +363,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GetConnectSettingsRequest() ); @@ -397,7 +399,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GetConnectSettingsRequest() ); @@ -423,7 +425,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GenerateEphemeralCertRequest() ); @@ -460,7 +462,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GenerateEphemeralCertRequest() ); @@ -512,7 +514,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GenerateEphemeralCertRequest() ); @@ -551,7 +553,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.GenerateEphemeralCertRequest() ); @@ -579,7 +581,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -609,7 +611,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -653,7 +655,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -688,7 +690,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -736,7 +738,7 @@ describe('v1.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_connect_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_connect_service_v1beta4.ts index 779575eb899..3a4e63b4e0d 100644 --- a/packages/google-cloud-sql/test/gapic_sql_connect_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_connect_service_v1beta4.ts @@ -222,7 +222,9 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlConnectServiceStub); client.close().then(() => { done(); @@ -285,7 +287,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GetConnectSettingsRequest() ); @@ -323,7 +325,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GetConnectSettingsRequest() ); @@ -376,7 +378,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GetConnectSettingsRequest() ); @@ -413,7 +415,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GetConnectSettingsRequest() ); @@ -440,7 +442,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GenerateEphemeralCertRequest() ); @@ -478,7 +480,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GenerateEphemeralCertRequest() ); @@ -531,7 +533,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GenerateEphemeralCertRequest() ); @@ -571,7 +573,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.GenerateEphemeralCertRequest() ); @@ -600,7 +602,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -631,7 +633,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -676,7 +678,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -712,7 +714,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -761,7 +763,7 @@ describe('v1beta4.SqlConnectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_databases_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_databases_service_v1.ts index 66137b6bf2b..8f412b6f9ed 100644 --- a/packages/google-cloud-sql/test/gapic_sql_databases_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_databases_service_v1.ts @@ -223,7 +223,9 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlDatabasesServiceStub); client.close().then(() => { done(); @@ -290,7 +292,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesDeleteRequest() ); @@ -333,7 +335,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesDeleteRequest() ); @@ -392,7 +394,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesDeleteRequest() ); @@ -432,7 +434,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesDeleteRequest() ); @@ -465,7 +467,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesGetRequest() ); @@ -507,7 +509,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesGetRequest() ); @@ -564,7 +566,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesGetRequest() ); @@ -603,7 +605,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesGetRequest() ); @@ -636,7 +638,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesInsertRequest() ); @@ -674,7 +676,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesInsertRequest() ); @@ -728,7 +730,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesInsertRequest() ); @@ -763,7 +765,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesInsertRequest() ); @@ -791,7 +793,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesListRequest() ); @@ -828,7 +830,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesListRequest() ); @@ -880,7 +882,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesListRequest() ); @@ -914,7 +916,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesListRequest() ); @@ -942,7 +944,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -984,7 +986,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -1113,7 +1115,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -1156,7 +1158,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -1215,7 +1217,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -1255,7 +1257,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlDatabasesUpdateRequest() ); @@ -1287,7 +1289,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1319,7 +1321,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1402,7 +1404,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1452,7 +1454,7 @@ describe('v1.SqlDatabasesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_databases_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_databases_service_v1beta4.ts index 631f1c9b08f..bca877d3d4b 100644 --- a/packages/google-cloud-sql/test/gapic_sql_databases_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_databases_service_v1beta4.ts @@ -225,7 +225,9 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlDatabasesServiceStub); client.close().then(() => { done(); @@ -288,7 +290,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesDeleteRequest() ); @@ -330,7 +332,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesDeleteRequest() ); @@ -388,7 +390,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesDeleteRequest() ); @@ -427,7 +429,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesDeleteRequest() ); @@ -459,7 +461,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesGetRequest() ); @@ -500,7 +502,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesGetRequest() ); @@ -556,7 +558,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesGetRequest() ); @@ -594,7 +596,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesGetRequest() ); @@ -626,7 +628,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesInsertRequest() ); @@ -663,7 +665,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesInsertRequest() ); @@ -716,7 +718,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesInsertRequest() ); @@ -750,7 +752,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesInsertRequest() ); @@ -777,7 +779,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesListRequest() ); @@ -813,7 +815,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesListRequest() ); @@ -864,7 +866,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesListRequest() ); @@ -897,7 +899,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesListRequest() ); @@ -924,7 +926,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -965,7 +967,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -1021,7 +1023,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -1059,7 +1061,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -1091,7 +1093,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -1133,7 +1135,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -1191,7 +1193,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -1230,7 +1232,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest() ); @@ -1261,7 +1263,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1292,7 +1294,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1337,7 +1339,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1373,7 +1375,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1422,7 +1424,7 @@ describe('v1beta4.SqlDatabasesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_flags_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_flags_service_v1.ts index 1425836428c..c79874d241b 100644 --- a/packages/google-cloud-sql/test/gapic_sql_flags_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_flags_service_v1.ts @@ -212,7 +212,9 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlFlagsServiceStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlFlagsListRequest() ); @@ -288,7 +290,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlFlagsListRequest() ); @@ -320,7 +322,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlFlagsListRequest() ); @@ -334,7 +336,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlFlagsListRequest() ); @@ -349,7 +351,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -379,7 +381,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -423,7 +425,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -458,7 +460,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -506,7 +508,7 @@ describe('v1.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_flags_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_flags_service_v1beta4.ts index e77f73d44c4..f3ed6efda0e 100644 --- a/packages/google-cloud-sql/test/gapic_sql_flags_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_flags_service_v1beta4.ts @@ -214,7 +214,9 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlFlagsServiceStub); client.close().then(() => { done(); @@ -273,7 +275,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlFlagsListRequest() ); @@ -290,7 +292,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlFlagsListRequest() ); @@ -322,7 +324,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlFlagsListRequest() ); @@ -336,7 +338,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlFlagsListRequest() ); @@ -351,7 +353,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -381,7 +383,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -425,7 +427,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -460,7 +462,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -508,7 +510,7 @@ describe('v1beta4.SqlFlagsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_instances_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_instances_service_v1.ts index b3c9b3ff0f7..321c6e5c3ac 100644 --- a/packages/google-cloud-sql/test/gapic_sql_instances_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_instances_service_v1.ts @@ -223,7 +223,9 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlInstancesServiceStub); client.close().then(() => { done(); @@ -290,7 +292,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAddServerCaRequest() ); @@ -328,7 +330,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAddServerCaRequest() ); @@ -382,7 +384,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAddServerCaRequest() ); @@ -420,7 +422,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAddServerCaRequest() ); @@ -448,7 +450,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCloneRequest() ); @@ -485,7 +487,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCloneRequest() ); @@ -537,7 +539,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCloneRequest() ); @@ -571,7 +573,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCloneRequest() ); @@ -599,7 +601,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDeleteRequest() ); @@ -637,7 +639,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDeleteRequest() ); @@ -691,7 +693,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDeleteRequest() ); @@ -726,7 +728,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDeleteRequest() ); @@ -754,7 +756,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteMasterRequest() ); @@ -792,7 +794,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteMasterRequest() ); @@ -846,7 +848,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteMasterRequest() ); @@ -884,7 +886,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteMasterRequest() ); @@ -912,7 +914,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteRequest() ); @@ -950,7 +952,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteRequest() ); @@ -1004,7 +1006,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesDemoteRequest() ); @@ -1067,7 +1069,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesExportRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesExportRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesExportRequest() ); @@ -1194,7 +1196,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesExportRequest() ); @@ -1222,7 +1224,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesFailoverRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesFailoverRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesFailoverRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesFailoverRequest() ); @@ -1377,7 +1379,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReencryptRequest() ); @@ -1415,7 +1417,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReencryptRequest() ); @@ -1469,7 +1471,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReencryptRequest() ); @@ -1504,7 +1506,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReencryptRequest() ); @@ -1532,7 +1534,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetRequest() ); @@ -1569,7 +1571,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetRequest() ); @@ -1621,7 +1623,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetRequest() ); @@ -1655,7 +1657,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetRequest() ); @@ -1683,7 +1685,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesImportRequest() ); @@ -1721,7 +1723,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesImportRequest() ); @@ -1775,7 +1777,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesImportRequest() ); @@ -1810,7 +1812,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesImportRequest() ); @@ -1838,7 +1840,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesInsertRequest() ); @@ -1871,7 +1873,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesInsertRequest() ); @@ -1920,7 +1922,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesInsertRequest() ); @@ -1950,7 +1952,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesInsertRequest() ); @@ -1973,7 +1975,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListRequest() ); @@ -2005,7 +2007,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListRequest() ); @@ -2052,7 +2054,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListRequest() ); @@ -2081,7 +2083,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListRequest() ); @@ -2104,7 +2106,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListServerCasRequest() ); @@ -2142,7 +2144,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListServerCasRequest() ); @@ -2196,7 +2198,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListServerCasRequest() ); @@ -2234,7 +2236,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesListServerCasRequest() ); @@ -2262,7 +2264,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPatchRequest() ); @@ -2299,7 +2301,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPatchRequest() ); @@ -2351,7 +2353,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPatchRequest() ); @@ -2385,7 +2387,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPatchRequest() ); @@ -2413,7 +2415,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest() ); @@ -2451,7 +2453,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest() ); @@ -2505,7 +2507,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest() ); @@ -2543,7 +2545,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest() ); @@ -2571,7 +2573,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesSwitchoverRequest() ); @@ -2609,7 +2611,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesSwitchoverRequest() ); @@ -2663,7 +2665,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesSwitchoverRequest() ); @@ -2701,7 +2703,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesSwitchoverRequest() ); @@ -2729,7 +2731,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetSslConfigRequest() ); @@ -2767,7 +2769,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetSslConfigRequest() ); @@ -2821,7 +2823,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetSslConfigRequest() ); @@ -2859,7 +2861,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetSslConfigRequest() ); @@ -2887,7 +2889,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestartRequest() ); @@ -2925,7 +2927,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestartRequest() ); @@ -2979,7 +2981,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestartRequest() ); @@ -3014,7 +3016,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestartRequest() ); @@ -3042,7 +3044,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestoreBackupRequest() ); @@ -3080,7 +3082,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestoreBackupRequest() ); @@ -3134,7 +3136,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestoreBackupRequest() ); @@ -3172,7 +3174,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRestoreBackupRequest() ); @@ -3200,7 +3202,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRotateServerCaRequest() ); @@ -3238,7 +3240,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRotateServerCaRequest() ); @@ -3292,7 +3294,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRotateServerCaRequest() ); @@ -3330,7 +3332,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRotateServerCaRequest() ); @@ -3358,7 +3360,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartReplicaRequest() ); @@ -3396,7 +3398,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartReplicaRequest() ); @@ -3450,7 +3452,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartReplicaRequest() ); @@ -3488,7 +3490,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartReplicaRequest() ); @@ -3516,7 +3518,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStopReplicaRequest() ); @@ -3554,7 +3556,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStopReplicaRequest() ); @@ -3608,7 +3610,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStopReplicaRequest() ); @@ -3646,7 +3648,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStopReplicaRequest() ); @@ -3674,7 +3676,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesTruncateLogRequest() ); @@ -3712,7 +3714,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesTruncateLogRequest() ); @@ -3766,7 +3768,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesTruncateLogRequest() ); @@ -3804,7 +3806,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesTruncateLogRequest() ); @@ -3832,7 +3834,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesUpdateRequest() ); @@ -3870,7 +3872,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesUpdateRequest() ); @@ -3924,7 +3926,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesUpdateRequest() ); @@ -3959,7 +3961,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesUpdateRequest() ); @@ -3987,7 +3989,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCreateEphemeralCertRequest() ); @@ -4025,7 +4027,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCreateEphemeralCertRequest() ); @@ -4079,7 +4081,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCreateEphemeralCertRequest() ); @@ -4117,7 +4119,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesCreateEphemeralCertRequest() ); @@ -4145,7 +4147,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4184,7 +4186,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4238,7 +4240,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4279,7 +4281,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4310,7 +4312,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4349,7 +4351,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4403,7 +4405,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4444,7 +4446,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4475,7 +4477,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest() ); @@ -4513,7 +4515,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest() ); @@ -4567,7 +4569,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest() ); @@ -4605,7 +4607,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest() ); @@ -4633,7 +4635,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPerformDiskShrinkRequest() ); @@ -4671,7 +4673,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPerformDiskShrinkRequest() ); @@ -4725,7 +4727,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPerformDiskShrinkRequest() ); @@ -4763,7 +4765,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesPerformDiskShrinkRequest() ); @@ -4791,7 +4793,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4830,7 +4832,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4884,7 +4886,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4922,7 +4924,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4950,7 +4952,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetReplicaSizeRequest() ); @@ -4988,7 +4990,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetReplicaSizeRequest() ); @@ -5042,7 +5044,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetReplicaSizeRequest() ); @@ -5080,7 +5082,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesResetReplicaSizeRequest() ); @@ -5108,7 +5110,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5147,7 +5149,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5201,7 +5203,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5242,7 +5244,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5273,7 +5275,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5311,7 +5313,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5365,7 +5367,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5403,7 +5405,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5431,7 +5433,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5469,7 +5471,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5523,7 +5525,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5561,7 +5563,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5588,7 +5590,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5620,7 +5622,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5666,7 +5668,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5703,7 +5705,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5753,7 +5755,7 @@ describe('v1.SqlInstancesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_instances_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_instances_service_v1beta4.ts index 245ecfce9ba..04a93ae6124 100644 --- a/packages/google-cloud-sql/test/gapic_sql_instances_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_instances_service_v1beta4.ts @@ -225,7 +225,9 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlInstancesServiceStub); client.close().then(() => { done(); @@ -288,7 +290,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAddServerCaRequest() ); @@ -325,7 +327,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAddServerCaRequest() ); @@ -378,7 +380,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAddServerCaRequest() ); @@ -415,7 +417,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAddServerCaRequest() ); @@ -442,7 +444,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCloneRequest() ); @@ -478,7 +480,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCloneRequest() ); @@ -529,7 +531,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCloneRequest() ); @@ -562,7 +564,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCloneRequest() ); @@ -589,7 +591,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDeleteRequest() ); @@ -626,7 +628,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDeleteRequest() ); @@ -679,7 +681,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDeleteRequest() ); @@ -713,7 +715,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDeleteRequest() ); @@ -740,7 +742,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteMasterRequest() ); @@ -777,7 +779,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteMasterRequest() ); @@ -830,7 +832,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteMasterRequest() ); @@ -867,7 +869,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteMasterRequest() ); @@ -894,7 +896,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteRequest() ); @@ -931,7 +933,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteRequest() ); @@ -984,7 +986,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteRequest() ); @@ -1018,7 +1020,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesDemoteRequest() ); @@ -1045,7 +1047,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesExportRequest() ); @@ -1082,7 +1084,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesExportRequest() ); @@ -1135,7 +1137,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesExportRequest() ); @@ -1169,7 +1171,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesExportRequest() ); @@ -1196,7 +1198,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesFailoverRequest() ); @@ -1233,7 +1235,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesFailoverRequest() ); @@ -1286,7 +1288,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesFailoverRequest() ); @@ -1320,7 +1322,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesFailoverRequest() ); @@ -1347,7 +1349,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReencryptRequest() ); @@ -1384,7 +1386,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReencryptRequest() ); @@ -1437,7 +1439,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReencryptRequest() ); @@ -1471,7 +1473,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReencryptRequest() ); @@ -1498,7 +1500,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetRequest() ); @@ -1534,7 +1536,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetRequest() ); @@ -1585,7 +1587,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetRequest() ); @@ -1618,7 +1620,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetRequest() ); @@ -1645,7 +1647,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesImportRequest() ); @@ -1682,7 +1684,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesImportRequest() ); @@ -1735,7 +1737,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesImportRequest() ); @@ -1769,7 +1771,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesImportRequest() ); @@ -1796,7 +1798,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesInsertRequest() ); @@ -1828,7 +1830,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesInsertRequest() ); @@ -1876,7 +1878,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesInsertRequest() ); @@ -1905,7 +1907,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesInsertRequest() ); @@ -1927,7 +1929,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListRequest() ); @@ -1958,7 +1960,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListRequest() ); @@ -2004,7 +2006,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListRequest() ); @@ -2032,7 +2034,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListRequest() ); @@ -2054,7 +2056,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListServerCasRequest() ); @@ -2091,7 +2093,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListServerCasRequest() ); @@ -2144,7 +2146,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListServerCasRequest() ); @@ -2181,7 +2183,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesListServerCasRequest() ); @@ -2208,7 +2210,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPatchRequest() ); @@ -2244,7 +2246,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPatchRequest() ); @@ -2295,7 +2297,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPatchRequest() ); @@ -2328,7 +2330,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPatchRequest() ); @@ -2355,7 +2357,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPromoteReplicaRequest() ); @@ -2392,7 +2394,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPromoteReplicaRequest() ); @@ -2445,7 +2447,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPromoteReplicaRequest() ); @@ -2482,7 +2484,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPromoteReplicaRequest() ); @@ -2509,7 +2511,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesSwitchoverRequest() ); @@ -2546,7 +2548,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesSwitchoverRequest() ); @@ -2599,7 +2601,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesSwitchoverRequest() ); @@ -2636,7 +2638,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesSwitchoverRequest() ); @@ -2663,7 +2665,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetSslConfigRequest() ); @@ -2700,7 +2702,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetSslConfigRequest() ); @@ -2753,7 +2755,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetSslConfigRequest() ); @@ -2790,7 +2792,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetSslConfigRequest() ); @@ -2817,7 +2819,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestartRequest() ); @@ -2854,7 +2856,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestartRequest() ); @@ -2907,7 +2909,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestartRequest() ); @@ -2941,7 +2943,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestartRequest() ); @@ -2968,7 +2970,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestoreBackupRequest() ); @@ -3005,7 +3007,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestoreBackupRequest() ); @@ -3058,7 +3060,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestoreBackupRequest() ); @@ -3095,7 +3097,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRestoreBackupRequest() ); @@ -3122,7 +3124,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRotateServerCaRequest() ); @@ -3159,7 +3161,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRotateServerCaRequest() ); @@ -3212,7 +3214,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRotateServerCaRequest() ); @@ -3249,7 +3251,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRotateServerCaRequest() ); @@ -3276,7 +3278,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartReplicaRequest() ); @@ -3313,7 +3315,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartReplicaRequest() ); @@ -3366,7 +3368,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartReplicaRequest() ); @@ -3403,7 +3405,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartReplicaRequest() ); @@ -3430,7 +3432,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStopReplicaRequest() ); @@ -3467,7 +3469,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStopReplicaRequest() ); @@ -3520,7 +3522,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStopReplicaRequest() ); @@ -3557,7 +3559,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStopReplicaRequest() ); @@ -3584,7 +3586,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesTruncateLogRequest() ); @@ -3621,7 +3623,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesTruncateLogRequest() ); @@ -3674,7 +3676,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesTruncateLogRequest() ); @@ -3711,7 +3713,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesTruncateLogRequest() ); @@ -3738,7 +3740,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesUpdateRequest() ); @@ -3775,7 +3777,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesUpdateRequest() ); @@ -3828,7 +3830,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesUpdateRequest() ); @@ -3862,7 +3864,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesUpdateRequest() ); @@ -3889,7 +3891,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCreateEphemeralCertRequest() ); @@ -3926,7 +3928,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCreateEphemeralCertRequest() ); @@ -3979,7 +3981,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCreateEphemeralCertRequest() ); @@ -4016,7 +4018,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesCreateEphemeralCertRequest() ); @@ -4043,7 +4045,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4081,7 +4083,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4134,7 +4136,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4174,7 +4176,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequest() ); @@ -4204,7 +4206,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4242,7 +4244,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4295,7 +4297,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4335,7 +4337,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest() ); @@ -4365,7 +4367,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartExternalSyncRequest() ); @@ -4402,7 +4404,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartExternalSyncRequest() ); @@ -4455,7 +4457,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartExternalSyncRequest() ); @@ -4492,7 +4494,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesStartExternalSyncRequest() ); @@ -4519,7 +4521,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPerformDiskShrinkRequest() ); @@ -4556,7 +4558,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPerformDiskShrinkRequest() ); @@ -4609,7 +4611,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPerformDiskShrinkRequest() ); @@ -4646,7 +4648,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesPerformDiskShrinkRequest() ); @@ -4673,7 +4675,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4711,7 +4713,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4764,7 +4766,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4801,7 +4803,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetDiskShrinkConfigRequest() ); @@ -4828,7 +4830,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetReplicaSizeRequest() ); @@ -4865,7 +4867,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetReplicaSizeRequest() ); @@ -4918,7 +4920,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetReplicaSizeRequest() ); @@ -4955,7 +4957,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesResetReplicaSizeRequest() ); @@ -4982,7 +4984,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5020,7 +5022,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5073,7 +5075,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5113,7 +5115,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesGetLatestRecoveryTimeRequest() ); @@ -5143,7 +5145,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5180,7 +5182,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5233,7 +5235,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5270,7 +5272,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseRequest() ); @@ -5297,7 +5299,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5334,7 +5336,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5387,7 +5389,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5424,7 +5426,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseRequest() ); @@ -5450,7 +5452,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5481,7 +5483,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5526,7 +5528,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5562,7 +5564,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5611,7 +5613,7 @@ describe('v1beta4.SqlInstancesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_operations_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_operations_service_v1.ts index 692440f9160..5f9a038f016 100644 --- a/packages/google-cloud-sql/test/gapic_sql_operations_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_operations_service_v1.ts @@ -223,7 +223,9 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlOperationsServiceStub); client.close().then(() => { done(); @@ -286,7 +288,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsGetRequest() ); @@ -322,7 +324,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsGetRequest() ); @@ -373,7 +375,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsGetRequest() ); @@ -406,7 +408,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsGetRequest() ); @@ -433,7 +435,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsListRequest() ); @@ -464,7 +466,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsListRequest() ); @@ -510,7 +512,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsListRequest() ); @@ -538,7 +540,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsListRequest() ); @@ -560,7 +562,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsCancelRequest() ); @@ -597,7 +599,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsCancelRequest() ); @@ -650,7 +652,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsCancelRequest() ); @@ -684,7 +686,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlOperationsCancelRequest() ); @@ -710,7 +712,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -741,7 +743,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -786,7 +788,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -822,7 +824,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -871,7 +873,7 @@ describe('v1.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_operations_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_operations_service_v1beta4.ts index 703d0dad531..d20da40e8d7 100644 --- a/packages/google-cloud-sql/test/gapic_sql_operations_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_operations_service_v1beta4.ts @@ -225,7 +225,9 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlOperationsServiceStub); client.close().then(() => { done(); @@ -288,7 +290,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsGetRequest() ); @@ -324,7 +326,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsGetRequest() ); @@ -375,7 +377,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsGetRequest() ); @@ -408,7 +410,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsGetRequest() ); @@ -435,7 +437,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsListRequest() ); @@ -466,7 +468,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsListRequest() ); @@ -512,7 +514,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsListRequest() ); @@ -540,7 +542,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsListRequest() ); @@ -562,7 +564,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsCancelRequest() ); @@ -599,7 +601,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsCancelRequest() ); @@ -652,7 +654,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsCancelRequest() ); @@ -686,7 +688,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlOperationsCancelRequest() ); @@ -712,7 +714,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -743,7 +745,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -788,7 +790,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -824,7 +826,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -873,7 +875,7 @@ describe('v1beta4.SqlOperationsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1.ts index 70f13ed55d3..62c6a6fa5a3 100644 --- a/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1.ts @@ -214,7 +214,9 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlSslCertsServiceStub); client.close().then(() => { done(); @@ -273,7 +275,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsDeleteRequest() ); @@ -314,7 +316,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsDeleteRequest() ); @@ -371,7 +373,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsDeleteRequest() ); @@ -409,7 +411,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsDeleteRequest() ); @@ -440,7 +442,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsGetRequest() ); @@ -480,7 +482,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsGetRequest() ); @@ -535,7 +537,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsGetRequest() ); @@ -572,7 +574,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsGetRequest() ); @@ -603,7 +605,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsInsertRequest() ); @@ -639,7 +641,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsInsertRequest() ); @@ -691,7 +693,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsInsertRequest() ); @@ -724,7 +726,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsInsertRequest() ); @@ -750,7 +752,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsListRequest() ); @@ -785,7 +787,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsListRequest() ); @@ -835,7 +837,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsListRequest() ); @@ -867,7 +869,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlSslCertsListRequest() ); @@ -892,7 +894,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -922,7 +924,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -966,7 +968,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1049,7 +1051,7 @@ describe('v1.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1beta4.ts index 9973810e161..6cf69d7bde0 100644 --- a/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_ssl_certs_service_v1beta4.ts @@ -223,7 +223,9 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlSslCertsServiceStub); client.close().then(() => { done(); @@ -286,7 +288,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsDeleteRequest() ); @@ -328,7 +330,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsDeleteRequest() ); @@ -386,7 +388,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsDeleteRequest() ); @@ -425,7 +427,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsDeleteRequest() ); @@ -457,7 +459,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsGetRequest() ); @@ -498,7 +500,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsGetRequest() ); @@ -554,7 +556,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsGetRequest() ); @@ -592,7 +594,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsGetRequest() ); @@ -624,7 +626,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsInsertRequest() ); @@ -661,7 +663,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsInsertRequest() ); @@ -714,7 +716,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsInsertRequest() ); @@ -748,7 +750,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsInsertRequest() ); @@ -775,7 +777,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsListRequest() ); @@ -811,7 +813,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsListRequest() ); @@ -862,7 +864,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsListRequest() ); @@ -895,7 +897,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlSslCertsListRequest() ); @@ -921,7 +923,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -952,7 +954,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -997,7 +999,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1033,7 +1035,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1082,7 +1084,7 @@ describe('v1beta4.SqlSslCertsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1.ts index c1e6c95bf2b..66f4d0d2c51 100644 --- a/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1.ts @@ -212,7 +212,9 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlTiersServiceStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlTiersListRequest() ); @@ -301,7 +303,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlTiersListRequest() ); @@ -346,7 +348,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlTiersListRequest() ); @@ -373,7 +375,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlTiersListRequest() ); @@ -393,7 +395,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -423,7 +425,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -467,7 +469,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -502,7 +504,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -550,7 +552,7 @@ describe('v1.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1beta4.ts index 02e6f84bffa..82a10f7fedc 100644 --- a/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_tiers_service_v1beta4.ts @@ -214,7 +214,9 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlTiersServiceStub); client.close().then(() => { done(); @@ -273,7 +275,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlTiersListRequest() ); @@ -303,7 +305,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlTiersListRequest() ); @@ -348,7 +350,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlTiersListRequest() ); @@ -375,7 +377,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlTiersListRequest() ); @@ -395,7 +397,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -425,7 +427,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -469,7 +471,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -504,7 +506,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -552,7 +554,7 @@ describe('v1beta4.SqlTiersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_users_service_v1.ts b/packages/google-cloud-sql/test/gapic_sql_users_service_v1.ts index 507133b8630..b6c92e9abde 100644 --- a/packages/google-cloud-sql/test/gapic_sql_users_service_v1.ts +++ b/packages/google-cloud-sql/test/gapic_sql_users_service_v1.ts @@ -212,7 +212,9 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlUsersServiceStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersDeleteRequest() ); @@ -307,7 +309,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersDeleteRequest() ); @@ -359,7 +361,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersDeleteRequest() ); @@ -392,7 +394,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersDeleteRequest() ); @@ -418,7 +420,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersGetRequest() ); @@ -458,7 +460,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersGetRequest() ); @@ -513,7 +515,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersGetRequest() ); @@ -550,7 +552,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersGetRequest() ); @@ -581,7 +583,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersInsertRequest() ); @@ -617,7 +619,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersInsertRequest() ); @@ -669,7 +671,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersInsertRequest() ); @@ -702,7 +704,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersInsertRequest() ); @@ -728,7 +730,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersListRequest() ); @@ -763,7 +765,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersListRequest() ); @@ -813,7 +815,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersListRequest() ); @@ -845,7 +847,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersListRequest() ); @@ -871,7 +873,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersUpdateRequest() ); @@ -907,7 +909,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersUpdateRequest() ); @@ -959,7 +961,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersUpdateRequest() ); @@ -992,7 +994,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1.SqlUsersUpdateRequest() ); @@ -1017,7 +1019,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1047,7 +1049,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1126,7 +1128,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-sql/test/gapic_sql_users_service_v1beta4.ts b/packages/google-cloud-sql/test/gapic_sql_users_service_v1beta4.ts index f12c66ab9a6..07791aaae2f 100644 --- a/packages/google-cloud-sql/test/gapic_sql_users_service_v1beta4.ts +++ b/packages/google-cloud-sql/test/gapic_sql_users_service_v1beta4.ts @@ -214,7 +214,9 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sqlUsersServiceStub); client.close().then(() => { done(); @@ -273,7 +275,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersDeleteRequest() ); @@ -309,7 +311,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersDeleteRequest() ); @@ -361,7 +363,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersDeleteRequest() ); @@ -394,7 +396,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersDeleteRequest() ); @@ -420,7 +422,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersGetRequest() ); @@ -460,7 +462,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersGetRequest() ); @@ -515,7 +517,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersGetRequest() ); @@ -552,7 +554,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersGetRequest() ); @@ -583,7 +585,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersInsertRequest() ); @@ -619,7 +621,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersInsertRequest() ); @@ -671,7 +673,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersInsertRequest() ); @@ -704,7 +706,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersInsertRequest() ); @@ -730,7 +732,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersListRequest() ); @@ -765,7 +767,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersListRequest() ); @@ -815,7 +817,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersListRequest() ); @@ -847,7 +849,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersListRequest() ); @@ -873,7 +875,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersUpdateRequest() ); @@ -909,7 +911,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersUpdateRequest() ); @@ -961,7 +963,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersUpdateRequest() ); @@ -994,7 +996,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.sql.v1beta4.SqlUsersUpdateRequest() ); @@ -1019,7 +1021,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1049,7 +1051,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1093,7 +1095,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1128,7 +1130,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1176,7 +1178,7 @@ describe('v1beta4.SqlUsersServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); diff --git a/packages/google-cloud-storageinsights/package.json b/packages/google-cloud-storageinsights/package.json index f64926c4ceb..1fb5e254862 100644 --- a/packages/google-cloud-storageinsights/package.json +++ b/packages/google-cloud-storageinsights/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json index 0b74653a6a6..9a86d0ac9c9 100644 --- a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json +++ b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-storageinsights", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json index 0b74653a6a6..9a86d0ac9c9 100644 --- a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json +++ b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-storageinsights", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-storageinsights/src/v1/storage_insights_client.ts b/packages/google-cloud-storageinsights/src/v1/storage_insights_client.ts index eb9e3c433fc..7b20773ad91 100644 --- a/packages/google-cloud-storageinsights/src/v1/storage_insights_client.ts +++ b/packages/google-cloud-storageinsights/src/v1/storage_insights_client.ts @@ -503,7 +503,9 @@ export class StorageInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReportConfig request %j', request); const wrappedCallback: | Callback< @@ -644,7 +646,9 @@ export class StorageInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReportConfig request %j', request); const wrappedCallback: | Callback< @@ -789,7 +793,9 @@ export class StorageInsightsClient { this._gaxModule.routingHeader.fromParams({ 'report_config.name': request.reportConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateReportConfig request %j', request); const wrappedCallback: | Callback< @@ -930,7 +936,9 @@ export class StorageInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteReportConfig request %j', request); const wrappedCallback: | Callback< @@ -1055,7 +1063,9 @@ export class StorageInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReportDetail request %j', request); const wrappedCallback: | Callback< @@ -1187,7 +1197,9 @@ export class StorageInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, @@ -1257,7 +1269,9 @@ export class StorageInsightsClient { }); const defaultCallSettings = this._defaults['listReportConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportConfigs stream %j', request); return this.descriptors.page.listReportConfigs.createStream( this.innerApiCalls.listReportConfigs as GaxCall, @@ -1309,7 +1323,9 @@ export class StorageInsightsClient { }); const defaultCallSettings = this._defaults['listReportConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportConfigs iterate %j', request); return this.descriptors.page.listReportConfigs.asyncIterate( this.innerApiCalls['listReportConfigs'] as GaxCall, @@ -1416,7 +1432,9 @@ export class StorageInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, @@ -1486,7 +1504,9 @@ export class StorageInsightsClient { }); const defaultCallSettings = this._defaults['listReportDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportDetails stream %j', request); return this.descriptors.page.listReportDetails.createStream( this.innerApiCalls.listReportDetails as GaxCall, @@ -1538,7 +1558,9 @@ export class StorageInsightsClient { }); const defaultCallSettings = this._defaults['listReportDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReportDetails iterate %j', request); return this.descriptors.page.listReportDetails.asyncIterate( this.innerApiCalls['listReportDetails'] as GaxCall, diff --git a/packages/google-cloud-storageinsights/test/gapic_storage_insights_v1.ts b/packages/google-cloud-storageinsights/test/gapic_storage_insights_v1.ts index e449374ba5e..2285d795d91 100644 --- a/packages/google-cloud-storageinsights/test/gapic_storage_insights_v1.ts +++ b/packages/google-cloud-storageinsights/test/gapic_storage_insights_v1.ts @@ -255,7 +255,9 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.storageInsightsStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() ); @@ -345,7 +347,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() ); @@ -392,7 +394,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() ); @@ -423,7 +425,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() ); @@ -444,7 +446,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() ); @@ -476,7 +478,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() ); @@ -523,7 +525,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() ); @@ -554,7 +556,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() ); @@ -575,7 +577,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() ); @@ -608,7 +610,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() ); @@ -656,7 +658,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() ); @@ -688,7 +690,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() ); @@ -710,7 +712,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() ); @@ -742,7 +744,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() ); @@ -789,7 +791,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() ); @@ -820,7 +822,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() ); @@ -841,7 +843,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() ); @@ -872,7 +874,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() ); @@ -919,7 +921,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() ); @@ -950,7 +952,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() ); @@ -971,7 +973,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() ); @@ -1010,7 +1012,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() ); @@ -1067,7 +1069,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() ); @@ -1209,7 +1211,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() ); @@ -1259,7 +1261,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() ); @@ -1341,7 +1343,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() ); @@ -1398,7 +1400,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() ); @@ -1429,7 +1431,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() ); @@ -1490,7 +1492,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() ); @@ -1540,7 +1542,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() ); @@ -1590,7 +1592,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1662,7 +1664,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1706,7 +1708,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1789,7 +1791,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1826,7 +1828,7 @@ describe('v1.StorageInsightsClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1836,7 +1838,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1875,7 +1877,7 @@ describe('v1.StorageInsightsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1884,7 +1886,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1913,7 +1915,7 @@ describe('v1.StorageInsightsClient', () => { }); }); - describe('reportConfig', () => { + describe('reportConfig', async () => { const fakePath = '/rendered/path/reportConfig'; const expectedParameters = { project: 'projectValue', @@ -1924,7 +1926,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1977,7 +1979,7 @@ describe('v1.StorageInsightsClient', () => { }); }); - describe('reportDetail', () => { + describe('reportDetail', async () => { const fakePath = '/rendered/path/reportDetail'; const expectedParameters = { project: 'projectValue', @@ -1989,7 +1991,7 @@ describe('v1.StorageInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reportDetailPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-support/package.json b/packages/google-cloud-support/package.json index 2d1314e9a2c..58aac0710d8 100644 --- a/packages/google-cloud-support/package.json +++ b/packages/google-cloud-support/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json b/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json index c002cee5a80..d4a3d8aab32 100644 --- a/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json +++ b/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-support", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json b/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json index c002cee5a80..d4a3d8aab32 100644 --- a/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json +++ b/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-support", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-support/src/v2/case_attachment_service_client.ts b/packages/google-cloud-support/src/v2/case_attachment_service_client.ts index a7858247eb8..18f57ff418a 100644 --- a/packages/google-cloud-support/src/v2/case_attachment_service_client.ts +++ b/packages/google-cloud-support/src/v2/case_attachment_service_client.ts @@ -497,7 +497,9 @@ export class CaseAttachmentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.support.v2.IListAttachmentsRequest, @@ -566,7 +568,9 @@ export class CaseAttachmentServiceClient { }); const defaultCallSettings = this._defaults['listAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttachments stream %j', request); return this.descriptors.page.listAttachments.createStream( this.innerApiCalls.listAttachments as GaxCall, @@ -617,7 +621,9 @@ export class CaseAttachmentServiceClient { }); const defaultCallSettings = this._defaults['listAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttachments iterate %j', request); return this.descriptors.page.listAttachments.asyncIterate( this.innerApiCalls['listAttachments'] as GaxCall, diff --git a/packages/google-cloud-support/src/v2/case_service_client.ts b/packages/google-cloud-support/src/v2/case_service_client.ts index cd1da56ecb4..e54dc17114c 100644 --- a/packages/google-cloud-support/src/v2/case_service_client.ts +++ b/packages/google-cloud-support/src/v2/case_service_client.ts @@ -498,7 +498,9 @@ export class CaseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCase request %j', request); const wrappedCallback: | Callback< @@ -609,7 +611,9 @@ export class CaseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCase request %j', request); const wrappedCallback: | Callback< @@ -725,7 +729,9 @@ export class CaseServiceClient { this._gaxModule.routingHeader.fromParams({ 'case.name': request.case!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCase request %j', request); const wrappedCallback: | Callback< @@ -841,7 +847,9 @@ export class CaseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('escalateCase request %j', request); const wrappedCallback: | Callback< @@ -949,7 +957,9 @@ export class CaseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('closeCase request %j', request); const wrappedCallback: | Callback< @@ -1087,7 +1097,9 @@ export class CaseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.support.v2.IListCasesRequest, @@ -1169,7 +1181,9 @@ export class CaseServiceClient { }); const defaultCallSettings = this._defaults['listCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCases stream %j', request); return this.descriptors.page.listCases.createStream( this.innerApiCalls.listCases as GaxCall, @@ -1235,7 +1249,9 @@ export class CaseServiceClient { }); const defaultCallSettings = this._defaults['listCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCases iterate %j', request); return this.descriptors.page.listCases.asyncIterate( this.innerApiCalls['listCases'] as GaxCall, @@ -1369,7 +1385,9 @@ export class CaseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.support.v2.ISearchCasesRequest, @@ -1472,7 +1490,9 @@ export class CaseServiceClient { }); const defaultCallSettings = this._defaults['searchCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchCases stream %j', request); return this.descriptors.page.searchCases.createStream( this.innerApiCalls.searchCases as GaxCall, @@ -1557,7 +1577,9 @@ export class CaseServiceClient { }); const defaultCallSettings = this._defaults['searchCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchCases iterate %j', request); return this.descriptors.page.searchCases.asyncIterate( this.innerApiCalls['searchCases'] as GaxCall, @@ -1661,7 +1683,9 @@ export class CaseServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.support.v2.ISearchCaseClassificationsRequest, @@ -1725,7 +1749,9 @@ export class CaseServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchCaseClassifications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchCaseClassifications stream %j', request); return this.descriptors.page.searchCaseClassifications.createStream( this.innerApiCalls.searchCaseClassifications as GaxCall, @@ -1771,7 +1797,9 @@ export class CaseServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['searchCaseClassifications']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchCaseClassifications iterate %j', request); return this.descriptors.page.searchCaseClassifications.asyncIterate( this.innerApiCalls['searchCaseClassifications'] as GaxCall, diff --git a/packages/google-cloud-support/src/v2/comment_service_client.ts b/packages/google-cloud-support/src/v2/comment_service_client.ts index 91e4b9c0b44..1581c725b08 100644 --- a/packages/google-cloud-support/src/v2/comment_service_client.ts +++ b/packages/google-cloud-support/src/v2/comment_service_client.ts @@ -481,7 +481,9 @@ export class CommentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createComment request %j', request); const wrappedCallback: | Callback< @@ -601,7 +603,9 @@ export class CommentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.support.v2.IListCommentsRequest, @@ -668,7 +672,9 @@ export class CommentServiceClient { }); const defaultCallSettings = this._defaults['listComments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listComments stream %j', request); return this.descriptors.page.listComments.createStream( this.innerApiCalls.listComments as GaxCall, @@ -717,7 +723,9 @@ export class CommentServiceClient { }); const defaultCallSettings = this._defaults['listComments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listComments iterate %j', request); return this.descriptors.page.listComments.asyncIterate( this.innerApiCalls['listComments'] as GaxCall, diff --git a/packages/google-cloud-support/test/gapic_case_attachment_service_v2.ts b/packages/google-cloud-support/test/gapic_case_attachment_service_v2.ts index a6a342a2bdd..94e82300c95 100644 --- a/packages/google-cloud-support/test/gapic_case_attachment_service_v2.ts +++ b/packages/google-cloud-support/test/gapic_case_attachment_service_v2.ts @@ -268,7 +268,9 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.caseAttachmentServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListAttachmentsRequest() ); @@ -365,7 +367,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListAttachmentsRequest() ); @@ -415,7 +417,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListAttachmentsRequest() ); @@ -447,7 +449,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListAttachmentsRequest() ); @@ -502,7 +504,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListAttachmentsRequest() ); @@ -552,7 +554,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListAttachmentsRequest() ); @@ -596,7 +598,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListAttachmentsRequest() ); @@ -633,7 +635,7 @@ describe('v2.CaseAttachmentServiceClient', () => { }); describe('Path templates', () => { - describe('organizationCase', () => { + describe('organizationCase', async () => { const fakePath = '/rendered/path/organizationCase'; const expectedParameters = { organization: 'organizationValue', @@ -644,7 +646,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -690,7 +692,7 @@ describe('v2.CaseAttachmentServiceClient', () => { }); }); - describe('organizationCaseAttachmentId', () => { + describe('organizationCaseAttachmentId', async () => { const fakePath = '/rendered/path/organizationCaseAttachmentId'; const expectedParameters = { organization: 'organizationValue', @@ -702,7 +704,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCaseAttachmentIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationCaseAttachmentIdPathTemplate.match = @@ -772,7 +774,7 @@ describe('v2.CaseAttachmentServiceClient', () => { }); }); - describe('organizationCaseComment', () => { + describe('organizationCaseComment', async () => { const fakePath = '/rendered/path/organizationCaseComment'; const expectedParameters = { organization: 'organizationValue', @@ -784,7 +786,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCaseCommentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -852,7 +854,7 @@ describe('v2.CaseAttachmentServiceClient', () => { }); }); - describe('projectCase', () => { + describe('projectCase', async () => { const fakePath = '/rendered/path/projectCase'; const expectedParameters = { project: 'projectValue', @@ -863,7 +865,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -902,7 +904,7 @@ describe('v2.CaseAttachmentServiceClient', () => { }); }); - describe('projectCaseAttachmentId', () => { + describe('projectCaseAttachmentId', async () => { const fakePath = '/rendered/path/projectCaseAttachmentId'; const expectedParameters = { project: 'projectValue', @@ -914,7 +916,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCaseAttachmentIdPathTemplate.render = sinon .stub() .returns(fakePath); @@ -982,7 +984,7 @@ describe('v2.CaseAttachmentServiceClient', () => { }); }); - describe('projectCaseComment', () => { + describe('projectCaseComment', async () => { const fakePath = '/rendered/path/projectCaseComment'; const expectedParameters = { project: 'projectValue', @@ -994,7 +996,7 @@ describe('v2.CaseAttachmentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCaseCommentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-support/test/gapic_case_service_v2.ts b/packages/google-cloud-support/test/gapic_case_service_v2.ts index 1e37728b896..b75e1abf651 100644 --- a/packages/google-cloud-support/test/gapic_case_service_v2.ts +++ b/packages/google-cloud-support/test/gapic_case_service_v2.ts @@ -253,7 +253,9 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.caseServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.GetCaseRequest() ); @@ -343,7 +345,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.GetCaseRequest() ); @@ -390,7 +392,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.GetCaseRequest() ); @@ -418,7 +420,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.GetCaseRequest() ); @@ -439,7 +441,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCaseRequest() ); @@ -470,7 +472,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCaseRequest() ); @@ -517,7 +519,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCaseRequest() ); @@ -548,7 +550,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCaseRequest() ); @@ -569,7 +571,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.UpdateCaseRequest() ); @@ -601,7 +603,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.UpdateCaseRequest() ); @@ -649,7 +651,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.UpdateCaseRequest() ); @@ -681,7 +683,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.UpdateCaseRequest() ); @@ -703,7 +705,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.EscalateCaseRequest() ); @@ -734,7 +736,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.EscalateCaseRequest() ); @@ -781,7 +783,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.EscalateCaseRequest() ); @@ -812,7 +814,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.EscalateCaseRequest() ); @@ -833,7 +835,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CloseCaseRequest() ); @@ -864,7 +866,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CloseCaseRequest() ); @@ -911,7 +913,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CloseCaseRequest() ); @@ -939,7 +941,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CloseCaseRequest() ); @@ -960,7 +962,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCasesRequest() ); @@ -993,7 +995,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCasesRequest() ); @@ -1042,7 +1044,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCasesRequest() ); @@ -1070,7 +1072,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCasesRequest() ); @@ -1121,7 +1123,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCasesRequest() ); @@ -1169,7 +1171,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCasesRequest() ); @@ -1211,7 +1213,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCasesRequest() ); @@ -1254,7 +1256,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCasesRequest() ); @@ -1287,7 +1289,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCasesRequest() ); @@ -1336,7 +1338,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCasesRequest() ); @@ -1367,7 +1369,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCasesRequest() ); @@ -1418,7 +1420,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCasesRequest() ); @@ -1466,7 +1468,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCasesRequest() ); @@ -1509,7 +1511,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCasesRequest() ); @@ -1553,7 +1555,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCaseClassificationsRequest() ); @@ -1579,7 +1581,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCaseClassificationsRequest() ); @@ -1620,7 +1622,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCaseClassificationsRequest() ); @@ -1640,7 +1642,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCaseClassificationsRequest() ); @@ -1691,7 +1693,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCaseClassificationsRequest() ); @@ -1731,7 +1733,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCaseClassificationsRequest() ); @@ -1769,7 +1771,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.SearchCaseClassificationsRequest() ); @@ -1795,7 +1797,7 @@ describe('v2.CaseServiceClient', () => { }); describe('Path templates', () => { - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -1804,7 +1806,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1833,7 +1835,7 @@ describe('v2.CaseServiceClient', () => { }); }); - describe('organizationCase', () => { + describe('organizationCase', async () => { const fakePath = '/rendered/path/organizationCase'; const expectedParameters = { organization: 'organizationValue', @@ -1843,7 +1845,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1889,7 +1891,7 @@ describe('v2.CaseServiceClient', () => { }); }); - describe('organizationCaseAttachmentId', () => { + describe('organizationCaseAttachmentId', async () => { const fakePath = '/rendered/path/organizationCaseAttachmentId'; const expectedParameters = { organization: 'organizationValue', @@ -1900,7 +1902,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCaseAttachmentIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationCaseAttachmentIdPathTemplate.match = @@ -1970,7 +1972,7 @@ describe('v2.CaseServiceClient', () => { }); }); - describe('organizationCaseComment', () => { + describe('organizationCaseComment', async () => { const fakePath = '/rendered/path/organizationCaseComment'; const expectedParameters = { organization: 'organizationValue', @@ -1981,7 +1983,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCaseCommentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2049,7 +2051,7 @@ describe('v2.CaseServiceClient', () => { }); }); - describe('projectCase', () => { + describe('projectCase', async () => { const fakePath = '/rendered/path/projectCase'; const expectedParameters = { project: 'projectValue', @@ -2059,7 +2061,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2098,7 +2100,7 @@ describe('v2.CaseServiceClient', () => { }); }); - describe('projectCaseAttachmentId', () => { + describe('projectCaseAttachmentId', async () => { const fakePath = '/rendered/path/projectCaseAttachmentId'; const expectedParameters = { project: 'projectValue', @@ -2109,7 +2111,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCaseAttachmentIdPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2177,7 +2179,7 @@ describe('v2.CaseServiceClient', () => { }); }); - describe('projectCaseComment', () => { + describe('projectCaseComment', async () => { const fakePath = '/rendered/path/projectCaseComment'; const expectedParameters = { project: 'projectValue', @@ -2188,7 +2190,7 @@ describe('v2.CaseServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCaseCommentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-support/test/gapic_comment_service_v2.ts b/packages/google-cloud-support/test/gapic_comment_service_v2.ts index f243e9cd8e3..caa4666379a 100644 --- a/packages/google-cloud-support/test/gapic_comment_service_v2.ts +++ b/packages/google-cloud-support/test/gapic_comment_service_v2.ts @@ -255,7 +255,9 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.commentServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCommentRequest() ); @@ -345,7 +347,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCommentRequest() ); @@ -392,7 +394,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCommentRequest() ); @@ -423,7 +425,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.CreateCommentRequest() ); @@ -444,7 +446,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCommentsRequest() ); @@ -477,7 +479,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCommentsRequest() ); @@ -526,7 +528,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCommentsRequest() ); @@ -557,7 +559,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCommentsRequest() ); @@ -611,7 +613,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCommentsRequest() ); @@ -662,7 +664,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCommentsRequest() ); @@ -705,7 +707,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.support.v2.ListCommentsRequest() ); @@ -742,7 +744,7 @@ describe('v2.CommentServiceClient', () => { }); describe('Path templates', () => { - describe('organizationCase', () => { + describe('organizationCase', async () => { const fakePath = '/rendered/path/organizationCase'; const expectedParameters = { organization: 'organizationValue', @@ -752,7 +754,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -798,7 +800,7 @@ describe('v2.CommentServiceClient', () => { }); }); - describe('organizationCaseAttachmentId', () => { + describe('organizationCaseAttachmentId', async () => { const fakePath = '/rendered/path/organizationCaseAttachmentId'; const expectedParameters = { organization: 'organizationValue', @@ -809,7 +811,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCaseAttachmentIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationCaseAttachmentIdPathTemplate.match = @@ -879,7 +881,7 @@ describe('v2.CommentServiceClient', () => { }); }); - describe('organizationCaseComment', () => { + describe('organizationCaseComment', async () => { const fakePath = '/rendered/path/organizationCaseComment'; const expectedParameters = { organization: 'organizationValue', @@ -890,7 +892,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationCaseCommentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -958,7 +960,7 @@ describe('v2.CommentServiceClient', () => { }); }); - describe('projectCase', () => { + describe('projectCase', async () => { const fakePath = '/rendered/path/projectCase'; const expectedParameters = { project: 'projectValue', @@ -968,7 +970,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1007,7 +1009,7 @@ describe('v2.CommentServiceClient', () => { }); }); - describe('projectCaseAttachmentId', () => { + describe('projectCaseAttachmentId', async () => { const fakePath = '/rendered/path/projectCaseAttachmentId'; const expectedParameters = { project: 'projectValue', @@ -1018,7 +1020,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCaseAttachmentIdPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1086,7 +1088,7 @@ describe('v2.CommentServiceClient', () => { }); }); - describe('projectCaseComment', () => { + describe('projectCaseComment', async () => { const fakePath = '/rendered/path/projectCaseComment'; const expectedParameters = { project: 'projectValue', @@ -1097,7 +1099,7 @@ describe('v2.CommentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCaseCommentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/package.json b/packages/google-cloud-talent/package.json index ccbf732a4e7..2afd7163b26 100644 --- a/packages/google-cloud-talent/package.json +++ b/packages/google-cloud-talent/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json index f35426b96c7..14ea331efc1 100644 --- a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json +++ b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "6.4.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json index eaf07bd1b08..be282e3ceb2 100644 --- a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json +++ b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "6.4.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json index 8fee7a00cfc..2cf2ad5cabf 100644 --- a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json +++ b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "6.4.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json index ce7ff2c304c..bca31bf5b0c 100644 --- a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json +++ b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "6.4.1", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/src/v4/company_service_client.ts b/packages/google-cloud-talent/src/v4/company_service_client.ts index 2329d5e0e32..576ddee9e97 100644 --- a/packages/google-cloud-talent/src/v4/company_service_client.ts +++ b/packages/google-cloud-talent/src/v4/company_service_client.ts @@ -482,7 +482,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCompany request %j', request); const wrappedCallback: | Callback< @@ -594,7 +596,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCompany request %j', request); const wrappedCallback: | Callback< @@ -714,7 +718,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ 'company.name': request.company!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCompany request %j', request); const wrappedCallback: | Callback< @@ -829,7 +835,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCompany request %j', request); const wrappedCallback: | Callback< @@ -959,7 +967,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.talent.v4.IListCompaniesRequest, @@ -1036,7 +1046,9 @@ export class CompanyServiceClient { }); const defaultCallSettings = this._defaults['listCompanies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompanies stream %j', request); return this.descriptors.page.listCompanies.createStream( this.innerApiCalls.listCompanies as GaxCall, @@ -1095,7 +1107,9 @@ export class CompanyServiceClient { }); const defaultCallSettings = this._defaults['listCompanies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompanies iterate %j', request); return this.descriptors.page.listCompanies.asyncIterate( this.innerApiCalls['listCompanies'] as GaxCall, diff --git a/packages/google-cloud-talent/src/v4/completion_client.ts b/packages/google-cloud-talent/src/v4/completion_client.ts index 8c97eafa879..f108f2f2892 100644 --- a/packages/google-cloud-talent/src/v4/completion_client.ts +++ b/packages/google-cloud-talent/src/v4/completion_client.ts @@ -489,7 +489,9 @@ export class CompletionClient { this._gaxModule.routingHeader.fromParams({ tenant: request.tenant ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-talent/src/v4/event_service_client.ts b/packages/google-cloud-talent/src/v4/event_service_client.ts index 6abae8f10df..d519ed8d99e 100644 --- a/packages/google-cloud-talent/src/v4/event_service_client.ts +++ b/packages/google-cloud-talent/src/v4/event_service_client.ts @@ -476,7 +476,9 @@ export class EventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createClientEvent request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-talent/src/v4/job_service_client.ts b/packages/google-cloud-talent/src/v4/job_service_client.ts index 866eae8366d..c40b826fa25 100644 --- a/packages/google-cloud-talent/src/v4/job_service_client.ts +++ b/packages/google-cloud-talent/src/v4/job_service_client.ts @@ -554,7 +554,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -665,7 +667,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -784,7 +788,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ 'job.name': request.job!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJob request %j', request); const wrappedCallback: | Callback< @@ -897,7 +903,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJob request %j', request); const wrappedCallback: | Callback< @@ -1285,7 +1293,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchJobs request %j', request); const wrappedCallback: | Callback< @@ -1678,7 +1688,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchJobsForAlert request %j', request); const wrappedCallback: | Callback< @@ -1811,7 +1823,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2001,7 +2015,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2180,7 +2196,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2373,7 +2391,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.talent.v4.IListJobsRequest, @@ -2475,7 +2495,9 @@ export class JobServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -2561,7 +2583,9 @@ export class JobServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -2663,7 +2687,7 @@ export class JobServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-talent/src/v4/tenant_service_client.ts b/packages/google-cloud-talent/src/v4/tenant_service_client.ts index 0a4c476f7b7..26bf74ed9e3 100644 --- a/packages/google-cloud-talent/src/v4/tenant_service_client.ts +++ b/packages/google-cloud-talent/src/v4/tenant_service_client.ts @@ -483,7 +483,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTenant request %j', request); const wrappedCallback: | Callback< @@ -592,7 +594,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTenant request %j', request); const wrappedCallback: | Callback< @@ -709,7 +713,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ 'tenant.name': request.tenant!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTenant request %j', request); const wrappedCallback: | Callback< @@ -818,7 +824,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTenant request %j', request); const wrappedCallback: | Callback< @@ -936,7 +944,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.talent.v4.IListTenantsRequest, @@ -1003,7 +1013,9 @@ export class TenantServiceClient { }); const defaultCallSettings = this._defaults['listTenants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTenants stream %j', request); return this.descriptors.page.listTenants.createStream( this.innerApiCalls.listTenants as GaxCall, @@ -1054,7 +1066,9 @@ export class TenantServiceClient { }); const defaultCallSettings = this._defaults['listTenants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTenants iterate %j', request); return this.descriptors.page.listTenants.asyncIterate( this.innerApiCalls['listTenants'] as GaxCall, diff --git a/packages/google-cloud-talent/src/v4beta1/company_service_client.ts b/packages/google-cloud-talent/src/v4beta1/company_service_client.ts index 3ddbffd8c78..0b909214ae6 100644 --- a/packages/google-cloud-talent/src/v4beta1/company_service_client.ts +++ b/packages/google-cloud-talent/src/v4beta1/company_service_client.ts @@ -498,7 +498,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCompany request %j', request); const wrappedCallback: | Callback< @@ -615,7 +617,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCompany request %j', request); const wrappedCallback: | Callback< @@ -744,7 +748,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ 'company.name': request.company!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCompany request %j', request); const wrappedCallback: | Callback< @@ -868,7 +874,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCompany request %j', request); const wrappedCallback: | Callback< @@ -1007,7 +1015,9 @@ export class CompanyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.talent.v4beta1.IListCompaniesRequest, @@ -1087,7 +1097,9 @@ export class CompanyServiceClient { }); const defaultCallSettings = this._defaults['listCompanies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompanies stream %j', request); return this.descriptors.page.listCompanies.createStream( this.innerApiCalls.listCompanies as GaxCall, @@ -1149,7 +1161,9 @@ export class CompanyServiceClient { }); const defaultCallSettings = this._defaults['listCompanies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompanies iterate %j', request); return this.descriptors.page.listCompanies.asyncIterate( this.innerApiCalls['listCompanies'] as GaxCall, diff --git a/packages/google-cloud-talent/src/v4beta1/completion_client.ts b/packages/google-cloud-talent/src/v4beta1/completion_client.ts index 78b3afb8672..2db3b5b5a74 100644 --- a/packages/google-cloud-talent/src/v4beta1/completion_client.ts +++ b/packages/google-cloud-talent/src/v4beta1/completion_client.ts @@ -510,7 +510,9 @@ export class CompletionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-talent/src/v4beta1/event_service_client.ts b/packages/google-cloud-talent/src/v4beta1/event_service_client.ts index b970ddf9aaa..02a8182226f 100644 --- a/packages/google-cloud-talent/src/v4beta1/event_service_client.ts +++ b/packages/google-cloud-talent/src/v4beta1/event_service_client.ts @@ -486,7 +486,9 @@ export class EventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createClientEvent request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-talent/src/v4beta1/job_service_client.ts b/packages/google-cloud-talent/src/v4beta1/job_service_client.ts index 5333f9e7822..847889729eb 100644 --- a/packages/google-cloud-talent/src/v4beta1/job_service_client.ts +++ b/packages/google-cloud-talent/src/v4beta1/job_service_client.ts @@ -552,7 +552,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -668,7 +670,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -789,7 +793,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ 'job.name': request.job!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJob request %j', request); const wrappedCallback: | Callback< @@ -909,7 +915,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJob request %j', request); const wrappedCallback: | Callback< @@ -1041,7 +1049,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteJobs request %j', request); const wrappedCallback: | Callback< @@ -1442,7 +1452,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchJobs request %j', request); const wrappedCallback: | Callback< @@ -1845,7 +1857,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchJobsForAlert request %j', request); const wrappedCallback: | Callback< @@ -1980,7 +1994,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2173,7 +2189,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2370,7 +2388,9 @@ export class JobServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.talent.v4beta1.IListJobsRequest, @@ -2476,7 +2496,9 @@ export class JobServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -2564,7 +2586,9 @@ export class JobServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -2666,7 +2690,7 @@ export class JobServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-talent/src/v4beta1/tenant_service_client.ts b/packages/google-cloud-talent/src/v4beta1/tenant_service_client.ts index ccb4b37d4f1..ca13465658f 100644 --- a/packages/google-cloud-talent/src/v4beta1/tenant_service_client.ts +++ b/packages/google-cloud-talent/src/v4beta1/tenant_service_client.ts @@ -497,7 +497,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTenant request %j', request); const wrappedCallback: | Callback< @@ -610,7 +612,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTenant request %j', request); const wrappedCallback: | Callback< @@ -739,7 +743,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ 'tenant.name': request.tenant!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTenant request %j', request); const wrappedCallback: | Callback< @@ -858,7 +864,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTenant request %j', request); const wrappedCallback: | Callback< @@ -986,7 +994,9 @@ export class TenantServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.talent.v4beta1.IListTenantsRequest, @@ -1055,7 +1065,9 @@ export class TenantServiceClient { }); const defaultCallSettings = this._defaults['listTenants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTenants stream %j', request); return this.descriptors.page.listTenants.createStream( this.innerApiCalls.listTenants as GaxCall, @@ -1106,7 +1118,9 @@ export class TenantServiceClient { }); const defaultCallSettings = this._defaults['listTenants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTenants iterate %j', request); return this.descriptors.page.listTenants.asyncIterate( this.innerApiCalls['listTenants'] as GaxCall, diff --git a/packages/google-cloud-talent/test/gapic_company_service_v4.ts b/packages/google-cloud-talent/test/gapic_company_service_v4.ts index 2060d757346..3a68b908ee9 100644 --- a/packages/google-cloud-talent/test/gapic_company_service_v4.ts +++ b/packages/google-cloud-talent/test/gapic_company_service_v4.ts @@ -252,7 +252,9 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.companyServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateCompanyRequest() ); @@ -342,7 +344,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateCompanyRequest() ); @@ -389,7 +391,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateCompanyRequest() ); @@ -420,7 +422,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateCompanyRequest() ); @@ -441,7 +443,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetCompanyRequest() ); @@ -472,7 +474,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetCompanyRequest() ); @@ -519,7 +521,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetCompanyRequest() ); @@ -550,7 +552,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetCompanyRequest() ); @@ -571,7 +573,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateCompanyRequest() ); @@ -603,7 +605,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateCompanyRequest() ); @@ -651,7 +653,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateCompanyRequest() ); @@ -683,7 +685,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateCompanyRequest() ); @@ -705,7 +707,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteCompanyRequest() ); @@ -736,7 +738,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteCompanyRequest() ); @@ -783,7 +785,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteCompanyRequest() ); @@ -814,7 +816,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteCompanyRequest() ); @@ -835,7 +837,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListCompaniesRequest() ); @@ -868,7 +870,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListCompaniesRequest() ); @@ -917,7 +919,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListCompaniesRequest() ); @@ -948,7 +950,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListCompaniesRequest() ); @@ -999,7 +1001,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListCompaniesRequest() ); @@ -1045,7 +1047,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListCompaniesRequest() ); @@ -1088,7 +1090,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListCompaniesRequest() ); @@ -1125,7 +1127,7 @@ describe('v4.CompanyServiceClient', () => { }); describe('Path templates', () => { - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { project: 'projectValue', @@ -1136,7 +1138,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1189,7 +1191,7 @@ describe('v4.CompanyServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1200,7 +1202,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1253,7 +1255,7 @@ describe('v4.CompanyServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -1263,7 +1265,7 @@ describe('v4.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_company_service_v4beta1.ts b/packages/google-cloud-talent/test/gapic_company_service_v4beta1.ts index 3276d18be9e..914cceec6bb 100644 --- a/packages/google-cloud-talent/test/gapic_company_service_v4beta1.ts +++ b/packages/google-cloud-talent/test/gapic_company_service_v4beta1.ts @@ -253,7 +253,9 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.companyServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateCompanyRequest() ); @@ -343,7 +345,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateCompanyRequest() ); @@ -390,7 +392,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateCompanyRequest() ); @@ -421,7 +423,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateCompanyRequest() ); @@ -442,7 +444,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetCompanyRequest() ); @@ -473,7 +475,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetCompanyRequest() ); @@ -520,7 +522,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetCompanyRequest() ); @@ -551,7 +553,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetCompanyRequest() ); @@ -572,7 +574,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateCompanyRequest() ); @@ -604,7 +606,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateCompanyRequest() ); @@ -652,7 +654,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateCompanyRequest() ); @@ -684,7 +686,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateCompanyRequest() ); @@ -706,7 +708,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteCompanyRequest() ); @@ -737,7 +739,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteCompanyRequest() ); @@ -784,7 +786,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteCompanyRequest() ); @@ -815,7 +817,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteCompanyRequest() ); @@ -836,7 +838,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListCompaniesRequest() ); @@ -869,7 +871,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListCompaniesRequest() ); @@ -918,7 +920,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListCompaniesRequest() ); @@ -949,7 +951,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListCompaniesRequest() ); @@ -1003,7 +1005,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListCompaniesRequest() ); @@ -1052,7 +1054,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListCompaniesRequest() ); @@ -1095,7 +1097,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListCompaniesRequest() ); @@ -1132,7 +1134,7 @@ describe('v4beta1.CompanyServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1141,7 +1143,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1170,7 +1172,7 @@ describe('v4beta1.CompanyServiceClient', () => { }); }); - describe('projectCompany', () => { + describe('projectCompany', async () => { const fakePath = '/rendered/path/projectCompany'; const expectedParameters = { project: 'projectValue', @@ -1180,7 +1182,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1222,7 +1224,7 @@ describe('v4beta1.CompanyServiceClient', () => { }); }); - describe('projectJob', () => { + describe('projectJob', async () => { const fakePath = '/rendered/path/projectJob'; const expectedParameters = { project: 'projectValue', @@ -1232,7 +1234,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1271,7 +1273,7 @@ describe('v4beta1.CompanyServiceClient', () => { }); }); - describe('projectTenantCompany', () => { + describe('projectTenantCompany', async () => { const fakePath = '/rendered/path/projectTenantCompany'; const expectedParameters = { project: 'projectValue', @@ -1282,7 +1284,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1349,7 +1351,7 @@ describe('v4beta1.CompanyServiceClient', () => { }); }); - describe('projectTenantJob', () => { + describe('projectTenantJob', async () => { const fakePath = '/rendered/path/projectTenantJob'; const expectedParameters = { project: 'projectValue', @@ -1360,7 +1362,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1416,7 +1418,7 @@ describe('v4beta1.CompanyServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -1426,7 +1428,7 @@ describe('v4beta1.CompanyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_completion_v4.ts b/packages/google-cloud-talent/test/gapic_completion_v4.ts index 0d9ac2c24f6..8a4b55900d4 100644 --- a/packages/google-cloud-talent/test/gapic_completion_v4.ts +++ b/packages/google-cloud-talent/test/gapic_completion_v4.ts @@ -187,7 +187,9 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionStub); client.close().then(() => { done(); @@ -246,7 +248,7 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CompleteQueryRequest() ); @@ -277,7 +279,7 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CompleteQueryRequest() ); @@ -324,7 +326,7 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CompleteQueryRequest() ); @@ -355,7 +357,7 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CompleteQueryRequest() ); @@ -371,7 +373,7 @@ describe('v4.CompletionClient', () => { }); describe('Path templates', () => { - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { project: 'projectValue', @@ -382,7 +384,7 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -435,7 +437,7 @@ describe('v4.CompletionClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -446,7 +448,7 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -499,7 +501,7 @@ describe('v4.CompletionClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -509,7 +511,7 @@ describe('v4.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_completion_v4beta1.ts b/packages/google-cloud-talent/test/gapic_completion_v4beta1.ts index 8a848d59858..04ab26aa265 100644 --- a/packages/google-cloud-talent/test/gapic_completion_v4beta1.ts +++ b/packages/google-cloud-talent/test/gapic_completion_v4beta1.ts @@ -189,7 +189,9 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CompleteQueryRequest() ); @@ -279,7 +281,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CompleteQueryRequest() ); @@ -326,7 +328,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CompleteQueryRequest() ); @@ -357,7 +359,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CompleteQueryRequest() ); @@ -373,7 +375,7 @@ describe('v4beta1.CompletionClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -382,7 +384,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -411,7 +413,7 @@ describe('v4beta1.CompletionClient', () => { }); }); - describe('projectCompany', () => { + describe('projectCompany', async () => { const fakePath = '/rendered/path/projectCompany'; const expectedParameters = { project: 'projectValue', @@ -421,7 +423,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -463,7 +465,7 @@ describe('v4beta1.CompletionClient', () => { }); }); - describe('projectJob', () => { + describe('projectJob', async () => { const fakePath = '/rendered/path/projectJob'; const expectedParameters = { project: 'projectValue', @@ -473,7 +475,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -512,7 +514,7 @@ describe('v4beta1.CompletionClient', () => { }); }); - describe('projectTenantCompany', () => { + describe('projectTenantCompany', async () => { const fakePath = '/rendered/path/projectTenantCompany'; const expectedParameters = { project: 'projectValue', @@ -523,7 +525,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -590,7 +592,7 @@ describe('v4beta1.CompletionClient', () => { }); }); - describe('projectTenantJob', () => { + describe('projectTenantJob', async () => { const fakePath = '/rendered/path/projectTenantJob'; const expectedParameters = { project: 'projectValue', @@ -601,7 +603,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -657,7 +659,7 @@ describe('v4beta1.CompletionClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -667,7 +669,7 @@ describe('v4beta1.CompletionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_event_service_v4.ts b/packages/google-cloud-talent/test/gapic_event_service_v4.ts index 5be211a163d..87cf8e6b91e 100644 --- a/packages/google-cloud-talent/test/gapic_event_service_v4.ts +++ b/packages/google-cloud-talent/test/gapic_event_service_v4.ts @@ -189,7 +189,9 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.eventServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateClientEventRequest() ); @@ -279,7 +281,7 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateClientEventRequest() ); @@ -326,7 +328,7 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateClientEventRequest() ); @@ -357,7 +359,7 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateClientEventRequest() ); @@ -373,7 +375,7 @@ describe('v4.EventServiceClient', () => { }); describe('Path templates', () => { - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { project: 'projectValue', @@ -384,7 +386,7 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -437,7 +439,7 @@ describe('v4.EventServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -448,7 +450,7 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -501,7 +503,7 @@ describe('v4.EventServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -511,7 +513,7 @@ describe('v4.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_event_service_v4beta1.ts b/packages/google-cloud-talent/test/gapic_event_service_v4beta1.ts index 4f3e2338c75..6b927067b1f 100644 --- a/packages/google-cloud-talent/test/gapic_event_service_v4beta1.ts +++ b/packages/google-cloud-talent/test/gapic_event_service_v4beta1.ts @@ -189,7 +189,9 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.eventServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateClientEventRequest() ); @@ -279,7 +281,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateClientEventRequest() ); @@ -326,7 +328,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateClientEventRequest() ); @@ -357,7 +359,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateClientEventRequest() ); @@ -373,7 +375,7 @@ describe('v4beta1.EventServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -382,7 +384,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -411,7 +413,7 @@ describe('v4beta1.EventServiceClient', () => { }); }); - describe('projectCompany', () => { + describe('projectCompany', async () => { const fakePath = '/rendered/path/projectCompany'; const expectedParameters = { project: 'projectValue', @@ -421,7 +423,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -463,7 +465,7 @@ describe('v4beta1.EventServiceClient', () => { }); }); - describe('projectJob', () => { + describe('projectJob', async () => { const fakePath = '/rendered/path/projectJob'; const expectedParameters = { project: 'projectValue', @@ -473,7 +475,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -512,7 +514,7 @@ describe('v4beta1.EventServiceClient', () => { }); }); - describe('projectTenantCompany', () => { + describe('projectTenantCompany', async () => { const fakePath = '/rendered/path/projectTenantCompany'; const expectedParameters = { project: 'projectValue', @@ -523,7 +525,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -590,7 +592,7 @@ describe('v4beta1.EventServiceClient', () => { }); }); - describe('projectTenantJob', () => { + describe('projectTenantJob', async () => { const fakePath = '/rendered/path/projectTenantJob'; const expectedParameters = { project: 'projectValue', @@ -601,7 +603,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -657,7 +659,7 @@ describe('v4beta1.EventServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -667,7 +669,7 @@ describe('v4beta1.EventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_job_service_v4.ts b/packages/google-cloud-talent/test/gapic_job_service_v4.ts index 8114fe4d2d9..3b66e5387ea 100644 --- a/packages/google-cloud-talent/test/gapic_job_service_v4.ts +++ b/packages/google-cloud-talent/test/gapic_job_service_v4.ts @@ -282,7 +282,9 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.jobServiceStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateJobRequest() ); @@ -372,7 +374,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateJobRequest() ); @@ -419,7 +421,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateJobRequest() ); @@ -447,7 +449,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateJobRequest() ); @@ -468,7 +470,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetJobRequest() ); @@ -499,7 +501,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetJobRequest() ); @@ -546,7 +548,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetJobRequest() ); @@ -574,7 +576,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetJobRequest() ); @@ -595,7 +597,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateJobRequest() ); @@ -627,7 +629,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateJobRequest() ); @@ -675,7 +677,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateJobRequest() ); @@ -704,7 +706,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateJobRequest() ); @@ -726,7 +728,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteJobRequest() ); @@ -757,7 +759,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteJobRequest() ); @@ -804,7 +806,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteJobRequest() ); @@ -832,7 +834,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteJobRequest() ); @@ -853,7 +855,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -884,7 +886,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -931,7 +933,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -962,7 +964,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -983,7 +985,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -1015,7 +1017,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -1062,7 +1064,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -1093,7 +1095,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.SearchJobsRequest() ); @@ -1114,7 +1116,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchCreateJobsRequest() ); @@ -1147,7 +1149,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchCreateJobsRequest() ); @@ -1201,7 +1203,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchCreateJobsRequest() ); @@ -1232,7 +1234,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchCreateJobsRequest() ); @@ -1265,7 +1267,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1287,7 +1289,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1308,7 +1310,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchUpdateJobsRequest() ); @@ -1341,7 +1343,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchUpdateJobsRequest() ); @@ -1395,7 +1397,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchUpdateJobsRequest() ); @@ -1426,7 +1428,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchUpdateJobsRequest() ); @@ -1459,7 +1461,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1481,7 +1483,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1502,7 +1504,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchDeleteJobsRequest() ); @@ -1535,7 +1537,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchDeleteJobsRequest() ); @@ -1589,7 +1591,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchDeleteJobsRequest() ); @@ -1620,7 +1622,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.BatchDeleteJobsRequest() ); @@ -1653,7 +1655,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1675,7 +1677,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1696,7 +1698,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListJobsRequest() ); @@ -1729,7 +1731,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListJobsRequest() ); @@ -1778,7 +1780,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListJobsRequest() ); @@ -1806,7 +1808,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListJobsRequest() ); @@ -1857,7 +1859,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListJobsRequest() ); @@ -1905,7 +1907,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListJobsRequest() ); @@ -1947,7 +1949,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListJobsRequest() ); @@ -1989,7 +1991,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2068,7 +2070,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2148,7 +2150,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2244,8 +2246,7 @@ describe('v4.JobServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2264,7 +2265,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2273,8 +2274,7 @@ describe('v4.JobServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2290,7 +2290,7 @@ describe('v4.JobServiceClient', () => { }); describe('Path templates', () => { - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { project: 'projectValue', @@ -2301,7 +2301,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2354,7 +2354,7 @@ describe('v4.JobServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -2365,7 +2365,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2418,7 +2418,7 @@ describe('v4.JobServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2427,7 +2427,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2456,7 +2456,7 @@ describe('v4.JobServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -2466,7 +2466,7 @@ describe('v4.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_job_service_v4beta1.ts b/packages/google-cloud-talent/test/gapic_job_service_v4beta1.ts index 8f0b869db5c..b3be835f0b8 100644 --- a/packages/google-cloud-talent/test/gapic_job_service_v4beta1.ts +++ b/packages/google-cloud-talent/test/gapic_job_service_v4beta1.ts @@ -284,7 +284,9 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.jobServiceStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateJobRequest() ); @@ -374,7 +376,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateJobRequest() ); @@ -421,7 +423,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateJobRequest() ); @@ -449,7 +451,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateJobRequest() ); @@ -470,7 +472,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetJobRequest() ); @@ -501,7 +503,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetJobRequest() ); @@ -548,7 +550,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetJobRequest() ); @@ -576,7 +578,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetJobRequest() ); @@ -597,7 +599,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateJobRequest() ); @@ -629,7 +631,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateJobRequest() ); @@ -677,7 +679,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateJobRequest() ); @@ -706,7 +708,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateJobRequest() ); @@ -728,7 +730,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteJobRequest() ); @@ -759,7 +761,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteJobRequest() ); @@ -806,7 +808,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteJobRequest() ); @@ -834,7 +836,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteJobRequest() ); @@ -855,7 +857,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchDeleteJobsRequest() ); @@ -886,7 +888,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchDeleteJobsRequest() ); @@ -933,7 +935,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchDeleteJobsRequest() ); @@ -964,7 +966,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchDeleteJobsRequest() ); @@ -985,7 +987,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1016,7 +1018,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1063,7 +1065,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1094,7 +1096,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1115,7 +1117,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1147,7 +1149,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1194,7 +1196,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1225,7 +1227,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.SearchJobsRequest() ); @@ -1246,7 +1248,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchCreateJobsRequest() ); @@ -1279,7 +1281,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchCreateJobsRequest() ); @@ -1333,7 +1335,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchCreateJobsRequest() ); @@ -1364,7 +1366,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchCreateJobsRequest() ); @@ -1397,7 +1399,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1419,7 +1421,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1440,7 +1442,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchUpdateJobsRequest() ); @@ -1473,7 +1475,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchUpdateJobsRequest() ); @@ -1527,7 +1529,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchUpdateJobsRequest() ); @@ -1558,7 +1560,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.BatchUpdateJobsRequest() ); @@ -1591,7 +1593,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1613,7 +1615,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1634,7 +1636,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListJobsRequest() ); @@ -1667,7 +1669,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListJobsRequest() ); @@ -1716,7 +1718,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListJobsRequest() ); @@ -1744,7 +1746,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListJobsRequest() ); @@ -1798,7 +1800,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListJobsRequest() ); @@ -1849,7 +1851,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListJobsRequest() ); @@ -1891,7 +1893,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListJobsRequest() ); @@ -1933,7 +1935,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2012,7 +2014,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2092,7 +2094,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2188,8 +2190,7 @@ describe('v4beta1.JobServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2208,7 +2209,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2217,8 +2218,7 @@ describe('v4beta1.JobServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2234,7 +2234,7 @@ describe('v4beta1.JobServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2243,7 +2243,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2272,7 +2272,7 @@ describe('v4beta1.JobServiceClient', () => { }); }); - describe('projectCompany', () => { + describe('projectCompany', async () => { const fakePath = '/rendered/path/projectCompany'; const expectedParameters = { project: 'projectValue', @@ -2282,7 +2282,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2324,7 +2324,7 @@ describe('v4beta1.JobServiceClient', () => { }); }); - describe('projectJob', () => { + describe('projectJob', async () => { const fakePath = '/rendered/path/projectJob'; const expectedParameters = { project: 'projectValue', @@ -2334,7 +2334,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2373,7 +2373,7 @@ describe('v4beta1.JobServiceClient', () => { }); }); - describe('projectTenantCompany', () => { + describe('projectTenantCompany', async () => { const fakePath = '/rendered/path/projectTenantCompany'; const expectedParameters = { project: 'projectValue', @@ -2384,7 +2384,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2451,7 +2451,7 @@ describe('v4beta1.JobServiceClient', () => { }); }); - describe('projectTenantJob', () => { + describe('projectTenantJob', async () => { const fakePath = '/rendered/path/projectTenantJob'; const expectedParameters = { project: 'projectValue', @@ -2462,7 +2462,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2518,7 +2518,7 @@ describe('v4beta1.JobServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -2528,7 +2528,7 @@ describe('v4beta1.JobServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_tenant_service_v4.ts b/packages/google-cloud-talent/test/gapic_tenant_service_v4.ts index 14743b8ea94..2313cf75f80 100644 --- a/packages/google-cloud-talent/test/gapic_tenant_service_v4.ts +++ b/packages/google-cloud-talent/test/gapic_tenant_service_v4.ts @@ -252,7 +252,9 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tenantServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateTenantRequest() ); @@ -342,7 +344,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateTenantRequest() ); @@ -389,7 +391,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateTenantRequest() ); @@ -420,7 +422,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.CreateTenantRequest() ); @@ -441,7 +443,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetTenantRequest() ); @@ -472,7 +474,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetTenantRequest() ); @@ -519,7 +521,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetTenantRequest() ); @@ -547,7 +549,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.GetTenantRequest() ); @@ -568,7 +570,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateTenantRequest() ); @@ -600,7 +602,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateTenantRequest() ); @@ -648,7 +650,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateTenantRequest() ); @@ -680,7 +682,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.UpdateTenantRequest() ); @@ -702,7 +704,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteTenantRequest() ); @@ -733,7 +735,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteTenantRequest() ); @@ -780,7 +782,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteTenantRequest() ); @@ -811,7 +813,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.DeleteTenantRequest() ); @@ -832,7 +834,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListTenantsRequest() ); @@ -865,7 +867,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListTenantsRequest() ); @@ -914,7 +916,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListTenantsRequest() ); @@ -945,7 +947,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListTenantsRequest() ); @@ -996,7 +998,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListTenantsRequest() ); @@ -1044,7 +1046,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListTenantsRequest() ); @@ -1087,7 +1089,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4.ListTenantsRequest() ); @@ -1126,7 +1128,7 @@ describe('v4.TenantServiceClient', () => { }); describe('Path templates', () => { - describe('company', () => { + describe('company', async () => { const fakePath = '/rendered/path/company'; const expectedParameters = { project: 'projectValue', @@ -1137,7 +1139,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.companyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1190,7 +1192,7 @@ describe('v4.TenantServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1201,7 +1203,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1254,7 +1256,7 @@ describe('v4.TenantServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1263,7 +1265,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1292,7 +1294,7 @@ describe('v4.TenantServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -1302,7 +1304,7 @@ describe('v4.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-talent/test/gapic_tenant_service_v4beta1.ts b/packages/google-cloud-talent/test/gapic_tenant_service_v4beta1.ts index 145a767a2f0..92dc22d254a 100644 --- a/packages/google-cloud-talent/test/gapic_tenant_service_v4beta1.ts +++ b/packages/google-cloud-talent/test/gapic_tenant_service_v4beta1.ts @@ -252,7 +252,9 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tenantServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateTenantRequest() ); @@ -342,7 +344,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateTenantRequest() ); @@ -389,7 +391,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateTenantRequest() ); @@ -420,7 +422,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.CreateTenantRequest() ); @@ -441,7 +443,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetTenantRequest() ); @@ -472,7 +474,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetTenantRequest() ); @@ -519,7 +521,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetTenantRequest() ); @@ -547,7 +549,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.GetTenantRequest() ); @@ -568,7 +570,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateTenantRequest() ); @@ -600,7 +602,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateTenantRequest() ); @@ -648,7 +650,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateTenantRequest() ); @@ -680,7 +682,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.UpdateTenantRequest() ); @@ -702,7 +704,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteTenantRequest() ); @@ -733,7 +735,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteTenantRequest() ); @@ -780,7 +782,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteTenantRequest() ); @@ -811,7 +813,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.DeleteTenantRequest() ); @@ -832,7 +834,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListTenantsRequest() ); @@ -865,7 +867,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListTenantsRequest() ); @@ -914,7 +916,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListTenantsRequest() ); @@ -945,7 +947,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListTenantsRequest() ); @@ -999,7 +1001,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListTenantsRequest() ); @@ -1050,7 +1052,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListTenantsRequest() ); @@ -1093,7 +1095,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.talent.v4beta1.ListTenantsRequest() ); @@ -1132,7 +1134,7 @@ describe('v4beta1.TenantServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1141,7 +1143,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1170,7 +1172,7 @@ describe('v4beta1.TenantServiceClient', () => { }); }); - describe('projectCompany', () => { + describe('projectCompany', async () => { const fakePath = '/rendered/path/projectCompany'; const expectedParameters = { project: 'projectValue', @@ -1180,7 +1182,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1222,7 +1224,7 @@ describe('v4beta1.TenantServiceClient', () => { }); }); - describe('projectJob', () => { + describe('projectJob', async () => { const fakePath = '/rendered/path/projectJob'; const expectedParameters = { project: 'projectValue', @@ -1232,7 +1234,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1271,7 +1273,7 @@ describe('v4beta1.TenantServiceClient', () => { }); }); - describe('projectTenantCompany', () => { + describe('projectTenantCompany', async () => { const fakePath = '/rendered/path/projectTenantCompany'; const expectedParameters = { project: 'projectValue', @@ -1282,7 +1284,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantCompanyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1349,7 +1351,7 @@ describe('v4beta1.TenantServiceClient', () => { }); }); - describe('projectTenantJob', () => { + describe('projectTenantJob', async () => { const fakePath = '/rendered/path/projectTenantJob'; const expectedParameters = { project: 'projectValue', @@ -1360,7 +1362,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTenantJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1416,7 +1418,7 @@ describe('v4beta1.TenantServiceClient', () => { }); }); - describe('tenant', () => { + describe('tenant', async () => { const fakePath = '/rendered/path/tenant'; const expectedParameters = { project: 'projectValue', @@ -1426,7 +1428,7 @@ describe('v4beta1.TenantServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tenantPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-tasks/.gitignore b/packages/google-cloud-tasks/.gitignore index 553b0acd66b..b391f5f9cd1 100644 --- a/packages/google-cloud-tasks/.gitignore +++ b/packages/google-cloud-tasks/.gitignore @@ -12,5 +12,4 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ -esm/**/*.d.ts -esm/**/*.d.cts \ No newline at end of file +esm/**/*.d.ts \ No newline at end of file diff --git a/packages/google-cloud-tasks/esm/src/v2/cloud_tasks_client.ts b/packages/google-cloud-tasks/esm/src/v2/cloud_tasks_client.ts index 105b62b8041..35a306ed3c3 100644 --- a/packages/google-cloud-tasks/esm/src/v2/cloud_tasks_client.ts +++ b/packages/google-cloud-tasks/esm/src/v2/cloud_tasks_client.ts @@ -523,7 +523,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQueue request %j', request); const wrappedCallback: | Callback< @@ -650,7 +652,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQueue request %j', request); const wrappedCallback: | Callback< @@ -780,7 +784,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ 'queue.name': request.queue!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQueue request %j', request); const wrappedCallback: | Callback< @@ -899,7 +905,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteQueue request %j', request); const wrappedCallback: | Callback< @@ -1011,7 +1019,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('purgeQueue request %j', request); const wrappedCallback: | Callback< @@ -1125,7 +1135,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseQueue request %j', request); const wrappedCallback: | Callback< @@ -1245,7 +1257,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeQueue request %j', request); const wrappedCallback: | Callback< @@ -1363,7 +1377,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1491,7 +1507,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1610,7 +1628,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1730,7 +1750,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -1890,7 +1912,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTask request %j', request); const wrappedCallback: | Callback< @@ -2001,7 +2025,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTask request %j', request); const wrappedCallback: | Callback< @@ -2146,7 +2172,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runTask request %j', request); const wrappedCallback: | Callback< @@ -2289,7 +2317,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tasks.v2.IListQueuesRequest, @@ -2379,7 +2409,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listQueues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueues stream %j', request); return this.descriptors.page.listQueues.createStream( this.innerApiCalls.listQueues as GaxCall, @@ -2453,7 +2485,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listQueues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueues iterate %j', request); return this.descriptors.page.listQueues.asyncIterate( this.innerApiCalls['listQueues'] as GaxCall, @@ -2584,7 +2618,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tasks.v2.IListTasksRequest, @@ -2676,7 +2712,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -2752,7 +2790,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, diff --git a/packages/google-cloud-tasks/esm/src/v2beta2/cloud_tasks_client.ts b/packages/google-cloud-tasks/esm/src/v2beta2/cloud_tasks_client.ts index 7c547944d98..cfd92c9b7d4 100644 --- a/packages/google-cloud-tasks/esm/src/v2beta2/cloud_tasks_client.ts +++ b/packages/google-cloud-tasks/esm/src/v2beta2/cloud_tasks_client.ts @@ -533,7 +533,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQueue request %j', request); const wrappedCallback: | Callback< @@ -662,7 +664,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQueue request %j', request); const wrappedCallback: | Callback< @@ -798,7 +802,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ 'queue.name': request.queue!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQueue request %j', request); const wrappedCallback: | Callback< @@ -921,7 +927,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteQueue request %j', request); const wrappedCallback: | Callback< @@ -1037,7 +1045,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('purgeQueue request %j', request); const wrappedCallback: | Callback< @@ -1155,7 +1165,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseQueue request %j', request); const wrappedCallback: | Callback< @@ -1280,7 +1292,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeQueue request %j', request); const wrappedCallback: | Callback< @@ -1400,7 +1414,9 @@ export class CloudTasksClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('uploadQueueYaml request %j', request); const wrappedCallback: | Callback< @@ -1520,7 +1536,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1648,7 +1666,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1767,7 +1787,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1888,7 +1910,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -2055,7 +2079,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTask request %j', request); const wrappedCallback: | Callback< @@ -2170,7 +2196,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTask request %j', request); const wrappedCallback: | Callback< @@ -2384,7 +2412,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('leaseTasks request %j', request); const wrappedCallback: | Callback< @@ -2520,7 +2550,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acknowledgeTask request %j', request); const wrappedCallback: | Callback< @@ -2662,7 +2694,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('renewLease request %j', request); const wrappedCallback: | Callback< @@ -2798,7 +2832,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelLease request %j', request); const wrappedCallback: | Callback< @@ -2950,7 +2986,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runTask request %j', request); const wrappedCallback: | Callback< @@ -3100,7 +3138,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tasks.v2beta2.IListQueuesRequest, @@ -3197,7 +3237,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listQueues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueues stream %j', request); return this.descriptors.page.listQueues.createStream( this.innerApiCalls.listQueues as GaxCall, @@ -3276,7 +3318,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listQueues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueues iterate %j', request); return this.descriptors.page.listQueues.asyncIterate( this.innerApiCalls['listQueues'] as GaxCall, @@ -3410,7 +3454,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tasks.v2beta2.IListTasksRequest, @@ -3505,7 +3551,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -3582,7 +3630,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, diff --git a/packages/google-cloud-tasks/esm/src/v2beta3/cloud_tasks_client.ts b/packages/google-cloud-tasks/esm/src/v2beta3/cloud_tasks_client.ts index f107cdcb20e..7061a76ba95 100644 --- a/packages/google-cloud-tasks/esm/src/v2beta3/cloud_tasks_client.ts +++ b/packages/google-cloud-tasks/esm/src/v2beta3/cloud_tasks_client.ts @@ -528,7 +528,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQueue request %j', request); const wrappedCallback: | Callback< @@ -657,7 +659,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQueue request %j', request); const wrappedCallback: | Callback< @@ -793,7 +797,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ 'queue.name': request.queue!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQueue request %j', request); const wrappedCallback: | Callback< @@ -916,7 +922,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteQueue request %j', request); const wrappedCallback: | Callback< @@ -1032,7 +1040,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('purgeQueue request %j', request); const wrappedCallback: | Callback< @@ -1150,7 +1160,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseQueue request %j', request); const wrappedCallback: | Callback< @@ -1275,7 +1287,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeQueue request %j', request); const wrappedCallback: | Callback< @@ -1395,7 +1409,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1523,7 +1539,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1642,7 +1660,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1763,7 +1783,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -1926,7 +1948,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTask request %j', request); const wrappedCallback: | Callback< @@ -2041,7 +2065,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTask request %j', request); const wrappedCallback: | Callback< @@ -2190,7 +2216,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runTask request %j', request); const wrappedCallback: | Callback< @@ -2340,7 +2368,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tasks.v2beta3.IListQueuesRequest, @@ -2437,7 +2467,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listQueues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueues stream %j', request); return this.descriptors.page.listQueues.createStream( this.innerApiCalls.listQueues as GaxCall, @@ -2516,7 +2548,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listQueues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueues iterate %j', request); return this.descriptors.page.listQueues.asyncIterate( this.innerApiCalls['listQueues'] as GaxCall, @@ -2650,7 +2684,9 @@ export class CloudTasksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tasks.v2beta3.IListTasksRequest, @@ -2745,7 +2781,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -2822,7 +2860,9 @@ export class CloudTasksClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, diff --git a/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2.ts b/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2.ts index a3894062cc3..907e4586ef1 100644 --- a/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2.ts +++ b/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2.ts @@ -261,7 +261,9 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudTasksStub); client.close().then(() => { done(); @@ -320,7 +322,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetQueueRequest() ); @@ -351,7 +353,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetQueueRequest() ); @@ -398,7 +400,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetQueueRequest() ); @@ -426,7 +428,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetQueueRequest() ); @@ -447,7 +449,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateQueueRequest() ); @@ -478,7 +480,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateQueueRequest() ); @@ -525,7 +527,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateQueueRequest() ); @@ -556,7 +558,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateQueueRequest() ); @@ -577,7 +579,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.UpdateQueueRequest() ); @@ -609,7 +611,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.UpdateQueueRequest() ); @@ -657,7 +659,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.UpdateQueueRequest() ); @@ -689,7 +691,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.UpdateQueueRequest() ); @@ -711,7 +713,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteQueueRequest() ); @@ -742,7 +744,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteQueueRequest() ); @@ -789,7 +791,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteQueueRequest() ); @@ -820,7 +822,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteQueueRequest() ); @@ -841,7 +843,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PurgeQueueRequest() ); @@ -872,7 +874,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PurgeQueueRequest() ); @@ -919,7 +921,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PurgeQueueRequest() ); @@ -950,7 +952,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PurgeQueueRequest() ); @@ -971,7 +973,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PauseQueueRequest() ); @@ -1002,7 +1004,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PauseQueueRequest() ); @@ -1049,7 +1051,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PauseQueueRequest() ); @@ -1080,7 +1082,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.PauseQueueRequest() ); @@ -1101,7 +1103,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ResumeQueueRequest() ); @@ -1132,7 +1134,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ResumeQueueRequest() ); @@ -1179,7 +1181,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ResumeQueueRequest() ); @@ -1210,7 +1212,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ResumeQueueRequest() ); @@ -1231,7 +1233,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1262,7 +1264,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1309,7 +1311,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1340,7 +1342,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1361,7 +1363,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1392,7 +1394,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1439,7 +1441,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1470,7 +1472,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1491,7 +1493,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1523,7 +1525,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1570,7 +1572,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1601,7 +1603,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1622,7 +1624,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetTaskRequest() ); @@ -1653,7 +1655,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetTaskRequest() ); @@ -1700,7 +1702,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetTaskRequest() ); @@ -1728,7 +1730,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.GetTaskRequest() ); @@ -1749,7 +1751,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateTaskRequest() ); @@ -1780,7 +1782,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateTaskRequest() ); @@ -1827,7 +1829,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateTaskRequest() ); @@ -1858,7 +1860,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.CreateTaskRequest() ); @@ -1879,7 +1881,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteTaskRequest() ); @@ -1910,7 +1912,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteTaskRequest() ); @@ -1957,7 +1959,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteTaskRequest() ); @@ -1988,7 +1990,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.DeleteTaskRequest() ); @@ -2009,7 +2011,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.RunTaskRequest() ); @@ -2040,7 +2042,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.RunTaskRequest() ); @@ -2087,7 +2089,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.RunTaskRequest() ); @@ -2115,7 +2117,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.RunTaskRequest() ); @@ -2136,7 +2138,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListQueuesRequest() ); @@ -2169,7 +2171,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListQueuesRequest() ); @@ -2218,7 +2220,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListQueuesRequest() ); @@ -2249,7 +2251,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListQueuesRequest() ); @@ -2300,7 +2302,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListQueuesRequest() ); @@ -2348,7 +2350,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListQueuesRequest() ); @@ -2391,7 +2393,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListQueuesRequest() ); @@ -2435,7 +2437,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListTasksRequest() ); @@ -2468,7 +2470,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListTasksRequest() ); @@ -2517,7 +2519,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListTasksRequest() ); @@ -2545,7 +2547,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListTasksRequest() ); @@ -2596,7 +2598,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListTasksRequest() ); @@ -2644,7 +2646,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListTasksRequest() ); @@ -2686,7 +2688,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2.ListTasksRequest() ); @@ -2728,7 +2730,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2758,7 +2760,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2802,7 +2804,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2837,7 +2839,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2885,7 +2887,7 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2932,7 +2934,9 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2980,7 +2984,9 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3020,7 +3026,9 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.queuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3085,7 +3093,9 @@ describe('v2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta2.ts b/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta2.ts index 4bfc638e359..79f89994d26 100644 --- a/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta2.ts +++ b/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta2.ts @@ -263,7 +263,9 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudTasksStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetQueueRequest() ); @@ -353,7 +355,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetQueueRequest() ); @@ -400,7 +402,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetQueueRequest() ); @@ -428,7 +430,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetQueueRequest() ); @@ -449,7 +451,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateQueueRequest() ); @@ -480,7 +482,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateQueueRequest() ); @@ -527,7 +529,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateQueueRequest() ); @@ -558,7 +560,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateQueueRequest() ); @@ -579,7 +581,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UpdateQueueRequest() ); @@ -611,7 +613,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UpdateQueueRequest() ); @@ -659,7 +661,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UpdateQueueRequest() ); @@ -691,7 +693,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UpdateQueueRequest() ); @@ -713,7 +715,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteQueueRequest() ); @@ -744,7 +746,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteQueueRequest() ); @@ -791,7 +793,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteQueueRequest() ); @@ -822,7 +824,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteQueueRequest() ); @@ -843,7 +845,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PurgeQueueRequest() ); @@ -874,7 +876,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PurgeQueueRequest() ); @@ -921,7 +923,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PurgeQueueRequest() ); @@ -952,7 +954,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PurgeQueueRequest() ); @@ -973,7 +975,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PauseQueueRequest() ); @@ -1004,7 +1006,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PauseQueueRequest() ); @@ -1051,7 +1053,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PauseQueueRequest() ); @@ -1082,7 +1084,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.PauseQueueRequest() ); @@ -1103,7 +1105,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ResumeQueueRequest() ); @@ -1134,7 +1136,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ResumeQueueRequest() ); @@ -1181,7 +1183,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ResumeQueueRequest() ); @@ -1212,7 +1214,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ResumeQueueRequest() ); @@ -1233,7 +1235,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UploadQueueYamlRequest() ); @@ -1250,7 +1252,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UploadQueueYamlRequest() ); @@ -1283,7 +1285,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UploadQueueYamlRequest() ); @@ -1300,7 +1302,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.UploadQueueYamlRequest() ); @@ -1316,7 +1318,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1347,7 +1349,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1394,7 +1396,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1425,7 +1427,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1446,7 +1448,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1477,7 +1479,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1524,7 +1526,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1555,7 +1557,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1576,7 +1578,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1608,7 +1610,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1655,7 +1657,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1686,7 +1688,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1707,7 +1709,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetTaskRequest() ); @@ -1738,7 +1740,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetTaskRequest() ); @@ -1785,7 +1787,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetTaskRequest() ); @@ -1813,7 +1815,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.GetTaskRequest() ); @@ -1834,7 +1836,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateTaskRequest() ); @@ -1865,7 +1867,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateTaskRequest() ); @@ -1912,7 +1914,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateTaskRequest() ); @@ -1943,7 +1945,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CreateTaskRequest() ); @@ -1964,7 +1966,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteTaskRequest() ); @@ -1995,7 +1997,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteTaskRequest() ); @@ -2042,7 +2044,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteTaskRequest() ); @@ -2073,7 +2075,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.DeleteTaskRequest() ); @@ -2094,7 +2096,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.LeaseTasksRequest() ); @@ -2125,7 +2127,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.LeaseTasksRequest() ); @@ -2172,7 +2174,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.LeaseTasksRequest() ); @@ -2203,7 +2205,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.LeaseTasksRequest() ); @@ -2224,7 +2226,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest() ); @@ -2255,7 +2257,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest() ); @@ -2302,7 +2304,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest() ); @@ -2333,7 +2335,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest() ); @@ -2354,7 +2356,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RenewLeaseRequest() ); @@ -2385,7 +2387,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RenewLeaseRequest() ); @@ -2432,7 +2434,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RenewLeaseRequest() ); @@ -2463,7 +2465,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RenewLeaseRequest() ); @@ -2484,7 +2486,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CancelLeaseRequest() ); @@ -2515,7 +2517,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CancelLeaseRequest() ); @@ -2562,7 +2564,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CancelLeaseRequest() ); @@ -2593,7 +2595,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.CancelLeaseRequest() ); @@ -2614,7 +2616,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RunTaskRequest() ); @@ -2645,7 +2647,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RunTaskRequest() ); @@ -2692,7 +2694,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RunTaskRequest() ); @@ -2720,7 +2722,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.RunTaskRequest() ); @@ -2741,7 +2743,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListQueuesRequest() ); @@ -2774,7 +2776,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListQueuesRequest() ); @@ -2823,7 +2825,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListQueuesRequest() ); @@ -2854,7 +2856,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListQueuesRequest() ); @@ -2908,7 +2910,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListQueuesRequest() ); @@ -2959,7 +2961,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListQueuesRequest() ); @@ -3002,7 +3004,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListQueuesRequest() ); @@ -3046,7 +3048,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListTasksRequest() ); @@ -3079,7 +3081,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListTasksRequest() ); @@ -3128,7 +3130,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListTasksRequest() ); @@ -3156,7 +3158,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListTasksRequest() ); @@ -3210,7 +3212,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListTasksRequest() ); @@ -3261,7 +3263,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListTasksRequest() ); @@ -3303,7 +3305,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta2.ListTasksRequest() ); @@ -3345,7 +3347,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3375,7 +3377,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3419,7 +3421,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3454,7 +3456,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3502,7 +3504,7 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3549,7 +3551,9 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3597,7 +3601,9 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3637,7 +3643,9 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.queuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3702,7 +3710,9 @@ describe('v2beta2.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta3.ts b/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta3.ts index a383148925d..c823cca35e1 100644 --- a/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta3.ts +++ b/packages/google-cloud-tasks/esm/test/gapic_cloud_tasks_v2beta3.ts @@ -263,7 +263,9 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudTasksStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetQueueRequest() ); @@ -353,7 +355,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetQueueRequest() ); @@ -400,7 +402,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetQueueRequest() ); @@ -428,7 +430,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetQueueRequest() ); @@ -449,7 +451,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateQueueRequest() ); @@ -480,7 +482,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateQueueRequest() ); @@ -527,7 +529,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateQueueRequest() ); @@ -558,7 +560,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateQueueRequest() ); @@ -579,7 +581,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.UpdateQueueRequest() ); @@ -611,7 +613,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.UpdateQueueRequest() ); @@ -659,7 +661,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.UpdateQueueRequest() ); @@ -691,7 +693,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.UpdateQueueRequest() ); @@ -713,7 +715,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteQueueRequest() ); @@ -744,7 +746,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteQueueRequest() ); @@ -791,7 +793,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteQueueRequest() ); @@ -822,7 +824,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteQueueRequest() ); @@ -843,7 +845,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PurgeQueueRequest() ); @@ -874,7 +876,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PurgeQueueRequest() ); @@ -921,7 +923,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PurgeQueueRequest() ); @@ -952,7 +954,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PurgeQueueRequest() ); @@ -973,7 +975,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PauseQueueRequest() ); @@ -1004,7 +1006,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PauseQueueRequest() ); @@ -1051,7 +1053,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PauseQueueRequest() ); @@ -1082,7 +1084,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.PauseQueueRequest() ); @@ -1103,7 +1105,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ResumeQueueRequest() ); @@ -1134,7 +1136,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ResumeQueueRequest() ); @@ -1181,7 +1183,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ResumeQueueRequest() ); @@ -1212,7 +1214,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ResumeQueueRequest() ); @@ -1233,7 +1235,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1264,7 +1266,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1311,7 +1313,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1342,7 +1344,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1363,7 +1365,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1394,7 +1396,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1441,7 +1443,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1472,7 +1474,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1493,7 +1495,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1525,7 +1527,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1572,7 +1574,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1603,7 +1605,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1624,7 +1626,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetTaskRequest() ); @@ -1655,7 +1657,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetTaskRequest() ); @@ -1702,7 +1704,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetTaskRequest() ); @@ -1730,7 +1732,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.GetTaskRequest() ); @@ -1751,7 +1753,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateTaskRequest() ); @@ -1782,7 +1784,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateTaskRequest() ); @@ -1829,7 +1831,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateTaskRequest() ); @@ -1860,7 +1862,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.CreateTaskRequest() ); @@ -1881,7 +1883,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteTaskRequest() ); @@ -1912,7 +1914,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteTaskRequest() ); @@ -1959,7 +1961,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteTaskRequest() ); @@ -1990,7 +1992,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.DeleteTaskRequest() ); @@ -2011,7 +2013,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.RunTaskRequest() ); @@ -2042,7 +2044,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.RunTaskRequest() ); @@ -2089,7 +2091,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.RunTaskRequest() ); @@ -2117,7 +2119,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.RunTaskRequest() ); @@ -2138,7 +2140,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListQueuesRequest() ); @@ -2171,7 +2173,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListQueuesRequest() ); @@ -2220,7 +2222,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListQueuesRequest() ); @@ -2251,7 +2253,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListQueuesRequest() ); @@ -2305,7 +2307,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListQueuesRequest() ); @@ -2356,7 +2358,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListQueuesRequest() ); @@ -2399,7 +2401,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListQueuesRequest() ); @@ -2443,7 +2445,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListTasksRequest() ); @@ -2476,7 +2478,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListTasksRequest() ); @@ -2525,7 +2527,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListTasksRequest() ); @@ -2553,7 +2555,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListTasksRequest() ); @@ -2607,7 +2609,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListTasksRequest() ); @@ -2658,7 +2660,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListTasksRequest() ); @@ -2700,7 +2702,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tasks.v2beta3.ListTasksRequest() ); @@ -2742,7 +2744,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2772,7 +2774,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2816,7 +2818,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2851,7 +2853,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2899,7 +2901,7 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2946,7 +2948,9 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2994,7 +2998,9 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3034,7 +3040,9 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.queuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3099,7 +3107,9 @@ describe('v2beta3.CloudTasksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json index 9f5fd6ab316..d826ab0152f 100644 --- a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.2", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json index 9f5fd6ab316..d826ab0152f 100644 --- a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.2", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json index 439a8a6915e..37ace2fb8cb 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.2", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json index 4e241d71d4e..7ad4252b809 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.2", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json index b2c37151097..1e1966d4ac3 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.2", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json index f743bdda5d1..3b66251395c 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.2", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/tsconfig.json b/packages/google-cloud-tasks/tsconfig.json index d852be2cdc1..faaea2a7e80 100644 --- a/packages/google-cloud-tasks/tsconfig.json +++ b/packages/google-cloud-tasks/tsconfig.json @@ -23,9 +23,8 @@ "esm/src/**/*.ts", "esm/test/*.ts", "esm/test/**/*.ts", - "esm/system-test/*.ts", "esm/src/**/*.json", - "protos/protos.json", + "esm/system-test/*.ts", "esm/src/*.cjs" ] } diff --git a/packages/google-cloud-telcoautomation/package.json b/packages/google-cloud-telcoautomation/package.json index 4aee340451f..09428c6243d 100644 --- a/packages/google-cloud-telcoautomation/package.json +++ b/packages/google-cloud-telcoautomation/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json b/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json index b5dc4994036..4f95fc228f7 100644 --- a/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json +++ b/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-telcoautomation", - "version": "0.3.1", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json b/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json index 54b49e26404..8f23e689ff9 100644 --- a/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json +++ b/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-telcoautomation", - "version": "0.3.1", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-telcoautomation/src/v1/telco_automation_client.ts b/packages/google-cloud-telcoautomation/src/v1/telco_automation_client.ts index e75eda6baea..82d7e7da282 100644 --- a/packages/google-cloud-telcoautomation/src/v1/telco_automation_client.ts +++ b/packages/google-cloud-telcoautomation/src/v1/telco_automation_client.ts @@ -691,7 +691,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrchestrationCluster request %j', request); const wrappedCallback: | Callback< @@ -810,7 +812,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEdgeSlm request %j', request); const wrappedCallback: | Callback< @@ -938,7 +942,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1066,7 +1072,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ 'blueprint.name': request.blueprint!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1192,7 +1200,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1320,7 +1330,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1446,7 +1458,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('approveBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1571,7 +1585,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('proposeBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1696,7 +1712,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rejectBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1823,7 +1841,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('discardBlueprintChanges request %j', request); const wrappedCallback: | Callback< @@ -1948,7 +1968,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPublicBlueprint request %j', request); const wrappedCallback: | Callback< @@ -2079,7 +2101,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDeployment request %j', request); const wrappedCallback: | Callback< @@ -2207,7 +2231,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ 'deployment.name': request.deployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDeployment request %j', request); const wrappedCallback: | Callback< @@ -2334,7 +2360,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployment request %j', request); const wrappedCallback: | Callback< @@ -2460,7 +2488,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeDeployment request %j', request); const wrappedCallback: | Callback< @@ -2587,7 +2617,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('discardDeploymentChanges request %j', request); const wrappedCallback: | Callback< @@ -2712,7 +2744,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('applyDeployment request %j', request); const wrappedCallback: | Callback< @@ -2837,7 +2871,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeDeploymentStatus request %j', request); const wrappedCallback: | Callback< @@ -2965,7 +3001,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rollbackDeployment request %j', request); const wrappedCallback: | Callback< @@ -3090,7 +3128,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHydratedDeployment request %j', request); const wrappedCallback: | Callback< @@ -3218,7 +3258,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ 'hydrated_deployment.name': request.hydratedDeployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateHydratedDeployment request %j', request); const wrappedCallback: | Callback< @@ -3343,7 +3385,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('applyHydratedDeployment request %j', request); const wrappedCallback: | Callback< @@ -3495,7 +3539,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3676,7 +3722,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3863,7 +3911,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4044,7 +4094,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4211,7 +4263,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListOrchestrationClustersRequest, @@ -4281,7 +4335,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listOrchestrationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrchestrationClusters stream %j', request); return this.descriptors.page.listOrchestrationClusters.createStream( this.innerApiCalls.listOrchestrationClusters as GaxCall, @@ -4333,7 +4389,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listOrchestrationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrchestrationClusters iterate %j', request); return this.descriptors.page.listOrchestrationClusters.asyncIterate( this.innerApiCalls['listOrchestrationClusters'] as GaxCall, @@ -4440,7 +4498,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListEdgeSlmsRequest, @@ -4510,7 +4570,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listEdgeSlms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEdgeSlms stream %j', request); return this.descriptors.page.listEdgeSlms.createStream( this.innerApiCalls.listEdgeSlms as GaxCall, @@ -4562,7 +4624,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listEdgeSlms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEdgeSlms iterate %j', request); return this.descriptors.page.listEdgeSlms.asyncIterate( this.innerApiCalls['listEdgeSlms'] as GaxCall, @@ -4671,7 +4735,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListBlueprintsRequest, @@ -4743,7 +4809,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprints stream %j', request); return this.descriptors.page.listBlueprints.createStream( this.innerApiCalls.listBlueprints as GaxCall, @@ -4797,7 +4865,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprints iterate %j', request); return this.descriptors.page.listBlueprints.asyncIterate( this.innerApiCalls['listBlueprints'] as GaxCall, @@ -4900,7 +4970,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListBlueprintRevisionsRequest, @@ -4966,7 +5038,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprintRevisions stream %j', request); return this.descriptors.page.listBlueprintRevisions.createStream( this.innerApiCalls.listBlueprintRevisions as GaxCall, @@ -5014,7 +5088,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprintRevisions iterate %j', request); return this.descriptors.page.listBlueprintRevisions.asyncIterate( this.innerApiCalls['listBlueprintRevisions'] as GaxCall, @@ -5128,7 +5204,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.ISearchBlueprintRevisionsRequest, @@ -5205,7 +5283,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchBlueprintRevisions stream %j', request); return this.descriptors.page.searchBlueprintRevisions.createStream( this.innerApiCalls.searchBlueprintRevisions as GaxCall, @@ -5264,7 +5344,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchBlueprintRevisions iterate %j', request); return this.descriptors.page.searchBlueprintRevisions.asyncIterate( this.innerApiCalls['searchBlueprintRevisions'] as GaxCall, @@ -5379,7 +5461,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.ISearchDeploymentRevisionsRequest, @@ -5457,7 +5541,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDeploymentRevisions stream %j', request); return this.descriptors.page.searchDeploymentRevisions.createStream( this.innerApiCalls.searchDeploymentRevisions as GaxCall, @@ -5517,7 +5603,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDeploymentRevisions iterate %j', request); return this.descriptors.page.searchDeploymentRevisions.asyncIterate( this.innerApiCalls['searchDeploymentRevisions'] as GaxCall, @@ -5623,7 +5711,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListPublicBlueprintsRequest, @@ -5691,7 +5781,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listPublicBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPublicBlueprints stream %j', request); return this.descriptors.page.listPublicBlueprints.createStream( this.innerApiCalls.listPublicBlueprints as GaxCall, @@ -5741,7 +5833,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listPublicBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPublicBlueprints iterate %j', request); return this.descriptors.page.listPublicBlueprints.asyncIterate( this.innerApiCalls['listPublicBlueprints'] as GaxCall, @@ -5850,7 +5944,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListDeploymentsRequest, @@ -5922,7 +6018,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments stream %j', request); return this.descriptors.page.listDeployments.createStream( this.innerApiCalls.listDeployments as GaxCall, @@ -5976,7 +6074,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments iterate %j', request); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, @@ -6079,7 +6179,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListDeploymentRevisionsRequest, @@ -6145,7 +6247,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeploymentRevisions stream %j', request); return this.descriptors.page.listDeploymentRevisions.createStream( this.innerApiCalls.listDeploymentRevisions as GaxCall, @@ -6193,7 +6297,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeploymentRevisions iterate %j', request); return this.descriptors.page.listDeploymentRevisions.asyncIterate( this.innerApiCalls['listDeploymentRevisions'] as GaxCall, @@ -6299,7 +6405,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1.IListHydratedDeploymentsRequest, @@ -6368,7 +6476,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listHydratedDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHydratedDeployments stream %j', request); return this.descriptors.page.listHydratedDeployments.createStream( this.innerApiCalls.listHydratedDeployments as GaxCall, @@ -6419,7 +6529,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listHydratedDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHydratedDeployments iterate %j', request); return this.descriptors.page.listHydratedDeployments.asyncIterate( this.innerApiCalls['listHydratedDeployments'] as GaxCall, @@ -6599,7 +6711,7 @@ export class TelcoAutomationClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-telcoautomation/src/v1alpha1/telco_automation_client.ts b/packages/google-cloud-telcoautomation/src/v1alpha1/telco_automation_client.ts index 466879de74e..f1087bbdbd6 100644 --- a/packages/google-cloud-telcoautomation/src/v1alpha1/telco_automation_client.ts +++ b/packages/google-cloud-telcoautomation/src/v1alpha1/telco_automation_client.ts @@ -692,7 +692,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrchestrationCluster request %j', request); const wrappedCallback: | Callback< @@ -817,7 +819,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEdgeSlm request %j', request); const wrappedCallback: | Callback< @@ -948,7 +952,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1076,7 +1082,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ 'blueprint.name': request.blueprint!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1208,7 +1216,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1336,7 +1346,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1462,7 +1474,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('approveBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1587,7 +1601,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('proposeBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1712,7 +1728,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rejectBlueprint request %j', request); const wrappedCallback: | Callback< @@ -1839,7 +1857,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('discardBlueprintChanges request %j', request); const wrappedCallback: | Callback< @@ -1964,7 +1984,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPublicBlueprint request %j', request); const wrappedCallback: | Callback< @@ -2095,7 +2117,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDeployment request %j', request); const wrappedCallback: | Callback< @@ -2223,7 +2247,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ 'deployment.name': request.deployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDeployment request %j', request); const wrappedCallback: | Callback< @@ -2356,7 +2382,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployment request %j', request); const wrappedCallback: | Callback< @@ -2482,7 +2510,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeDeployment request %j', request); const wrappedCallback: | Callback< @@ -2609,7 +2639,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('discardDeploymentChanges request %j', request); const wrappedCallback: | Callback< @@ -2734,7 +2766,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('applyDeployment request %j', request); const wrappedCallback: | Callback< @@ -2859,7 +2893,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeDeploymentStatus request %j', request); const wrappedCallback: | Callback< @@ -2987,7 +3023,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rollbackDeployment request %j', request); const wrappedCallback: | Callback< @@ -3112,7 +3150,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHydratedDeployment request %j', request); const wrappedCallback: | Callback< @@ -3240,7 +3280,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ 'hydrated_deployment.name': request.hydratedDeployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateHydratedDeployment request %j', request); const wrappedCallback: | Callback< @@ -3365,7 +3407,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('applyHydratedDeployment request %j', request); const wrappedCallback: | Callback< @@ -3517,7 +3561,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3698,7 +3744,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3885,7 +3933,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4066,7 +4116,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4233,7 +4285,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListOrchestrationClustersRequest, @@ -4303,7 +4357,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listOrchestrationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrchestrationClusters stream %j', request); return this.descriptors.page.listOrchestrationClusters.createStream( this.innerApiCalls.listOrchestrationClusters as GaxCall, @@ -4355,7 +4411,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listOrchestrationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrchestrationClusters iterate %j', request); return this.descriptors.page.listOrchestrationClusters.asyncIterate( this.innerApiCalls['listOrchestrationClusters'] as GaxCall, @@ -4462,7 +4520,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListEdgeSlmsRequest, @@ -4532,7 +4592,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listEdgeSlms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEdgeSlms stream %j', request); return this.descriptors.page.listEdgeSlms.createStream( this.innerApiCalls.listEdgeSlms as GaxCall, @@ -4584,7 +4646,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listEdgeSlms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEdgeSlms iterate %j', request); return this.descriptors.page.listEdgeSlms.asyncIterate( this.innerApiCalls['listEdgeSlms'] as GaxCall, @@ -4693,7 +4757,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListBlueprintsRequest, @@ -4765,7 +4831,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprints stream %j', request); return this.descriptors.page.listBlueprints.createStream( this.innerApiCalls.listBlueprints as GaxCall, @@ -4819,7 +4887,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprints iterate %j', request); return this.descriptors.page.listBlueprints.asyncIterate( this.innerApiCalls['listBlueprints'] as GaxCall, @@ -4922,7 +4992,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListBlueprintRevisionsRequest, @@ -4988,7 +5060,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprintRevisions stream %j', request); return this.descriptors.page.listBlueprintRevisions.createStream( this.innerApiCalls.listBlueprintRevisions as GaxCall, @@ -5036,7 +5110,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBlueprintRevisions iterate %j', request); return this.descriptors.page.listBlueprintRevisions.asyncIterate( this.innerApiCalls['listBlueprintRevisions'] as GaxCall, @@ -5150,7 +5226,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.ISearchBlueprintRevisionsRequest, @@ -5227,7 +5305,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchBlueprintRevisions stream %j', request); return this.descriptors.page.searchBlueprintRevisions.createStream( this.innerApiCalls.searchBlueprintRevisions as GaxCall, @@ -5286,7 +5366,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchBlueprintRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchBlueprintRevisions iterate %j', request); return this.descriptors.page.searchBlueprintRevisions.asyncIterate( this.innerApiCalls['searchBlueprintRevisions'] as GaxCall, @@ -5401,7 +5483,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.ISearchDeploymentRevisionsRequest, @@ -5479,7 +5563,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDeploymentRevisions stream %j', request); return this.descriptors.page.searchDeploymentRevisions.createStream( this.innerApiCalls.searchDeploymentRevisions as GaxCall, @@ -5539,7 +5625,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['searchDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDeploymentRevisions iterate %j', request); return this.descriptors.page.searchDeploymentRevisions.asyncIterate( this.innerApiCalls['searchDeploymentRevisions'] as GaxCall, @@ -5645,7 +5733,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListPublicBlueprintsRequest, @@ -5713,7 +5803,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listPublicBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPublicBlueprints stream %j', request); return this.descriptors.page.listPublicBlueprints.createStream( this.innerApiCalls.listPublicBlueprints as GaxCall, @@ -5763,7 +5855,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listPublicBlueprints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPublicBlueprints iterate %j', request); return this.descriptors.page.listPublicBlueprints.asyncIterate( this.innerApiCalls['listPublicBlueprints'] as GaxCall, @@ -5872,7 +5966,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListDeploymentsRequest, @@ -5944,7 +6040,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments stream %j', request); return this.descriptors.page.listDeployments.createStream( this.innerApiCalls.listDeployments as GaxCall, @@ -5998,7 +6096,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments iterate %j', request); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, @@ -6101,7 +6201,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListDeploymentRevisionsRequest, @@ -6167,7 +6269,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeploymentRevisions stream %j', request); return this.descriptors.page.listDeploymentRevisions.createStream( this.innerApiCalls.listDeploymentRevisions as GaxCall, @@ -6215,7 +6319,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listDeploymentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeploymentRevisions iterate %j', request); return this.descriptors.page.listDeploymentRevisions.asyncIterate( this.innerApiCalls['listDeploymentRevisions'] as GaxCall, @@ -6321,7 +6427,9 @@ export class TelcoAutomationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.telcoautomation.v1alpha1.IListHydratedDeploymentsRequest, @@ -6390,7 +6498,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listHydratedDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHydratedDeployments stream %j', request); return this.descriptors.page.listHydratedDeployments.createStream( this.innerApiCalls.listHydratedDeployments as GaxCall, @@ -6441,7 +6551,9 @@ export class TelcoAutomationClient { }); const defaultCallSettings = this._defaults['listHydratedDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHydratedDeployments iterate %j', request); return this.descriptors.page.listHydratedDeployments.asyncIterate( this.innerApiCalls['listHydratedDeployments'] as GaxCall, @@ -6621,7 +6733,7 @@ export class TelcoAutomationClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1.ts b/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1.ts index cd8f751af3b..665d41129cd 100644 --- a/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1.ts +++ b/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1.ts @@ -292,7 +292,9 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.telcoAutomationStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest() ); @@ -383,7 +385,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest() ); @@ -430,7 +432,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest() ); @@ -464,7 +466,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest() ); @@ -488,7 +490,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetEdgeSlmRequest() ); @@ -519,7 +521,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetEdgeSlmRequest() ); @@ -566,7 +568,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetEdgeSlmRequest() ); @@ -597,7 +599,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetEdgeSlmRequest() ); @@ -618,7 +620,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateBlueprintRequest() ); @@ -649,7 +651,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateBlueprintRequest() ); @@ -696,7 +698,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateBlueprintRequest() ); @@ -727,7 +729,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateBlueprintRequest() ); @@ -748,7 +750,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateBlueprintRequest() ); @@ -780,7 +782,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateBlueprintRequest() ); @@ -828,7 +830,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateBlueprintRequest() ); @@ -860,7 +862,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateBlueprintRequest() ); @@ -882,7 +884,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetBlueprintRequest() ); @@ -913,7 +915,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetBlueprintRequest() ); @@ -960,7 +962,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetBlueprintRequest() ); @@ -991,7 +993,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetBlueprintRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteBlueprintRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteBlueprintRequest() ); @@ -1090,7 +1092,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteBlueprintRequest() ); @@ -1121,7 +1123,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteBlueprintRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApproveBlueprintRequest() ); @@ -1173,7 +1175,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApproveBlueprintRequest() ); @@ -1220,7 +1222,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApproveBlueprintRequest() ); @@ -1251,7 +1253,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApproveBlueprintRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ProposeBlueprintRequest() ); @@ -1303,7 +1305,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ProposeBlueprintRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ProposeBlueprintRequest() ); @@ -1381,7 +1383,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ProposeBlueprintRequest() ); @@ -1402,7 +1404,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RejectBlueprintRequest() ); @@ -1433,7 +1435,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RejectBlueprintRequest() ); @@ -1480,7 +1482,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RejectBlueprintRequest() ); @@ -1511,7 +1513,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RejectBlueprintRequest() ); @@ -1532,7 +1534,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest() ); @@ -1564,7 +1566,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest() ); @@ -1611,7 +1613,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest() ); @@ -1645,7 +1647,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest() ); @@ -1669,7 +1671,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetPublicBlueprintRequest() ); @@ -1701,7 +1703,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetPublicBlueprintRequest() ); @@ -1748,7 +1750,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetPublicBlueprintRequest() ); @@ -1779,7 +1781,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetPublicBlueprintRequest() ); @@ -1800,7 +1802,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateDeploymentRequest() ); @@ -1831,7 +1833,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateDeploymentRequest() ); @@ -1878,7 +1880,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateDeploymentRequest() ); @@ -1909,7 +1911,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateDeploymentRequest() ); @@ -1930,7 +1932,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateDeploymentRequest() ); @@ -1962,7 +1964,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateDeploymentRequest() ); @@ -2010,7 +2012,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateDeploymentRequest() ); @@ -2042,7 +2044,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateDeploymentRequest() ); @@ -2064,7 +2066,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetDeploymentRequest() ); @@ -2095,7 +2097,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetDeploymentRequest() ); @@ -2142,7 +2144,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetDeploymentRequest() ); @@ -2173,7 +2175,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetDeploymentRequest() ); @@ -2194,7 +2196,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RemoveDeploymentRequest() ); @@ -2225,7 +2227,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RemoveDeploymentRequest() ); @@ -2272,7 +2274,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RemoveDeploymentRequest() ); @@ -2303,7 +2305,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RemoveDeploymentRequest() ); @@ -2324,7 +2326,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest() ); @@ -2356,7 +2358,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest() ); @@ -2403,7 +2405,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest() ); @@ -2437,7 +2439,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest() ); @@ -2461,7 +2463,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyDeploymentRequest() ); @@ -2492,7 +2494,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyDeploymentRequest() ); @@ -2539,7 +2541,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyDeploymentRequest() ); @@ -2570,7 +2572,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyDeploymentRequest() ); @@ -2591,7 +2593,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest() ); @@ -2623,7 +2625,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest() ); @@ -2670,7 +2672,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest() ); @@ -2704,7 +2706,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest() ); @@ -2728,7 +2730,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RollbackDeploymentRequest() ); @@ -2760,7 +2762,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RollbackDeploymentRequest() ); @@ -2807,7 +2809,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RollbackDeploymentRequest() ); @@ -2838,7 +2840,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.RollbackDeploymentRequest() ); @@ -2859,7 +2861,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest() ); @@ -2891,7 +2893,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest() ); @@ -2938,7 +2940,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest() ); @@ -2972,7 +2974,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest() ); @@ -2996,7 +2998,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest() ); @@ -3029,7 +3031,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest() ); @@ -3077,7 +3079,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest() ); @@ -3112,7 +3114,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest() ); @@ -3137,7 +3139,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest() ); @@ -3169,7 +3171,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest() ); @@ -3216,7 +3218,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest() ); @@ -3250,7 +3252,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest() ); @@ -3274,7 +3276,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest() ); @@ -3307,7 +3309,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest() ); @@ -3361,7 +3363,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest() ); @@ -3395,7 +3397,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest() ); @@ -3428,7 +3430,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3451,7 +3453,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3472,7 +3474,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest() ); @@ -3505,7 +3507,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest() ); @@ -3559,7 +3561,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest() ); @@ -3593,7 +3595,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest() ); @@ -3626,7 +3628,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3649,7 +3651,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3670,7 +3672,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateEdgeSlmRequest() ); @@ -3703,7 +3705,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateEdgeSlmRequest() ); @@ -3757,7 +3759,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateEdgeSlmRequest() ); @@ -3788,7 +3790,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.CreateEdgeSlmRequest() ); @@ -3821,7 +3823,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3843,7 +3845,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3864,7 +3866,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest() ); @@ -3897,7 +3899,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest() ); @@ -3951,7 +3953,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest() ); @@ -3982,7 +3984,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest() ); @@ -4015,7 +4017,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4037,7 +4039,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4058,7 +4060,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest() ); @@ -4098,7 +4100,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest() ); @@ -4155,7 +4157,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest() ); @@ -4189,7 +4191,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest() ); @@ -4258,7 +4260,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest() ); @@ -4316,7 +4318,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest() ); @@ -4370,7 +4372,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest() ); @@ -4417,7 +4419,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest() ); @@ -4456,7 +4458,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest() ); @@ -4511,7 +4513,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest() ); @@ -4542,7 +4544,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest() ); @@ -4602,7 +4604,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest() ); @@ -4653,7 +4655,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest() ); @@ -4702,7 +4704,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest() ); @@ -4744,7 +4746,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintsRequest() ); @@ -4783,7 +4785,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintsRequest() ); @@ -4838,7 +4840,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintsRequest() ); @@ -4869,7 +4871,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintsRequest() ); @@ -4930,7 +4932,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintsRequest() ); @@ -4980,7 +4982,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintsRequest() ); @@ -5029,7 +5031,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintsRequest() ); @@ -5072,7 +5074,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest() ); @@ -5112,7 +5114,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest() ); @@ -5167,7 +5169,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest() ); @@ -5201,7 +5203,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest() ); @@ -5268,7 +5270,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest() ); @@ -5324,7 +5326,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest() ); @@ -5377,7 +5379,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest() ); @@ -5424,7 +5426,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest() ); @@ -5464,7 +5466,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest() ); @@ -5519,7 +5521,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest() ); @@ -5553,7 +5555,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest() ); @@ -5620,7 +5622,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest() ); @@ -5676,7 +5678,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest() ); @@ -5729,7 +5731,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest() ); @@ -5776,7 +5778,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest() ); @@ -5816,7 +5818,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest() ); @@ -5871,7 +5873,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest() ); @@ -5905,7 +5907,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest() ); @@ -5972,7 +5974,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest() ); @@ -6028,7 +6030,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest() ); @@ -6082,7 +6084,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest() ); @@ -6129,7 +6131,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest() ); @@ -6169,7 +6171,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest() ); @@ -6226,7 +6228,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest() ); @@ -6257,7 +6259,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest() ); @@ -6320,7 +6322,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest() ); @@ -6372,7 +6374,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest() ); @@ -6422,7 +6424,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest() ); @@ -6465,7 +6467,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentsRequest() ); @@ -6504,7 +6506,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentsRequest() ); @@ -6559,7 +6561,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentsRequest() ); @@ -6590,7 +6592,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentsRequest() ); @@ -6651,7 +6653,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentsRequest() ); @@ -6701,7 +6703,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentsRequest() ); @@ -6751,7 +6753,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentsRequest() ); @@ -6794,7 +6796,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest() ); @@ -6834,7 +6836,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest() ); @@ -6889,7 +6891,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest() ); @@ -6923,7 +6925,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest() ); @@ -6990,7 +6992,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest() ); @@ -7046,7 +7048,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest() ); @@ -7100,7 +7102,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest() ); @@ -7147,7 +7149,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest() ); @@ -7187,7 +7189,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest() ); @@ -7244,7 +7246,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest() ); @@ -7278,7 +7280,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest() ); @@ -7347,7 +7349,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest() ); @@ -7405,7 +7407,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest() ); @@ -7459,7 +7461,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest() ); @@ -7505,7 +7507,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7535,7 +7537,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7579,7 +7581,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7614,7 +7616,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7662,7 +7664,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7703,7 +7705,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7782,7 +7784,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7862,7 +7864,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7958,8 +7960,7 @@ describe('v1.TelcoAutomationClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7978,7 +7979,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7987,8 +7988,7 @@ describe('v1.TelcoAutomationClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -8004,7 +8004,7 @@ describe('v1.TelcoAutomationClient', () => { }); describe('Path templates', () => { - describe('blueprint', () => { + describe('blueprint', async () => { const fakePath = '/rendered/path/blueprint'; const expectedParameters = { project: 'projectValue', @@ -8016,7 +8016,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.blueprintPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8081,7 +8081,7 @@ describe('v1.TelcoAutomationClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -8093,7 +8093,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8158,7 +8158,7 @@ describe('v1.TelcoAutomationClient', () => { }); }); - describe('edgeSlm', () => { + describe('edgeSlm', async () => { const fakePath = '/rendered/path/edgeSlm'; const expectedParameters = { project: 'projectValue', @@ -8169,7 +8169,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.edgeSlmPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8222,7 +8222,7 @@ describe('v1.TelcoAutomationClient', () => { }); }); - describe('hydratedDeployment', () => { + describe('hydratedDeployment', async () => { const fakePath = '/rendered/path/hydratedDeployment'; const expectedParameters = { project: 'projectValue', @@ -8235,7 +8235,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hydratedDeploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8331,7 +8331,7 @@ describe('v1.TelcoAutomationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8341,7 +8341,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8380,7 +8380,7 @@ describe('v1.TelcoAutomationClient', () => { }); }); - describe('orchestrationCluster', () => { + describe('orchestrationCluster', async () => { const fakePath = '/rendered/path/orchestrationCluster'; const expectedParameters = { project: 'projectValue', @@ -8391,7 +8391,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orchestrationClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8461,7 +8461,7 @@ describe('v1.TelcoAutomationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -8470,7 +8470,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8499,7 +8499,7 @@ describe('v1.TelcoAutomationClient', () => { }); }); - describe('publicBlueprint', () => { + describe('publicBlueprint', async () => { const fakePath = '/rendered/path/publicBlueprint'; const expectedParameters = { project: 'projectValue', @@ -8510,7 +8510,7 @@ describe('v1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.publicBlueprintPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1alpha1.ts b/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1alpha1.ts index 3797b0348db..892e39aac0b 100644 --- a/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1alpha1.ts +++ b/packages/google-cloud-telcoautomation/test/gapic_telco_automation_v1alpha1.ts @@ -294,7 +294,9 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.telcoAutomationStub); client.close().then(() => { done(); @@ -353,7 +355,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetOrchestrationClusterRequest() ); @@ -385,7 +387,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetOrchestrationClusterRequest() ); @@ -432,7 +434,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetOrchestrationClusterRequest() ); @@ -466,7 +468,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetOrchestrationClusterRequest() ); @@ -490,7 +492,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetEdgeSlmRequest() ); @@ -521,7 +523,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetEdgeSlmRequest() ); @@ -568,7 +570,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetEdgeSlmRequest() ); @@ -599,7 +601,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetEdgeSlmRequest() ); @@ -620,7 +622,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateBlueprintRequest() ); @@ -651,7 +653,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateBlueprintRequest() ); @@ -698,7 +700,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateBlueprintRequest() ); @@ -729,7 +731,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateBlueprintRequest() ); @@ -750,7 +752,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateBlueprintRequest() ); @@ -782,7 +784,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateBlueprintRequest() ); @@ -830,7 +832,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateBlueprintRequest() ); @@ -862,7 +864,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateBlueprintRequest() ); @@ -884,7 +886,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetBlueprintRequest() ); @@ -915,7 +917,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetBlueprintRequest() ); @@ -962,7 +964,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetBlueprintRequest() ); @@ -993,7 +995,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetBlueprintRequest() ); @@ -1014,7 +1016,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteBlueprintRequest() ); @@ -1045,7 +1047,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteBlueprintRequest() ); @@ -1092,7 +1094,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteBlueprintRequest() ); @@ -1123,7 +1125,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteBlueprintRequest() ); @@ -1144,7 +1146,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApproveBlueprintRequest() ); @@ -1175,7 +1177,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApproveBlueprintRequest() ); @@ -1222,7 +1224,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApproveBlueprintRequest() ); @@ -1253,7 +1255,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApproveBlueprintRequest() ); @@ -1274,7 +1276,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ProposeBlueprintRequest() ); @@ -1305,7 +1307,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ProposeBlueprintRequest() ); @@ -1352,7 +1354,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ProposeBlueprintRequest() ); @@ -1383,7 +1385,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ProposeBlueprintRequest() ); @@ -1404,7 +1406,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RejectBlueprintRequest() ); @@ -1435,7 +1437,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RejectBlueprintRequest() ); @@ -1482,7 +1484,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RejectBlueprintRequest() ); @@ -1513,7 +1515,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RejectBlueprintRequest() ); @@ -1534,7 +1536,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardBlueprintChangesRequest() ); @@ -1566,7 +1568,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardBlueprintChangesRequest() ); @@ -1613,7 +1615,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardBlueprintChangesRequest() ); @@ -1647,7 +1649,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardBlueprintChangesRequest() ); @@ -1671,7 +1673,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetPublicBlueprintRequest() ); @@ -1703,7 +1705,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetPublicBlueprintRequest() ); @@ -1750,7 +1752,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetPublicBlueprintRequest() ); @@ -1781,7 +1783,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetPublicBlueprintRequest() ); @@ -1802,7 +1804,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateDeploymentRequest() ); @@ -1833,7 +1835,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateDeploymentRequest() ); @@ -1880,7 +1882,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateDeploymentRequest() ); @@ -1911,7 +1913,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateDeploymentRequest() ); @@ -1932,7 +1934,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateDeploymentRequest() ); @@ -1964,7 +1966,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateDeploymentRequest() ); @@ -2012,7 +2014,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateDeploymentRequest() ); @@ -2044,7 +2046,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateDeploymentRequest() ); @@ -2066,7 +2068,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetDeploymentRequest() ); @@ -2097,7 +2099,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetDeploymentRequest() ); @@ -2144,7 +2146,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetDeploymentRequest() ); @@ -2175,7 +2177,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetDeploymentRequest() ); @@ -2196,7 +2198,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RemoveDeploymentRequest() ); @@ -2227,7 +2229,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RemoveDeploymentRequest() ); @@ -2274,7 +2276,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RemoveDeploymentRequest() ); @@ -2305,7 +2307,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RemoveDeploymentRequest() ); @@ -2326,7 +2328,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardDeploymentChangesRequest() ); @@ -2358,7 +2360,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardDeploymentChangesRequest() ); @@ -2405,7 +2407,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardDeploymentChangesRequest() ); @@ -2439,7 +2441,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DiscardDeploymentChangesRequest() ); @@ -2463,7 +2465,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyDeploymentRequest() ); @@ -2494,7 +2496,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyDeploymentRequest() ); @@ -2541,7 +2543,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyDeploymentRequest() ); @@ -2572,7 +2574,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyDeploymentRequest() ); @@ -2593,7 +2595,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ComputeDeploymentStatusRequest() ); @@ -2625,7 +2627,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ComputeDeploymentStatusRequest() ); @@ -2672,7 +2674,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ComputeDeploymentStatusRequest() ); @@ -2706,7 +2708,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ComputeDeploymentStatusRequest() ); @@ -2730,7 +2732,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RollbackDeploymentRequest() ); @@ -2762,7 +2764,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RollbackDeploymentRequest() ); @@ -2809,7 +2811,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RollbackDeploymentRequest() ); @@ -2840,7 +2842,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.RollbackDeploymentRequest() ); @@ -2861,7 +2863,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetHydratedDeploymentRequest() ); @@ -2893,7 +2895,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetHydratedDeploymentRequest() ); @@ -2940,7 +2942,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetHydratedDeploymentRequest() ); @@ -2974,7 +2976,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.GetHydratedDeploymentRequest() ); @@ -2998,7 +3000,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateHydratedDeploymentRequest() ); @@ -3031,7 +3033,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateHydratedDeploymentRequest() ); @@ -3079,7 +3081,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateHydratedDeploymentRequest() ); @@ -3114,7 +3116,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.UpdateHydratedDeploymentRequest() ); @@ -3139,7 +3141,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyHydratedDeploymentRequest() ); @@ -3171,7 +3173,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyHydratedDeploymentRequest() ); @@ -3218,7 +3220,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyHydratedDeploymentRequest() ); @@ -3252,7 +3254,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ApplyHydratedDeploymentRequest() ); @@ -3276,7 +3278,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateOrchestrationClusterRequest() ); @@ -3309,7 +3311,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateOrchestrationClusterRequest() ); @@ -3363,7 +3365,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateOrchestrationClusterRequest() ); @@ -3397,7 +3399,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateOrchestrationClusterRequest() ); @@ -3430,7 +3432,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3453,7 +3455,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3474,7 +3476,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteOrchestrationClusterRequest() ); @@ -3507,7 +3509,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteOrchestrationClusterRequest() ); @@ -3561,7 +3563,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteOrchestrationClusterRequest() ); @@ -3595,7 +3597,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteOrchestrationClusterRequest() ); @@ -3628,7 +3630,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3651,7 +3653,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3672,7 +3674,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateEdgeSlmRequest() ); @@ -3705,7 +3707,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateEdgeSlmRequest() ); @@ -3759,7 +3761,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateEdgeSlmRequest() ); @@ -3790,7 +3792,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.CreateEdgeSlmRequest() ); @@ -3823,7 +3825,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3845,7 +3847,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3866,7 +3868,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteEdgeSlmRequest() ); @@ -3899,7 +3901,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteEdgeSlmRequest() ); @@ -3953,7 +3955,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteEdgeSlmRequest() ); @@ -3984,7 +3986,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.DeleteEdgeSlmRequest() ); @@ -4017,7 +4019,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4039,7 +4041,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4060,7 +4062,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListOrchestrationClustersRequest() ); @@ -4100,7 +4102,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListOrchestrationClustersRequest() ); @@ -4157,7 +4159,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListOrchestrationClustersRequest() ); @@ -4191,7 +4193,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListOrchestrationClustersRequest() ); @@ -4260,7 +4262,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListOrchestrationClustersRequest() ); @@ -4318,7 +4320,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListOrchestrationClustersRequest() ); @@ -4372,7 +4374,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListOrchestrationClustersRequest() ); @@ -4419,7 +4421,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListEdgeSlmsRequest() ); @@ -4458,7 +4460,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListEdgeSlmsRequest() ); @@ -4515,7 +4517,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListEdgeSlmsRequest() ); @@ -4546,7 +4548,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListEdgeSlmsRequest() ); @@ -4607,7 +4609,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListEdgeSlmsRequest() ); @@ -4659,7 +4661,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListEdgeSlmsRequest() ); @@ -4709,7 +4711,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListEdgeSlmsRequest() ); @@ -4752,7 +4754,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintsRequest() ); @@ -4791,7 +4793,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintsRequest() ); @@ -4848,7 +4850,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintsRequest() ); @@ -4879,7 +4881,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintsRequest() ); @@ -4942,7 +4944,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintsRequest() ); @@ -4994,7 +4996,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintsRequest() ); @@ -5044,7 +5046,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintsRequest() ); @@ -5087,7 +5089,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintRevisionsRequest() ); @@ -5127,7 +5129,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintRevisionsRequest() ); @@ -5184,7 +5186,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintRevisionsRequest() ); @@ -5218,7 +5220,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintRevisionsRequest() ); @@ -5287,7 +5289,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintRevisionsRequest() ); @@ -5345,7 +5347,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintRevisionsRequest() ); @@ -5399,7 +5401,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListBlueprintRevisionsRequest() ); @@ -5446,7 +5448,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchBlueprintRevisionsRequest() ); @@ -5486,7 +5488,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchBlueprintRevisionsRequest() ); @@ -5543,7 +5545,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchBlueprintRevisionsRequest() ); @@ -5577,7 +5579,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchBlueprintRevisionsRequest() ); @@ -5646,7 +5648,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchBlueprintRevisionsRequest() ); @@ -5704,7 +5706,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchBlueprintRevisionsRequest() ); @@ -5758,7 +5760,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchBlueprintRevisionsRequest() ); @@ -5805,7 +5807,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchDeploymentRevisionsRequest() ); @@ -5845,7 +5847,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchDeploymentRevisionsRequest() ); @@ -5902,7 +5904,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchDeploymentRevisionsRequest() ); @@ -5936,7 +5938,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchDeploymentRevisionsRequest() ); @@ -6005,7 +6007,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchDeploymentRevisionsRequest() ); @@ -6063,7 +6065,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchDeploymentRevisionsRequest() ); @@ -6117,7 +6119,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.SearchDeploymentRevisionsRequest() ); @@ -6164,7 +6166,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListPublicBlueprintsRequest() ); @@ -6204,7 +6206,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListPublicBlueprintsRequest() ); @@ -6261,7 +6263,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListPublicBlueprintsRequest() ); @@ -6292,7 +6294,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListPublicBlueprintsRequest() ); @@ -6355,7 +6357,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListPublicBlueprintsRequest() ); @@ -6407,7 +6409,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListPublicBlueprintsRequest() ); @@ -6457,7 +6459,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListPublicBlueprintsRequest() ); @@ -6500,7 +6502,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentsRequest() ); @@ -6539,7 +6541,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentsRequest() ); @@ -6596,7 +6598,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentsRequest() ); @@ -6627,7 +6629,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentsRequest() ); @@ -6690,7 +6692,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentsRequest() ); @@ -6742,7 +6744,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentsRequest() ); @@ -6792,7 +6794,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentsRequest() ); @@ -6835,7 +6837,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentRevisionsRequest() ); @@ -6875,7 +6877,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentRevisionsRequest() ); @@ -6932,7 +6934,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentRevisionsRequest() ); @@ -6966,7 +6968,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentRevisionsRequest() ); @@ -7035,7 +7037,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentRevisionsRequest() ); @@ -7093,7 +7095,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentRevisionsRequest() ); @@ -7147,7 +7149,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListDeploymentRevisionsRequest() ); @@ -7194,7 +7196,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListHydratedDeploymentsRequest() ); @@ -7234,7 +7236,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListHydratedDeploymentsRequest() ); @@ -7291,7 +7293,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListHydratedDeploymentsRequest() ); @@ -7325,7 +7327,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListHydratedDeploymentsRequest() ); @@ -7394,7 +7396,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListHydratedDeploymentsRequest() ); @@ -7452,7 +7454,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListHydratedDeploymentsRequest() ); @@ -7506,7 +7508,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.telcoautomation.v1alpha1.ListHydratedDeploymentsRequest() ); @@ -7552,7 +7554,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7582,7 +7584,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7626,7 +7628,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7661,7 +7663,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7709,7 +7711,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7750,7 +7752,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7829,7 +7831,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7909,7 +7911,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -8005,8 +8007,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -8025,7 +8026,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -8034,8 +8035,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -8051,7 +8051,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); describe('Path templates', () => { - describe('blueprint', () => { + describe('blueprint', async () => { const fakePath = '/rendered/path/blueprint'; const expectedParameters = { project: 'projectValue', @@ -8063,7 +8063,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.blueprintPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8128,7 +8128,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -8140,7 +8140,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8205,7 +8205,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); }); - describe('edgeSlm', () => { + describe('edgeSlm', async () => { const fakePath = '/rendered/path/edgeSlm'; const expectedParameters = { project: 'projectValue', @@ -8216,7 +8216,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.edgeSlmPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8269,7 +8269,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); }); - describe('hydratedDeployment', () => { + describe('hydratedDeployment', async () => { const fakePath = '/rendered/path/hydratedDeployment'; const expectedParameters = { project: 'projectValue', @@ -8282,7 +8282,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hydratedDeploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8378,7 +8378,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8388,7 +8388,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8427,7 +8427,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); }); - describe('orchestrationCluster', () => { + describe('orchestrationCluster', async () => { const fakePath = '/rendered/path/orchestrationCluster'; const expectedParameters = { project: 'projectValue', @@ -8438,7 +8438,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orchestrationClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8508,7 +8508,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -8517,7 +8517,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8546,7 +8546,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { }); }); - describe('publicBlueprint', () => { + describe('publicBlueprint', async () => { const fakePath = '/rendered/path/publicBlueprint'; const expectedParameters = { project: 'projectValue', @@ -8557,7 +8557,7 @@ describe('v1alpha1.TelcoAutomationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.publicBlueprintPathTemplate.render = sinon .stub() .returns(fakePath); From f4866dfa6ab481163150f54928a9857d2dfef948 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:30:26 -0700 Subject: [PATCH 28/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6190) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNvbnRhaW5lcmFuYWx5c2lzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWlhbS1jcmVkZW50aWFscy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWlhbS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWlkZW50aXR5LWFjY2Vzc2NvbnRleHRtYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtYWRkcmVzc3ZhbGlkYXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtYXJlYWluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtZmxlZXRlbmdpbmUtZGVsaXZlcnkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtZmxlZXRlbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtbWFwc3BsYXRmb3JtZGF0YXNldHMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGVvcHRpbWl6YXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtc29sYXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcmtldGluZ3BsYXRmb3JtLWFkbWluLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1vbml0b3JpbmctZGFzaGJvYXJkLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXByaXZhY3ktZGxwLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLWNzcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWFjY291bnRzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWNvbnZlcnNpb25zLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFzb3VyY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- .../src/v1/container_analysis_client.ts | 16 +- .../container_analysis_v1_beta1_client.ts | 20 +- .../src/v1beta1/grafeas_v1_beta1_client.ts | 84 ++- .../test/gapic_container_analysis_v1.ts | 48 +- ...pic_container_analysis_v1_beta1_v1beta1.ts | 44 +- .../test/gapic_grafeas_v1_beta1_v1beta1.ts | 142 ++-- packages/google-iam-credentials/package.json | 2 +- ...et_metadata.google.iam.credentials.v1.json | 2 +- ...et_metadata_google.iam.credentials.v1.json | 2 +- .../src/v1/i_a_m_credentials_client.ts | 16 +- .../test/gapic_i_a_m_credentials_v1.ts | 36 +- packages/google-iam/package.json | 2 +- .../v2/snippet_metadata.google.iam.v2.json | 2 +- .../v2/snippet_metadata_google.iam.v2.json | 2 +- .../v3/snippet_metadata_google.iam.v3.json | 2 +- packages/google-iam/src/v2/policies_client.ts | 30 +- .../src/v3/policy_bindings_client.ts | 42 +- ...incipal_access_boundary_policies_client.ts | 42 +- packages/google-iam/test/gapic_policies_v2.ts | 76 +- .../test/gapic_policy_bindings_v3.ts | 124 ++-- ...c_principal_access_boundary_policies_v3.ts | 124 ++-- .../package.json | 2 +- ...ogle.identity.accesscontextmanager.v1.json | 2 +- ...ogle.identity.accesscontextmanager.v1.json | 2 +- .../src/v1/access_context_manager_client.ts | 138 +++- .../test/gapic_access_context_manager_v1.ts | 330 ++++----- .../package.json | 2 +- ...data.google.maps.addressvalidation.v1.json | 2 +- ...data_google.maps.addressvalidation.v1.json | 2 +- .../src/v1/address_validation_client.ts | 8 +- .../test/gapic_address_validation_v1.ts | 20 +- .../google-maps-areainsights/package.json | 2 +- ..._metadata_google.maps.areainsights.v1.json | 2 +- .../src/v1/area_insights_client.ts | 4 +- .../test/gapic_area_insights_v1.ts | 16 +- .../package.json | 2 +- ...metadata_maps.fleetengine.delivery.v1.json | 2 +- .../src/v1/delivery_service_client.ts | 64 +- .../test/gapic_delivery_service_v1.ts | 128 ++-- packages/google-maps-fleetengine/package.json | 2 +- .../snippet_metadata_maps.fleetengine.v1.json | 2 +- .../src/v1/trip_service_client.ts | 16 +- .../src/v1/vehicle_service_client.ts | 18 +- .../test/gapic_trip_service_v1.ts | 64 +- .../test/gapic_vehicle_service_v1.ts | 72 +- .../google-maps-fleetengine/v1/package.json | 4 +- .../v1/src/v1/delivery_service_client.ts | 32 +- .../v1/test/gapic_delivery_service_v1.ts | 126 ++-- .../package.json | 2 +- ...a.google.maps.mapsplatformdatasets.v1.json | 2 +- ...a_google.maps.mapsplatformdatasets.v1.json | 2 +- ...gle.maps.mapsplatformdatasets.v1alpha.json | 2 +- ...gle.maps.mapsplatformdatasets.v1alpha.json | 2 +- .../src/v1/maps_platform_datasets_client.ts | 40 +- .../test/gapic_maps_platform_datasets_v1.ts | 68 +- packages/google-maps-places/package.json | 2 +- ...nippet_metadata.google.maps.places.v1.json | 2 +- ...nippet_metadata_google.maps.places.v1.json | 2 +- .../src/v1/places_client.ts | 20 +- .../test/gapic_places_v1.ts | 60 +- .../package.json | 2 +- ...data_google.maps.routeoptimization.v1.json | 2 +- .../src/v1/route_optimization_client.ts | 10 +- .../test/gapic_route_optimization_v1.ts | 38 +- packages/google-maps-routing/package.json | 2 +- ...ippet_metadata.google.maps.routing.v2.json | 2 +- ...ippet_metadata_google.maps.routing.v2.json | 2 +- .../src/v2/routes_client.ts | 8 +- .../test/gapic_routes_v2.ts | 22 +- packages/google-maps-solar/package.json | 2 +- ...snippet_metadata_google.maps.solar.v1.json | 2 +- .../google-maps-solar/src/v1/solar_client.ts | 12 +- .../google-maps-solar/test/gapic_solar_v1.ts | 28 +- .../package.json | 2 +- ...oogle.marketingplatform.admin.v1alpha.json | 2 +- .../marketingplatform_admin_service_client.ts | 28 +- ...marketingplatform_admin_service_v1alpha.ts | 62 +- .../google-monitoring-dashboard/package.json | 2 +- ...tadata.google.monitoring.dashboard.v1.json | 2 +- ...tadata_google.monitoring.dashboard.v1.json | 2 +- .../src/v1/dashboards_service_client.ts | 28 +- .../test/gapic_dashboards_service_v1.ts | 62 +- packages/google-privacy-dlp/package.json | 2 +- ...nippet_metadata.google.privacy.dlp.v2.json | 2 +- ...nippet_metadata_google.privacy.dlp.v2.json | 2 +- .../src/v2/dlp_service_client.ts | 316 ++++++--- .../test/gapic_dlp_service_v2.ts | 658 +++++++++--------- packages/google-shopping-css/package.json | 2 +- ...ippet_metadata_google.shopping.css.v1.json | 2 +- .../src/v1/account_labels_service_client.ts | 24 +- .../src/v1/accounts_service_client.ts | 20 +- .../v1/css_product_inputs_service_client.ts | 12 +- .../src/v1/css_products_service_client.ts | 16 +- .../test/gapic_account_labels_service_v1.ts | 58 +- .../test/gapic_accounts_service_v1.ts | 50 +- .../gapic_css_product_inputs_service_v1.ts | 44 +- .../test/gapic_css_products_service_v1.ts | 42 +- .../package.json | 2 +- ...gle.shopping.merchant.accounts.v1beta.json | 2 +- .../v1beta/account_issue_service_client.ts | 12 +- .../src/v1beta/account_tax_service_client.ts | 20 +- .../src/v1beta/accounts_service_client.ts | 40 +- .../autofeed_settings_service_client.ts | 8 +- .../automatic_improvements_service_client.ts | 8 +- .../business_identity_service_client.ts | 8 +- .../v1beta/business_info_service_client.ts | 8 +- .../email_preferences_service_client.ts | 8 +- .../src/v1beta/homepage_service_client.ts | 16 +- .../online_return_policy_service_client.ts | 16 +- .../src/v1beta/programs_service_client.ts | 24 +- .../src/v1beta/regions_service_client.ts | 28 +- .../shipping_settings_service_client.ts | 8 +- ..._service_agreement_state_service_client.ts | 8 +- .../v1beta/terms_of_service_service_client.ts | 12 +- .../src/v1beta/user_service_client.ts | 28 +- .../gapic_account_issue_service_v1beta.ts | 82 +-- .../test/gapic_account_tax_service_v1beta.ts | 98 +-- .../test/gapic_accounts_service_v1beta.ts | 128 ++-- .../gapic_autofeed_settings_service_v1beta.ts | 84 +-- ...c_automatic_improvements_service_v1beta.ts | 84 +-- .../gapic_business_identity_service_v1beta.ts | 84 +-- .../gapic_business_info_service_v1beta.ts | 84 +-- .../gapic_email_preferences_service_v1beta.ts | 84 +-- .../test/gapic_homepage_service_v1beta.ts | 100 +-- ...pic_online_return_policy_service_v1beta.ts | 90 +-- .../test/gapic_programs_service_v1beta.ts | 106 +-- .../test/gapic_regions_service_v1beta.ts | 114 +-- .../gapic_shipping_settings_service_v1beta.ts | 84 +-- ..._service_agreement_state_service_v1beta.ts | 84 +-- .../gapic_terms_of_service_service_v1beta.ts | 92 +-- .../test/gapic_user_service_v1beta.ts | 114 +-- .../package.json | 2 +- ....shopping.merchant.conversions.v1beta.json | 2 +- .../conversion_sources_service_client.ts | 32 +- ...gapic_conversion_sources_service_v1beta.ts | 66 +- .../package.json | 2 +- ....shopping.merchant.datasources.v1beta.json | 2 +- .../src/v1beta/data_sources_service_client.ts | 32 +- .../src/v1beta/file_uploads_service_client.ts | 4 +- .../test/gapic_data_sources_service_v1beta.ts | 70 +- .../test/gapic_file_uploads_service_v1beta.ts | 20 +- 141 files changed, 3214 insertions(+), 2484 deletions(-) diff --git a/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts b/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts index 56bb943a7d4..53cf78cb19f 100644 --- a/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts @@ -491,7 +491,9 @@ export class ContainerAnalysisClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -608,7 +610,9 @@ export class ContainerAnalysisClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -726,7 +730,9 @@ export class ContainerAnalysisClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -849,7 +855,9 @@ export class ContainerAnalysisClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVulnerabilityOccurrencesSummary request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts index 3fb61999e22..cfbb044d9ed 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts @@ -476,7 +476,9 @@ export class ContainerAnalysisV1Beta1Client { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -593,7 +595,9 @@ export class ContainerAnalysisV1Beta1Client { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -711,7 +715,9 @@ export class ContainerAnalysisV1Beta1Client { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -832,7 +838,9 @@ export class ContainerAnalysisV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generatePackagesSummary request %j', request); const wrappedCallback: | Callback< @@ -958,7 +966,9 @@ export class ContainerAnalysisV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('exportSBOM request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts b/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts index 69984ff75d7..69b2d460c84 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts @@ -490,7 +490,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOccurrence request %j', request); const wrappedCallback: | Callback< @@ -599,7 +601,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteOccurrence request %j', request); const wrappedCallback: | Callback< @@ -708,7 +712,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createOccurrence request %j', request); const wrappedCallback: | Callback< @@ -819,7 +825,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateOccurrences request %j', request); const wrappedCallback: | Callback< @@ -932,7 +940,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateOccurrence request %j', request); const wrappedCallback: | Callback< @@ -1040,7 +1050,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOccurrenceNote request %j', request); const wrappedCallback: | Callback< @@ -1147,7 +1159,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNote request %j', request); const wrappedCallback: | Callback< @@ -1254,7 +1268,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNote request %j', request); const wrappedCallback: | Callback< @@ -1365,7 +1381,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNote request %j', request); const wrappedCallback: | Callback< @@ -1474,7 +1492,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateNotes request %j', request); const wrappedCallback: | Callback< @@ -1585,7 +1605,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNote request %j', request); const wrappedCallback: | Callback< @@ -1708,7 +1730,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVulnerabilityOccurrencesSummary request %j', request); const wrappedCallback: | Callback< @@ -1836,7 +1860,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.grafeas.v1beta1.IListOccurrencesRequest, @@ -1902,7 +1928,9 @@ export class GrafeasV1Beta1Client { }); const defaultCallSettings = this._defaults['listOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOccurrences stream %j', request); return this.descriptors.page.listOccurrences.createStream( this.innerApiCalls.listOccurrences as GaxCall, @@ -1952,7 +1980,9 @@ export class GrafeasV1Beta1Client { }); const defaultCallSettings = this._defaults['listOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOccurrences iterate %j', request); return this.descriptors.page.listOccurrences.asyncIterate( this.innerApiCalls['listOccurrences'] as GaxCall, @@ -2049,7 +2079,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.grafeas.v1beta1.IListNotesRequest, @@ -2115,7 +2147,9 @@ export class GrafeasV1Beta1Client { }); const defaultCallSettings = this._defaults['listNotes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotes stream %j', request); return this.descriptors.page.listNotes.createStream( this.innerApiCalls.listNotes as GaxCall, @@ -2165,7 +2199,9 @@ export class GrafeasV1Beta1Client { }); const defaultCallSettings = this._defaults['listNotes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotes iterate %j', request); return this.descriptors.page.listNotes.asyncIterate( this.innerApiCalls['listNotes'] as GaxCall, @@ -2266,7 +2302,9 @@ export class GrafeasV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.grafeas.v1beta1.IListNoteOccurrencesRequest, @@ -2334,7 +2372,9 @@ export class GrafeasV1Beta1Client { }); const defaultCallSettings = this._defaults['listNoteOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNoteOccurrences stream %j', request); return this.descriptors.page.listNoteOccurrences.createStream( this.innerApiCalls.listNoteOccurrences as GaxCall, @@ -2384,7 +2424,9 @@ export class GrafeasV1Beta1Client { }); const defaultCallSettings = this._defaults['listNoteOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNoteOccurrences iterate %j', request); return this.descriptors.page.listNoteOccurrences.asyncIterate( this.innerApiCalls['listNoteOccurrences'] as GaxCall, diff --git a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1.ts b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1.ts index 96a93288531..8412d7fae5d 100644 --- a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1.ts +++ b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1.ts @@ -193,7 +193,9 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.containerAnalysisStub); client.close().then(() => { done(); @@ -252,7 +254,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -283,7 +285,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -330,7 +332,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -361,7 +363,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -382,7 +384,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -413,7 +415,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -460,7 +462,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -491,7 +493,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -512,7 +514,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -544,7 +546,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -591,7 +593,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -622,7 +624,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -643,7 +645,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -676,7 +678,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -723,7 +725,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -757,7 +759,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -776,7 +778,7 @@ describe('v1.ContainerAnalysisClient', () => { }); describe('Path templates', () => { - describe('note', () => { + describe('note', async () => { const fakePath = '/rendered/path/note'; const expectedParameters = { project: 'projectValue', @@ -786,7 +788,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.notePathTemplate.render = sinon .stub() .returns(fakePath); @@ -825,7 +827,7 @@ describe('v1.ContainerAnalysisClient', () => { }); }); - describe('occurrence', () => { + describe('occurrence', async () => { const fakePath = '/rendered/path/occurrence'; const expectedParameters = { project: 'projectValue', @@ -835,7 +837,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.occurrencePathTemplate.render = sinon .stub() .returns(fakePath); @@ -874,7 +876,7 @@ describe('v1.ContainerAnalysisClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -883,7 +885,7 @@ describe('v1.ContainerAnalysisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts index b5d6730d5fc..0a3f4acc741 100644 --- a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts +++ b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts @@ -211,7 +211,9 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.containerAnalysisV1Beta1Stub); client.close().then(() => { done(); @@ -282,7 +284,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -316,7 +318,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -366,7 +368,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -400,7 +402,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -424,7 +426,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -458,7 +460,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -508,7 +510,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -542,7 +544,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -566,7 +568,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -601,7 +603,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -651,7 +653,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -685,7 +687,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -709,7 +711,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() ); @@ -744,7 +746,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() ); @@ -794,7 +796,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() ); @@ -831,7 +833,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() ); @@ -858,7 +860,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.ExportSBOMRequest() ); @@ -892,7 +894,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.ExportSBOMRequest() ); @@ -942,7 +944,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.ExportSBOMRequest() ); @@ -976,7 +978,7 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.containeranalysis.v1beta1.ExportSBOMRequest() ); diff --git a/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.ts b/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.ts index ef9e9b65289..3c4a80e4fc5 100644 --- a/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.ts +++ b/packages/google-devtools-containeranalysis/test/gapic_grafeas_v1_beta1_v1beta1.ts @@ -256,7 +256,9 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.grafeasV1Beta1Stub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceRequest() ); @@ -346,7 +348,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceRequest() ); @@ -393,7 +395,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceRequest() ); @@ -424,7 +426,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceRequest() ); @@ -445,7 +447,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteOccurrenceRequest() ); @@ -476,7 +478,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteOccurrenceRequest() ); @@ -523,7 +525,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteOccurrenceRequest() ); @@ -554,7 +556,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteOccurrenceRequest() ); @@ -575,7 +577,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateOccurrenceRequest() ); @@ -606,7 +608,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateOccurrenceRequest() ); @@ -653,7 +655,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateOccurrenceRequest() ); @@ -684,7 +686,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateOccurrenceRequest() ); @@ -705,7 +707,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateOccurrencesRequest() ); @@ -737,7 +739,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateOccurrencesRequest() ); @@ -784,7 +786,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateOccurrencesRequest() ); @@ -818,7 +820,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateOccurrencesRequest() ); @@ -842,7 +844,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateOccurrenceRequest() ); @@ -873,7 +875,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateOccurrenceRequest() ); @@ -920,7 +922,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateOccurrenceRequest() ); @@ -951,7 +953,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateOccurrenceRequest() ); @@ -972,7 +974,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceNoteRequest() ); @@ -1003,7 +1005,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceNoteRequest() ); @@ -1050,7 +1052,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceNoteRequest() ); @@ -1081,7 +1083,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetOccurrenceNoteRequest() ); @@ -1102,7 +1104,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetNoteRequest() ); @@ -1133,7 +1135,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetNoteRequest() ); @@ -1180,7 +1182,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetNoteRequest() ); @@ -1208,7 +1210,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetNoteRequest() ); @@ -1229,7 +1231,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteNoteRequest() ); @@ -1260,7 +1262,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteNoteRequest() ); @@ -1307,7 +1309,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteNoteRequest() ); @@ -1338,7 +1340,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.DeleteNoteRequest() ); @@ -1359,7 +1361,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateNoteRequest() ); @@ -1390,7 +1392,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateNoteRequest() ); @@ -1437,7 +1439,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateNoteRequest() ); @@ -1468,7 +1470,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.CreateNoteRequest() ); @@ -1489,7 +1491,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateNotesRequest() ); @@ -1520,7 +1522,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateNotesRequest() ); @@ -1567,7 +1569,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateNotesRequest() ); @@ -1598,7 +1600,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.BatchCreateNotesRequest() ); @@ -1619,7 +1621,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateNoteRequest() ); @@ -1650,7 +1652,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateNoteRequest() ); @@ -1697,7 +1699,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateNoteRequest() ); @@ -1728,7 +1730,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.UpdateNoteRequest() ); @@ -1749,7 +1751,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -1782,7 +1784,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -1829,7 +1831,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -1863,7 +1865,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.GetVulnerabilityOccurrencesSummaryRequest() ); @@ -1887,7 +1889,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListOccurrencesRequest() ); @@ -1920,7 +1922,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListOccurrencesRequest() ); @@ -1969,7 +1971,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListOccurrencesRequest() ); @@ -2000,7 +2002,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListOccurrencesRequest() ); @@ -2051,7 +2053,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListOccurrencesRequest() ); @@ -2097,7 +2099,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListOccurrencesRequest() ); @@ -2140,7 +2142,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListOccurrencesRequest() ); @@ -2182,7 +2184,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNotesRequest() ); @@ -2215,7 +2217,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNotesRequest() ); @@ -2264,7 +2266,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNotesRequest() ); @@ -2292,7 +2294,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNotesRequest() ); @@ -2343,7 +2345,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNotesRequest() ); @@ -2391,7 +2393,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNotesRequest() ); @@ -2433,7 +2435,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNotesRequest() ); @@ -2476,7 +2478,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNoteOccurrencesRequest() ); @@ -2510,7 +2512,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNoteOccurrencesRequest() ); @@ -2559,7 +2561,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNoteOccurrencesRequest() ); @@ -2590,7 +2592,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNoteOccurrencesRequest() ); @@ -2641,7 +2643,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNoteOccurrencesRequest() ); @@ -2687,7 +2689,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNoteOccurrencesRequest() ); @@ -2730,7 +2732,7 @@ describe('v1beta1.GrafeasV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1beta1.ListNoteOccurrencesRequest() ); diff --git a/packages/google-iam-credentials/package.json b/packages/google-iam-credentials/package.json index c6be1ef609a..65d5621a00e 100644 --- a/packages/google-iam-credentials/package.json +++ b/packages/google-iam-credentials/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json index 3b663019cdf..b68fd59340a 100644 --- a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json +++ b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-credentials", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json index 3b663019cdf..b68fd59340a 100644 --- a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json +++ b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-credentials", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam-credentials/src/v1/i_a_m_credentials_client.ts b/packages/google-iam-credentials/src/v1/i_a_m_credentials_client.ts index ba2b3f79a8b..30c104410ef 100644 --- a/packages/google-iam-credentials/src/v1/i_a_m_credentials_client.ts +++ b/packages/google-iam-credentials/src/v1/i_a_m_credentials_client.ts @@ -482,7 +482,9 @@ export class IAMCredentialsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAccessToken request %j', request); const wrappedCallback: | Callback< @@ -621,7 +623,9 @@ export class IAMCredentialsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateIdToken request %j', request); const wrappedCallback: | Callback< @@ -745,7 +749,9 @@ export class IAMCredentialsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('signBlob request %j', request); const wrappedCallback: | Callback< @@ -867,7 +873,9 @@ export class IAMCredentialsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('signJwt request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-iam-credentials/test/gapic_i_a_m_credentials_v1.ts b/packages/google-iam-credentials/test/gapic_i_a_m_credentials_v1.ts index 8f9bb07a766..c0e51308609 100644 --- a/packages/google-iam-credentials/test/gapic_i_a_m_credentials_v1.ts +++ b/packages/google-iam-credentials/test/gapic_i_a_m_credentials_v1.ts @@ -192,7 +192,9 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.iAMCredentialsStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateAccessTokenRequest() ); @@ -283,7 +285,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateAccessTokenRequest() ); @@ -330,7 +332,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateAccessTokenRequest() ); @@ -361,7 +363,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateAccessTokenRequest() ); @@ -382,7 +384,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateIdTokenRequest() ); @@ -413,7 +415,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateIdTokenRequest() ); @@ -460,7 +462,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateIdTokenRequest() ); @@ -491,7 +493,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.GenerateIdTokenRequest() ); @@ -512,7 +514,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignBlobRequest() ); @@ -543,7 +545,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignBlobRequest() ); @@ -590,7 +592,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignBlobRequest() ); @@ -618,7 +620,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignBlobRequest() ); @@ -639,7 +641,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignJwtRequest() ); @@ -670,7 +672,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignJwtRequest() ); @@ -717,7 +719,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignJwtRequest() ); @@ -745,7 +747,7 @@ describe('v1.IAMCredentialsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.credentials.v1.SignJwtRequest() ); diff --git a/packages/google-iam/package.json b/packages/google-iam/package.json index 07894a1e4d2..eec611e982c 100644 --- a/packages/google-iam/package.json +++ b/packages/google-iam/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json b/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json index fcdefb5874f..133368eb60b 100644 --- a/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json +++ b/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json b/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json index fcdefb5874f..133368eb60b 100644 --- a/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json +++ b/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json b/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json index fda53b3010d..349a2928c30 100644 --- a/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json +++ b/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam/src/v2/policies_client.ts b/packages/google-iam/src/v2/policies_client.ts index f5a1750bfe0..5462ac22016 100644 --- a/packages/google-iam/src/v2/policies_client.ts +++ b/packages/google-iam/src/v2/policies_client.ts @@ -528,7 +528,9 @@ export class PoliciesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicy request %j', request); const wrappedCallback: | Callback< @@ -672,7 +674,9 @@ export class PoliciesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -853,7 +857,9 @@ export class PoliciesClient { this._gaxModule.routingHeader.fromParams({ 'policy.name': request.policy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1036,7 +1042,9 @@ export class PoliciesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1207,7 +1215,9 @@ export class PoliciesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.iam.v2.IListPoliciesRequest, @@ -1283,7 +1293,9 @@ export class PoliciesClient { }); const defaultCallSettings = this._defaults['listPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicies stream %j', request); return this.descriptors.page.listPolicies.createStream( this.innerApiCalls.listPolicies as GaxCall, @@ -1343,7 +1355,9 @@ export class PoliciesClient { }); const defaultCallSettings = this._defaults['listPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicies iterate %j', request); return this.descriptors.page.listPolicies.asyncIterate( this.innerApiCalls['listPolicies'] as GaxCall, @@ -1445,7 +1459,7 @@ export class PoliciesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-iam/src/v3/policy_bindings_client.ts b/packages/google-iam/src/v3/policy_bindings_client.ts index f99befc45d1..ff6f4650707 100644 --- a/packages/google-iam/src/v3/policy_bindings_client.ts +++ b/packages/google-iam/src/v3/policy_bindings_client.ts @@ -572,7 +572,9 @@ export class PolicyBindingsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicyBinding request %j', request); const wrappedCallback: | Callback< @@ -722,7 +724,9 @@ export class PolicyBindingsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -901,7 +905,9 @@ export class PolicyBindingsClient { this._gaxModule.routingHeader.fromParams({ 'policy_binding.name': request.policyBinding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1083,7 +1089,9 @@ export class PolicyBindingsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1267,7 +1275,9 @@ export class PolicyBindingsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.iam.v3.IListPolicyBindingsRequest, @@ -1360,7 +1370,9 @@ export class PolicyBindingsClient { }); const defaultCallSettings = this._defaults['listPolicyBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyBindings stream %j', request); return this.descriptors.page.listPolicyBindings.createStream( this.innerApiCalls.listPolicyBindings as GaxCall, @@ -1437,7 +1449,9 @@ export class PolicyBindingsClient { }); const defaultCallSettings = this._defaults['listPolicyBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicyBindings iterate %j', request); return this.descriptors.page.listPolicyBindings.asyncIterate( this.innerApiCalls['listPolicyBindings'] as GaxCall, @@ -1570,7 +1584,9 @@ export class PolicyBindingsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.iam.v3.ISearchTargetPolicyBindingsRequest, @@ -1665,7 +1681,9 @@ export class PolicyBindingsClient { }); const defaultCallSettings = this._defaults['searchTargetPolicyBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchTargetPolicyBindings stream %j', request); return this.descriptors.page.searchTargetPolicyBindings.createStream( this.innerApiCalls.searchTargetPolicyBindings as GaxCall, @@ -1742,7 +1760,9 @@ export class PolicyBindingsClient { }); const defaultCallSettings = this._defaults['searchTargetPolicyBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchTargetPolicyBindings iterate %j', request); return this.descriptors.page.searchTargetPolicyBindings.asyncIterate( this.innerApiCalls['searchTargetPolicyBindings'] as GaxCall, @@ -1922,7 +1942,7 @@ export class PolicyBindingsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-iam/src/v3/principal_access_boundary_policies_client.ts b/packages/google-iam/src/v3/principal_access_boundary_policies_client.ts index 3f15b4de96f..c9c9d98c391 100644 --- a/packages/google-iam/src/v3/principal_access_boundary_policies_client.ts +++ b/packages/google-iam/src/v3/principal_access_boundary_policies_client.ts @@ -593,7 +593,9 @@ export class PrincipalAccessBoundaryPoliciesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPrincipalAccessBoundaryPolicy request %j', request); const wrappedCallback: | Callback< @@ -749,7 +751,9 @@ export class PrincipalAccessBoundaryPoliciesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -931,7 +935,9 @@ export class PrincipalAccessBoundaryPoliciesClient { 'principal_access_boundary_policy.name': request.principalAccessBoundaryPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1116,7 +1122,9 @@ export class PrincipalAccessBoundaryPoliciesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1299,7 +1307,9 @@ export class PrincipalAccessBoundaryPoliciesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.iam.v3.IListPrincipalAccessBoundaryPoliciesRequest, @@ -1386,7 +1396,9 @@ export class PrincipalAccessBoundaryPoliciesClient { const defaultCallSettings = this._defaults['listPrincipalAccessBoundaryPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrincipalAccessBoundaryPolicies stream %j', request); return this.descriptors.page.listPrincipalAccessBoundaryPolicies.createStream( this.innerApiCalls.listPrincipalAccessBoundaryPolicies as GaxCall, @@ -1449,7 +1461,9 @@ export class PrincipalAccessBoundaryPoliciesClient { const defaultCallSettings = this._defaults['listPrincipalAccessBoundaryPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrincipalAccessBoundaryPolicies iterate %j', request); return this.descriptors.page.listPrincipalAccessBoundaryPolicies.asyncIterate( this.innerApiCalls['listPrincipalAccessBoundaryPolicies'] as GaxCall, @@ -1564,7 +1578,9 @@ export class PrincipalAccessBoundaryPoliciesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.iam.v3.ISearchPrincipalAccessBoundaryPolicyBindingsRequest, @@ -1655,7 +1671,9 @@ export class PrincipalAccessBoundaryPoliciesClient { const defaultCallSettings = this._defaults['searchPrincipalAccessBoundaryPolicyBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'searchPrincipalAccessBoundaryPolicyBindings stream %j', request @@ -1718,7 +1736,9 @@ export class PrincipalAccessBoundaryPoliciesClient { const defaultCallSettings = this._defaults['searchPrincipalAccessBoundaryPolicyBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'searchPrincipalAccessBoundaryPolicyBindings iterate %j', request @@ -1903,7 +1923,7 @@ export class PrincipalAccessBoundaryPoliciesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-iam/test/gapic_policies_v2.ts b/packages/google-iam/test/gapic_policies_v2.ts index f7ece9b243d..01e25e25283 100644 --- a/packages/google-iam/test/gapic_policies_v2.ts +++ b/packages/google-iam/test/gapic_policies_v2.ts @@ -282,7 +282,9 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policiesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.GetPolicyRequest() ); @@ -372,7 +374,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.GetPolicyRequest() ); @@ -419,7 +421,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.GetPolicyRequest() ); @@ -447,7 +449,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.GetPolicyRequest() ); @@ -468,7 +470,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.CreatePolicyRequest() ); @@ -500,7 +502,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.CreatePolicyRequest() ); @@ -554,7 +556,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.CreatePolicyRequest() ); @@ -585,7 +587,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.CreatePolicyRequest() ); @@ -618,7 +620,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -640,7 +642,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -658,7 +660,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.UpdatePolicyRequest() ); @@ -691,7 +693,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.UpdatePolicyRequest() ); @@ -746,7 +748,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.UpdatePolicyRequest() ); @@ -778,7 +780,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.UpdatePolicyRequest() ); @@ -812,7 +814,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -834,7 +836,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -852,7 +854,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.DeletePolicyRequest() ); @@ -884,7 +886,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.DeletePolicyRequest() ); @@ -938,7 +940,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.DeletePolicyRequest() ); @@ -969,7 +971,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.DeletePolicyRequest() ); @@ -1002,7 +1004,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1024,7 +1026,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1042,7 +1044,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.ListPoliciesRequest() ); @@ -1075,7 +1077,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.ListPoliciesRequest() ); @@ -1124,7 +1126,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.ListPoliciesRequest() ); @@ -1155,7 +1157,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.ListPoliciesRequest() ); @@ -1206,7 +1208,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.ListPoliciesRequest() ); @@ -1254,7 +1256,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.ListPoliciesRequest() ); @@ -1297,7 +1299,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v2.ListPoliciesRequest() ); @@ -1338,7 +1340,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1417,7 +1419,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1497,7 +1499,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1593,8 +1595,7 @@ describe('v2.PoliciesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1613,7 +1614,7 @@ describe('v2.PoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1622,8 +1623,7 @@ describe('v2.PoliciesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-iam/test/gapic_policy_bindings_v3.ts b/packages/google-iam/test/gapic_policy_bindings_v3.ts index 6d1299499ba..8945f2ce396 100644 --- a/packages/google-iam/test/gapic_policy_bindings_v3.ts +++ b/packages/google-iam/test/gapic_policy_bindings_v3.ts @@ -289,7 +289,9 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyBindingsStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPolicyBindingRequest() ); @@ -379,7 +381,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPolicyBindingRequest() ); @@ -426,7 +428,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPolicyBindingRequest() ); @@ -457,7 +459,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPolicyBindingRequest() ); @@ -478,7 +480,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePolicyBindingRequest() ); @@ -511,7 +513,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePolicyBindingRequest() ); @@ -565,7 +567,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePolicyBindingRequest() ); @@ -596,7 +598,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePolicyBindingRequest() ); @@ -629,7 +631,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -651,7 +653,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -672,7 +674,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePolicyBindingRequest() ); @@ -706,7 +708,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePolicyBindingRequest() ); @@ -761,7 +763,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePolicyBindingRequest() ); @@ -793,7 +795,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePolicyBindingRequest() ); @@ -827,7 +829,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -849,7 +851,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -870,7 +872,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePolicyBindingRequest() ); @@ -903,7 +905,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePolicyBindingRequest() ); @@ -957,7 +959,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePolicyBindingRequest() ); @@ -988,7 +990,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePolicyBindingRequest() ); @@ -1021,7 +1023,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1043,7 +1045,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1064,7 +1066,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPolicyBindingsRequest() ); @@ -1098,7 +1100,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPolicyBindingsRequest() ); @@ -1147,7 +1149,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPolicyBindingsRequest() ); @@ -1178,7 +1180,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPolicyBindingsRequest() ); @@ -1229,7 +1231,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPolicyBindingsRequest() ); @@ -1275,7 +1277,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPolicyBindingsRequest() ); @@ -1318,7 +1320,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPolicyBindingsRequest() ); @@ -1360,7 +1362,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchTargetPolicyBindingsRequest() ); @@ -1394,7 +1396,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchTargetPolicyBindingsRequest() ); @@ -1443,7 +1445,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchTargetPolicyBindingsRequest() ); @@ -1477,7 +1479,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchTargetPolicyBindingsRequest() ); @@ -1534,7 +1536,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchTargetPolicyBindingsRequest() ); @@ -1586,7 +1588,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchTargetPolicyBindingsRequest() ); @@ -1633,7 +1635,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchTargetPolicyBindingsRequest() ); @@ -1678,7 +1680,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1708,7 +1710,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1752,7 +1754,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1787,7 +1789,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1835,7 +1837,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1876,7 +1878,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1955,7 +1957,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2035,7 +2037,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2131,8 +2133,7 @@ describe('v3.PolicyBindingsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2151,7 +2152,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2160,8 +2161,7 @@ describe('v3.PolicyBindingsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2177,7 +2177,7 @@ describe('v3.PolicyBindingsClient', () => { }); describe('Path templates', () => { - describe('folderLocationPolicyBinding', () => { + describe('folderLocationPolicyBinding', async () => { const fakePath = '/rendered/path/folderLocationPolicyBinding'; const expectedParameters = { folder: 'folderValue', @@ -2188,7 +2188,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationPolicyBindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationPolicyBindingPathTemplate.match = sinon @@ -2257,7 +2257,7 @@ describe('v3.PolicyBindingsClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2266,7 +2266,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2295,7 +2295,7 @@ describe('v3.PolicyBindingsClient', () => { }); }); - describe('organizationLocation', () => { + describe('organizationLocation', async () => { const fakePath = '/rendered/path/organizationLocation'; const expectedParameters = { organization: 'organizationValue', @@ -2305,7 +2305,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2358,7 +2358,7 @@ describe('v3.PolicyBindingsClient', () => { }); }); - describe('organizationLocationPolicyBinding', () => { + describe('organizationLocationPolicyBinding', async () => { const fakePath = '/rendered/path/organizationLocationPolicyBinding'; const expectedParameters = { organization: 'organizationValue', @@ -2369,7 +2369,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPolicyBindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationPolicyBindingPathTemplate.match = @@ -2441,7 +2441,7 @@ describe('v3.PolicyBindingsClient', () => { }); }); - describe('principalAccessBoundaryPolicy', () => { + describe('principalAccessBoundaryPolicy', async () => { const fakePath = '/rendered/path/principalAccessBoundaryPolicy'; const expectedParameters = { organization: 'organizationValue', @@ -2452,7 +2452,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.principalAccessBoundaryPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.principalAccessBoundaryPolicyPathTemplate.match = @@ -2522,7 +2522,7 @@ describe('v3.PolicyBindingsClient', () => { }); }); - describe('projectLocationPolicyBinding', () => { + describe('projectLocationPolicyBinding', async () => { const fakePath = '/rendered/path/projectLocationPolicyBinding'; const expectedParameters = { project: 'projectValue', @@ -2533,7 +2533,7 @@ describe('v3.PolicyBindingsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPolicyBindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationPolicyBindingPathTemplate.match = diff --git a/packages/google-iam/test/gapic_principal_access_boundary_policies_v3.ts b/packages/google-iam/test/gapic_principal_access_boundary_policies_v3.ts index 59b4b359156..70f4148ab4f 100644 --- a/packages/google-iam/test/gapic_principal_access_boundary_policies_v3.ts +++ b/packages/google-iam/test/gapic_principal_access_boundary_policies_v3.ts @@ -308,7 +308,9 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.principalAccessBoundaryPoliciesStub); client.close().then(() => { done(); @@ -379,7 +381,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest() ); @@ -414,7 +416,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest() ); @@ -464,7 +466,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest() ); @@ -501,7 +503,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.GetPrincipalAccessBoundaryPolicyRequest() ); @@ -528,7 +530,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest() ); @@ -565,7 +567,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest() ); @@ -622,7 +624,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest() ); @@ -657,7 +659,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.CreatePrincipalAccessBoundaryPolicyRequest() ); @@ -691,7 +693,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -717,7 +719,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -741,7 +743,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest() ); @@ -779,7 +781,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest() ); @@ -837,7 +839,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest() ); @@ -873,7 +875,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.UpdatePrincipalAccessBoundaryPolicyRequest() ); @@ -908,7 +910,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -934,7 +936,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -958,7 +960,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest() ); @@ -995,7 +997,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest() ); @@ -1052,7 +1054,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest() ); @@ -1087,7 +1089,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.DeletePrincipalAccessBoundaryPolicyRequest() ); @@ -1121,7 +1123,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1147,7 +1149,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1171,7 +1173,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest() ); @@ -1215,7 +1217,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest() ); @@ -1275,7 +1277,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest() ); @@ -1312,7 +1314,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest() ); @@ -1385,7 +1387,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest() ); @@ -1447,7 +1449,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest() ); @@ -1504,7 +1506,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.ListPrincipalAccessBoundaryPoliciesRequest() ); @@ -1554,7 +1556,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest() ); @@ -1594,7 +1596,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest() ); @@ -1648,7 +1650,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest() ); @@ -1685,7 +1687,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest() ); @@ -1749,7 +1751,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest() ); @@ -1808,7 +1810,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest() ); @@ -1859,7 +1861,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v3.SearchPrincipalAccessBoundaryPolicyBindingsRequest() ); @@ -1908,7 +1910,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1941,7 +1943,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1988,7 +1990,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2026,7 +2028,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2077,7 +2079,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2121,7 +2123,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2209,7 +2211,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2298,7 +2300,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2403,8 +2405,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2426,7 +2427,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2435,8 +2436,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2452,7 +2452,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { }); describe('Path templates', () => { - describe('folderLocationPolicyBinding', () => { + describe('folderLocationPolicyBinding', async () => { const fakePath = '/rendered/path/folderLocationPolicyBinding'; const expectedParameters = { folder: 'folderValue', @@ -2466,7 +2466,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationPolicyBindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationPolicyBindingPathTemplate.match = sinon @@ -2535,7 +2535,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2547,7 +2547,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2576,7 +2576,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { }); }); - describe('organizationLocation', () => { + describe('organizationLocation', async () => { const fakePath = '/rendered/path/organizationLocation'; const expectedParameters = { organization: 'organizationValue', @@ -2589,7 +2589,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2642,7 +2642,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { }); }); - describe('organizationLocationPolicyBinding', () => { + describe('organizationLocationPolicyBinding', async () => { const fakePath = '/rendered/path/organizationLocationPolicyBinding'; const expectedParameters = { organization: 'organizationValue', @@ -2656,7 +2656,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPolicyBindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationPolicyBindingPathTemplate.match = @@ -2728,7 +2728,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { }); }); - describe('principalAccessBoundaryPolicy', () => { + describe('principalAccessBoundaryPolicy', async () => { const fakePath = '/rendered/path/principalAccessBoundaryPolicy'; const expectedParameters = { organization: 'organizationValue', @@ -2742,7 +2742,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.principalAccessBoundaryPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.principalAccessBoundaryPolicyPathTemplate.match = @@ -2812,7 +2812,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { }); }); - describe('projectLocationPolicyBinding', () => { + describe('projectLocationPolicyBinding', async () => { const fakePath = '/rendered/path/projectLocationPolicyBinding'; const expectedParameters = { project: 'projectValue', @@ -2826,7 +2826,7 @@ describe('v3.PrincipalAccessBoundaryPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPolicyBindingPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationPolicyBindingPathTemplate.match = diff --git a/packages/google-identity-accesscontextmanager/package.json b/packages/google-identity-accesscontextmanager/package.json index 2e5c07b8557..c482b01fc40 100644 --- a/packages/google-identity-accesscontextmanager/package.json +++ b/packages/google-identity-accesscontextmanager/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json index a9281309a6d..02ace60019f 100644 --- a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json +++ b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accesscontextmanager", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json index a9281309a6d..02ace60019f 100644 --- a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json +++ b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accesscontextmanager", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-identity-accesscontextmanager/src/v1/access_context_manager_client.ts b/packages/google-identity-accesscontextmanager/src/v1/access_context_manager_client.ts index 0588bdce6f4..bf3de7cc3c2 100644 --- a/packages/google-identity-accesscontextmanager/src/v1/access_context_manager_client.ts +++ b/packages/google-identity-accesscontextmanager/src/v1/access_context_manager_client.ts @@ -769,7 +769,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccessPolicy request %j', request); const wrappedCallback: | Callback< @@ -909,7 +911,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccessLevel request %j', request); const wrappedCallback: | Callback< @@ -1040,7 +1044,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServicePerimeter request %j', request); const wrappedCallback: | Callback< @@ -1167,7 +1173,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGcpUserAccessBinding request %j', request); const wrappedCallback: | Callback< @@ -1295,7 +1303,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1406,7 +1416,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1523,7 +1535,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1681,7 +1695,9 @@ export class AccessContextManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1855,7 +1871,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ 'policy.name': request.policy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2028,7 +2046,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2210,7 +2230,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2390,7 +2412,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ 'access_level.name': request.accessLevel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2566,7 +2590,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2768,7 +2794,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2951,7 +2979,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3128,7 +3158,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ 'service_perimeter.name': request.servicePerimeter!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3304,7 +3336,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3502,7 +3536,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3697,7 +3733,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3876,7 +3914,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4056,7 +4096,9 @@ export class AccessContextManagerClient { 'gcp_user_access_binding.name': request.gcpUserAccessBinding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4227,7 +4269,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4392,7 +4436,9 @@ export class AccessContextManagerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.identity.accesscontextmanager.v1.IListAccessPoliciesRequest, @@ -4458,7 +4504,9 @@ export class AccessContextManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccessPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccessPolicies stream %j', request); return this.descriptors.page.listAccessPolicies.createStream( this.innerApiCalls.listAccessPolicies as GaxCall, @@ -4506,7 +4554,9 @@ export class AccessContextManagerClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccessPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccessPolicies iterate %j', request); return this.descriptors.page.listAccessPolicies.asyncIterate( this.innerApiCalls['listAccessPolicies'] as GaxCall, @@ -4622,7 +4672,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.identity.accesscontextmanager.v1.IListAccessLevelsRequest, @@ -4699,7 +4751,9 @@ export class AccessContextManagerClient { }); const defaultCallSettings = this._defaults['listAccessLevels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccessLevels stream %j', request); return this.descriptors.page.listAccessLevels.createStream( this.innerApiCalls.listAccessLevels as GaxCall, @@ -4758,7 +4812,9 @@ export class AccessContextManagerClient { }); const defaultCallSettings = this._defaults['listAccessLevels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccessLevels iterate %j', request); return this.descriptors.page.listAccessLevels.asyncIterate( this.innerApiCalls['listAccessLevels'] as GaxCall, @@ -4870,7 +4926,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.identity.accesscontextmanager.v1.IListServicePerimetersRequest, @@ -4943,7 +5001,9 @@ export class AccessContextManagerClient { }); const defaultCallSettings = this._defaults['listServicePerimeters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServicePerimeters stream %j', request); return this.descriptors.page.listServicePerimeters.createStream( this.innerApiCalls.listServicePerimeters as GaxCall, @@ -4998,7 +5058,9 @@ export class AccessContextManagerClient { }); const defaultCallSettings = this._defaults['listServicePerimeters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServicePerimeters iterate %j', request); return this.descriptors.page.listServicePerimeters.asyncIterate( this.innerApiCalls['listServicePerimeters'] as GaxCall, @@ -5106,7 +5168,9 @@ export class AccessContextManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.identity.accesscontextmanager.v1.IListGcpUserAccessBindingsRequest, @@ -5175,7 +5239,9 @@ export class AccessContextManagerClient { }); const defaultCallSettings = this._defaults['listGcpUserAccessBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGcpUserAccessBindings stream %j', request); return this.descriptors.page.listGcpUserAccessBindings.createStream( this.innerApiCalls.listGcpUserAccessBindings as GaxCall, @@ -5226,7 +5292,9 @@ export class AccessContextManagerClient { }); const defaultCallSettings = this._defaults['listGcpUserAccessBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGcpUserAccessBindings iterate %j', request); return this.descriptors.page.listGcpUserAccessBindings.asyncIterate( this.innerApiCalls['listGcpUserAccessBindings'] as GaxCall, @@ -5328,7 +5396,7 @@ export class AccessContextManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-identity-accesscontextmanager/test/gapic_access_context_manager_v1.ts b/packages/google-identity-accesscontextmanager/test/gapic_access_context_manager_v1.ts index 9a7c063ad47..0bafd062518 100644 --- a/packages/google-identity-accesscontextmanager/test/gapic_access_context_manager_v1.ts +++ b/packages/google-identity-accesscontextmanager/test/gapic_access_context_manager_v1.ts @@ -298,7 +298,9 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.accessContextManagerStub); client.close().then(() => { done(); @@ -361,7 +363,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest() ); @@ -393,7 +395,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest() ); @@ -441,7 +443,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest() ); @@ -473,7 +475,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessPolicyRequest() ); @@ -495,7 +497,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessLevelRequest() ); @@ -527,7 +529,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessLevelRequest() ); @@ -575,7 +577,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessLevelRequest() ); @@ -607,7 +609,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetAccessLevelRequest() ); @@ -629,7 +631,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest() ); @@ -662,7 +664,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest() ); @@ -710,7 +712,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest() ); @@ -742,7 +744,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetServicePerimeterRequest() ); @@ -764,7 +766,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest() ); @@ -797,7 +799,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest() ); @@ -845,7 +847,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest() ); @@ -880,7 +882,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.GetGcpUserAccessBindingRequest() ); @@ -905,7 +907,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -937,7 +939,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -985,7 +987,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1017,7 +1019,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1151,7 +1153,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1173,7 +1175,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1206,7 +1208,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1286,7 +1288,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.AccessPolicy() ); @@ -1328,7 +1330,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.AccessPolicy() ); @@ -1369,7 +1371,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.AccessPolicy() ); @@ -1387,7 +1389,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.AccessPolicy() ); @@ -1407,7 +1409,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1430,7 +1432,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1452,7 +1454,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest() ); @@ -1543,7 +1545,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest() ); @@ -1576,7 +1578,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessPolicyRequest() ); @@ -1611,7 +1613,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1634,7 +1636,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1656,7 +1658,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest() ); @@ -1690,7 +1692,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest() ); @@ -1745,7 +1747,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessPolicyRequest() ); @@ -1811,7 +1813,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1834,7 +1836,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1856,7 +1858,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest() ); @@ -1890,7 +1892,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest() ); @@ -1945,7 +1947,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest() ); @@ -1977,7 +1979,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateAccessLevelRequest() ); @@ -2011,7 +2013,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2034,7 +2036,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2056,7 +2058,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest() ); @@ -2091,7 +2093,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest() ); @@ -2147,7 +2149,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest() ); @@ -2180,7 +2182,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest() ); @@ -2215,7 +2217,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2238,7 +2240,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2260,7 +2262,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest() ); @@ -2294,7 +2296,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest() ); @@ -2349,7 +2351,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest() ); @@ -2381,7 +2383,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteAccessLevelRequest() ); @@ -2415,7 +2417,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2438,7 +2440,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2460,7 +2462,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest() ); @@ -2494,7 +2496,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest() ); @@ -2549,7 +2551,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest() ); @@ -2581,7 +2583,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceAccessLevelsRequest() ); @@ -2615,7 +2617,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2638,7 +2640,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2660,7 +2662,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest() ); @@ -2694,7 +2696,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest() ); @@ -2749,7 +2751,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest() ); @@ -2784,7 +2786,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateServicePerimeterRequest() ); @@ -2818,7 +2820,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2841,7 +2843,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2863,7 +2865,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest() ); @@ -2898,7 +2900,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest() ); @@ -2954,7 +2956,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest() ); @@ -2990,7 +2992,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateServicePerimeterRequest() ); @@ -3025,7 +3027,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3048,7 +3050,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3070,7 +3072,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest() ); @@ -3104,7 +3106,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest() ); @@ -3159,7 +3161,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest() ); @@ -3194,7 +3196,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteServicePerimeterRequest() ); @@ -3228,7 +3230,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3251,7 +3253,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3273,7 +3275,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest() ); @@ -3307,7 +3309,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest() ); @@ -3362,7 +3364,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest() ); @@ -3397,7 +3399,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ReplaceServicePerimetersRequest() ); @@ -3431,7 +3433,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3455,7 +3457,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3477,7 +3479,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest() ); @@ -3511,7 +3513,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest() ); @@ -3566,7 +3568,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest() ); @@ -3601,7 +3603,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CommitServicePerimetersRequest() ); @@ -3635,7 +3637,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3659,7 +3661,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3681,7 +3683,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest() ); @@ -3715,7 +3717,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest() ); @@ -3770,7 +3772,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest() ); @@ -3805,7 +3807,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.CreateGcpUserAccessBindingRequest() ); @@ -3839,7 +3841,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3863,7 +3865,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3885,7 +3887,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest() ); @@ -3920,7 +3922,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest() ); @@ -3976,7 +3978,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest() ); @@ -4012,7 +4014,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest() ); @@ -4047,7 +4049,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4071,7 +4073,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4093,7 +4095,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest() ); @@ -4127,7 +4129,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest() ); @@ -4182,7 +4184,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest() ); @@ -4217,7 +4219,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.DeleteGcpUserAccessBindingRequest() ); @@ -4251,7 +4253,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4275,7 +4277,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4297,7 +4299,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest() ); @@ -4324,7 +4326,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest() ); @@ -4368,7 +4370,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest() ); @@ -4386,7 +4388,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest() ); @@ -4437,7 +4439,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest() ); @@ -4477,7 +4479,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest() ); @@ -4515,7 +4517,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessPoliciesRequest() ); @@ -4546,7 +4548,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest() ); @@ -4586,7 +4588,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest() ); @@ -4644,7 +4646,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest() ); @@ -4676,7 +4678,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest() ); @@ -4740,7 +4742,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest() ); @@ -4793,7 +4795,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest() ); @@ -4844,7 +4846,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListAccessLevelsRequest() ); @@ -4888,7 +4890,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest() ); @@ -4929,7 +4931,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest() ); @@ -4987,7 +4989,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest() ); @@ -5022,7 +5024,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest() ); @@ -5092,7 +5094,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest() ); @@ -5151,7 +5153,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest() ); @@ -5206,7 +5208,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListServicePerimetersRequest() ); @@ -5254,7 +5256,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest() ); @@ -5295,7 +5297,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest() ); @@ -5353,7 +5355,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest() ); @@ -5388,7 +5390,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest() ); @@ -5458,7 +5460,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest() ); @@ -5517,7 +5519,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest() ); @@ -5572,7 +5574,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsRequest() ); @@ -5619,7 +5621,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5701,7 +5703,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5784,7 +5786,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5883,8 +5885,7 @@ describe('v1.AccessContextManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5904,7 +5905,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5913,8 +5914,7 @@ describe('v1.AccessContextManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5930,7 +5930,7 @@ describe('v1.AccessContextManagerClient', () => { }); describe('Path templates', () => { - describe('accessLevel', () => { + describe('accessLevel', async () => { const fakePath = '/rendered/path/accessLevel'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -5941,7 +5941,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessLevelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5983,7 +5983,7 @@ describe('v1.AccessContextManagerClient', () => { }); }); - describe('accessPolicy', () => { + describe('accessPolicy', async () => { const fakePath = '/rendered/path/accessPolicy'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -5993,7 +5993,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6022,7 +6022,7 @@ describe('v1.AccessContextManagerClient', () => { }); }); - describe('gcpUserAccessBinding', () => { + describe('gcpUserAccessBinding', async () => { const fakePath = '/rendered/path/gcpUserAccessBinding'; const expectedParameters = { organization: 'organizationValue', @@ -6033,7 +6033,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.gcpUserAccessBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6088,7 +6088,7 @@ describe('v1.AccessContextManagerClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -6098,7 +6098,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6127,7 +6127,7 @@ describe('v1.AccessContextManagerClient', () => { }); }); - describe('servicePerimeter', () => { + describe('servicePerimeter', async () => { const fakePath = '/rendered/path/servicePerimeter'; const expectedParameters = { access_policy: 'accessPolicyValue', @@ -6138,7 +6138,7 @@ describe('v1.AccessContextManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePerimeterPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-maps-addressvalidation/package.json b/packages/google-maps-addressvalidation/package.json index 3cde6ad0ed7..8e6307ed8d5 100644 --- a/packages/google-maps-addressvalidation/package.json +++ b/packages/google-maps-addressvalidation/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json index da368d07c14..60f5947058f 100644 --- a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json +++ b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-addressvalidation", - "version": "2.4.0", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json index ddff422117c..5b56725e840 100644 --- a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json +++ b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-addressvalidation", - "version": "2.4.0", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-addressvalidation/src/v1/address_validation_client.ts b/packages/google-maps-addressvalidation/src/v1/address_validation_client.ts index fa9bbda1858..0e0b6749322 100644 --- a/packages/google-maps-addressvalidation/src/v1/address_validation_client.ts +++ b/packages/google-maps-addressvalidation/src/v1/address_validation_client.ts @@ -510,7 +510,9 @@ export class AddressValidationClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validateAddress request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class AddressValidationClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('provideValidationFeedback request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-maps-addressvalidation/test/gapic_address_validation_v1.ts b/packages/google-maps-addressvalidation/test/gapic_address_validation_v1.ts index fee5ffbc75b..a0f583993f3 100644 --- a/packages/google-maps-addressvalidation/test/gapic_address_validation_v1.ts +++ b/packages/google-maps-addressvalidation/test/gapic_address_validation_v1.ts @@ -193,7 +193,9 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.addressValidationStub); client.close().then(() => { done(); @@ -252,7 +254,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ValidateAddressRequest() ); @@ -269,7 +271,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ValidateAddressRequest() ); @@ -302,7 +304,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ValidateAddressRequest() ); @@ -319,7 +321,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ValidateAddressRequest() ); @@ -335,7 +337,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest() ); @@ -353,7 +355,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest() ); @@ -386,7 +388,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest() ); @@ -406,7 +408,7 @@ describe('v1.AddressValidationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.addressvalidation.v1.ProvideValidationFeedbackRequest() ); diff --git a/packages/google-maps-areainsights/package.json b/packages/google-maps-areainsights/package.json index bf5fb8cbf08..89b2bfc0a1b 100644 --- a/packages/google-maps-areainsights/package.json +++ b/packages/google-maps-areainsights/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json b/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json index 526d312d235..9736822fd6d 100644 --- a/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json +++ b/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-areainsights", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-areainsights/src/v1/area_insights_client.ts b/packages/google-maps-areainsights/src/v1/area_insights_client.ts index 0f03f11e32d..d7f62229c57 100644 --- a/packages/google-maps-areainsights/src/v1/area_insights_client.ts +++ b/packages/google-maps-areainsights/src/v1/area_insights_client.ts @@ -462,7 +462,9 @@ export class AreaInsightsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeInsights request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-maps-areainsights/test/gapic_area_insights_v1.ts b/packages/google-maps-areainsights/test/gapic_area_insights_v1.ts index 36a1ff5a75d..defe9b64223 100644 --- a/packages/google-maps-areainsights/test/gapic_area_insights_v1.ts +++ b/packages/google-maps-areainsights/test/gapic_area_insights_v1.ts @@ -192,7 +192,9 @@ describe('v1.AreaInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.areaInsightsStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1.AreaInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.areainsights.v1.ComputeInsightsRequest() ); @@ -268,7 +270,7 @@ describe('v1.AreaInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.areainsights.v1.ComputeInsightsRequest() ); @@ -301,7 +303,7 @@ describe('v1.AreaInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.areainsights.v1.ComputeInsightsRequest() ); @@ -318,7 +320,7 @@ describe('v1.AreaInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.areainsights.v1.ComputeInsightsRequest() ); @@ -329,7 +331,7 @@ describe('v1.AreaInsightsClient', () => { }); describe('Path templates', () => { - describe('place', () => { + describe('place', async () => { const fakePath = '/rendered/path/place'; const expectedParameters = { place_id: 'placeIdValue', @@ -338,7 +340,7 @@ describe('v1.AreaInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-maps-fleetengine-delivery/package.json b/packages/google-maps-fleetengine-delivery/package.json index 6c7a5153c15..10295259582 100644 --- a/packages/google-maps-fleetengine-delivery/package.json +++ b/packages/google-maps-fleetengine-delivery/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json b/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json index d9efc569b83..ec86f259087 100644 --- a/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json +++ b/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-delivery", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-fleetengine-delivery/src/v1/delivery_service_client.ts b/packages/google-maps-fleetengine-delivery/src/v1/delivery_service_client.ts index ad392a59699..22c0cccd3e8 100644 --- a/packages/google-maps-fleetengine-delivery/src/v1/delivery_service_client.ts +++ b/packages/google-maps-fleetengine-delivery/src/v1/delivery_service_client.ts @@ -535,7 +535,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDeliveryVehicle request %j', request); const wrappedCallback: | Callback< @@ -676,7 +678,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeliveryVehicle request %j', request); const wrappedCallback: | Callback< @@ -820,7 +824,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDeliveryVehicle request %j', request); const wrappedCallback: | Callback< @@ -971,7 +977,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDeliveryVehicle request %j', request); const wrappedCallback: | Callback< @@ -1113,7 +1121,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateTasks request %j', request); const wrappedCallback: | Callback< @@ -1271,7 +1281,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTask request %j', request); const wrappedCallback: | Callback< @@ -1396,7 +1408,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -1524,7 +1538,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTask request %j', request); const wrappedCallback: | Callback< @@ -1668,7 +1684,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTask request %j', request); const wrappedCallback: | Callback< @@ -1807,7 +1825,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTaskTrackingInfo request %j', request); const wrappedCallback: | Callback< @@ -1955,7 +1975,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.maps.fleetengine.delivery.v1.IListTasksRequest, @@ -2047,7 +2069,9 @@ export class DeliveryServiceClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -2121,7 +2145,9 @@ export class DeliveryServiceClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, @@ -2266,7 +2292,9 @@ export class DeliveryServiceClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.maps.fleetengine.delivery.v1.IListDeliveryVehiclesRequest, @@ -2374,7 +2402,9 @@ export class DeliveryServiceClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listDeliveryVehicles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeliveryVehicles stream %j', request); return this.descriptors.page.listDeliveryVehicles.createStream( this.innerApiCalls.listDeliveryVehicles as GaxCall, @@ -2464,7 +2494,9 @@ export class DeliveryServiceClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listDeliveryVehicles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeliveryVehicles iterate %j', request); return this.descriptors.page.listDeliveryVehicles.asyncIterate( this.innerApiCalls['listDeliveryVehicles'] as GaxCall, diff --git a/packages/google-maps-fleetengine-delivery/test/gapic_delivery_service_v1.ts b/packages/google-maps-fleetengine-delivery/test/gapic_delivery_service_v1.ts index a8508a1ade3..d6b0ef09b9c 100644 --- a/packages/google-maps-fleetengine-delivery/test/gapic_delivery_service_v1.ts +++ b/packages/google-maps-fleetengine-delivery/test/gapic_delivery_service_v1.ts @@ -252,7 +252,9 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.deliveryServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -340,7 +342,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -384,7 +386,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -415,7 +417,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -436,7 +438,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -465,7 +467,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -509,7 +511,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -537,7 +539,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -555,7 +557,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -584,7 +586,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -628,7 +630,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -659,7 +661,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -680,7 +682,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -710,7 +712,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -755,7 +757,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -787,7 +789,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -809,7 +811,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -837,7 +839,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -881,7 +883,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -909,7 +911,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -927,7 +929,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -955,7 +957,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -999,7 +1001,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -1027,7 +1029,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -1045,7 +1047,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -1073,7 +1075,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -1117,7 +1119,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1188,7 +1190,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1278,7 +1280,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1352,7 +1354,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1381,7 +1383,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1400,7 +1402,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1429,7 +1431,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1473,7 +1475,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1501,7 +1503,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1519,7 +1521,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1549,7 +1551,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1595,7 +1597,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1671,7 +1673,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1719,7 +1721,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1758,7 +1760,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1798,7 +1800,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1835,7 +1837,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1889,7 +1891,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1917,7 +1919,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1975,7 +1977,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -2022,7 +2024,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -2069,7 +2071,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -2104,7 +2106,7 @@ describe('v1.DeliveryServiceClient', () => { }); describe('Path templates', () => { - describe('deliveryVehicle', () => { + describe('deliveryVehicle', async () => { const fakePath = '/rendered/path/deliveryVehicle'; const expectedParameters = { provider: 'providerValue', @@ -2114,7 +2116,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deliveryVehiclePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2156,7 +2158,7 @@ describe('v1.DeliveryServiceClient', () => { }); }); - describe('provider', () => { + describe('provider', async () => { const fakePath = '/rendered/path/provider'; const expectedParameters = { provider: 'providerValue', @@ -2165,7 +2167,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.providerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2194,7 +2196,7 @@ describe('v1.DeliveryServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { provider: 'providerValue', @@ -2204,7 +2206,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2243,7 +2245,7 @@ describe('v1.DeliveryServiceClient', () => { }); }); - describe('taskTrackingInfo', () => { + describe('taskTrackingInfo', async () => { const fakePath = '/rendered/path/taskTrackingInfo'; const expectedParameters = { provider: 'providerValue', @@ -2253,7 +2255,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskTrackingInfoPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-maps-fleetengine/package.json b/packages/google-maps-fleetengine/package.json index fc632f1cf83..aa79797dac9 100644 --- a/packages/google-maps-fleetengine/package.json +++ b/packages/google-maps-fleetengine/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json b/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json index b211be4fdb6..394bd169385 100644 --- a/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json +++ b/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-fleetengine", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-fleetengine/src/v1/trip_service_client.ts b/packages/google-maps-fleetengine/src/v1/trip_service_client.ts index a7848252ce7..e1341dcabf7 100644 --- a/packages/google-maps-fleetengine/src/v1/trip_service_client.ts +++ b/packages/google-maps-fleetengine/src/v1/trip_service_client.ts @@ -468,7 +468,7 @@ export class TripServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('createTrip request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.ITrip, @@ -602,7 +602,7 @@ export class TripServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('getTrip request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.ITrip, @@ -709,7 +709,7 @@ export class TripServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('deleteTrip request %j', request); const wrappedCallback: Callback< protos.google.protobuf.IEmpty, @@ -825,7 +825,7 @@ export class TripServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('reportBillableTrip request %j', request); const wrappedCallback: Callback< protos.google.protobuf.IEmpty, @@ -974,7 +974,7 @@ export class TripServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('updateTrip request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.ITrip, @@ -1103,7 +1103,7 @@ export class TripServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); const wrappedCallback: PaginationCallback< protos.maps.fleetengine.v1.ISearchTripsRequest, protos.maps.fleetengine.v1.ISearchTripsResponse|null|undefined, @@ -1193,7 +1193,7 @@ export class TripServiceClient { ); const defaultCallSettings = this._defaults['searchTrips']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('searchTrips stream %j', request); return this.descriptors.page.searchTrips.createStream( this.innerApiCalls.searchTrips as GaxCall, @@ -1272,7 +1272,7 @@ export class TripServiceClient { ); const defaultCallSettings = this._defaults['searchTrips']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('searchTrips iterate %j', request); return this.descriptors.page.searchTrips.asyncIterate( this.innerApiCalls['searchTrips'] as GaxCall, diff --git a/packages/google-maps-fleetengine/src/v1/vehicle_service_client.ts b/packages/google-maps-fleetengine/src/v1/vehicle_service_client.ts index f0e10bc70ba..bff02e16bc1 100644 --- a/packages/google-maps-fleetengine/src/v1/vehicle_service_client.ts +++ b/packages/google-maps-fleetengine/src/v1/vehicle_service_client.ts @@ -486,7 +486,7 @@ export class VehicleServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('createVehicle request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.IVehicle, @@ -602,7 +602,7 @@ export class VehicleServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('getVehicle request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.IVehicle, @@ -710,7 +710,7 @@ export class VehicleServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('deleteVehicle request %j', request); const wrappedCallback: Callback< protos.google.protobuf.IEmpty, @@ -851,7 +851,7 @@ export class VehicleServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('updateVehicle request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.IVehicle, @@ -962,7 +962,7 @@ export class VehicleServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('updateVehicleAttributes request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.IUpdateVehicleAttributesResponse, @@ -1192,7 +1192,7 @@ export class VehicleServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('searchVehicles request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.v1.ISearchVehiclesResponse, @@ -1414,7 +1414,7 @@ export class VehicleServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); const wrappedCallback: PaginationCallback< protos.maps.fleetengine.v1.IListVehiclesRequest, protos.maps.fleetengine.v1.IListVehiclesResponse|null|undefined, @@ -1596,7 +1596,7 @@ export class VehicleServiceClient { ); const defaultCallSettings = this._defaults['listVehicles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('listVehicles stream %j', request); return this.descriptors.page.listVehicles.createStream( this.innerApiCalls.listVehicles as GaxCall, @@ -1767,7 +1767,7 @@ export class VehicleServiceClient { ); const defaultCallSettings = this._defaults['listVehicles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('listVehicles iterate %j', request); return this.descriptors.page.listVehicles.asyncIterate( this.innerApiCalls['listVehicles'] as GaxCall, diff --git a/packages/google-maps-fleetengine/test/gapic_trip_service_v1.ts b/packages/google-maps-fleetengine/test/gapic_trip_service_v1.ts index 8a63103c988..d734fbe5538 100644 --- a/packages/google-maps-fleetengine/test/gapic_trip_service_v1.ts +++ b/packages/google-maps-fleetengine/test/gapic_trip_service_v1.ts @@ -208,7 +208,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => {throw err}); assert(client.tripServiceStub); client.close().then(() => { done(); @@ -265,7 +265,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateTripRequest() ); @@ -291,7 +291,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateTripRequest() ); @@ -328,7 +328,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateTripRequest() ); @@ -351,7 +351,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateTripRequest() ); @@ -369,7 +369,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetTripRequest() ); @@ -395,7 +395,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetTripRequest() ); @@ -432,7 +432,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetTripRequest() ); @@ -455,7 +455,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetTripRequest() ); @@ -473,7 +473,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteTripRequest() ); @@ -499,7 +499,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteTripRequest() ); @@ -536,7 +536,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteTripRequest() ); @@ -559,7 +559,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteTripRequest() ); @@ -577,7 +577,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ReportBillableTripRequest() ); @@ -603,7 +603,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ReportBillableTripRequest() ); @@ -640,7 +640,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ReportBillableTripRequest() ); @@ -663,7 +663,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ReportBillableTripRequest() ); @@ -681,7 +681,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateTripRequest() ); @@ -707,7 +707,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateTripRequest() ); @@ -744,7 +744,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateTripRequest() ); @@ -767,7 +767,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateTripRequest() ); @@ -785,7 +785,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchTripsRequest() ); @@ -812,7 +812,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchTripsRequest() ); @@ -850,7 +850,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchTripsRequest() ); @@ -873,7 +873,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchTripsRequest() ); @@ -916,7 +916,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchTripsRequest() ); @@ -954,7 +954,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchTripsRequest() ); @@ -989,7 +989,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchTripsRequest() ); @@ -1019,7 +1019,7 @@ describe('v1.TripServiceClient', () => { describe('Path templates', () => { - describe('trip', () => { + describe('trip', async () => { const fakePath = "/rendered/path/trip"; const expectedParameters = { provider: "providerValue", @@ -1029,7 +1029,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tripPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.tripPathTemplate.match = @@ -1057,7 +1057,7 @@ describe('v1.TripServiceClient', () => { }); }); - describe('vehicle', () => { + describe('vehicle', async () => { const fakePath = "/rendered/path/vehicle"; const expectedParameters = { provider: "providerValue", @@ -1067,7 +1067,7 @@ describe('v1.TripServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vehiclePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.vehiclePathTemplate.match = diff --git a/packages/google-maps-fleetengine/test/gapic_vehicle_service_v1.ts b/packages/google-maps-fleetengine/test/gapic_vehicle_service_v1.ts index ca7c769b7c4..9315ba7ff68 100644 --- a/packages/google-maps-fleetengine/test/gapic_vehicle_service_v1.ts +++ b/packages/google-maps-fleetengine/test/gapic_vehicle_service_v1.ts @@ -208,7 +208,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => {throw err}); assert(client.vehicleServiceStub); client.close().then(() => { done(); @@ -265,7 +265,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateVehicleRequest() ); @@ -291,7 +291,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateVehicleRequest() ); @@ -328,7 +328,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateVehicleRequest() ); @@ -351,7 +351,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.CreateVehicleRequest() ); @@ -369,7 +369,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetVehicleRequest() ); @@ -395,7 +395,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetVehicleRequest() ); @@ -432,7 +432,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetVehicleRequest() ); @@ -455,7 +455,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.GetVehicleRequest() ); @@ -473,7 +473,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteVehicleRequest() ); @@ -499,7 +499,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteVehicleRequest() ); @@ -536,7 +536,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteVehicleRequest() ); @@ -559,7 +559,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.DeleteVehicleRequest() ); @@ -577,7 +577,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleRequest() ); @@ -603,7 +603,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleRequest() ); @@ -640,7 +640,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleRequest() ); @@ -663,7 +663,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleRequest() ); @@ -681,7 +681,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleAttributesRequest() ); @@ -707,7 +707,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleAttributesRequest() ); @@ -744,7 +744,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleAttributesRequest() ); @@ -767,7 +767,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.UpdateVehicleAttributesRequest() ); @@ -785,7 +785,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchVehiclesRequest() ); @@ -811,7 +811,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchVehiclesRequest() ); @@ -848,7 +848,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchVehiclesRequest() ); @@ -871,7 +871,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.SearchVehiclesRequest() ); @@ -889,7 +889,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ListVehiclesRequest() ); @@ -916,7 +916,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ListVehiclesRequest() ); @@ -954,7 +954,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ListVehiclesRequest() ); @@ -977,7 +977,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ListVehiclesRequest() ); @@ -1020,7 +1020,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ListVehiclesRequest() ); @@ -1058,7 +1058,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ListVehiclesRequest() ); @@ -1093,7 +1093,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.v1.ListVehiclesRequest() ); @@ -1123,7 +1123,7 @@ describe('v1.VehicleServiceClient', () => { describe('Path templates', () => { - describe('trip', () => { + describe('trip', async () => { const fakePath = "/rendered/path/trip"; const expectedParameters = { provider: "providerValue", @@ -1133,7 +1133,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tripPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.tripPathTemplate.match = @@ -1161,7 +1161,7 @@ describe('v1.VehicleServiceClient', () => { }); }); - describe('vehicle', () => { + describe('vehicle', async () => { const fakePath = "/rendered/path/vehicle"; const expectedParameters = { provider: "providerValue", @@ -1171,7 +1171,7 @@ describe('v1.VehicleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vehiclePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.vehiclePathTemplate.match = diff --git a/packages/google-maps-fleetengine/v1/package.json b/packages/google-maps-fleetengine/v1/package.json index 3436096f258..9af97efcb20 100644 --- a/packages/google-maps-fleetengine/v1/package.json +++ b/packages/google-maps-fleetengine/v1/package.json @@ -35,7 +35,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.3" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.7", @@ -48,7 +48,7 @@ "jsdoc-fresh": "^3.0.0", "jsdoc-region-tag": "^3.0.0", "mocha": "^10.7.3", - "pack-n-play": "^3.0.0", + "pack-n-play": "^2.0.3", "sinon": "^18.0.0", "typescript": "5.1.6" }, diff --git a/packages/google-maps-fleetengine/v1/src/v1/delivery_service_client.ts b/packages/google-maps-fleetengine/v1/src/v1/delivery_service_client.ts index b2b07d38da5..74150b9728f 100644 --- a/packages/google-maps-fleetengine/v1/src/v1/delivery_service_client.ts +++ b/packages/google-maps-fleetengine/v1/src/v1/delivery_service_client.ts @@ -448,7 +448,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('createDeliveryVehicle request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.IDeliveryVehicle, @@ -552,7 +552,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('getDeliveryVehicle request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.IDeliveryVehicle, @@ -659,7 +659,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('deleteDeliveryVehicle request %j', request); const wrappedCallback: Callback< protos.google.protobuf.IEmpty, @@ -773,7 +773,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('updateDeliveryVehicle request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.IDeliveryVehicle, @@ -884,7 +884,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('batchCreateTasks request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.IBatchCreateTasksResponse, @@ -1017,7 +1017,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('createTask request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.ITask, @@ -1120,7 +1120,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('getTask request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.ITask, @@ -1226,7 +1226,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('deleteTask request %j', request); const wrappedCallback: Callback< protos.google.protobuf.IEmpty, @@ -1348,7 +1348,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('updateTask request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.ITask, @@ -1453,7 +1453,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('getTaskTrackingInfo request %j', request); const wrappedCallback: Callback< protos.maps.fleetengine.delivery.v1.ITaskTrackingInfo, @@ -1578,7 +1578,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); const wrappedCallback: PaginationCallback< protos.maps.fleetengine.delivery.v1.IListTasksRequest, protos.maps.fleetengine.delivery.v1.IListTasksResponse|null|undefined, @@ -1664,7 +1664,7 @@ export class DeliveryServiceClient { ); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -1739,7 +1739,7 @@ export class DeliveryServiceClient { ); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, @@ -1866,7 +1866,7 @@ export class DeliveryServiceClient { ] = this._gaxModule.routingHeader.fromParams( routingParameter ); - this.initialize(); + this.initialize().catch(err => {throw err}); const wrappedCallback: PaginationCallback< protos.maps.fleetengine.delivery.v1.IListDeliveryVehiclesRequest, protos.maps.fleetengine.delivery.v1.IListDeliveryVehiclesResponse|null|undefined, @@ -1968,7 +1968,7 @@ export class DeliveryServiceClient { ); const defaultCallSettings = this._defaults['listDeliveryVehicles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('listDeliveryVehicles stream %j', request); return this.descriptors.page.listDeliveryVehicles.createStream( this.innerApiCalls.listDeliveryVehicles as GaxCall, @@ -2059,7 +2059,7 @@ export class DeliveryServiceClient { ); const defaultCallSettings = this._defaults['listDeliveryVehicles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => {throw err}); this._log.info('listDeliveryVehicles iterate %j', request); return this.descriptors.page.listDeliveryVehicles.asyncIterate( this.innerApiCalls['listDeliveryVehicles'] as GaxCall, diff --git a/packages/google-maps-fleetengine/v1/test/gapic_delivery_service_v1.ts b/packages/google-maps-fleetengine/v1/test/gapic_delivery_service_v1.ts index c1127bd5dc0..855d9b6d348 100644 --- a/packages/google-maps-fleetengine/v1/test/gapic_delivery_service_v1.ts +++ b/packages/google-maps-fleetengine/v1/test/gapic_delivery_service_v1.ts @@ -208,7 +208,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => {throw err}); assert(client.deliveryServiceStub); client.close().then(() => { done(); @@ -265,7 +265,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -291,7 +291,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -328,7 +328,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -351,7 +351,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest() ); @@ -369,7 +369,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -395,7 +395,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -432,7 +432,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -455,7 +455,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest() ); @@ -473,7 +473,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -499,7 +499,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -536,7 +536,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -559,7 +559,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest() ); @@ -577,7 +577,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -604,7 +604,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -642,7 +642,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -666,7 +666,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest() ); @@ -685,7 +685,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -711,7 +711,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -748,7 +748,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -771,7 +771,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.BatchCreateTasksRequest() ); @@ -789,7 +789,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -815,7 +815,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -852,7 +852,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -875,7 +875,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.CreateTaskRequest() ); @@ -893,7 +893,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -919,7 +919,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -956,7 +956,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -979,7 +979,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskRequest() ); @@ -997,7 +997,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1023,7 +1023,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1060,7 +1060,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1083,7 +1083,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.DeleteTaskRequest() ); @@ -1101,7 +1101,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1128,7 +1128,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1166,7 +1166,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1190,7 +1190,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.UpdateTaskRequest() ); @@ -1209,7 +1209,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1235,7 +1235,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1272,7 +1272,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1295,7 +1295,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest() ); @@ -1313,7 +1313,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1340,7 +1340,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1378,7 +1378,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1401,7 +1401,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1444,7 +1444,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1482,7 +1482,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1517,7 +1517,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListTasksRequest() ); @@ -1551,7 +1551,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1578,7 +1578,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1616,7 +1616,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1639,7 +1639,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1682,7 +1682,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1720,7 +1720,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1755,7 +1755,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest() ); @@ -1785,7 +1785,7 @@ describe('v1.DeliveryServiceClient', () => { describe('Path templates', () => { - describe('deliveryVehicle', () => { + describe('deliveryVehicle', async () => { const fakePath = "/rendered/path/deliveryVehicle"; const expectedParameters = { provider: "providerValue", @@ -1795,7 +1795,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deliveryVehiclePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.deliveryVehiclePathTemplate.match = @@ -1823,7 +1823,7 @@ describe('v1.DeliveryServiceClient', () => { }); }); - describe('provider', () => { + describe('provider', async () => { const fakePath = "/rendered/path/provider"; const expectedParameters = { provider: "providerValue", @@ -1832,7 +1832,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.providerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.providerPathTemplate.match = @@ -1853,7 +1853,7 @@ describe('v1.DeliveryServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = "/rendered/path/task"; const expectedParameters = { provider: "providerValue", @@ -1863,7 +1863,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.taskPathTemplate.match = @@ -1891,7 +1891,7 @@ describe('v1.DeliveryServiceClient', () => { }); }); - describe('taskTrackingInfo', () => { + describe('taskTrackingInfo', async () => { const fakePath = "/rendered/path/taskTrackingInfo"; const expectedParameters = { provider: "providerValue", @@ -1901,7 +1901,7 @@ describe('v1.DeliveryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskTrackingInfoPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.taskTrackingInfoPathTemplate.match = diff --git a/packages/google-maps-mapsplatformdatasets/package.json b/packages/google-maps-mapsplatformdatasets/package.json index c4f59b75711..72f3c2b043f 100644 --- a/packages/google-maps-mapsplatformdatasets/package.json +++ b/packages/google-maps-mapsplatformdatasets/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json index 6ebdf7f9028..082e5e4fc80 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "2.1.0", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json index 10c360251cd..e61785729e9 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "2.1.0", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json index 34e0e6db0e9..6fb56a5ebf9 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "2.1.0", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json index 34e0e6db0e9..6fb56a5ebf9 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "2.1.0", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client.ts b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client.ts index af929075d2e..3764fcf0e62 100644 --- a/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client.ts +++ b/packages/google-maps-mapsplatformdatasets/src/v1/maps_platform_datasets_client.ts @@ -490,7 +490,9 @@ export class MapsPlatformDatasetsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataset request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class MapsPlatformDatasetsClient { this._gaxModule.routingHeader.fromParams({ 'dataset.name': request.dataset!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDatasetMetadata request %j', request); const wrappedCallback: | Callback< @@ -747,7 +751,9 @@ export class MapsPlatformDatasetsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataset request %j', request); const wrappedCallback: | Callback< @@ -873,7 +879,9 @@ export class MapsPlatformDatasetsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataset request %j', request); const wrappedCallback: | Callback< @@ -1006,7 +1014,9 @@ export class MapsPlatformDatasetsClient { this._gaxModule.routingHeader.fromParams({ dataset: request.dataset ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.maps.mapsplatformdatasets.v1.IFetchDatasetErrorsRequest, @@ -1077,7 +1087,9 @@ export class MapsPlatformDatasetsClient { }); const defaultCallSettings = this._defaults['fetchDatasetErrors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDatasetErrors stream %j', request); return this.descriptors.page.fetchDatasetErrors.createStream( this.innerApiCalls.fetchDatasetErrors as GaxCall, @@ -1130,7 +1142,9 @@ export class MapsPlatformDatasetsClient { }); const defaultCallSettings = this._defaults['fetchDatasetErrors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDatasetErrors iterate %j', request); return this.descriptors.page.fetchDatasetErrors.asyncIterate( this.innerApiCalls['fetchDatasetErrors'] as GaxCall, @@ -1246,7 +1260,9 @@ export class MapsPlatformDatasetsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.maps.mapsplatformdatasets.v1.IListDatasetsRequest, @@ -1325,7 +1341,9 @@ export class MapsPlatformDatasetsClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets stream %j', request); return this.descriptors.page.listDatasets.createStream( this.innerApiCalls.listDatasets as GaxCall, @@ -1386,7 +1404,9 @@ export class MapsPlatformDatasetsClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets iterate %j', request); return this.descriptors.page.listDatasets.asyncIterate( this.innerApiCalls['listDatasets'] as GaxCall, diff --git a/packages/google-maps-mapsplatformdatasets/test/gapic_maps_platform_datasets_v1.ts b/packages/google-maps-mapsplatformdatasets/test/gapic_maps_platform_datasets_v1.ts index e3cebba76ad..4143ac2f105 100644 --- a/packages/google-maps-mapsplatformdatasets/test/gapic_maps_platform_datasets_v1.ts +++ b/packages/google-maps-mapsplatformdatasets/test/gapic_maps_platform_datasets_v1.ts @@ -266,7 +266,9 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.mapsPlatformDatasetsStub); client.close().then(() => { done(); @@ -329,7 +331,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest() ); @@ -361,7 +363,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest() ); @@ -409,7 +411,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest() ); @@ -441,7 +443,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.CreateDatasetRequest() ); @@ -463,7 +465,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest() ); @@ -497,7 +499,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest() ); @@ -546,7 +548,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest() ); @@ -582,7 +584,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.UpdateDatasetMetadataRequest() ); @@ -608,7 +610,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest() ); @@ -640,7 +642,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest() ); @@ -688,7 +690,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest() ); @@ -720,7 +722,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.GetDatasetRequest() ); @@ -742,7 +744,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest() ); @@ -774,7 +776,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest() ); @@ -822,7 +824,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest() ); @@ -854,7 +856,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.DeleteDatasetRequest() ); @@ -876,7 +878,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.FetchDatasetErrorsRequest() ); @@ -911,7 +913,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.FetchDatasetErrorsRequest() ); @@ -958,7 +960,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.FetchDatasetErrorsRequest() ); @@ -990,7 +992,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.FetchDatasetErrorsRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.FetchDatasetErrorsRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.FetchDatasetErrorsRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.FetchDatasetErrorsRequest() ); @@ -1176,7 +1178,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest() ); @@ -1216,7 +1218,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest() ); @@ -1274,7 +1276,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest() ); @@ -1421,7 +1423,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest() ); @@ -1472,7 +1474,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.mapsplatformdatasets.v1.ListDatasetsRequest() ); @@ -1510,7 +1512,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { }); describe('Path templates', () => { - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -1521,7 +1523,7 @@ describe('v1.MapsPlatformDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-maps-places/package.json b/packages/google-maps-places/package.json index cf4c46eda57..0975abd0f69 100644 --- a/packages/google-maps-places/package.json +++ b/packages/google-maps-places/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json b/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json index 0efe39bd865..fb340643348 100644 --- a/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json +++ b/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-places", - "version": "1.10.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json b/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json index 6df2f723194..6b0e6671bbb 100644 --- a/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json +++ b/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-places", - "version": "1.10.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-places/src/v1/places_client.ts b/packages/google-maps-places/src/v1/places_client.ts index 07a082e7398..8647e2ad4eb 100644 --- a/packages/google-maps-places/src/v1/places_client.ts +++ b/packages/google-maps-places/src/v1/places_client.ts @@ -562,7 +562,9 @@ export class PlacesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchNearby request %j', request); const wrappedCallback: | Callback< @@ -732,7 +734,9 @@ export class PlacesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchText request %j', request); const wrappedCallback: | Callback< @@ -873,7 +877,9 @@ export class PlacesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPhotoMedia request %j', request); const wrappedCallback: | Callback< @@ -1023,7 +1029,9 @@ export class PlacesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPlace request %j', request); const wrappedCallback: | Callback< @@ -1217,7 +1225,9 @@ export class PlacesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('autocompletePlaces request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-maps-places/test/gapic_places_v1.ts b/packages/google-maps-places/test/gapic_places_v1.ts index 2ac8ce5d929..12735068468 100644 --- a/packages/google-maps-places/test/gapic_places_v1.ts +++ b/packages/google-maps-places/test/gapic_places_v1.ts @@ -187,7 +187,9 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.placesStub); client.close().then(() => { done(); @@ -246,7 +248,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchNearbyRequest() ); @@ -263,7 +265,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchNearbyRequest() ); @@ -296,7 +298,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchNearbyRequest() ); @@ -313,7 +315,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchNearbyRequest() ); @@ -329,7 +331,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchTextRequest() ); @@ -346,7 +348,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchTextRequest() ); @@ -379,7 +381,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchTextRequest() ); @@ -396,7 +398,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.SearchTextRequest() ); @@ -412,7 +414,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPhotoMediaRequest() ); @@ -443,7 +445,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPhotoMediaRequest() ); @@ -490,7 +492,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPhotoMediaRequest() ); @@ -521,7 +523,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPhotoMediaRequest() ); @@ -542,7 +544,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPlaceRequest() ); @@ -573,7 +575,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPlaceRequest() ); @@ -620,7 +622,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPlaceRequest() ); @@ -648,7 +650,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.GetPlaceRequest() ); @@ -669,7 +671,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.AutocompletePlacesRequest() ); @@ -687,7 +689,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.AutocompletePlacesRequest() ); @@ -720,7 +722,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.AutocompletePlacesRequest() ); @@ -737,7 +739,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.places.v1.AutocompletePlacesRequest() ); @@ -748,7 +750,7 @@ describe('v1.PlacesClient', () => { }); describe('Path templates', () => { - describe('photo', () => { + describe('photo', async () => { const fakePath = '/rendered/path/photo'; const expectedParameters = { place: 'placeValue', @@ -758,7 +760,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.photoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -797,7 +799,7 @@ describe('v1.PlacesClient', () => { }); }); - describe('photoMedia', () => { + describe('photoMedia', async () => { const fakePath = '/rendered/path/photoMedia'; const expectedParameters = { place_id: 'placeIdValue', @@ -807,7 +809,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.photoMediaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -849,7 +851,7 @@ describe('v1.PlacesClient', () => { }); }); - describe('place', () => { + describe('place', async () => { const fakePath = '/rendered/path/place'; const expectedParameters = { place_id: 'placeIdValue', @@ -858,7 +860,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.placePathTemplate.render = sinon .stub() .returns(fakePath); @@ -887,7 +889,7 @@ describe('v1.PlacesClient', () => { }); }); - describe('review', () => { + describe('review', async () => { const fakePath = '/rendered/path/review'; const expectedParameters = { place: 'placeValue', @@ -897,7 +899,7 @@ describe('v1.PlacesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reviewPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-maps-routeoptimization/package.json b/packages/google-maps-routeoptimization/package.json index ff77387340f..77b0ae6cbd2 100644 --- a/packages/google-maps-routeoptimization/package.json +++ b/packages/google-maps-routeoptimization/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json b/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json index dd3f427c6be..9a6b160f1fe 100644 --- a/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json +++ b/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routeoptimization", - "version": "0.3.1", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routeoptimization/src/v1/route_optimization_client.ts b/packages/google-maps-routeoptimization/src/v1/route_optimization_client.ts index 80e174493a9..f5144ad2aad 100644 --- a/packages/google-maps-routeoptimization/src/v1/route_optimization_client.ts +++ b/packages/google-maps-routeoptimization/src/v1/route_optimization_client.ts @@ -697,7 +697,9 @@ export class RouteOptimizationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('optimizeTours request %j', request); const wrappedCallback: | Callback< @@ -859,7 +861,9 @@ export class RouteOptimizationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1021,7 +1025,7 @@ export class RouteOptimizationClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-maps-routeoptimization/test/gapic_route_optimization_v1.ts b/packages/google-maps-routeoptimization/test/gapic_route_optimization_v1.ts index fff5940a826..762f61f2dd4 100644 --- a/packages/google-maps-routeoptimization/test/gapic_route_optimization_v1.ts +++ b/packages/google-maps-routeoptimization/test/gapic_route_optimization_v1.ts @@ -248,7 +248,9 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.routeOptimizationStub); client.close().then(() => { done(); @@ -307,7 +309,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.OptimizeToursRequest() ); @@ -338,7 +340,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.OptimizeToursRequest() ); @@ -385,7 +387,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.OptimizeToursRequest() ); @@ -416,7 +418,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.OptimizeToursRequest() ); @@ -437,7 +439,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.BatchOptimizeToursRequest() ); @@ -470,7 +472,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.BatchOptimizeToursRequest() ); @@ -524,7 +526,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.BatchOptimizeToursRequest() ); @@ -555,7 +557,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routeoptimization.v1.BatchOptimizeToursRequest() ); @@ -588,7 +590,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -610,7 +612,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -630,7 +632,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -709,7 +711,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -789,7 +791,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -885,8 +887,7 @@ describe('v1.RouteOptimizationClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -905,7 +906,7 @@ describe('v1.RouteOptimizationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -914,8 +915,7 @@ describe('v1.RouteOptimizationClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-maps-routing/package.json b/packages/google-maps-routing/package.json index 598952e3647..413a6d0ac9a 100644 --- a/packages/google-maps-routing/package.json +++ b/packages/google-maps-routing/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json b/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json index 2ac6ac7968d..55c28287fa4 100644 --- a/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json +++ b/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routing", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json b/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json index 676198931bf..5139965b56f 100644 --- a/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json +++ b/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routing", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routing/src/v2/routes_client.ts b/packages/google-maps-routing/src/v2/routes_client.ts index 2d9ed36bb2a..97a24f58971 100644 --- a/packages/google-maps-routing/src/v2/routes_client.ts +++ b/packages/google-maps-routing/src/v2/routes_client.ts @@ -592,7 +592,9 @@ export class RoutesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeRoutes request %j', request); const wrappedCallback: | Callback< @@ -748,7 +750,9 @@ export class RoutesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeRouteMatrix stream %j', options); return this.innerApiCalls.computeRouteMatrix(request, options); } diff --git a/packages/google-maps-routing/test/gapic_routes_v2.ts b/packages/google-maps-routing/test/gapic_routes_v2.ts index f932984f97e..51caac1dbed 100644 --- a/packages/google-maps-routing/test/gapic_routes_v2.ts +++ b/packages/google-maps-routing/test/gapic_routes_v2.ts @@ -210,7 +210,9 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.routesStub); client.close().then(() => { done(); @@ -269,7 +271,7 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRoutesRequest() ); @@ -286,7 +288,7 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRoutesRequest() ); @@ -319,7 +321,7 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRoutesRequest() ); @@ -336,7 +338,7 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRoutesRequest() ); @@ -352,7 +354,7 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRouteMatrixRequest() ); @@ -379,9 +381,11 @@ describe('v2.RoutesClient', () => { it('invokes computeRouteMatrix without error and gaxServerStreamingRetries enabled', async () => { const client = new routesModule.v2.RoutesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', gaxServerStreamingRetries: true, }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRouteMatrixRequest() ); @@ -411,7 +415,7 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRouteMatrixRequest() ); @@ -440,7 +444,7 @@ describe('v2.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.routing.v2.ComputeRouteMatrixRequest() ); diff --git a/packages/google-maps-solar/package.json b/packages/google-maps-solar/package.json index cde74b100b4..490e1f03e1b 100644 --- a/packages/google-maps-solar/package.json +++ b/packages/google-maps-solar/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json b/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json index 33b947d403d..c12a6aaf472 100644 --- a/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json +++ b/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-solar", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-solar/src/v1/solar_client.ts b/packages/google-maps-solar/src/v1/solar_client.ts index 8aebc6707c1..e4932f5a065 100644 --- a/packages/google-maps-solar/src/v1/solar_client.ts +++ b/packages/google-maps-solar/src/v1/solar_client.ts @@ -465,7 +465,9 @@ export class SolarClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('findClosestBuildingInsights request %j', request); const wrappedCallback: | Callback< @@ -606,7 +608,9 @@ export class SolarClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataLayers request %j', request); const wrappedCallback: | Callback< @@ -708,7 +712,9 @@ export class SolarClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGeoTiff request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-maps-solar/test/gapic_solar_v1.ts b/packages/google-maps-solar/test/gapic_solar_v1.ts index 3104f5cde32..9e796588550 100644 --- a/packages/google-maps-solar/test/gapic_solar_v1.ts +++ b/packages/google-maps-solar/test/gapic_solar_v1.ts @@ -187,7 +187,9 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.solarStub); client.close().then(() => { done(); @@ -246,7 +248,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.FindClosestBuildingInsightsRequest() ); @@ -264,7 +266,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.FindClosestBuildingInsightsRequest() ); @@ -297,7 +299,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.FindClosestBuildingInsightsRequest() ); @@ -317,7 +319,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.FindClosestBuildingInsightsRequest() ); @@ -336,7 +338,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetDataLayersRequest() ); @@ -353,7 +355,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetDataLayersRequest() ); @@ -386,7 +388,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetDataLayersRequest() ); @@ -403,7 +405,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetDataLayersRequest() ); @@ -419,7 +421,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetGeoTiffRequest() ); @@ -436,7 +438,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetGeoTiffRequest() ); @@ -466,7 +468,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetGeoTiffRequest() ); @@ -483,7 +485,7 @@ describe('v1.SolarClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.maps.solar.v1.GetGeoTiffRequest() ); diff --git a/packages/google-marketingplatform-admin/package.json b/packages/google-marketingplatform-admin/package.json index fcd0fd22582..b6292c57530 100644 --- a/packages/google-marketingplatform-admin/package.json +++ b/packages/google-marketingplatform-admin/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json index 9eeeb4e6d94..8de0fc6ab23 100644 --- a/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts index 380fd384eb5..67b96545f15 100644 --- a/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts +++ b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts @@ -492,7 +492,9 @@ export class MarketingplatformAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrganization request %j', request); const wrappedCallback: | Callback< @@ -625,7 +627,9 @@ export class MarketingplatformAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAnalyticsAccountLink request %j', request); const wrappedCallback: | Callback< @@ -756,7 +760,9 @@ export class MarketingplatformAdminServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAnalyticsAccountLink request %j', request); const wrappedCallback: | Callback< @@ -890,7 +896,9 @@ export class MarketingplatformAdminServiceClient { this._gaxModule.routingHeader.fromParams({ analytics_account_link: request.analyticsAccountLink ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setPropertyServiceLevel request %j', request); const wrappedCallback: | Callback< @@ -1028,7 +1036,9 @@ export class MarketingplatformAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, @@ -1103,7 +1113,9 @@ export class MarketingplatformAdminServiceClient { }); const defaultCallSettings = this._defaults['listAnalyticsAccountLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnalyticsAccountLinks stream %j', request); return this.descriptors.page.listAnalyticsAccountLinks.createStream( this.innerApiCalls.listAnalyticsAccountLinks as GaxCall, @@ -1160,7 +1172,9 @@ export class MarketingplatformAdminServiceClient { }); const defaultCallSettings = this._defaults['listAnalyticsAccountLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnalyticsAccountLinks iterate %j', request); return this.descriptors.page.listAnalyticsAccountLinks.asyncIterate( this.innerApiCalls['listAnalyticsAccountLinks'] as GaxCall, diff --git a/packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts b/packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts index 2f7e09bbb90..4f910d891fe 100644 --- a/packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts +++ b/packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts @@ -280,7 +280,9 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.marketingplatformAdminServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() ); @@ -385,7 +387,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() ); @@ -435,7 +437,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() ); @@ -469,7 +471,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() ); @@ -493,7 +495,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() ); @@ -528,7 +530,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() ); @@ -578,7 +580,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() ); @@ -615,7 +617,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() ); @@ -642,7 +644,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() ); @@ -677,7 +679,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() ); @@ -727,7 +729,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() ); @@ -764,7 +766,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() ); @@ -791,7 +793,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() ); @@ -826,7 +828,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() ); @@ -876,7 +878,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() ); @@ -913,7 +915,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() ); @@ -940,7 +942,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() ); @@ -983,7 +985,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() ); @@ -1043,7 +1045,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() ); @@ -1080,7 +1082,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() ); @@ -1152,7 +1154,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() ); @@ -1213,7 +1215,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() ); @@ -1270,7 +1272,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() ); @@ -1312,7 +1314,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { }); describe('Path templates', () => { - describe('analyticsAccountLink', () => { + describe('analyticsAccountLink', async () => { const fakePath = '/rendered/path/analyticsAccountLink'; const expectedParameters = { organization: 'organizationValue', @@ -1325,7 +1327,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.analyticsAccountLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1380,7 +1382,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -1392,7 +1394,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1421,7 +1423,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { }); }); - describe('property', () => { + describe('property', async () => { const fakePath = '/rendered/path/property'; const expectedParameters = { property: 'propertyValue', @@ -1433,7 +1435,7 @@ describe('v1alpha.MarketingplatformAdminServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.propertyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 892a695b248..6c1282bde65 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -33,7 +33,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json index f83e31d740c..b3f3aa8fcd4 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json +++ b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dashboard", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json index 9be4127a9c0..6d4c85db476 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json +++ b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dashboard", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts index f12406b656a..26910de5100 100644 --- a/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts +++ b/packages/google-monitoring-dashboard/src/v1/dashboards_service_client.ts @@ -501,7 +501,9 @@ export class DashboardsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDashboard request %j', request); const wrappedCallback: | Callback< @@ -628,7 +630,9 @@ export class DashboardsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDashboard request %j', request); const wrappedCallback: | Callback< @@ -753,7 +757,9 @@ export class DashboardsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDashboard request %j', request); const wrappedCallback: | Callback< @@ -879,7 +885,9 @@ export class DashboardsServiceClient { this._gaxModule.routingHeader.fromParams({ 'dashboard.name': request.dashboard!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDashboard request %j', request); const wrappedCallback: | Callback< @@ -1016,7 +1024,9 @@ export class DashboardsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.monitoring.dashboard.v1.IListDashboardsRequest, @@ -1087,7 +1097,9 @@ export class DashboardsServiceClient { }); const defaultCallSettings = this._defaults['listDashboards']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDashboards stream %j', request); return this.descriptors.page.listDashboards.createStream( this.innerApiCalls.listDashboards as GaxCall, @@ -1140,7 +1152,9 @@ export class DashboardsServiceClient { }); const defaultCallSettings = this._defaults['listDashboards']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDashboards iterate %j', request); return this.descriptors.page.listDashboards.asyncIterate( this.innerApiCalls['listDashboards'] as GaxCall, diff --git a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts index 23f05f8ed0c..5e72289dd74 100644 --- a/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts +++ b/packages/google-monitoring-dashboard/test/gapic_dashboards_service_v1.ts @@ -253,7 +253,9 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dashboardsServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); @@ -343,7 +345,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); @@ -390,7 +392,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); @@ -421,7 +423,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.CreateDashboardRequest() ); @@ -442,7 +444,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); @@ -473,7 +475,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); @@ -520,7 +522,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); @@ -551,7 +553,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.GetDashboardRequest() ); @@ -572,7 +574,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); @@ -603,7 +605,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); @@ -650,7 +652,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); @@ -681,7 +683,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.DeleteDashboardRequest() ); @@ -702,7 +704,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); @@ -734,7 +736,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); @@ -782,7 +784,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); @@ -814,7 +816,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.UpdateDashboardRequest() ); @@ -836,7 +838,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); @@ -875,7 +877,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); @@ -930,7 +932,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); @@ -961,7 +963,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); @@ -1021,7 +1023,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.dashboard.v1.ListDashboardsRequest() ); @@ -1157,7 +1159,7 @@ describe('v1.DashboardsServiceClient', () => { }); describe('Path templates', () => { - describe('alertPolicy', () => { + describe('alertPolicy', async () => { const fakePath = '/rendered/path/alertPolicy'; const expectedParameters = { project: 'projectValue', @@ -1167,7 +1169,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.alertPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1209,7 +1211,7 @@ describe('v1.DashboardsServiceClient', () => { }); }); - describe('dashboard', () => { + describe('dashboard', async () => { const fakePath = '/rendered/path/dashboard'; const expectedParameters = { project: 'projectValue', @@ -1219,7 +1221,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dashboardPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1258,7 +1260,7 @@ describe('v1.DashboardsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1267,7 +1269,7 @@ describe('v1.DashboardsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-privacy-dlp/package.json b/packages/google-privacy-dlp/package.json index 9dc0479c89e..027f60bdace 100644 --- a/packages/google-privacy-dlp/package.json +++ b/packages/google-privacy-dlp/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json index 38c5a2944af..66a673a8b74 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json +++ b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dlp", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json index a43551fd5ba..414d45efb5c 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json +++ b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dlp", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts index 841887884a6..eaf4741aa51 100644 --- a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts +++ b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts @@ -734,7 +734,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('inspectContent request %j', request); const wrappedCallback: | Callback< @@ -876,7 +878,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('redactImage request %j', request); const wrappedCallback: | Callback< @@ -1038,7 +1042,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deidentifyContent request %j', request); const wrappedCallback: | Callback< @@ -1197,7 +1203,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reidentifyContent request %j', request); const wrappedCallback: | Callback< @@ -1321,7 +1329,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInfoTypes request %j', request); const wrappedCallback: | Callback< @@ -1467,7 +1477,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createInspectTemplate request %j', request); const wrappedCallback: | Callback< @@ -1595,7 +1607,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateInspectTemplate request %j', request); const wrappedCallback: | Callback< @@ -1719,7 +1733,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInspectTemplate request %j', request); const wrappedCallback: | Callback< @@ -1840,7 +1856,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteInspectTemplate request %j', request); const wrappedCallback: | Callback< @@ -1991,7 +2009,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDeidentifyTemplate request %j', request); const wrappedCallback: | Callback< @@ -2120,7 +2140,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDeidentifyTemplate request %j', request); const wrappedCallback: | Callback< @@ -2244,7 +2266,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeidentifyTemplate request %j', request); const wrappedCallback: | Callback< @@ -2369,7 +2393,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDeidentifyTemplate request %j', request); const wrappedCallback: | Callback< @@ -2510,7 +2536,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJobTrigger request %j', request); const wrappedCallback: | Callback< @@ -2628,7 +2656,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJobTrigger request %j', request); const wrappedCallback: | Callback< @@ -2749,7 +2779,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('hybridInspectJobTrigger request %j', request); const wrappedCallback: | Callback< @@ -2864,7 +2896,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJobTrigger request %j', request); const wrappedCallback: | Callback< @@ -2976,7 +3010,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJobTrigger request %j', request); const wrappedCallback: | Callback< @@ -3094,7 +3130,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('activateJobTrigger request %j', request); const wrappedCallback: | Callback< @@ -3231,7 +3269,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDiscoveryConfig request %j', request); const wrappedCallback: | Callback< @@ -3355,7 +3395,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDiscoveryConfig request %j', request); const wrappedCallback: | Callback< @@ -3475,7 +3517,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDiscoveryConfig request %j', request); const wrappedCallback: | Callback< @@ -3592,7 +3636,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDiscoveryConfig request %j', request); const wrappedCallback: | Callback< @@ -3739,7 +3785,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDlpJob request %j', request); const wrappedCallback: | Callback< @@ -3850,7 +3898,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDlpJob request %j', request); const wrappedCallback: | Callback< @@ -3963,7 +4013,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDlpJob request %j', request); const wrappedCallback: | Callback< @@ -4076,7 +4128,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelDlpJob request %j', request); const wrappedCallback: | Callback< @@ -4221,7 +4275,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createStoredInfoType request %j', request); const wrappedCallback: | Callback< @@ -4349,7 +4405,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateStoredInfoType request %j', request); const wrappedCallback: | Callback< @@ -4464,7 +4522,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStoredInfoType request %j', request); const wrappedCallback: | Callback< @@ -4585,7 +4645,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteStoredInfoType request %j', request); const wrappedCallback: | Callback< @@ -4702,7 +4764,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProjectDataProfile request %j', request); const wrappedCallback: | Callback< @@ -4822,7 +4886,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFileStoreDataProfile request %j', request); const wrappedCallback: | Callback< @@ -4948,7 +5014,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFileStoreDataProfile request %j', request); const wrappedCallback: | Callback< @@ -5068,7 +5136,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTableDataProfile request %j', request); const wrappedCallback: | Callback< @@ -5185,7 +5255,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getColumnDataProfile request %j', request); const wrappedCallback: | Callback< @@ -5302,7 +5374,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTableDataProfile request %j', request); const wrappedCallback: | Callback< @@ -5426,7 +5500,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('hybridInspectDlpJob request %j', request); const wrappedCallback: | Callback< @@ -5535,7 +5611,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('finishDlpJob request %j', request); const wrappedCallback: | Callback< @@ -5653,7 +5731,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConnection request %j', request); const wrappedCallback: | Callback< @@ -5762,7 +5842,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnection request %j', request); const wrappedCallback: | Callback< @@ -5871,7 +5953,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConnection request %j', request); const wrappedCallback: | Callback< @@ -5986,7 +6070,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConnection request %j', request); const wrappedCallback: | Callback< @@ -6150,7 +6236,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, @@ -6252,7 +6340,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listInspectTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInspectTemplates stream %j', request); return this.descriptors.page.listInspectTemplates.createStream( this.innerApiCalls.listInspectTemplates as GaxCall, @@ -6336,7 +6426,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listInspectTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInspectTemplates iterate %j', request); return this.descriptors.page.listInspectTemplates.asyncIterate( this.innerApiCalls['listInspectTemplates'] as GaxCall, @@ -6478,7 +6570,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, @@ -6580,7 +6674,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listDeidentifyTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeidentifyTemplates stream %j', request); return this.descriptors.page.listDeidentifyTemplates.createStream( this.innerApiCalls.listDeidentifyTemplates as GaxCall, @@ -6664,7 +6760,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listDeidentifyTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeidentifyTemplates iterate %j', request); return this.descriptors.page.listDeidentifyTemplates.asyncIterate( this.innerApiCalls['listDeidentifyTemplates'] as GaxCall, @@ -6825,7 +6923,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListJobTriggersRequest, @@ -6952,7 +7052,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listJobTriggers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobTriggers stream %j', request); return this.descriptors.page.listJobTriggers.createStream( this.innerApiCalls.listJobTriggers as GaxCall, @@ -7061,7 +7163,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listJobTriggers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobTriggers iterate %j', request); return this.descriptors.page.listJobTriggers.asyncIterate( this.innerApiCalls['listJobTriggers'] as GaxCall, @@ -7187,7 +7291,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, @@ -7276,7 +7382,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listDiscoveryConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDiscoveryConfigs stream %j', request); return this.descriptors.page.listDiscoveryConfigs.createStream( this.innerApiCalls.listDiscoveryConfigs as GaxCall, @@ -7347,7 +7455,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listDiscoveryConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDiscoveryConfigs iterate %j', request); return this.descriptors.page.listDiscoveryConfigs.asyncIterate( this.innerApiCalls['listDiscoveryConfigs'] as GaxCall, @@ -7508,7 +7618,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListDlpJobsRequest, @@ -7633,7 +7745,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listDlpJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDlpJobs stream %j', request); return this.descriptors.page.listDlpJobs.createStream( this.innerApiCalls.listDlpJobs as GaxCall, @@ -7742,7 +7856,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listDlpJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDlpJobs iterate %j', request); return this.descriptors.page.listDlpJobs.asyncIterate( this.innerApiCalls['listDlpJobs'] as GaxCall, @@ -7881,7 +7997,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, @@ -7980,7 +8098,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listStoredInfoTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStoredInfoTypes stream %j', request); return this.descriptors.page.listStoredInfoTypes.createStream( this.innerApiCalls.listStoredInfoTypes as GaxCall, @@ -8061,7 +8181,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listStoredInfoTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStoredInfoTypes iterate %j', request); return this.descriptors.page.listStoredInfoTypes.asyncIterate( this.innerApiCalls['listStoredInfoTypes'] as GaxCall, @@ -8203,7 +8325,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, @@ -8308,7 +8432,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listProjectDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProjectDataProfiles stream %j', request); return this.descriptors.page.listProjectDataProfiles.createStream( this.innerApiCalls.listProjectDataProfiles as GaxCall, @@ -8395,7 +8521,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listProjectDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProjectDataProfiles iterate %j', request); return this.descriptors.page.listProjectDataProfiles.asyncIterate( this.innerApiCalls['listProjectDataProfiles'] as GaxCall, @@ -8550,7 +8678,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, @@ -8668,7 +8798,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listTableDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTableDataProfiles stream %j', request); return this.descriptors.page.listTableDataProfiles.createStream( this.innerApiCalls.listTableDataProfiles as GaxCall, @@ -8768,7 +8900,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listTableDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTableDataProfiles iterate %j', request); return this.descriptors.page.listTableDataProfiles.asyncIterate( this.innerApiCalls['listTableDataProfiles'] as GaxCall, @@ -8925,7 +9059,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, @@ -9045,7 +9181,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listColumnDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listColumnDataProfiles stream %j', request); return this.descriptors.page.listColumnDataProfiles.createStream( this.innerApiCalls.listColumnDataProfiles as GaxCall, @@ -9147,7 +9285,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listColumnDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listColumnDataProfiles iterate %j', request); return this.descriptors.page.listColumnDataProfiles.asyncIterate( this.innerApiCalls['listColumnDataProfiles'] as GaxCall, @@ -9307,7 +9447,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, @@ -9430,7 +9572,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listFileStoreDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFileStoreDataProfiles stream %j', request); return this.descriptors.page.listFileStoreDataProfiles.createStream( this.innerApiCalls.listFileStoreDataProfiles as GaxCall, @@ -9535,7 +9679,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listFileStoreDataProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFileStoreDataProfiles iterate %j', request); return this.descriptors.page.listFileStoreDataProfiles.asyncIterate( this.innerApiCalls['listFileStoreDataProfiles'] as GaxCall, @@ -9637,7 +9783,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.IListConnectionsRequest, @@ -9707,7 +9855,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections stream %j', request); return this.descriptors.page.listConnections.createStream( this.innerApiCalls.listConnections as GaxCall, @@ -9759,7 +9909,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections iterate %j', request); return this.descriptors.page.listConnections.asyncIterate( this.innerApiCalls['listConnections'] as GaxCall, @@ -9866,7 +10018,9 @@ export class DlpServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.privacy.dlp.v2.ISearchConnectionsRequest, @@ -9936,7 +10090,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['searchConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchConnections stream %j', request); return this.descriptors.page.searchConnections.createStream( this.innerApiCalls.searchConnections as GaxCall, @@ -9988,7 +10144,9 @@ export class DlpServiceClient { }); const defaultCallSettings = this._defaults['searchConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchConnections iterate %j', request); return this.descriptors.page.searchConnections.asyncIterate( this.innerApiCalls['searchConnections'] as GaxCall, diff --git a/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts b/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts index 8db76ed625f..745b380c42c 100644 --- a/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts +++ b/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts @@ -250,7 +250,9 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dlpServiceStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.InspectContentRequest() ); @@ -340,7 +342,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.InspectContentRequest() ); @@ -387,7 +389,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.InspectContentRequest() ); @@ -418,7 +420,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.InspectContentRequest() ); @@ -439,7 +441,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.RedactImageRequest() ); @@ -470,7 +472,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.RedactImageRequest() ); @@ -517,7 +519,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.RedactImageRequest() ); @@ -548,7 +550,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.RedactImageRequest() ); @@ -569,7 +571,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeidentifyContentRequest() ); @@ -600,7 +602,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeidentifyContentRequest() ); @@ -647,7 +649,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeidentifyContentRequest() ); @@ -678,7 +680,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeidentifyContentRequest() ); @@ -699,7 +701,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ReidentifyContentRequest() ); @@ -730,7 +732,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ReidentifyContentRequest() ); @@ -777,7 +779,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ReidentifyContentRequest() ); @@ -808,7 +810,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ReidentifyContentRequest() ); @@ -829,7 +831,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInfoTypesRequest() ); @@ -860,7 +862,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInfoTypesRequest() ); @@ -907,7 +909,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInfoTypesRequest() ); @@ -938,7 +940,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInfoTypesRequest() ); @@ -959,7 +961,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest() ); @@ -991,7 +993,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest() ); @@ -1038,7 +1040,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest() ); @@ -1072,7 +1074,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest() ); @@ -1096,7 +1098,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest() ); @@ -1128,7 +1130,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest() ); @@ -1175,7 +1177,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest() ); @@ -1209,7 +1211,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest() ); @@ -1233,7 +1235,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetInspectTemplateRequest() ); @@ -1265,7 +1267,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetInspectTemplateRequest() ); @@ -1312,7 +1314,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetInspectTemplateRequest() ); @@ -1343,7 +1345,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetInspectTemplateRequest() ); @@ -1364,7 +1366,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest() ); @@ -1396,7 +1398,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest() ); @@ -1443,7 +1445,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest() ); @@ -1477,7 +1479,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest() ); @@ -1501,7 +1503,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest() ); @@ -1533,7 +1535,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest() ); @@ -1580,7 +1582,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest() ); @@ -1614,7 +1616,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest() ); @@ -1638,7 +1640,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest() ); @@ -1670,7 +1672,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest() ); @@ -1717,7 +1719,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest() ); @@ -1751,7 +1753,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest() ); @@ -1775,7 +1777,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest() ); @@ -1807,7 +1809,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest() ); @@ -1854,7 +1856,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest() ); @@ -1888,7 +1890,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest() ); @@ -1912,7 +1914,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest() ); @@ -1944,7 +1946,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest() ); @@ -1991,7 +1993,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest() ); @@ -2025,7 +2027,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest() ); @@ -2049,7 +2051,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateJobTriggerRequest() ); @@ -2080,7 +2082,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateJobTriggerRequest() ); @@ -2127,7 +2129,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateJobTriggerRequest() ); @@ -2158,7 +2160,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateJobTriggerRequest() ); @@ -2179,7 +2181,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest() ); @@ -2210,7 +2212,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest() ); @@ -2257,7 +2259,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest() ); @@ -2288,7 +2290,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest() ); @@ -2309,7 +2311,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest() ); @@ -2341,7 +2343,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest() ); @@ -2388,7 +2390,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest() ); @@ -2422,7 +2424,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest() ); @@ -2446,7 +2448,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetJobTriggerRequest() ); @@ -2477,7 +2479,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetJobTriggerRequest() ); @@ -2524,7 +2526,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetJobTriggerRequest() ); @@ -2555,7 +2557,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetJobTriggerRequest() ); @@ -2576,7 +2578,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest() ); @@ -2607,7 +2609,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest() ); @@ -2654,7 +2656,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest() ); @@ -2685,7 +2687,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest() ); @@ -2706,7 +2708,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest() ); @@ -2738,7 +2740,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest() ); @@ -2785,7 +2787,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest() ); @@ -2816,7 +2818,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest() ); @@ -2837,7 +2839,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest() ); @@ -2869,7 +2871,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest() ); @@ -2916,7 +2918,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest() ); @@ -2950,7 +2952,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest() ); @@ -2974,7 +2976,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest() ); @@ -3006,7 +3008,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest() ); @@ -3053,7 +3055,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest() ); @@ -3087,7 +3089,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest() ); @@ -3111,7 +3113,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest() ); @@ -3143,7 +3145,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest() ); @@ -3190,7 +3192,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest() ); @@ -3221,7 +3223,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest() ); @@ -3242,7 +3244,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest() ); @@ -3274,7 +3276,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest() ); @@ -3321,7 +3323,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest() ); @@ -3355,7 +3357,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest() ); @@ -3379,7 +3381,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDlpJobRequest() ); @@ -3410,7 +3412,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDlpJobRequest() ); @@ -3457,7 +3459,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDlpJobRequest() ); @@ -3488,7 +3490,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateDlpJobRequest() ); @@ -3509,7 +3511,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDlpJobRequest() ); @@ -3540,7 +3542,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDlpJobRequest() ); @@ -3587,7 +3589,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDlpJobRequest() ); @@ -3615,7 +3617,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetDlpJobRequest() ); @@ -3636,7 +3638,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDlpJobRequest() ); @@ -3667,7 +3669,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDlpJobRequest() ); @@ -3714,7 +3716,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDlpJobRequest() ); @@ -3745,7 +3747,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteDlpJobRequest() ); @@ -3766,7 +3768,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CancelDlpJobRequest() ); @@ -3797,7 +3799,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CancelDlpJobRequest() ); @@ -3844,7 +3846,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CancelDlpJobRequest() ); @@ -3875,7 +3877,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CancelDlpJobRequest() ); @@ -3896,7 +3898,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest() ); @@ -3928,7 +3930,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest() ); @@ -3975,7 +3977,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest() ); @@ -4006,7 +4008,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest() ); @@ -4027,7 +4029,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest() ); @@ -4059,7 +4061,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest() ); @@ -4106,7 +4108,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest() ); @@ -4137,7 +4139,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest() ); @@ -4158,7 +4160,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest() ); @@ -4189,7 +4191,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest() ); @@ -4236,7 +4238,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest() ); @@ -4267,7 +4269,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest() ); @@ -4288,7 +4290,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest() ); @@ -4320,7 +4322,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest() ); @@ -4367,7 +4369,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest() ); @@ -4398,7 +4400,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest() ); @@ -4419,7 +4421,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest() ); @@ -4451,7 +4453,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest() ); @@ -4498,7 +4500,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest() ); @@ -4532,7 +4534,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest() ); @@ -4556,7 +4558,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest() ); @@ -4588,7 +4590,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest() ); @@ -4635,7 +4637,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest() ); @@ -4669,7 +4671,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest() ); @@ -4693,7 +4695,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest() ); @@ -4725,7 +4727,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest() ); @@ -4772,7 +4774,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest() ); @@ -4806,7 +4808,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest() ); @@ -4830,7 +4832,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetTableDataProfileRequest() ); @@ -4862,7 +4864,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetTableDataProfileRequest() ); @@ -4909,7 +4911,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetTableDataProfileRequest() ); @@ -4940,7 +4942,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetTableDataProfileRequest() ); @@ -4961,7 +4963,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest() ); @@ -4993,7 +4995,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest() ); @@ -5040,7 +5042,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest() ); @@ -5071,7 +5073,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest() ); @@ -5092,7 +5094,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest() ); @@ -5124,7 +5126,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest() ); @@ -5171,7 +5173,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest() ); @@ -5205,7 +5207,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest() ); @@ -5229,7 +5231,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest() ); @@ -5261,7 +5263,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest() ); @@ -5308,7 +5310,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest() ); @@ -5339,7 +5341,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest() ); @@ -5360,7 +5362,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.FinishDlpJobRequest() ); @@ -5391,7 +5393,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.FinishDlpJobRequest() ); @@ -5438,7 +5440,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.FinishDlpJobRequest() ); @@ -5469,7 +5471,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.FinishDlpJobRequest() ); @@ -5490,7 +5492,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateConnectionRequest() ); @@ -5521,7 +5523,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateConnectionRequest() ); @@ -5568,7 +5570,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateConnectionRequest() ); @@ -5599,7 +5601,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.CreateConnectionRequest() ); @@ -5620,7 +5622,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetConnectionRequest() ); @@ -5651,7 +5653,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetConnectionRequest() ); @@ -5698,7 +5700,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetConnectionRequest() ); @@ -5729,7 +5731,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.GetConnectionRequest() ); @@ -5750,7 +5752,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteConnectionRequest() ); @@ -5781,7 +5783,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteConnectionRequest() ); @@ -5828,7 +5830,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteConnectionRequest() ); @@ -5859,7 +5861,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.DeleteConnectionRequest() ); @@ -5880,7 +5882,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateConnectionRequest() ); @@ -5911,7 +5913,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateConnectionRequest() ); @@ -5958,7 +5960,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateConnectionRequest() ); @@ -5989,7 +5991,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.UpdateConnectionRequest() ); @@ -6010,7 +6012,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest() ); @@ -6050,7 +6052,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest() ); @@ -6105,7 +6107,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest() ); @@ -6136,7 +6138,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest() ); @@ -6196,7 +6198,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest() ); @@ -6245,7 +6247,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest() ); @@ -6294,7 +6296,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest() ); @@ -6336,7 +6338,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest() ); @@ -6376,7 +6378,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest() ); @@ -6431,7 +6433,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest() ); @@ -6465,7 +6467,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest() ); @@ -6531,7 +6533,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest() ); @@ -6586,7 +6588,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest() ); @@ -6639,7 +6641,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest() ); @@ -6686,7 +6688,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListJobTriggersRequest() ); @@ -6719,7 +6721,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListJobTriggersRequest() ); @@ -6768,7 +6770,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListJobTriggersRequest() ); @@ -6799,7 +6801,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListJobTriggersRequest() ); @@ -6853,7 +6855,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListJobTriggersRequest() ); @@ -6902,7 +6904,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListJobTriggersRequest() ); @@ -6945,7 +6947,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListJobTriggersRequest() ); @@ -6987,7 +6989,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest() ); @@ -7027,7 +7029,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest() ); @@ -7082,7 +7084,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest() ); @@ -7113,7 +7115,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest() ); @@ -7173,7 +7175,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest() ); @@ -7222,7 +7224,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest() ); @@ -7271,7 +7273,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest() ); @@ -7313,7 +7315,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDlpJobsRequest() ); @@ -7346,7 +7348,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDlpJobsRequest() ); @@ -7395,7 +7397,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDlpJobsRequest() ); @@ -7426,7 +7428,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDlpJobsRequest() ); @@ -7477,7 +7479,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDlpJobsRequest() ); @@ -7525,7 +7527,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDlpJobsRequest() ); @@ -7568,7 +7570,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListDlpJobsRequest() ); @@ -7612,7 +7614,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest() ); @@ -7652,7 +7654,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest() ); @@ -7707,7 +7709,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest() ); @@ -7738,7 +7740,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest() ); @@ -7798,7 +7800,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest() ); @@ -7847,7 +7849,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest() ); @@ -7896,7 +7898,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest() ); @@ -7938,7 +7940,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest() ); @@ -7978,7 +7980,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest() ); @@ -8033,7 +8035,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest() ); @@ -8067,7 +8069,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest() ); @@ -8133,7 +8135,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest() ); @@ -8188,7 +8190,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest() ); @@ -8241,7 +8243,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest() ); @@ -8288,7 +8290,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest() ); @@ -8328,7 +8330,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest() ); @@ -8383,7 +8385,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest() ); @@ -8417,7 +8419,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest() ); @@ -8483,7 +8485,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest() ); @@ -8538,7 +8540,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest() ); @@ -8591,7 +8593,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest() ); @@ -8637,7 +8639,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest() ); @@ -8677,7 +8679,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest() ); @@ -8732,7 +8734,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest() ); @@ -8766,7 +8768,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest() ); @@ -8832,7 +8834,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest() ); @@ -8887,7 +8889,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest() ); @@ -8940,7 +8942,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest() ); @@ -8986,7 +8988,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest() ); @@ -9026,7 +9028,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest() ); @@ -9081,7 +9083,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest() ); @@ -9115,7 +9117,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest() ); @@ -9182,7 +9184,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest() ); @@ -9238,7 +9240,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest() ); @@ -9292,7 +9294,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest() ); @@ -9339,7 +9341,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListConnectionsRequest() ); @@ -9372,7 +9374,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListConnectionsRequest() ); @@ -9421,7 +9423,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListConnectionsRequest() ); @@ -9452,7 +9454,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListConnectionsRequest() ); @@ -9506,7 +9508,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListConnectionsRequest() ); @@ -9555,7 +9557,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListConnectionsRequest() ); @@ -9598,7 +9600,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.ListConnectionsRequest() ); @@ -9640,7 +9642,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.SearchConnectionsRequest() ); @@ -9673,7 +9675,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.SearchConnectionsRequest() ); @@ -9722,7 +9724,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.SearchConnectionsRequest() ); @@ -9753,7 +9755,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.SearchConnectionsRequest() ); @@ -9807,7 +9809,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.SearchConnectionsRequest() ); @@ -9856,7 +9858,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.SearchConnectionsRequest() ); @@ -9899,7 +9901,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.privacy.dlp.v2.SearchConnectionsRequest() ); @@ -9940,7 +9942,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9970,7 +9972,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10014,7 +10016,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10049,7 +10051,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10097,7 +10099,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10134,7 +10136,7 @@ describe('v2.DlpServiceClient', () => { }); describe('Path templates', () => { - describe('discoveryConfig', () => { + describe('discoveryConfig', async () => { const fakePath = '/rendered/path/discoveryConfig'; const expectedParameters = { project: 'projectValue', @@ -10145,7 +10147,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.discoveryConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10199,7 +10201,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('finding', () => { + describe('finding', async () => { const fakePath = '/rendered/path/finding'; const expectedParameters = { project: 'projectValue', @@ -10210,7 +10212,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.findingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10263,7 +10265,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -10273,7 +10275,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10312,7 +10314,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -10321,7 +10323,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10350,7 +10352,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationDeidentifyTemplate', () => { + describe('organizationDeidentifyTemplate', async () => { const fakePath = '/rendered/path/organizationDeidentifyTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -10360,7 +10362,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationDeidentifyTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationDeidentifyTemplatePathTemplate.match = @@ -10415,7 +10417,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationInspectTemplate', () => { + describe('organizationInspectTemplate', async () => { const fakePath = '/rendered/path/organizationInspectTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -10425,7 +10427,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationInspectTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationInspectTemplatePathTemplate.match = sinon @@ -10479,7 +10481,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocation', () => { + describe('organizationLocation', async () => { const fakePath = '/rendered/path/organizationLocation'; const expectedParameters = { organization: 'organizationValue', @@ -10489,7 +10491,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10542,7 +10544,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationColumnDataProfile', () => { + describe('organizationLocationColumnDataProfile', async () => { const fakePath = '/rendered/path/organizationLocationColumnDataProfile'; const expectedParameters = { organization: 'organizationValue', @@ -10553,7 +10555,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationColumnDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationColumnDataProfilePathTemplate.match = @@ -10629,7 +10631,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationConnection', () => { + describe('organizationLocationConnection', async () => { const fakePath = '/rendered/path/organizationLocationConnection'; const expectedParameters = { organization: 'organizationValue', @@ -10640,7 +10642,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationConnectionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationConnectionPathTemplate.match = @@ -10710,7 +10712,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationDeidentifyTemplate', () => { + describe('organizationLocationDeidentifyTemplate', async () => { const fakePath = '/rendered/path/organizationLocationDeidentifyTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -10721,7 +10723,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match = @@ -10797,7 +10799,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationFileStoreDataProfile', () => { + describe('organizationLocationFileStoreDataProfile', async () => { const fakePath = '/rendered/path/organizationLocationFileStoreDataProfile'; const expectedParameters = { @@ -10809,7 +10811,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.match = @@ -10885,7 +10887,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationInspectTemplate', () => { + describe('organizationLocationInspectTemplate', async () => { const fakePath = '/rendered/path/organizationLocationInspectTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -10896,7 +10898,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInspectTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInspectTemplatePathTemplate.match = @@ -10968,7 +10970,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationProjectDataProfile', () => { + describe('organizationLocationProjectDataProfile', async () => { const fakePath = '/rendered/path/organizationLocationProjectDataProfile'; const expectedParameters = { organization: 'organizationValue', @@ -10979,7 +10981,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationProjectDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationProjectDataProfilePathTemplate.match = @@ -11055,7 +11057,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationStoredInfoType', () => { + describe('organizationLocationStoredInfoType', async () => { const fakePath = '/rendered/path/organizationLocationStoredInfoType'; const expectedParameters = { organization: 'organizationValue', @@ -11066,7 +11068,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationStoredInfoTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationStoredInfoTypePathTemplate.match = @@ -11138,7 +11140,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationLocationTableDataProfile', () => { + describe('organizationLocationTableDataProfile', async () => { const fakePath = '/rendered/path/organizationLocationTableDataProfile'; const expectedParameters = { organization: 'organizationValue', @@ -11149,7 +11151,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationTableDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationTableDataProfilePathTemplate.match = @@ -11225,7 +11227,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('organizationStoredInfoType', () => { + describe('organizationStoredInfoType', async () => { const fakePath = '/rendered/path/organizationStoredInfoType'; const expectedParameters = { organization: 'organizationValue', @@ -11235,7 +11237,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationStoredInfoTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -11290,7 +11292,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -11299,7 +11301,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11328,7 +11330,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectDeidentifyTemplate', () => { + describe('projectDeidentifyTemplate', async () => { const fakePath = '/rendered/path/projectDeidentifyTemplate'; const expectedParameters = { project: 'projectValue', @@ -11338,7 +11340,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectDeidentifyTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -11393,7 +11395,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectDlpContent', () => { + describe('projectDlpContent', async () => { const fakePath = '/rendered/path/projectDlpContent'; const expectedParameters = { project: 'projectValue', @@ -11402,7 +11404,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectDlpContentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11437,7 +11439,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectDlpJob', () => { + describe('projectDlpJob', async () => { const fakePath = '/rendered/path/projectDlpJob'; const expectedParameters = { project: 'projectValue', @@ -11447,7 +11449,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectDlpJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11486,7 +11488,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectInspectTemplate', () => { + describe('projectInspectTemplate', async () => { const fakePath = '/rendered/path/projectInspectTemplate'; const expectedParameters = { project: 'projectValue', @@ -11496,7 +11498,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectInspectTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -11549,7 +11551,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectJobTrigger', () => { + describe('projectJobTrigger', async () => { const fakePath = '/rendered/path/projectJobTrigger'; const expectedParameters = { project: 'projectValue', @@ -11559,7 +11561,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectJobTriggerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11611,7 +11613,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationColumnDataProfile', () => { + describe('projectLocationColumnDataProfile', async () => { const fakePath = '/rendered/path/projectLocationColumnDataProfile'; const expectedParameters = { project: 'projectValue', @@ -11622,7 +11624,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationColumnDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationColumnDataProfilePathTemplate.match = @@ -11692,7 +11694,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationConnection', () => { + describe('projectLocationConnection', async () => { const fakePath = '/rendered/path/projectLocationConnection'; const expectedParameters = { project: 'projectValue', @@ -11703,7 +11705,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11771,7 +11773,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationDeidentifyTemplate', () => { + describe('projectLocationDeidentifyTemplate', async () => { const fakePath = '/rendered/path/projectLocationDeidentifyTemplate'; const expectedParameters = { project: 'projectValue', @@ -11782,7 +11784,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match = @@ -11854,7 +11856,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationDlpJob', () => { + describe('projectLocationDlpJob', async () => { const fakePath = '/rendered/path/projectLocationDlpJob'; const expectedParameters = { project: 'projectValue', @@ -11865,7 +11867,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDlpJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11933,7 +11935,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationFileStoreDataProfile', () => { + describe('projectLocationFileStoreDataProfile', async () => { const fakePath = '/rendered/path/projectLocationFileStoreDataProfile'; const expectedParameters = { project: 'projectValue', @@ -11944,7 +11946,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.match = @@ -12016,7 +12018,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationInspectTemplate', () => { + describe('projectLocationInspectTemplate', async () => { const fakePath = '/rendered/path/projectLocationInspectTemplate'; const expectedParameters = { project: 'projectValue', @@ -12027,7 +12029,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInspectTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationInspectTemplatePathTemplate.match = @@ -12095,7 +12097,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationJobTrigger', () => { + describe('projectLocationJobTrigger', async () => { const fakePath = '/rendered/path/projectLocationJobTrigger'; const expectedParameters = { project: 'projectValue', @@ -12106,7 +12108,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationJobTriggerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -12174,7 +12176,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationProjectDataProfile', () => { + describe('projectLocationProjectDataProfile', async () => { const fakePath = '/rendered/path/projectLocationProjectDataProfile'; const expectedParameters = { project: 'projectValue', @@ -12185,7 +12187,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationProjectDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationProjectDataProfilePathTemplate.match = @@ -12257,7 +12259,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationStoredInfoType', () => { + describe('projectLocationStoredInfoType', async () => { const fakePath = '/rendered/path/projectLocationStoredInfoType'; const expectedParameters = { project: 'projectValue', @@ -12268,7 +12270,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationStoredInfoTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationStoredInfoTypePathTemplate.match = @@ -12336,7 +12338,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectLocationTableDataProfile', () => { + describe('projectLocationTableDataProfile', async () => { const fakePath = '/rendered/path/projectLocationTableDataProfile'; const expectedParameters = { project: 'projectValue', @@ -12347,7 +12349,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationTableDataProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationTableDataProfilePathTemplate.match = @@ -12415,7 +12417,7 @@ describe('v2.DlpServiceClient', () => { }); }); - describe('projectStoredInfoType', () => { + describe('projectStoredInfoType', async () => { const fakePath = '/rendered/path/projectStoredInfoType'; const expectedParameters = { project: 'projectValue', @@ -12425,7 +12427,7 @@ describe('v2.DlpServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectStoredInfoTypePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-css/package.json b/packages/google-shopping-css/package.json index d5cb2eb71f6..a7edbfc2e5f 100644 --- a/packages/google-shopping-css/package.json +++ b/packages/google-shopping-css/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json b/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json index 9f189ef4900..82e8e7e3a4b 100644 --- a/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json +++ b/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-css", - "version": "0.7.0", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-css/src/v1/account_labels_service_client.ts b/packages/google-shopping-css/src/v1/account_labels_service_client.ts index 11280b677f0..0e54d35422a 100644 --- a/packages/google-shopping-css/src/v1/account_labels_service_client.ts +++ b/packages/google-shopping-css/src/v1/account_labels_service_client.ts @@ -485,7 +485,9 @@ export class AccountLabelsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAccountLabel request %j', request); const wrappedCallback: | Callback< @@ -601,7 +603,9 @@ export class AccountLabelsServiceClient { this._gaxModule.routingHeader.fromParams({ 'account_label.name': request.accountLabel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccountLabel request %j', request); const wrappedCallback: | Callback< @@ -718,7 +722,9 @@ export class AccountLabelsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAccountLabel request %j', request); const wrappedCallback: | Callback< @@ -850,7 +856,9 @@ export class AccountLabelsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.css.v1.IListAccountLabelsRequest, @@ -923,7 +931,9 @@ export class AccountLabelsServiceClient { }); const defaultCallSettings = this._defaults['listAccountLabels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountLabels stream %j', request); return this.descriptors.page.listAccountLabels.createStream( this.innerApiCalls.listAccountLabels as GaxCall, @@ -978,7 +988,9 @@ export class AccountLabelsServiceClient { }); const defaultCallSettings = this._defaults['listAccountLabels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountLabels iterate %j', request); return this.descriptors.page.listAccountLabels.asyncIterate( this.innerApiCalls['listAccountLabels'] as GaxCall, diff --git a/packages/google-shopping-css/src/v1/accounts_service_client.ts b/packages/google-shopping-css/src/v1/accounts_service_client.ts index 10d82e71709..d93e9158479 100644 --- a/packages/google-shopping-css/src/v1/accounts_service_client.ts +++ b/packages/google-shopping-css/src/v1/accounts_service_client.ts @@ -478,7 +478,9 @@ export class AccountsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccount request %j', request); const wrappedCallback: | Callback< @@ -600,7 +602,9 @@ export class AccountsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateLabels request %j', request); const wrappedCallback: | Callback< @@ -738,7 +742,9 @@ export class AccountsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.css.v1.IListChildAccountsRequest, @@ -816,7 +822,9 @@ export class AccountsServiceClient { }); const defaultCallSettings = this._defaults['listChildAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChildAccounts stream %j', request); return this.descriptors.page.listChildAccounts.createStream( this.innerApiCalls.listChildAccounts as GaxCall, @@ -876,7 +884,9 @@ export class AccountsServiceClient { }); const defaultCallSettings = this._defaults['listChildAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChildAccounts iterate %j', request); return this.descriptors.page.listChildAccounts.asyncIterate( this.innerApiCalls['listChildAccounts'] as GaxCall, diff --git a/packages/google-shopping-css/src/v1/css_product_inputs_service_client.ts b/packages/google-shopping-css/src/v1/css_product_inputs_service_client.ts index e8be32419ea..3e1d35a8b81 100644 --- a/packages/google-shopping-css/src/v1/css_product_inputs_service_client.ts +++ b/packages/google-shopping-css/src/v1/css_product_inputs_service_client.ts @@ -486,7 +486,9 @@ export class CssProductInputsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertCssProductInput request %j', request); const wrappedCallback: | Callback< @@ -626,7 +628,9 @@ export class CssProductInputsServiceClient { this._gaxModule.routingHeader.fromParams({ 'css_product_input.name': request.cssProductInput!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCssProductInput request %j', request); const wrappedCallback: | Callback< @@ -754,7 +758,9 @@ export class CssProductInputsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCssProductInput request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-css/src/v1/css_products_service_client.ts b/packages/google-shopping-css/src/v1/css_products_service_client.ts index eadb0bf32de..0c59daa54cb 100644 --- a/packages/google-shopping-css/src/v1/css_products_service_client.ts +++ b/packages/google-shopping-css/src/v1/css_products_service_client.ts @@ -474,7 +474,9 @@ export class CssProductsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCssProduct request %j', request); const wrappedCallback: | Callback< @@ -606,7 +608,9 @@ export class CssProductsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.css.v1.IListCssProductsRequest, @@ -679,7 +683,9 @@ export class CssProductsServiceClient { }); const defaultCallSettings = this._defaults['listCssProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCssProducts stream %j', request); return this.descriptors.page.listCssProducts.createStream( this.innerApiCalls.listCssProducts as GaxCall, @@ -734,7 +740,9 @@ export class CssProductsServiceClient { }); const defaultCallSettings = this._defaults['listCssProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCssProducts iterate %j', request); return this.descriptors.page.listCssProducts.asyncIterate( this.innerApiCalls['listCssProducts'] as GaxCall, diff --git a/packages/google-shopping-css/test/gapic_account_labels_service_v1.ts b/packages/google-shopping-css/test/gapic_account_labels_service_v1.ts index e65ef6f3669..baec3c1d21d 100644 --- a/packages/google-shopping-css/test/gapic_account_labels_service_v1.ts +++ b/packages/google-shopping-css/test/gapic_account_labels_service_v1.ts @@ -263,7 +263,9 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.accountLabelsServiceStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.CreateAccountLabelRequest() ); @@ -359,7 +361,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.CreateAccountLabelRequest() ); @@ -407,7 +409,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.CreateAccountLabelRequest() ); @@ -439,7 +441,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.CreateAccountLabelRequest() ); @@ -461,7 +463,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelRequest() ); @@ -495,7 +497,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelRequest() ); @@ -544,7 +546,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelRequest() ); @@ -577,7 +579,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelRequest() ); @@ -600,7 +602,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteAccountLabelRequest() ); @@ -633,7 +635,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteAccountLabelRequest() ); @@ -681,7 +683,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteAccountLabelRequest() ); @@ -713,7 +715,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteAccountLabelRequest() ); @@ -735,7 +737,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListAccountLabelsRequest() ); @@ -769,7 +771,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListAccountLabelsRequest() ); @@ -819,7 +821,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListAccountLabelsRequest() ); @@ -851,7 +853,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListAccountLabelsRequest() ); @@ -906,7 +908,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListAccountLabelsRequest() ); @@ -956,7 +958,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListAccountLabelsRequest() ); @@ -1000,7 +1002,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListAccountLabelsRequest() ); @@ -1037,7 +1039,7 @@ describe('v1.AccountLabelsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1047,7 +1049,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1076,7 +1078,7 @@ describe('v1.AccountLabelsServiceClient', () => { }); }); - describe('accountLabel', () => { + describe('accountLabel', async () => { const fakePath = '/rendered/path/accountLabel'; const expectedParameters = { account: 'accountValue', @@ -1087,7 +1089,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountLabelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1126,7 +1128,7 @@ describe('v1.AccountLabelsServiceClient', () => { }); }); - describe('cssProduct', () => { + describe('cssProduct', async () => { const fakePath = '/rendered/path/cssProduct'; const expectedParameters = { account: 'accountValue', @@ -1137,7 +1139,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1176,7 +1178,7 @@ describe('v1.AccountLabelsServiceClient', () => { }); }); - describe('cssProductInput', () => { + describe('cssProductInput', async () => { const fakePath = '/rendered/path/cssProductInput'; const expectedParameters = { account: 'accountValue', @@ -1187,7 +1189,7 @@ describe('v1.AccountLabelsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductInputPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-css/test/gapic_accounts_service_v1.ts b/packages/google-shopping-css/test/gapic_accounts_service_v1.ts index dc3e017fe4a..1f8d021d6d2 100644 --- a/packages/google-shopping-css/test/gapic_accounts_service_v1.ts +++ b/packages/google-shopping-css/test/gapic_accounts_service_v1.ts @@ -252,7 +252,9 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.accountsServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetAccountRequest() ); @@ -342,7 +344,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetAccountRequest() ); @@ -389,7 +391,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetAccountRequest() ); @@ -420,7 +422,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetAccountRequest() ); @@ -441,7 +443,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelsRequest() ); @@ -472,7 +474,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelsRequest() ); @@ -519,7 +521,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelsRequest() ); @@ -550,7 +552,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateAccountLabelsRequest() ); @@ -571,7 +573,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListChildAccountsRequest() ); @@ -604,7 +606,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListChildAccountsRequest() ); @@ -653,7 +655,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListChildAccountsRequest() ); @@ -684,7 +686,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListChildAccountsRequest() ); @@ -735,7 +737,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListChildAccountsRequest() ); @@ -781,7 +783,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListChildAccountsRequest() ); @@ -824,7 +826,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListChildAccountsRequest() ); @@ -861,7 +863,7 @@ describe('v1.AccountsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -870,7 +872,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -899,7 +901,7 @@ describe('v1.AccountsServiceClient', () => { }); }); - describe('accountLabel', () => { + describe('accountLabel', async () => { const fakePath = '/rendered/path/accountLabel'; const expectedParameters = { account: 'accountValue', @@ -909,7 +911,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountLabelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -948,7 +950,7 @@ describe('v1.AccountsServiceClient', () => { }); }); - describe('cssProduct', () => { + describe('cssProduct', async () => { const fakePath = '/rendered/path/cssProduct'; const expectedParameters = { account: 'accountValue', @@ -958,7 +960,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductPathTemplate.render = sinon .stub() .returns(fakePath); @@ -997,7 +999,7 @@ describe('v1.AccountsServiceClient', () => { }); }); - describe('cssProductInput', () => { + describe('cssProductInput', async () => { const fakePath = '/rendered/path/cssProductInput'; const expectedParameters = { account: 'accountValue', @@ -1007,7 +1009,7 @@ describe('v1.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductInputPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-css/test/gapic_css_product_inputs_service_v1.ts b/packages/google-shopping-css/test/gapic_css_product_inputs_service_v1.ts index 0e63001bc28..b0cd939ae0f 100644 --- a/packages/google-shopping-css/test/gapic_css_product_inputs_service_v1.ts +++ b/packages/google-shopping-css/test/gapic_css_product_inputs_service_v1.ts @@ -202,7 +202,9 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cssProductInputsServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.InsertCssProductInputRequest() ); @@ -298,7 +300,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.InsertCssProductInputRequest() ); @@ -346,7 +348,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.InsertCssProductInputRequest() ); @@ -381,7 +383,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.InsertCssProductInputRequest() ); @@ -406,7 +408,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateCssProductInputRequest() ); @@ -440,7 +442,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateCssProductInputRequest() ); @@ -489,7 +491,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateCssProductInputRequest() ); @@ -525,7 +527,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.UpdateCssProductInputRequest() ); @@ -551,7 +553,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteCssProductInputRequest() ); @@ -584,7 +586,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteCssProductInputRequest() ); @@ -632,7 +634,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteCssProductInputRequest() ); @@ -667,7 +669,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.DeleteCssProductInputRequest() ); @@ -686,7 +688,7 @@ describe('v1.CssProductInputsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -696,7 +698,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -725,7 +727,7 @@ describe('v1.CssProductInputsServiceClient', () => { }); }); - describe('accountLabel', () => { + describe('accountLabel', async () => { const fakePath = '/rendered/path/accountLabel'; const expectedParameters = { account: 'accountValue', @@ -736,7 +738,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountLabelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -775,7 +777,7 @@ describe('v1.CssProductInputsServiceClient', () => { }); }); - describe('cssProduct', () => { + describe('cssProduct', async () => { const fakePath = '/rendered/path/cssProduct'; const expectedParameters = { account: 'accountValue', @@ -786,7 +788,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductPathTemplate.render = sinon .stub() .returns(fakePath); @@ -825,7 +827,7 @@ describe('v1.CssProductInputsServiceClient', () => { }); }); - describe('cssProductInput', () => { + describe('cssProductInput', async () => { const fakePath = '/rendered/path/cssProductInput'; const expectedParameters = { account: 'accountValue', @@ -836,7 +838,7 @@ describe('v1.CssProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductInputPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-css/test/gapic_css_products_service_v1.ts b/packages/google-shopping-css/test/gapic_css_products_service_v1.ts index b275f96953e..c53fcc290d0 100644 --- a/packages/google-shopping-css/test/gapic_css_products_service_v1.ts +++ b/packages/google-shopping-css/test/gapic_css_products_service_v1.ts @@ -254,7 +254,9 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cssProductsServiceStub); client.close().then(() => { done(); @@ -313,7 +315,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetCssProductRequest() ); @@ -344,7 +346,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetCssProductRequest() ); @@ -391,7 +393,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetCssProductRequest() ); @@ -422,7 +424,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.GetCssProductRequest() ); @@ -443,7 +445,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListCssProductsRequest() ); @@ -476,7 +478,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListCssProductsRequest() ); @@ -525,7 +527,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListCssProductsRequest() ); @@ -556,7 +558,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListCssProductsRequest() ); @@ -610,7 +612,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListCssProductsRequest() ); @@ -659,7 +661,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListCssProductsRequest() ); @@ -702,7 +704,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.css.v1.ListCssProductsRequest() ); @@ -739,7 +741,7 @@ describe('v1.CssProductsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -748,7 +750,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -777,7 +779,7 @@ describe('v1.CssProductsServiceClient', () => { }); }); - describe('accountLabel', () => { + describe('accountLabel', async () => { const fakePath = '/rendered/path/accountLabel'; const expectedParameters = { account: 'accountValue', @@ -787,7 +789,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountLabelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -826,7 +828,7 @@ describe('v1.CssProductsServiceClient', () => { }); }); - describe('cssProduct', () => { + describe('cssProduct', async () => { const fakePath = '/rendered/path/cssProduct'; const expectedParameters = { account: 'accountValue', @@ -836,7 +838,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductPathTemplate.render = sinon .stub() .returns(fakePath); @@ -875,7 +877,7 @@ describe('v1.CssProductsServiceClient', () => { }); }); - describe('cssProductInput', () => { + describe('cssProductInput', async () => { const fakePath = '/rendered/path/cssProductInput'; const expectedParameters = { account: 'accountValue', @@ -885,7 +887,7 @@ describe('v1.CssProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cssProductInputPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/package.json b/packages/google-shopping-merchant-accounts/package.json index ae03a3ef7d6..1eb7468daf6 100644 --- a/packages/google-shopping-merchant-accounts/package.json +++ b/packages/google-shopping-merchant-accounts/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json index ea8062b1c16..7e5c32ff582 100644 --- a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accounts", - "version": "1.0.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts index e4e0c4ea4f4..d5ca820b9fb 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/account_issue_service_client.ts @@ -539,7 +539,9 @@ export class AccountIssueServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListAccountIssuesRequest, @@ -620,7 +622,9 @@ export class AccountIssueServiceClient { }); const defaultCallSettings = this._defaults['listAccountIssues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountIssues stream %j', request); return this.descriptors.page.listAccountIssues.createStream( this.innerApiCalls.listAccountIssues as GaxCall, @@ -683,7 +687,9 @@ export class AccountIssueServiceClient { }); const defaultCallSettings = this._defaults['listAccountIssues']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountIssues iterate %j', request); return this.descriptors.page.listAccountIssues.asyncIterate( this.innerApiCalls['listAccountIssues'] as GaxCall, diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts index 1171872366f..9e205b72bd7 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/account_tax_service_client.ts @@ -529,7 +529,9 @@ export class AccountTaxServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccountTax request %j', request); const wrappedCallback: | Callback< @@ -656,7 +658,9 @@ export class AccountTaxServiceClient { this._gaxModule.routingHeader.fromParams({ 'account_tax.name': request.accountTax!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccountTax request %j', request); const wrappedCallback: | Callback< @@ -788,7 +792,9 @@ export class AccountTaxServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListAccountTaxRequest, @@ -855,7 +861,9 @@ export class AccountTaxServiceClient { }); const defaultCallSettings = this._defaults['listAccountTax']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountTax stream %j', request); return this.descriptors.page.listAccountTax.createStream( this.innerApiCalls.listAccountTax as GaxCall, @@ -904,7 +912,9 @@ export class AccountTaxServiceClient { }); const defaultCallSettings = this._defaults['listAccountTax']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccountTax iterate %j', request); return this.descriptors.page.listAccountTax.asyncIterate( this.innerApiCalls['listAccountTax'] as GaxCall, diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts index 9fc7e6a924e..c291de39f9c 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/accounts_service_client.ts @@ -536,7 +536,9 @@ export class AccountsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAccount request %j', request); const wrappedCallback: | Callback< @@ -670,7 +672,9 @@ export class AccountsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAndConfigureAccount request %j', request); const wrappedCallback: | Callback< @@ -804,7 +808,9 @@ export class AccountsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAccount request %j', request); const wrappedCallback: | Callback< @@ -932,7 +938,9 @@ export class AccountsServiceClient { this._gaxModule.routingHeader.fromParams({ 'account.name': request.account!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccount request %j', request); const wrappedCallback: | Callback< @@ -1069,7 +1077,9 @@ export class AccountsServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListAccountsRequest, @@ -1139,7 +1149,9 @@ export class AccountsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccounts stream %j', request); return this.descriptors.page.listAccounts.createStream( this.innerApiCalls.listAccounts as GaxCall, @@ -1191,7 +1203,9 @@ export class AccountsServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAccounts iterate %j', request); return this.descriptors.page.listAccounts.asyncIterate( this.innerApiCalls['listAccounts'] as GaxCall, @@ -1304,7 +1318,9 @@ export class AccountsServiceClient { this._gaxModule.routingHeader.fromParams({ provider: request.provider ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListSubAccountsRequest, @@ -1376,7 +1392,9 @@ export class AccountsServiceClient { }); const defaultCallSettings = this._defaults['listSubAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubAccounts stream %j', request); return this.descriptors.page.listSubAccounts.createStream( this.innerApiCalls.listSubAccounts as GaxCall, @@ -1430,7 +1448,9 @@ export class AccountsServiceClient { }); const defaultCallSettings = this._defaults['listSubAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubAccounts iterate %j', request); return this.descriptors.page.listSubAccounts.asyncIterate( this.innerApiCalls['listSubAccounts'] as GaxCall, diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts index 087ad63a55f..ed47240c02b 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/autofeed_settings_service_client.ts @@ -514,7 +514,9 @@ export class AutofeedSettingsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAutofeedSettings request %j', request); const wrappedCallback: | Callback< @@ -641,7 +643,9 @@ export class AutofeedSettingsServiceClient { this._gaxModule.routingHeader.fromParams({ 'autofeed_settings.name': request.autofeedSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAutofeedSettings request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts index e9757f24e01..de688829ec7 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/automatic_improvements_service_client.ts @@ -515,7 +515,9 @@ export class AutomaticImprovementsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAutomaticImprovements request %j', request); const wrappedCallback: | Callback< @@ -652,7 +654,9 @@ export class AutomaticImprovementsServiceClient { 'automatic_improvements.name': request.automaticImprovements!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAutomaticImprovements request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts index 8363edbef10..6b3e06556f8 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/business_identity_service_client.ts @@ -514,7 +514,9 @@ export class BusinessIdentityServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBusinessIdentity request %j', request); const wrappedCallback: | Callback< @@ -642,7 +644,9 @@ export class BusinessIdentityServiceClient { this._gaxModule.routingHeader.fromParams({ 'business_identity.name': request.businessIdentity!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBusinessIdentity request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts index 5c1e235eb60..258f5214346 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/business_info_service_client.ts @@ -512,7 +512,9 @@ export class BusinessInfoServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBusinessInfo request %j', request); const wrappedCallback: | Callback< @@ -640,7 +642,9 @@ export class BusinessInfoServiceClient { this._gaxModule.routingHeader.fromParams({ 'business_info.name': request.businessInfo!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBusinessInfo request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts index ecfc2322388..fe3edfadfec 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/email_preferences_service_client.ts @@ -519,7 +519,9 @@ export class EmailPreferencesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEmailPreferences request %j', request); const wrappedCallback: | Callback< @@ -656,7 +658,9 @@ export class EmailPreferencesServiceClient { this._gaxModule.routingHeader.fromParams({ 'email_preferences.name': request.emailPreferences!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEmailPreferences request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts index d0fcb3f7b7b..baf2c0bb087 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/homepage_service_client.ts @@ -514,7 +514,9 @@ export class HomepageServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHomepage request %j', request); const wrappedCallback: | Callback< @@ -641,7 +643,9 @@ export class HomepageServiceClient { this._gaxModule.routingHeader.fromParams({ 'homepage.name': request.homepage!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateHomepage request %j', request); const wrappedCallback: | Callback< @@ -780,7 +784,9 @@ export class HomepageServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('claimHomepage request %j', request); const wrappedCallback: | Callback< @@ -906,7 +912,9 @@ export class HomepageServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('unclaimHomepage request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts index 6e9d8d5f621..83fc578f6b9 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/online_return_policy_service_client.ts @@ -530,7 +530,9 @@ export class OnlineReturnPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOnlineReturnPolicy request %j', request); const wrappedCallback: | Callback< @@ -669,7 +671,9 @@ export class OnlineReturnPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListOnlineReturnPoliciesRequest, @@ -746,7 +750,9 @@ export class OnlineReturnPolicyServiceClient { }); const defaultCallSettings = this._defaults['listOnlineReturnPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOnlineReturnPolicies stream %j', request); return this.descriptors.page.listOnlineReturnPolicies.createStream( this.innerApiCalls.listOnlineReturnPolicies as GaxCall, @@ -805,7 +811,9 @@ export class OnlineReturnPolicyServiceClient { }); const defaultCallSettings = this._defaults['listOnlineReturnPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOnlineReturnPolicies iterate %j', request); return this.descriptors.page.listOnlineReturnPolicies.asyncIterate( this.innerApiCalls['listOnlineReturnPolicies'] as GaxCall, diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts index 24574d47324..d26bc8be64b 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/programs_service_client.ts @@ -537,7 +537,9 @@ export class ProgramsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProgram request %j', request); const wrappedCallback: | Callback< @@ -664,7 +666,9 @@ export class ProgramsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enableProgram request %j', request); const wrappedCallback: | Callback< @@ -791,7 +795,9 @@ export class ProgramsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('disableProgram request %j', request); const wrappedCallback: | Callback< @@ -922,7 +928,9 @@ export class ProgramsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListProgramsRequest, @@ -991,7 +999,9 @@ export class ProgramsServiceClient { }); const defaultCallSettings = this._defaults['listPrograms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrograms stream %j', request); return this.descriptors.page.listPrograms.createStream( this.innerApiCalls.listPrograms as GaxCall, @@ -1042,7 +1052,9 @@ export class ProgramsServiceClient { }); const defaultCallSettings = this._defaults['listPrograms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrograms iterate %j', request); return this.descriptors.page.listPrograms.asyncIterate( this.innerApiCalls['listPrograms'] as GaxCall, diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts index 553aaf47aa0..636ef373932 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/regions_service_client.ts @@ -532,7 +532,9 @@ export class RegionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRegion request %j', request); const wrappedCallback: | Callback< @@ -664,7 +666,9 @@ export class RegionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRegion request %j', request); const wrappedCallback: | Callback< @@ -794,7 +798,9 @@ export class RegionsServiceClient { this._gaxModule.routingHeader.fromParams({ 'region.name': request.region!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRegion request %j', request); const wrappedCallback: | Callback< @@ -921,7 +927,9 @@ export class RegionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRegion request %j', request); const wrappedCallback: | Callback< @@ -1056,7 +1064,9 @@ export class RegionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListRegionsRequest, @@ -1129,7 +1139,9 @@ export class RegionsServiceClient { }); const defaultCallSettings = this._defaults['listRegions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegions stream %j', request); return this.descriptors.page.listRegions.createStream( this.innerApiCalls.listRegions as GaxCall, @@ -1184,7 +1196,9 @@ export class RegionsServiceClient { }); const defaultCallSettings = this._defaults['listRegions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegions iterate %j', request); return this.descriptors.page.listRegions.asyncIterate( this.innerApiCalls['listRegions'] as GaxCall, diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts index 1aa67da1af2..ab605d5f844 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/shipping_settings_service_client.ts @@ -514,7 +514,9 @@ export class ShippingSettingsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getShippingSettings request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class ShippingSettingsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertShippingSettings request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts index bdd63d5ce1f..7cef1e9ffcb 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_agreement_state_service_client.ts @@ -514,7 +514,9 @@ export class TermsOfServiceAgreementStateServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTermsOfServiceAgreementState request %j', request); const wrappedCallback: | Callback< @@ -646,7 +648,9 @@ export class TermsOfServiceAgreementStateServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'retrieveForApplicationTermsOfServiceAgreementState request %j', request diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts index dd0915e0e19..ed7567dff74 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/terms_of_service_service_client.ts @@ -514,7 +514,9 @@ export class TermsOfServiceServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTermsOfService request %j', request); const wrappedCallback: | Callback< @@ -640,7 +642,9 @@ export class TermsOfServiceServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveLatestTermsOfService request %j', request); const wrappedCallback: | Callback< @@ -772,7 +776,9 @@ export class TermsOfServiceServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('acceptTermsOfService request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts b/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts index 8078f61b043..ca4f5936c3d 100644 --- a/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts +++ b/packages/google-shopping-merchant-accounts/src/v1beta/user_service_client.ts @@ -532,7 +532,9 @@ export class UserServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUser request %j', request); const wrappedCallback: | Callback< @@ -664,7 +666,9 @@ export class UserServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUser request %j', request); const wrappedCallback: | Callback< @@ -794,7 +798,9 @@ export class UserServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUser request %j', request); const wrappedCallback: | Callback< @@ -925,7 +931,9 @@ export class UserServiceClient { this._gaxModule.routingHeader.fromParams({ 'user.name': request.user!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUser request %j', request); const wrappedCallback: | Callback< @@ -1059,7 +1067,9 @@ export class UserServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.accounts.v1beta.IListUsersRequest, @@ -1131,7 +1141,9 @@ export class UserServiceClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers stream %j', request); return this.descriptors.page.listUsers.createStream( this.innerApiCalls.listUsers as GaxCall, @@ -1185,7 +1197,9 @@ export class UserServiceClient { }); const defaultCallSettings = this._defaults['listUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsers iterate %j', request); return this.descriptors.page.listUsers.asyncIterate( this.innerApiCalls['listUsers'] as GaxCall, diff --git a/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts index 3a5a1d525d3..abaab6fb8c6 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_account_issue_service_v1beta.ts @@ -265,7 +265,9 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.accountIssueServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest() ); @@ -368,7 +370,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest() ); @@ -426,7 +428,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest() ); @@ -458,7 +460,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest() ); @@ -522,7 +524,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest() ); @@ -575,7 +577,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest() ); @@ -626,7 +628,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest() ); @@ -664,7 +666,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -674,7 +676,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -703,7 +705,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -714,7 +716,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -753,7 +755,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -764,7 +766,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -803,7 +805,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -813,7 +815,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -845,7 +847,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -855,7 +857,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -891,7 +893,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -901,7 +903,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -933,7 +935,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -943,7 +945,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -972,7 +974,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -983,7 +985,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1028,7 +1030,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1038,7 +1040,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1067,7 +1069,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1078,7 +1080,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1130,7 +1132,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1141,7 +1143,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1180,7 +1182,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1191,7 +1193,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1230,7 +1232,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1240,7 +1242,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1272,7 +1274,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1282,7 +1284,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1311,7 +1313,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1322,7 +1324,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1373,7 +1375,7 @@ describe('v1beta.AccountIssueServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1384,7 +1386,7 @@ describe('v1beta.AccountIssueServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts index 2c4d1e23d89..2028f6329ef 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_account_tax_service_v1beta.ts @@ -263,7 +263,9 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.accountTaxServiceStub); client.close().then(() => { done(); @@ -330,7 +332,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest() ); @@ -363,7 +365,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest() ); @@ -412,7 +414,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest() ); @@ -445,7 +447,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountTaxRequest() ); @@ -468,7 +470,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest() ); @@ -502,7 +504,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest() ); @@ -552,7 +554,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest() ); @@ -586,7 +588,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountTaxRequest() ); @@ -610,7 +612,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest() ); @@ -651,7 +653,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest() ); @@ -710,7 +712,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest() ); @@ -743,7 +745,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest() ); @@ -808,7 +810,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest() ); @@ -862,7 +864,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest() ); @@ -914,7 +916,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountTaxRequest() ); @@ -952,7 +954,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -963,7 +965,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -992,7 +994,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -1004,7 +1006,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1043,7 +1045,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -1055,7 +1057,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1094,7 +1096,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -1105,7 +1107,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1137,7 +1139,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -1148,7 +1150,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1184,7 +1186,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -1195,7 +1197,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1227,7 +1229,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -1238,7 +1240,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1267,7 +1269,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -1279,7 +1281,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1324,7 +1326,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1335,7 +1337,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1364,7 +1366,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1376,7 +1378,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1428,7 +1430,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1440,7 +1442,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1479,7 +1481,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1491,7 +1493,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1530,7 +1532,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1541,7 +1543,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1573,7 +1575,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1584,7 +1586,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1613,7 +1615,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1625,7 +1627,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1676,7 +1678,7 @@ describe('v1beta.AccountTaxServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1688,7 +1690,7 @@ describe('v1beta.AccountTaxServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts index f5c9912a419..cbfd2a759d6 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_accounts_service_v1beta.ts @@ -253,7 +253,9 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.accountsServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountRequest() ); @@ -343,7 +345,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountRequest() ); @@ -390,7 +392,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountRequest() ); @@ -421,7 +423,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAccountRequest() ); @@ -442,7 +444,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest() ); @@ -460,7 +462,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest() ); @@ -493,7 +495,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest() ); @@ -513,7 +515,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest() ); @@ -532,7 +534,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest() ); @@ -563,7 +565,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest() ); @@ -610,7 +612,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest() ); @@ -641,7 +643,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteAccountRequest() ); @@ -662,7 +664,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest() ); @@ -694,7 +696,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest() ); @@ -742,7 +744,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest() ); @@ -774,7 +776,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAccountRequest() ); @@ -796,7 +798,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountsRequest() ); @@ -821,7 +823,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountsRequest() ); @@ -864,7 +866,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountsRequest() ); @@ -881,7 +883,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountsRequest() ); @@ -931,7 +933,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountsRequest() ); @@ -972,7 +974,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountsRequest() ); @@ -1009,7 +1011,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListAccountsRequest() ); @@ -1039,7 +1041,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest() ); @@ -1078,7 +1080,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest() ); @@ -1135,7 +1137,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest() ); @@ -1166,7 +1168,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest() ); @@ -1229,7 +1231,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest() ); @@ -1281,7 +1283,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest() ); @@ -1331,7 +1333,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListSubAccountsRequest() ); @@ -1369,7 +1371,7 @@ describe('v1beta.AccountsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1378,7 +1380,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1407,7 +1409,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -1417,7 +1419,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1456,7 +1458,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -1466,7 +1468,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1505,7 +1507,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -1514,7 +1516,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1546,7 +1548,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -1555,7 +1557,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1591,7 +1593,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -1600,7 +1602,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1632,7 +1634,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -1641,7 +1643,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1670,7 +1672,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -1680,7 +1682,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1725,7 +1727,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1734,7 +1736,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1763,7 +1765,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1773,7 +1775,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1825,7 +1827,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1835,7 +1837,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1874,7 +1876,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1884,7 +1886,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1923,7 +1925,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1932,7 +1934,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1964,7 +1966,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1973,7 +1975,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2002,7 +2004,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -2012,7 +2014,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -2063,7 +2065,7 @@ describe('v1beta.AccountsServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -2073,7 +2075,7 @@ describe('v1beta.AccountsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts index b5064941c31..bb2342464f8 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_autofeed_settings_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autofeedSettingsServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest() ); @@ -298,7 +300,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest() ); @@ -346,7 +348,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest() ); @@ -378,7 +380,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutofeedSettingsRequest() ); @@ -400,7 +402,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest() ); @@ -434,7 +436,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest() ); @@ -483,7 +485,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest() ); @@ -519,7 +521,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutofeedSettingsRequest() ); @@ -539,7 +541,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -549,7 +551,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -578,7 +580,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -589,7 +591,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -628,7 +630,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -639,7 +641,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -678,7 +680,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -688,7 +690,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -720,7 +722,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -730,7 +732,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -766,7 +768,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -776,7 +778,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -808,7 +810,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -818,7 +820,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -847,7 +849,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -858,7 +860,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -903,7 +905,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -913,7 +915,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -942,7 +944,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -953,7 +955,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1005,7 +1007,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1016,7 +1018,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1055,7 +1057,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1066,7 +1068,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1105,7 +1107,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1115,7 +1117,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1147,7 +1149,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1157,7 +1159,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1186,7 +1188,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1197,7 +1199,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1248,7 +1250,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1259,7 +1261,7 @@ describe('v1beta.AutofeedSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts index e9ab313b36f..56d7d7585d4 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_automatic_improvements_service_v1beta.ts @@ -208,7 +208,9 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.automaticImprovementsServiceStub); client.close().then(() => { done(); @@ -279,7 +281,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() ); @@ -314,7 +316,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() ); @@ -364,7 +366,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() ); @@ -401,7 +403,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetAutomaticImprovementsRequest() ); @@ -428,7 +430,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() ); @@ -464,7 +466,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() ); @@ -515,7 +517,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() ); @@ -553,7 +555,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateAutomaticImprovementsRequest() ); @@ -573,7 +575,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -585,7 +587,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -614,7 +616,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -627,7 +629,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -666,7 +668,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -679,7 +681,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -718,7 +720,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -730,7 +732,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -762,7 +764,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -774,7 +776,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -810,7 +812,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -822,7 +824,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -854,7 +856,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -866,7 +868,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -895,7 +897,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -908,7 +910,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -953,7 +955,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -965,7 +967,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -994,7 +996,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1007,7 +1009,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1059,7 +1061,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1072,7 +1074,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1111,7 +1113,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1124,7 +1126,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1163,7 +1165,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1175,7 +1177,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1207,7 +1209,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1219,7 +1221,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1248,7 +1250,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1261,7 +1263,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1312,7 +1314,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1325,7 +1327,7 @@ describe('v1beta.AutomaticImprovementsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts index 2ea76ded030..636f9fe16bd 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_business_identity_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.businessIdentityServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest() ); @@ -298,7 +300,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest() ); @@ -346,7 +348,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest() ); @@ -378,7 +380,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessIdentityRequest() ); @@ -400,7 +402,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest() ); @@ -434,7 +436,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest() ); @@ -483,7 +485,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest() ); @@ -519,7 +521,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessIdentityRequest() ); @@ -539,7 +541,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -549,7 +551,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -578,7 +580,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -589,7 +591,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -628,7 +630,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -639,7 +641,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -678,7 +680,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -688,7 +690,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -720,7 +722,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -730,7 +732,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -766,7 +768,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -776,7 +778,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -808,7 +810,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -818,7 +820,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -847,7 +849,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -858,7 +860,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -903,7 +905,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -913,7 +915,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -942,7 +944,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -953,7 +955,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1005,7 +1007,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1016,7 +1018,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1055,7 +1057,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1066,7 +1068,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1105,7 +1107,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1115,7 +1117,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1147,7 +1149,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1157,7 +1159,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1186,7 +1188,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1197,7 +1199,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1248,7 +1250,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1259,7 +1261,7 @@ describe('v1beta.BusinessIdentityServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts index 5255b86f20b..ec1e57f52f4 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_business_info_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.businessInfoServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest() ); @@ -297,7 +299,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest() ); @@ -345,7 +347,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest() ); @@ -377,7 +379,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetBusinessInfoRequest() ); @@ -399,7 +401,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest() ); @@ -433,7 +435,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest() ); @@ -482,7 +484,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest() ); @@ -515,7 +517,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateBusinessInfoRequest() ); @@ -532,7 +534,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -542,7 +544,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -571,7 +573,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -582,7 +584,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -621,7 +623,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -632,7 +634,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -671,7 +673,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -681,7 +683,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -713,7 +715,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -723,7 +725,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -759,7 +761,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -769,7 +771,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -801,7 +803,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -811,7 +813,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -840,7 +842,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -851,7 +853,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -896,7 +898,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -906,7 +908,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -935,7 +937,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -946,7 +948,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -998,7 +1000,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1009,7 +1011,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1048,7 +1050,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1059,7 +1061,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1098,7 +1100,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1108,7 +1110,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1140,7 +1142,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1150,7 +1152,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1179,7 +1181,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1190,7 +1192,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1241,7 +1243,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1252,7 +1254,7 @@ describe('v1beta.BusinessInfoServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts index d3e2ebcf7e3..56e31d26c6f 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_email_preferences_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.emailPreferencesServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest() ); @@ -298,7 +300,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest() ); @@ -346,7 +348,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest() ); @@ -378,7 +380,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest() ); @@ -400,7 +402,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest() ); @@ -434,7 +436,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest() ); @@ -483,7 +485,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest() ); @@ -519,7 +521,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest() ); @@ -539,7 +541,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -549,7 +551,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -578,7 +580,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -589,7 +591,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -628,7 +630,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -639,7 +641,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -678,7 +680,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -688,7 +690,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -720,7 +722,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -730,7 +732,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -766,7 +768,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -776,7 +778,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -808,7 +810,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -818,7 +820,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -847,7 +849,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -858,7 +860,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -903,7 +905,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -913,7 +915,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -942,7 +944,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -953,7 +955,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1005,7 +1007,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1016,7 +1018,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1055,7 +1057,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1066,7 +1068,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1105,7 +1107,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1115,7 +1117,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1147,7 +1149,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1157,7 +1159,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1186,7 +1188,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1197,7 +1199,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1248,7 +1250,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1259,7 +1261,7 @@ describe('v1beta.EmailPreferencesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts index 510502c3893..32c64cfc39e 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_homepage_service_v1beta.ts @@ -190,7 +190,9 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.homepageServiceStub); client.close().then(() => { done(); @@ -249,7 +251,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetHomepageRequest() ); @@ -280,7 +282,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetHomepageRequest() ); @@ -327,7 +329,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetHomepageRequest() ); @@ -358,7 +360,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetHomepageRequest() ); @@ -379,7 +381,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest() ); @@ -411,7 +413,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest() ); @@ -459,7 +461,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest() ); @@ -491,7 +493,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateHomepageRequest() ); @@ -513,7 +515,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest() ); @@ -544,7 +546,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest() ); @@ -591,7 +593,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest() ); @@ -622,7 +624,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ClaimHomepageRequest() ); @@ -643,7 +645,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest() ); @@ -674,7 +676,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest() ); @@ -721,7 +723,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest() ); @@ -752,7 +754,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UnclaimHomepageRequest() ); @@ -768,7 +770,7 @@ describe('v1beta.HomepageServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -777,7 +779,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -806,7 +808,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -816,7 +818,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -855,7 +857,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -865,7 +867,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -904,7 +906,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -913,7 +915,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -945,7 +947,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -954,7 +956,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -990,7 +992,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -999,7 +1001,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1031,7 +1033,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -1040,7 +1042,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1069,7 +1071,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -1079,7 +1081,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1124,7 +1126,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1133,7 +1135,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1162,7 +1164,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1172,7 +1174,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1224,7 +1226,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1234,7 +1236,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1273,7 +1275,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1283,7 +1285,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1322,7 +1324,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1331,7 +1333,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1363,7 +1365,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1372,7 +1374,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1401,7 +1403,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1411,7 +1413,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1462,7 +1464,7 @@ describe('v1beta.HomepageServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1472,7 +1474,7 @@ describe('v1beta.HomepageServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts index bc8d3e5c803..ba2f8576020 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_online_return_policy_service_v1beta.ts @@ -271,7 +271,9 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.onlineReturnPolicyServiceStub); client.close().then(() => { done(); @@ -342,7 +344,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetOnlineReturnPolicyRequest() ); @@ -377,7 +379,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetOnlineReturnPolicyRequest() ); @@ -427,7 +429,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetOnlineReturnPolicyRequest() ); @@ -464,7 +466,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetOnlineReturnPolicyRequest() ); @@ -491,7 +493,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest() ); @@ -534,7 +536,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest() ); @@ -594,7 +596,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest() ); @@ -631,7 +633,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest() ); @@ -703,7 +705,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest() ); @@ -764,7 +766,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest() ); @@ -821,7 +823,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest() ); @@ -863,7 +865,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -875,7 +877,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -904,7 +906,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -917,7 +919,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -956,7 +958,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -969,7 +971,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1008,7 +1010,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -1020,7 +1022,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1052,7 +1054,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -1064,7 +1066,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1100,7 +1102,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -1112,7 +1114,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1144,7 +1146,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -1156,7 +1158,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1185,7 +1187,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -1198,7 +1200,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1243,7 +1245,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1255,7 +1257,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1284,7 +1286,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1297,7 +1299,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1349,7 +1351,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1362,7 +1364,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1401,7 +1403,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1414,7 +1416,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1453,7 +1455,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1465,7 +1467,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1497,7 +1499,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1509,7 +1511,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1538,7 +1540,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1551,7 +1553,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1602,7 +1604,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1615,7 +1617,7 @@ describe('v1beta.OnlineReturnPolicyServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts index a6aed506cc9..cc9252a78fa 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_programs_service_v1beta.ts @@ -253,7 +253,9 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.programsServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetProgramRequest() ); @@ -343,7 +345,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetProgramRequest() ); @@ -390,7 +392,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetProgramRequest() ); @@ -421,7 +423,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetProgramRequest() ); @@ -442,7 +444,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.EnableProgramRequest() ); @@ -473,7 +475,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.EnableProgramRequest() ); @@ -520,7 +522,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.EnableProgramRequest() ); @@ -551,7 +553,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.EnableProgramRequest() ); @@ -572,7 +574,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DisableProgramRequest() ); @@ -603,7 +605,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DisableProgramRequest() ); @@ -650,7 +652,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DisableProgramRequest() ); @@ -681,7 +683,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DisableProgramRequest() ); @@ -702,7 +704,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListProgramsRequest() ); @@ -741,7 +743,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListProgramsRequest() ); @@ -798,7 +800,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListProgramsRequest() ); @@ -829,7 +831,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListProgramsRequest() ); @@ -892,7 +894,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListProgramsRequest() ); @@ -946,7 +948,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListProgramsRequest() ); @@ -996,7 +998,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListProgramsRequest() ); @@ -1034,7 +1036,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1043,7 +1045,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1072,7 +1074,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -1082,7 +1084,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1121,7 +1123,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -1131,7 +1133,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1170,7 +1172,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -1179,7 +1181,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1211,7 +1213,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -1220,7 +1222,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1256,7 +1258,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -1265,7 +1267,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1297,7 +1299,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -1306,7 +1308,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1335,7 +1337,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -1345,7 +1347,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1390,7 +1392,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1399,7 +1401,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1428,7 +1430,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1438,7 +1440,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1490,7 +1492,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1500,7 +1502,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1539,7 +1541,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1549,7 +1551,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1588,7 +1590,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1597,7 +1599,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1629,7 +1631,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1638,7 +1640,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1667,7 +1669,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1677,7 +1679,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1728,7 +1730,7 @@ describe('v1beta.ProgramsServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1738,7 +1740,7 @@ describe('v1beta.ProgramsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts index 146f8d27981..2fc46ccdc2e 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_regions_service_v1beta.ts @@ -252,7 +252,9 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionsServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetRegionRequest() ); @@ -342,7 +344,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetRegionRequest() ); @@ -389,7 +391,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetRegionRequest() ); @@ -417,7 +419,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetRegionRequest() ); @@ -438,7 +440,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateRegionRequest() ); @@ -469,7 +471,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateRegionRequest() ); @@ -516,7 +518,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateRegionRequest() ); @@ -547,7 +549,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateRegionRequest() ); @@ -568,7 +570,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest() ); @@ -600,7 +602,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest() ); @@ -648,7 +650,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest() ); @@ -680,7 +682,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateRegionRequest() ); @@ -702,7 +704,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest() ); @@ -733,7 +735,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest() ); @@ -780,7 +782,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest() ); @@ -811,7 +813,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteRegionRequest() ); @@ -832,7 +834,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListRegionsRequest() ); @@ -871,7 +873,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListRegionsRequest() ); @@ -928,7 +930,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListRegionsRequest() ); @@ -959,7 +961,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListRegionsRequest() ); @@ -1022,7 +1024,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListRegionsRequest() ); @@ -1076,7 +1078,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListRegionsRequest() ); @@ -1126,7 +1128,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListRegionsRequest() ); @@ -1166,7 +1168,7 @@ describe('v1beta.RegionsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1175,7 +1177,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1204,7 +1206,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -1214,7 +1216,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1253,7 +1255,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -1263,7 +1265,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1302,7 +1304,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -1311,7 +1313,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1343,7 +1345,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -1352,7 +1354,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1388,7 +1390,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -1397,7 +1399,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1429,7 +1431,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -1438,7 +1440,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1467,7 +1469,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -1477,7 +1479,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1522,7 +1524,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1531,7 +1533,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1560,7 +1562,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1570,7 +1572,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1622,7 +1624,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1632,7 +1634,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1671,7 +1673,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1681,7 +1683,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1720,7 +1722,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1729,7 +1731,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1761,7 +1763,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1770,7 +1772,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1799,7 +1801,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1809,7 +1811,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1860,7 +1862,7 @@ describe('v1beta.RegionsServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1870,7 +1872,7 @@ describe('v1beta.RegionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts index 64473be2903..d654ec35fc3 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_shipping_settings_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.shippingSettingsServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest() ); @@ -298,7 +300,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest() ); @@ -346,7 +348,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest() ); @@ -378,7 +380,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetShippingSettingsRequest() ); @@ -400,7 +402,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest() ); @@ -433,7 +435,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest() ); @@ -481,7 +483,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest() ); @@ -516,7 +518,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.InsertShippingSettingsRequest() ); @@ -535,7 +537,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -545,7 +547,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -574,7 +576,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -585,7 +587,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -624,7 +626,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -635,7 +637,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -674,7 +676,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -684,7 +686,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -716,7 +718,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -726,7 +728,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -762,7 +764,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -772,7 +774,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -804,7 +806,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -814,7 +816,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -843,7 +845,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -854,7 +856,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -899,7 +901,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -909,7 +911,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -938,7 +940,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -949,7 +951,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1001,7 +1003,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1012,7 +1014,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1051,7 +1053,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1062,7 +1064,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1101,7 +1103,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1111,7 +1113,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1143,7 +1145,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1153,7 +1155,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1182,7 +1184,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1193,7 +1195,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1244,7 +1246,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1255,7 +1257,7 @@ describe('v1beta.ShippingSettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts index ae2c8ee74ad..7a500f34e38 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_agreement_state_service_v1beta.ts @@ -211,7 +211,9 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.termsOfServiceAgreementStateServiceStub); client.close().then(() => { done(); @@ -285,7 +287,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest() ); @@ -320,7 +322,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest() ); @@ -370,7 +372,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest() ); @@ -407,7 +409,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceAgreementStateRequest() ); @@ -434,7 +436,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest() ); @@ -474,7 +476,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest() ); @@ -526,7 +528,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest() ); @@ -563,7 +565,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveForApplicationTermsOfServiceAgreementStateRequest() ); @@ -582,7 +584,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -594,7 +596,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -623,7 +625,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -636,7 +638,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -675,7 +677,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -688,7 +690,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -727,7 +729,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -739,7 +741,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -771,7 +773,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -783,7 +785,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -819,7 +821,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -831,7 +833,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -863,7 +865,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -875,7 +877,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -904,7 +906,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -917,7 +919,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -962,7 +964,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -974,7 +976,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1003,7 +1005,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1016,7 +1018,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1068,7 +1070,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1081,7 +1083,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1120,7 +1122,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1133,7 +1135,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1172,7 +1174,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1184,7 +1186,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1216,7 +1218,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1228,7 +1230,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1257,7 +1259,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1270,7 +1272,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1321,7 +1323,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1334,7 +1336,7 @@ describe('v1beta.TermsOfServiceAgreementStateServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts index d3d81754eb5..94c1bd72ce7 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_terms_of_service_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.termsOfServiceServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest() ); @@ -297,7 +299,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest() ); @@ -345,7 +347,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest() ); @@ -377,7 +379,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetTermsOfServiceRequest() ); @@ -399,7 +401,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest() ); @@ -418,7 +420,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest() ); @@ -452,7 +454,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest() ); @@ -473,7 +475,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest() ); @@ -493,7 +495,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest() ); @@ -526,7 +528,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest() ); @@ -574,7 +576,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest() ); @@ -606,7 +608,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.AcceptTermsOfServiceRequest() ); @@ -622,7 +624,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -632,7 +634,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -661,7 +663,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -672,7 +674,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -711,7 +713,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -722,7 +724,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -761,7 +763,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -771,7 +773,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -803,7 +805,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -813,7 +815,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -849,7 +851,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -859,7 +861,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -891,7 +893,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -901,7 +903,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -930,7 +932,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -941,7 +943,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -986,7 +988,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -996,7 +998,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1025,7 +1027,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1036,7 +1038,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1088,7 +1090,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1099,7 +1101,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1138,7 +1140,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1149,7 +1151,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1188,7 +1190,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1198,7 +1200,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1230,7 +1232,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1240,7 +1242,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1269,7 +1271,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1280,7 +1282,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1331,7 +1333,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1342,7 +1344,7 @@ describe('v1beta.TermsOfServiceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts b/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts index 802e178ee63..1991ceaaf93 100644 --- a/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts +++ b/packages/google-shopping-merchant-accounts/test/gapic_user_service_v1beta.ts @@ -252,7 +252,9 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetUserRequest() ); @@ -342,7 +344,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetUserRequest() ); @@ -389,7 +391,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetUserRequest() ); @@ -417,7 +419,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.GetUserRequest() ); @@ -438,7 +440,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateUserRequest() ); @@ -469,7 +471,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateUserRequest() ); @@ -516,7 +518,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateUserRequest() ); @@ -547,7 +549,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.CreateUserRequest() ); @@ -568,7 +570,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteUserRequest() ); @@ -599,7 +601,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteUserRequest() ); @@ -646,7 +648,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteUserRequest() ); @@ -677,7 +679,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.DeleteUserRequest() ); @@ -698,7 +700,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateUserRequest() ); @@ -730,7 +732,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateUserRequest() ); @@ -778,7 +780,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateUserRequest() ); @@ -810,7 +812,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.UpdateUserRequest() ); @@ -832,7 +834,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListUsersRequest() ); @@ -871,7 +873,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListUsersRequest() ); @@ -928,7 +930,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListUsersRequest() ); @@ -956,7 +958,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListUsersRequest() ); @@ -1017,7 +1019,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListUsersRequest() ); @@ -1069,7 +1071,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListUsersRequest() ); @@ -1118,7 +1120,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.accounts.v1beta.ListUsersRequest() ); @@ -1157,7 +1159,7 @@ describe('v1beta.UserServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1166,7 +1168,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1195,7 +1197,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('accountIssue', () => { + describe('accountIssue', async () => { const fakePath = '/rendered/path/accountIssue'; const expectedParameters = { account: 'accountValue', @@ -1205,7 +1207,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountIssuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1244,7 +1246,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('accountTax', () => { + describe('accountTax', async () => { const fakePath = '/rendered/path/accountTax'; const expectedParameters = { account: 'accountValue', @@ -1254,7 +1256,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountTaxPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1293,7 +1295,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('autofeedSettings', () => { + describe('autofeedSettings', async () => { const fakePath = '/rendered/path/autofeedSettings'; const expectedParameters = { account: 'accountValue', @@ -1302,7 +1304,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autofeedSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1334,7 +1336,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('automaticImprovements', () => { + describe('automaticImprovements', async () => { const fakePath = '/rendered/path/automaticImprovements'; const expectedParameters = { account: 'accountValue', @@ -1343,7 +1345,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automaticImprovementsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1379,7 +1381,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('businessIdentity', () => { + describe('businessIdentity', async () => { const fakePath = '/rendered/path/businessIdentity'; const expectedParameters = { account: 'accountValue', @@ -1388,7 +1390,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessIdentityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1420,7 +1422,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('businessInfo', () => { + describe('businessInfo', async () => { const fakePath = '/rendered/path/businessInfo'; const expectedParameters = { account: 'accountValue', @@ -1429,7 +1431,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.businessInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1458,7 +1460,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('emailPreferences', () => { + describe('emailPreferences', async () => { const fakePath = '/rendered/path/emailPreferences'; const expectedParameters = { account: 'accountValue', @@ -1468,7 +1470,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.emailPreferencesPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1513,7 +1515,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('homepage', () => { + describe('homepage', async () => { const fakePath = '/rendered/path/homepage'; const expectedParameters = { account: 'accountValue', @@ -1522,7 +1524,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.homepagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1551,7 +1553,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('onlineReturnPolicy', () => { + describe('onlineReturnPolicy', async () => { const fakePath = '/rendered/path/onlineReturnPolicy'; const expectedParameters = { account: 'accountValue', @@ -1561,7 +1563,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.onlineReturnPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1613,7 +1615,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('program', () => { + describe('program', async () => { const fakePath = '/rendered/path/program'; const expectedParameters = { account: 'accountValue', @@ -1623,7 +1625,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.programPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1662,7 +1664,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { account: 'accountValue', @@ -1672,7 +1674,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1711,7 +1713,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('shippingSettings', () => { + describe('shippingSettings', async () => { const fakePath = '/rendered/path/shippingSettings'; const expectedParameters = { account: 'accountValue', @@ -1720,7 +1722,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.shippingSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1752,7 +1754,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('termsOfService', () => { + describe('termsOfService', async () => { const fakePath = '/rendered/path/termsOfService'; const expectedParameters = { version: 'versionValue', @@ -1761,7 +1763,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1790,7 +1792,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('termsOfServiceAgreementState', () => { + describe('termsOfServiceAgreementState', async () => { const fakePath = '/rendered/path/termsOfServiceAgreementState'; const expectedParameters = { account: 'accountValue', @@ -1800,7 +1802,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.termsOfServiceAgreementStatePathTemplate.match = @@ -1851,7 +1853,7 @@ describe('v1beta.UserServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { account: 'accountValue', @@ -1861,7 +1863,7 @@ describe('v1beta.UserServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-conversions/package.json b/packages/google-shopping-merchant-conversions/package.json index c57df06bb42..fdd4808fbb3 100644 --- a/packages/google-shopping-merchant-conversions/package.json +++ b/packages/google-shopping-merchant-conversions/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json b/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json index 7f5a025f469..7ad42e92684 100644 --- a/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json +++ b/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-conversions", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-conversions/src/v1beta/conversion_sources_service_client.ts b/packages/google-shopping-merchant-conversions/src/v1beta/conversion_sources_service_client.ts index dccccfe6648..f1df7aab1d6 100644 --- a/packages/google-shopping-merchant-conversions/src/v1beta/conversion_sources_service_client.ts +++ b/packages/google-shopping-merchant-conversions/src/v1beta/conversion_sources_service_client.ts @@ -490,7 +490,9 @@ export class ConversionSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversionSource request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class ConversionSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ 'conversion_source.name': request.conversionSource!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConversionSource request %j', request); const wrappedCallback: | Callback< @@ -748,7 +752,9 @@ export class ConversionSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversionSource request %j', request); const wrappedCallback: | Callback< @@ -875,7 +881,9 @@ export class ConversionSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('undeleteConversionSource request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1009,9 @@ export class ConversionSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversionSource request %j', request); const wrappedCallback: | Callback< @@ -1135,7 +1145,9 @@ export class ConversionSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.conversions.v1beta.IListConversionSourcesRequest, @@ -1207,7 +1219,9 @@ export class ConversionSourcesServiceClient { }); const defaultCallSettings = this._defaults['listConversionSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversionSources stream %j', request); return this.descriptors.page.listConversionSources.createStream( this.innerApiCalls.listConversionSources as GaxCall, @@ -1261,7 +1275,9 @@ export class ConversionSourcesServiceClient { }); const defaultCallSettings = this._defaults['listConversionSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversionSources iterate %j', request); return this.descriptors.page.listConversionSources.asyncIterate( this.innerApiCalls['listConversionSources'] as GaxCall, diff --git a/packages/google-shopping-merchant-conversions/test/gapic_conversion_sources_service_v1beta.ts b/packages/google-shopping-merchant-conversions/test/gapic_conversion_sources_service_v1beta.ts index e4176d6453f..8937362a46d 100644 --- a/packages/google-shopping-merchant-conversions/test/gapic_conversion_sources_service_v1beta.ts +++ b/packages/google-shopping-merchant-conversions/test/gapic_conversion_sources_service_v1beta.ts @@ -271,7 +271,9 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversionSourcesServiceStub); client.close().then(() => { done(); @@ -342,7 +344,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest() ); @@ -377,7 +379,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest() ); @@ -427,7 +429,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest() ); @@ -464,7 +466,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest() ); @@ -491,7 +493,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest() ); @@ -527,7 +529,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest() ); @@ -578,7 +580,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest() ); @@ -616,7 +618,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest() ); @@ -644,7 +646,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest() ); @@ -679,7 +681,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest() ); @@ -729,7 +731,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest() ); @@ -766,7 +768,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest() ); @@ -793,7 +795,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest() ); @@ -828,7 +830,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest() ); @@ -878,7 +880,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest() ); @@ -915,7 +917,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest() ); @@ -942,7 +944,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest() ); @@ -977,7 +979,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest() ); @@ -1027,7 +1029,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest() ); @@ -1061,7 +1063,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest() ); @@ -1085,7 +1087,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest() ); @@ -1128,7 +1130,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest() ); @@ -1188,7 +1190,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest() ); @@ -1225,7 +1227,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest() ); @@ -1297,7 +1299,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest() ); @@ -1358,7 +1360,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest() ); @@ -1415,7 +1417,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest() ); @@ -1457,7 +1459,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1469,7 +1471,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1498,7 +1500,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { }); }); - describe('conversionSource', () => { + describe('conversionSource', async () => { const fakePath = '/rendered/path/conversionSource'; const expectedParameters = { account: 'accountValue', @@ -1511,7 +1513,7 @@ describe('v1beta.ConversionSourcesServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.conversionSourcePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-datasources/package.json b/packages/google-shopping-merchant-datasources/package.json index 672e598054c..639e78a496f 100644 --- a/packages/google-shopping-merchant-datasources/package.json +++ b/packages/google-shopping-merchant-datasources/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json b/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json index db156143b15..7b111304523 100644 --- a/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json +++ b/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datasources", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_client.ts b/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_client.ts index 6eb68b20ef5..c33ed6fe1d2 100644 --- a/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_client.ts +++ b/packages/google-shopping-merchant-datasources/src/v1beta/data_sources_service_client.ts @@ -491,7 +491,9 @@ export class DataSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataSource request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class DataSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataSource request %j', request); const wrappedCallback: | Callback< @@ -753,7 +757,9 @@ export class DataSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_source.name': request.dataSource!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataSource request %j', request); const wrappedCallback: | Callback< @@ -879,7 +885,9 @@ export class DataSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataSource request %j', request); const wrappedCallback: | Callback< @@ -1009,7 +1017,9 @@ export class DataSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDataSource request %j', request); const wrappedCallback: | Callback< @@ -1144,7 +1154,9 @@ export class DataSourcesServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.datasources.v1beta.IListDataSourcesRequest, @@ -1217,7 +1229,9 @@ export class DataSourcesServiceClient { }); const defaultCallSettings = this._defaults['listDataSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataSources stream %j', request); return this.descriptors.page.listDataSources.createStream( this.innerApiCalls.listDataSources as GaxCall, @@ -1272,7 +1286,9 @@ export class DataSourcesServiceClient { }); const defaultCallSettings = this._defaults['listDataSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataSources iterate %j', request); return this.descriptors.page.listDataSources.asyncIterate( this.innerApiCalls['listDataSources'] as GaxCall, diff --git a/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_client.ts b/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_client.ts index 467e84de84d..29d5f6612e3 100644 --- a/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_client.ts +++ b/packages/google-shopping-merchant-datasources/src/v1beta/file_uploads_service_client.ts @@ -468,7 +468,9 @@ export class FileUploadsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFileUpload request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-datasources/test/gapic_data_sources_service_v1beta.ts b/packages/google-shopping-merchant-datasources/test/gapic_data_sources_service_v1beta.ts index a747148cf7a..f608cb67a00 100644 --- a/packages/google-shopping-merchant-datasources/test/gapic_data_sources_service_v1beta.ts +++ b/packages/google-shopping-merchant-datasources/test/gapic_data_sources_service_v1beta.ts @@ -263,7 +263,9 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataSourcesServiceStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetDataSourceRequest() ); @@ -358,7 +360,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetDataSourceRequest() ); @@ -406,7 +408,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetDataSourceRequest() ); @@ -438,7 +440,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetDataSourceRequest() ); @@ -460,7 +462,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.CreateDataSourceRequest() ); @@ -492,7 +494,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.CreateDataSourceRequest() ); @@ -540,7 +542,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.CreateDataSourceRequest() ); @@ -572,7 +574,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.CreateDataSourceRequest() ); @@ -594,7 +596,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.UpdateDataSourceRequest() ); @@ -627,7 +629,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.UpdateDataSourceRequest() ); @@ -676,7 +678,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.UpdateDataSourceRequest() ); @@ -709,7 +711,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.UpdateDataSourceRequest() ); @@ -732,7 +734,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.DeleteDataSourceRequest() ); @@ -764,7 +766,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.DeleteDataSourceRequest() ); @@ -812,7 +814,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.DeleteDataSourceRequest() ); @@ -844,7 +846,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.DeleteDataSourceRequest() ); @@ -866,7 +868,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.FetchDataSourceRequest() ); @@ -898,7 +900,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.FetchDataSourceRequest() ); @@ -946,7 +948,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.FetchDataSourceRequest() ); @@ -978,7 +980,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.FetchDataSourceRequest() ); @@ -1000,7 +1002,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest() ); @@ -1040,7 +1042,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest() ); @@ -1098,7 +1100,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest() ); @@ -1130,7 +1132,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest() ); @@ -1194,7 +1196,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest() ); @@ -1247,7 +1249,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest() ); @@ -1298,7 +1300,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.ListDataSourcesRequest() ); @@ -1336,7 +1338,7 @@ describe('v1beta.DataSourcesServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1346,7 +1348,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1375,7 +1377,7 @@ describe('v1beta.DataSourcesServiceClient', () => { }); }); - describe('dataSource', () => { + describe('dataSource', async () => { const fakePath = '/rendered/path/dataSource'; const expectedParameters = { account: 'accountValue', @@ -1386,7 +1388,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1425,7 +1427,7 @@ describe('v1beta.DataSourcesServiceClient', () => { }); }); - describe('fileUpload', () => { + describe('fileUpload', async () => { const fakePath = '/rendered/path/fileUpload'; const expectedParameters = { account: 'accountValue', @@ -1437,7 +1439,7 @@ describe('v1beta.DataSourcesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.fileUploadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-datasources/test/gapic_file_uploads_service_v1beta.ts b/packages/google-shopping-merchant-datasources/test/gapic_file_uploads_service_v1beta.ts index 1871b5d3779..81c572db2e7 100644 --- a/packages/google-shopping-merchant-datasources/test/gapic_file_uploads_service_v1beta.ts +++ b/packages/google-shopping-merchant-datasources/test/gapic_file_uploads_service_v1beta.ts @@ -200,7 +200,9 @@ describe('v1beta.FileUploadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.fileUploadsServiceStub); client.close().then(() => { done(); @@ -263,7 +265,7 @@ describe('v1beta.FileUploadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetFileUploadRequest() ); @@ -295,7 +297,7 @@ describe('v1beta.FileUploadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetFileUploadRequest() ); @@ -343,7 +345,7 @@ describe('v1beta.FileUploadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetFileUploadRequest() ); @@ -375,7 +377,7 @@ describe('v1beta.FileUploadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.datasources.v1beta.GetFileUploadRequest() ); @@ -391,7 +393,7 @@ describe('v1beta.FileUploadsServiceClient', () => { }); describe('Path templates', () => { - describe('dataSource', () => { + describe('dataSource', async () => { const fakePath = '/rendered/path/dataSource'; const expectedParameters = { account: 'accountValue', @@ -402,7 +404,7 @@ describe('v1beta.FileUploadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -441,7 +443,7 @@ describe('v1beta.FileUploadsServiceClient', () => { }); }); - describe('fileUpload', () => { + describe('fileUpload', async () => { const fakePath = '/rendered/path/fileUpload'; const expectedParameters = { account: 'accountValue', @@ -453,7 +455,7 @@ describe('v1beta.FileUploadsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.fileUploadPathTemplate.render = sinon .stub() .returns(fakePath); From 2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:36:01 -0700 Subject: [PATCH 29/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6184) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbGxpbmcvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbmFyeWF1dGhvcml6YXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNlcnRpZmljYXRlbWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNoYW5uZWwvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNsb3VkY29udHJvbHNwYXJ0bmVyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNsb3VkZG1zLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbW1lcmNlLWNvbnN1bWVyLXByb2N1cmVtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbXB1dGUvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbmZpZGVudGlhbGNvbXB1dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbmZpZy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbm5lY3RvcnMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhY3RjZW50ZXJpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRlbnR3YXJlaG91c2UvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFjYXRhbG9nLWxpbmVhZ2UvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFmdXNpb24vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFsYWJlbGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwbGV4Ly5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFxbmEvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax * manual changes to test file * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- .../google-cloud-billing-budgets/package.json | 2 +- .../src/v1/cloud_billing_client.ts | 60 +- .../src/v1/cloud_catalog_client.ts | 24 +- .../test/gapic_cloud_billing_v1.ts | 132 +-- .../test/gapic_cloud_catalog_v1.ts | 52 +- .../package.json | 2 +- ...a.google.cloud.binaryauthorization.v1.json | 2 +- ...a_google.cloud.binaryauthorization.v1.json | 2 +- ...gle.cloud.binaryauthorization.v1beta1.json | 2 +- ...gle.cloud.binaryauthorization.v1beta1.json | 2 +- .../binauthz_management_service_v1_client.ts | 36 +- .../src/v1/system_policy_v1_client.ts | 4 +- .../src/v1/validation_helper_v1_client.ts | 4 +- ...uthz_management_service_v1_beta1_client.ts | 36 +- .../v1beta1/system_policy_v1_beta1_client.ts | 4 +- ...thz_management_service_v1_beta1_v1beta1.ts | 82 +- ...gapic_binauthz_management_service_v1_v1.ts | 82 +- .../gapic_system_policy_v1_beta1_v1beta1.ts | 28 +- .../test/gapic_system_policy_v1_v1.ts | 28 +- .../test/gapic_validation_helper_v1_v1.ts | 28 +- .../package.json | 2 +- ...ta.google.cloud.certificatemanager.v1.json | 2 +- ...ta_google.cloud.certificatemanager.v1.json | 2 +- .../src/v1/certificate_manager_client.ts | 166 +++- .../test/gapic_certificate_manager_v1.ts | 392 ++++----- packages/google-cloud-channel/package.json | 2 +- ...ppet_metadata.google.cloud.channel.v1.json | 2 +- ...ppet_metadata_google.cloud.channel.v1.json | 2 +- .../cloud_channel_reports_service_client.ts | 30 +- .../src/v1/cloud_channel_service_client.ts | 326 +++++-- .../test/gapic_cloud_channel_service_v1.ts | 6 +- .../package.json | 2 +- ..._google.cloud.cloudcontrolspartner.v1.json | 2 +- ...gle.cloud.cloudcontrolspartner.v1beta.json | 2 +- .../v1/cloud_controls_partner_core_client.ts | 56 +- ...loud_controls_partner_monitoring_client.ts | 16 +- .../cloud_controls_partner_core_client.ts | 68 +- ...loud_controls_partner_monitoring_client.ts | 16 +- .../gapic_cloud_controls_partner_core_v1.ts | 114 +-- ...apic_cloud_controls_partner_core_v1beta.ts | 138 +-- ...ic_cloud_controls_partner_monitoring_v1.ts | 54 +- ...loud_controls_partner_monitoring_v1beta.ts | 54 +- packages/google-cloud-clouddms/package.json | 2 +- ...pet_metadata.google.cloud.clouddms.v1.json | 2 +- ...pet_metadata_google.cloud.clouddms.v1.json | 2 +- .../src/v1/data_migration_service_client.ts | 222 +++-- .../test/gapic_data_migration_service_v1.ts | 536 ++++++------ .../package.json | 2 +- ...loud.commerce.consumer.procurement.v1.json | 2 +- ...ommerce.consumer.procurement.v1alpha1.json | 2 +- .../v1/consumer_procurement_service_client.ts | 30 +- .../v1/license_management_service_client.ts | 28 +- .../consumer_procurement_service_client.ts | 22 +- .../gapic_consumer_procurement_service_v1.ts | 88 +- ...c_consumer_procurement_service_v1alpha1.ts | 60 +- .../gapic_license_management_service_v1.ts | 58 +- packages/google-cloud-compute/package.json | 2 +- .../src/v1/accelerator_types_client.ts | 20 +- .../src/v1/addresses_client.ts | 36 +- .../src/v1/autoscalers_client.ts | 36 +- .../src/v1/backend_buckets_client.ts | 56 +- .../src/v1/backend_services_client.ts | 80 +- .../src/v1/disk_types_client.ts | 20 +- .../src/v1/disks_client.ts | 80 +- .../src/v1/external_vpn_gateways_client.ts | 32 +- .../src/v1/firewall_policies_client.ts | 80 +- .../src/v1/firewalls_client.ts | 32 +- .../src/v1/forwarding_rules_client.ts | 40 +- .../src/v1/global_addresses_client.ts | 32 +- .../src/v1/global_forwarding_rules_client.ts | 36 +- .../global_network_endpoint_groups_client.ts | 44 +- .../src/v1/global_operations_client.ts | 28 +- .../global_organization_operations_client.ts | 20 +- ...global_public_delegated_prefixes_client.ts | 28 +- .../src/v1/health_checks_client.ts | 36 +- .../src/v1/image_family_views_client.ts | 4 +- .../src/v1/images_client.ts | 52 +- ...ce_group_manager_resize_requests_client.ts | 28 +- .../src/v1/instance_group_managers_client.ts | 128 ++- .../src/v1/instance_groups_client.ts | 52 +- .../v1/instance_settings_service_client.ts | 8 +- .../src/v1/instance_templates_client.ts | 40 +- .../src/v1/instances_client.ts | 212 +++-- .../src/v1/instant_snapshots_client.ts | 44 +- .../src/v1/interconnect_attachments_client.ts | 36 +- .../src/v1/interconnect_locations_client.ts | 16 +- .../interconnect_remote_locations_client.ts | 16 +- .../src/v1/interconnects_client.ts | 40 +- .../src/v1/license_codes_client.ts | 8 +- .../src/v1/licenses_client.ts | 36 +- .../src/v1/machine_images_client.ts | 36 +- .../src/v1/machine_types_client.ts | 20 +- .../src/v1/network_attachments_client.ts | 44 +- .../network_edge_security_services_client.ts | 20 +- .../src/v1/network_endpoint_groups_client.ts | 52 +- .../v1/network_firewall_policies_client.ts | 92 +- .../src/v1/network_profiles_client.ts | 16 +- .../src/v1/networks_client.ts | 60 +- .../src/v1/node_groups_client.ts | 76 +- .../src/v1/node_templates_client.ts | 40 +- .../src/v1/node_types_client.ts | 20 +- .../src/v1/packet_mirrorings_client.ts | 36 +- .../src/v1/projects_client.ts | 72 +- .../v1/public_advertised_prefixes_client.ts | 36 +- .../v1/public_delegated_prefixes_client.ts | 40 +- .../src/v1/region_autoscalers_client.ts | 32 +- .../src/v1/region_backend_services_client.ts | 64 +- .../src/v1/region_commitments_client.ts | 28 +- .../src/v1/region_disk_types_client.ts | 16 +- .../src/v1/region_disks_client.ts | 76 +- .../v1/region_health_check_services_client.ts | 28 +- .../src/v1/region_health_checks_client.ts | 32 +- .../region_instance_group_managers_client.ts | 124 ++- .../src/v1/region_instance_groups_client.ts | 32 +- .../v1/region_instance_templates_client.ts | 24 +- .../src/v1/region_instances_client.ts | 4 +- .../src/v1/region_instant_snapshots_client.ts | 40 +- .../region_network_endpoint_groups_client.ts | 44 +- ...region_network_firewall_policies_client.ts | 76 +- .../region_notification_endpoints_client.ts | 24 +- .../src/v1/region_operations_client.ts | 24 +- .../src/v1/region_security_policies_client.ts | 48 +- .../src/v1/region_ssl_certificates_client.ts | 24 +- .../src/v1/region_ssl_policies_client.ts | 32 +- .../v1/region_target_http_proxies_client.ts | 28 +- .../v1/region_target_https_proxies_client.ts | 36 +- .../v1/region_target_tcp_proxies_client.ts | 24 +- .../src/v1/region_url_maps_client.ts | 36 +- .../src/v1/region_zones_client.ts | 12 +- .../src/v1/regions_client.ts | 16 +- .../src/v1/reservations_client.ts | 48 +- .../src/v1/resource_policies_client.ts | 44 +- .../src/v1/routers_client.ts | 100 ++- .../src/v1/routes_client.ts | 24 +- .../src/v1/security_policies_client.ts | 56 +- .../src/v1/service_attachments_client.ts | 44 +- .../v1/snapshot_settings_service_client.ts | 8 +- .../src/v1/snapshots_client.ts | 40 +- .../src/v1/ssl_certificates_client.ts | 28 +- .../src/v1/ssl_policies_client.ts | 36 +- .../src/v1/storage_pool_types_client.ts | 20 +- .../src/v1/storage_pools_client.ts | 56 +- .../src/v1/subnetworks_client.ts | 64 +- .../src/v1/target_grpc_proxies_client.ts | 28 +- .../src/v1/target_http_proxies_client.ts | 36 +- .../src/v1/target_https_proxies_client.ts | 52 +- .../src/v1/target_instances_client.ts | 32 +- .../src/v1/target_pools_client.ts | 56 +- .../src/v1/target_ssl_proxies_client.ts | 44 +- .../src/v1/target_tcp_proxies_client.ts | 36 +- .../src/v1/target_vpn_gateways_client.ts | 32 +- .../src/v1/url_maps_client.ts | 44 +- .../src/v1/vpn_gateways_client.ts | 40 +- .../src/v1/vpn_tunnels_client.ts | 32 +- .../src/v1/zone_operations_client.ts | 24 +- .../src/v1/zones_client.ts | 16 +- .../src/v1small/addresses_client.ts | 24 +- .../src/v1small/region_operations_client.ts | 8 +- .../test/gapic_accelerator_types_v1.ts | 30 +- .../test/gapic_addresses_v1.ts | 62 +- .../test/gapic_addresses_v1small.ts | 38 +- .../test/gapic_autoscalers_v1.ts | 62 +- .../test/gapic_backend_buckets_v1.ts | 106 +-- .../test/gapic_backend_services_v1.ts | 140 +-- .../test/gapic_disk_types_v1.ts | 30 +- .../test/gapic_disks_v1.ts | 150 ++-- .../test/gapic_external_vpn_gateways_v1.ts | 58 +- .../test/gapic_firewall_policies_v1.ts | 154 ++-- .../test/gapic_firewalls_v1.ts | 58 +- .../test/gapic_forwarding_rules_v1.ts | 70 +- .../test/gapic_global_addresses_v1.ts | 58 +- .../test/gapic_global_forwarding_rules_v1.ts | 66 +- ...gapic_global_network_endpoint_groups_v1.ts | 72 +- .../test/gapic_global_operations_v1.ts | 46 +- ...gapic_global_organization_operations_v1.ts | 34 +- ...pic_global_public_delegated_prefixes_v1.ts | 50 +- .../test/gapic_health_checks_v1.ts | 62 +- .../test/gapic_image_family_views_v1.ts | 12 +- .../test/gapic_images_v1.ts | 98 ++- ...stance_group_manager_resize_requests_v1.ts | 50 +- .../test/gapic_instance_group_managers_v1.ts | 216 ++--- .../test/gapic_instance_groups_v1.ts | 84 +- .../gapic_instance_settings_service_v1.ts | 20 +- .../test/gapic_instance_templates_v1.ts | 70 +- .../test/gapic_instances_v1.ts | 404 ++++----- .../test/gapic_instant_snapshots_v1.ts | 78 +- .../test/gapic_interconnect_attachments_v1.ts | 62 +- .../test/gapic_interconnect_locations_v1.ts | 26 +- .../gapic_interconnect_remote_locations_v1.ts | 26 +- .../test/gapic_interconnects_v1.ts | 74 +- .../test/gapic_license_codes_v1.ts | 20 +- .../test/gapic_licenses_v1.ts | 66 +- .../test/gapic_machine_images_v1.ts | 66 +- .../test/gapic_machine_types_v1.ts | 30 +- .../test/gapic_network_attachments_v1.ts | 78 +- ...gapic_network_edge_security_services_v1.ts | 40 +- .../test/gapic_network_endpoint_groups_v1.ts | 84 +- .../gapic_network_firewall_policies_v1.ts | 174 ++-- .../test/gapic_network_profiles_v1.ts | 26 +- .../test/gapic_networks_v1.ts | 104 +-- .../test/gapic_node_groups_v1.ts | 132 +-- .../test/gapic_node_templates_v1.ts | 70 +- .../test/gapic_node_types_v1.ts | 30 +- .../test/gapic_packet_mirrorings_v1.ts | 62 +- .../test/gapic_projects_v1.ts | 128 +-- .../gapic_public_advertised_prefixes_v1.ts | 66 +- .../gapic_public_delegated_prefixes_v1.ts | 70 +- .../test/gapic_region_autoscalers_v1.ts | 58 +- .../test/gapic_region_backend_services_v1.ts | 112 +-- .../test/gapic_region_commitments_v1.ts | 46 +- .../test/gapic_region_disk_types_v1.ts | 26 +- .../test/gapic_region_disks_v1.ts | 146 +-- .../gapic_region_health_check_services_v1.ts | 50 +- .../test/gapic_region_health_checks_v1.ts | 58 +- ...gapic_region_instance_group_managers_v1.ts | 212 ++--- .../test/gapic_region_instance_groups_v1.ts | 48 +- .../gapic_region_instance_templates_v1.ts | 42 +- .../test/gapic_region_instances_v1.ts | 12 +- .../test/gapic_region_instant_snapshots_v1.ts | 74 +- ...gapic_region_network_endpoint_groups_v1.ts | 72 +- ...pic_region_network_firewall_policies_v1.ts | 146 +-- .../gapic_region_notification_endpoints_v1.ts | 42 +- .../test/gapic_region_operations_v1.ts | 42 +- .../test/gapic_region_operations_v1small.ts | 20 +- .../test/gapic_region_security_policies_v1.ts | 90 +- .../test/gapic_region_ssl_certificates_v1.ts | 42 +- .../test/gapic_region_ssl_policies_v1.ts | 58 +- .../gapic_region_target_http_proxies_v1.ts | 50 +- .../gapic_region_target_https_proxies_v1.ts | 66 +- .../gapic_region_target_tcp_proxies_v1.ts | 42 +- .../test/gapic_region_url_maps_v1.ts | 66 +- .../test/gapic_region_zones_v1.ts | 18 +- .../test/gapic_regions_v1.ts | 26 +- .../test/gapic_reservations_v1.ts | 86 +- .../test/gapic_resource_policies_v1.ts | 78 +- .../test/gapic_routers_v1.ts | 160 ++-- .../test/gapic_routes_v1.ts | 42 +- .../test/gapic_security_policies_v1.ts | 102 +-- .../test/gapic_service_attachments_v1.ts | 78 +- .../gapic_snapshot_settings_service_v1.ts | 20 +- .../test/gapic_snapshots_v1.ts | 74 +- .../test/gapic_ssl_certificates_v1.ts | 46 +- .../test/gapic_ssl_policies_v1.ts | 62 +- .../test/gapic_storage_pool_types_v1.ts | 30 +- .../test/gapic_storage_pools_v1.ts | 92 +- .../test/gapic_subnetworks_v1.ts | 108 +-- .../test/gapic_target_grpc_proxies_v1.ts | 50 +- .../test/gapic_target_http_proxies_v1.ts | 62 +- .../test/gapic_target_https_proxies_v1.ts | 94 +- .../test/gapic_target_instances_v1.ts | 54 +- .../test/gapic_target_pools_v1.ts | 102 +-- .../test/gapic_target_ssl_proxies_v1.ts | 82 +- .../test/gapic_target_tcp_proxies_v1.ts | 62 +- .../test/gapic_target_vpn_gateways_v1.ts | 54 +- .../test/gapic_url_maps_v1.ts | 78 +- .../test/gapic_vpn_gateways_v1.ts | 70 +- .../test/gapic_vpn_tunnels_v1.ts | 54 +- .../test/gapic_zone_operations_v1.ts | 42 +- .../test/gapic_zones_v1.ts | 26 +- .../package.json | 2 +- ...google.cloud.confidentialcomputing.v1.json | 2 +- ...google.cloud.confidentialcomputing.v1.json | 2 +- ....cloud.confidentialcomputing.v1alpha1.json | 2 +- ....cloud.confidentialcomputing.v1alpha1.json | 2 +- .../src/v1/confidential_computing_client.ts | 8 +- .../v1alpha1/confidential_computing_client.ts | 8 +- .../test/gapic_confidential_computing_v1.ts | 38 +- .../gapic_confidential_computing_v1alpha1.ts | 38 +- packages/google-cloud-config/package.json | 2 +- ...ippet_metadata_google.cloud.config.v1.json | 2 +- .../src/v1/config_client.ts | 134 ++- .../test/gapic_config_v1.ts | 320 +++---- packages/google-cloud-connectors/package.json | 2 +- ...t_metadata_google.cloud.connectors.v1.json | 2 +- .../src/v1/connectors_client.ts | 118 ++- .../test/gapic_connectors_v1.ts | 262 +++--- .../package.json | 2 +- ...google.cloud.contactcenterinsights.v1.json | 2 +- ...google.cloud.contactcenterinsights.v1.json | 2 +- .../src/v1/contact_center_insights_client.ts | 378 ++++++-- .../test/gapic_contact_center_insights_v1.ts | 828 +++++++++--------- .../package.json | 2 +- ...data.google.cloud.contentwarehouse.v1.json | 2 +- ...data_google.cloud.contentwarehouse.v1.json | 2 +- .../src/v1/document_link_service_client.ts | 24 +- .../src/v1/document_schema_service_client.ts | 28 +- .../src/v1/document_service_client.ts | 40 +- .../src/v1/pipeline_service_client.ts | 6 +- .../src/v1/rule_set_service_client.ts | 28 +- .../src/v1/synonym_set_service_client.ts | 28 +- .../test/gapic_document_link_service_v1.ts | 66 +- .../test/gapic_document_schema_service_v1.ts | 78 +- .../test/gapic_document_service_v1.ts | 98 ++- .../test/gapic_pipeline_service_v1.ts | 58 +- .../test/gapic_rule_set_service_v1.ts | 74 +- .../test/gapic_synonym_set_service_v1.ts | 74 +- .../package.json | 2 +- ...a.google.cloud.datacatalog.lineage.v1.json | 2 +- ...a_google.cloud.datacatalog.lineage.v1.json | 2 +- .../src/v1/lineage_client.ts | 110 ++- .../test/gapic_lineage_v1.ts | 212 ++--- .../google-cloud-datacatalog/package.json | 2 +- packages/google-cloud-dataform/package.json | 2 +- ...etadata.google.cloud.dataform.v1beta1.json | 2 +- ...etadata_google.cloud.dataform.v1beta1.json | 2 +- .../src/v1beta1/dataform_client.ts | 312 +++++-- .../test/gapic_dataform_v1beta1.ts | 580 ++++++------ packages/google-cloud-datafusion/package.json | 2 +- ...t_metadata.google.cloud.datafusion.v1.json | 2 +- ...t_metadata_google.cloud.datafusion.v1.json | 2 +- ...adata.google.cloud.datafusion.v1beta1.json | 2 +- ...adata_google.cloud.datafusion.v1beta1.json | 2 +- .../src/v1/data_fusion_client.ts | 44 +- .../src/v1beta1/data_fusion_client.ts | 84 +- .../test/gapic_data_fusion_v1.ts | 100 +-- .../test/gapic_data_fusion_v1beta1.ts | 168 ++-- .../google-cloud-datalabeling/package.json | 2 +- ...ata.google.cloud.datalabeling.v1beta1.json | 2 +- ...ata_google.cloud.datalabeling.v1beta1.json | 2 +- .../v1beta1/data_labeling_service_client.ts | 208 +++-- .../gapic_data_labeling_service_v1beta1.ts | 390 +++++---- packages/google-cloud-dataplex/package.json | 2 +- ...pet_metadata.google.cloud.dataplex.v1.json | 2 +- ...pet_metadata_google.cloud.dataplex.v1.json | 2 +- .../src/v1/catalog_service_client.ts | 154 +++- .../src/v1/content_service_client.ts | 42 +- .../src/v1/data_scan_service_client.ts | 54 +- .../src/v1/data_taxonomy_service_client.ts | 86 +- .../src/v1/dataplex_service_client.ts | 214 +++-- .../src/v1/metadata_service_client.ts | 54 +- .../test/gapic_catalog_service_v1.ts | 408 ++++----- .../test/gapic_content_service_v1.ts | 190 ++-- .../test/gapic_data_scan_service_v1.ts | 220 ++--- .../test/gapic_dataplex_service_v1.ts | 508 +++++------ .../test/gapic_metadata_service_v1.ts | 204 ++--- packages/google-cloud-dataproc/package.json | 2 +- ...pet_metadata.google.cloud.dataproc.v1.json | 2 +- ...pet_metadata_google.cloud.dataproc.v1.json | 2 +- .../v1/autoscaling_policy_service_client.ts | 28 +- .../src/v1/batch_controller_client.ts | 26 +- .../src/v1/cluster_controller_client.ts | 42 +- .../src/v1/job_controller_client.ts | 38 +- .../src/v1/node_group_controller_client.ts | 14 +- .../src/v1/session_controller_client.ts | 30 +- .../v1/session_template_controller_client.ts | 28 +- .../v1/workflow_template_service_client.ts | 38 +- .../gapic_autoscaling_policy_service_v1.ts | 108 +-- .../test/gapic_batch_controller_v1.ts | 118 +-- .../test/gapic_cluster_controller_v1.ts | 170 ++-- .../test/gapic_job_controller_v1.ts | 134 +-- .../test/gapic_node_group_controller_v1.ts | 112 +-- .../test/gapic_session_controller_v1.ts | 134 +-- .../gapic_session_template_controller_v1.ts | 108 +-- .../gapic_workflow_template_service_v1.ts | 146 +-- packages/google-cloud-dataqna/package.json | 2 +- ...metadata.google.cloud.dataqna.v1alpha.json | 2 +- ...metadata_google.cloud.dataqna.v1alpha.json | 2 +- .../v1alpha/auto_suggestion_service_client.ts | 4 +- .../src/v1alpha/question_service_client.ts | 20 +- .../gapic_auto_suggestion_service_v1alpha.ts | 24 +- .../test/gapic_question_service_v1alpha.ts | 56 +- 361 files changed, 13564 insertions(+), 9488 deletions(-) diff --git a/packages/google-cloud-billing-budgets/package.json b/packages/google-cloud-billing-budgets/package.json index d3546cfe594..b30c1d6c62e 100644 --- a/packages/google-cloud-billing-budgets/package.json +++ b/packages/google-cloud-billing-budgets/package.json @@ -52,7 +52,7 @@ "node": ">=18" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-billing-budgets" } diff --git a/packages/google-cloud-billing/src/v1/cloud_billing_client.ts b/packages/google-cloud-billing/src/v1/cloud_billing_client.ts index deb2a0dadd8..9ee1bbbce53 100644 --- a/packages/google-cloud-billing/src/v1/cloud_billing_client.ts +++ b/packages/google-cloud-billing/src/v1/cloud_billing_client.ts @@ -511,7 +511,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBillingAccount request %j', request); const wrappedCallback: | Callback< @@ -638,7 +640,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBillingAccount request %j', request); const wrappedCallback: | Callback< @@ -779,7 +783,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBillingAccount request %j', request); const wrappedCallback: | Callback< @@ -903,7 +909,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProjectBillingInfo request %j', request); const wrappedCallback: | Callback< @@ -1065,7 +1073,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProjectBillingInfo request %j', request); const wrappedCallback: | Callback< @@ -1183,7 +1193,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1305,7 +1317,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1419,7 +1433,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1541,7 +1557,9 @@ export class CloudBillingClient { name: request.name ?? '', destination_parent: request.destinationParent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moveBillingAccount request %j', request); const wrappedCallback: | Callback< @@ -1683,7 +1701,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.billing.v1.IListBillingAccountsRequest, @@ -1764,7 +1784,9 @@ export class CloudBillingClient { }); const defaultCallSettings = this._defaults['listBillingAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBillingAccounts stream %j', request); return this.descriptors.page.listBillingAccounts.createStream( this.innerApiCalls.listBillingAccounts as GaxCall, @@ -1827,7 +1849,9 @@ export class CloudBillingClient { }); const defaultCallSettings = this._defaults['listBillingAccounts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBillingAccounts iterate %j', request); return this.descriptors.page.listBillingAccounts.asyncIterate( this.innerApiCalls['listBillingAccounts'] as GaxCall, @@ -1937,7 +1961,9 @@ export class CloudBillingClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.billing.v1.IListProjectBillingInfoRequest, @@ -2007,7 +2033,9 @@ export class CloudBillingClient { }); const defaultCallSettings = this._defaults['listProjectBillingInfo']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProjectBillingInfo stream %j', request); return this.descriptors.page.listProjectBillingInfo.createStream( this.innerApiCalls.listProjectBillingInfo as GaxCall, @@ -2059,7 +2087,9 @@ export class CloudBillingClient { }); const defaultCallSettings = this._defaults['listProjectBillingInfo']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProjectBillingInfo iterate %j', request); return this.descriptors.page.listProjectBillingInfo.asyncIterate( this.innerApiCalls['listProjectBillingInfo'] as GaxCall, diff --git a/packages/google-cloud-billing/src/v1/cloud_catalog_client.ts b/packages/google-cloud-billing/src/v1/cloud_catalog_client.ts index 42ec2fd64c7..44fa7c9f065 100644 --- a/packages/google-cloud-billing/src/v1/cloud_catalog_client.ts +++ b/packages/google-cloud-billing/src/v1/cloud_catalog_client.ts @@ -489,7 +489,9 @@ export class CloudCatalogClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.billing.v1.IListServicesRequest, @@ -550,7 +552,9 @@ export class CloudCatalogClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices stream %j', request); return this.descriptors.page.listServices.createStream( this.innerApiCalls.listServices as GaxCall, @@ -593,7 +597,9 @@ export class CloudCatalogClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listServices']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServices iterate %j', request); return this.descriptors.page.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, @@ -708,7 +714,9 @@ export class CloudCatalogClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.billing.v1.IListSkusRequest, @@ -792,7 +800,9 @@ export class CloudCatalogClient { }); const defaultCallSettings = this._defaults['listSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkus stream %j', request); return this.descriptors.page.listSkus.createStream( this.innerApiCalls.listSkus as GaxCall, @@ -860,7 +870,9 @@ export class CloudCatalogClient { }); const defaultCallSettings = this._defaults['listSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkus iterate %j', request); return this.descriptors.page.listSkus.asyncIterate( this.innerApiCalls['listSkus'] as GaxCall, diff --git a/packages/google-cloud-billing/test/gapic_cloud_billing_v1.ts b/packages/google-cloud-billing/test/gapic_cloud_billing_v1.ts index 215fef2746a..04be50c2cb9 100644 --- a/packages/google-cloud-billing/test/gapic_cloud_billing_v1.ts +++ b/packages/google-cloud-billing/test/gapic_cloud_billing_v1.ts @@ -255,7 +255,9 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudBillingStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetBillingAccountRequest() ); @@ -345,7 +347,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetBillingAccountRequest() ); @@ -392,7 +394,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetBillingAccountRequest() ); @@ -423,7 +425,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetBillingAccountRequest() ); @@ -444,7 +446,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateBillingAccountRequest() ); @@ -476,7 +478,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateBillingAccountRequest() ); @@ -523,7 +525,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateBillingAccountRequest() ); @@ -554,7 +556,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateBillingAccountRequest() ); @@ -575,7 +577,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.CreateBillingAccountRequest() ); @@ -607,7 +609,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.CreateBillingAccountRequest() ); @@ -654,7 +656,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.CreateBillingAccountRequest() ); @@ -685,7 +687,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.CreateBillingAccountRequest() ); @@ -706,7 +708,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetProjectBillingInfoRequest() ); @@ -738,7 +740,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetProjectBillingInfoRequest() ); @@ -785,7 +787,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetProjectBillingInfoRequest() ); @@ -819,7 +821,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.GetProjectBillingInfoRequest() ); @@ -843,7 +845,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateProjectBillingInfoRequest() ); @@ -875,7 +877,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateProjectBillingInfoRequest() ); @@ -922,7 +924,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateProjectBillingInfoRequest() ); @@ -956,7 +958,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.UpdateProjectBillingInfoRequest() ); @@ -980,7 +982,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1011,7 +1013,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1058,7 +1060,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1188,7 +1190,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1319,7 +1321,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1371,7 +1373,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.MoveBillingAccountRequest() ); @@ -1408,7 +1410,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.MoveBillingAccountRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.MoveBillingAccountRequest() ); @@ -1496,7 +1498,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.MoveBillingAccountRequest() ); @@ -1522,7 +1524,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListBillingAccountsRequest() ); @@ -1562,7 +1564,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListBillingAccountsRequest() ); @@ -1617,7 +1619,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListBillingAccountsRequest() ); @@ -1648,7 +1650,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListBillingAccountsRequest() ); @@ -1708,7 +1710,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListBillingAccountsRequest() ); @@ -1757,7 +1759,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListBillingAccountsRequest() ); @@ -1806,7 +1808,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListBillingAccountsRequest() ); @@ -1848,7 +1850,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListProjectBillingInfoRequest() ); @@ -1888,7 +1890,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListProjectBillingInfoRequest() ); @@ -1943,7 +1945,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListProjectBillingInfoRequest() ); @@ -1977,7 +1979,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListProjectBillingInfoRequest() ); @@ -2044,7 +2046,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListProjectBillingInfoRequest() ); @@ -2100,7 +2102,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListProjectBillingInfoRequest() ); @@ -2154,7 +2156,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListProjectBillingInfoRequest() ); @@ -2196,7 +2198,7 @@ describe('v1.CloudBillingClient', () => { }); describe('Path templates', () => { - describe('billingAccount', () => { + describe('billingAccount', async () => { const fakePath = '/rendered/path/billingAccount'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -2205,7 +2207,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2235,7 +2237,7 @@ describe('v1.CloudBillingClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2244,7 +2246,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2273,7 +2275,7 @@ describe('v1.CloudBillingClient', () => { }); }); - describe('organizationBillingAccount', () => { + describe('organizationBillingAccount', async () => { const fakePath = '/rendered/path/organizationBillingAccount'; const expectedParameters = { organization: 'organizationValue', @@ -2283,7 +2285,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationBillingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2338,7 +2340,7 @@ describe('v1.CloudBillingClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2347,7 +2349,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2376,7 +2378,7 @@ describe('v1.CloudBillingClient', () => { }); }); - describe('projectBillingInfo', () => { + describe('projectBillingInfo', async () => { const fakePath = '/rendered/path/projectBillingInfo'; const expectedParameters = { project: 'projectValue', @@ -2385,7 +2387,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectBillingInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2420,7 +2422,7 @@ describe('v1.CloudBillingClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { service: 'serviceValue', @@ -2429,7 +2431,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2458,7 +2460,7 @@ describe('v1.CloudBillingClient', () => { }); }); - describe('sku', () => { + describe('sku', async () => { const fakePath = '/rendered/path/sku'; const expectedParameters = { service: 'serviceValue', @@ -2468,7 +2470,7 @@ describe('v1.CloudBillingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.skuPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-billing/test/gapic_cloud_catalog_v1.ts b/packages/google-cloud-billing/test/gapic_cloud_catalog_v1.ts index e0d2349ab46..37e527bd96a 100644 --- a/packages/google-cloud-billing/test/gapic_cloud_catalog_v1.ts +++ b/packages/google-cloud-billing/test/gapic_cloud_catalog_v1.ts @@ -255,7 +255,9 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudCatalogStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListServicesRequest() ); @@ -333,7 +335,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListServicesRequest() ); @@ -368,7 +370,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListServicesRequest() ); @@ -385,7 +387,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListServicesRequest() ); @@ -426,7 +428,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListServicesRequest() ); @@ -464,7 +466,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListServicesRequest() ); @@ -494,7 +496,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListServicesRequest() ); @@ -523,7 +525,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListSkusRequest() ); @@ -556,7 +558,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListSkusRequest() ); @@ -605,7 +607,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListSkusRequest() ); @@ -633,7 +635,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListSkusRequest() ); @@ -684,7 +686,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListSkusRequest() ); @@ -732,7 +734,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListSkusRequest() ); @@ -774,7 +776,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.billing.v1.ListSkusRequest() ); @@ -812,7 +814,7 @@ describe('v1.CloudCatalogClient', () => { }); describe('Path templates', () => { - describe('billingAccount', () => { + describe('billingAccount', async () => { const fakePath = '/rendered/path/billingAccount'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -821,7 +823,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -851,7 +853,7 @@ describe('v1.CloudCatalogClient', () => { }); }); - describe('organizationBillingAccount', () => { + describe('organizationBillingAccount', async () => { const fakePath = '/rendered/path/organizationBillingAccount'; const expectedParameters = { organization: 'organizationValue', @@ -861,7 +863,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationBillingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -916,7 +918,7 @@ describe('v1.CloudCatalogClient', () => { }); }); - describe('projectBillingInfo', () => { + describe('projectBillingInfo', async () => { const fakePath = '/rendered/path/projectBillingInfo'; const expectedParameters = { project: 'projectValue', @@ -925,7 +927,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectBillingInfoPathTemplate.render = sinon .stub() .returns(fakePath); @@ -960,7 +962,7 @@ describe('v1.CloudCatalogClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { service: 'serviceValue', @@ -969,7 +971,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -998,7 +1000,7 @@ describe('v1.CloudCatalogClient', () => { }); }); - describe('sku', () => { + describe('sku', async () => { const fakePath = '/rendered/path/sku'; const expectedParameters = { service: 'serviceValue', @@ -1008,7 +1010,7 @@ describe('v1.CloudCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.skuPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-binaryauthorization/package.json b/packages/google-cloud-binaryauthorization/package.json index bbf21c59d1c..56ae3a3411c 100644 --- a/packages/google-cloud-binaryauthorization/package.json +++ b/packages/google-cloud-binaryauthorization/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json index 1101b7a7d57..3f7d4914be8 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "3.7.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json index 1101b7a7d57..3f7d4914be8 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "3.7.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json index 4c9eb9e67f8..5c8368e6f7e 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "3.7.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json index 4c9eb9e67f8..5c8368e6f7e 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "3.7.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/src/v1/binauthz_management_service_v1_client.ts b/packages/google-cloud-binaryauthorization/src/v1/binauthz_management_service_v1_client.ts index f68c3ce498a..921992ab4ab 100644 --- a/packages/google-cloud-binaryauthorization/src/v1/binauthz_management_service_v1_client.ts +++ b/packages/google-cloud-binaryauthorization/src/v1/binauthz_management_service_v1_client.ts @@ -500,7 +500,9 @@ export class BinauthzManagementServiceV1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicy request %j', request); const wrappedCallback: | Callback< @@ -631,7 +633,9 @@ export class BinauthzManagementServiceV1Client { this._gaxModule.routingHeader.fromParams({ 'policy.name': request.policy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePolicy request %j', request); const wrappedCallback: | Callback< @@ -765,7 +769,9 @@ export class BinauthzManagementServiceV1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAttestor request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class BinauthzManagementServiceV1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttestor request %j', request); const wrappedCallback: | Callback< @@ -1020,7 +1028,9 @@ export class BinauthzManagementServiceV1Client { this._gaxModule.routingHeader.fromParams({ 'attestor.name': request.attestor!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAttestor request %j', request); const wrappedCallback: | Callback< @@ -1147,7 +1157,9 @@ export class BinauthzManagementServiceV1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAttestor request %j', request); const wrappedCallback: | Callback< @@ -1279,7 +1291,9 @@ export class BinauthzManagementServiceV1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.binaryauthorization.v1.IListAttestorsRequest, @@ -1348,7 +1362,9 @@ export class BinauthzManagementServiceV1Client { }); const defaultCallSettings = this._defaults['listAttestors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttestors stream %j', request); return this.descriptors.page.listAttestors.createStream( this.innerApiCalls.listAttestors as GaxCall, @@ -1399,7 +1415,9 @@ export class BinauthzManagementServiceV1Client { }); const defaultCallSettings = this._defaults['listAttestors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttestors iterate %j', request); return this.descriptors.page.listAttestors.asyncIterate( this.innerApiCalls['listAttestors'] as GaxCall, diff --git a/packages/google-cloud-binaryauthorization/src/v1/system_policy_v1_client.ts b/packages/google-cloud-binaryauthorization/src/v1/system_policy_v1_client.ts index 9aac8d90820..dfff22e04d9 100644 --- a/packages/google-cloud-binaryauthorization/src/v1/system_policy_v1_client.ts +++ b/packages/google-cloud-binaryauthorization/src/v1/system_policy_v1_client.ts @@ -472,7 +472,9 @@ export class SystemPolicyV1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSystemPolicy request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-binaryauthorization/src/v1/validation_helper_v1_client.ts b/packages/google-cloud-binaryauthorization/src/v1/validation_helper_v1_client.ts index 81db3bdc6fd..369df7c3a03 100644 --- a/packages/google-cloud-binaryauthorization/src/v1/validation_helper_v1_client.ts +++ b/packages/google-cloud-binaryauthorization/src/v1/validation_helper_v1_client.ts @@ -485,7 +485,9 @@ export class ValidationHelperV1Client { this._gaxModule.routingHeader.fromParams({ attestor: request.attestor ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validateAttestationOccurrence request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-binaryauthorization/src/v1beta1/binauthz_management_service_v1_beta1_client.ts b/packages/google-cloud-binaryauthorization/src/v1beta1/binauthz_management_service_v1_beta1_client.ts index 7c7477f4ede..5cd4caf47b8 100644 --- a/packages/google-cloud-binaryauthorization/src/v1beta1/binauthz_management_service_v1_beta1_client.ts +++ b/packages/google-cloud-binaryauthorization/src/v1beta1/binauthz_management_service_v1_beta1_client.ts @@ -506,7 +506,9 @@ export class BinauthzManagementServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicy request %j', request); const wrappedCallback: | Callback< @@ -637,7 +639,9 @@ export class BinauthzManagementServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ 'policy.name': request.policy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePolicy request %j', request); const wrappedCallback: | Callback< @@ -771,7 +775,9 @@ export class BinauthzManagementServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAttestor request %j', request); const wrappedCallback: | Callback< @@ -898,7 +904,9 @@ export class BinauthzManagementServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttestor request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1034,9 @@ export class BinauthzManagementServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ 'attestor.name': request.attestor!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAttestor request %j', request); const wrappedCallback: | Callback< @@ -1153,7 +1163,9 @@ export class BinauthzManagementServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAttestor request %j', request); const wrappedCallback: | Callback< @@ -1285,7 +1297,9 @@ export class BinauthzManagementServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.binaryauthorization.v1beta1.IListAttestorsRequest, @@ -1354,7 +1368,9 @@ export class BinauthzManagementServiceV1Beta1Client { }); const defaultCallSettings = this._defaults['listAttestors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttestors stream %j', request); return this.descriptors.page.listAttestors.createStream( this.innerApiCalls.listAttestors as GaxCall, @@ -1405,7 +1421,9 @@ export class BinauthzManagementServiceV1Beta1Client { }); const defaultCallSettings = this._defaults['listAttestors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttestors iterate %j', request); return this.descriptors.page.listAttestors.asyncIterate( this.innerApiCalls['listAttestors'] as GaxCall, diff --git a/packages/google-cloud-binaryauthorization/src/v1beta1/system_policy_v1_beta1_client.ts b/packages/google-cloud-binaryauthorization/src/v1beta1/system_policy_v1_beta1_client.ts index d1090ba408a..e0c099025f9 100644 --- a/packages/google-cloud-binaryauthorization/src/v1beta1/system_policy_v1_beta1_client.ts +++ b/packages/google-cloud-binaryauthorization/src/v1beta1/system_policy_v1_beta1_client.ts @@ -472,7 +472,9 @@ export class SystemPolicyV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSystemPolicy request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_beta1_v1beta1.ts b/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_beta1_v1beta1.ts index 42497fad878..768d1db2a9d 100644 --- a/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_beta1_v1beta1.ts +++ b/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_beta1_v1beta1.ts @@ -277,7 +277,9 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.binauthzManagementServiceV1Beta1Stub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest() ); @@ -385,7 +387,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest() ); @@ -435,7 +437,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest() ); @@ -466,7 +468,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest() ); @@ -490,7 +492,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest() ); @@ -525,7 +527,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest() ); @@ -576,7 +578,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest() ); @@ -611,7 +613,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest() ); @@ -636,7 +638,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest() ); @@ -670,7 +672,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest() ); @@ -720,7 +722,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest() ); @@ -754,7 +756,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest() ); @@ -778,7 +780,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest() ); @@ -812,7 +814,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest() ); @@ -862,7 +864,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest() ); @@ -896,7 +898,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest() ); @@ -920,7 +922,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest() ); @@ -955,7 +957,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest() ); @@ -1006,7 +1008,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest() ); @@ -1041,7 +1043,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest() ); @@ -1066,7 +1068,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest() ); @@ -1100,7 +1102,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest() ); @@ -1150,7 +1152,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest() ); @@ -1184,7 +1186,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest() ); @@ -1208,7 +1210,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest() ); @@ -1250,7 +1252,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest() ); @@ -1310,7 +1312,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest() ); @@ -1344,7 +1346,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest() ); @@ -1410,7 +1412,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest() ); @@ -1465,7 +1467,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest() ); @@ -1518,7 +1520,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest() ); @@ -1556,7 +1558,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { }); describe('Path templates', () => { - describe('attestor', () => { + describe('attestor', async () => { const fakePath = '/rendered/path/attestor'; const expectedParameters = { project: 'projectValue', @@ -1569,7 +1571,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attestorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1608,7 +1610,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { }); }); - describe('locationPolicy', () => { + describe('locationPolicy', async () => { const fakePath = '/rendered/path/locationPolicy'; const expectedParameters = { location: 'locationValue', @@ -1620,7 +1622,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1649,7 +1651,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1661,7 +1663,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1690,7 +1692,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { }); }); - describe('projectPolicy', () => { + describe('projectPolicy', async () => { const fakePath = '/rendered/path/projectPolicy'; const expectedParameters = { project: 'projectValue', @@ -1702,7 +1704,7 @@ describe('v1beta1.BinauthzManagementServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPolicyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_v1.ts b/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_v1.ts index c52d324eb4a..3421a3d8e62 100644 --- a/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_v1.ts +++ b/packages/google-cloud-binaryauthorization/test/gapic_binauthz_management_service_v1_v1.ts @@ -274,7 +274,9 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.binauthzManagementServiceV1Stub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetPolicyRequest() ); @@ -379,7 +381,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetPolicyRequest() ); @@ -429,7 +431,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetPolicyRequest() ); @@ -460,7 +462,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetPolicyRequest() ); @@ -484,7 +486,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdatePolicyRequest() ); @@ -519,7 +521,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdatePolicyRequest() ); @@ -570,7 +572,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdatePolicyRequest() ); @@ -605,7 +607,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdatePolicyRequest() ); @@ -630,7 +632,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.CreateAttestorRequest() ); @@ -664,7 +666,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.CreateAttestorRequest() ); @@ -714,7 +716,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.CreateAttestorRequest() ); @@ -748,7 +750,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.CreateAttestorRequest() ); @@ -772,7 +774,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetAttestorRequest() ); @@ -806,7 +808,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetAttestorRequest() ); @@ -856,7 +858,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetAttestorRequest() ); @@ -890,7 +892,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetAttestorRequest() ); @@ -914,7 +916,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdateAttestorRequest() ); @@ -949,7 +951,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdateAttestorRequest() ); @@ -1000,7 +1002,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdateAttestorRequest() ); @@ -1035,7 +1037,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.UpdateAttestorRequest() ); @@ -1060,7 +1062,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.DeleteAttestorRequest() ); @@ -1094,7 +1096,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.DeleteAttestorRequest() ); @@ -1144,7 +1146,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.DeleteAttestorRequest() ); @@ -1178,7 +1180,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.DeleteAttestorRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ListAttestorsRequest() ); @@ -1244,7 +1246,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ListAttestorsRequest() ); @@ -1304,7 +1306,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ListAttestorsRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ListAttestorsRequest() ); @@ -1402,7 +1404,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ListAttestorsRequest() ); @@ -1455,7 +1457,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ListAttestorsRequest() ); @@ -1508,7 +1510,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ListAttestorsRequest() ); @@ -1546,7 +1548,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { }); describe('Path templates', () => { - describe('attestor', () => { + describe('attestor', async () => { const fakePath = '/rendered/path/attestor'; const expectedParameters = { project: 'projectValue', @@ -1559,7 +1561,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.attestorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1598,7 +1600,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { }); }); - describe('locationPolicy', () => { + describe('locationPolicy', async () => { const fakePath = '/rendered/path/locationPolicy'; const expectedParameters = { location: 'locationValue', @@ -1610,7 +1612,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1639,7 +1641,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1651,7 +1653,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1680,7 +1682,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { }); }); - describe('projectPolicy', () => { + describe('projectPolicy', async () => { const fakePath = '/rendered/path/projectPolicy'; const expectedParameters = { project: 'projectValue', @@ -1692,7 +1694,7 @@ describe('v1.BinauthzManagementServiceV1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPolicyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_beta1_v1beta1.ts b/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_beta1_v1beta1.ts index eb13d054988..d077e21fbec 100644 --- a/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_beta1_v1beta1.ts +++ b/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_beta1_v1beta1.ts @@ -205,7 +205,9 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.systemPolicyV1Beta1Stub); client.close().then(() => { done(); @@ -268,7 +270,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest() ); @@ -300,7 +302,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest() ); @@ -348,7 +350,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest() ); @@ -380,7 +382,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest() ); @@ -396,7 +398,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { }); describe('Path templates', () => { - describe('attestor', () => { + describe('attestor', async () => { const fakePath = '/rendered/path/attestor'; const expectedParameters = { project: 'projectValue', @@ -407,7 +409,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attestorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -446,7 +448,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { }); }); - describe('locationPolicy', () => { + describe('locationPolicy', async () => { const fakePath = '/rendered/path/locationPolicy'; const expectedParameters = { location: 'locationValue', @@ -456,7 +458,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -485,7 +487,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -495,7 +497,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -524,7 +526,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { }); }); - describe('projectPolicy', () => { + describe('projectPolicy', async () => { const fakePath = '/rendered/path/projectPolicy'; const expectedParameters = { project: 'projectValue', @@ -534,7 +536,7 @@ describe('v1beta1.SystemPolicyV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPolicyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_v1.ts b/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_v1.ts index 8500f14767a..f2186b4b8d0 100644 --- a/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_v1.ts +++ b/packages/google-cloud-binaryauthorization/test/gapic_system_policy_v1_v1.ts @@ -192,7 +192,9 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.systemPolicyV1Stub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetSystemPolicyRequest() ); @@ -282,7 +284,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetSystemPolicyRequest() ); @@ -329,7 +331,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetSystemPolicyRequest() ); @@ -360,7 +362,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.GetSystemPolicyRequest() ); @@ -376,7 +378,7 @@ describe('v1.SystemPolicyV1Client', () => { }); describe('Path templates', () => { - describe('attestor', () => { + describe('attestor', async () => { const fakePath = '/rendered/path/attestor'; const expectedParameters = { project: 'projectValue', @@ -386,7 +388,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attestorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -425,7 +427,7 @@ describe('v1.SystemPolicyV1Client', () => { }); }); - describe('locationPolicy', () => { + describe('locationPolicy', async () => { const fakePath = '/rendered/path/locationPolicy'; const expectedParameters = { location: 'locationValue', @@ -434,7 +436,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -463,7 +465,7 @@ describe('v1.SystemPolicyV1Client', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -472,7 +474,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -501,7 +503,7 @@ describe('v1.SystemPolicyV1Client', () => { }); }); - describe('projectPolicy', () => { + describe('projectPolicy', async () => { const fakePath = '/rendered/path/projectPolicy'; const expectedParameters = { project: 'projectValue', @@ -510,7 +512,7 @@ describe('v1.SystemPolicyV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPolicyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-binaryauthorization/test/gapic_validation_helper_v1_v1.ts b/packages/google-cloud-binaryauthorization/test/gapic_validation_helper_v1_v1.ts index 7ab2f70a5cf..b99e40a89f8 100644 --- a/packages/google-cloud-binaryauthorization/test/gapic_validation_helper_v1_v1.ts +++ b/packages/google-cloud-binaryauthorization/test/gapic_validation_helper_v1_v1.ts @@ -194,7 +194,9 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.validationHelperV1Stub); client.close().then(() => { done(); @@ -253,7 +255,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest() ); @@ -285,7 +287,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest() ); @@ -332,7 +334,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest() ); @@ -366,7 +368,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest() ); @@ -385,7 +387,7 @@ describe('v1.ValidationHelperV1Client', () => { }); describe('Path templates', () => { - describe('attestor', () => { + describe('attestor', async () => { const fakePath = '/rendered/path/attestor'; const expectedParameters = { project: 'projectValue', @@ -395,7 +397,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attestorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -434,7 +436,7 @@ describe('v1.ValidationHelperV1Client', () => { }); }); - describe('locationPolicy', () => { + describe('locationPolicy', async () => { const fakePath = '/rendered/path/locationPolicy'; const expectedParameters = { location: 'locationValue', @@ -443,7 +445,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -472,7 +474,7 @@ describe('v1.ValidationHelperV1Client', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -481,7 +483,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -510,7 +512,7 @@ describe('v1.ValidationHelperV1Client', () => { }); }); - describe('projectPolicy', () => { + describe('projectPolicy', async () => { const fakePath = '/rendered/path/projectPolicy'; const expectedParameters = { project: 'projectValue', @@ -519,7 +521,7 @@ describe('v1.ValidationHelperV1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPolicyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-certificatemanager/package.json b/packages/google-cloud-certificatemanager/package.json index 4368beb2be1..9814bdea5fe 100644 --- a/packages/google-cloud-certificatemanager/package.json +++ b/packages/google-cloud-certificatemanager/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json index a8797af8ce7..cd976c53557 100644 --- a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json +++ b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-certificatemanager", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json index ea537c5fae1..6def6efca8e 100644 --- a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json +++ b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-certificatemanager", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-certificatemanager/src/v1/certificate_manager_client.ts b/packages/google-cloud-certificatemanager/src/v1/certificate_manager_client.ts index 765eb1cd4cd..2f1cbb49103 100644 --- a/packages/google-cloud-certificatemanager/src/v1/certificate_manager_client.ts +++ b/packages/google-cloud-certificatemanager/src/v1/certificate_manager_client.ts @@ -853,7 +853,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificate request %j', request); const wrappedCallback: | Callback< @@ -979,7 +981,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateMap request %j', request); const wrappedCallback: | Callback< @@ -1105,7 +1109,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateMapEntry request %j', request); const wrappedCallback: | Callback< @@ -1231,7 +1237,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDnsAuthorization request %j', request); const wrappedCallback: | Callback< @@ -1357,7 +1365,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCertificateIssuanceConfig request %j', request); const wrappedCallback: | Callback< @@ -1483,7 +1493,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTrustConfig request %j', request); const wrappedCallback: | Callback< @@ -1620,7 +1632,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1791,7 +1805,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ 'certificate.name': request.certificate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1959,7 +1975,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2131,7 +2149,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2302,7 +2322,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ 'certificate_map.name': request.certificateMap!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2472,7 +2494,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2644,7 +2668,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2815,7 +2841,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ 'certificate_map_entry.name': request.certificateMapEntry!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2983,7 +3011,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3155,7 +3185,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3326,7 +3358,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ 'dns_authorization.name': request.dnsAuthorization!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3494,7 +3528,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3666,7 +3702,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3840,7 +3878,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4019,7 +4059,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4190,7 +4232,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ 'trust_config.name': request.trustConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4362,7 +4406,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4533,7 +4579,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.certificatemanager.v1.IListCertificatesRequest, @@ -4607,7 +4655,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificates stream %j', request); return this.descriptors.page.listCertificates.createStream( this.innerApiCalls.listCertificates as GaxCall, @@ -4663,7 +4713,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listCertificates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificates iterate %j', request); return this.descriptors.page.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, @@ -4774,7 +4826,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.certificatemanager.v1.IListCertificateMapsRequest, @@ -4848,7 +4902,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listCertificateMaps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateMaps stream %j', request); return this.descriptors.page.listCertificateMaps.createStream( this.innerApiCalls.listCertificateMaps as GaxCall, @@ -4904,7 +4960,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listCertificateMaps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateMaps iterate %j', request); return this.descriptors.page.listCertificateMaps.asyncIterate( this.innerApiCalls['listCertificateMaps'] as GaxCall, @@ -5020,7 +5078,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.certificatemanager.v1.IListCertificateMapEntriesRequest, @@ -5099,7 +5159,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listCertificateMapEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateMapEntries stream %j', request); return this.descriptors.page.listCertificateMapEntries.createStream( this.innerApiCalls.listCertificateMapEntries as GaxCall, @@ -5160,7 +5222,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listCertificateMapEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateMapEntries iterate %j', request); return this.descriptors.page.listCertificateMapEntries.asyncIterate( this.innerApiCalls['listCertificateMapEntries'] as GaxCall, @@ -5271,7 +5335,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.certificatemanager.v1.IListDnsAuthorizationsRequest, @@ -5345,7 +5411,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listDnsAuthorizations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDnsAuthorizations stream %j', request); return this.descriptors.page.listDnsAuthorizations.createStream( this.innerApiCalls.listDnsAuthorizations as GaxCall, @@ -5401,7 +5469,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listDnsAuthorizations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDnsAuthorizations iterate %j', request); return this.descriptors.page.listDnsAuthorizations.asyncIterate( this.innerApiCalls['listDnsAuthorizations'] as GaxCall, @@ -5513,7 +5583,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.certificatemanager.v1.IListCertificateIssuanceConfigsRequest, @@ -5589,7 +5661,9 @@ export class CertificateManagerClient { const defaultCallSettings = this._defaults['listCertificateIssuanceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateIssuanceConfigs stream %j', request); return this.descriptors.page.listCertificateIssuanceConfigs.createStream( this.innerApiCalls.listCertificateIssuanceConfigs as GaxCall, @@ -5647,7 +5721,9 @@ export class CertificateManagerClient { const defaultCallSettings = this._defaults['listCertificateIssuanceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCertificateIssuanceConfigs iterate %j', request); return this.descriptors.page.listCertificateIssuanceConfigs.asyncIterate( this.innerApiCalls['listCertificateIssuanceConfigs'] as GaxCall, @@ -5758,7 +5834,9 @@ export class CertificateManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.certificatemanager.v1.IListTrustConfigsRequest, @@ -5832,7 +5910,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listTrustConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTrustConfigs stream %j', request); return this.descriptors.page.listTrustConfigs.createStream( this.innerApiCalls.listTrustConfigs as GaxCall, @@ -5888,7 +5968,9 @@ export class CertificateManagerClient { }); const defaultCallSettings = this._defaults['listTrustConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTrustConfigs iterate %j', request); return this.descriptors.page.listTrustConfigs.asyncIterate( this.innerApiCalls['listTrustConfigs'] as GaxCall, @@ -6068,7 +6150,7 @@ export class CertificateManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-certificatemanager/test/gapic_certificate_manager_v1.ts b/packages/google-cloud-certificatemanager/test/gapic_certificate_manager_v1.ts index 37569deefe4..de6e0928954 100644 --- a/packages/google-cloud-certificatemanager/test/gapic_certificate_manager_v1.ts +++ b/packages/google-cloud-certificatemanager/test/gapic_certificate_manager_v1.ts @@ -294,7 +294,9 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.certificateManagerStub); client.close().then(() => { done(); @@ -353,7 +355,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateRequest() ); @@ -384,7 +386,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateRequest() ); @@ -431,7 +433,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateRequest() ); @@ -462,7 +464,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateRequest() ); @@ -483,7 +485,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapRequest() ); @@ -514,7 +516,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapRequest() ); @@ -561,7 +563,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapRequest() ); @@ -592,7 +594,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapRequest() ); @@ -613,7 +615,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest() ); @@ -645,7 +647,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest() ); @@ -692,7 +694,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest() ); @@ -726,7 +728,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest() ); @@ -750,7 +752,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest() ); @@ -782,7 +784,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest() ); @@ -829,7 +831,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest() ); @@ -860,7 +862,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest() ); @@ -881,7 +883,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest() ); @@ -913,7 +915,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest() ); @@ -960,7 +962,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest() ); @@ -994,7 +996,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest() ); @@ -1018,7 +1020,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetTrustConfigRequest() ); @@ -1049,7 +1051,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetTrustConfigRequest() ); @@ -1096,7 +1098,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetTrustConfigRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.GetTrustConfigRequest() ); @@ -1148,7 +1150,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateRequest() ); @@ -1181,7 +1183,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateRequest() ); @@ -1235,7 +1237,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateRequest() ); @@ -1266,7 +1268,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateRequest() ); @@ -1299,7 +1301,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1321,7 +1323,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1342,7 +1344,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateRequest() ); @@ -1376,7 +1378,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateRequest() ); @@ -1431,7 +1433,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateRequest() ); @@ -1463,7 +1465,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1519,7 +1521,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1540,7 +1542,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateRequest() ); @@ -1573,7 +1575,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateRequest() ); @@ -1627,7 +1629,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateRequest() ); @@ -1658,7 +1660,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateRequest() ); @@ -1691,7 +1693,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1713,7 +1715,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1734,7 +1736,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapRequest() ); @@ -1767,7 +1769,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapRequest() ); @@ -1821,7 +1823,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapRequest() ); @@ -1852,7 +1854,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapRequest() ); @@ -1885,7 +1887,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1907,7 +1909,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1928,7 +1930,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest() ); @@ -1962,7 +1964,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest() ); @@ -2017,7 +2019,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest() ); @@ -2049,7 +2051,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest() ); @@ -2083,7 +2085,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2105,7 +2107,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2126,7 +2128,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest() ); @@ -2159,7 +2161,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest() ); @@ -2213,7 +2215,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest() ); @@ -2244,7 +2246,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest() ); @@ -2277,7 +2279,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2299,7 +2301,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2320,7 +2322,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest() ); @@ -2353,7 +2355,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest() ); @@ -2407,7 +2409,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest() ); @@ -2441,7 +2443,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest() ); @@ -2474,7 +2476,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2497,7 +2499,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2518,7 +2520,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest() ); @@ -2552,7 +2554,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest() ); @@ -2607,7 +2609,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest() ); @@ -2642,7 +2644,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest() ); @@ -2676,7 +2678,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2699,7 +2701,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2720,7 +2722,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest() ); @@ -2753,7 +2755,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest() ); @@ -2807,7 +2809,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest() ); @@ -2841,7 +2843,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest() ); @@ -2874,7 +2876,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2897,7 +2899,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2918,7 +2920,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest() ); @@ -2951,7 +2953,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest() ); @@ -3005,7 +3007,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest() ); @@ -3039,7 +3041,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest() ); @@ -3072,7 +3074,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3094,7 +3096,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3115,7 +3117,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest() ); @@ -3149,7 +3151,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest() ); @@ -3204,7 +3206,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest() ); @@ -3239,7 +3241,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest() ); @@ -3273,7 +3275,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3295,7 +3297,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3316,7 +3318,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest() ); @@ -3349,7 +3351,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest() ); @@ -3403,7 +3405,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest() ); @@ -3437,7 +3439,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest() ); @@ -3470,7 +3472,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3492,7 +3494,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3513,7 +3515,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest() ); @@ -3546,7 +3548,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest() ); @@ -3600,7 +3602,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest() ); @@ -3632,7 +3634,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest() ); @@ -3662,7 +3664,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3685,7 +3687,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3706,7 +3708,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest() ); @@ -3739,7 +3741,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest() ); @@ -3793,7 +3795,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest() ); @@ -3825,7 +3827,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest() ); @@ -3855,7 +3857,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3878,7 +3880,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3899,7 +3901,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateTrustConfigRequest() ); @@ -3932,7 +3934,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateTrustConfigRequest() ); @@ -3986,7 +3988,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateTrustConfigRequest() ); @@ -4017,7 +4019,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.CreateTrustConfigRequest() ); @@ -4050,7 +4052,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4072,7 +4074,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4093,7 +4095,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest() ); @@ -4127,7 +4129,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest() ); @@ -4182,7 +4184,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest() ); @@ -4214,7 +4216,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest() ); @@ -4248,7 +4250,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4270,7 +4272,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4291,7 +4293,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest() ); @@ -4324,7 +4326,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest() ); @@ -4378,7 +4380,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest() ); @@ -4409,7 +4411,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest() ); @@ -4442,7 +4444,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4464,7 +4466,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4485,7 +4487,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificatesRequest() ); @@ -4524,7 +4526,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificatesRequest() ); @@ -4581,7 +4583,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificatesRequest() ); @@ -4612,7 +4614,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificatesRequest() ); @@ -4673,7 +4675,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificatesRequest() ); @@ -4723,7 +4725,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificatesRequest() ); @@ -4773,7 +4775,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificatesRequest() ); @@ -4816,7 +4818,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapsRequest() ); @@ -4856,7 +4858,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapsRequest() ); @@ -4913,7 +4915,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapsRequest() ); @@ -4944,7 +4946,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapsRequest() ); @@ -5007,7 +5009,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapsRequest() ); @@ -5059,7 +5061,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapsRequest() ); @@ -5109,7 +5111,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapsRequest() ); @@ -5152,7 +5154,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest() ); @@ -5192,7 +5194,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest() ); @@ -5249,7 +5251,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest() ); @@ -5283,7 +5285,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest() ); @@ -5352,7 +5354,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest() ); @@ -5410,7 +5412,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest() ); @@ -5464,7 +5466,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest() ); @@ -5511,7 +5513,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest() ); @@ -5551,7 +5553,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest() ); @@ -5608,7 +5610,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest() ); @@ -5642,7 +5644,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest() ); @@ -5711,7 +5713,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest() ); @@ -5769,7 +5771,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest() ); @@ -5823,7 +5825,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest() ); @@ -5870,7 +5872,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest() ); @@ -5910,7 +5912,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest() ); @@ -5967,7 +5969,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest() ); @@ -6001,7 +6003,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest() ); @@ -6073,7 +6075,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest() ); @@ -6134,7 +6136,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest() ); @@ -6188,7 +6190,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest() ); @@ -6235,7 +6237,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListTrustConfigsRequest() ); @@ -6274,7 +6276,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListTrustConfigsRequest() ); @@ -6331,7 +6333,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListTrustConfigsRequest() ); @@ -6362,7 +6364,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListTrustConfigsRequest() ); @@ -6423,7 +6425,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListTrustConfigsRequest() ); @@ -6473,7 +6475,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListTrustConfigsRequest() ); @@ -6523,7 +6525,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.certificatemanager.v1.ListTrustConfigsRequest() ); @@ -6565,7 +6567,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6595,7 +6597,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6639,7 +6641,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6674,7 +6676,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6722,7 +6724,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6763,7 +6765,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -6842,7 +6844,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -6922,7 +6924,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7018,8 +7020,7 @@ describe('v1.CertificateManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7038,7 +7039,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7047,8 +7048,7 @@ describe('v1.CertificateManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -7064,7 +7064,7 @@ describe('v1.CertificateManagerClient', () => { }); describe('Path templates', () => { - describe('certificate', () => { + describe('certificate', async () => { const fakePath = '/rendered/path/certificate'; const expectedParameters = { project: 'projectValue', @@ -7075,7 +7075,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7128,7 +7128,7 @@ describe('v1.CertificateManagerClient', () => { }); }); - describe('certificateIssuanceConfig', () => { + describe('certificateIssuanceConfig', async () => { const fakePath = '/rendered/path/certificateIssuanceConfig'; const expectedParameters = { project: 'projectValue', @@ -7139,7 +7139,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateIssuanceConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7209,7 +7209,7 @@ describe('v1.CertificateManagerClient', () => { }); }); - describe('certificateMap', () => { + describe('certificateMap', async () => { const fakePath = '/rendered/path/certificateMap'; const expectedParameters = { project: 'projectValue', @@ -7220,7 +7220,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateMapPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7274,7 +7274,7 @@ describe('v1.CertificateManagerClient', () => { }); }); - describe('certificateMapEntry', () => { + describe('certificateMapEntry', async () => { const fakePath = '/rendered/path/certificateMapEntry'; const expectedParameters = { project: 'projectValue', @@ -7286,7 +7286,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateMapEntryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7368,7 +7368,7 @@ describe('v1.CertificateManagerClient', () => { }); }); - describe('dnsAuthorization', () => { + describe('dnsAuthorization', async () => { const fakePath = '/rendered/path/dnsAuthorization'; const expectedParameters = { project: 'projectValue', @@ -7379,7 +7379,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dnsAuthorizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7436,7 +7436,7 @@ describe('v1.CertificateManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -7446,7 +7446,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7485,7 +7485,7 @@ describe('v1.CertificateManagerClient', () => { }); }); - describe('trustConfig', () => { + describe('trustConfig', async () => { const fakePath = '/rendered/path/trustConfig'; const expectedParameters = { project: 'projectValue', @@ -7496,7 +7496,7 @@ describe('v1.CertificateManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.trustConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-channel/package.json b/packages/google-cloud-channel/package.json index 1058316306d..0e4b16cc480 100644 --- a/packages/google-cloud-channel/package.json +++ b/packages/google-cloud-channel/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json index be4bbe8a224..9ec24da8dd5 100644 --- a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-channel", - "version": "3.6.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json index bf6359357ee..2814c285b25 100644 --- a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-channel", - "version": "3.6.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts b/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts index 4602fa16460..e2c3263f775 100644 --- a/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts +++ b/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts @@ -649,7 +649,9 @@ export class CloudChannelReportsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudChannelReportsService-$RunReportJob', 'RunReportJob is deprecated and may be removed in a future version.', @@ -844,7 +846,9 @@ export class CloudChannelReportsServiceClient { this._gaxModule.routingHeader.fromParams({ report_job: request.reportJob ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudChannelReportsService-$FetchReportResults', 'FetchReportResults is deprecated and may be removed in a future version.', @@ -931,7 +935,9 @@ export class CloudChannelReportsServiceClient { }); const defaultCallSettings = this._defaults['fetchReportResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudChannelReportsService-$FetchReportResults', 'FetchReportResults is deprecated and may be removed in a future version.', @@ -1000,7 +1006,9 @@ export class CloudChannelReportsServiceClient { }); const defaultCallSettings = this._defaults['fetchReportResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudChannelReportsService-$FetchReportResults', 'FetchReportResults is deprecated and may be removed in a future version.', @@ -1120,7 +1128,9 @@ export class CloudChannelReportsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudChannelReportsService-$ListReports', 'ListReports is deprecated and may be removed in a future version.', @@ -1204,7 +1214,9 @@ export class CloudChannelReportsServiceClient { }); const defaultCallSettings = this._defaults['listReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudChannelReportsService-$ListReports', 'ListReports is deprecated and may be removed in a future version.', @@ -1270,7 +1282,9 @@ export class CloudChannelReportsServiceClient { }); const defaultCallSettings = this._defaults['listReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudChannelReportsService-$ListReports', 'ListReports is deprecated and may be removed in a future version.', @@ -1377,7 +1391,7 @@ export class CloudChannelReportsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts b/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts index d3c357bebab..84abeeb367a 100644 --- a/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts +++ b/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts @@ -825,7 +825,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomer request %j', request); const wrappedCallback: | Callback< @@ -971,7 +973,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkCloudIdentityAccountsExist request %j', request); const wrappedCallback: | Callback< @@ -1108,7 +1112,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomer request %j', request); const wrappedCallback: | Callback< @@ -1233,7 +1239,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ 'customer.name': request.customer!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomer request %j', request); const wrappedCallback: | Callback< @@ -1352,7 +1360,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCustomer request %j', request); const wrappedCallback: | Callback< @@ -1507,7 +1517,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importCustomer request %j', request); const wrappedCallback: | Callback< @@ -1629,7 +1641,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntitlement request %j', request); const wrappedCallback: | Callback< @@ -1763,7 +1777,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChannelPartnerLink request %j', request); const wrappedCallback: | Callback< @@ -1916,7 +1932,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createChannelPartnerLink request %j', request); const wrappedCallback: | Callback< @@ -2071,7 +2089,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateChannelPartnerLink request %j', request); const wrappedCallback: | Callback< @@ -2214,7 +2234,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -2384,7 +2406,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -2541,7 +2565,9 @@ export class CloudChannelServiceClient { 'customer_repricing_config.name': request.customerRepricingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -2684,7 +2710,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCustomerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -2827,7 +2855,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChannelPartnerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -3004,7 +3034,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createChannelPartnerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -3167,7 +3199,9 @@ export class CloudChannelServiceClient { 'channel_partner_repricing_config.name': request.channelPartnerRepricingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateChannelPartnerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -3315,7 +3349,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteChannelPartnerRepricingConfig request %j', request); const wrappedCallback: | Callback< @@ -3443,7 +3479,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ entitlement: request.entitlement ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupOffer request %j', request); const wrappedCallback: | Callback< @@ -3578,7 +3616,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ customer: request.customer ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryEligibleBillingAccounts request %j', request); const wrappedCallback: | Callback< @@ -3717,7 +3757,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ account: request.account ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('registerSubscriber request %j', request); const wrappedCallback: | Callback< @@ -3856,7 +3898,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ account: request.account ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('unregisterSubscriber request %j', request); const wrappedCallback: | Callback< @@ -4018,7 +4062,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ customer: request.customer ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4240,7 +4286,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4453,7 +4501,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4659,7 +4709,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4877,7 +4929,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5082,7 +5136,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5284,7 +5340,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5491,7 +5549,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5699,7 +5759,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5919,7 +5981,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6131,7 +6195,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6316,7 +6382,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListCustomersRequest, @@ -6394,7 +6462,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listCustomers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomers stream %j', request); return this.descriptors.page.listCustomers.createStream( this.innerApiCalls.listCustomers as GaxCall, @@ -6454,7 +6524,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listCustomers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomers iterate %j', request); return this.descriptors.page.listCustomers.asyncIterate( this.innerApiCalls['listCustomers'] as GaxCall, @@ -6575,7 +6647,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListEntitlementsRequest, @@ -6649,7 +6723,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlements stream %j', request); return this.descriptors.page.listEntitlements.createStream( this.innerApiCalls.listEntitlements as GaxCall, @@ -6705,7 +6781,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlements iterate %j', request); return this.descriptors.page.listEntitlements.asyncIterate( this.innerApiCalls['listEntitlements'] as GaxCall, @@ -6851,7 +6929,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListTransferableSkusRequest, @@ -6942,7 +7022,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listTransferableSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferableSkus stream %j', request); return this.descriptors.page.listTransferableSkus.createStream( this.innerApiCalls.listTransferableSkus as GaxCall, @@ -7015,7 +7097,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listTransferableSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferableSkus iterate %j', request); return this.descriptors.page.listTransferableSkus.asyncIterate( this.innerApiCalls['listTransferableSkus'] as GaxCall, @@ -7162,7 +7246,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListTransferableOffersRequest, @@ -7251,7 +7337,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listTransferableOffers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferableOffers stream %j', request); return this.descriptors.page.listTransferableOffers.createStream( this.innerApiCalls.listTransferableOffers as GaxCall, @@ -7322,7 +7410,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listTransferableOffers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferableOffers iterate %j', request); return this.descriptors.page.listTransferableOffers.asyncIterate( this.innerApiCalls['listTransferableOffers'] as GaxCall, @@ -7445,7 +7535,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, @@ -7520,7 +7612,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listChannelPartnerLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelPartnerLinks stream %j', request); return this.descriptors.page.listChannelPartnerLinks.createStream( this.innerApiCalls.listChannelPartnerLinks as GaxCall, @@ -7577,7 +7671,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listChannelPartnerLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelPartnerLinks iterate %j', request); return this.descriptors.page.listChannelPartnerLinks.asyncIterate( this.innerApiCalls['listChannelPartnerLinks'] as GaxCall, @@ -7721,7 +7817,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, @@ -7804,7 +7902,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listCustomerRepricingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomerRepricingConfigs stream %j', request); return this.descriptors.page.listCustomerRepricingConfigs.createStream( this.innerApiCalls.listCustomerRepricingConfigs as GaxCall, @@ -7869,7 +7969,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listCustomerRepricingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomerRepricingConfigs iterate %j', request); return this.descriptors.page.listCustomerRepricingConfigs.asyncIterate( this.innerApiCalls['listCustomerRepricingConfigs'] as GaxCall, @@ -8016,7 +8118,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, @@ -8110,7 +8214,9 @@ export class CloudChannelServiceClient { const defaultCallSettings = this._defaults['listChannelPartnerRepricingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelPartnerRepricingConfigs stream %j', request); return this.descriptors.page.listChannelPartnerRepricingConfigs.createStream( this.innerApiCalls.listChannelPartnerRepricingConfigs as GaxCall, @@ -8180,7 +8286,9 @@ export class CloudChannelServiceClient { const defaultCallSettings = this._defaults['listChannelPartnerRepricingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelPartnerRepricingConfigs iterate %j', request); return this.descriptors.page.listChannelPartnerRepricingConfigs.asyncIterate( this.innerApiCalls['listChannelPartnerRepricingConfigs'] as GaxCall, @@ -8302,7 +8410,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListSkuGroupsRequest, @@ -8375,7 +8485,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSkuGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkuGroups stream %j', request); return this.descriptors.page.listSkuGroups.createStream( this.innerApiCalls.listSkuGroups as GaxCall, @@ -8430,7 +8542,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSkuGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkuGroups iterate %j', request); return this.descriptors.page.listSkuGroups.asyncIterate( this.innerApiCalls['listSkuGroups'] as GaxCall, @@ -8557,7 +8671,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, @@ -8629,7 +8745,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSkuGroupBillableSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkuGroupBillableSkus stream %j', request); return this.descriptors.page.listSkuGroupBillableSkus.createStream( this.innerApiCalls.listSkuGroupBillableSkus as GaxCall, @@ -8683,7 +8801,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSkuGroupBillableSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkuGroupBillableSkus iterate %j', request); return this.descriptors.page.listSkuGroupBillableSkus.asyncIterate( this.innerApiCalls['listSkuGroupBillableSkus'] as GaxCall, @@ -8786,7 +8906,9 @@ export class CloudChannelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListProductsRequest, @@ -8854,7 +8976,9 @@ export class CloudChannelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -8904,7 +9028,9 @@ export class CloudChannelServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, @@ -9014,7 +9140,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListSkusRequest, @@ -9089,7 +9217,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkus stream %j', request); return this.descriptors.page.listSkus.createStream( this.innerApiCalls.listSkus as GaxCall, @@ -9148,7 +9278,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkus iterate %j', request); return this.descriptors.page.listSkus.asyncIterate( this.innerApiCalls['listSkus'] as GaxCall, @@ -9264,7 +9396,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListOffersRequest, @@ -9345,7 +9479,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listOffers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOffers stream %j', request); return this.descriptors.page.listOffers.createStream( this.innerApiCalls.listOffers as GaxCall, @@ -9410,7 +9546,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listOffers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOffers iterate %j', request); return this.descriptors.page.listOffers.asyncIterate( this.innerApiCalls['listOffers'] as GaxCall, @@ -9531,7 +9669,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ customer: request.customer ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListPurchasableSkusRequest, @@ -9607,7 +9747,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listPurchasableSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPurchasableSkus stream %j', request); return this.descriptors.page.listPurchasableSkus.createStream( this.innerApiCalls.listPurchasableSkus as GaxCall, @@ -9665,7 +9807,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listPurchasableSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPurchasableSkus iterate %j', request); return this.descriptors.page.listPurchasableSkus.asyncIterate( this.innerApiCalls['listPurchasableSkus'] as GaxCall, @@ -9789,7 +9933,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ customer: request.customer ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListPurchasableOffersRequest, @@ -9865,7 +10011,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listPurchasableOffers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPurchasableOffers stream %j', request); return this.descriptors.page.listPurchasableOffers.createStream( this.innerApiCalls.listPurchasableOffers as GaxCall, @@ -9923,7 +10071,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listPurchasableOffers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPurchasableOffers iterate %j', request); return this.descriptors.page.listPurchasableOffers.asyncIterate( this.innerApiCalls['listPurchasableOffers'] as GaxCall, @@ -10048,7 +10198,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ account: request.account ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListSubscribersRequest, @@ -10120,7 +10272,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSubscribers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubscribers stream %j', request); return this.descriptors.page.listSubscribers.createStream( this.innerApiCalls.listSubscribers as GaxCall, @@ -10174,7 +10328,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listSubscribers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubscribers iterate %j', request); return this.descriptors.page.listSubscribers.asyncIterate( this.innerApiCalls['listSubscribers'] as GaxCall, @@ -10307,7 +10463,9 @@ export class CloudChannelServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.channel.v1.IListEntitlementChangesRequest, @@ -10388,7 +10546,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listEntitlementChanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlementChanges stream %j', request); return this.descriptors.page.listEntitlementChanges.createStream( this.innerApiCalls.listEntitlementChanges as GaxCall, @@ -10451,7 +10611,9 @@ export class CloudChannelServiceClient { }); const defaultCallSettings = this._defaults['listEntitlementChanges']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlementChanges iterate %j', request); return this.descriptors.page.listEntitlementChanges.asyncIterate( this.innerApiCalls['listEntitlementChanges'] as GaxCall, @@ -10553,7 +10715,7 @@ export class CloudChannelServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-channel/test/gapic_cloud_channel_service_v1.ts b/packages/google-cloud-channel/test/gapic_cloud_channel_service_v1.ts index f9e74579006..39bda8b3cd7 100644 --- a/packages/google-cloud-channel/test/gapic_cloud_channel_service_v1.ts +++ b/packages/google-cloud-channel/test/gapic_cloud_channel_service_v1.ts @@ -11336,8 +11336,7 @@ describe('v1.CloudChannelServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -11367,8 +11366,7 @@ describe('v1.CloudChannelServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-cloud-cloudcontrolspartner/package.json b/packages/google-cloud-cloudcontrolspartner/package.json index 54618db8bbc..4dabdb4d00d 100644 --- a/packages/google-cloud-cloudcontrolspartner/package.json +++ b/packages/google-cloud-cloudcontrolspartner/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json index 86bd8b84f77..f1da9d6b3ba 100644 --- a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json +++ b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudcontrolspartner", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json index 9b59b97dac0..4731e4ca85d 100644 --- a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json +++ b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudcontrolspartner", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_core_client.ts b/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_core_client.ts index 81cb842d3c7..30a942edce7 100644 --- a/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_core_client.ts +++ b/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_core_client.ts @@ -514,7 +514,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkload request %j', request); const wrappedCallback: | Callback< @@ -640,7 +642,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomer request %j', request); const wrappedCallback: | Callback< @@ -766,7 +770,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEkmConnections request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPartnerPermissions request %j', request); const wrappedCallback: | Callback< @@ -1018,7 +1026,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPartner request %j', request); const wrappedCallback: | Callback< @@ -1153,7 +1163,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.cloudcontrolspartner.v1.IListWorkloadsRequest, @@ -1226,7 +1238,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads stream %j', request); return this.descriptors.page.listWorkloads.createStream( this.innerApiCalls.listWorkloads as GaxCall, @@ -1281,7 +1295,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads iterate %j', request); return this.descriptors.page.listWorkloads.asyncIterate( this.innerApiCalls['listWorkloads'] as GaxCall, @@ -1390,7 +1406,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.cloudcontrolspartner.v1.IListCustomersRequest, @@ -1462,7 +1480,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listCustomers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomers stream %j', request); return this.descriptors.page.listCustomers.createStream( this.innerApiCalls.listCustomers as GaxCall, @@ -1516,7 +1536,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listCustomers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomers iterate %j', request); return this.descriptors.page.listCustomers.asyncIterate( this.innerApiCalls['listCustomers'] as GaxCall, @@ -1630,7 +1652,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudControlsPartnerCore-$ListAccessApprovalRequests', 'ListAccessApprovalRequests is deprecated and may be removed in a future version.', @@ -1711,7 +1735,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listAccessApprovalRequests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudControlsPartnerCore-$ListAccessApprovalRequests', 'ListAccessApprovalRequests is deprecated and may be removed in a future version.', @@ -1774,7 +1800,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listAccessApprovalRequests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudControlsPartnerCore-$ListAccessApprovalRequests', 'ListAccessApprovalRequests is deprecated and may be removed in a future version.', diff --git a/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_monitoring_client.ts b/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_monitoring_client.ts index 5723edc0d2f..a00f934b3ed 100644 --- a/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_monitoring_client.ts +++ b/packages/google-cloud-cloudcontrolspartner/src/v1/cloud_controls_partner_monitoring_client.ts @@ -498,7 +498,9 @@ export class CloudControlsPartnerMonitoringClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getViolation request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class CloudControlsPartnerMonitoringClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.cloudcontrolspartner.v1.IListViolationsRequest, @@ -720,7 +724,9 @@ export class CloudControlsPartnerMonitoringClient { }); const defaultCallSettings = this._defaults['listViolations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViolations stream %j', request); return this.descriptors.page.listViolations.createStream( this.innerApiCalls.listViolations as GaxCall, @@ -779,7 +785,9 @@ export class CloudControlsPartnerMonitoringClient { }); const defaultCallSettings = this._defaults['listViolations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViolations iterate %j', request); return this.descriptors.page.listViolations.asyncIterate( this.innerApiCalls['listViolations'] as GaxCall, diff --git a/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_core_client.ts b/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_core_client.ts index 414c9601b1d..c2c3a2e9afc 100644 --- a/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_core_client.ts +++ b/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_core_client.ts @@ -517,7 +517,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkload request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomer request %j', request); const wrappedCallback: | Callback< @@ -769,7 +773,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEkmConnections request %j', request); const wrappedCallback: | Callback< @@ -895,7 +901,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPartnerPermissions request %j', request); const wrappedCallback: | Callback< @@ -1021,7 +1029,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPartner request %j', request); const wrappedCallback: | Callback< @@ -1153,7 +1163,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomer request %j', request); const wrappedCallback: | Callback< @@ -1282,7 +1294,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ 'customer.name': request.customer!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomer request %j', request); const wrappedCallback: | Callback< @@ -1408,7 +1422,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCustomer request %j', request); const wrappedCallback: | Callback< @@ -1543,7 +1559,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.cloudcontrolspartner.v1beta.IListWorkloadsRequest, @@ -1616,7 +1634,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads stream %j', request); return this.descriptors.page.listWorkloads.createStream( this.innerApiCalls.listWorkloads as GaxCall, @@ -1671,7 +1691,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads iterate %j', request); return this.descriptors.page.listWorkloads.asyncIterate( this.innerApiCalls['listWorkloads'] as GaxCall, @@ -1780,7 +1802,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.cloudcontrolspartner.v1beta.IListCustomersRequest, @@ -1852,7 +1876,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listCustomers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomers stream %j', request); return this.descriptors.page.listCustomers.createStream( this.innerApiCalls.listCustomers as GaxCall, @@ -1906,7 +1932,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listCustomers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomers iterate %j', request); return this.descriptors.page.listCustomers.asyncIterate( this.innerApiCalls['listCustomers'] as GaxCall, @@ -2020,7 +2048,9 @@ export class CloudControlsPartnerCoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudControlsPartnerCore-$ListAccessApprovalRequests', 'ListAccessApprovalRequests is deprecated and may be removed in a future version.', @@ -2101,7 +2131,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listAccessApprovalRequests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudControlsPartnerCore-$ListAccessApprovalRequests', 'ListAccessApprovalRequests is deprecated and may be removed in a future version.', @@ -2164,7 +2196,9 @@ export class CloudControlsPartnerCoreClient { }); const defaultCallSettings = this._defaults['listAccessApprovalRequests']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$CloudControlsPartnerCore-$ListAccessApprovalRequests', 'ListAccessApprovalRequests is deprecated and may be removed in a future version.', diff --git a/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_monitoring_client.ts b/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_monitoring_client.ts index ded250205bc..168b6fe0041 100644 --- a/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_monitoring_client.ts +++ b/packages/google-cloud-cloudcontrolspartner/src/v1beta/cloud_controls_partner_monitoring_client.ts @@ -498,7 +498,9 @@ export class CloudControlsPartnerMonitoringClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getViolation request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class CloudControlsPartnerMonitoringClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.cloudcontrolspartner.v1beta.IListViolationsRequest, @@ -720,7 +724,9 @@ export class CloudControlsPartnerMonitoringClient { }); const defaultCallSettings = this._defaults['listViolations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViolations stream %j', request); return this.descriptors.page.listViolations.createStream( this.innerApiCalls.listViolations as GaxCall, @@ -779,7 +785,9 @@ export class CloudControlsPartnerMonitoringClient { }); const defaultCallSettings = this._defaults['listViolations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViolations iterate %j', request); return this.descriptors.page.listViolations.asyncIterate( this.innerApiCalls['listViolations'] as GaxCall, diff --git a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1.ts b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1.ts index 0c2a2908242..0e64c32f66e 100644 --- a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1.ts +++ b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1.ts @@ -268,7 +268,9 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudControlsPartnerCoreStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest() ); @@ -363,7 +365,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest() ); @@ -411,7 +413,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest() ); @@ -443,7 +445,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest() ); @@ -465,7 +467,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetCustomerRequest() ); @@ -497,7 +499,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetCustomerRequest() ); @@ -545,7 +547,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetCustomerRequest() ); @@ -577,7 +579,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetCustomerRequest() ); @@ -599,7 +601,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest() ); @@ -631,7 +633,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest() ); @@ -679,7 +681,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest() ); @@ -711,7 +713,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest() ); @@ -733,7 +735,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest() ); @@ -766,7 +768,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest() ); @@ -814,7 +816,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest() ); @@ -849,7 +851,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest() ); @@ -874,7 +876,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerRequest() ); @@ -906,7 +908,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerRequest() ); @@ -954,7 +956,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerRequest() ); @@ -986,7 +988,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetPartnerRequest() ); @@ -1008,7 +1010,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest() ); @@ -1048,7 +1050,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest() ); @@ -1106,7 +1108,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest() ); @@ -1138,7 +1140,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest() ); @@ -1251,7 +1253,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest() ); @@ -1386,7 +1388,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest() ); @@ -1444,7 +1446,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest() ); @@ -1476,7 +1478,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest() ); @@ -1538,7 +1540,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest() ); @@ -1589,7 +1591,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest() ); @@ -1640,7 +1642,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest() ); @@ -1685,7 +1687,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest() ); @@ -1728,7 +1730,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest() ); @@ -1788,7 +1790,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest() ); @@ -1825,7 +1827,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest() ); @@ -1897,7 +1899,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest() ); @@ -1958,7 +1960,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest() ); @@ -2015,7 +2017,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest() ); @@ -2058,7 +2060,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { }); describe('Path templates', () => { - describe('accessApprovalRequest', () => { + describe('accessApprovalRequest', async () => { const fakePath = '/rendered/path/accessApprovalRequest'; const expectedParameters = { organization: 'organizationValue', @@ -2072,7 +2074,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accessApprovalRequestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2172,7 +2174,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { }); }); - describe('customer', () => { + describe('customer', async () => { const fakePath = '/rendered/path/customer'; const expectedParameters = { organization: 'organizationValue', @@ -2184,7 +2186,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2237,7 +2239,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { }); }); - describe('ekmConnections', () => { + describe('ekmConnections', async () => { const fakePath = '/rendered/path/ekmConnections'; const expectedParameters = { organization: 'organizationValue', @@ -2250,7 +2252,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2314,7 +2316,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { }); }); - describe('partner', () => { + describe('partner', async () => { const fakePath = '/rendered/path/partner'; const expectedParameters = { organization: 'organizationValue', @@ -2325,7 +2327,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2364,7 +2366,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { }); }); - describe('partnerPermissions', () => { + describe('partnerPermissions', async () => { const fakePath = '/rendered/path/partnerPermissions'; const expectedParameters = { organization: 'organizationValue', @@ -2377,7 +2379,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPermissionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2457,7 +2459,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { }); }); - describe('violation', () => { + describe('violation', async () => { const fakePath = '/rendered/path/violation'; const expectedParameters = { organization: 'organizationValue', @@ -2471,7 +2473,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.violationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2546,7 +2548,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { }); }); - describe('workload', () => { + describe('workload', async () => { const fakePath = '/rendered/path/workload'; const expectedParameters = { organization: 'organizationValue', @@ -2559,7 +2561,7 @@ describe('v1.CloudControlsPartnerCoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workloadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1beta.ts b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1beta.ts index 391edc549b5..cb8b84687ec 100644 --- a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1beta.ts +++ b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_core_v1beta.ts @@ -274,7 +274,9 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudControlsPartnerCoreStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest() ); @@ -379,7 +381,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest() ); @@ -429,7 +431,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest() ); @@ -463,7 +465,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest() ); @@ -487,7 +489,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest() ); @@ -521,7 +523,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest() ); @@ -571,7 +573,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest() ); @@ -605,7 +607,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest() ); @@ -629,7 +631,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest() ); @@ -663,7 +665,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest() ); @@ -713,7 +715,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest() ); @@ -747,7 +749,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest() ); @@ -771,7 +773,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest() ); @@ -806,7 +808,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest() ); @@ -856,7 +858,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest() ); @@ -893,7 +895,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest() ); @@ -920,7 +922,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest() ); @@ -954,7 +956,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest() ); @@ -1004,7 +1006,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest() ); @@ -1038,7 +1040,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest() ); @@ -1062,7 +1064,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest() ); @@ -1096,7 +1098,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest() ); @@ -1146,7 +1148,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest() ); @@ -1180,7 +1182,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest() ); @@ -1204,7 +1206,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest() ); @@ -1239,7 +1241,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest() ); @@ -1290,7 +1292,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest() ); @@ -1325,7 +1327,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest() ); @@ -1350,7 +1352,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest() ); @@ -1384,7 +1386,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest() ); @@ -1434,7 +1436,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest() ); @@ -1468,7 +1470,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest() ); @@ -1492,7 +1494,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest() ); @@ -1534,7 +1536,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest() ); @@ -1594,7 +1596,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest() ); @@ -1628,7 +1630,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest() ); @@ -1694,7 +1696,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest() ); @@ -1749,7 +1751,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest() ); @@ -1802,7 +1804,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest() ); @@ -1848,7 +1850,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest() ); @@ -1890,7 +1892,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest() ); @@ -1950,7 +1952,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest() ); @@ -1984,7 +1986,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest() ); @@ -2050,7 +2052,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest() ); @@ -2105,7 +2107,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest() ); @@ -2158,7 +2160,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest() ); @@ -2205,7 +2207,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest() ); @@ -2250,7 +2252,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest() ); @@ -2312,7 +2314,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest() ); @@ -2351,7 +2353,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest() ); @@ -2425,7 +2427,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest() ); @@ -2488,7 +2490,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest() ); @@ -2547,7 +2549,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { } ); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest() ); @@ -2590,7 +2592,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { }); describe('Path templates', () => { - describe('accessApprovalRequest', () => { + describe('accessApprovalRequest', async () => { const fakePath = '/rendered/path/accessApprovalRequest'; const expectedParameters = { organization: 'organizationValue', @@ -2606,7 +2608,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accessApprovalRequestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2706,7 +2708,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { }); }); - describe('customer', () => { + describe('customer', async () => { const fakePath = '/rendered/path/customer'; const expectedParameters = { organization: 'organizationValue', @@ -2720,7 +2722,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2773,7 +2775,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { }); }); - describe('ekmConnections', () => { + describe('ekmConnections', async () => { const fakePath = '/rendered/path/ekmConnections'; const expectedParameters = { organization: 'organizationValue', @@ -2788,7 +2790,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2852,7 +2854,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { }); }); - describe('partner', () => { + describe('partner', async () => { const fakePath = '/rendered/path/partner'; const expectedParameters = { organization: 'organizationValue', @@ -2865,7 +2867,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2904,7 +2906,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { }); }); - describe('partnerPermissions', () => { + describe('partnerPermissions', async () => { const fakePath = '/rendered/path/partnerPermissions'; const expectedParameters = { organization: 'organizationValue', @@ -2919,7 +2921,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPermissionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2999,7 +3001,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { }); }); - describe('violation', () => { + describe('violation', async () => { const fakePath = '/rendered/path/violation'; const expectedParameters = { organization: 'organizationValue', @@ -3015,7 +3017,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.violationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3090,7 +3092,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { }); }); - describe('workload', () => { + describe('workload', async () => { const fakePath = '/rendered/path/workload'; const expectedParameters = { organization: 'organizationValue', @@ -3105,7 +3107,7 @@ describe('v1beta.CloudControlsPartnerCoreClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.workloadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1.ts b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1.ts index e85789c2763..7d42d8c7f83 100644 --- a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1.ts +++ b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1.ts @@ -274,7 +274,9 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudControlsPartnerMonitoringStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetViolationRequest() ); @@ -379,7 +381,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetViolationRequest() ); @@ -429,7 +431,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetViolationRequest() ); @@ -463,7 +465,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.GetViolationRequest() ); @@ -487,7 +489,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest() ); @@ -529,7 +531,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest() ); @@ -589,7 +591,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest() ); @@ -623,7 +625,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest() ); @@ -687,7 +689,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest() ); @@ -740,7 +742,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest() ); @@ -793,7 +795,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest() ); @@ -831,7 +833,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { }); describe('Path templates', () => { - describe('accessApprovalRequest', () => { + describe('accessApprovalRequest', async () => { const fakePath = '/rendered/path/accessApprovalRequest'; const expectedParameters = { organization: 'organizationValue', @@ -847,7 +849,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accessApprovalRequestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -947,7 +949,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('customer', () => { + describe('customer', async () => { const fakePath = '/rendered/path/customer'; const expectedParameters = { organization: 'organizationValue', @@ -961,7 +963,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1014,7 +1016,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('ekmConnections', () => { + describe('ekmConnections', async () => { const fakePath = '/rendered/path/ekmConnections'; const expectedParameters = { organization: 'organizationValue', @@ -1029,7 +1031,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1093,7 +1095,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('partner', () => { + describe('partner', async () => { const fakePath = '/rendered/path/partner'; const expectedParameters = { organization: 'organizationValue', @@ -1106,7 +1108,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1145,7 +1147,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('partnerPermissions', () => { + describe('partnerPermissions', async () => { const fakePath = '/rendered/path/partnerPermissions'; const expectedParameters = { organization: 'organizationValue', @@ -1160,7 +1162,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPermissionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1240,7 +1242,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('violation', () => { + describe('violation', async () => { const fakePath = '/rendered/path/violation'; const expectedParameters = { organization: 'organizationValue', @@ -1256,7 +1258,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.violationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1331,7 +1333,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('workload', () => { + describe('workload', async () => { const fakePath = '/rendered/path/workload'; const expectedParameters = { organization: 'organizationValue', @@ -1346,7 +1348,7 @@ describe('v1.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.workloadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1beta.ts b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1beta.ts index 0705c6de5f2..3e94585d78a 100644 --- a/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1beta.ts +++ b/packages/google-cloud-cloudcontrolspartner/test/gapic_cloud_controls_partner_monitoring_v1beta.ts @@ -274,7 +274,9 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudControlsPartnerMonitoringStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest() ); @@ -379,7 +381,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest() ); @@ -429,7 +431,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest() ); @@ -463,7 +465,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest() ); @@ -487,7 +489,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest() ); @@ -529,7 +531,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest() ); @@ -589,7 +591,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest() ); @@ -623,7 +625,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest() ); @@ -689,7 +691,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest() ); @@ -744,7 +746,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest() ); @@ -797,7 +799,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest() ); @@ -835,7 +837,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { }); describe('Path templates', () => { - describe('accessApprovalRequest', () => { + describe('accessApprovalRequest', async () => { const fakePath = '/rendered/path/accessApprovalRequest'; const expectedParameters = { organization: 'organizationValue', @@ -851,7 +853,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.accessApprovalRequestPathTemplate.render = sinon .stub() .returns(fakePath); @@ -951,7 +953,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('customer', () => { + describe('customer', async () => { const fakePath = '/rendered/path/customer'; const expectedParameters = { organization: 'organizationValue', @@ -965,7 +967,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.customerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1018,7 +1020,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('ekmConnections', () => { + describe('ekmConnections', async () => { const fakePath = '/rendered/path/ekmConnections'; const expectedParameters = { organization: 'organizationValue', @@ -1033,7 +1035,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.ekmConnectionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1097,7 +1099,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('partner', () => { + describe('partner', async () => { const fakePath = '/rendered/path/partner'; const expectedParameters = { organization: 'organizationValue', @@ -1110,7 +1112,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1149,7 +1151,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('partnerPermissions', () => { + describe('partnerPermissions', async () => { const fakePath = '/rendered/path/partnerPermissions'; const expectedParameters = { organization: 'organizationValue', @@ -1164,7 +1166,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.partnerPermissionsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1244,7 +1246,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('violation', () => { + describe('violation', async () => { const fakePath = '/rendered/path/violation'; const expectedParameters = { organization: 'organizationValue', @@ -1260,7 +1262,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.violationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1335,7 +1337,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { }); }); - describe('workload', () => { + describe('workload', async () => { const fakePath = '/rendered/path/workload'; const expectedParameters = { organization: 'organizationValue', @@ -1350,7 +1352,7 @@ describe('v1beta.CloudControlsPartnerMonitoringClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.workloadPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-clouddms/package.json b/packages/google-cloud-clouddms/package.json index 0f72a5ecc5b..0dd2e307b3b 100644 --- a/packages/google-cloud-clouddms/package.json +++ b/packages/google-cloud-clouddms/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json index 3fde22d4c96..862c7057bc3 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json +++ b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clouddms", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json index 8076df29e13..b28f955f9eb 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json +++ b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clouddms", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts b/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts index 4faa1e9cf67..534cc1d003c 100644 --- a/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts +++ b/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts @@ -979,7 +979,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMigrationJob request %j', request); const wrappedCallback: | Callback< @@ -1104,7 +1106,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ migration_job: request.migrationJob ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateSshScript request %j', request); const wrappedCallback: | Callback< @@ -1241,7 +1245,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ migration_job: request.migrationJob ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateTcpProxyScript request %j', request); const wrappedCallback: | Callback< @@ -1360,7 +1366,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectionProfile request %j', request); const wrappedCallback: | Callback< @@ -1479,7 +1487,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPrivateConnection request %j', request); const wrappedCallback: | Callback< @@ -1604,7 +1614,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversionWorkspace request %j', request); const wrappedCallback: | Callback< @@ -1737,7 +1749,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createMappingRule request %j', request); const wrappedCallback: | Callback< @@ -1861,7 +1875,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMappingRule request %j', request); const wrappedCallback: | Callback< @@ -1977,7 +1993,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMappingRule request %j', request); const wrappedCallback: | Callback< @@ -2110,7 +2128,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ conversion_workspace: request.conversionWorkspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchBackgroundJobs request %j', request); const wrappedCallback: | Callback< @@ -2240,7 +2260,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ conversion_workspace: request.conversionWorkspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('describeConversionWorkspaceRevisions request %j', request); const wrappedCallback: | Callback< @@ -2392,7 +2414,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2570,7 +2594,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'migration_job.name': request.migrationJob!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2749,7 +2775,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2919,7 +2947,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3086,7 +3116,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3254,7 +3286,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3422,7 +3456,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3596,7 +3632,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3768,7 +3806,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3955,7 +3995,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4141,7 +4183,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'connection_profile.name': request.connectionProfile!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4321,7 +4365,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4502,7 +4548,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4677,7 +4725,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4856,7 +4906,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5034,7 +5086,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ 'conversion_workspace.name': request.conversionWorkspace!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5212,7 +5266,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5390,7 +5446,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5567,7 +5625,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5745,7 +5805,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5914,7 +5976,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6081,7 +6145,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6269,7 +6335,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6451,7 +6519,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, @@ -6536,7 +6606,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationJobs stream %j', request); return this.descriptors.page.listMigrationJobs.createStream( this.innerApiCalls.listMigrationJobs as GaxCall, @@ -6603,7 +6675,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listMigrationJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigrationJobs iterate %j', request); return this.descriptors.page.listMigrationJobs.asyncIterate( this.innerApiCalls['listMigrationJobs'] as GaxCall, @@ -6725,7 +6799,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, @@ -6809,7 +6885,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listConnectionProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectionProfiles stream %j', request); return this.descriptors.page.listConnectionProfiles.createStream( this.innerApiCalls.listConnectionProfiles as GaxCall, @@ -6875,7 +6953,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listConnectionProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectionProfiles iterate %j', request); return this.descriptors.page.listConnectionProfiles.asyncIterate( this.innerApiCalls['listConnectionProfiles'] as GaxCall, @@ -6993,7 +7073,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, @@ -7074,7 +7156,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections stream %j', request); return this.descriptors.page.listPrivateConnections.createStream( this.innerApiCalls.listPrivateConnections as GaxCall, @@ -7137,7 +7221,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections iterate %j', request); return this.descriptors.page.listPrivateConnections.asyncIterate( this.innerApiCalls['listPrivateConnections'] as GaxCall, @@ -7254,7 +7340,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, @@ -7334,7 +7422,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listConversionWorkspaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversionWorkspaces stream %j', request); return this.descriptors.page.listConversionWorkspaces.createStream( this.innerApiCalls.listConversionWorkspaces as GaxCall, @@ -7396,7 +7486,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listConversionWorkspaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversionWorkspaces iterate %j', request); return this.descriptors.page.listConversionWorkspaces.asyncIterate( this.innerApiCalls['listConversionWorkspaces'] as GaxCall, @@ -7505,7 +7597,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.clouddms.v1.IListMappingRulesRequest, @@ -7577,7 +7671,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listMappingRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMappingRules stream %j', request); return this.descriptors.page.listMappingRules.createStream( this.innerApiCalls.listMappingRules as GaxCall, @@ -7631,7 +7727,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['listMappingRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMappingRules iterate %j', request); return this.descriptors.page.listMappingRules.asyncIterate( this.innerApiCalls['listMappingRules'] as GaxCall, @@ -7759,7 +7857,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ conversion_workspace: request.conversionWorkspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, @@ -7845,7 +7945,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['describeDatabaseEntities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('describeDatabaseEntities stream %j', request); return this.descriptors.page.describeDatabaseEntities.createStream( this.innerApiCalls.describeDatabaseEntities as GaxCall, @@ -7913,7 +8015,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['describeDatabaseEntities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('describeDatabaseEntities iterate %j', request); return this.descriptors.page.describeDatabaseEntities.asyncIterate( this.innerApiCalls['describeDatabaseEntities'] as GaxCall, @@ -8017,7 +8121,9 @@ export class DataMigrationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, @@ -8083,7 +8189,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchStaticIps stream %j', request); return this.descriptors.page.fetchStaticIps.createStream( this.innerApiCalls.fetchStaticIps as GaxCall, @@ -8131,7 +8239,9 @@ export class DataMigrationServiceClient { }); const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchStaticIps iterate %j', request); return this.descriptors.page.fetchStaticIps.asyncIterate( this.innerApiCalls['fetchStaticIps'] as GaxCall, @@ -8449,7 +8559,7 @@ export class DataMigrationServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts b/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts index 7042704c54f..b7433421ba9 100644 --- a/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts +++ b/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts @@ -304,7 +304,9 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataMigrationServiceStub); client.close().then(() => { done(); @@ -367,7 +369,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMigrationJobRequest() ); @@ -399,7 +401,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMigrationJobRequest() ); @@ -447,7 +449,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMigrationJobRequest() ); @@ -479,7 +481,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMigrationJobRequest() ); @@ -501,7 +503,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateSshScriptRequest() ); @@ -533,7 +535,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateSshScriptRequest() ); @@ -581,7 +583,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateSshScriptRequest() ); @@ -613,7 +615,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateSshScriptRequest() ); @@ -635,7 +637,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateTcpProxyScriptRequest() ); @@ -668,7 +670,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateTcpProxyScriptRequest() ); @@ -716,7 +718,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateTcpProxyScriptRequest() ); @@ -751,7 +753,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GenerateTcpProxyScriptRequest() ); @@ -776,7 +778,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConnectionProfileRequest() ); @@ -809,7 +811,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConnectionProfileRequest() ); @@ -857,7 +859,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConnectionProfileRequest() ); @@ -889,7 +891,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConnectionProfileRequest() ); @@ -911,7 +913,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); @@ -944,7 +946,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); @@ -992,7 +994,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); @@ -1024,7 +1026,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() ); @@ -1162,7 +1164,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() ); @@ -1187,7 +1189,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMappingRuleRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMappingRuleRequest() ); @@ -1267,7 +1269,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMappingRuleRequest() ); @@ -1299,7 +1301,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMappingRuleRequest() ); @@ -1321,7 +1323,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMappingRuleRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMappingRuleRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMappingRuleRequest() ); @@ -1433,7 +1435,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMappingRuleRequest() ); @@ -1455,7 +1457,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMappingRuleRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMappingRuleRequest() ); @@ -1535,7 +1537,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMappingRuleRequest() ); @@ -1567,7 +1569,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.GetMappingRuleRequest() ); @@ -1589,7 +1591,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); @@ -1622,7 +1624,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); @@ -1670,7 +1672,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); @@ -1702,7 +1704,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); @@ -1724,7 +1726,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() ); @@ -1758,7 +1760,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() ); @@ -1806,7 +1808,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() ); @@ -1839,7 +1841,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() ); @@ -1864,7 +1866,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); @@ -1898,7 +1900,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); @@ -1953,7 +1955,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); @@ -1985,7 +1987,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); @@ -2019,7 +2021,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2042,7 +2044,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2064,7 +2066,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); @@ -2099,7 +2101,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); @@ -2155,7 +2157,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); @@ -2188,7 +2190,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); @@ -2223,7 +2225,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2246,7 +2248,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2268,7 +2270,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); @@ -2302,7 +2304,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); @@ -2357,7 +2359,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); @@ -2389,7 +2391,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); @@ -2423,7 +2425,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2446,7 +2448,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2468,7 +2470,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); @@ -2502,7 +2504,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); @@ -2557,7 +2559,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); @@ -2589,7 +2591,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); @@ -2623,7 +2625,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2646,7 +2648,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2668,7 +2670,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); @@ -2702,7 +2704,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); @@ -2757,7 +2759,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); @@ -2789,7 +2791,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); @@ -2823,7 +2825,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2846,7 +2848,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2868,7 +2870,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); @@ -2902,7 +2904,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); @@ -2957,7 +2959,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); @@ -2989,7 +2991,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); @@ -3023,7 +3025,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3046,7 +3048,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3068,7 +3070,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); @@ -3102,7 +3104,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); @@ -3157,7 +3159,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); @@ -3189,7 +3191,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); @@ -3223,7 +3225,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3246,7 +3248,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3268,7 +3270,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); @@ -3302,7 +3304,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); @@ -3357,7 +3359,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); @@ -3389,7 +3391,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); @@ -3423,7 +3425,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3446,7 +3448,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3468,7 +3470,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); @@ -3502,7 +3504,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); @@ -3557,7 +3559,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); @@ -3589,7 +3591,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); @@ -3623,7 +3625,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3646,7 +3648,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3668,7 +3670,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); @@ -3702,7 +3704,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); @@ -3757,7 +3759,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); @@ -3792,7 +3794,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); @@ -3826,7 +3828,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3850,7 +3852,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3872,7 +3874,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() ); @@ -3907,7 +3909,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() ); @@ -3963,7 +3965,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() ); @@ -3999,7 +4001,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() ); @@ -4034,7 +4036,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4058,7 +4060,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4080,7 +4082,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() ); @@ -4114,7 +4116,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() ); @@ -4169,7 +4171,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() ); @@ -4204,7 +4206,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() ); @@ -4238,7 +4240,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4262,7 +4264,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4284,7 +4286,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() ); @@ -4318,7 +4320,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() ); @@ -4373,7 +4375,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() ); @@ -4408,7 +4410,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() ); @@ -4442,7 +4444,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4466,7 +4468,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4488,7 +4490,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() ); @@ -4522,7 +4524,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() ); @@ -4577,7 +4579,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() ); @@ -4612,7 +4614,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() ); @@ -4646,7 +4648,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4670,7 +4672,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4692,7 +4694,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() ); @@ -4726,7 +4728,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() ); @@ -4781,7 +4783,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() ); @@ -4816,7 +4818,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() ); @@ -4850,7 +4852,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4874,7 +4876,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4896,7 +4898,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() ); @@ -4931,7 +4933,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() ); @@ -4987,7 +4989,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() ); @@ -5023,7 +5025,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() ); @@ -5058,7 +5060,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5082,7 +5084,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5104,7 +5106,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() ); @@ -5138,7 +5140,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() ); @@ -5193,7 +5195,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() ); @@ -5228,7 +5230,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() ); @@ -5262,7 +5264,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5286,7 +5288,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5308,7 +5310,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() ); @@ -5342,7 +5344,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() ); @@ -5397,7 +5399,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() ); @@ -5432,7 +5434,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() ); @@ -5466,7 +5468,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5490,7 +5492,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5512,7 +5514,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() ); @@ -5546,7 +5548,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() ); @@ -5601,7 +5603,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() ); @@ -5633,7 +5635,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() ); @@ -5667,7 +5669,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5690,7 +5692,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5712,7 +5714,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() ); @@ -5746,7 +5748,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() ); @@ -5801,7 +5803,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() ); @@ -5836,7 +5838,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() ); @@ -5870,7 +5872,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5894,7 +5896,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5916,7 +5918,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() ); @@ -5950,7 +5952,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() ); @@ -6005,7 +6007,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() ); @@ -6040,7 +6042,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() ); @@ -6074,7 +6076,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6098,7 +6100,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6120,7 +6122,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() ); @@ -6154,7 +6156,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() ); @@ -6209,7 +6211,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() ); @@ -6244,7 +6246,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() ); @@ -6278,7 +6280,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6302,7 +6304,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6324,7 +6326,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() ); @@ -6358,7 +6360,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() ); @@ -6413,7 +6415,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() ); @@ -6448,7 +6450,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() ); @@ -6482,7 +6484,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6506,7 +6508,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6528,7 +6530,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); @@ -6568,7 +6570,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); @@ -6624,7 +6626,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); @@ -6656,7 +6658,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); @@ -6717,7 +6719,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); @@ -6767,7 +6769,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); @@ -6817,7 +6819,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); @@ -6860,7 +6862,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() ); @@ -6901,7 +6903,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() ); @@ -6957,7 +6959,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() ); @@ -6992,7 +6994,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() ); @@ -7060,7 +7062,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() ); @@ -7117,7 +7119,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() ); @@ -7172,7 +7174,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() ); @@ -7220,7 +7222,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() ); @@ -7261,7 +7263,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() ); @@ -7317,7 +7319,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() ); @@ -7352,7 +7354,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() ); @@ -7420,7 +7422,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() ); @@ -7477,7 +7479,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() ); @@ -7532,7 +7534,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() ); @@ -7580,7 +7582,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() ); @@ -7621,7 +7623,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() ); @@ -7679,7 +7681,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() ); @@ -7714,7 +7716,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() ); @@ -7782,7 +7784,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() ); @@ -7839,7 +7841,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() ); @@ -7894,7 +7896,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() ); @@ -7942,7 +7944,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMappingRulesRequest() ); @@ -7982,7 +7984,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMappingRulesRequest() ); @@ -8038,7 +8040,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMappingRulesRequest() ); @@ -8070,7 +8072,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMappingRulesRequest() ); @@ -8131,7 +8133,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMappingRulesRequest() ); @@ -8181,7 +8183,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMappingRulesRequest() ); @@ -8231,7 +8233,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMappingRulesRequest() ); @@ -8274,7 +8276,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() ); @@ -8315,7 +8317,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() ); @@ -8371,7 +8373,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() ); @@ -8406,7 +8408,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() ); @@ -8473,7 +8475,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() ); @@ -8529,7 +8531,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() ); @@ -8583,7 +8585,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() ); @@ -8630,7 +8632,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() ); @@ -8660,7 +8662,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() ); @@ -8703,7 +8705,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() ); @@ -8735,7 +8737,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() ); @@ -8783,7 +8785,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() ); @@ -8830,7 +8832,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() ); @@ -8870,7 +8872,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() ); @@ -8912,7 +8914,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8943,7 +8945,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8988,7 +8990,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9021,7 +9023,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9052,7 +9054,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9097,7 +9099,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9130,7 +9132,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9164,7 +9166,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9209,7 +9211,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9245,7 +9247,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9276,7 +9278,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9321,7 +9323,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9357,7 +9359,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9406,7 +9408,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9448,7 +9450,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -9530,7 +9532,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -9613,7 +9615,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -9712,8 +9714,7 @@ describe('v1.DataMigrationServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -9733,7 +9734,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -9742,8 +9743,7 @@ describe('v1.DataMigrationServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -9759,7 +9759,7 @@ describe('v1.DataMigrationServiceClient', () => { }); describe('Path templates', () => { - describe('connectionProfile', () => { + describe('connectionProfile', async () => { const fakePath = '/rendered/path/connectionProfile'; const expectedParameters = { project: 'projectValue', @@ -9771,7 +9771,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9837,7 +9837,7 @@ describe('v1.DataMigrationServiceClient', () => { }); }); - describe('conversionWorkspace', () => { + describe('conversionWorkspace', async () => { const fakePath = '/rendered/path/conversionWorkspace'; const expectedParameters = { project: 'projectValue', @@ -9849,7 +9849,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversionWorkspacePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9916,7 +9916,7 @@ describe('v1.DataMigrationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -9927,7 +9927,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9966,7 +9966,7 @@ describe('v1.DataMigrationServiceClient', () => { }); }); - describe('mappingRule', () => { + describe('mappingRule', async () => { const fakePath = '/rendered/path/mappingRule'; const expectedParameters = { project: 'projectValue', @@ -9979,7 +9979,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.mappingRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10044,7 +10044,7 @@ describe('v1.DataMigrationServiceClient', () => { }); }); - describe('migrationJob', () => { + describe('migrationJob', async () => { const fakePath = '/rendered/path/migrationJob'; const expectedParameters = { project: 'projectValue', @@ -10056,7 +10056,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migrationJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10109,7 +10109,7 @@ describe('v1.DataMigrationServiceClient', () => { }); }); - describe('privateConnection', () => { + describe('privateConnection', async () => { const fakePath = '/rendered/path/privateConnection'; const expectedParameters = { project: 'projectValue', @@ -10121,7 +10121,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.privateConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10187,7 +10187,7 @@ describe('v1.DataMigrationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -10197,7 +10197,7 @@ describe('v1.DataMigrationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-commerce-consumer-procurement/package.json b/packages/google-cloud-commerce-consumer-procurement/package.json index 0efd6ac39fe..b80b15be7b9 100644 --- a/packages/google-cloud-commerce-consumer-procurement/package.json +++ b/packages/google-cloud-commerce-consumer-procurement/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json index c078ac90dbf..dc672f54494 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-procurement", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json index 0bbbed6f7b3..1da79c7ee25 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-procurement", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts index 094dd19a108..353900df1ca 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts @@ -562,7 +562,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrder request %j', request); const wrappedCallback: | Callback< @@ -716,7 +718,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -895,7 +899,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1070,7 +1076,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1254,7 +1262,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest, @@ -1339,7 +1349,9 @@ export class ConsumerProcurementServiceClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders stream %j', request); return this.descriptors.page.listOrders.createStream( this.innerApiCalls.listOrders as GaxCall, @@ -1406,7 +1418,9 @@ export class ConsumerProcurementServiceClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders iterate %j', request); return this.descriptors.page.listOrders.asyncIterate( this.innerApiCalls['listOrders'] as GaxCall, @@ -1508,7 +1522,7 @@ export class ConsumerProcurementServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts index b01b812d744..fd1ec94b62e 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts @@ -487,7 +487,9 @@ export class LicenseManagementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLicensePool request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class LicenseManagementServiceClient { this._gaxModule.routingHeader.fromParams({ 'license_pool.name': request.licensePool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateLicensePool request %j', request); const wrappedCallback: | Callback< @@ -746,7 +750,9 @@ export class LicenseManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('assign request %j', request); const wrappedCallback: | Callback< @@ -874,7 +880,9 @@ export class LicenseManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('unassign request %j', request); const wrappedCallback: | Callback< @@ -1003,7 +1011,9 @@ export class LicenseManagementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, @@ -1070,7 +1080,9 @@ export class LicenseManagementServiceClient { }); const defaultCallSettings = this._defaults['enumerateLicensedUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enumerateLicensedUsers stream %j', request); return this.descriptors.page.enumerateLicensedUsers.createStream( this.innerApiCalls.enumerateLicensedUsers as GaxCall, @@ -1119,7 +1131,9 @@ export class LicenseManagementServiceClient { }); const defaultCallSettings = this._defaults['enumerateLicensedUsers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enumerateLicensedUsers iterate %j', request); return this.descriptors.page.enumerateLicensedUsers.asyncIterate( this.innerApiCalls['enumerateLicensedUsers'] as GaxCall, diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1alpha1/consumer_procurement_service_client.ts b/packages/google-cloud-commerce-consumer-procurement/src/v1alpha1/consumer_procurement_service_client.ts index aafe4d96908..e99b43643a9 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1alpha1/consumer_procurement_service_client.ts +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1alpha1/consumer_procurement_service_client.ts @@ -541,7 +541,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrder request %j', request); const wrappedCallback: | Callback< @@ -696,7 +698,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -879,7 +883,9 @@ export class ConsumerProcurementServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest, @@ -963,7 +969,9 @@ export class ConsumerProcurementServiceClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders stream %j', request); return this.descriptors.page.listOrders.createStream( this.innerApiCalls.listOrders as GaxCall, @@ -1029,7 +1037,9 @@ export class ConsumerProcurementServiceClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders iterate %j', request); return this.descriptors.page.listOrders.asyncIterate( this.innerApiCalls['listOrders'] as GaxCall, @@ -1131,7 +1141,7 @@ export class ConsumerProcurementServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts b/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts index a481aec9a46..ab413e87882 100644 --- a/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts +++ b/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts @@ -324,7 +324,9 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.consumerProcurementServiceStub); client.close().then(() => { done(); @@ -395,7 +397,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest() ); @@ -429,7 +431,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest() ); @@ -479,7 +481,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest() ); @@ -510,7 +512,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest() ); @@ -534,7 +536,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest() ); @@ -569,7 +571,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest() ); @@ -626,7 +628,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest() ); @@ -660,7 +662,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest() ); @@ -696,7 +698,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -721,7 +723,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -742,7 +744,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() ); @@ -777,7 +779,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() ); @@ -834,7 +836,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() ); @@ -868,7 +870,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() ); @@ -904,7 +906,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -929,7 +931,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -950,7 +952,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() ); @@ -985,7 +987,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() ); @@ -1076,7 +1078,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1137,7 +1139,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1158,7 +1160,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest() ); @@ -1294,7 +1296,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest() ); @@ -1417,7 +1419,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest() ); @@ -1517,7 +1519,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1605,7 +1607,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1799,8 +1801,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1822,7 +1823,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1831,8 +1832,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1848,7 +1848,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { }); describe('Path templates', () => { - describe('billingAccount', () => { + describe('billingAccount', async () => { const fakePath = '/rendered/path/billingAccount'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1860,7 +1860,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1890,7 +1890,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { }); }); - describe('licensePool', () => { + describe('licensePool', async () => { const fakePath = '/rendered/path/licensePool'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1903,7 +1903,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.licensePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1945,7 +1945,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1958,7 +1958,7 @@ describe('v1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1alpha1.ts b/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1alpha1.ts index 2be2fade37e..0d170751f86 100644 --- a/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1alpha1.ts +++ b/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1alpha1.ts @@ -324,7 +324,9 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.consumerProcurementServiceStub); client.close().then(() => { done(); @@ -395,7 +397,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest() ); @@ -429,7 +431,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest() ); @@ -479,7 +481,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest() ); @@ -510,7 +512,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest() ); @@ -534,7 +536,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest() ); @@ -569,7 +571,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest() ); @@ -626,7 +628,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest() ); @@ -660,7 +662,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest() ); @@ -696,7 +698,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -721,7 +723,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -742,7 +744,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest() ); @@ -784,7 +786,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest() ); @@ -844,7 +846,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest() ); @@ -878,7 +880,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest() ); @@ -944,7 +946,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest() ); @@ -1001,7 +1003,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest() ); @@ -1054,7 +1056,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest() ); @@ -1101,7 +1103,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1189,7 +1191,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1278,7 +1280,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1383,8 +1385,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1406,7 +1407,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1415,8 +1416,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1432,7 +1432,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { }); describe('Path templates', () => { - describe('billingAccount', () => { + describe('billingAccount', async () => { const fakePath = '/rendered/path/billingAccount'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1444,7 +1444,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1474,7 +1474,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1487,7 +1487,7 @@ describe('v1alpha1.ConsumerProcurementServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts b/packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts index a8916a61a19..fb66a756048 100644 --- a/packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts +++ b/packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts @@ -286,7 +286,9 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.licenseManagementServiceStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() ); @@ -381,7 +383,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() ); @@ -429,7 +431,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() ); @@ -461,7 +463,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() ); @@ -483,7 +485,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() ); @@ -516,7 +518,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() ); @@ -565,7 +567,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() ); @@ -598,7 +600,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() ); @@ -621,7 +623,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() ); @@ -653,7 +655,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() ); @@ -701,7 +703,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() ); @@ -730,7 +732,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() ); @@ -752,7 +754,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() ); @@ -784,7 +786,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() ); @@ -832,7 +834,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() ); @@ -861,7 +863,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() ); @@ -883,7 +885,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() ); @@ -924,7 +926,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() ); @@ -982,7 +984,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() ); @@ -1017,7 +1019,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() ); @@ -1146,7 +1148,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() ); @@ -1201,7 +1203,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() ); @@ -1243,7 +1245,7 @@ describe('v1.LicenseManagementServiceClient', () => { }); describe('Path templates', () => { - describe('licensePool', () => { + describe('licensePool', async () => { const fakePath = '/rendered/path/licensePool'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1254,7 +1256,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.licensePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1296,7 +1298,7 @@ describe('v1.LicenseManagementServiceClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -1307,7 +1309,7 @@ describe('v1.LicenseManagementServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-compute/package.json b/packages/google-cloud-compute/package.json index 31d1e271db3..b2aaee2b99b 100644 --- a/packages/google-cloud-compute/package.json +++ b/packages/google-cloud-compute/package.json @@ -125,7 +125,7 @@ "test": "c8 node build/test/run.js" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-compute/src/v1/accelerator_types_client.ts b/packages/google-cloud-compute/src/v1/accelerator_types_client.ts index 53191efe76d..614b9243bdd 100644 --- a/packages/google-cloud-compute/src/v1/accelerator_types_client.ts +++ b/packages/google-cloud-compute/src/v1/accelerator_types_client.ts @@ -476,7 +476,9 @@ export class AcceleratorTypesClient { zone: request.zone ?? '', accelerator_type: request.acceleratorType ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -556,7 +558,9 @@ export class AcceleratorTypesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -663,7 +667,9 @@ export class AcceleratorTypesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListAcceleratorTypesRequest, @@ -737,7 +743,9 @@ export class AcceleratorTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -793,7 +801,9 @@ export class AcceleratorTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/addresses_client.ts b/packages/google-cloud-compute/src/v1/addresses_client.ts index e563a36c1a0..c72fa7bce99 100644 --- a/packages/google-cloud-compute/src/v1/addresses_client.ts +++ b/packages/google-cloud-compute/src/v1/addresses_client.ts @@ -482,7 +482,9 @@ export class AddressesClient { region: request.region ?? '', address: request.address ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -605,7 +607,9 @@ export class AddressesClient { region: request.region ?? '', address: request.address ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -725,7 +729,9 @@ export class AddressesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -857,7 +863,9 @@ export class AddressesClient { region: request.region ?? '', address: request.address ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('move request %j', request); const wrappedCallback: | Callback< @@ -995,7 +1003,9 @@ export class AddressesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1084,7 +1094,9 @@ export class AddressesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1189,7 +1201,9 @@ export class AddressesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListAddressesRequest, @@ -1261,7 +1275,9 @@ export class AddressesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1317,7 +1333,9 @@ export class AddressesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/autoscalers_client.ts b/packages/google-cloud-compute/src/v1/autoscalers_client.ts index 543bfde36c2..6eb8f07ea53 100644 --- a/packages/google-cloud-compute/src/v1/autoscalers_client.ts +++ b/packages/google-cloud-compute/src/v1/autoscalers_client.ts @@ -488,7 +488,9 @@ export class AutoscalersClient { zone: request.zone ?? '', autoscaler: request.autoscaler ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -613,7 +615,9 @@ export class AutoscalersClient { zone: request.zone ?? '', autoscaler: request.autoscaler ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -741,7 +745,9 @@ export class AutoscalersClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -874,7 +880,9 @@ export class AutoscalersClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1013,7 +1021,9 @@ export class AutoscalersClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1102,7 +1112,9 @@ export class AutoscalersClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1207,7 +1219,9 @@ export class AutoscalersClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListAutoscalersRequest, @@ -1279,7 +1293,9 @@ export class AutoscalersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1335,7 +1351,9 @@ export class AutoscalersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/backend_buckets_client.ts b/packages/google-cloud-compute/src/v1/backend_buckets_client.ts index 244fb9fd1e7..e18932d9c03 100644 --- a/packages/google-cloud-compute/src/v1/backend_buckets_client.ts +++ b/packages/google-cloud-compute/src/v1/backend_buckets_client.ts @@ -487,7 +487,9 @@ export class BackendBucketsClient { project: request.project ?? '', backend_bucket: request.backendBucket ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addSignedUrlKey request %j', request); const wrappedCallback: | Callback< @@ -622,7 +624,9 @@ export class BackendBucketsClient { project: request.project ?? '', backend_bucket: request.backendBucket ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -759,7 +763,9 @@ export class BackendBucketsClient { project: request.project ?? '', backend_bucket: request.backendBucket ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSignedUrlKey request %j', request); const wrappedCallback: | Callback< @@ -887,7 +893,9 @@ export class BackendBucketsClient { project: request.project ?? '', backend_bucket: request.backendBucket ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1014,7 +1022,9 @@ export class BackendBucketsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1142,7 +1152,9 @@ export class BackendBucketsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1279,7 +1291,9 @@ export class BackendBucketsClient { project: request.project ?? '', backend_bucket: request.backendBucket ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1416,7 +1430,9 @@ export class BackendBucketsClient { project: request.project ?? '', backend_bucket: request.backendBucket ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setEdgeSecurityPolicy request %j', request); const wrappedCallback: | Callback< @@ -1552,7 +1568,9 @@ export class BackendBucketsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1682,7 +1700,9 @@ export class BackendBucketsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1813,7 +1833,9 @@ export class BackendBucketsClient { project: request.project ?? '', backend_bucket: request.backendBucket ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1944,7 +1966,9 @@ export class BackendBucketsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListBackendBucketsRequest, @@ -2013,7 +2037,9 @@ export class BackendBucketsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2066,7 +2092,9 @@ export class BackendBucketsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/backend_services_client.ts b/packages/google-cloud-compute/src/v1/backend_services_client.ts index 6a207208b7d..4b959175010 100644 --- a/packages/google-cloud-compute/src/v1/backend_services_client.ts +++ b/packages/google-cloud-compute/src/v1/backend_services_client.ts @@ -501,7 +501,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addSignedUrlKey request %j', request); const wrappedCallback: | Callback< @@ -636,7 +638,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -773,7 +777,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSignedUrlKey request %j', request); const wrappedCallback: | Callback< @@ -901,7 +907,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1035,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHealth request %j', request); const wrappedCallback: | Callback< @@ -1157,7 +1167,9 @@ export class BackendServicesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1285,7 +1297,9 @@ export class BackendServicesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1422,7 +1436,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1559,7 +1575,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setEdgeSecurityPolicy request %j', request); const wrappedCallback: | Callback< @@ -1695,7 +1713,9 @@ export class BackendServicesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1826,7 +1846,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSecurityPolicy request %j', request); const wrappedCallback: | Callback< @@ -1962,7 +1984,9 @@ export class BackendServicesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2093,7 +2117,9 @@ export class BackendServicesClient { project: request.project ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -2182,7 +2208,9 @@ export class BackendServicesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -2284,7 +2312,9 @@ export class BackendServicesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListBackendServicesRequest, @@ -2353,7 +2383,9 @@ export class BackendServicesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2406,7 +2438,9 @@ export class BackendServicesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -2514,7 +2548,9 @@ export class BackendServicesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListUsableBackendServicesRequest, @@ -2585,7 +2621,9 @@ export class BackendServicesClient { }); const defaultCallSettings = this._defaults['listUsable']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsable stream %j', request); return this.descriptors.page.listUsable.createStream( this.innerApiCalls.listUsable as GaxCall, @@ -2638,7 +2676,9 @@ export class BackendServicesClient { }); const defaultCallSettings = this._defaults['listUsable']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsable iterate %j', request); return this.descriptors.page.listUsable.asyncIterate( this.innerApiCalls['listUsable'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/disk_types_client.ts b/packages/google-cloud-compute/src/v1/disk_types_client.ts index ef98e8cfb3c..191c8f81fca 100644 --- a/packages/google-cloud-compute/src/v1/disk_types_client.ts +++ b/packages/google-cloud-compute/src/v1/disk_types_client.ts @@ -465,7 +465,9 @@ export class DiskTypesClient { zone: request.zone ?? '', disk_type: request.diskType ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -543,7 +545,9 @@ export class DiskTypesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -648,7 +652,9 @@ export class DiskTypesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListDiskTypesRequest, @@ -720,7 +726,9 @@ export class DiskTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -776,7 +784,9 @@ export class DiskTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/disks_client.ts b/packages/google-cloud-compute/src/v1/disks_client.ts index 44acdaab388..790708d0993 100644 --- a/packages/google-cloud-compute/src/v1/disks_client.ts +++ b/packages/google-cloud-compute/src/v1/disks_client.ts @@ -501,7 +501,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addResourcePolicies request %j', request); const wrappedCallback: | Callback< @@ -632,7 +634,9 @@ export class DisksClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('bulkInsert request %j', request); const wrappedCallback: | Callback< @@ -774,7 +778,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSnapshot request %j', request); const wrappedCallback: | Callback< @@ -904,7 +910,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1025,7 +1033,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1147,7 +1157,9 @@ export class DisksClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1269,7 +1281,9 @@ export class DisksClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1407,7 +1421,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeResourcePolicies request %j', request); const wrappedCallback: | Callback< @@ -1539,7 +1555,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resize request %j', request); const wrappedCallback: | Callback< @@ -1670,7 +1688,9 @@ export class DisksClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1795,7 +1815,9 @@ export class DisksClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1935,7 +1957,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startAsyncReplication request %j', request); const wrappedCallback: | Callback< @@ -2073,7 +2097,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopAsyncReplication request %j', request); const wrappedCallback: | Callback< @@ -2210,7 +2236,9 @@ export class DisksClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopGroupAsyncReplication request %j', request); const wrappedCallback: | Callback< @@ -2343,7 +2371,9 @@ export class DisksClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2472,7 +2502,9 @@ export class DisksClient { zone: request.zone ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -2557,7 +2589,9 @@ export class DisksClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -2662,7 +2696,9 @@ export class DisksClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListDisksRequest, @@ -2734,7 +2770,9 @@ export class DisksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2790,7 +2828,9 @@ export class DisksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/external_vpn_gateways_client.ts b/packages/google-cloud-compute/src/v1/external_vpn_gateways_client.ts index f5e345ee77d..13623910037 100644 --- a/packages/google-cloud-compute/src/v1/external_vpn_gateways_client.ts +++ b/packages/google-cloud-compute/src/v1/external_vpn_gateways_client.ts @@ -479,7 +479,9 @@ export class ExternalVpnGatewaysClient { project: request.project ?? '', external_vpn_gateway: request.externalVpnGateway ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -607,7 +609,9 @@ export class ExternalVpnGatewaysClient { project: request.project ?? '', external_vpn_gateway: request.externalVpnGateway ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -735,7 +739,9 @@ export class ExternalVpnGatewaysClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -870,7 +876,9 @@ export class ExternalVpnGatewaysClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1006,7 +1014,9 @@ export class ExternalVpnGatewaysClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1133,7 +1143,9 @@ export class ExternalVpnGatewaysClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListExternalVpnGatewaysRequest, @@ -1204,7 +1216,9 @@ export class ExternalVpnGatewaysClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1257,7 +1271,9 @@ export class ExternalVpnGatewaysClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/firewall_policies_client.ts b/packages/google-cloud-compute/src/v1/firewall_policies_client.ts index f46d202777e..f792ce0769d 100644 --- a/packages/google-cloud-compute/src/v1/firewall_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/firewall_policies_client.ts @@ -492,7 +492,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addAssociation request %j', request); const wrappedCallback: | Callback< @@ -626,7 +628,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addRule request %j', request); const wrappedCallback: | Callback< @@ -760,7 +764,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cloneRules request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1017,7 +1025,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1141,7 +1151,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAssociation request %j', request); const wrappedCallback: | Callback< @@ -1268,7 +1280,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1389,7 +1403,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRule request %j', request); const wrappedCallback: | Callback< @@ -1513,7 +1529,9 @@ export class FirewallPoliciesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1640,7 +1658,9 @@ export class FirewallPoliciesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssociations request %j', request); const wrappedCallback: | Callback< @@ -1768,7 +1788,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('move request %j', request); const wrappedCallback: | Callback< @@ -1902,7 +1924,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -2038,7 +2062,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchRule request %j', request); const wrappedCallback: | Callback< @@ -2172,7 +2198,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeAssociation request %j', request); const wrappedCallback: | Callback< @@ -2306,7 +2334,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeRule request %j', request); const wrappedCallback: | Callback< @@ -2439,7 +2469,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2566,7 +2598,9 @@ export class FirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2687,7 +2721,9 @@ export class FirewallPoliciesClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListFirewallPoliciesRequest, @@ -2752,7 +2788,9 @@ export class FirewallPoliciesClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2801,7 +2839,9 @@ export class FirewallPoliciesClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/firewalls_client.ts b/packages/google-cloud-compute/src/v1/firewalls_client.ts index f6cc40b554f..437c8eaccbe 100644 --- a/packages/google-cloud-compute/src/v1/firewalls_client.ts +++ b/packages/google-cloud-compute/src/v1/firewalls_client.ts @@ -473,7 +473,9 @@ export class FirewallsClient { project: request.project ?? '', firewall: request.firewall ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -593,7 +595,9 @@ export class FirewallsClient { project: request.project ?? '', firewall: request.firewall ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -710,7 +714,9 @@ export class FirewallsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -841,7 +847,9 @@ export class FirewallsClient { project: request.project ?? '', firewall: request.firewall ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -972,7 +980,9 @@ export class FirewallsClient { project: request.project ?? '', firewall: request.firewall ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1103,7 +1113,9 @@ export class FirewallsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListFirewallsRequest, @@ -1172,7 +1184,9 @@ export class FirewallsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1225,7 +1239,9 @@ export class FirewallsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/forwarding_rules_client.ts b/packages/google-cloud-compute/src/v1/forwarding_rules_client.ts index bbe889d8c5b..e44c5cb64d6 100644 --- a/packages/google-cloud-compute/src/v1/forwarding_rules_client.ts +++ b/packages/google-cloud-compute/src/v1/forwarding_rules_client.ts @@ -489,7 +489,9 @@ export class ForwardingRulesClient { region: request.region ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class ForwardingRulesClient { region: request.region ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -748,7 +752,9 @@ export class ForwardingRulesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -888,7 +894,9 @@ export class ForwardingRulesClient { region: request.region ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1028,7 +1036,9 @@ export class ForwardingRulesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1168,7 +1178,9 @@ export class ForwardingRulesClient { region: request.region ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setTarget request %j', request); const wrappedCallback: | Callback< @@ -1257,7 +1269,9 @@ export class ForwardingRulesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1362,7 +1376,9 @@ export class ForwardingRulesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListForwardingRulesRequest, @@ -1434,7 +1450,9 @@ export class ForwardingRulesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1490,7 +1508,9 @@ export class ForwardingRulesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/global_addresses_client.ts b/packages/google-cloud-compute/src/v1/global_addresses_client.ts index 2001cf7cace..e42c7208853 100644 --- a/packages/google-cloud-compute/src/v1/global_addresses_client.ts +++ b/packages/google-cloud-compute/src/v1/global_addresses_client.ts @@ -479,7 +479,9 @@ export class GlobalAddressesClient { project: request.project ?? '', address: request.address ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -607,7 +609,9 @@ export class GlobalAddressesClient { project: request.project ?? '', address: request.address ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -732,7 +736,9 @@ export class GlobalAddressesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -869,7 +875,9 @@ export class GlobalAddressesClient { project: request.project ?? '', address: request.address ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('move request %j', request); const wrappedCallback: | Callback< @@ -1004,7 +1012,9 @@ export class GlobalAddressesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1135,7 +1145,9 @@ export class GlobalAddressesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListGlobalAddressesRequest, @@ -1204,7 +1216,9 @@ export class GlobalAddressesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1257,7 +1271,9 @@ export class GlobalAddressesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/global_forwarding_rules_client.ts b/packages/google-cloud-compute/src/v1/global_forwarding_rules_client.ts index 4634e227f64..7f27ef28507 100644 --- a/packages/google-cloud-compute/src/v1/global_forwarding_rules_client.ts +++ b/packages/google-cloud-compute/src/v1/global_forwarding_rules_client.ts @@ -481,7 +481,9 @@ export class GlobalForwardingRulesClient { project: request.project ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -615,7 +617,9 @@ export class GlobalForwardingRulesClient { project: request.project ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -743,7 +747,9 @@ export class GlobalForwardingRulesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -880,7 +886,9 @@ export class GlobalForwardingRulesClient { project: request.project ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1015,7 +1023,9 @@ export class GlobalForwardingRulesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1152,7 +1162,9 @@ export class GlobalForwardingRulesClient { project: request.project ?? '', forwarding_rule: request.forwardingRule ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setTarget request %j', request); const wrappedCallback: | Callback< @@ -1283,7 +1295,9 @@ export class GlobalForwardingRulesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListGlobalForwardingRulesRequest, @@ -1352,7 +1366,9 @@ export class GlobalForwardingRulesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1405,7 +1421,9 @@ export class GlobalForwardingRulesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/global_network_endpoint_groups_client.ts b/packages/google-cloud-compute/src/v1/global_network_endpoint_groups_client.ts index 9c2be88e0c7..a89a10afbc5 100644 --- a/packages/google-cloud-compute/src/v1/global_network_endpoint_groups_client.ts +++ b/packages/google-cloud-compute/src/v1/global_network_endpoint_groups_client.ts @@ -489,7 +489,9 @@ export class GlobalNetworkEndpointGroupsClient { project: request.project ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('attachNetworkEndpoints request %j', request); const wrappedCallback: | Callback< @@ -624,7 +626,9 @@ export class GlobalNetworkEndpointGroupsClient { project: request.project ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -761,7 +765,9 @@ export class GlobalNetworkEndpointGroupsClient { project: request.project ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detachNetworkEndpoints request %j', request); const wrappedCallback: | Callback< @@ -895,7 +901,9 @@ export class GlobalNetworkEndpointGroupsClient { project: request.project ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1023,7 +1031,9 @@ export class GlobalNetworkEndpointGroupsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1162,7 +1172,9 @@ export class GlobalNetworkEndpointGroupsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListGlobalNetworkEndpointGroupsRequest, @@ -1233,7 +1245,9 @@ export class GlobalNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1286,7 +1300,9 @@ export class GlobalNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1397,7 +1413,9 @@ export class GlobalNetworkEndpointGroupsClient { project: request.project ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworkEndpointsGlobalNetworkEndpointGroupsRequest, @@ -1471,7 +1489,9 @@ export class GlobalNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['listNetworkEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkEndpoints stream %j', request); return this.descriptors.page.listNetworkEndpoints.createStream( this.innerApiCalls.listNetworkEndpoints as GaxCall, @@ -1527,7 +1547,9 @@ export class GlobalNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['listNetworkEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkEndpoints iterate %j', request); return this.descriptors.page.listNetworkEndpoints.asyncIterate( this.innerApiCalls['listNetworkEndpoints'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/global_operations_client.ts b/packages/google-cloud-compute/src/v1/global_operations_client.ts index d1bf80495ea..6083795068e 100644 --- a/packages/google-cloud-compute/src/v1/global_operations_client.ts +++ b/packages/google-cloud-compute/src/v1/global_operations_client.ts @@ -475,7 +475,9 @@ export class GlobalOperationsClient { project: request.project ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -597,7 +599,9 @@ export class GlobalOperationsClient { project: request.project ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -716,7 +720,9 @@ export class GlobalOperationsClient { project: request.project ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('wait request %j', request); const wrappedCallback: | Callback< @@ -799,7 +805,9 @@ export class GlobalOperationsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -901,7 +909,9 @@ export class GlobalOperationsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListGlobalOperationsRequest, @@ -970,7 +980,9 @@ export class GlobalOperationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1023,7 +1035,9 @@ export class GlobalOperationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/global_organization_operations_client.ts b/packages/google-cloud-compute/src/v1/global_organization_operations_client.ts index f4d962968b9..777084c331b 100644 --- a/packages/google-cloud-compute/src/v1/global_organization_operations_client.ts +++ b/packages/google-cloud-compute/src/v1/global_organization_operations_client.ts @@ -471,7 +471,9 @@ export class GlobalOrganizationOperationsClient { this._gaxModule.routingHeader.fromParams({ operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -598,7 +600,9 @@ export class GlobalOrganizationOperationsClient { this._gaxModule.routingHeader.fromParams({ operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -719,7 +723,9 @@ export class GlobalOrganizationOperationsClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListGlobalOrganizationOperationsRequest, @@ -784,7 +790,9 @@ export class GlobalOrganizationOperationsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -833,7 +841,9 @@ export class GlobalOrganizationOperationsClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/global_public_delegated_prefixes_client.ts b/packages/google-cloud-compute/src/v1/global_public_delegated_prefixes_client.ts index c442374b338..f196188aa2c 100644 --- a/packages/google-cloud-compute/src/v1/global_public_delegated_prefixes_client.ts +++ b/packages/google-cloud-compute/src/v1/global_public_delegated_prefixes_client.ts @@ -480,7 +480,9 @@ export class GlobalPublicDelegatedPrefixesClient { project: request.project ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class GlobalPublicDelegatedPrefixesClient { project: request.project ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -742,7 +746,9 @@ export class GlobalPublicDelegatedPrefixesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -879,7 +885,9 @@ export class GlobalPublicDelegatedPrefixesClient { project: request.project ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1018,7 +1026,9 @@ export class GlobalPublicDelegatedPrefixesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListGlobalPublicDelegatedPrefixesRequest, @@ -1089,7 +1099,9 @@ export class GlobalPublicDelegatedPrefixesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1142,7 +1154,9 @@ export class GlobalPublicDelegatedPrefixesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/health_checks_client.ts b/packages/google-cloud-compute/src/v1/health_checks_client.ts index b6842fa10e0..d6f7f2d0f7a 100644 --- a/packages/google-cloud-compute/src/v1/health_checks_client.ts +++ b/packages/google-cloud-compute/src/v1/health_checks_client.ts @@ -485,7 +485,9 @@ export class HealthChecksClient { project: request.project ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -607,7 +609,9 @@ export class HealthChecksClient { project: request.project ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -732,7 +736,9 @@ export class HealthChecksClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -869,7 +875,9 @@ export class HealthChecksClient { project: request.project ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1006,7 +1014,9 @@ export class HealthChecksClient { project: request.project ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1095,7 +1105,9 @@ export class HealthChecksClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1197,7 +1209,9 @@ export class HealthChecksClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListHealthChecksRequest, @@ -1266,7 +1280,9 @@ export class HealthChecksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1319,7 +1335,9 @@ export class HealthChecksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/image_family_views_client.ts b/packages/google-cloud-compute/src/v1/image_family_views_client.ts index 62df37f116b..3a73429972b 100644 --- a/packages/google-cloud-compute/src/v1/image_family_views_client.ts +++ b/packages/google-cloud-compute/src/v1/image_family_views_client.ts @@ -455,7 +455,9 @@ export class ImageFamilyViewsClient { zone: request.zone ?? '', family: request.family ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-compute/src/v1/images_client.ts b/packages/google-cloud-compute/src/v1/images_client.ts index d61ef9e3f6d..21abb914a1e 100644 --- a/packages/google-cloud-compute/src/v1/images_client.ts +++ b/packages/google-cloud-compute/src/v1/images_client.ts @@ -476,7 +476,9 @@ export class ImagesClient { project: request.project ?? '', image: request.image ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -605,7 +607,9 @@ export class ImagesClient { project: request.project ?? '', image: request.image ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deprecate request %j', request); const wrappedCallback: | Callback< @@ -725,7 +729,9 @@ export class ImagesClient { project: request.project ?? '', image: request.image ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -842,7 +848,9 @@ export class ImagesClient { project: request.project ?? '', family: request.family ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFromFamily request %j', request); const wrappedCallback: | Callback< @@ -963,7 +971,9 @@ export class ImagesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1082,7 +1092,9 @@ export class ImagesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1209,7 +1221,9 @@ export class ImagesClient { project: request.project ?? '', image: request.image ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1351,9 @@ export class ImagesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1457,7 +1473,9 @@ export class ImagesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1593,7 +1611,9 @@ export class ImagesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1718,7 +1738,9 @@ export class ImagesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListImagesRequest, @@ -1787,7 +1809,9 @@ export class ImagesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1840,7 +1864,9 @@ export class ImagesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/instance_group_manager_resize_requests_client.ts b/packages/google-cloud-compute/src/v1/instance_group_manager_resize_requests_client.ts index 2acf872a0ef..33a78ba0e3b 100644 --- a/packages/google-cloud-compute/src/v1/instance_group_manager_resize_requests_client.ts +++ b/packages/google-cloud-compute/src/v1/instance_group_manager_resize_requests_client.ts @@ -486,7 +486,9 @@ export class InstanceGroupManagerResizeRequestsClient { instance_group_manager: request.instanceGroupManager ?? '', resize_request: request.resizeRequest ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancel request %j', request); const wrappedCallback: | Callback< @@ -627,7 +629,9 @@ export class InstanceGroupManagerResizeRequestsClient { instance_group_manager: request.instanceGroupManager ?? '', resize_request: request.resizeRequest ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -767,7 +771,9 @@ export class InstanceGroupManagerResizeRequestsClient { instance_group_manager: request.instanceGroupManager ?? '', resize_request: request.resizeRequest ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -901,7 +907,9 @@ export class InstanceGroupManagerResizeRequestsClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1046,7 +1054,9 @@ export class InstanceGroupManagerResizeRequestsClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstanceGroupManagerResizeRequestsRequest, @@ -1123,7 +1133,9 @@ export class InstanceGroupManagerResizeRequestsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1182,7 +1194,9 @@ export class InstanceGroupManagerResizeRequestsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/instance_group_managers_client.ts b/packages/google-cloud-compute/src/v1/instance_group_managers_client.ts index 810e2acfb2e..da3efb3c0ae 100644 --- a/packages/google-cloud-compute/src/v1/instance_group_managers_client.ts +++ b/packages/google-cloud-compute/src/v1/instance_group_managers_client.ts @@ -523,7 +523,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('abandonInstances request %j', request); const wrappedCallback: | Callback< @@ -661,7 +663,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('applyUpdatesToInstances request %j', request); const wrappedCallback: | Callback< @@ -801,7 +805,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createInstances request %j', request); const wrappedCallback: | Callback< @@ -939,7 +945,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1079,7 +1087,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteInstances request %j', request); const wrappedCallback: | Callback< @@ -1217,7 +1227,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePerInstanceConfigs request %j', request); const wrappedCallback: | Callback< @@ -1354,7 +1366,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1485,7 +1499,9 @@ export class InstanceGroupManagersClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1625,7 +1641,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1765,7 +1783,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchPerInstanceConfigs request %j', request); const wrappedCallback: | Callback< @@ -1905,7 +1925,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recreateInstances request %j', request); const wrappedCallback: | Callback< @@ -2045,7 +2067,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resize request %j', request); const wrappedCallback: | Callback< @@ -2185,7 +2209,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeInstances request %j', request); const wrappedCallback: | Callback< @@ -2325,7 +2351,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setInstanceTemplate request %j', request); const wrappedCallback: | Callback< @@ -2465,7 +2493,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setTargetPools request %j', request); const wrappedCallback: | Callback< @@ -2605,7 +2635,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startInstances request %j', request); const wrappedCallback: | Callback< @@ -2745,7 +2777,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopInstances request %j', request); const wrappedCallback: | Callback< @@ -2885,7 +2919,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suspendInstances request %j', request); const wrappedCallback: | Callback< @@ -3025,7 +3061,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePerInstanceConfigs request %j', request); const wrappedCallback: | Callback< @@ -3114,7 +3152,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -3227,7 +3267,9 @@ export class InstanceGroupManagersClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, @@ -3301,7 +3343,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -3357,7 +3401,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -3471,7 +3517,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, @@ -3548,7 +3596,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listErrors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listErrors stream %j', request); return this.descriptors.page.listErrors.createStream( this.innerApiCalls.listErrors as GaxCall, @@ -3607,7 +3657,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listErrors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listErrors iterate %j', request); return this.descriptors.page.listErrors.asyncIterate( this.innerApiCalls['listErrors'] as GaxCall, @@ -3721,7 +3773,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, @@ -3798,7 +3852,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listManagedInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagedInstances stream %j', request); return this.descriptors.page.listManagedInstances.createStream( this.innerApiCalls.listManagedInstances as GaxCall, @@ -3857,7 +3913,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listManagedInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagedInstances iterate %j', request); return this.descriptors.page.listManagedInstances.asyncIterate( this.innerApiCalls['listManagedInstances'] as GaxCall, @@ -3971,7 +4029,9 @@ export class InstanceGroupManagersClient { zone: request.zone ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, @@ -4048,7 +4108,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listPerInstanceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPerInstanceConfigs stream %j', request); return this.descriptors.page.listPerInstanceConfigs.createStream( this.innerApiCalls.listPerInstanceConfigs as GaxCall, @@ -4107,7 +4169,9 @@ export class InstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listPerInstanceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPerInstanceConfigs iterate %j', request); return this.descriptors.page.listPerInstanceConfigs.asyncIterate( this.innerApiCalls['listPerInstanceConfigs'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/instance_groups_client.ts b/packages/google-cloud-compute/src/v1/instance_groups_client.ts index 066af5e4233..0d0a81c2ded 100644 --- a/packages/google-cloud-compute/src/v1/instance_groups_client.ts +++ b/packages/google-cloud-compute/src/v1/instance_groups_client.ts @@ -497,7 +497,9 @@ export class InstanceGroupsClient { zone: request.zone ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addInstances request %j', request); const wrappedCallback: | Callback< @@ -635,7 +637,9 @@ export class InstanceGroupsClient { zone: request.zone ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -766,7 +770,9 @@ export class InstanceGroupsClient { zone: request.zone ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -894,7 +900,9 @@ export class InstanceGroupsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1034,7 +1042,9 @@ export class InstanceGroupsClient { zone: request.zone ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeInstances request %j', request); const wrappedCallback: | Callback< @@ -1174,7 +1184,9 @@ export class InstanceGroupsClient { zone: request.zone ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNamedPorts request %j', request); const wrappedCallback: | Callback< @@ -1263,7 +1275,9 @@ export class InstanceGroupsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1368,7 +1382,9 @@ export class InstanceGroupsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstanceGroupsRequest, @@ -1440,7 +1456,9 @@ export class InstanceGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1496,7 +1514,9 @@ export class InstanceGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1612,7 +1632,9 @@ export class InstanceGroupsClient { zone: request.zone ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstancesInstanceGroupsRequest, @@ -1691,7 +1713,9 @@ export class InstanceGroupsClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1752,7 +1776,9 @@ export class InstanceGroupsClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/instance_settings_service_client.ts b/packages/google-cloud-compute/src/v1/instance_settings_service_client.ts index 2d553f05fc7..46deacc6775 100644 --- a/packages/google-cloud-compute/src/v1/instance_settings_service_client.ts +++ b/packages/google-cloud-compute/src/v1/instance_settings_service_client.ts @@ -453,7 +453,9 @@ export class InstanceSettingsServiceClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -583,7 +585,9 @@ export class InstanceSettingsServiceClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-compute/src/v1/instance_templates_client.ts b/packages/google-cloud-compute/src/v1/instance_templates_client.ts index d95b78d1ccf..c77eeae319b 100644 --- a/packages/google-cloud-compute/src/v1/instance_templates_client.ts +++ b/packages/google-cloud-compute/src/v1/instance_templates_client.ts @@ -486,7 +486,9 @@ export class InstanceTemplatesClient { project: request.project ?? '', instance_template: request.instanceTemplate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class InstanceTemplatesClient { project: request.project ?? '', instance_template: request.instanceTemplate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -744,7 +748,9 @@ export class InstanceTemplatesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -872,7 +878,9 @@ export class InstanceTemplatesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1008,7 +1016,9 @@ export class InstanceTemplatesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1138,7 +1148,9 @@ export class InstanceTemplatesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1221,7 +1233,9 @@ export class InstanceTemplatesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1325,7 +1339,9 @@ export class InstanceTemplatesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstanceTemplatesRequest, @@ -1396,7 +1412,9 @@ export class InstanceTemplatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1449,7 +1467,9 @@ export class InstanceTemplatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/instances_client.ts b/packages/google-cloud-compute/src/v1/instances_client.ts index 696efabf82a..0422d22cb19 100644 --- a/packages/google-cloud-compute/src/v1/instances_client.ts +++ b/packages/google-cloud-compute/src/v1/instances_client.ts @@ -539,7 +539,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addAccessConfig request %j', request); const wrappedCallback: | Callback< @@ -679,7 +681,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addResourcePolicies request %j', request); const wrappedCallback: | Callback< @@ -821,7 +825,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('attachDisk request %j', request); const wrappedCallback: | Callback< @@ -958,7 +964,9 @@ export class InstancesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('bulkInsert request %j', request); const wrappedCallback: | Callback< @@ -1090,7 +1098,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1232,7 +1242,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAccessConfig request %j', request); const wrappedCallback: | Callback< @@ -1372,7 +1384,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detachDisk request %j', request); const wrappedCallback: | Callback< @@ -1495,7 +1509,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1623,7 +1639,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEffectiveFirewalls request %j', request); const wrappedCallback: | Callback< @@ -1758,7 +1776,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGuestAttributes request %j', request); const wrappedCallback: | Callback< @@ -1885,7 +1905,9 @@ export class InstancesClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2010,7 +2032,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getScreenshot request %j', request); const wrappedCallback: | Callback< @@ -2145,7 +2169,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSerialPortOutput request %j', request); const wrappedCallback: | Callback< @@ -2276,7 +2302,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getShieldedInstanceIdentity request %j', request); const wrappedCallback: | Callback< @@ -2405,7 +2433,9 @@ export class InstancesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -2543,7 +2573,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('performMaintenance request %j', request); const wrappedCallback: | Callback< @@ -2683,7 +2715,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeResourcePolicies request %j', request); const wrappedCallback: | Callback< @@ -2823,7 +2857,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reportHostAsFaulty request %j', request); const wrappedCallback: | Callback< @@ -2955,7 +2991,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reset request %j', request); const wrappedCallback: | Callback< @@ -3087,7 +3125,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resume request %j', request); const wrappedCallback: | Callback< @@ -3224,7 +3264,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('sendDiagnosticInterrupt request %j', request); const wrappedCallback: | Callback< @@ -3358,7 +3400,9 @@ export class InstancesClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setDeletionProtection request %j', request); const wrappedCallback: | Callback< @@ -3500,7 +3544,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setDiskAutoDelete request %j', request); const wrappedCallback: | Callback< @@ -3633,7 +3679,9 @@ export class InstancesClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -3767,7 +3815,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -3907,7 +3957,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMachineResources request %j', request); const wrappedCallback: | Callback< @@ -4047,7 +4099,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMachineType request %j', request); const wrappedCallback: | Callback< @@ -4187,7 +4241,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMetadata request %j', request); const wrappedCallback: | Callback< @@ -4327,7 +4383,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMinCpuPlatform request %j', request); const wrappedCallback: | Callback< @@ -4461,7 +4519,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setName request %j', request); const wrappedCallback: | Callback< @@ -4601,7 +4661,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setScheduling request %j', request); const wrappedCallback: | Callback< @@ -4741,7 +4803,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSecurityPolicy request %j', request); const wrappedCallback: | Callback< @@ -4881,7 +4945,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setServiceAccount request %j', request); const wrappedCallback: | Callback< @@ -5021,7 +5087,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setShieldedInstanceIntegrityPolicy request %j', request); const wrappedCallback: | Callback< @@ -5158,7 +5226,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setTags request %j', request); const wrappedCallback: | Callback< @@ -5298,7 +5368,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('simulateMaintenanceEvent request %j', request); const wrappedCallback: | Callback< @@ -5430,7 +5502,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('start request %j', request); const wrappedCallback: | Callback< @@ -5570,7 +5644,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startWithEncryptionKey request %j', request); const wrappedCallback: | Callback< @@ -5704,7 +5780,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stop request %j', request); const wrappedCallback: | Callback< @@ -5838,7 +5916,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suspend request %j', request); const wrappedCallback: | Callback< @@ -5977,7 +6057,9 @@ export class InstancesClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -6111,7 +6193,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -6253,7 +6337,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAccessConfig request %j', request); const wrappedCallback: | Callback< @@ -6393,7 +6479,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDisplayDevice request %j', request); const wrappedCallback: | Callback< @@ -6535,7 +6623,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNetworkInterface request %j', request); const wrappedCallback: | Callback< @@ -6675,7 +6765,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateShieldedInstanceConfig request %j', request); const wrappedCallback: | Callback< @@ -6767,7 +6859,9 @@ export class InstancesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -6872,7 +6966,9 @@ export class InstancesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstancesRequest, @@ -6944,7 +7040,9 @@ export class InstancesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -7000,7 +7098,9 @@ export class InstancesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -7108,7 +7208,9 @@ export class InstancesClient { zone: request.zone ?? '', instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListReferrersInstancesRequest, @@ -7185,7 +7287,9 @@ export class InstancesClient { }); const defaultCallSettings = this._defaults['listReferrers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferrers stream %j', request); return this.descriptors.page.listReferrers.createStream( this.innerApiCalls.listReferrers as GaxCall, @@ -7244,7 +7348,9 @@ export class InstancesClient { }); const defaultCallSettings = this._defaults['listReferrers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferrers iterate %j', request); return this.descriptors.page.listReferrers.asyncIterate( this.innerApiCalls['listReferrers'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/instant_snapshots_client.ts b/packages/google-cloud-compute/src/v1/instant_snapshots_client.ts index 9a384b39311..d2546b3cb07 100644 --- a/packages/google-cloud-compute/src/v1/instant_snapshots_client.ts +++ b/packages/google-cloud-compute/src/v1/instant_snapshots_client.ts @@ -490,7 +490,9 @@ export class InstantSnapshotsClient { zone: request.zone ?? '', instant_snapshot: request.instantSnapshot ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -621,7 +623,9 @@ export class InstantSnapshotsClient { zone: request.zone ?? '', instant_snapshot: request.instantSnapshot ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class InstantSnapshotsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -882,7 +888,9 @@ export class InstantSnapshotsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1021,7 +1029,9 @@ export class InstantSnapshotsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1155,7 +1165,9 @@ export class InstantSnapshotsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1294,7 +1306,9 @@ export class InstantSnapshotsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1377,7 +1391,9 @@ export class InstantSnapshotsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1484,7 +1500,9 @@ export class InstantSnapshotsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstantSnapshotsRequest, @@ -1558,7 +1576,9 @@ export class InstantSnapshotsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1614,7 +1634,9 @@ export class InstantSnapshotsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/interconnect_attachments_client.ts b/packages/google-cloud-compute/src/v1/interconnect_attachments_client.ts index 960b9c54a43..70ec7056506 100644 --- a/packages/google-cloud-compute/src/v1/interconnect_attachments_client.ts +++ b/packages/google-cloud-compute/src/v1/interconnect_attachments_client.ts @@ -489,7 +489,9 @@ export class InterconnectAttachmentsClient { region: request.region ?? '', interconnect_attachment: request.interconnectAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -626,7 +628,9 @@ export class InterconnectAttachmentsClient { region: request.region ?? '', interconnect_attachment: request.interconnectAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -759,7 +763,9 @@ export class InterconnectAttachmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -899,7 +905,9 @@ export class InterconnectAttachmentsClient { region: request.region ?? '', interconnect_attachment: request.interconnectAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1039,7 +1047,9 @@ export class InterconnectAttachmentsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1128,7 +1138,9 @@ export class InterconnectAttachmentsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1244,7 +1256,9 @@ export class InterconnectAttachmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInterconnectAttachmentsRequest, @@ -1318,7 +1332,9 @@ export class InterconnectAttachmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1374,7 +1390,9 @@ export class InterconnectAttachmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/interconnect_locations_client.ts b/packages/google-cloud-compute/src/v1/interconnect_locations_client.ts index 6dd921a18c5..35bcd6f0809 100644 --- a/packages/google-cloud-compute/src/v1/interconnect_locations_client.ts +++ b/packages/google-cloud-compute/src/v1/interconnect_locations_client.ts @@ -472,7 +472,9 @@ export class InterconnectLocationsClient { project: request.project ?? '', interconnect_location: request.interconnectLocation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -605,7 +607,9 @@ export class InterconnectLocationsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInterconnectLocationsRequest, @@ -676,7 +680,9 @@ export class InterconnectLocationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -729,7 +735,9 @@ export class InterconnectLocationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/interconnect_remote_locations_client.ts b/packages/google-cloud-compute/src/v1/interconnect_remote_locations_client.ts index a6e4277a988..9d6b036a4e2 100644 --- a/packages/google-cloud-compute/src/v1/interconnect_remote_locations_client.ts +++ b/packages/google-cloud-compute/src/v1/interconnect_remote_locations_client.ts @@ -473,7 +473,9 @@ export class InterconnectRemoteLocationsClient { project: request.project ?? '', interconnect_remote_location: request.interconnectRemoteLocation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -606,7 +608,9 @@ export class InterconnectRemoteLocationsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInterconnectRemoteLocationsRequest, @@ -677,7 +681,9 @@ export class InterconnectRemoteLocationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -730,7 +736,9 @@ export class InterconnectRemoteLocationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/interconnects_client.ts b/packages/google-cloud-compute/src/v1/interconnects_client.ts index fa452b9beb4..e07a756a249 100644 --- a/packages/google-cloud-compute/src/v1/interconnects_client.ts +++ b/packages/google-cloud-compute/src/v1/interconnects_client.ts @@ -481,7 +481,9 @@ export class InterconnectsClient { project: request.project ?? '', interconnect: request.interconnect ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -603,7 +605,9 @@ export class InterconnectsClient { project: request.project ?? '', interconnect: request.interconnect ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -728,7 +732,9 @@ export class InterconnectsClient { project: request.project ?? '', interconnect: request.interconnect ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDiagnostics request %j', request); const wrappedCallback: | Callback< @@ -856,7 +862,9 @@ export class InterconnectsClient { project: request.project ?? '', interconnect: request.interconnect ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMacsecConfig request %j', request); const wrappedCallback: | Callback< @@ -984,7 +992,9 @@ export class InterconnectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1121,7 +1131,9 @@ export class InterconnectsClient { project: request.project ?? '', interconnect: request.interconnect ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1256,7 +1268,9 @@ export class InterconnectsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1387,7 +1401,9 @@ export class InterconnectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInterconnectsRequest, @@ -1456,7 +1472,9 @@ export class InterconnectsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1509,7 +1527,9 @@ export class InterconnectsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/license_codes_client.ts b/packages/google-cloud-compute/src/v1/license_codes_client.ts index eb827fa2b65..f11c6d26f0a 100644 --- a/packages/google-cloud-compute/src/v1/license_codes_client.ts +++ b/packages/google-cloud-compute/src/v1/license_codes_client.ts @@ -446,7 +446,9 @@ export class LicenseCodesClient { project: request.project ?? '', license_code: request.licenseCode ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -573,7 +575,9 @@ export class LicenseCodesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-compute/src/v1/licenses_client.ts b/packages/google-cloud-compute/src/v1/licenses_client.ts index 375467e898a..4e5b57b11c2 100644 --- a/packages/google-cloud-compute/src/v1/licenses_client.ts +++ b/packages/google-cloud-compute/src/v1/licenses_client.ts @@ -474,7 +474,9 @@ export class LicensesClient { project: request.project ?? '', license: request.license ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -594,7 +596,9 @@ export class LicensesClient { project: request.project ?? '', license: request.license ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -713,7 +717,9 @@ export class LicensesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -835,7 +841,9 @@ export class LicensesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -965,7 +973,9 @@ export class LicensesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1095,7 +1105,9 @@ export class LicensesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1222,7 +1234,9 @@ export class LicensesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListLicensesRequest, @@ -1293,7 +1307,9 @@ export class LicensesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1346,7 +1362,9 @@ export class LicensesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/machine_images_client.ts b/packages/google-cloud-compute/src/v1/machine_images_client.ts index 951e7921532..05e36172604 100644 --- a/packages/google-cloud-compute/src/v1/machine_images_client.ts +++ b/packages/google-cloud-compute/src/v1/machine_images_client.ts @@ -480,7 +480,9 @@ export class MachineImagesClient { project: request.project ?? '', machine_image: request.machineImage ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -602,7 +604,9 @@ export class MachineImagesClient { project: request.project ?? '', machine_image: request.machineImage ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -729,7 +733,9 @@ export class MachineImagesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -859,7 +865,9 @@ export class MachineImagesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -995,7 +1003,9 @@ export class MachineImagesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1125,7 +1135,9 @@ export class MachineImagesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1250,7 +1262,9 @@ export class MachineImagesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListMachineImagesRequest, @@ -1319,7 +1333,9 @@ export class MachineImagesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1372,7 +1388,9 @@ export class MachineImagesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/machine_types_client.ts b/packages/google-cloud-compute/src/v1/machine_types_client.ts index 95ec005d081..334a900a7a7 100644 --- a/packages/google-cloud-compute/src/v1/machine_types_client.ts +++ b/packages/google-cloud-compute/src/v1/machine_types_client.ts @@ -467,7 +467,9 @@ export class MachineTypesClient { zone: request.zone ?? '', machine_type: request.machineType ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -547,7 +549,9 @@ export class MachineTypesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -652,7 +656,9 @@ export class MachineTypesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListMachineTypesRequest, @@ -724,7 +730,9 @@ export class MachineTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -780,7 +788,9 @@ export class MachineTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/network_attachments_client.ts b/packages/google-cloud-compute/src/v1/network_attachments_client.ts index 42a0e2ce3a8..67eb696014b 100644 --- a/packages/google-cloud-compute/src/v1/network_attachments_client.ts +++ b/packages/google-cloud-compute/src/v1/network_attachments_client.ts @@ -490,7 +490,9 @@ export class NetworkAttachmentsClient { region: request.region ?? '', network_attachment: request.networkAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -621,7 +623,9 @@ export class NetworkAttachmentsClient { region: request.region ?? '', network_attachment: request.networkAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -754,7 +758,9 @@ export class NetworkAttachmentsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -885,7 +891,9 @@ export class NetworkAttachmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1025,7 +1033,9 @@ export class NetworkAttachmentsClient { region: request.region ?? '', network_attachment: request.networkAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1164,7 +1174,9 @@ export class NetworkAttachmentsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1297,7 +1309,9 @@ export class NetworkAttachmentsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1380,7 +1394,9 @@ export class NetworkAttachmentsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1487,7 +1503,9 @@ export class NetworkAttachmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworkAttachmentsRequest, @@ -1561,7 +1579,9 @@ export class NetworkAttachmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1617,7 +1637,9 @@ export class NetworkAttachmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/network_edge_security_services_client.ts b/packages/google-cloud-compute/src/v1/network_edge_security_services_client.ts index 613c7ffb0f1..7f1eb7d2076 100644 --- a/packages/google-cloud-compute/src/v1/network_edge_security_services_client.ts +++ b/packages/google-cloud-compute/src/v1/network_edge_security_services_client.ts @@ -483,7 +483,9 @@ export class NetworkEdgeSecurityServicesClient { region: request.region ?? '', network_edge_security_service: request.networkEdgeSecurityService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class NetworkEdgeSecurityServicesClient { region: request.region ?? '', network_edge_security_service: request.networkEdgeSecurityService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -753,7 +757,9 @@ export class NetworkEdgeSecurityServicesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -896,7 +902,9 @@ export class NetworkEdgeSecurityServicesClient { region: request.region ?? '', network_edge_security_service: request.networkEdgeSecurityService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -988,7 +996,9 @@ export class NetworkEdgeSecurityServicesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/network_endpoint_groups_client.ts b/packages/google-cloud-compute/src/v1/network_endpoint_groups_client.ts index 22ca18bfd4d..8491fd9b1dc 100644 --- a/packages/google-cloud-compute/src/v1/network_endpoint_groups_client.ts +++ b/packages/google-cloud-compute/src/v1/network_endpoint_groups_client.ts @@ -498,7 +498,9 @@ export class NetworkEndpointGroupsClient { zone: request.zone ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('attachNetworkEndpoints request %j', request); const wrappedCallback: | Callback< @@ -636,7 +638,9 @@ export class NetworkEndpointGroupsClient { zone: request.zone ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -776,7 +780,9 @@ export class NetworkEndpointGroupsClient { zone: request.zone ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detachNetworkEndpoints request %j', request); const wrappedCallback: | Callback< @@ -913,7 +919,9 @@ export class NetworkEndpointGroupsClient { zone: request.zone ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1044,7 +1052,9 @@ export class NetworkEndpointGroupsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1183,7 +1193,9 @@ export class NetworkEndpointGroupsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1266,7 +1278,9 @@ export class NetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1379,7 +1393,9 @@ export class NetworkEndpointGroupsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworkEndpointGroupsRequest, @@ -1453,7 +1469,9 @@ export class NetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1509,7 +1527,9 @@ export class NetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1625,7 +1645,9 @@ export class NetworkEndpointGroupsClient { zone: request.zone ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworkEndpointsNetworkEndpointGroupsRequest, @@ -1704,7 +1726,9 @@ export class NetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['listNetworkEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkEndpoints stream %j', request); return this.descriptors.page.listNetworkEndpoints.createStream( this.innerApiCalls.listNetworkEndpoints as GaxCall, @@ -1765,7 +1789,9 @@ export class NetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['listNetworkEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkEndpoints iterate %j', request); return this.descriptors.page.listNetworkEndpoints.asyncIterate( this.innerApiCalls['listNetworkEndpoints'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/network_firewall_policies_client.ts b/packages/google-cloud-compute/src/v1/network_firewall_policies_client.ts index ce0b920e73e..71cc50fd52f 100644 --- a/packages/google-cloud-compute/src/v1/network_firewall_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/network_firewall_policies_client.ts @@ -504,7 +504,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addAssociation request %j', request); const wrappedCallback: | Callback< @@ -645,7 +647,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addPacketMirroringRule request %j', request); const wrappedCallback: | Callback< @@ -786,7 +790,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addRule request %j', request); const wrappedCallback: | Callback< @@ -923,7 +929,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cloneRules request %j', request); const wrappedCallback: | Callback< @@ -1058,7 +1066,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1192,7 +1202,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1322,7 +1334,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAssociation request %j', request); const wrappedCallback: | Callback< @@ -1452,7 +1466,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1582,7 +1598,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPacketMirroringRule request %j', request); const wrappedCallback: | Callback< @@ -1712,7 +1730,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRule request %j', request); const wrappedCallback: | Callback< @@ -1840,7 +1860,9 @@ export class NetworkFirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1977,7 +1999,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -2116,7 +2140,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchPacketMirroringRule request %j', request); const wrappedCallback: | Callback< @@ -2255,7 +2281,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchRule request %j', request); const wrappedCallback: | Callback< @@ -2392,7 +2420,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeAssociation request %j', request); const wrappedCallback: | Callback< @@ -2529,7 +2559,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removePacketMirroringRule request %j', request); const wrappedCallback: | Callback< @@ -2666,7 +2698,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeRule request %j', request); const wrappedCallback: | Callback< @@ -2802,7 +2836,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2932,7 +2968,9 @@ export class NetworkFirewallPoliciesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -3015,7 +3053,9 @@ export class NetworkFirewallPoliciesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -3117,7 +3157,9 @@ export class NetworkFirewallPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworkFirewallPoliciesRequest, @@ -3186,7 +3228,9 @@ export class NetworkFirewallPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -3239,7 +3283,9 @@ export class NetworkFirewallPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/network_profiles_client.ts b/packages/google-cloud-compute/src/v1/network_profiles_client.ts index e2076816b2c..ac7727edacb 100644 --- a/packages/google-cloud-compute/src/v1/network_profiles_client.ts +++ b/packages/google-cloud-compute/src/v1/network_profiles_client.ts @@ -465,7 +465,9 @@ export class NetworkProfilesClient { project: request.project ?? '', network_profile: request.networkProfile ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -595,7 +597,9 @@ export class NetworkProfilesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworkProfilesRequest, @@ -666,7 +670,9 @@ export class NetworkProfilesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -719,7 +725,9 @@ export class NetworkProfilesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/networks_client.ts b/packages/google-cloud-compute/src/v1/networks_client.ts index f52ce6116d5..5a53d9d40c1 100644 --- a/packages/google-cloud-compute/src/v1/networks_client.ts +++ b/packages/google-cloud-compute/src/v1/networks_client.ts @@ -491,7 +491,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addPeering request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -740,7 +744,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -863,7 +869,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEffectiveFirewalls request %j', request); const wrappedCallback: | Callback< @@ -985,7 +993,9 @@ export class NetworksClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1116,7 +1126,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1253,7 +1265,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removePeering request %j', request); const wrappedCallback: | Callback< @@ -1388,7 +1402,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('switchToCustomMode request %j', request); const wrappedCallback: | Callback< @@ -1525,7 +1541,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePeering request %j', request); const wrappedCallback: | Callback< @@ -1656,7 +1674,9 @@ export class NetworksClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworksRequest, @@ -1725,7 +1745,9 @@ export class NetworksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1778,7 +1800,9 @@ export class NetworksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1896,7 +1920,9 @@ export class NetworksClient { project: request.project ?? '', network: request.network ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListPeeringRoutesNetworksRequest, @@ -1977,7 +2003,9 @@ export class NetworksClient { }); const defaultCallSettings = this._defaults['listPeeringRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPeeringRoutes stream %j', request); return this.descriptors.page.listPeeringRoutes.createStream( this.innerApiCalls.listPeeringRoutes as GaxCall, @@ -2040,7 +2068,9 @@ export class NetworksClient { }); const defaultCallSettings = this._defaults['listPeeringRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPeeringRoutes iterate %j', request); return this.descriptors.page.listPeeringRoutes.asyncIterate( this.innerApiCalls['listPeeringRoutes'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/node_groups_client.ts b/packages/google-cloud-compute/src/v1/node_groups_client.ts index 4c6c8a9d6d9..9245f575b3b 100644 --- a/packages/google-cloud-compute/src/v1/node_groups_client.ts +++ b/packages/google-cloud-compute/src/v1/node_groups_client.ts @@ -503,7 +503,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addNodes request %j', request); const wrappedCallback: | Callback< @@ -635,7 +637,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -775,7 +779,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNodes request %j', request); const wrappedCallback: | Callback< @@ -900,7 +906,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1032,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1151,7 +1161,9 @@ export class NodeGroupsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1285,7 +1297,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1425,7 +1439,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('performMaintenance request %j', request); const wrappedCallback: | Callback< @@ -1558,7 +1574,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1692,7 +1710,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNodeTemplate request %j', request); const wrappedCallback: | Callback< @@ -1832,7 +1852,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('simulateMaintenanceEvent request %j', request); const wrappedCallback: | Callback< @@ -1971,7 +1993,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2054,7 +2078,9 @@ export class NodeGroupsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -2159,7 +2185,9 @@ export class NodeGroupsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNodeGroupsRequest, @@ -2231,7 +2259,9 @@ export class NodeGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2287,7 +2317,9 @@ export class NodeGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -2395,7 +2427,9 @@ export class NodeGroupsClient { zone: request.zone ?? '', node_group: request.nodeGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNodesNodeGroupsRequest, @@ -2472,7 +2506,9 @@ export class NodeGroupsClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes stream %j', request); return this.descriptors.page.listNodes.createStream( this.innerApiCalls.listNodes as GaxCall, @@ -2531,7 +2567,9 @@ export class NodeGroupsClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes iterate %j', request); return this.descriptors.page.listNodes.asyncIterate( this.innerApiCalls['listNodes'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/node_templates_client.ts b/packages/google-cloud-compute/src/v1/node_templates_client.ts index bdf1e334c20..0ce82589dd5 100644 --- a/packages/google-cloud-compute/src/v1/node_templates_client.ts +++ b/packages/google-cloud-compute/src/v1/node_templates_client.ts @@ -489,7 +489,9 @@ export class NodeTemplatesClient { region: request.region ?? '', node_template: request.nodeTemplate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class NodeTemplatesClient { region: request.region ?? '', node_template: request.nodeTemplate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -744,7 +748,9 @@ export class NodeTemplatesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -875,7 +881,9 @@ export class NodeTemplatesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1014,7 +1022,9 @@ export class NodeTemplatesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1147,7 +1157,9 @@ export class NodeTemplatesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1230,7 +1242,9 @@ export class NodeTemplatesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1335,7 +1349,9 @@ export class NodeTemplatesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNodeTemplatesRequest, @@ -1407,7 +1423,9 @@ export class NodeTemplatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1463,7 +1481,9 @@ export class NodeTemplatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/node_types_client.ts b/packages/google-cloud-compute/src/v1/node_types_client.ts index 99298a127d6..0da189ed3f1 100644 --- a/packages/google-cloud-compute/src/v1/node_types_client.ts +++ b/packages/google-cloud-compute/src/v1/node_types_client.ts @@ -465,7 +465,9 @@ export class NodeTypesClient { zone: request.zone ?? '', node_type: request.nodeType ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -543,7 +545,9 @@ export class NodeTypesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -648,7 +652,9 @@ export class NodeTypesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNodeTypesRequest, @@ -720,7 +726,9 @@ export class NodeTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -776,7 +784,9 @@ export class NodeTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/packet_mirrorings_client.ts b/packages/google-cloud-compute/src/v1/packet_mirrorings_client.ts index 3017dc8a604..0175ed388cd 100644 --- a/packages/google-cloud-compute/src/v1/packet_mirrorings_client.ts +++ b/packages/google-cloud-compute/src/v1/packet_mirrorings_client.ts @@ -488,7 +488,9 @@ export class PacketMirroringsClient { region: request.region ?? '', packet_mirroring: request.packetMirroring ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class PacketMirroringsClient { region: request.region ?? '', packet_mirroring: request.packetMirroring ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -747,7 +751,9 @@ export class PacketMirroringsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -887,7 +893,9 @@ export class PacketMirroringsClient { region: request.region ?? '', packet_mirroring: request.packetMirroring ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1034,9 @@ export class PacketMirroringsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1109,7 +1119,9 @@ export class PacketMirroringsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1216,7 +1228,9 @@ export class PacketMirroringsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListPacketMirroringsRequest, @@ -1290,7 +1304,9 @@ export class PacketMirroringsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1346,7 +1362,9 @@ export class PacketMirroringsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/projects_client.ts b/packages/google-cloud-compute/src/v1/projects_client.ts index f824b55a0e2..129709ee966 100644 --- a/packages/google-cloud-compute/src/v1/projects_client.ts +++ b/packages/google-cloud-compute/src/v1/projects_client.ts @@ -489,7 +489,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('disableXpnHost request %j', request); const wrappedCallback: | Callback< @@ -623,7 +625,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('disableXpnResource request %j', request); const wrappedCallback: | Callback< @@ -755,7 +759,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enableXpnHost request %j', request); const wrappedCallback: | Callback< @@ -889,7 +895,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('enableXpnResource request %j', request); const wrappedCallback: | Callback< @@ -1006,7 +1014,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1120,7 +1130,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getXpnHost request %j', request); const wrappedCallback: | Callback< @@ -1239,7 +1251,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moveDisk request %j', request); const wrappedCallback: | Callback< @@ -1373,7 +1387,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moveInstance request %j', request); const wrappedCallback: | Callback< @@ -1507,7 +1523,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setCloudArmorTier request %j', request); const wrappedCallback: | Callback< @@ -1641,7 +1659,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setCommonInstanceMetadata request %j', request); const wrappedCallback: | Callback< @@ -1775,7 +1795,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setDefaultNetworkTier request %j', request); const wrappedCallback: | Callback< @@ -1909,7 +1931,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setUsageExportBucket request %j', request); const wrappedCallback: | Callback< @@ -2048,7 +2072,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IGetXpnResourcesProjectsRequest, @@ -2119,7 +2145,9 @@ export class ProjectsClient { }); const defaultCallSettings = this._defaults['getXpnResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getXpnResources stream %j', request); return this.descriptors.page.getXpnResources.createStream( this.innerApiCalls.getXpnResources as GaxCall, @@ -2172,7 +2200,9 @@ export class ProjectsClient { }); const defaultCallSettings = this._defaults['getXpnResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getXpnResources iterate %j', request); return this.descriptors.page.getXpnResources.asyncIterate( this.innerApiCalls['getXpnResources'] as GaxCall, @@ -2274,7 +2304,9 @@ export class ProjectsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListXpnHostsProjectsRequest, @@ -2345,7 +2377,9 @@ export class ProjectsClient { }); const defaultCallSettings = this._defaults['listXpnHosts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listXpnHosts stream %j', request); return this.descriptors.page.listXpnHosts.createStream( this.innerApiCalls.listXpnHosts as GaxCall, @@ -2400,7 +2434,9 @@ export class ProjectsClient { }); const defaultCallSettings = this._defaults['listXpnHosts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listXpnHosts iterate %j', request); return this.descriptors.page.listXpnHosts.asyncIterate( this.innerApiCalls['listXpnHosts'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/public_advertised_prefixes_client.ts b/packages/google-cloud-compute/src/v1/public_advertised_prefixes_client.ts index baabad6950a..56d7f4e591e 100644 --- a/packages/google-cloud-compute/src/v1/public_advertised_prefixes_client.ts +++ b/packages/google-cloud-compute/src/v1/public_advertised_prefixes_client.ts @@ -482,7 +482,9 @@ export class PublicAdvertisedPrefixesClient { project: request.project ?? '', public_advertised_prefix: request.publicAdvertisedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('announce request %j', request); const wrappedCallback: | Callback< @@ -617,7 +619,9 @@ export class PublicAdvertisedPrefixesClient { project: request.project ?? '', public_advertised_prefix: request.publicAdvertisedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class PublicAdvertisedPrefixesClient { project: request.project ?? '', public_advertised_prefix: request.publicAdvertisedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -879,7 +885,9 @@ export class PublicAdvertisedPrefixesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1016,7 +1024,9 @@ export class PublicAdvertisedPrefixesClient { project: request.project ?? '', public_advertised_prefix: request.publicAdvertisedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1151,7 +1161,9 @@ export class PublicAdvertisedPrefixesClient { project: request.project ?? '', public_advertised_prefix: request.publicAdvertisedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('withdraw request %j', request); const wrappedCallback: | Callback< @@ -1290,7 +1302,9 @@ export class PublicAdvertisedPrefixesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListPublicAdvertisedPrefixesRequest, @@ -1361,7 +1375,9 @@ export class PublicAdvertisedPrefixesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1414,7 +1430,9 @@ export class PublicAdvertisedPrefixesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/public_delegated_prefixes_client.ts b/packages/google-cloud-compute/src/v1/public_delegated_prefixes_client.ts index b1568a879b6..7d9ce580d1e 100644 --- a/packages/google-cloud-compute/src/v1/public_delegated_prefixes_client.ts +++ b/packages/google-cloud-compute/src/v1/public_delegated_prefixes_client.ts @@ -490,7 +490,9 @@ export class PublicDelegatedPrefixesClient { region: request.region ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('announce request %j', request); const wrappedCallback: | Callback< @@ -628,7 +630,9 @@ export class PublicDelegatedPrefixesClient { region: request.region ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -765,7 +769,9 @@ export class PublicDelegatedPrefixesClient { region: request.region ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -896,7 +902,9 @@ export class PublicDelegatedPrefixesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1036,7 +1044,9 @@ export class PublicDelegatedPrefixesClient { region: request.region ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1174,7 +1184,9 @@ export class PublicDelegatedPrefixesClient { region: request.region ?? '', public_delegated_prefix: request.publicDelegatedPrefix ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('withdraw request %j', request); const wrappedCallback: | Callback< @@ -1263,7 +1275,9 @@ export class PublicDelegatedPrefixesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1379,7 +1393,9 @@ export class PublicDelegatedPrefixesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListPublicDelegatedPrefixesRequest, @@ -1453,7 +1469,9 @@ export class PublicDelegatedPrefixesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1509,7 +1527,9 @@ export class PublicDelegatedPrefixesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_autoscalers_client.ts b/packages/google-cloud-compute/src/v1/region_autoscalers_client.ts index 27c5d1870ca..0c06a3f7508 100644 --- a/packages/google-cloud-compute/src/v1/region_autoscalers_client.ts +++ b/packages/google-cloud-compute/src/v1/region_autoscalers_client.ts @@ -482,7 +482,9 @@ export class RegionAutoscalersClient { region: request.region ?? '', autoscaler: request.autoscaler ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -613,7 +615,9 @@ export class RegionAutoscalersClient { region: request.region ?? '', autoscaler: request.autoscaler ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -744,7 +748,9 @@ export class RegionAutoscalersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -883,7 +889,9 @@ export class RegionAutoscalersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1022,7 +1030,9 @@ export class RegionAutoscalersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1158,7 +1168,9 @@ export class RegionAutoscalersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionAutoscalersRequest, @@ -1232,7 +1244,9 @@ export class RegionAutoscalersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1288,7 +1302,9 @@ export class RegionAutoscalersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_backend_services_client.ts b/packages/google-cloud-compute/src/v1/region_backend_services_client.ts index 64a98a56498..3729d056eb2 100644 --- a/packages/google-cloud-compute/src/v1/region_backend_services_client.ts +++ b/packages/google-cloud-compute/src/v1/region_backend_services_client.ts @@ -494,7 +494,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -631,7 +633,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -763,7 +767,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHealth request %j', request); const wrappedCallback: | Callback< @@ -896,7 +902,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1035,9 @@ export class RegionBackendServicesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1167,7 +1177,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1306,7 +1318,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1440,7 +1454,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSecurityPolicy request %j', request); const wrappedCallback: | Callback< @@ -1579,7 +1595,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1713,7 +1731,9 @@ export class RegionBackendServicesClient { region: request.region ?? '', backend_service: request.backendService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1847,7 +1867,9 @@ export class RegionBackendServicesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionBackendServicesRequest, @@ -1919,7 +1941,9 @@ export class RegionBackendServicesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1975,7 +1999,9 @@ export class RegionBackendServicesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -2086,7 +2112,9 @@ export class RegionBackendServicesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListUsableRegionBackendServicesRequest, @@ -2160,7 +2188,9 @@ export class RegionBackendServicesClient { }); const defaultCallSettings = this._defaults['listUsable']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsable stream %j', request); return this.descriptors.page.listUsable.createStream( this.innerApiCalls.listUsable as GaxCall, @@ -2216,7 +2246,9 @@ export class RegionBackendServicesClient { }); const defaultCallSettings = this._defaults['listUsable']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsable iterate %j', request); return this.descriptors.page.listUsable.asyncIterate( this.innerApiCalls['listUsable'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_commitments_client.ts b/packages/google-cloud-compute/src/v1/region_commitments_client.ts index 3a8bc19d85e..aba0aebf8f2 100644 --- a/packages/google-cloud-compute/src/v1/region_commitments_client.ts +++ b/packages/google-cloud-compute/src/v1/region_commitments_client.ts @@ -479,7 +479,9 @@ export class RegionCommitmentsClient { region: request.region ?? '', commitment: request.commitment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -610,7 +612,9 @@ export class RegionCommitmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -753,7 +757,9 @@ export class RegionCommitmentsClient { region: request.region ?? '', commitment: request.commitment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -842,7 +848,9 @@ export class RegionCommitmentsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -947,7 +955,9 @@ export class RegionCommitmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionCommitmentsRequest, @@ -1019,7 +1029,9 @@ export class RegionCommitmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1075,7 +1087,9 @@ export class RegionCommitmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_disk_types_client.ts b/packages/google-cloud-compute/src/v1/region_disk_types_client.ts index 2d1150d718b..a572970ba2e 100644 --- a/packages/google-cloud-compute/src/v1/region_disk_types_client.ts +++ b/packages/google-cloud-compute/src/v1/region_disk_types_client.ts @@ -468,7 +468,9 @@ export class RegionDiskTypesClient { region: request.region ?? '', disk_type: request.diskType ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -593,7 +595,9 @@ export class RegionDiskTypesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionDiskTypesRequest, @@ -665,7 +669,9 @@ export class RegionDiskTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -721,7 +727,9 @@ export class RegionDiskTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_disks_client.ts b/packages/google-cloud-compute/src/v1/region_disks_client.ts index e20b915b13f..2d1ebff1099 100644 --- a/packages/google-cloud-compute/src/v1/region_disks_client.ts +++ b/packages/google-cloud-compute/src/v1/region_disks_client.ts @@ -495,7 +495,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addResourcePolicies request %j', request); const wrappedCallback: | Callback< @@ -632,7 +634,9 @@ export class RegionDisksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('bulkInsert request %j', request); const wrappedCallback: | Callback< @@ -772,7 +776,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSnapshot request %j', request); const wrappedCallback: | Callback< @@ -910,7 +916,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1035,7 +1043,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1159,7 +1169,9 @@ export class RegionDisksClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1292,7 +1304,9 @@ export class RegionDisksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1432,7 +1446,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeResourcePolicies request %j', request); const wrappedCallback: | Callback< @@ -1572,7 +1588,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resize request %j', request); const wrappedCallback: | Callback< @@ -1705,7 +1723,9 @@ export class RegionDisksClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1839,7 +1859,9 @@ export class RegionDisksClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1979,7 +2001,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startAsyncReplication request %j', request); const wrappedCallback: | Callback< @@ -2117,7 +2141,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopAsyncReplication request %j', request); const wrappedCallback: | Callback< @@ -2254,7 +2280,9 @@ export class RegionDisksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopGroupAsyncReplication request %j', request); const wrappedCallback: | Callback< @@ -2393,7 +2421,9 @@ export class RegionDisksClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2530,7 +2560,9 @@ export class RegionDisksClient { region: request.region ?? '', disk: request.disk ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -2664,7 +2696,9 @@ export class RegionDisksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionDisksRequest, @@ -2736,7 +2770,9 @@ export class RegionDisksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2792,7 +2828,9 @@ export class RegionDisksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_health_check_services_client.ts b/packages/google-cloud-compute/src/v1/region_health_check_services_client.ts index 75529e1adc1..c4de9a94a5b 100644 --- a/packages/google-cloud-compute/src/v1/region_health_check_services_client.ts +++ b/packages/google-cloud-compute/src/v1/region_health_check_services_client.ts @@ -483,7 +483,9 @@ export class RegionHealthCheckServicesClient { region: request.region ?? '', health_check_service: request.healthCheckService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -620,7 +622,9 @@ export class RegionHealthCheckServicesClient { region: request.region ?? '', health_check_service: request.healthCheckService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class RegionHealthCheckServicesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -891,7 +897,9 @@ export class RegionHealthCheckServicesClient { region: request.region ?? '', health_check_service: request.healthCheckService ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1033,7 +1041,9 @@ export class RegionHealthCheckServicesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionHealthCheckServicesRequest, @@ -1107,7 +1117,9 @@ export class RegionHealthCheckServicesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1163,7 +1175,9 @@ export class RegionHealthCheckServicesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_health_checks_client.ts b/packages/google-cloud-compute/src/v1/region_health_checks_client.ts index 5c0fdf768b7..616a85a9805 100644 --- a/packages/google-cloud-compute/src/v1/region_health_checks_client.ts +++ b/packages/google-cloud-compute/src/v1/region_health_checks_client.ts @@ -482,7 +482,9 @@ export class RegionHealthChecksClient { region: request.region ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -613,7 +615,9 @@ export class RegionHealthChecksClient { region: request.region ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -744,7 +748,9 @@ export class RegionHealthChecksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -884,7 +890,9 @@ export class RegionHealthChecksClient { region: request.region ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1032,9 @@ export class RegionHealthChecksClient { region: request.region ?? '', health_check: request.healthCheck ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1158,7 +1168,9 @@ export class RegionHealthChecksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionHealthChecksRequest, @@ -1230,7 +1242,9 @@ export class RegionHealthChecksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1286,7 +1300,9 @@ export class RegionHealthChecksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_instance_group_managers_client.ts b/packages/google-cloud-compute/src/v1/region_instance_group_managers_client.ts index d51c59f3805..096d8746880 100644 --- a/packages/google-cloud-compute/src/v1/region_instance_group_managers_client.ts +++ b/packages/google-cloud-compute/src/v1/region_instance_group_managers_client.ts @@ -518,7 +518,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('abandonInstances request %j', request); const wrappedCallback: | Callback< @@ -656,7 +658,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('applyUpdatesToInstances request %j', request); const wrappedCallback: | Callback< @@ -796,7 +800,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createInstances request %j', request); const wrappedCallback: | Callback< @@ -934,7 +940,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1074,7 +1082,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteInstances request %j', request); const wrappedCallback: | Callback< @@ -1212,7 +1222,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePerInstanceConfigs request %j', request); const wrappedCallback: | Callback< @@ -1349,7 +1361,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1480,7 +1494,9 @@ export class RegionInstanceGroupManagersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1620,7 +1636,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1760,7 +1778,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchPerInstanceConfigs request %j', request); const wrappedCallback: | Callback< @@ -1900,7 +1920,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recreateInstances request %j', request); const wrappedCallback: | Callback< @@ -2040,7 +2062,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resize request %j', request); const wrappedCallback: | Callback< @@ -2180,7 +2204,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeInstances request %j', request); const wrappedCallback: | Callback< @@ -2320,7 +2346,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setInstanceTemplate request %j', request); const wrappedCallback: | Callback< @@ -2460,7 +2488,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setTargetPools request %j', request); const wrappedCallback: | Callback< @@ -2600,7 +2630,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startInstances request %j', request); const wrappedCallback: | Callback< @@ -2740,7 +2772,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopInstances request %j', request); const wrappedCallback: | Callback< @@ -2880,7 +2914,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suspendInstances request %j', request); const wrappedCallback: | Callback< @@ -3020,7 +3056,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePerInstanceConfigs request %j', request); const wrappedCallback: | Callback< @@ -3162,7 +3200,9 @@ export class RegionInstanceGroupManagersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionInstanceGroupManagersRequest, @@ -3236,7 +3276,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -3292,7 +3334,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -3406,7 +3450,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListErrorsRegionInstanceGroupManagersRequest, @@ -3483,7 +3529,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listErrors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listErrors stream %j', request); return this.descriptors.page.listErrors.createStream( this.innerApiCalls.listErrors as GaxCall, @@ -3542,7 +3590,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listErrors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listErrors iterate %j', request); return this.descriptors.page.listErrors.asyncIterate( this.innerApiCalls['listErrors'] as GaxCall, @@ -3656,7 +3706,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListManagedInstancesRegionInstanceGroupManagersRequest, @@ -3733,7 +3785,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listManagedInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagedInstances stream %j', request); return this.descriptors.page.listManagedInstances.createStream( this.innerApiCalls.listManagedInstances as GaxCall, @@ -3792,7 +3846,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listManagedInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagedInstances iterate %j', request); return this.descriptors.page.listManagedInstances.asyncIterate( this.innerApiCalls['listManagedInstances'] as GaxCall, @@ -3906,7 +3962,9 @@ export class RegionInstanceGroupManagersClient { region: request.region ?? '', instance_group_manager: request.instanceGroupManager ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListPerInstanceConfigsRegionInstanceGroupManagersRequest, @@ -3983,7 +4041,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listPerInstanceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPerInstanceConfigs stream %j', request); return this.descriptors.page.listPerInstanceConfigs.createStream( this.innerApiCalls.listPerInstanceConfigs as GaxCall, @@ -4042,7 +4102,9 @@ export class RegionInstanceGroupManagersClient { }); const defaultCallSettings = this._defaults['listPerInstanceConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPerInstanceConfigs iterate %j', request); return this.descriptors.page.listPerInstanceConfigs.asyncIterate( this.innerApiCalls['listPerInstanceConfigs'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_instance_groups_client.ts b/packages/google-cloud-compute/src/v1/region_instance_groups_client.ts index e7e1df246f0..bc97c8c4bcf 100644 --- a/packages/google-cloud-compute/src/v1/region_instance_groups_client.ts +++ b/packages/google-cloud-compute/src/v1/region_instance_groups_client.ts @@ -478,7 +478,9 @@ export class RegionInstanceGroupsClient { region: request.region ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -612,7 +614,9 @@ export class RegionInstanceGroupsClient { region: request.region ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNamedPorts request %j', request); const wrappedCallback: | Callback< @@ -754,7 +758,9 @@ export class RegionInstanceGroupsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionInstanceGroupsRequest, @@ -828,7 +834,9 @@ export class RegionInstanceGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -884,7 +892,9 @@ export class RegionInstanceGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1000,7 +1010,9 @@ export class RegionInstanceGroupsClient { region: request.region ?? '', instance_group: request.instanceGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListInstancesRegionInstanceGroupsRequest, @@ -1079,7 +1091,9 @@ export class RegionInstanceGroupsClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1140,7 +1154,9 @@ export class RegionInstanceGroupsClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_instance_templates_client.ts b/packages/google-cloud-compute/src/v1/region_instance_templates_client.ts index 85da46fbe58..3e969c4a5d4 100644 --- a/packages/google-cloud-compute/src/v1/region_instance_templates_client.ts +++ b/packages/google-cloud-compute/src/v1/region_instance_templates_client.ts @@ -481,7 +481,9 @@ export class RegionInstanceTemplatesClient { region: request.region ?? '', instance_template: request.instanceTemplate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class RegionInstanceTemplatesClient { region: request.region ?? '', instance_template: request.instanceTemplate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -749,7 +753,9 @@ export class RegionInstanceTemplatesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -885,7 +891,9 @@ export class RegionInstanceTemplatesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionInstanceTemplatesRequest, @@ -959,7 +967,9 @@ export class RegionInstanceTemplatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1015,7 +1025,9 @@ export class RegionInstanceTemplatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_instances_client.ts b/packages/google-cloud-compute/src/v1/region_instances_client.ts index 9481917149b..336e6c6fb58 100644 --- a/packages/google-cloud-compute/src/v1/region_instances_client.ts +++ b/packages/google-cloud-compute/src/v1/region_instances_client.ts @@ -461,7 +461,9 @@ export class RegionInstancesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('bulkInsert request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-compute/src/v1/region_instant_snapshots_client.ts b/packages/google-cloud-compute/src/v1/region_instant_snapshots_client.ts index a6a4c179262..aab7edc74bc 100644 --- a/packages/google-cloud-compute/src/v1/region_instant_snapshots_client.ts +++ b/packages/google-cloud-compute/src/v1/region_instant_snapshots_client.ts @@ -485,7 +485,9 @@ export class RegionInstantSnapshotsClient { region: request.region ?? '', instant_snapshot: request.instantSnapshot ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -622,7 +624,9 @@ export class RegionInstantSnapshotsClient { region: request.region ?? '', instant_snapshot: request.instantSnapshot ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -755,7 +759,9 @@ export class RegionInstantSnapshotsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -886,7 +892,9 @@ export class RegionInstantSnapshotsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1025,7 +1033,9 @@ export class RegionInstantSnapshotsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1159,7 +1169,9 @@ export class RegionInstantSnapshotsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1298,7 +1310,9 @@ export class RegionInstantSnapshotsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1428,7 +1442,9 @@ export class RegionInstantSnapshotsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionInstantSnapshotsRequest, @@ -1502,7 +1518,9 @@ export class RegionInstantSnapshotsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1558,7 +1576,9 @@ export class RegionInstantSnapshotsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_network_endpoint_groups_client.ts b/packages/google-cloud-compute/src/v1/region_network_endpoint_groups_client.ts index 863375b866f..49c98ab1efb 100644 --- a/packages/google-cloud-compute/src/v1/region_network_endpoint_groups_client.ts +++ b/packages/google-cloud-compute/src/v1/region_network_endpoint_groups_client.ts @@ -492,7 +492,9 @@ export class RegionNetworkEndpointGroupsClient { region: request.region ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('attachNetworkEndpoints request %j', request); const wrappedCallback: | Callback< @@ -630,7 +632,9 @@ export class RegionNetworkEndpointGroupsClient { region: request.region ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -770,7 +774,9 @@ export class RegionNetworkEndpointGroupsClient { region: request.region ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detachNetworkEndpoints request %j', request); const wrappedCallback: | Callback< @@ -907,7 +913,9 @@ export class RegionNetworkEndpointGroupsClient { region: request.region ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1038,7 +1046,9 @@ export class RegionNetworkEndpointGroupsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1180,7 +1190,9 @@ export class RegionNetworkEndpointGroupsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionNetworkEndpointGroupsRequest, @@ -1254,7 +1266,9 @@ export class RegionNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1310,7 +1324,9 @@ export class RegionNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1424,7 +1440,9 @@ export class RegionNetworkEndpointGroupsClient { region: request.region ?? '', network_endpoint_group: request.networkEndpointGroup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListNetworkEndpointsRegionNetworkEndpointGroupsRequest, @@ -1501,7 +1519,9 @@ export class RegionNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['listNetworkEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkEndpoints stream %j', request); return this.descriptors.page.listNetworkEndpoints.createStream( this.innerApiCalls.listNetworkEndpoints as GaxCall, @@ -1560,7 +1580,9 @@ export class RegionNetworkEndpointGroupsClient { }); const defaultCallSettings = this._defaults['listNetworkEndpoints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkEndpoints iterate %j', request); return this.descriptors.page.listNetworkEndpoints.asyncIterate( this.innerApiCalls['listNetworkEndpoints'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_network_firewall_policies_client.ts b/packages/google-cloud-compute/src/v1/region_network_firewall_policies_client.ts index 9e23256ba30..8060b953a46 100644 --- a/packages/google-cloud-compute/src/v1/region_network_firewall_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/region_network_firewall_policies_client.ts @@ -499,7 +499,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addAssociation request %j', request); const wrappedCallback: | Callback< @@ -643,7 +645,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addRule request %j', request); const wrappedCallback: | Callback< @@ -783,7 +787,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cloneRules request %j', request); const wrappedCallback: | Callback< @@ -921,7 +927,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -1058,7 +1066,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1191,7 +1201,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAssociation request %j', request); const wrappedCallback: | Callback< @@ -1321,7 +1333,9 @@ export class RegionNetworkFirewallPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEffectiveFirewalls request %j', request); const wrappedCallback: | Callback< @@ -1454,7 +1468,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1587,7 +1603,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRule request %j', request); const wrappedCallback: | Callback< @@ -1718,7 +1736,9 @@ export class RegionNetworkFirewallPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1858,7 +1878,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -2000,7 +2022,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchRule request %j', request); const wrappedCallback: | Callback< @@ -2140,7 +2164,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeAssociation request %j', request); const wrappedCallback: | Callback< @@ -2280,7 +2306,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', firewall_policy: request.firewallPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeRule request %j', request); const wrappedCallback: | Callback< @@ -2419,7 +2447,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2552,7 +2582,9 @@ export class RegionNetworkFirewallPoliciesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2680,7 +2712,9 @@ export class RegionNetworkFirewallPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionNetworkFirewallPoliciesRequest, @@ -2752,7 +2786,9 @@ export class RegionNetworkFirewallPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2808,7 +2844,9 @@ export class RegionNetworkFirewallPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_notification_endpoints_client.ts b/packages/google-cloud-compute/src/v1/region_notification_endpoints_client.ts index 9ca9f588714..913a13f3011 100644 --- a/packages/google-cloud-compute/src/v1/region_notification_endpoints_client.ts +++ b/packages/google-cloud-compute/src/v1/region_notification_endpoints_client.ts @@ -482,7 +482,9 @@ export class RegionNotificationEndpointsClient { region: request.region ?? '', notification_endpoint: request.notificationEndpoint ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class RegionNotificationEndpointsClient { region: request.region ?? '', notification_endpoint: request.notificationEndpoint ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -750,7 +754,9 @@ export class RegionNotificationEndpointsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class RegionNotificationEndpointsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionNotificationEndpointsRequest, @@ -966,7 +974,9 @@ export class RegionNotificationEndpointsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1022,7 +1032,9 @@ export class RegionNotificationEndpointsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_operations_client.ts b/packages/google-cloud-compute/src/v1/region_operations_client.ts index c581c6b3ffd..b7f583df867 100644 --- a/packages/google-cloud-compute/src/v1/region_operations_client.ts +++ b/packages/google-cloud-compute/src/v1/region_operations_client.ts @@ -467,7 +467,9 @@ export class RegionOperationsClient { region: request.region ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -592,7 +594,9 @@ export class RegionOperationsClient { region: request.region ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -714,7 +718,9 @@ export class RegionOperationsClient { region: request.region ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('wait request %j', request); const wrappedCallback: | Callback< @@ -842,7 +848,9 @@ export class RegionOperationsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionOperationsRequest, @@ -914,7 +922,9 @@ export class RegionOperationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -970,7 +980,9 @@ export class RegionOperationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_security_policies_client.ts b/packages/google-cloud-compute/src/v1/region_security_policies_client.ts index dc67af1d876..0691c681f81 100644 --- a/packages/google-cloud-compute/src/v1/region_security_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/region_security_policies_client.ts @@ -489,7 +489,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addRule request %j', request); const wrappedCallback: | Callback< @@ -627,7 +629,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -764,7 +768,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -897,7 +903,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRule request %j', request); const wrappedCallback: | Callback< @@ -1030,7 +1038,9 @@ export class RegionSecurityPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1172,7 +1182,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1316,7 +1328,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchRule request %j', request); const wrappedCallback: | Callback< @@ -1454,7 +1468,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeRule request %j', request); const wrappedCallback: | Callback< @@ -1594,7 +1610,9 @@ export class RegionSecurityPoliciesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1728,7 +1746,9 @@ export class RegionSecurityPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionSecurityPoliciesRequest, @@ -1800,7 +1820,9 @@ export class RegionSecurityPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1856,7 +1878,9 @@ export class RegionSecurityPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_ssl_certificates_client.ts b/packages/google-cloud-compute/src/v1/region_ssl_certificates_client.ts index 395af0217dd..17bef1d8337 100644 --- a/packages/google-cloud-compute/src/v1/region_ssl_certificates_client.ts +++ b/packages/google-cloud-compute/src/v1/region_ssl_certificates_client.ts @@ -481,7 +481,9 @@ export class RegionSslCertificatesClient { region: request.region ?? '', ssl_certificate: request.sslCertificate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class RegionSslCertificatesClient { region: request.region ?? '', ssl_certificate: request.sslCertificate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -749,7 +753,9 @@ export class RegionSslCertificatesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -883,7 +889,9 @@ export class RegionSslCertificatesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionSslCertificatesRequest, @@ -955,7 +963,9 @@ export class RegionSslCertificatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1011,7 +1021,9 @@ export class RegionSslCertificatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_ssl_policies_client.ts b/packages/google-cloud-compute/src/v1/region_ssl_policies_client.ts index 90c1106fd39..46786faee22 100644 --- a/packages/google-cloud-compute/src/v1/region_ssl_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/region_ssl_policies_client.ts @@ -482,7 +482,9 @@ export class RegionSslPoliciesClient { region: request.region ?? '', ssl_policy: request.sslPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -613,7 +615,9 @@ export class RegionSslPoliciesClient { region: request.region ?? '', ssl_policy: request.sslPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -741,7 +745,9 @@ export class RegionSslPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -885,7 +891,9 @@ export class RegionSslPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAvailableFeatures request %j', request); const wrappedCallback: | Callback< @@ -1019,7 +1027,9 @@ export class RegionSslPoliciesClient { region: request.region ?? '', ssl_policy: request.sslPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1153,7 +1163,9 @@ export class RegionSslPoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionSslPoliciesRequest, @@ -1225,7 +1237,9 @@ export class RegionSslPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1281,7 +1295,9 @@ export class RegionSslPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_target_http_proxies_client.ts b/packages/google-cloud-compute/src/v1/region_target_http_proxies_client.ts index 9c11f600e6f..aebb01d50fe 100644 --- a/packages/google-cloud-compute/src/v1/region_target_http_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/region_target_http_proxies_client.ts @@ -482,7 +482,9 @@ export class RegionTargetHttpProxiesClient { region: request.region ?? '', target_http_proxy: request.targetHttpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class RegionTargetHttpProxiesClient { region: request.region ?? '', target_http_proxy: request.targetHttpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -750,7 +754,9 @@ export class RegionTargetHttpProxiesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -890,7 +896,9 @@ export class RegionTargetHttpProxiesClient { region: request.region ?? '', target_http_proxy: request.targetHttpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setUrlMap request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1034,9 @@ export class RegionTargetHttpProxiesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionTargetHttpProxiesRequest, @@ -1100,7 +1110,9 @@ export class RegionTargetHttpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1156,7 +1168,9 @@ export class RegionTargetHttpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_target_https_proxies_client.ts b/packages/google-cloud-compute/src/v1/region_target_https_proxies_client.ts index b1cc98e937b..4984d10aa76 100644 --- a/packages/google-cloud-compute/src/v1/region_target_https_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/region_target_https_proxies_client.ts @@ -485,7 +485,9 @@ export class RegionTargetHttpsProxiesClient { region: request.region ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -622,7 +624,9 @@ export class RegionTargetHttpsProxiesClient { region: request.region ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -753,7 +757,9 @@ export class RegionTargetHttpsProxiesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -893,7 +899,9 @@ export class RegionTargetHttpsProxiesClient { region: request.region ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1033,7 +1041,9 @@ export class RegionTargetHttpsProxiesClient { region: request.region ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSslCertificates request %j', request); const wrappedCallback: | Callback< @@ -1173,7 +1183,9 @@ export class RegionTargetHttpsProxiesClient { region: request.region ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setUrlMap request %j', request); const wrappedCallback: | Callback< @@ -1309,7 +1321,9 @@ export class RegionTargetHttpsProxiesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionTargetHttpsProxiesRequest, @@ -1383,7 +1397,9 @@ export class RegionTargetHttpsProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1439,7 +1455,9 @@ export class RegionTargetHttpsProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_target_tcp_proxies_client.ts b/packages/google-cloud-compute/src/v1/region_target_tcp_proxies_client.ts index 41363e90e59..d804d979fac 100644 --- a/packages/google-cloud-compute/src/v1/region_target_tcp_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/region_target_tcp_proxies_client.ts @@ -481,7 +481,9 @@ export class RegionTargetTcpProxiesClient { region: request.region ?? '', target_tcp_proxy: request.targetTcpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class RegionTargetTcpProxiesClient { region: request.region ?? '', target_tcp_proxy: request.targetTcpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -749,7 +753,9 @@ export class RegionTargetTcpProxiesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -883,7 +889,9 @@ export class RegionTargetTcpProxiesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionTargetTcpProxiesRequest, @@ -955,7 +963,9 @@ export class RegionTargetTcpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1011,7 +1021,9 @@ export class RegionTargetTcpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_url_maps_client.ts b/packages/google-cloud-compute/src/v1/region_url_maps_client.ts index 3a1f5da6516..9a9b25afe4f 100644 --- a/packages/google-cloud-compute/src/v1/region_url_maps_client.ts +++ b/packages/google-cloud-compute/src/v1/region_url_maps_client.ts @@ -483,7 +483,9 @@ export class RegionUrlMapsClient { region: request.region ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -608,7 +610,9 @@ export class RegionUrlMapsClient { region: request.region ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -736,7 +740,9 @@ export class RegionUrlMapsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -876,7 +882,9 @@ export class RegionUrlMapsClient { region: request.region ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1016,7 +1024,9 @@ export class RegionUrlMapsClient { region: request.region ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1149,7 +1159,9 @@ export class RegionUrlMapsClient { region: request.region ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validate request %j', request); const wrappedCallback: | Callback< @@ -1277,7 +1289,9 @@ export class RegionUrlMapsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionUrlMapsRequest, @@ -1349,7 +1363,9 @@ export class RegionUrlMapsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1405,7 +1421,9 @@ export class RegionUrlMapsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/region_zones_client.ts b/packages/google-cloud-compute/src/v1/region_zones_client.ts index 9f6c8ef811f..a683687d17b 100644 --- a/packages/google-cloud-compute/src/v1/region_zones_client.ts +++ b/packages/google-cloud-compute/src/v1/region_zones_client.ts @@ -471,7 +471,9 @@ export class RegionZonesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionZonesRequest, @@ -543,7 +545,9 @@ export class RegionZonesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -599,7 +603,9 @@ export class RegionZonesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/regions_client.ts b/packages/google-cloud-compute/src/v1/regions_client.ts index fb8ca4de51b..46ab9ff3085 100644 --- a/packages/google-cloud-compute/src/v1/regions_client.ts +++ b/packages/google-cloud-compute/src/v1/regions_client.ts @@ -457,7 +457,9 @@ export class RegionsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -577,7 +579,9 @@ export class RegionsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRegionsRequest, @@ -646,7 +650,9 @@ export class RegionsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -699,7 +705,9 @@ export class RegionsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/reservations_client.ts b/packages/google-cloud-compute/src/v1/reservations_client.ts index ab23688fa21..ceae78a436d 100644 --- a/packages/google-cloud-compute/src/v1/reservations_client.ts +++ b/packages/google-cloud-compute/src/v1/reservations_client.ts @@ -491,7 +491,9 @@ export class ReservationsClient { zone: request.zone ?? '', reservation: request.reservation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -616,7 +618,9 @@ export class ReservationsClient { zone: request.zone ?? '', reservation: request.reservation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -746,7 +750,9 @@ export class ReservationsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -877,7 +883,9 @@ export class ReservationsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1017,7 +1025,9 @@ export class ReservationsClient { zone: request.zone ?? '', reservation: request.reservation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resize request %j', request); const wrappedCallback: | Callback< @@ -1156,7 +1166,9 @@ export class ReservationsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1289,7 +1301,9 @@ export class ReservationsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1426,7 +1440,9 @@ export class ReservationsClient { zone: request.zone ?? '', reservation: request.reservation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1515,7 +1531,9 @@ export class ReservationsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1620,7 +1638,9 @@ export class ReservationsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListReservationsRequest, @@ -1692,7 +1712,9 @@ export class ReservationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1748,7 +1770,9 @@ export class ReservationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/resource_policies_client.ts b/packages/google-cloud-compute/src/v1/resource_policies_client.ts index 5edef277eb6..d362629d648 100644 --- a/packages/google-cloud-compute/src/v1/resource_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/resource_policies_client.ts @@ -490,7 +490,9 @@ export class ResourcePoliciesClient { region: request.region ?? '', resource_policy: request.resourcePolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -621,7 +623,9 @@ export class ResourcePoliciesClient { region: request.region ?? '', resource_policy: request.resourcePolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class ResourcePoliciesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -882,7 +888,9 @@ export class ResourcePoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1032,9 @@ export class ResourcePoliciesClient { region: request.region ?? '', resource_policy: request.resourcePolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1163,7 +1173,9 @@ export class ResourcePoliciesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1296,7 +1308,9 @@ export class ResourcePoliciesClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1379,7 +1393,9 @@ export class ResourcePoliciesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1484,7 +1500,9 @@ export class ResourcePoliciesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListResourcePoliciesRequest, @@ -1556,7 +1574,9 @@ export class ResourcePoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1612,7 +1632,9 @@ export class ResourcePoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/routers_client.ts b/packages/google-cloud-compute/src/v1/routers_client.ts index 808d00244cb..ec24c024608 100644 --- a/packages/google-cloud-compute/src/v1/routers_client.ts +++ b/packages/google-cloud-compute/src/v1/routers_client.ts @@ -507,7 +507,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -647,7 +649,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRoutePolicy request %j', request); const wrappedCallback: | Callback< @@ -770,7 +774,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNatIpInfo request %j', request); const wrappedCallback: | Callback< @@ -1016,7 +1024,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRoutePolicy request %j', request); const wrappedCallback: | Callback< @@ -1141,7 +1151,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRouterStatus request %j', request); const wrappedCallback: | Callback< @@ -1266,7 +1278,9 @@ export class RoutersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1398,7 +1412,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1536,7 +1552,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchRoutePolicy request %j', request); const wrappedCallback: | Callback< @@ -1663,7 +1681,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('preview request %j', request); const wrappedCallback: | Callback< @@ -1788,7 +1808,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1928,7 +1950,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRoutePolicy request %j', request); const wrappedCallback: | Callback< @@ -2017,7 +2041,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -2135,7 +2161,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IGetNatMappingInfoRoutersRequest, @@ -2214,7 +2242,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['getNatMappingInfo']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNatMappingInfo stream %j', request); return this.descriptors.page.getNatMappingInfo.createStream( this.innerApiCalls.getNatMappingInfo as GaxCall, @@ -2275,7 +2305,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['getNatMappingInfo']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNatMappingInfo iterate %j', request); return this.descriptors.page.getNatMappingInfo.asyncIterate( this.innerApiCalls['getNatMappingInfo'] as GaxCall, @@ -2378,7 +2410,9 @@ export class RoutersClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRoutersRequest, @@ -2450,7 +2484,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2506,7 +2542,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -2626,7 +2664,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListBgpRoutesRoutersRequest, @@ -2715,7 +2755,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['listBgpRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBgpRoutes stream %j', request); return this.descriptors.page.listBgpRoutes.createStream( this.innerApiCalls.listBgpRoutes as GaxCall, @@ -2786,7 +2828,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['listBgpRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBgpRoutes iterate %j', request); return this.descriptors.page.listBgpRoutes.asyncIterate( this.innerApiCalls['listBgpRoutes'] as GaxCall, @@ -2900,7 +2944,9 @@ export class RoutersClient { region: request.region ?? '', router: request.router ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRoutePoliciesRoutersRequest, @@ -2977,7 +3023,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['listRoutePolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutePolicies stream %j', request); return this.descriptors.page.listRoutePolicies.createStream( this.innerApiCalls.listRoutePolicies as GaxCall, @@ -3036,7 +3084,9 @@ export class RoutersClient { }); const defaultCallSettings = this._defaults['listRoutePolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutePolicies iterate %j', request); return this.descriptors.page.listRoutePolicies.asyncIterate( this.innerApiCalls['listRoutePolicies'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/routes_client.ts b/packages/google-cloud-compute/src/v1/routes_client.ts index a4efc18ce25..0f4c61cea1a 100644 --- a/packages/google-cloud-compute/src/v1/routes_client.ts +++ b/packages/google-cloud-compute/src/v1/routes_client.ts @@ -464,7 +464,9 @@ export class RoutesClient { project: request.project ?? '', route: request.route ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -582,7 +584,9 @@ export class RoutesClient { project: request.project ?? '', route: request.route ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -697,7 +701,9 @@ export class RoutesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -826,7 +832,9 @@ export class RoutesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListRoutesRequest, @@ -895,7 +903,9 @@ export class RoutesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -948,7 +958,9 @@ export class RoutesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/security_policies_client.ts b/packages/google-cloud-compute/src/v1/security_policies_client.ts index 5324c810208..21db8825924 100644 --- a/packages/google-cloud-compute/src/v1/security_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/security_policies_client.ts @@ -492,7 +492,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addRule request %j', request); const wrappedCallback: | Callback< @@ -627,7 +629,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -755,7 +759,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -876,7 +882,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRule request %j', request); const wrappedCallback: | Callback< @@ -1006,7 +1014,9 @@ export class SecurityPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1147,7 +1157,9 @@ export class SecurityPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPreconfiguredExpressionSets request %j', request); const wrappedCallback: | Callback< @@ -1286,7 +1298,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1427,7 +1441,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patchRule request %j', request); const wrappedCallback: | Callback< @@ -1562,7 +1578,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', security_policy: request.securityPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeRule request %j', request); const wrappedCallback: | Callback< @@ -1697,7 +1715,9 @@ export class SecurityPoliciesClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1786,7 +1806,9 @@ export class SecurityPoliciesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1888,7 +1910,9 @@ export class SecurityPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListSecurityPoliciesRequest, @@ -1957,7 +1981,9 @@ export class SecurityPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2010,7 +2036,9 @@ export class SecurityPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/service_attachments_client.ts b/packages/google-cloud-compute/src/v1/service_attachments_client.ts index 49ac1c39470..76c8dc71665 100644 --- a/packages/google-cloud-compute/src/v1/service_attachments_client.ts +++ b/packages/google-cloud-compute/src/v1/service_attachments_client.ts @@ -490,7 +490,9 @@ export class ServiceAttachmentsClient { region: request.region ?? '', service_attachment: request.serviceAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -621,7 +623,9 @@ export class ServiceAttachmentsClient { region: request.region ?? '', service_attachment: request.serviceAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -754,7 +758,9 @@ export class ServiceAttachmentsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -885,7 +891,9 @@ export class ServiceAttachmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1025,7 +1033,9 @@ export class ServiceAttachmentsClient { region: request.region ?? '', service_attachment: request.serviceAttachment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1164,7 +1174,9 @@ export class ServiceAttachmentsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1297,7 +1309,9 @@ export class ServiceAttachmentsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1380,7 +1394,9 @@ export class ServiceAttachmentsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1487,7 +1503,9 @@ export class ServiceAttachmentsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListServiceAttachmentsRequest, @@ -1561,7 +1579,9 @@ export class ServiceAttachmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1617,7 +1637,9 @@ export class ServiceAttachmentsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/snapshot_settings_service_client.ts b/packages/google-cloud-compute/src/v1/snapshot_settings_service_client.ts index 3b7108a59aa..83f6944f141 100644 --- a/packages/google-cloud-compute/src/v1/snapshot_settings_service_client.ts +++ b/packages/google-cloud-compute/src/v1/snapshot_settings_service_client.ts @@ -450,7 +450,9 @@ export class SnapshotSettingsServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -577,7 +579,9 @@ export class SnapshotSettingsServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-compute/src/v1/snapshots_client.ts b/packages/google-cloud-compute/src/v1/snapshots_client.ts index e309c0c9025..a833ed1fb29 100644 --- a/packages/google-cloud-compute/src/v1/snapshots_client.ts +++ b/packages/google-cloud-compute/src/v1/snapshots_client.ts @@ -475,7 +475,9 @@ export class SnapshotsClient { project: request.project ?? '', snapshot: request.snapshot ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -595,7 +597,9 @@ export class SnapshotsClient { project: request.project ?? '', snapshot: request.snapshot ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -714,7 +718,9 @@ export class SnapshotsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -836,7 +842,9 @@ export class SnapshotsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -966,7 +974,9 @@ export class SnapshotsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1095,7 +1105,9 @@ export class SnapshotsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1231,7 +1243,9 @@ export class SnapshotsClient { project: request.project ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1356,7 +1370,9 @@ export class SnapshotsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListSnapshotsRequest, @@ -1425,7 +1441,9 @@ export class SnapshotsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1478,7 +1496,9 @@ export class SnapshotsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/ssl_certificates_client.ts b/packages/google-cloud-compute/src/v1/ssl_certificates_client.ts index 51989b5f624..c08b434b3b5 100644 --- a/packages/google-cloud-compute/src/v1/ssl_certificates_client.ts +++ b/packages/google-cloud-compute/src/v1/ssl_certificates_client.ts @@ -483,7 +483,9 @@ export class SslCertificatesClient { project: request.project ?? '', ssl_certificate: request.sslCertificate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -611,7 +613,9 @@ export class SslCertificatesClient { project: request.project ?? '', ssl_certificate: request.sslCertificate ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -736,7 +740,9 @@ export class SslCertificatesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -825,7 +831,9 @@ export class SslCertificatesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -927,7 +935,9 @@ export class SslCertificatesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListSslCertificatesRequest, @@ -996,7 +1006,9 @@ export class SslCertificatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1049,7 +1061,9 @@ export class SslCertificatesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/ssl_policies_client.ts b/packages/google-cloud-compute/src/v1/ssl_policies_client.ts index 26b1d591d3f..ff50ce8b0d4 100644 --- a/packages/google-cloud-compute/src/v1/ssl_policies_client.ts +++ b/packages/google-cloud-compute/src/v1/ssl_policies_client.ts @@ -479,7 +479,9 @@ export class SslPoliciesClient { project: request.project ?? '', ssl_policy: request.sslPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -601,7 +603,9 @@ export class SslPoliciesClient { project: request.project ?? '', ssl_policy: request.sslPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -720,7 +724,9 @@ export class SslPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -861,7 +867,9 @@ export class SslPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAvailableFeatures request %j', request); const wrappedCallback: | Callback< @@ -986,7 +994,9 @@ export class SslPoliciesClient { project: request.project ?? '', ssl_policy: request.sslPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1075,7 +1085,9 @@ export class SslPoliciesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1177,7 +1189,9 @@ export class SslPoliciesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListSslPoliciesRequest, @@ -1246,7 +1260,9 @@ export class SslPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1299,7 +1315,9 @@ export class SslPoliciesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/storage_pool_types_client.ts b/packages/google-cloud-compute/src/v1/storage_pool_types_client.ts index 7f54df5e9d8..5d5afa06954 100644 --- a/packages/google-cloud-compute/src/v1/storage_pool_types_client.ts +++ b/packages/google-cloud-compute/src/v1/storage_pool_types_client.ts @@ -473,7 +473,9 @@ export class StoragePoolTypesClient { zone: request.zone ?? '', storage_pool_type: request.storagePoolType ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -553,7 +555,9 @@ export class StoragePoolTypesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -660,7 +664,9 @@ export class StoragePoolTypesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListStoragePoolTypesRequest, @@ -734,7 +740,9 @@ export class StoragePoolTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -790,7 +798,9 @@ export class StoragePoolTypesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/storage_pools_client.ts b/packages/google-cloud-compute/src/v1/storage_pools_client.ts index 47e2172f9c7..18a20b3fb4f 100644 --- a/packages/google-cloud-compute/src/v1/storage_pools_client.ts +++ b/packages/google-cloud-compute/src/v1/storage_pools_client.ts @@ -496,7 +496,9 @@ export class StoragePoolsClient { zone: request.zone ?? '', storage_pool: request.storagePool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -621,7 +623,9 @@ export class StoragePoolsClient { zone: request.zone ?? '', storage_pool: request.storagePool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class StoragePoolsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -882,7 +888,9 @@ export class StoragePoolsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1021,7 +1029,9 @@ export class StoragePoolsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1154,7 +1164,9 @@ export class StoragePoolsClient { zone: request.zone ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1290,7 +1302,9 @@ export class StoragePoolsClient { zone: request.zone ?? '', storage_pool: request.storagePool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1379,7 +1393,9 @@ export class StoragePoolsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1484,7 +1500,9 @@ export class StoragePoolsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListStoragePoolsRequest, @@ -1556,7 +1574,9 @@ export class StoragePoolsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1612,7 +1632,9 @@ export class StoragePoolsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1720,7 +1742,9 @@ export class StoragePoolsClient { zone: request.zone ?? '', storage_pool: request.storagePool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListDisksStoragePoolsRequest, @@ -1797,7 +1821,9 @@ export class StoragePoolsClient { }); const defaultCallSettings = this._defaults['listDisks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDisks stream %j', request); return this.descriptors.page.listDisks.createStream( this.innerApiCalls.listDisks as GaxCall, @@ -1856,7 +1882,9 @@ export class StoragePoolsClient { }); const defaultCallSettings = this._defaults['listDisks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDisks iterate %j', request); return this.descriptors.page.listDisks.asyncIterate( this.innerApiCalls['listDisks'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/subnetworks_client.ts b/packages/google-cloud-compute/src/v1/subnetworks_client.ts index 964a6f96a46..8422cee9736 100644 --- a/packages/google-cloud-compute/src/v1/subnetworks_client.ts +++ b/packages/google-cloud-compute/src/v1/subnetworks_client.ts @@ -498,7 +498,9 @@ export class SubnetworksClient { region: request.region ?? '', subnetwork: request.subnetwork ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -638,7 +640,9 @@ export class SubnetworksClient { region: request.region ?? '', subnetwork: request.subnetwork ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('expandIpCidrRange request %j', request); const wrappedCallback: | Callback< @@ -763,7 +767,9 @@ export class SubnetworksClient { region: request.region ?? '', subnetwork: request.subnetwork ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -887,7 +893,9 @@ export class SubnetworksClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1018,7 +1026,9 @@ export class SubnetworksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1154,7 +1164,9 @@ export class SubnetworksClient { region: request.region ?? '', subnetwork: request.subnetwork ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1287,7 +1299,9 @@ export class SubnetworksClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1421,7 +1435,9 @@ export class SubnetworksClient { region: request.region ?? '', subnetwork: request.subnetwork ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setPrivateIpGoogleAccess request %j', request); const wrappedCallback: | Callback< @@ -1560,7 +1576,9 @@ export class SubnetworksClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1643,7 +1661,9 @@ export class SubnetworksClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1748,7 +1768,9 @@ export class SubnetworksClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListSubnetworksRequest, @@ -1820,7 +1842,9 @@ export class SubnetworksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1876,7 +1900,9 @@ export class SubnetworksClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, @@ -1984,7 +2010,9 @@ export class SubnetworksClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListUsableSubnetworksRequest, @@ -2055,7 +2083,9 @@ export class SubnetworksClient { }); const defaultCallSettings = this._defaults['listUsable']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsable stream %j', request); return this.descriptors.page.listUsable.createStream( this.innerApiCalls.listUsable as GaxCall, @@ -2108,7 +2138,9 @@ export class SubnetworksClient { }); const defaultCallSettings = this._defaults['listUsable']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsable iterate %j', request); return this.descriptors.page.listUsable.asyncIterate( this.innerApiCalls['listUsable'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_grpc_proxies_client.ts b/packages/google-cloud-compute/src/v1/target_grpc_proxies_client.ts index d909c856cdf..3f73d757183 100644 --- a/packages/google-cloud-compute/src/v1/target_grpc_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/target_grpc_proxies_client.ts @@ -478,7 +478,9 @@ export class TargetGrpcProxiesClient { project: request.project ?? '', target_grpc_proxy: request.targetGrpcProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -606,7 +608,9 @@ export class TargetGrpcProxiesClient { project: request.project ?? '', target_grpc_proxy: request.targetGrpcProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -731,7 +735,9 @@ export class TargetGrpcProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -868,7 +874,9 @@ export class TargetGrpcProxiesClient { project: request.project ?? '', target_grpc_proxy: request.targetGrpcProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1009,9 @@ export class TargetGrpcProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetGrpcProxiesRequest, @@ -1072,7 +1082,9 @@ export class TargetGrpcProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1125,7 +1137,9 @@ export class TargetGrpcProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_http_proxies_client.ts b/packages/google-cloud-compute/src/v1/target_http_proxies_client.ts index 8e0a11af685..39c94f932fe 100644 --- a/packages/google-cloud-compute/src/v1/target_http_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/target_http_proxies_client.ts @@ -485,7 +485,9 @@ export class TargetHttpProxiesClient { project: request.project ?? '', target_http_proxy: request.targetHttpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -613,7 +615,9 @@ export class TargetHttpProxiesClient { project: request.project ?? '', target_http_proxy: request.targetHttpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -738,7 +742,9 @@ export class TargetHttpProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -875,7 +881,9 @@ export class TargetHttpProxiesClient { project: request.project ?? '', target_http_proxy: request.targetHttpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1012,7 +1020,9 @@ export class TargetHttpProxiesClient { project: request.project ?? '', target_http_proxy: request.targetHttpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setUrlMap request %j', request); const wrappedCallback: | Callback< @@ -1101,7 +1111,9 @@ export class TargetHttpProxiesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1205,7 +1217,9 @@ export class TargetHttpProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetHttpProxiesRequest, @@ -1276,7 +1290,9 @@ export class TargetHttpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1329,7 +1345,9 @@ export class TargetHttpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_https_proxies_client.ts b/packages/google-cloud-compute/src/v1/target_https_proxies_client.ts index b4efcbf23ba..57c0e63042a 100644 --- a/packages/google-cloud-compute/src/v1/target_https_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/target_https_proxies_client.ts @@ -489,7 +489,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -617,7 +619,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -745,7 +749,9 @@ export class TargetHttpsProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -882,7 +888,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1019,7 +1027,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setCertificateMap request %j', request); const wrappedCallback: | Callback< @@ -1156,7 +1166,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setQuicOverride request %j', request); const wrappedCallback: | Callback< @@ -1293,7 +1305,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSslCertificates request %j', request); const wrappedCallback: | Callback< @@ -1430,7 +1444,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSslPolicy request %j', request); const wrappedCallback: | Callback< @@ -1567,7 +1583,9 @@ export class TargetHttpsProxiesClient { project: request.project ?? '', target_https_proxy: request.targetHttpsProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setUrlMap request %j', request); const wrappedCallback: | Callback< @@ -1656,7 +1674,9 @@ export class TargetHttpsProxiesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1760,7 +1780,9 @@ export class TargetHttpsProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetHttpsProxiesRequest, @@ -1831,7 +1853,9 @@ export class TargetHttpsProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1884,7 +1908,9 @@ export class TargetHttpsProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_instances_client.ts b/packages/google-cloud-compute/src/v1/target_instances_client.ts index 942a4756568..55ae0132ace 100644 --- a/packages/google-cloud-compute/src/v1/target_instances_client.ts +++ b/packages/google-cloud-compute/src/v1/target_instances_client.ts @@ -487,7 +487,9 @@ export class TargetInstancesClient { zone: request.zone ?? '', target_instance: request.targetInstance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class TargetInstancesClient { zone: request.zone ?? '', target_instance: request.targetInstance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -746,7 +750,9 @@ export class TargetInstancesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -886,7 +892,9 @@ export class TargetInstancesClient { zone: request.zone ?? '', target_instance: request.targetInstance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSecurityPolicy request %j', request); const wrappedCallback: | Callback< @@ -975,7 +983,9 @@ export class TargetInstancesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1080,7 +1090,9 @@ export class TargetInstancesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetInstancesRequest, @@ -1152,7 +1164,9 @@ export class TargetInstancesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1208,7 +1222,9 @@ export class TargetInstancesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_pools_client.ts b/packages/google-cloud-compute/src/v1/target_pools_client.ts index 3a251fc2491..1b00828d254 100644 --- a/packages/google-cloud-compute/src/v1/target_pools_client.ts +++ b/packages/google-cloud-compute/src/v1/target_pools_client.ts @@ -495,7 +495,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addHealthCheck request %j', request); const wrappedCallback: | Callback< @@ -635,7 +637,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addInstance request %j', request); const wrappedCallback: | Callback< @@ -773,7 +777,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -898,7 +904,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -1022,7 +1030,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHealth request %j', request); const wrappedCallback: | Callback< @@ -1153,7 +1163,9 @@ export class TargetPoolsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1293,7 +1305,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeHealthCheck request %j', request); const wrappedCallback: | Callback< @@ -1433,7 +1447,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeInstance request %j', request); const wrappedCallback: | Callback< @@ -1575,7 +1591,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setBackup request %j', request); const wrappedCallback: | Callback< @@ -1715,7 +1733,9 @@ export class TargetPoolsClient { region: request.region ?? '', target_pool: request.targetPool ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSecurityPolicy request %j', request); const wrappedCallback: | Callback< @@ -1804,7 +1824,9 @@ export class TargetPoolsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1909,7 +1931,9 @@ export class TargetPoolsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetPoolsRequest, @@ -1981,7 +2005,9 @@ export class TargetPoolsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -2037,7 +2063,9 @@ export class TargetPoolsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_ssl_proxies_client.ts b/packages/google-cloud-compute/src/v1/target_ssl_proxies_client.ts index 2d3f710e13d..0e8dc18584f 100644 --- a/packages/google-cloud-compute/src/v1/target_ssl_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/target_ssl_proxies_client.ts @@ -482,7 +482,9 @@ export class TargetSslProxiesClient { project: request.project ?? '', target_ssl_proxy: request.targetSslProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -610,7 +612,9 @@ export class TargetSslProxiesClient { project: request.project ?? '', target_ssl_proxy: request.targetSslProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -735,7 +739,9 @@ export class TargetSslProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -872,7 +878,9 @@ export class TargetSslProxiesClient { project: request.project ?? '', target_ssl_proxy: request.targetSslProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setBackendService request %j', request); const wrappedCallback: | Callback< @@ -1009,7 +1017,9 @@ export class TargetSslProxiesClient { project: request.project ?? '', target_ssl_proxy: request.targetSslProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setCertificateMap request %j', request); const wrappedCallback: | Callback< @@ -1146,7 +1156,9 @@ export class TargetSslProxiesClient { project: request.project ?? '', target_ssl_proxy: request.targetSslProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setProxyHeader request %j', request); const wrappedCallback: | Callback< @@ -1283,7 +1295,9 @@ export class TargetSslProxiesClient { project: request.project ?? '', target_ssl_proxy: request.targetSslProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSslCertificates request %j', request); const wrappedCallback: | Callback< @@ -1420,7 +1434,9 @@ export class TargetSslProxiesClient { project: request.project ?? '', target_ssl_proxy: request.targetSslProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setSslPolicy request %j', request); const wrappedCallback: | Callback< @@ -1551,7 +1567,9 @@ export class TargetSslProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetSslProxiesRequest, @@ -1620,7 +1638,9 @@ export class TargetSslProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1673,7 +1693,9 @@ export class TargetSslProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_tcp_proxies_client.ts b/packages/google-cloud-compute/src/v1/target_tcp_proxies_client.ts index 82db8207fe6..0b15fbf61cb 100644 --- a/packages/google-cloud-compute/src/v1/target_tcp_proxies_client.ts +++ b/packages/google-cloud-compute/src/v1/target_tcp_proxies_client.ts @@ -485,7 +485,9 @@ export class TargetTcpProxiesClient { project: request.project ?? '', target_tcp_proxy: request.targetTcpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -613,7 +615,9 @@ export class TargetTcpProxiesClient { project: request.project ?? '', target_tcp_proxy: request.targetTcpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -738,7 +742,9 @@ export class TargetTcpProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -875,7 +881,9 @@ export class TargetTcpProxiesClient { project: request.project ?? '', target_tcp_proxy: request.targetTcpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setBackendService request %j', request); const wrappedCallback: | Callback< @@ -1012,7 +1020,9 @@ export class TargetTcpProxiesClient { project: request.project ?? '', target_tcp_proxy: request.targetTcpProxy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setProxyHeader request %j', request); const wrappedCallback: | Callback< @@ -1101,7 +1111,9 @@ export class TargetTcpProxiesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1203,7 +1215,9 @@ export class TargetTcpProxiesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetTcpProxiesRequest, @@ -1272,7 +1286,9 @@ export class TargetTcpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1325,7 +1341,9 @@ export class TargetTcpProxiesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/target_vpn_gateways_client.ts b/packages/google-cloud-compute/src/v1/target_vpn_gateways_client.ts index 4fb96604260..6d3a943c83e 100644 --- a/packages/google-cloud-compute/src/v1/target_vpn_gateways_client.ts +++ b/packages/google-cloud-compute/src/v1/target_vpn_gateways_client.ts @@ -487,7 +487,9 @@ export class TargetVpnGatewaysClient { region: request.region ?? '', target_vpn_gateway: request.targetVpnGateway ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -618,7 +620,9 @@ export class TargetVpnGatewaysClient { region: request.region ?? '', target_vpn_gateway: request.targetVpnGateway ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -749,7 +753,9 @@ export class TargetVpnGatewaysClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -889,7 +895,9 @@ export class TargetVpnGatewaysClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -978,7 +986,9 @@ export class TargetVpnGatewaysClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1085,7 +1095,9 @@ export class TargetVpnGatewaysClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListTargetVpnGatewaysRequest, @@ -1159,7 +1171,9 @@ export class TargetVpnGatewaysClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1215,7 +1229,9 @@ export class TargetVpnGatewaysClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/url_maps_client.ts b/packages/google-cloud-compute/src/v1/url_maps_client.ts index ec285be7840..28c0e95ec6f 100644 --- a/packages/google-cloud-compute/src/v1/url_maps_client.ts +++ b/packages/google-cloud-compute/src/v1/url_maps_client.ts @@ -481,7 +481,9 @@ export class UrlMapsClient { project: request.project ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -601,7 +603,9 @@ export class UrlMapsClient { project: request.project ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -718,7 +722,9 @@ export class UrlMapsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -855,7 +861,9 @@ export class UrlMapsClient { project: request.project ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('invalidateCache request %j', request); const wrappedCallback: | Callback< @@ -984,7 +992,9 @@ export class UrlMapsClient { project: request.project ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('patch request %j', request); const wrappedCallback: | Callback< @@ -1113,7 +1123,9 @@ export class UrlMapsClient { project: request.project ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('update request %j', request); const wrappedCallback: | Callback< @@ -1237,7 +1249,9 @@ export class UrlMapsClient { project: request.project ?? '', url_map: request.urlMap ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validate request %j', request); const wrappedCallback: | Callback< @@ -1317,7 +1331,9 @@ export class UrlMapsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1419,7 +1435,9 @@ export class UrlMapsClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListUrlMapsRequest, @@ -1488,7 +1506,9 @@ export class UrlMapsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1541,7 +1561,9 @@ export class UrlMapsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/vpn_gateways_client.ts b/packages/google-cloud-compute/src/v1/vpn_gateways_client.ts index 11b6c0b8b5c..dbd65e9f9c4 100644 --- a/packages/google-cloud-compute/src/v1/vpn_gateways_client.ts +++ b/packages/google-cloud-compute/src/v1/vpn_gateways_client.ts @@ -489,7 +489,9 @@ export class VpnGatewaysClient { region: request.region ?? '', vpn_gateway: request.vpnGateway ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class VpnGatewaysClient { region: request.region ?? '', vpn_gateway: request.vpnGateway ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -736,7 +740,9 @@ export class VpnGatewaysClient { region: request.region ?? '', vpn_gateway: request.vpnGateway ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStatus request %j', request); const wrappedCallback: | Callback< @@ -867,7 +873,9 @@ export class VpnGatewaysClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -1007,7 +1015,9 @@ export class VpnGatewaysClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -1146,7 +1156,9 @@ export class VpnGatewaysClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1229,7 +1241,9 @@ export class VpnGatewaysClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1334,7 +1348,9 @@ export class VpnGatewaysClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListVpnGatewaysRequest, @@ -1406,7 +1422,9 @@ export class VpnGatewaysClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1462,7 +1480,9 @@ export class VpnGatewaysClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/vpn_tunnels_client.ts b/packages/google-cloud-compute/src/v1/vpn_tunnels_client.ts index 702f4625dbd..1b4657b16d0 100644 --- a/packages/google-cloud-compute/src/v1/vpn_tunnels_client.ts +++ b/packages/google-cloud-compute/src/v1/vpn_tunnels_client.ts @@ -481,7 +481,9 @@ export class VpnTunnelsClient { region: request.region ?? '', vpn_tunnel: request.vpnTunnel ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -606,7 +608,9 @@ export class VpnTunnelsClient { region: request.region ?? '', vpn_tunnel: request.vpnTunnel ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -728,7 +732,9 @@ export class VpnTunnelsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -868,7 +874,9 @@ export class VpnTunnelsClient { region: request.region ?? '', resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -957,7 +965,9 @@ export class VpnTunnelsClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -1062,7 +1072,9 @@ export class VpnTunnelsClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListVpnTunnelsRequest, @@ -1134,7 +1146,9 @@ export class VpnTunnelsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -1190,7 +1204,9 @@ export class VpnTunnelsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/zone_operations_client.ts b/packages/google-cloud-compute/src/v1/zone_operations_client.ts index 2914c88e32d..bd105409239 100644 --- a/packages/google-cloud-compute/src/v1/zone_operations_client.ts +++ b/packages/google-cloud-compute/src/v1/zone_operations_client.ts @@ -467,7 +467,9 @@ export class ZoneOperationsClient { zone: request.zone ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -592,7 +594,9 @@ export class ZoneOperationsClient { zone: request.zone ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -714,7 +718,9 @@ export class ZoneOperationsClient { zone: request.zone ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('wait request %j', request); const wrappedCallback: | Callback< @@ -839,7 +845,9 @@ export class ZoneOperationsClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListZoneOperationsRequest, @@ -911,7 +919,9 @@ export class ZoneOperationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -967,7 +977,9 @@ export class ZoneOperationsClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1/zones_client.ts b/packages/google-cloud-compute/src/v1/zones_client.ts index fad381ba5ba..ddfe0a0a7c2 100644 --- a/packages/google-cloud-compute/src/v1/zones_client.ts +++ b/packages/google-cloud-compute/src/v1/zones_client.ts @@ -457,7 +457,9 @@ export class ZonesClient { project: request.project ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -577,7 +579,9 @@ export class ZonesClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1.IListZonesRequest, @@ -646,7 +650,9 @@ export class ZonesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -699,7 +705,9 @@ export class ZonesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1small/addresses_client.ts b/packages/google-cloud-compute/src/v1small/addresses_client.ts index 2a62b753a5d..e2ffe021d9b 100644 --- a/packages/google-cloud-compute/src/v1small/addresses_client.ts +++ b/packages/google-cloud-compute/src/v1small/addresses_client.ts @@ -487,7 +487,9 @@ export class AddressesClient { region: request.region ?? '', address: request.address ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('delete request %j', request); const wrappedCallback: | Callback< @@ -628,7 +630,9 @@ export class AddressesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insert request %j', request); const wrappedCallback: | Callback< @@ -723,7 +727,9 @@ export class AddressesClient { }); const defaultCallSettings = this._defaults['aggregatedList']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedList iterate %j', request); return this.descriptors.page.aggregatedList.asyncIterate( this.innerApiCalls['aggregatedList'] as GaxCall, @@ -836,7 +842,9 @@ export class AddressesClient { project: request.project ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.compute.v1small.IListAddressesRequest, @@ -916,7 +924,9 @@ export class AddressesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list stream %j', request); return this.descriptors.page.list.createStream( this.innerApiCalls.list as GaxCall, @@ -980,7 +990,9 @@ export class AddressesClient { }); const defaultCallSettings = this._defaults['list']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('list iterate %j', request); return this.descriptors.page.list.asyncIterate( this.innerApiCalls['list'] as GaxCall, diff --git a/packages/google-cloud-compute/src/v1small/region_operations_client.ts b/packages/google-cloud-compute/src/v1small/region_operations_client.ts index 1e119ecf93e..55db9f89505 100644 --- a/packages/google-cloud-compute/src/v1small/region_operations_client.ts +++ b/packages/google-cloud-compute/src/v1small/region_operations_client.ts @@ -461,7 +461,9 @@ export class RegionOperationsClient { region: request.region ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('get request %j', request); const wrappedCallback: | Callback< @@ -596,7 +598,9 @@ export class RegionOperationsClient { region: request.region ?? '', operation: request.operation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('wait request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-compute/test/gapic_accelerator_types_v1.ts b/packages/google-cloud-compute/test/gapic_accelerator_types_v1.ts index 39c500e5501..e95697a0b8e 100644 --- a/packages/google-cloud-compute/test/gapic_accelerator_types_v1.ts +++ b/packages/google-cloud-compute/test/gapic_accelerator_types_v1.ts @@ -265,7 +265,9 @@ describe('v1.AcceleratorTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.acceleratorTypesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.AcceleratorTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAcceleratorTypeRequest() ); @@ -364,7 +366,7 @@ describe('v1.AcceleratorTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAcceleratorTypeRequest() ); @@ -419,7 +421,7 @@ describe('v1.AcceleratorTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAcceleratorTypeRequest() ); @@ -456,7 +458,7 @@ describe('v1.AcceleratorTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAcceleratorTypeRequest() ); @@ -487,7 +489,7 @@ describe('v1.AcceleratorTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest() ); @@ -547,7 +549,7 @@ describe('v1.AcceleratorTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest() ); @@ -591,7 +593,7 @@ describe('v1.AcceleratorTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAcceleratorTypesRequest() ); @@ -634,7 +636,7 @@ describe('v1.AcceleratorTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAcceleratorTypesRequest() ); @@ -692,7 +694,7 @@ describe('v1.AcceleratorTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAcceleratorTypesRequest() ); @@ -724,7 +726,7 @@ describe('v1.AcceleratorTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAcceleratorTypesRequest() ); @@ -789,7 +791,7 @@ describe('v1.AcceleratorTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAcceleratorTypesRequest() ); @@ -845,7 +847,7 @@ describe('v1.AcceleratorTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAcceleratorTypesRequest() ); @@ -898,7 +900,7 @@ describe('v1.AcceleratorTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAcceleratorTypesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_addresses_v1.ts b/packages/google-cloud-compute/test/gapic_addresses_v1.ts index e09cf23f035..974269af20e 100644 --- a/packages/google-cloud-compute/test/gapic_addresses_v1.ts +++ b/packages/google-cloud-compute/test/gapic_addresses_v1.ts @@ -263,7 +263,9 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.addressesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAddressRequest() ); @@ -363,7 +365,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAddressRequest() ); @@ -420,7 +422,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAddressRequest() ); @@ -458,7 +460,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAddressRequest() ); @@ -489,7 +491,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAddressRequest() ); @@ -529,7 +531,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAddressRequest() ); @@ -584,7 +586,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAddressRequest() ); @@ -621,7 +623,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAddressRequest() ); @@ -652,7 +654,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAddressRequest() ); @@ -688,7 +690,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAddressRequest() ); @@ -740,7 +742,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAddressRequest() ); @@ -773,7 +775,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAddressRequest() ); @@ -799,7 +801,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveAddressRequest() ); @@ -839,7 +841,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveAddressRequest() ); @@ -894,7 +896,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveAddressRequest() ); @@ -931,7 +933,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveAddressRequest() ); @@ -962,7 +964,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsAddressRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsAddressRequest() ); @@ -1060,7 +1062,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsAddressRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsAddressRequest() ); @@ -1129,7 +1131,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListAddressesRequest() ); @@ -1189,7 +1191,7 @@ describe('v1.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListAddressesRequest() ); @@ -1233,7 +1235,7 @@ describe('v1.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAddressesRequest() ); @@ -1270,7 +1272,7 @@ describe('v1.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAddressesRequest() ); @@ -1322,7 +1324,7 @@ describe('v1.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAddressesRequest() ); @@ -1354,7 +1356,7 @@ describe('v1.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAddressesRequest() ); @@ -1413,7 +1415,7 @@ describe('v1.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAddressesRequest() ); @@ -1469,7 +1471,7 @@ describe('v1.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAddressesRequest() ); @@ -1516,7 +1518,7 @@ describe('v1.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAddressesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_addresses_v1small.ts b/packages/google-cloud-compute/test/gapic_addresses_v1small.ts index 08402ad89a4..e94977041f9 100644 --- a/packages/google-cloud-compute/test/gapic_addresses_v1small.ts +++ b/packages/google-cloud-compute/test/gapic_addresses_v1small.ts @@ -263,7 +263,9 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.addressesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.DeleteAddressRequest() ); @@ -363,7 +365,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.DeleteAddressRequest() ); @@ -420,7 +422,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.DeleteAddressRequest() ); @@ -458,7 +460,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.DeleteAddressRequest() ); @@ -489,7 +491,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.InsertAddressRequest() ); @@ -525,7 +527,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.InsertAddressRequest() ); @@ -577,7 +579,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.InsertAddressRequest() ); @@ -610,7 +612,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.InsertAddressRequest() ); @@ -636,7 +638,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.AggregatedListAddressesRequest() ); @@ -696,7 +698,7 @@ describe('v1small.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.AggregatedListAddressesRequest() ); @@ -740,7 +742,7 @@ describe('v1small.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.ListAddressesRequest() ); @@ -783,7 +785,7 @@ describe('v1small.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.ListAddressesRequest() ); @@ -841,7 +843,7 @@ describe('v1small.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.ListAddressesRequest() ); @@ -873,7 +875,7 @@ describe('v1small.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.ListAddressesRequest() ); @@ -938,7 +940,7 @@ describe('v1small.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.ListAddressesRequest() ); @@ -994,7 +996,7 @@ describe('v1small.AddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.ListAddressesRequest() ); @@ -1047,7 +1049,7 @@ describe('v1small.AddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.ListAddressesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_autoscalers_v1.ts b/packages/google-cloud-compute/test/gapic_autoscalers_v1.ts index 64cb855610f..a757eee97be 100644 --- a/packages/google-cloud-compute/test/gapic_autoscalers_v1.ts +++ b/packages/google-cloud-compute/test/gapic_autoscalers_v1.ts @@ -263,7 +263,9 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autoscalersStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAutoscalerRequest() ); @@ -363,7 +365,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAutoscalerRequest() ); @@ -420,7 +422,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAutoscalerRequest() ); @@ -458,7 +460,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAutoscalerRequest() ); @@ -489,7 +491,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAutoscalerRequest() ); @@ -529,7 +531,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAutoscalerRequest() ); @@ -584,7 +586,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAutoscalerRequest() ); @@ -621,7 +623,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAutoscalerRequest() ); @@ -652,7 +654,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAutoscalerRequest() ); @@ -688,7 +690,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAutoscalerRequest() ); @@ -740,7 +742,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAutoscalerRequest() ); @@ -773,7 +775,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertAutoscalerRequest() ); @@ -799,7 +801,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchAutoscalerRequest() ); @@ -834,7 +836,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchAutoscalerRequest() ); @@ -884,7 +886,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchAutoscalerRequest() ); @@ -916,7 +918,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchAutoscalerRequest() ); @@ -942,7 +944,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAutoscalerRequest() ); @@ -978,7 +980,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAutoscalerRequest() ); @@ -1030,7 +1032,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAutoscalerRequest() ); @@ -1063,7 +1065,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAutoscalerRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListAutoscalersRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.AutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListAutoscalersRequest() ); @@ -1193,7 +1195,7 @@ describe('v1.AutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAutoscalersRequest() ); @@ -1230,7 +1232,7 @@ describe('v1.AutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAutoscalersRequest() ); @@ -1282,7 +1284,7 @@ describe('v1.AutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAutoscalersRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.AutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAutoscalersRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.AutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAutoscalersRequest() ); @@ -1429,7 +1431,7 @@ describe('v1.AutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAutoscalersRequest() ); @@ -1476,7 +1478,7 @@ describe('v1.AutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAutoscalersRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_backend_buckets_v1.ts b/packages/google-cloud-compute/test/gapic_backend_buckets_v1.ts index 0049ee21e69..f4f14c5e88a 100644 --- a/packages/google-cloud-compute/test/gapic_backend_buckets_v1.ts +++ b/packages/google-cloud-compute/test/gapic_backend_buckets_v1.ts @@ -265,7 +265,9 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.backendBucketsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest() ); @@ -360,7 +362,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest() ); @@ -412,7 +414,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest() ); @@ -448,7 +450,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest() ); @@ -474,7 +476,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendBucketRequest() ); @@ -510,7 +512,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendBucketRequest() ); @@ -562,7 +564,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendBucketRequest() ); @@ -595,7 +597,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendBucketRequest() ); @@ -621,7 +623,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest() ); @@ -658,7 +660,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest() ); @@ -710,7 +712,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest() ); @@ -746,7 +748,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest() ); @@ -772,7 +774,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendBucketRequest() ); @@ -807,7 +809,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendBucketRequest() ); @@ -857,7 +859,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendBucketRequest() ); @@ -889,7 +891,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendBucketRequest() ); @@ -915,7 +917,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendBucketRequest() ); @@ -951,7 +953,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendBucketRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendBucketRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendBucketRequest() ); @@ -1065,7 +1067,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendBucketRequest() ); @@ -1096,7 +1098,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendBucketRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendBucketRequest() ); @@ -1171,7 +1173,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendBucketRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendBucketRequest() ); @@ -1227,7 +1229,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendBucketRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendBucketRequest() ); @@ -1309,7 +1311,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendBucketRequest() ); @@ -1335,7 +1337,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest() ); @@ -1372,7 +1374,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest() ); @@ -1463,7 +1465,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest() ); @@ -1492,7 +1494,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendBucketRequest() ); @@ -1528,7 +1530,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendBucketRequest() ); @@ -1580,7 +1582,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendBucketRequest() ); @@ -1616,7 +1618,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendBucketRequest() ); @@ -1642,7 +1644,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendBucketRequest() ); @@ -1679,7 +1681,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendBucketRequest() ); @@ -1731,7 +1733,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendBucketRequest() ); @@ -1767,7 +1769,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendBucketRequest() ); @@ -1793,7 +1795,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendBucketRequest() ); @@ -1829,7 +1831,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendBucketRequest() ); @@ -1881,7 +1883,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendBucketRequest() ); @@ -1914,7 +1916,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendBucketRequest() ); @@ -1940,7 +1942,7 @@ describe('v1.BackendBucketsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendBucketsRequest() ); @@ -1978,7 +1980,7 @@ describe('v1.BackendBucketsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendBucketsRequest() ); @@ -2031,7 +2033,7 @@ describe('v1.BackendBucketsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendBucketsRequest() ); @@ -2058,7 +2060,7 @@ describe('v1.BackendBucketsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendBucketsRequest() ); @@ -2118,7 +2120,7 @@ describe('v1.BackendBucketsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendBucketsRequest() ); @@ -2169,7 +2171,7 @@ describe('v1.BackendBucketsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendBucketsRequest() ); @@ -2217,7 +2219,7 @@ describe('v1.BackendBucketsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendBucketsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_backend_services_v1.ts b/packages/google-cloud-compute/test/gapic_backend_services_v1.ts index 77e255a0ad8..af22a0c6370 100644 --- a/packages/google-cloud-compute/test/gapic_backend_services_v1.ts +++ b/packages/google-cloud-compute/test/gapic_backend_services_v1.ts @@ -265,7 +265,9 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.backendServicesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest() ); @@ -360,7 +362,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest() ); @@ -412,7 +414,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest() ); @@ -448,7 +450,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest() ); @@ -474,7 +476,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendServiceRequest() ); @@ -510,7 +512,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendServiceRequest() ); @@ -562,7 +564,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendServiceRequest() ); @@ -595,7 +597,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteBackendServiceRequest() ); @@ -621,7 +623,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest() ); @@ -658,7 +660,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest() ); @@ -710,7 +712,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest() ); @@ -746,7 +748,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest() ); @@ -772,7 +774,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendServiceRequest() ); @@ -807,7 +809,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendServiceRequest() ); @@ -857,7 +859,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendServiceRequest() ); @@ -889,7 +891,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetBackendServiceRequest() ); @@ -915,7 +917,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthBackendServiceRequest() ); @@ -951,7 +953,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthBackendServiceRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthBackendServiceRequest() ); @@ -1036,7 +1038,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthBackendServiceRequest() ); @@ -1062,7 +1064,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest() ); @@ -1150,7 +1152,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest() ); @@ -1186,7 +1188,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest() ); @@ -1212,7 +1214,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendServiceRequest() ); @@ -1243,7 +1245,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendServiceRequest() ); @@ -1290,7 +1292,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendServiceRequest() ); @@ -1318,7 +1320,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertBackendServiceRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendServiceRequest() ); @@ -1374,7 +1376,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendServiceRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendServiceRequest() ); @@ -1456,7 +1458,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchBackendServiceRequest() ); @@ -1482,7 +1484,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest() ); @@ -1519,7 +1521,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest() ); @@ -1571,7 +1573,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest() ); @@ -1610,7 +1612,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest() ); @@ -1639,7 +1641,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest() ); @@ -1675,7 +1677,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest() ); @@ -1727,7 +1729,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest() ); @@ -1789,7 +1791,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest() ); @@ -1825,7 +1827,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest() ); @@ -1877,7 +1879,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest() ); @@ -1913,7 +1915,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest() ); @@ -1939,7 +1941,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendServiceRequest() ); @@ -1976,7 +1978,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendServiceRequest() ); @@ -2028,7 +2030,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendServiceRequest() ); @@ -2064,7 +2066,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsBackendServiceRequest() ); @@ -2090,7 +2092,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendServiceRequest() ); @@ -2126,7 +2128,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendServiceRequest() ); @@ -2178,7 +2180,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendServiceRequest() ); @@ -2211,7 +2213,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateBackendServiceRequest() ); @@ -2237,7 +2239,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListBackendServicesRequest() ); @@ -2297,7 +2299,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListBackendServicesRequest() ); @@ -2341,7 +2343,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendServicesRequest() ); @@ -2379,7 +2381,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendServicesRequest() ); @@ -2432,7 +2434,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendServicesRequest() ); @@ -2459,7 +2461,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendServicesRequest() ); @@ -2519,7 +2521,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendServicesRequest() ); @@ -2570,7 +2572,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendServicesRequest() ); @@ -2618,7 +2620,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBackendServicesRequest() ); @@ -2661,7 +2663,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableBackendServicesRequest() ); @@ -2700,7 +2702,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableBackendServicesRequest() ); @@ -2755,7 +2757,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableBackendServicesRequest() ); @@ -2786,7 +2788,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableBackendServicesRequest() ); @@ -2846,7 +2848,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableBackendServicesRequest() ); @@ -2897,7 +2899,7 @@ describe('v1.BackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableBackendServicesRequest() ); @@ -2946,7 +2948,7 @@ describe('v1.BackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableBackendServicesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_disk_types_v1.ts b/packages/google-cloud-compute/test/gapic_disk_types_v1.ts index b451a7ab0c3..e6cf445c278 100644 --- a/packages/google-cloud-compute/test/gapic_disk_types_v1.ts +++ b/packages/google-cloud-compute/test/gapic_disk_types_v1.ts @@ -263,7 +263,9 @@ describe('v1.DiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.diskTypesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.DiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskTypeRequest() ); @@ -362,7 +364,7 @@ describe('v1.DiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskTypeRequest() ); @@ -417,7 +419,7 @@ describe('v1.DiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskTypeRequest() ); @@ -454,7 +456,7 @@ describe('v1.DiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskTypeRequest() ); @@ -485,7 +487,7 @@ describe('v1.DiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListDiskTypesRequest() ); @@ -545,7 +547,7 @@ describe('v1.DiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListDiskTypesRequest() ); @@ -589,7 +591,7 @@ describe('v1.DiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDiskTypesRequest() ); @@ -626,7 +628,7 @@ describe('v1.DiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDiskTypesRequest() ); @@ -678,7 +680,7 @@ describe('v1.DiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDiskTypesRequest() ); @@ -710,7 +712,7 @@ describe('v1.DiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDiskTypesRequest() ); @@ -769,7 +771,7 @@ describe('v1.DiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDiskTypesRequest() ); @@ -825,7 +827,7 @@ describe('v1.DiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDiskTypesRequest() ); @@ -872,7 +874,7 @@ describe('v1.DiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDiskTypesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_disks_v1.ts b/packages/google-cloud-compute/test/gapic_disks_v1.ts index cd6a608f2db..e7f899377fd 100644 --- a/packages/google-cloud-compute/test/gapic_disks_v1.ts +++ b/packages/google-cloud-compute/test/gapic_disks_v1.ts @@ -263,7 +263,9 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.disksStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesDiskRequest() ); @@ -364,7 +366,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesDiskRequest() ); @@ -421,7 +423,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesDiskRequest() ); @@ -462,7 +464,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesDiskRequest() ); @@ -493,7 +495,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertDiskRequest() ); @@ -529,7 +531,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertDiskRequest() ); @@ -581,7 +583,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertDiskRequest() ); @@ -617,7 +619,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertDiskRequest() ); @@ -643,7 +645,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotDiskRequest() ); @@ -684,7 +686,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotDiskRequest() ); @@ -741,7 +743,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotDiskRequest() ); @@ -782,7 +784,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotDiskRequest() ); @@ -813,7 +815,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteDiskRequest() ); @@ -854,7 +856,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteDiskRequest() ); @@ -911,7 +913,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteDiskRequest() ); @@ -949,7 +951,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteDiskRequest() ); @@ -980,7 +982,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskRequest() ); @@ -1020,7 +1022,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiskRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyDiskRequest() ); @@ -1184,7 +1186,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyDiskRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyDiskRequest() ); @@ -1282,7 +1284,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyDiskRequest() ); @@ -1313,7 +1315,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertDiskRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertDiskRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertDiskRequest() ); @@ -1434,7 +1436,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertDiskRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest() ); @@ -1559,7 +1561,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest() ); @@ -1603,7 +1605,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest() ); @@ -1637,7 +1639,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeDiskRequest() ); @@ -1678,7 +1680,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeDiskRequest() ); @@ -1735,7 +1737,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeDiskRequest() ); @@ -1773,7 +1775,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeDiskRequest() ); @@ -1804,7 +1806,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyDiskRequest() ); @@ -1845,7 +1847,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyDiskRequest() ); @@ -1902,7 +1904,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyDiskRequest() ); @@ -1943,7 +1945,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyDiskRequest() ); @@ -1974,7 +1976,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsDiskRequest() ); @@ -2015,7 +2017,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsDiskRequest() ); @@ -2072,7 +2074,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsDiskRequest() ); @@ -2110,7 +2112,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsDiskRequest() ); @@ -2141,7 +2143,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationDiskRequest() ); @@ -2183,7 +2185,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationDiskRequest() ); @@ -2240,7 +2242,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationDiskRequest() ); @@ -2284,7 +2286,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationDiskRequest() ); @@ -2318,7 +2320,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationDiskRequest() ); @@ -2360,7 +2362,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationDiskRequest() ); @@ -2417,7 +2419,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationDiskRequest() ); @@ -2458,7 +2460,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationDiskRequest() ); @@ -2489,7 +2491,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationDiskRequest() ); @@ -2526,7 +2528,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationDiskRequest() ); @@ -2578,7 +2580,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationDiskRequest() ); @@ -2617,7 +2619,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationDiskRequest() ); @@ -2646,7 +2648,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsDiskRequest() ); @@ -2688,7 +2690,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsDiskRequest() ); @@ -2745,7 +2747,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsDiskRequest() ); @@ -2786,7 +2788,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsDiskRequest() ); @@ -2817,7 +2819,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDiskRequest() ); @@ -2858,7 +2860,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDiskRequest() ); @@ -2915,7 +2917,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDiskRequest() ); @@ -2953,7 +2955,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDiskRequest() ); @@ -2984,7 +2986,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListDisksRequest() ); @@ -3044,7 +3046,7 @@ describe('v1.DisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListDisksRequest() ); @@ -3088,7 +3090,7 @@ describe('v1.DisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksRequest() ); @@ -3125,7 +3127,7 @@ describe('v1.DisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksRequest() ); @@ -3177,7 +3179,7 @@ describe('v1.DisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksRequest() ); @@ -3209,7 +3211,7 @@ describe('v1.DisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksRequest() ); @@ -3265,7 +3267,7 @@ describe('v1.DisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksRequest() ); @@ -3318,7 +3320,7 @@ describe('v1.DisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksRequest() ); @@ -3365,7 +3367,7 @@ describe('v1.DisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_external_vpn_gateways_v1.ts b/packages/google-cloud-compute/test/gapic_external_vpn_gateways_v1.ts index c3a0a43c593..deb6881f228 100644 --- a/packages/google-cloud-compute/test/gapic_external_vpn_gateways_v1.ts +++ b/packages/google-cloud-compute/test/gapic_external_vpn_gateways_v1.ts @@ -276,7 +276,9 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.externalVpnGatewaysStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest() ); @@ -381,7 +383,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest() ); @@ -435,7 +437,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest() ); @@ -470,7 +472,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest() ); @@ -498,7 +500,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetExternalVpnGatewayRequest() ); @@ -535,7 +537,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetExternalVpnGatewayRequest() ); @@ -587,7 +589,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetExternalVpnGatewayRequest() ); @@ -621,7 +623,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetExternalVpnGatewayRequest() ); @@ -649,7 +651,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertExternalVpnGatewayRequest() ); @@ -682,7 +684,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertExternalVpnGatewayRequest() ); @@ -731,7 +733,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertExternalVpnGatewayRequest() ); @@ -761,7 +763,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertExternalVpnGatewayRequest() ); @@ -784,7 +786,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest() ); @@ -822,7 +824,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest() ); @@ -876,7 +878,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest() ); @@ -911,7 +913,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest() ); @@ -939,7 +941,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest() ); @@ -978,7 +980,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListExternalVpnGatewaysRequest() ); @@ -1138,7 +1140,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListExternalVpnGatewaysRequest() ); @@ -1193,7 +1195,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListExternalVpnGatewaysRequest() ); @@ -1222,7 +1224,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListExternalVpnGatewaysRequest() ); @@ -1285,7 +1287,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListExternalVpnGatewaysRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListExternalVpnGatewaysRequest() ); @@ -1390,7 +1392,7 @@ describe('v1.ExternalVpnGatewaysClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListExternalVpnGatewaysRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_firewall_policies_v1.ts b/packages/google-cloud-compute/test/gapic_firewall_policies_v1.ts index f796d4b553c..8fb34dd6081 100644 --- a/packages/google-cloud-compute/test/gapic_firewall_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_firewall_policies_v1.ts @@ -265,7 +265,9 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.firewallPoliciesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest() ); @@ -355,7 +357,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest() ); @@ -402,7 +404,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest() ); @@ -433,7 +435,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest() ); @@ -454,7 +456,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleFirewallPolicyRequest() ); @@ -485,7 +487,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleFirewallPolicyRequest() ); @@ -532,7 +534,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleFirewallPolicyRequest() ); @@ -560,7 +562,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleFirewallPolicyRequest() ); @@ -581,7 +583,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest() ); @@ -612,7 +614,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest() ); @@ -659,7 +661,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest() ); @@ -690,7 +692,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest() ); @@ -711,7 +713,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallPolicyRequest() ); @@ -742,7 +744,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallPolicyRequest() ); @@ -789,7 +791,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallPolicyRequest() ); @@ -817,7 +819,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallPolicyRequest() ); @@ -838,7 +840,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallPolicyRequest() ); @@ -868,7 +870,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallPolicyRequest() ); @@ -913,7 +915,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallPolicyRequest() ); @@ -940,7 +942,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallPolicyRequest() ); @@ -961,7 +963,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest() ); @@ -992,7 +994,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest() ); @@ -1169,7 +1171,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest() ); @@ -1221,7 +1223,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleFirewallPolicyRequest() ); @@ -1252,7 +1254,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleFirewallPolicyRequest() ); @@ -1299,7 +1301,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleFirewallPolicyRequest() ); @@ -1327,7 +1329,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleFirewallPolicyRequest() ); @@ -1348,7 +1350,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallPolicyRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallPolicyRequest() ); @@ -1398,7 +1400,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallPolicyRequest() ); @@ -1412,7 +1414,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallPolicyRequest() ); @@ -1428,7 +1430,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest() ); @@ -1445,7 +1447,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest() ); @@ -1478,7 +1480,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest() ); @@ -1495,7 +1497,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest() ); @@ -1511,7 +1513,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveFirewallPolicyRequest() ); @@ -1541,7 +1543,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveFirewallPolicyRequest() ); @@ -1586,7 +1588,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveFirewallPolicyRequest() ); @@ -1613,7 +1615,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveFirewallPolicyRequest() ); @@ -1634,7 +1636,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallPolicyRequest() ); @@ -1664,7 +1666,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallPolicyRequest() ); @@ -1709,7 +1711,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallPolicyRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallPolicyRequest() ); @@ -1757,7 +1759,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest() ); @@ -1788,7 +1790,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest() ); @@ -1835,7 +1837,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest() ); @@ -1863,7 +1865,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest() ); @@ -1884,7 +1886,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest() ); @@ -1915,7 +1917,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest() ); @@ -1962,7 +1964,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest() ); @@ -1993,7 +1995,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest() ); @@ -2014,7 +2016,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest() ); @@ -2045,7 +2047,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest() ); @@ -2092,7 +2094,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest() ); @@ -2123,7 +2125,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest() ); @@ -2144,7 +2146,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest() ); @@ -2175,7 +2177,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest() ); @@ -2222,7 +2224,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest() ); @@ -2253,7 +2255,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest() ); @@ -2274,7 +2276,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest() ); @@ -2306,7 +2308,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest() ); @@ -2353,7 +2355,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest() ); @@ -2384,7 +2386,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest() ); @@ -2405,7 +2407,7 @@ describe('v1.FirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallPoliciesRequest() ); @@ -2430,7 +2432,7 @@ describe('v1.FirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallPoliciesRequest() ); @@ -2470,7 +2472,7 @@ describe('v1.FirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallPoliciesRequest() ); @@ -2484,7 +2486,7 @@ describe('v1.FirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallPoliciesRequest() ); @@ -2531,7 +2533,7 @@ describe('v1.FirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallPoliciesRequest() ); @@ -2569,7 +2571,7 @@ describe('v1.FirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallPoliciesRequest() ); @@ -2604,7 +2606,7 @@ describe('v1.FirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallPoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_firewalls_v1.ts b/packages/google-cloud-compute/test/gapic_firewalls_v1.ts index 5448cae30a3..221cd31110e 100644 --- a/packages/google-cloud-compute/test/gapic_firewalls_v1.ts +++ b/packages/google-cloud-compute/test/gapic_firewalls_v1.ts @@ -263,7 +263,9 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.firewallsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallRequest() ); @@ -358,7 +360,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallRequest() ); @@ -410,7 +412,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallRequest() ); @@ -443,7 +445,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteFirewallRequest() ); @@ -469,7 +471,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallRequest() ); @@ -504,7 +506,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallRequest() ); @@ -554,7 +556,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallRequest() ); @@ -586,7 +588,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFirewallRequest() ); @@ -612,7 +614,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallRequest() ); @@ -643,7 +645,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallRequest() ); @@ -690,7 +692,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallRequest() ); @@ -718,7 +720,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertFirewallRequest() ); @@ -739,7 +741,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallRequest() ); @@ -774,7 +776,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallRequest() ); @@ -824,7 +826,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallRequest() ); @@ -856,7 +858,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchFirewallRequest() ); @@ -882,7 +884,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateFirewallRequest() ); @@ -918,7 +920,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateFirewallRequest() ); @@ -970,7 +972,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateFirewallRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateFirewallRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.FirewallsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallsRequest() ); @@ -1061,7 +1063,7 @@ describe('v1.FirewallsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallsRequest() ); @@ -1108,7 +1110,7 @@ describe('v1.FirewallsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallsRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.FirewallsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallsRequest() ); @@ -1189,7 +1191,7 @@ describe('v1.FirewallsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallsRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.FirewallsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallsRequest() ); @@ -1282,7 +1284,7 @@ describe('v1.FirewallsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListFirewallsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_forwarding_rules_v1.ts b/packages/google-cloud-compute/test/gapic_forwarding_rules_v1.ts index 1d6a7242980..3e881d75a27 100644 --- a/packages/google-cloud-compute/test/gapic_forwarding_rules_v1.ts +++ b/packages/google-cloud-compute/test/gapic_forwarding_rules_v1.ts @@ -265,7 +265,9 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.forwardingRulesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteForwardingRuleRequest() ); @@ -365,7 +367,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteForwardingRuleRequest() ); @@ -422,7 +424,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteForwardingRuleRequest() ); @@ -460,7 +462,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteForwardingRuleRequest() ); @@ -491,7 +493,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetForwardingRuleRequest() ); @@ -531,7 +533,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetForwardingRuleRequest() ); @@ -586,7 +588,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetForwardingRuleRequest() ); @@ -623,7 +625,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetForwardingRuleRequest() ); @@ -654,7 +656,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertForwardingRuleRequest() ); @@ -690,7 +692,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertForwardingRuleRequest() ); @@ -742,7 +744,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertForwardingRuleRequest() ); @@ -775,7 +777,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertForwardingRuleRequest() ); @@ -801,7 +803,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchForwardingRuleRequest() ); @@ -841,7 +843,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchForwardingRuleRequest() ); @@ -896,7 +898,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchForwardingRuleRequest() ); @@ -933,7 +935,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchForwardingRuleRequest() ); @@ -964,7 +966,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsForwardingRuleRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsForwardingRuleRequest() ); @@ -1062,7 +1064,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsForwardingRuleRequest() ); @@ -1100,7 +1102,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsForwardingRuleRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetForwardingRuleRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetForwardingRuleRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetForwardingRuleRequest() ); @@ -1267,7 +1269,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetForwardingRuleRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListForwardingRulesRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.ForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListForwardingRulesRequest() ); @@ -1402,7 +1404,7 @@ describe('v1.ForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListForwardingRulesRequest() ); @@ -1445,7 +1447,7 @@ describe('v1.ForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListForwardingRulesRequest() ); @@ -1503,7 +1505,7 @@ describe('v1.ForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListForwardingRulesRequest() ); @@ -1535,7 +1537,7 @@ describe('v1.ForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListForwardingRulesRequest() ); @@ -1600,7 +1602,7 @@ describe('v1.ForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListForwardingRulesRequest() ); @@ -1656,7 +1658,7 @@ describe('v1.ForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListForwardingRulesRequest() ); @@ -1709,7 +1711,7 @@ describe('v1.ForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListForwardingRulesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_global_addresses_v1.ts b/packages/google-cloud-compute/test/gapic_global_addresses_v1.ts index a006275bf77..20fa65b4b75 100644 --- a/packages/google-cloud-compute/test/gapic_global_addresses_v1.ts +++ b/packages/google-cloud-compute/test/gapic_global_addresses_v1.ts @@ -265,7 +265,9 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.globalAddressesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalAddressRequest() ); @@ -360,7 +362,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalAddressRequest() ); @@ -412,7 +414,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalAddressRequest() ); @@ -445,7 +447,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalAddressRequest() ); @@ -471,7 +473,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalAddressRequest() ); @@ -506,7 +508,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalAddressRequest() ); @@ -556,7 +558,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalAddressRequest() ); @@ -588,7 +590,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalAddressRequest() ); @@ -614,7 +616,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalAddressRequest() ); @@ -645,7 +647,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalAddressRequest() ); @@ -692,7 +694,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalAddressRequest() ); @@ -720,7 +722,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalAddressRequest() ); @@ -741,7 +743,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveGlobalAddressRequest() ); @@ -776,7 +778,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveGlobalAddressRequest() ); @@ -826,7 +828,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveGlobalAddressRequest() ); @@ -858,7 +860,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveGlobalAddressRequest() ); @@ -884,7 +886,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalAddressRequest() ); @@ -920,7 +922,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalAddressRequest() ); @@ -972,7 +974,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalAddressRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalAddressRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.GlobalAddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalAddressesRequest() ); @@ -1063,7 +1065,7 @@ describe('v1.GlobalAddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalAddressesRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.GlobalAddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalAddressesRequest() ); @@ -1137,7 +1139,7 @@ describe('v1.GlobalAddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalAddressesRequest() ); @@ -1191,7 +1193,7 @@ describe('v1.GlobalAddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalAddressesRequest() ); @@ -1242,7 +1244,7 @@ describe('v1.GlobalAddressesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalAddressesRequest() ); @@ -1284,7 +1286,7 @@ describe('v1.GlobalAddressesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalAddressesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_global_forwarding_rules_v1.ts b/packages/google-cloud-compute/test/gapic_global_forwarding_rules_v1.ts index 331f9d26657..f32ac4775d4 100644 --- a/packages/google-cloud-compute/test/gapic_global_forwarding_rules_v1.ts +++ b/packages/google-cloud-compute/test/gapic_global_forwarding_rules_v1.ts @@ -278,7 +278,9 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.globalForwardingRulesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest() ); @@ -378,7 +380,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest() ); @@ -431,7 +433,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest() ); @@ -465,7 +467,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest() ); @@ -492,7 +494,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalForwardingRuleRequest() ); @@ -528,7 +530,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalForwardingRuleRequest() ); @@ -579,7 +581,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalForwardingRuleRequest() ); @@ -612,7 +614,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalForwardingRuleRequest() ); @@ -639,7 +641,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest() ); @@ -671,7 +673,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest() ); @@ -719,7 +721,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest() ); @@ -748,7 +750,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest() ); @@ -770,7 +772,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest() ); @@ -806,7 +808,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest() ); @@ -857,7 +859,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest() ); @@ -890,7 +892,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest() ); @@ -917,7 +919,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest() ); @@ -954,7 +956,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest() ); @@ -1007,7 +1009,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.GlobalForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalForwardingRulesRequest() ); @@ -1258,7 +1260,7 @@ describe('v1.GlobalForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalForwardingRulesRequest() ); @@ -1312,7 +1314,7 @@ describe('v1.GlobalForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalForwardingRulesRequest() ); @@ -1340,7 +1342,7 @@ describe('v1.GlobalForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalForwardingRulesRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.GlobalForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalForwardingRulesRequest() ); @@ -1453,7 +1455,7 @@ describe('v1.GlobalForwardingRulesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalForwardingRulesRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.GlobalForwardingRulesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalForwardingRulesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_global_network_endpoint_groups_v1.ts b/packages/google-cloud-compute/test/gapic_global_network_endpoint_groups_v1.ts index 5694094da64..e8a98c6368a 100644 --- a/packages/google-cloud-compute/test/gapic_global_network_endpoint_groups_v1.ts +++ b/packages/google-cloud-compute/test/gapic_global_network_endpoint_groups_v1.ts @@ -284,7 +284,9 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.globalNetworkEndpointGroupsStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -395,7 +397,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -450,7 +452,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -492,7 +494,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -524,7 +526,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest() ); @@ -563,7 +565,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest() ); @@ -618,7 +620,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest() ); @@ -654,7 +656,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest() ); @@ -683,7 +685,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -723,7 +725,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -778,7 +780,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -820,7 +822,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest() ); @@ -852,7 +854,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest() ); @@ -890,7 +892,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest() ); @@ -943,7 +945,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest() ); @@ -978,7 +980,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest() ); @@ -1007,7 +1009,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest() ); @@ -1146,7 +1148,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest() ); @@ -1187,7 +1189,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest() ); @@ -1245,7 +1247,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest() ); @@ -1394,7 +1396,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest() ); @@ -1493,7 +1495,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest() ); @@ -1541,7 +1543,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest() ); @@ -1606,7 +1608,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest() ); @@ -1645,7 +1647,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest() ); @@ -1716,7 +1718,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest() ); @@ -1776,7 +1778,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest() ); @@ -1834,7 +1836,7 @@ describe('v1.GlobalNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_global_operations_v1.ts b/packages/google-cloud-compute/test/gapic_global_operations_v1.ts index ce2f56475f6..fff774e604d 100644 --- a/packages/google-cloud-compute/test/gapic_global_operations_v1.ts +++ b/packages/google-cloud-compute/test/gapic_global_operations_v1.ts @@ -265,7 +265,9 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.globalOperationsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOperationRequest() ); @@ -360,7 +362,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOperationRequest() ); @@ -412,7 +414,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOperationRequest() ); @@ -445,7 +447,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOperationRequest() ); @@ -471,7 +473,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOperationRequest() ); @@ -506,7 +508,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOperationRequest() ); @@ -556,7 +558,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOperationRequest() ); @@ -588,7 +590,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOperationRequest() ); @@ -614,7 +616,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitGlobalOperationRequest() ); @@ -649,7 +651,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitGlobalOperationRequest() ); @@ -699,7 +701,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitGlobalOperationRequest() ); @@ -731,7 +733,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitGlobalOperationRequest() ); @@ -757,7 +759,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest() ); @@ -817,7 +819,7 @@ describe('v1.GlobalOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest() ); @@ -861,7 +863,7 @@ describe('v1.GlobalOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOperationsRequest() ); @@ -893,7 +895,7 @@ describe('v1.GlobalOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOperationsRequest() ); @@ -940,7 +942,7 @@ describe('v1.GlobalOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOperationsRequest() ); @@ -967,7 +969,7 @@ describe('v1.GlobalOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOperationsRequest() ); @@ -1021,7 +1023,7 @@ describe('v1.GlobalOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOperationsRequest() ); @@ -1072,7 +1074,7 @@ describe('v1.GlobalOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOperationsRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.GlobalOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOperationsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_global_organization_operations_v1.ts b/packages/google-cloud-compute/test/gapic_global_organization_operations_v1.ts index 5cff652879c..bf4b90a0aa2 100644 --- a/packages/google-cloud-compute/test/gapic_global_organization_operations_v1.ts +++ b/packages/google-cloud-compute/test/gapic_global_organization_operations_v1.ts @@ -284,7 +284,9 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.globalOrganizationOperationsStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest() ); @@ -389,7 +391,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest() ); @@ -439,7 +441,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest() ); @@ -470,7 +472,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest() ); @@ -494,7 +496,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest() ); @@ -527,7 +529,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest() ); @@ -575,7 +577,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest() ); @@ -605,7 +607,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest() ); @@ -629,7 +631,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest() ); @@ -651,7 +653,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest() ); @@ -688,7 +690,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest() ); @@ -705,7 +707,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest() ); @@ -749,7 +751,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest() ); @@ -790,7 +792,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest() ); @@ -822,7 +824,7 @@ describe('v1.GlobalOrganizationOperationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_global_public_delegated_prefixes_v1.ts b/packages/google-cloud-compute/test/gapic_global_public_delegated_prefixes_v1.ts index bd5ecb274a1..44df32b82c5 100644 --- a/packages/google-cloud-compute/test/gapic_global_public_delegated_prefixes_v1.ts +++ b/packages/google-cloud-compute/test/gapic_global_public_delegated_prefixes_v1.ts @@ -284,7 +284,9 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.globalPublicDelegatedPrefixesStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest() ); @@ -394,7 +396,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest() ); @@ -449,7 +451,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest() ); @@ -485,7 +487,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest() ); @@ -514,7 +516,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest() ); @@ -552,7 +554,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest() ); @@ -605,7 +607,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest() ); @@ -640,7 +642,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest() ); @@ -669,7 +671,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest() ); @@ -703,7 +705,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest() ); @@ -753,7 +755,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest() ); @@ -784,7 +786,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest() ); @@ -808,7 +810,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest() ); @@ -846,7 +848,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest() ); @@ -899,7 +901,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest() ); @@ -934,7 +936,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest() ); @@ -963,7 +965,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest() ); @@ -1004,7 +1006,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest() ); @@ -1062,7 +1064,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest() ); @@ -1156,7 +1158,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest() ); @@ -1263,7 +1265,7 @@ describe('v1.GlobalPublicDelegatedPrefixesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_health_checks_v1.ts b/packages/google-cloud-compute/test/gapic_health_checks_v1.ts index 2707c508faa..82f48869ae6 100644 --- a/packages/google-cloud-compute/test/gapic_health_checks_v1.ts +++ b/packages/google-cloud-compute/test/gapic_health_checks_v1.ts @@ -265,7 +265,9 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.healthChecksStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteHealthCheckRequest() ); @@ -360,7 +362,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteHealthCheckRequest() ); @@ -412,7 +414,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteHealthCheckRequest() ); @@ -445,7 +447,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteHealthCheckRequest() ); @@ -471,7 +473,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthCheckRequest() ); @@ -506,7 +508,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthCheckRequest() ); @@ -556,7 +558,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthCheckRequest() ); @@ -588,7 +590,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthCheckRequest() ); @@ -614,7 +616,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertHealthCheckRequest() ); @@ -645,7 +647,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertHealthCheckRequest() ); @@ -692,7 +694,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertHealthCheckRequest() ); @@ -720,7 +722,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertHealthCheckRequest() ); @@ -741,7 +743,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchHealthCheckRequest() ); @@ -776,7 +778,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchHealthCheckRequest() ); @@ -826,7 +828,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchHealthCheckRequest() ); @@ -858,7 +860,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchHealthCheckRequest() ); @@ -884,7 +886,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateHealthCheckRequest() ); @@ -920,7 +922,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateHealthCheckRequest() ); @@ -972,7 +974,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateHealthCheckRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateHealthCheckRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListHealthChecksRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.HealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListHealthChecksRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.HealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListHealthChecksRequest() ); @@ -1167,7 +1169,7 @@ describe('v1.HealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListHealthChecksRequest() ); @@ -1214,7 +1216,7 @@ describe('v1.HealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListHealthChecksRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.HealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListHealthChecksRequest() ); @@ -1295,7 +1297,7 @@ describe('v1.HealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListHealthChecksRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.HealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListHealthChecksRequest() ); @@ -1388,7 +1390,7 @@ describe('v1.HealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListHealthChecksRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_image_family_views_v1.ts b/packages/google-cloud-compute/test/gapic_image_family_views_v1.ts index b94ef8f6e58..e0d0548b0d1 100644 --- a/packages/google-cloud-compute/test/gapic_image_family_views_v1.ts +++ b/packages/google-cloud-compute/test/gapic_image_family_views_v1.ts @@ -202,7 +202,9 @@ describe('v1.ImageFamilyViewsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageFamilyViewsStub); client.close().then(() => { done(); @@ -261,7 +263,7 @@ describe('v1.ImageFamilyViewsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageFamilyViewRequest() ); @@ -301,7 +303,7 @@ describe('v1.ImageFamilyViewsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageFamilyViewRequest() ); @@ -356,7 +358,7 @@ describe('v1.ImageFamilyViewsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageFamilyViewRequest() ); @@ -393,7 +395,7 @@ describe('v1.ImageFamilyViewsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageFamilyViewRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_images_v1.ts b/packages/google-cloud-compute/test/gapic_images_v1.ts index e6299f56cf4..5552525d215 100644 --- a/packages/google-cloud-compute/test/gapic_images_v1.ts +++ b/packages/google-cloud-compute/test/gapic_images_v1.ts @@ -263,7 +263,9 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imagesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteImageRequest() ); @@ -358,7 +360,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteImageRequest() ); @@ -410,7 +412,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteImageRequest() ); @@ -443,7 +445,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteImageRequest() ); @@ -469,7 +471,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeprecateImageRequest() ); @@ -505,7 +507,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeprecateImageRequest() ); @@ -557,7 +559,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeprecateImageRequest() ); @@ -590,7 +592,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeprecateImageRequest() ); @@ -616,7 +618,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageRequest() ); @@ -651,7 +653,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageRequest() ); @@ -701,7 +703,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageRequest() ); @@ -733,7 +735,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetImageRequest() ); @@ -759,7 +761,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFromFamilyImageRequest() ); @@ -795,7 +797,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFromFamilyImageRequest() ); @@ -847,7 +849,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFromFamilyImageRequest() ); @@ -883,7 +885,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetFromFamilyImageRequest() ); @@ -909,7 +911,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyImageRequest() ); @@ -945,7 +947,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyImageRequest() ); @@ -997,7 +999,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyImageRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyImageRequest() ); @@ -1059,7 +1061,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertImageRequest() ); @@ -1090,7 +1092,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertImageRequest() ); @@ -1137,7 +1139,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertImageRequest() ); @@ -1165,7 +1167,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertImageRequest() ); @@ -1186,7 +1188,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchImageRequest() ); @@ -1221,7 +1223,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchImageRequest() ); @@ -1271,7 +1273,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchImageRequest() ); @@ -1303,7 +1305,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchImageRequest() ); @@ -1329,7 +1331,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyImageRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyImageRequest() ); @@ -1417,7 +1419,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyImageRequest() ); @@ -1453,7 +1455,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyImageRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsImageRequest() ); @@ -1515,7 +1517,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsImageRequest() ); @@ -1567,7 +1569,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsImageRequest() ); @@ -1600,7 +1602,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsImageRequest() ); @@ -1626,7 +1628,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsImageRequest() ); @@ -1663,7 +1665,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsImageRequest() ); @@ -1715,7 +1717,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsImageRequest() ); @@ -1751,7 +1753,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsImageRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.ImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListImagesRequest() ); @@ -1809,7 +1811,7 @@ describe('v1.ImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListImagesRequest() ); @@ -1856,7 +1858,7 @@ describe('v1.ImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListImagesRequest() ); @@ -1883,7 +1885,7 @@ describe('v1.ImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListImagesRequest() ); @@ -1934,7 +1936,7 @@ describe('v1.ImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListImagesRequest() ); @@ -1982,7 +1984,7 @@ describe('v1.ImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListImagesRequest() ); @@ -2024,7 +2026,7 @@ describe('v1.ImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListImagesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_instance_group_manager_resize_requests_v1.ts b/packages/google-cloud-compute/test/gapic_instance_group_manager_resize_requests_v1.ts index bdc2e12356b..3cf954dbdf3 100644 --- a/packages/google-cloud-compute/test/gapic_instance_group_manager_resize_requests_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instance_group_manager_resize_requests_v1.ts @@ -287,7 +287,9 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instanceGroupManagerResizeRequestsStub); client.close().then(() => { done(); @@ -361,7 +363,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest() ); @@ -410,7 +412,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest() ); @@ -475,7 +477,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest() ); @@ -521,7 +523,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest() ); @@ -560,7 +562,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerResizeRequestRequest() ); @@ -609,7 +611,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerResizeRequestRequest() ); @@ -674,7 +676,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerResizeRequestRequest() ); @@ -720,7 +722,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerResizeRequestRequest() ); @@ -759,7 +761,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerResizeRequestRequest() ); @@ -807,7 +809,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerResizeRequestRequest() ); @@ -870,7 +872,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerResizeRequestRequest() ); @@ -915,7 +917,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerResizeRequestRequest() ); @@ -954,7 +956,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerResizeRequestRequest() ); @@ -998,7 +1000,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerResizeRequestRequest() ); @@ -1058,7 +1060,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerResizeRequestRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerResizeRequestRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest() ); @@ -1184,7 +1186,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest() ); @@ -1252,7 +1254,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest() ); @@ -1292,7 +1294,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest() ); @@ -1435,7 +1437,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.InstanceGroupManagerResizeRequestsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_instance_group_managers_v1.ts b/packages/google-cloud-compute/test/gapic_instance_group_managers_v1.ts index 8520cb66fb7..92d6bdce101 100644 --- a/packages/google-cloud-compute/test/gapic_instance_group_managers_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instance_group_managers_v1.ts @@ -278,7 +278,9 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instanceGroupManagersStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest() ); @@ -383,7 +385,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest() ); @@ -441,7 +443,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest() ); @@ -483,7 +485,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest() ); @@ -515,7 +517,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest() ); @@ -558,7 +560,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest() ); @@ -616,7 +618,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest() ); @@ -661,7 +663,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest() ); @@ -696,7 +698,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest() ); @@ -738,7 +740,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest() ); @@ -796,7 +798,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest() ); @@ -838,7 +840,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest() ); @@ -870,7 +872,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest() ); @@ -912,7 +914,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest() ); @@ -970,7 +972,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest() ); @@ -1083,7 +1085,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest() ); @@ -1183,7 +1185,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest() ); @@ -1215,7 +1217,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -1258,7 +1260,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -1316,7 +1318,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -1361,7 +1363,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -1396,7 +1398,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerRequest() ); @@ -1437,7 +1439,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerRequest() ); @@ -1493,7 +1495,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerRequest() ); @@ -1531,7 +1533,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupManagerRequest() ); @@ -1563,7 +1565,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerRequest() ); @@ -1600,7 +1602,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerRequest() ); @@ -1653,7 +1655,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupManagerRequest() ); @@ -1714,7 +1716,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceGroupManagerRequest() ); @@ -1755,7 +1757,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceGroupManagerRequest() ); @@ -1811,7 +1813,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceGroupManagerRequest() ); @@ -1849,7 +1851,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceGroupManagerRequest() ); @@ -1881,7 +1883,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest() ); @@ -1924,7 +1926,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest() ); @@ -1982,7 +1984,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest() ); @@ -2027,7 +2029,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest() ); @@ -2062,7 +2064,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest() ); @@ -2104,7 +2106,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest() ); @@ -2162,7 +2164,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest() ); @@ -2204,7 +2206,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest() ); @@ -2236,7 +2238,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest() ); @@ -2278,7 +2280,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest() ); @@ -2336,7 +2338,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest() ); @@ -2375,7 +2377,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest() ); @@ -2407,7 +2409,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesInstanceGroupManagerRequest() ); @@ -2449,7 +2451,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesInstanceGroupManagerRequest() ); @@ -2507,7 +2509,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesInstanceGroupManagerRequest() ); @@ -2549,7 +2551,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesInstanceGroupManagerRequest() ); @@ -2581,7 +2583,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest() ); @@ -2624,7 +2626,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest() ); @@ -2682,7 +2684,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest() ); @@ -2724,7 +2726,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest() ); @@ -2756,7 +2758,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest() ); @@ -2798,7 +2800,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest() ); @@ -2856,7 +2858,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest() ); @@ -2898,7 +2900,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest() ); @@ -2930,7 +2932,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesInstanceGroupManagerRequest() ); @@ -2972,7 +2974,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesInstanceGroupManagerRequest() ); @@ -3030,7 +3032,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesInstanceGroupManagerRequest() ); @@ -3072,7 +3074,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesInstanceGroupManagerRequest() ); @@ -3104,7 +3106,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesInstanceGroupManagerRequest() ); @@ -3146,7 +3148,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesInstanceGroupManagerRequest() ); @@ -3204,7 +3206,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesInstanceGroupManagerRequest() ); @@ -3246,7 +3248,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesInstanceGroupManagerRequest() ); @@ -3278,7 +3280,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesInstanceGroupManagerRequest() ); @@ -3320,7 +3322,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesInstanceGroupManagerRequest() ); @@ -3378,7 +3380,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesInstanceGroupManagerRequest() ); @@ -3420,7 +3422,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesInstanceGroupManagerRequest() ); @@ -3452,7 +3454,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -3495,7 +3497,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -3553,7 +3555,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -3598,7 +3600,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest() ); @@ -3633,7 +3635,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest() ); @@ -3697,7 +3699,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest() ); @@ -3745,7 +3747,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagersRequest() ); @@ -3789,7 +3791,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagersRequest() ); @@ -3850,7 +3852,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagersRequest() ); @@ -3883,7 +3885,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagersRequest() ); @@ -3950,7 +3952,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagersRequest() ); @@ -4008,7 +4010,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagersRequest() ); @@ -4063,7 +4065,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupManagersRequest() ); @@ -4113,7 +4115,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest() ); @@ -4163,7 +4165,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest() ); @@ -4231,7 +4233,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest() ); @@ -4273,7 +4275,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest() ); @@ -4347,7 +4349,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest() ); @@ -4412,7 +4414,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest() ); @@ -4473,7 +4475,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest() ); @@ -4529,7 +4531,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest() ); @@ -4580,7 +4582,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest() ); @@ -4646,7 +4648,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest() ); @@ -4688,7 +4690,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest() ); @@ -4759,7 +4761,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest() ); @@ -4819,7 +4821,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest() ); @@ -4879,7 +4881,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest() ); @@ -4932,7 +4934,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest() ); @@ -4983,7 +4985,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest() ); @@ -5049,7 +5051,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest() ); @@ -5094,7 +5096,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest() ); @@ -5172,7 +5174,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest() ); @@ -5239,7 +5241,7 @@ describe('v1.InstanceGroupManagersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest() ); @@ -5303,7 +5305,7 @@ describe('v1.InstanceGroupManagersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_instance_groups_v1.ts b/packages/google-cloud-compute/test/gapic_instance_groups_v1.ts index 9b02b9591b2..0ef10e3bcf4 100644 --- a/packages/google-cloud-compute/test/gapic_instance_groups_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instance_groups_v1.ts @@ -265,7 +265,9 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instanceGroupsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstancesInstanceGroupRequest() ); @@ -365,7 +367,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstancesInstanceGroupRequest() ); @@ -422,7 +424,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstancesInstanceGroupRequest() ); @@ -463,7 +465,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstancesInstanceGroupRequest() ); @@ -494,7 +496,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupRequest() ); @@ -535,7 +537,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupRequest() ); @@ -592,7 +594,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupRequest() ); @@ -630,7 +632,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceGroupRequest() ); @@ -661,7 +663,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupRequest() ); @@ -701,7 +703,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupRequest() ); @@ -756,7 +758,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupRequest() ); @@ -793,7 +795,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceGroupRequest() ); @@ -824,7 +826,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupRequest() ); @@ -860,7 +862,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupRequest() ); @@ -912,7 +914,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupRequest() ); @@ -945,7 +947,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceGroupRequest() ); @@ -971,7 +973,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest() ); @@ -1182,7 +1184,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest() ); @@ -1311,7 +1313,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest() ); @@ -1371,7 +1373,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest() ); @@ -1415,7 +1417,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupsRequest() ); @@ -1458,7 +1460,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupsRequest() ); @@ -1516,7 +1518,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupsRequest() ); @@ -1548,7 +1550,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupsRequest() ); @@ -1613,7 +1615,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupsRequest() ); @@ -1669,7 +1671,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupsRequest() ); @@ -1722,7 +1724,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceGroupsRequest() ); @@ -1770,7 +1772,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest() ); @@ -1819,7 +1821,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest() ); @@ -1886,7 +1888,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest() ); @@ -1927,7 +1929,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest() ); @@ -1998,7 +2000,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest() ); @@ -2058,7 +2060,7 @@ describe('v1.InstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest() ); @@ -2118,7 +2120,7 @@ describe('v1.InstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_instance_settings_service_v1.ts b/packages/google-cloud-compute/test/gapic_instance_settings_service_v1.ts index f0f01e72196..896b6537800 100644 --- a/packages/google-cloud-compute/test/gapic_instance_settings_service_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instance_settings_service_v1.ts @@ -215,7 +215,9 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instanceSettingsServiceStub); client.close().then(() => { done(); @@ -278,7 +280,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceSettingRequest() ); @@ -314,7 +316,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceSettingRequest() ); @@ -365,7 +367,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceSettingRequest() ); @@ -398,7 +400,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceSettingRequest() ); @@ -425,7 +427,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceSettingRequest() ); @@ -461,7 +463,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceSettingRequest() ); @@ -512,7 +514,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceSettingRequest() ); @@ -545,7 +547,7 @@ describe('v1.InstanceSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInstanceSettingRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_instance_templates_v1.ts b/packages/google-cloud-compute/test/gapic_instance_templates_v1.ts index 18addeb924a..7204245016d 100644 --- a/packages/google-cloud-compute/test/gapic_instance_templates_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instance_templates_v1.ts @@ -266,7 +266,9 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instanceTemplatesStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceTemplateRequest() ); @@ -361,7 +363,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceTemplateRequest() ); @@ -413,7 +415,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceTemplateRequest() ); @@ -446,7 +448,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceTemplateRequest() ); @@ -472,7 +474,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceTemplateRequest() ); @@ -507,7 +509,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceTemplateRequest() ); @@ -557,7 +559,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceTemplateRequest() ); @@ -589,7 +591,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceTemplateRequest() ); @@ -615,7 +617,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest() ); @@ -651,7 +653,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest() ); @@ -703,7 +705,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest() ); @@ -739,7 +741,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest() ); @@ -765,7 +767,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceTemplateRequest() ); @@ -796,7 +798,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceTemplateRequest() ); @@ -843,7 +845,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceTemplateRequest() ); @@ -871,7 +873,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceTemplateRequest() ); @@ -892,7 +894,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest() ); @@ -928,7 +930,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest() ); @@ -980,7 +982,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest() ); @@ -1016,7 +1018,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest() ); @@ -1167,7 +1169,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest() ); @@ -1193,7 +1195,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstanceTemplatesRequest() ); @@ -1253,7 +1255,7 @@ describe('v1.InstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstanceTemplatesRequest() ); @@ -1297,7 +1299,7 @@ describe('v1.InstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceTemplatesRequest() ); @@ -1335,7 +1337,7 @@ describe('v1.InstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceTemplatesRequest() ); @@ -1388,7 +1390,7 @@ describe('v1.InstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceTemplatesRequest() ); @@ -1415,7 +1417,7 @@ describe('v1.InstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceTemplatesRequest() ); @@ -1475,7 +1477,7 @@ describe('v1.InstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceTemplatesRequest() ); @@ -1526,7 +1528,7 @@ describe('v1.InstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceTemplatesRequest() ); @@ -1574,7 +1576,7 @@ describe('v1.InstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstanceTemplatesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_instances_v1.ts b/packages/google-cloud-compute/test/gapic_instances_v1.ts index b61293d8b6f..407d466c6d7 100644 --- a/packages/google-cloud-compute/test/gapic_instances_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instances_v1.ts @@ -263,7 +263,9 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instancesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAccessConfigInstanceRequest() ); @@ -363,7 +365,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAccessConfigInstanceRequest() ); @@ -420,7 +422,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAccessConfigInstanceRequest() ); @@ -461,7 +463,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAccessConfigInstanceRequest() ); @@ -492,7 +494,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest() ); @@ -534,7 +536,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest() ); @@ -591,7 +593,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest() ); @@ -632,7 +634,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest() ); @@ -663,7 +665,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachDiskInstanceRequest() ); @@ -704,7 +706,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachDiskInstanceRequest() ); @@ -761,7 +763,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachDiskInstanceRequest() ); @@ -802,7 +804,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachDiskInstanceRequest() ); @@ -833,7 +835,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertInstanceRequest() ); @@ -869,7 +871,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertInstanceRequest() ); @@ -921,7 +923,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertInstanceRequest() ); @@ -957,7 +959,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertInstanceRequest() ); @@ -983,7 +985,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceRequest() ); @@ -1024,7 +1026,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstanceRequest() ); @@ -1150,7 +1152,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest() ); @@ -1249,7 +1251,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest() ); @@ -1290,7 +1292,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest() ); @@ -1321,7 +1323,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachDiskInstanceRequest() ); @@ -1362,7 +1364,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachDiskInstanceRequest() ); @@ -1419,7 +1421,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachDiskInstanceRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachDiskInstanceRequest() ); @@ -1491,7 +1493,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceRequest() ); @@ -1531,7 +1533,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceRequest() ); @@ -1586,7 +1588,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceRequest() ); @@ -1623,7 +1625,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstanceRequest() ); @@ -1654,7 +1656,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest() ); @@ -1696,7 +1698,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest() ); @@ -1753,7 +1755,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest() ); @@ -1797,7 +1799,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest() ); @@ -1831,7 +1833,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGuestAttributesInstanceRequest() ); @@ -1873,7 +1875,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGuestAttributesInstanceRequest() ); @@ -1930,7 +1932,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGuestAttributesInstanceRequest() ); @@ -1971,7 +1973,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetGuestAttributesInstanceRequest() ); @@ -2002,7 +2004,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceRequest() ); @@ -2043,7 +2045,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceRequest() ); @@ -2100,7 +2102,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceRequest() ); @@ -2141,7 +2143,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstanceRequest() ); @@ -2172,7 +2174,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetScreenshotInstanceRequest() ); @@ -2213,7 +2215,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetScreenshotInstanceRequest() ); @@ -2270,7 +2272,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetScreenshotInstanceRequest() ); @@ -2311,7 +2313,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetScreenshotInstanceRequest() ); @@ -2342,7 +2344,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest() ); @@ -2384,7 +2386,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest() ); @@ -2441,7 +2443,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest() ); @@ -2482,7 +2484,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest() ); @@ -2513,7 +2515,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest() ); @@ -2555,7 +2557,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest() ); @@ -2612,7 +2614,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest() ); @@ -2656,7 +2658,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest() ); @@ -2690,7 +2692,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceRequest() ); @@ -2726,7 +2728,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceRequest() ); @@ -2778,7 +2780,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceRequest() ); @@ -2811,7 +2813,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstanceRequest() ); @@ -2837,7 +2839,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceInstanceRequest() ); @@ -2879,7 +2881,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceInstanceRequest() ); @@ -2936,7 +2938,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceInstanceRequest() ); @@ -2977,7 +2979,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceInstanceRequest() ); @@ -3008,7 +3010,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest() ); @@ -3050,7 +3052,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest() ); @@ -3107,7 +3109,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest() ); @@ -3151,7 +3153,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest() ); @@ -3185,7 +3187,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() ); @@ -3227,7 +3229,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() ); @@ -3284,7 +3286,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() ); @@ -3325,7 +3327,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ReportHostAsFaultyInstanceRequest() ); @@ -3356,7 +3358,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResetInstanceRequest() ); @@ -3396,7 +3398,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResetInstanceRequest() ); @@ -3451,7 +3453,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResetInstanceRequest() ); @@ -3488,7 +3490,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResetInstanceRequest() ); @@ -3519,7 +3521,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstanceRequest() ); @@ -3560,7 +3562,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstanceRequest() ); @@ -3617,7 +3619,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstanceRequest() ); @@ -3655,7 +3657,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstanceRequest() ); @@ -3686,7 +3688,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest() ); @@ -3728,7 +3730,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest() ); @@ -3785,7 +3787,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest() ); @@ -3829,7 +3831,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest() ); @@ -3863,7 +3865,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest() ); @@ -3905,7 +3907,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest() ); @@ -3962,7 +3964,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest() ); @@ -4006,7 +4008,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest() ); @@ -4040,7 +4042,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest() ); @@ -4081,7 +4083,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest() ); @@ -4138,7 +4140,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest() ); @@ -4179,7 +4181,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest() ); @@ -4210,7 +4212,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceRequest() ); @@ -4251,7 +4253,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceRequest() ); @@ -4308,7 +4310,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceRequest() ); @@ -4349,7 +4351,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstanceRequest() ); @@ -4380,7 +4382,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstanceRequest() ); @@ -4421,7 +4423,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstanceRequest() ); @@ -4478,7 +4480,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstanceRequest() ); @@ -4516,7 +4518,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstanceRequest() ); @@ -4547,7 +4549,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineResourcesInstanceRequest() ); @@ -4589,7 +4591,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineResourcesInstanceRequest() ); @@ -4646,7 +4648,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineResourcesInstanceRequest() ); @@ -4687,7 +4689,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineResourcesInstanceRequest() ); @@ -4718,7 +4720,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineTypeInstanceRequest() ); @@ -4759,7 +4761,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineTypeInstanceRequest() ); @@ -4816,7 +4818,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineTypeInstanceRequest() ); @@ -4857,7 +4859,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMachineTypeInstanceRequest() ); @@ -4888,7 +4890,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMetadataInstanceRequest() ); @@ -4929,7 +4931,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMetadataInstanceRequest() ); @@ -4986,7 +4988,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMetadataInstanceRequest() ); @@ -5027,7 +5029,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMetadataInstanceRequest() ); @@ -5058,7 +5060,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest() ); @@ -5099,7 +5101,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest() ); @@ -5156,7 +5158,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest() ); @@ -5197,7 +5199,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest() ); @@ -5228,7 +5230,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNameInstanceRequest() ); @@ -5269,7 +5271,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNameInstanceRequest() ); @@ -5326,7 +5328,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNameInstanceRequest() ); @@ -5364,7 +5366,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNameInstanceRequest() ); @@ -5395,7 +5397,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSchedulingInstanceRequest() ); @@ -5436,7 +5438,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSchedulingInstanceRequest() ); @@ -5493,7 +5495,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSchedulingInstanceRequest() ); @@ -5534,7 +5536,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSchedulingInstanceRequest() ); @@ -5565,7 +5567,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyInstanceRequest() ); @@ -5606,7 +5608,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyInstanceRequest() ); @@ -5663,7 +5665,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyInstanceRequest() ); @@ -5704,7 +5706,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyInstanceRequest() ); @@ -5735,7 +5737,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetServiceAccountInstanceRequest() ); @@ -5776,7 +5778,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetServiceAccountInstanceRequest() ); @@ -5833,7 +5835,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetServiceAccountInstanceRequest() ); @@ -5874,7 +5876,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetServiceAccountInstanceRequest() ); @@ -5905,7 +5907,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest() ); @@ -5948,7 +5950,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest() ); @@ -6005,7 +6007,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest() ); @@ -6049,7 +6051,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest() ); @@ -6083,7 +6085,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTagsInstanceRequest() ); @@ -6124,7 +6126,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTagsInstanceRequest() ); @@ -6181,7 +6183,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTagsInstanceRequest() ); @@ -6219,7 +6221,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTagsInstanceRequest() ); @@ -6250,7 +6252,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest() ); @@ -6292,7 +6294,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest() ); @@ -6349,7 +6351,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest() ); @@ -6393,7 +6395,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest() ); @@ -6427,7 +6429,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstanceRequest() ); @@ -6467,7 +6469,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstanceRequest() ); @@ -6522,7 +6524,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstanceRequest() ); @@ -6559,7 +6561,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstanceRequest() ); @@ -6590,7 +6592,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest() ); @@ -6632,7 +6634,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest() ); @@ -6689,7 +6691,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest() ); @@ -6733,7 +6735,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest() ); @@ -6767,7 +6769,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstanceRequest() ); @@ -6807,7 +6809,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstanceRequest() ); @@ -6862,7 +6864,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstanceRequest() ); @@ -6899,7 +6901,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstanceRequest() ); @@ -6930,7 +6932,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstanceRequest() ); @@ -6971,7 +6973,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstanceRequest() ); @@ -7028,7 +7030,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstanceRequest() ); @@ -7066,7 +7068,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstanceRequest() ); @@ -7097,7 +7099,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceRequest() ); @@ -7139,7 +7141,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceRequest() ); @@ -7196,7 +7198,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceRequest() ); @@ -7237,7 +7239,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstanceRequest() ); @@ -7268,7 +7270,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateInstanceRequest() ); @@ -7309,7 +7311,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateInstanceRequest() ); @@ -7366,7 +7368,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateInstanceRequest() ); @@ -7404,7 +7406,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateInstanceRequest() ); @@ -7435,7 +7437,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest() ); @@ -7477,7 +7479,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest() ); @@ -7534,7 +7536,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest() ); @@ -7575,7 +7577,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest() ); @@ -7606,7 +7608,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest() ); @@ -7648,7 +7650,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest() ); @@ -7705,7 +7707,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest() ); @@ -7746,7 +7748,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest() ); @@ -7777,7 +7779,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest() ); @@ -7819,7 +7821,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest() ); @@ -7876,7 +7878,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest() ); @@ -7920,7 +7922,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest() ); @@ -7954,7 +7956,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest() ); @@ -7996,7 +7998,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest() ); @@ -8053,7 +8055,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest() ); @@ -8097,7 +8099,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest() ); @@ -8131,7 +8133,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstancesRequest() ); @@ -8191,7 +8193,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstancesRequest() ); @@ -8235,7 +8237,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRequest() ); @@ -8272,7 +8274,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRequest() ); @@ -8324,7 +8326,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRequest() ); @@ -8356,7 +8358,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRequest() ); @@ -8415,7 +8417,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRequest() ); @@ -8471,7 +8473,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRequest() ); @@ -8518,7 +8520,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRequest() ); @@ -8566,7 +8568,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReferrersInstancesRequest() ); @@ -8609,7 +8611,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReferrersInstancesRequest() ); @@ -8668,7 +8670,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReferrersInstancesRequest() ); @@ -8709,7 +8711,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReferrersInstancesRequest() ); @@ -8773,7 +8775,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReferrersInstancesRequest() ); @@ -8832,7 +8834,7 @@ describe('v1.InstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReferrersInstancesRequest() ); @@ -8885,7 +8887,7 @@ describe('v1.InstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReferrersInstancesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_instant_snapshots_v1.ts b/packages/google-cloud-compute/test/gapic_instant_snapshots_v1.ts index ce01de78ab6..34f3422a571 100644 --- a/packages/google-cloud-compute/test/gapic_instant_snapshots_v1.ts +++ b/packages/google-cloud-compute/test/gapic_instant_snapshots_v1.ts @@ -265,7 +265,9 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.instantSnapshotsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstantSnapshotRequest() ); @@ -365,7 +367,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstantSnapshotRequest() ); @@ -422,7 +424,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstantSnapshotRequest() ); @@ -460,7 +462,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstantSnapshotRequest() ); @@ -491,7 +493,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstantSnapshotRequest() ); @@ -531,7 +533,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstantSnapshotRequest() ); @@ -586,7 +588,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstantSnapshotRequest() ); @@ -623,7 +625,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInstantSnapshotRequest() ); @@ -654,7 +656,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstantSnapshotRequest() ); @@ -695,7 +697,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstantSnapshotRequest() ); @@ -752,7 +754,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstantSnapshotRequest() ); @@ -793,7 +795,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyInstantSnapshotRequest() ); @@ -824,7 +826,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstantSnapshotRequest() ); @@ -860,7 +862,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstantSnapshotRequest() ); @@ -912,7 +914,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstantSnapshotRequest() ); @@ -945,7 +947,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInstantSnapshotRequest() ); @@ -971,7 +973,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstantSnapshotRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstantSnapshotRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstantSnapshotRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyInstantSnapshotRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstantSnapshotRequest() ); @@ -1182,7 +1184,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstantSnapshotRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstantSnapshotRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInstantSnapshotRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstantSnapshotRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstantSnapshotRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstantSnapshotRequest() ); @@ -1448,7 +1450,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsInstantSnapshotRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstantSnapshotsRequest() ); @@ -1539,7 +1541,7 @@ describe('v1.InstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInstantSnapshotsRequest() ); @@ -1583,7 +1585,7 @@ describe('v1.InstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstantSnapshotsRequest() ); @@ -1626,7 +1628,7 @@ describe('v1.InstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstantSnapshotsRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.InstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstantSnapshotsRequest() ); @@ -1716,7 +1718,7 @@ describe('v1.InstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstantSnapshotsRequest() ); @@ -1781,7 +1783,7 @@ describe('v1.InstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstantSnapshotsRequest() ); @@ -1837,7 +1839,7 @@ describe('v1.InstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstantSnapshotsRequest() ); @@ -1890,7 +1892,7 @@ describe('v1.InstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstantSnapshotsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_interconnect_attachments_v1.ts b/packages/google-cloud-compute/test/gapic_interconnect_attachments_v1.ts index 6d854d348a4..14f7fd3149e 100644 --- a/packages/google-cloud-compute/test/gapic_interconnect_attachments_v1.ts +++ b/packages/google-cloud-compute/test/gapic_interconnect_attachments_v1.ts @@ -278,7 +278,9 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.interconnectAttachmentsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest() ); @@ -383,7 +385,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest() ); @@ -441,7 +443,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest() ); @@ -480,7 +482,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest() ); @@ -512,7 +514,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectAttachmentRequest() ); @@ -553,7 +555,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectAttachmentRequest() ); @@ -609,7 +611,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectAttachmentRequest() ); @@ -647,7 +649,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectAttachmentRequest() ); @@ -679,7 +681,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectAttachmentRequest() ); @@ -716,7 +718,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectAttachmentRequest() ); @@ -769,7 +771,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectAttachmentRequest() ); @@ -803,7 +805,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectAttachmentRequest() ); @@ -830,7 +832,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectAttachmentRequest() ); @@ -871,7 +873,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectAttachmentRequest() ); @@ -927,7 +929,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectAttachmentRequest() ); @@ -965,7 +967,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectAttachmentRequest() ); @@ -997,7 +999,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest() ); @@ -1097,7 +1099,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest() ); @@ -1136,7 +1138,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest() ); @@ -1168,7 +1170,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.InterconnectAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.InterconnectAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectAttachmentsRequest() ); @@ -1324,7 +1326,7 @@ describe('v1.InterconnectAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectAttachmentsRequest() ); @@ -1385,7 +1387,7 @@ describe('v1.InterconnectAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectAttachmentsRequest() ); @@ -1418,7 +1420,7 @@ describe('v1.InterconnectAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectAttachmentsRequest() ); @@ -1485,7 +1487,7 @@ describe('v1.InterconnectAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectAttachmentsRequest() ); @@ -1543,7 +1545,7 @@ describe('v1.InterconnectAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectAttachmentsRequest() ); @@ -1598,7 +1600,7 @@ describe('v1.InterconnectAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectAttachmentsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_interconnect_locations_v1.ts b/packages/google-cloud-compute/test/gapic_interconnect_locations_v1.ts index dd3082ef147..f76312122b3 100644 --- a/packages/google-cloud-compute/test/gapic_interconnect_locations_v1.ts +++ b/packages/google-cloud-compute/test/gapic_interconnect_locations_v1.ts @@ -278,7 +278,9 @@ describe('v1.InterconnectLocationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.interconnectLocationsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.InterconnectLocationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectLocationRequest() ); @@ -377,7 +379,7 @@ describe('v1.InterconnectLocationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectLocationRequest() ); @@ -428,7 +430,7 @@ describe('v1.InterconnectLocationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectLocationRequest() ); @@ -461,7 +463,7 @@ describe('v1.InterconnectLocationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectLocationRequest() ); @@ -488,7 +490,7 @@ describe('v1.InterconnectLocationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectLocationsRequest() ); @@ -527,7 +529,7 @@ describe('v1.InterconnectLocationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectLocationsRequest() ); @@ -583,7 +585,7 @@ describe('v1.InterconnectLocationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectLocationsRequest() ); @@ -611,7 +613,7 @@ describe('v1.InterconnectLocationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectLocationsRequest() ); @@ -673,7 +675,7 @@ describe('v1.InterconnectLocationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectLocationsRequest() ); @@ -726,7 +728,7 @@ describe('v1.InterconnectLocationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectLocationsRequest() ); @@ -776,7 +778,7 @@ describe('v1.InterconnectLocationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectLocationsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_interconnect_remote_locations_v1.ts b/packages/google-cloud-compute/test/gapic_interconnect_remote_locations_v1.ts index 14501e77484..6569a72dd8e 100644 --- a/packages/google-cloud-compute/test/gapic_interconnect_remote_locations_v1.ts +++ b/packages/google-cloud-compute/test/gapic_interconnect_remote_locations_v1.ts @@ -284,7 +284,9 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.interconnectRemoteLocationsStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRemoteLocationRequest() ); @@ -393,7 +395,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRemoteLocationRequest() ); @@ -446,7 +448,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRemoteLocationRequest() ); @@ -481,7 +483,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRemoteLocationRequest() ); @@ -510,7 +512,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest() ); @@ -551,7 +553,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest() ); @@ -609,7 +611,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest() ); @@ -639,7 +641,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest() ); @@ -705,7 +707,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest() ); @@ -762,7 +764,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest() ); @@ -814,7 +816,7 @@ describe('v1.InterconnectRemoteLocationsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectRemoteLocationsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_interconnects_v1.ts b/packages/google-cloud-compute/test/gapic_interconnects_v1.ts index 47fecf9f09a..b66dee0138f 100644 --- a/packages/google-cloud-compute/test/gapic_interconnects_v1.ts +++ b/packages/google-cloud-compute/test/gapic_interconnects_v1.ts @@ -265,7 +265,9 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.interconnectsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectRequest() ); @@ -360,7 +362,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectRequest() ); @@ -412,7 +414,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectRequest() ); @@ -445,7 +447,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInterconnectRequest() ); @@ -471,7 +473,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRequest() ); @@ -506,7 +508,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRequest() ); @@ -556,7 +558,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRequest() ); @@ -588,7 +590,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetInterconnectRequest() ); @@ -614,7 +616,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest() ); @@ -650,7 +652,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest() ); @@ -702,7 +704,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest() ); @@ -738,7 +740,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest() ); @@ -764,7 +766,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMacsecConfigInterconnectRequest() ); @@ -800,7 +802,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMacsecConfigInterconnectRequest() ); @@ -852,7 +854,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMacsecConfigInterconnectRequest() ); @@ -888,7 +890,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMacsecConfigInterconnectRequest() ); @@ -914,7 +916,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectRequest() ); @@ -945,7 +947,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectRequest() ); @@ -992,7 +994,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectRequest() ); @@ -1020,7 +1022,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertInterconnectRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectRequest() ); @@ -1076,7 +1078,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectRequest() ); @@ -1126,7 +1128,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchInterconnectRequest() ); @@ -1184,7 +1186,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectRequest() ); @@ -1220,7 +1222,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectRequest() ); @@ -1305,7 +1307,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsInterconnectRequest() ); @@ -1331,7 +1333,7 @@ describe('v1.InterconnectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectsRequest() ); @@ -1369,7 +1371,7 @@ describe('v1.InterconnectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectsRequest() ); @@ -1422,7 +1424,7 @@ describe('v1.InterconnectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectsRequest() ); @@ -1449,7 +1451,7 @@ describe('v1.InterconnectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectsRequest() ); @@ -1509,7 +1511,7 @@ describe('v1.InterconnectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectsRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.InterconnectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectsRequest() ); @@ -1608,7 +1610,7 @@ describe('v1.InterconnectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInterconnectsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_license_codes_v1.ts b/packages/google-cloud-compute/test/gapic_license_codes_v1.ts index 9460f2afeba..07bb2576498 100644 --- a/packages/google-cloud-compute/test/gapic_license_codes_v1.ts +++ b/packages/google-cloud-compute/test/gapic_license_codes_v1.ts @@ -202,7 +202,9 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.licenseCodesStub); client.close().then(() => { done(); @@ -261,7 +263,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseCodeRequest() ); @@ -296,7 +298,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseCodeRequest() ); @@ -346,7 +348,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseCodeRequest() ); @@ -378,7 +380,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseCodeRequest() ); @@ -404,7 +406,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest() ); @@ -441,7 +443,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest() ); @@ -493,7 +495,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest() ); @@ -529,7 +531,7 @@ describe('v1.LicenseCodesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_licenses_v1.ts b/packages/google-cloud-compute/test/gapic_licenses_v1.ts index cfaccd0e150..8aa8240b765 100644 --- a/packages/google-cloud-compute/test/gapic_licenses_v1.ts +++ b/packages/google-cloud-compute/test/gapic_licenses_v1.ts @@ -263,7 +263,9 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.licensesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteLicenseRequest() ); @@ -358,7 +360,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteLicenseRequest() ); @@ -410,7 +412,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteLicenseRequest() ); @@ -443,7 +445,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteLicenseRequest() ); @@ -469,7 +471,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseRequest() ); @@ -504,7 +506,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseRequest() ); @@ -554,7 +556,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseRequest() ); @@ -586,7 +588,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetLicenseRequest() ); @@ -612,7 +614,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyLicenseRequest() ); @@ -648,7 +650,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyLicenseRequest() ); @@ -700,7 +702,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyLicenseRequest() ); @@ -736,7 +738,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyLicenseRequest() ); @@ -762,7 +764,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertLicenseRequest() ); @@ -793,7 +795,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertLicenseRequest() ); @@ -840,7 +842,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertLicenseRequest() ); @@ -868,7 +870,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertLicenseRequest() ); @@ -889,7 +891,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyLicenseRequest() ); @@ -925,7 +927,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyLicenseRequest() ); @@ -977,7 +979,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyLicenseRequest() ); @@ -1013,7 +1015,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyLicenseRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseRequest() ); @@ -1076,7 +1078,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsLicenseRequest() ); @@ -1190,7 +1192,7 @@ describe('v1.LicensesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListLicensesRequest() ); @@ -1222,7 +1224,7 @@ describe('v1.LicensesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListLicensesRequest() ); @@ -1269,7 +1271,7 @@ describe('v1.LicensesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListLicensesRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.LicensesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListLicensesRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.LicensesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListLicensesRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.LicensesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListLicensesRequest() ); @@ -1443,7 +1445,7 @@ describe('v1.LicensesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListLicensesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_machine_images_v1.ts b/packages/google-cloud-compute/test/gapic_machine_images_v1.ts index af8ed7c07b1..22ae3c74217 100644 --- a/packages/google-cloud-compute/test/gapic_machine_images_v1.ts +++ b/packages/google-cloud-compute/test/gapic_machine_images_v1.ts @@ -265,7 +265,9 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.machineImagesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteMachineImageRequest() ); @@ -360,7 +362,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteMachineImageRequest() ); @@ -412,7 +414,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteMachineImageRequest() ); @@ -445,7 +447,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteMachineImageRequest() ); @@ -471,7 +473,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineImageRequest() ); @@ -506,7 +508,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineImageRequest() ); @@ -556,7 +558,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineImageRequest() ); @@ -588,7 +590,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineImageRequest() ); @@ -614,7 +616,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyMachineImageRequest() ); @@ -650,7 +652,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyMachineImageRequest() ); @@ -702,7 +704,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyMachineImageRequest() ); @@ -738,7 +740,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyMachineImageRequest() ); @@ -764,7 +766,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertMachineImageRequest() ); @@ -795,7 +797,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertMachineImageRequest() ); @@ -842,7 +844,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertMachineImageRequest() ); @@ -870,7 +872,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertMachineImageRequest() ); @@ -891,7 +893,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyMachineImageRequest() ); @@ -927,7 +929,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyMachineImageRequest() ); @@ -979,7 +981,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyMachineImageRequest() ); @@ -1015,7 +1017,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyMachineImageRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest() ); @@ -1078,7 +1080,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest() ); @@ -1166,7 +1168,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.MachineImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineImagesRequest() ); @@ -1230,7 +1232,7 @@ describe('v1.MachineImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineImagesRequest() ); @@ -1283,7 +1285,7 @@ describe('v1.MachineImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineImagesRequest() ); @@ -1310,7 +1312,7 @@ describe('v1.MachineImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineImagesRequest() ); @@ -1370,7 +1372,7 @@ describe('v1.MachineImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineImagesRequest() ); @@ -1421,7 +1423,7 @@ describe('v1.MachineImagesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineImagesRequest() ); @@ -1469,7 +1471,7 @@ describe('v1.MachineImagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineImagesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_machine_types_v1.ts b/packages/google-cloud-compute/test/gapic_machine_types_v1.ts index 32e3690934f..05bde5116d4 100644 --- a/packages/google-cloud-compute/test/gapic_machine_types_v1.ts +++ b/packages/google-cloud-compute/test/gapic_machine_types_v1.ts @@ -265,7 +265,9 @@ describe('v1.MachineTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.machineTypesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.MachineTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineTypeRequest() ); @@ -364,7 +366,7 @@ describe('v1.MachineTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineTypeRequest() ); @@ -419,7 +421,7 @@ describe('v1.MachineTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineTypeRequest() ); @@ -456,7 +458,7 @@ describe('v1.MachineTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetMachineTypeRequest() ); @@ -487,7 +489,7 @@ describe('v1.MachineTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListMachineTypesRequest() ); @@ -547,7 +549,7 @@ describe('v1.MachineTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListMachineTypesRequest() ); @@ -591,7 +593,7 @@ describe('v1.MachineTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineTypesRequest() ); @@ -628,7 +630,7 @@ describe('v1.MachineTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineTypesRequest() ); @@ -680,7 +682,7 @@ describe('v1.MachineTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineTypesRequest() ); @@ -712,7 +714,7 @@ describe('v1.MachineTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineTypesRequest() ); @@ -771,7 +773,7 @@ describe('v1.MachineTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineTypesRequest() ); @@ -827,7 +829,7 @@ describe('v1.MachineTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineTypesRequest() ); @@ -874,7 +876,7 @@ describe('v1.MachineTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListMachineTypesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_network_attachments_v1.ts b/packages/google-cloud-compute/test/gapic_network_attachments_v1.ts index 8536aa262f4..f9110c8a76b 100644 --- a/packages/google-cloud-compute/test/gapic_network_attachments_v1.ts +++ b/packages/google-cloud-compute/test/gapic_network_attachments_v1.ts @@ -267,7 +267,9 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkAttachmentsStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkAttachmentRequest() ); @@ -367,7 +369,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkAttachmentRequest() ); @@ -424,7 +426,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkAttachmentRequest() ); @@ -462,7 +464,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkAttachmentRequest() ); @@ -493,7 +495,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkAttachmentRequest() ); @@ -533,7 +535,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkAttachmentRequest() ); @@ -588,7 +590,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkAttachmentRequest() ); @@ -625,7 +627,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkAttachmentRequest() ); @@ -656,7 +658,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest() ); @@ -697,7 +699,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest() ); @@ -754,7 +756,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest() ); @@ -795,7 +797,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkAttachmentRequest() ); @@ -826,7 +828,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkAttachmentRequest() ); @@ -862,7 +864,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkAttachmentRequest() ); @@ -914,7 +916,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkAttachmentRequest() ); @@ -947,7 +949,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkAttachmentRequest() ); @@ -973,7 +975,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkAttachmentRequest() ); @@ -1013,7 +1015,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkAttachmentRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkAttachmentRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkAttachmentRequest() ); @@ -1136,7 +1138,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest() ); @@ -1234,7 +1236,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkAttachmentRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkAttachmentRequest() ); @@ -1348,7 +1350,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkAttachmentRequest() ); @@ -1405,7 +1407,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkAttachmentRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkAttachmentRequest() ); @@ -1477,7 +1479,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.NetworkAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkAttachmentsRequest() ); @@ -1581,7 +1583,7 @@ describe('v1.NetworkAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkAttachmentsRequest() ); @@ -1624,7 +1626,7 @@ describe('v1.NetworkAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkAttachmentsRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.NetworkAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkAttachmentsRequest() ); @@ -1714,7 +1716,7 @@ describe('v1.NetworkAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkAttachmentsRequest() ); @@ -1780,7 +1782,7 @@ describe('v1.NetworkAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkAttachmentsRequest() ); @@ -1837,7 +1839,7 @@ describe('v1.NetworkAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkAttachmentsRequest() ); @@ -1890,7 +1892,7 @@ describe('v1.NetworkAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkAttachmentsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_network_edge_security_services_v1.ts b/packages/google-cloud-compute/test/gapic_network_edge_security_services_v1.ts index 5f8f238d634..85bcb653d89 100644 --- a/packages/google-cloud-compute/test/gapic_network_edge_security_services_v1.ts +++ b/packages/google-cloud-compute/test/gapic_network_edge_security_services_v1.ts @@ -284,7 +284,9 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkEdgeSecurityServicesStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest() ); @@ -399,7 +401,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest() ); @@ -459,7 +461,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest() ); @@ -500,7 +502,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest() ); @@ -534,7 +536,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest() ); @@ -577,7 +579,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest() ); @@ -635,7 +637,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest() ); @@ -675,7 +677,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest() ); @@ -709,7 +711,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest() ); @@ -748,7 +750,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest() ); @@ -803,7 +805,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest() ); @@ -839,7 +841,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest() ); @@ -868,7 +870,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest() ); @@ -911,7 +913,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest() ); @@ -969,7 +971,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest() ); @@ -1109,7 +1111,7 @@ describe('v1.NetworkEdgeSecurityServicesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_network_endpoint_groups_v1.ts b/packages/google-cloud-compute/test/gapic_network_endpoint_groups_v1.ts index 2cc216124a7..af1348c7c7a 100644 --- a/packages/google-cloud-compute/test/gapic_network_endpoint_groups_v1.ts +++ b/packages/google-cloud-compute/test/gapic_network_endpoint_groups_v1.ts @@ -278,7 +278,9 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkEndpointGroupsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -384,7 +386,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -442,7 +444,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -487,7 +489,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -522,7 +524,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest() ); @@ -564,7 +566,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest() ); @@ -622,7 +624,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest() ); @@ -661,7 +663,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest() ); @@ -693,7 +695,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -736,7 +738,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -794,7 +796,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -839,7 +841,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest() ); @@ -874,7 +876,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEndpointGroupRequest() ); @@ -915,7 +917,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEndpointGroupRequest() ); @@ -971,7 +973,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEndpointGroupRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkEndpointGroupRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest() ); @@ -1078,7 +1080,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest() ); @@ -1165,7 +1167,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest() ); @@ -1235,7 +1237,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest() ); @@ -1335,7 +1337,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest() ); @@ -1367,7 +1369,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsRequest() ); @@ -1431,7 +1433,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest() ); @@ -1523,7 +1525,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest() ); @@ -1584,7 +1586,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest() ); @@ -1617,7 +1619,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest() ); @@ -1742,7 +1744,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest() ); @@ -1797,7 +1799,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest() ); @@ -1847,7 +1849,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest() ); @@ -1898,7 +1900,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest() ); @@ -1966,7 +1968,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest() ); @@ -2008,7 +2010,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest() ); @@ -2082,7 +2084,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest() ); @@ -2145,7 +2147,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest() ); @@ -2206,7 +2208,7 @@ describe('v1.NetworkEndpointGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_network_firewall_policies_v1.ts b/packages/google-cloud-compute/test/gapic_network_firewall_policies_v1.ts index 8ac47fe29c2..bb5f64d720d 100644 --- a/packages/google-cloud-compute/test/gapic_network_firewall_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_network_firewall_policies_v1.ts @@ -278,7 +278,9 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkFirewallPoliciesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest() ); @@ -378,7 +380,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest() ); @@ -431,7 +433,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest() ); @@ -468,7 +470,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest() ); @@ -495,7 +497,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -533,7 +535,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -586,7 +588,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -626,7 +628,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -656,7 +658,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest() ); @@ -693,7 +695,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest() ); @@ -746,7 +748,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest() ); @@ -780,7 +782,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest() ); @@ -807,7 +809,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest() ); @@ -844,7 +846,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest() ); @@ -897,7 +899,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest() ); @@ -934,7 +936,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest() ); @@ -961,7 +963,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest() ); @@ -998,7 +1000,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest() ); @@ -1051,7 +1053,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest() ); @@ -1085,7 +1087,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest() ); @@ -1148,7 +1150,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest() ); @@ -1199,7 +1201,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest() ); @@ -1259,7 +1261,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest() ); @@ -1386,7 +1388,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest() ); @@ -1413,7 +1415,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest() ); @@ -1450,7 +1452,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest() ); @@ -1503,7 +1505,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest() ); @@ -1540,7 +1542,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest() ); @@ -1567,7 +1569,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -1605,7 +1607,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -1658,7 +1660,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -1698,7 +1700,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -1728,7 +1730,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest() ); @@ -1765,7 +1767,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest() ); @@ -1818,7 +1820,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest() ); @@ -1852,7 +1854,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest() ); @@ -1879,7 +1881,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest() ); @@ -1911,7 +1913,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest() ); @@ -1959,7 +1961,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest() ); @@ -1988,7 +1990,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest() ); @@ -2010,7 +2012,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest() ); @@ -2046,7 +2048,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest() ); @@ -2097,7 +2099,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest() ); @@ -2130,7 +2132,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest() ); @@ -2157,7 +2159,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2195,7 +2197,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2248,7 +2250,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2288,7 +2290,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2318,7 +2320,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest() ); @@ -2355,7 +2357,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest() ); @@ -2408,7 +2410,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest() ); @@ -2442,7 +2444,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest() ); @@ -2469,7 +2471,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest() ); @@ -2506,7 +2508,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest() ); @@ -2559,7 +2561,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest() ); @@ -2596,7 +2598,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest() ); @@ -2623,7 +2625,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2661,7 +2663,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2714,7 +2716,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2754,7 +2756,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePacketMirroringRuleNetworkFirewallPolicyRequest() ); @@ -2784,7 +2786,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest() ); @@ -2821,7 +2823,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest() ); @@ -2874,7 +2876,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest() ); @@ -2911,7 +2913,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest() ); @@ -2938,7 +2940,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest() ); @@ -2975,7 +2977,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest() ); @@ -3028,7 +3030,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest() ); @@ -3065,7 +3067,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest() ); @@ -3092,7 +3094,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest() ); @@ -3130,7 +3132,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest() ); @@ -3183,7 +3185,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest() ); @@ -3220,7 +3222,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest() ); @@ -3247,7 +3249,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkFirewallPoliciesRequest() ); @@ -3308,7 +3310,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNetworkFirewallPoliciesRequest() ); @@ -3353,7 +3355,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest() ); @@ -3392,7 +3394,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest() ); @@ -3446,7 +3448,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest() ); @@ -3474,7 +3476,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest() ); @@ -3535,7 +3537,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest() ); @@ -3587,7 +3589,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest() ); @@ -3636,7 +3638,7 @@ describe('v1.NetworkFirewallPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_network_profiles_v1.ts b/packages/google-cloud-compute/test/gapic_network_profiles_v1.ts index 075efba26b9..01fa1af913e 100644 --- a/packages/google-cloud-compute/test/gapic_network_profiles_v1.ts +++ b/packages/google-cloud-compute/test/gapic_network_profiles_v1.ts @@ -265,7 +265,9 @@ describe('v1.NetworkProfilesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkProfilesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.NetworkProfilesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkProfileRequest() ); @@ -359,7 +361,7 @@ describe('v1.NetworkProfilesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkProfileRequest() ); @@ -409,7 +411,7 @@ describe('v1.NetworkProfilesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkProfileRequest() ); @@ -441,7 +443,7 @@ describe('v1.NetworkProfilesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkProfileRequest() ); @@ -467,7 +469,7 @@ describe('v1.NetworkProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkProfilesRequest() ); @@ -505,7 +507,7 @@ describe('v1.NetworkProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkProfilesRequest() ); @@ -558,7 +560,7 @@ describe('v1.NetworkProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkProfilesRequest() ); @@ -585,7 +587,7 @@ describe('v1.NetworkProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkProfilesRequest() ); @@ -645,7 +647,7 @@ describe('v1.NetworkProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkProfilesRequest() ); @@ -696,7 +698,7 @@ describe('v1.NetworkProfilesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkProfilesRequest() ); @@ -744,7 +746,7 @@ describe('v1.NetworkProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkProfilesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_networks_v1.ts b/packages/google-cloud-compute/test/gapic_networks_v1.ts index fcc0c888393..75d7b3a0e6c 100644 --- a/packages/google-cloud-compute/test/gapic_networks_v1.ts +++ b/packages/google-cloud-compute/test/gapic_networks_v1.ts @@ -263,7 +263,9 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networksStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPeeringNetworkRequest() ); @@ -358,7 +360,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPeeringNetworkRequest() ); @@ -410,7 +412,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPeeringNetworkRequest() ); @@ -446,7 +448,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddPeeringNetworkRequest() ); @@ -472,7 +474,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkRequest() ); @@ -508,7 +510,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkRequest() ); @@ -560,7 +562,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkRequest() ); @@ -593,7 +595,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNetworkRequest() ); @@ -619,7 +621,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkRequest() ); @@ -654,7 +656,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkRequest() ); @@ -704,7 +706,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkRequest() ); @@ -736,7 +738,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNetworkRequest() ); @@ -762,7 +764,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest() ); @@ -799,7 +801,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest() ); @@ -851,7 +853,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest() ); @@ -890,7 +892,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest() ); @@ -919,7 +921,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkRequest() ); @@ -950,7 +952,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkRequest() ); @@ -997,7 +999,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkRequest() ); @@ -1025,7 +1027,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNetworkRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkRequest() ); @@ -1163,7 +1165,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNetworkRequest() ); @@ -1189,7 +1191,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePeeringNetworkRequest() ); @@ -1225,7 +1227,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePeeringNetworkRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePeeringNetworkRequest() ); @@ -1313,7 +1315,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemovePeeringNetworkRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest() ); @@ -1376,7 +1378,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest() ); @@ -1428,7 +1430,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest() ); @@ -1464,7 +1466,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest() ); @@ -1490,7 +1492,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePeeringNetworkRequest() ); @@ -1526,7 +1528,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePeeringNetworkRequest() ); @@ -1578,7 +1580,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePeeringNetworkRequest() ); @@ -1614,7 +1616,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePeeringNetworkRequest() ); @@ -1640,7 +1642,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworksRequest() ); @@ -1672,7 +1674,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworksRequest() ); @@ -1719,7 +1721,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworksRequest() ); @@ -1746,7 +1748,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworksRequest() ); @@ -1800,7 +1802,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworksRequest() ); @@ -1851,7 +1853,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworksRequest() ); @@ -1893,7 +1895,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworksRequest() ); @@ -1936,7 +1938,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest() ); @@ -1980,7 +1982,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest() ); @@ -2042,7 +2044,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest() ); @@ -2078,7 +2080,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest() ); @@ -2144,7 +2146,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest() ); @@ -2199,7 +2201,7 @@ describe('v1.NetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest() ); @@ -2254,7 +2256,7 @@ describe('v1.NetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_node_groups_v1.ts b/packages/google-cloud-compute/test/gapic_node_groups_v1.ts index 13b4fc7a81a..e9dd4e5f8db 100644 --- a/packages/google-cloud-compute/test/gapic_node_groups_v1.ts +++ b/packages/google-cloud-compute/test/gapic_node_groups_v1.ts @@ -263,7 +263,9 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.nodeGroupsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddNodesNodeGroupRequest() ); @@ -363,7 +365,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddNodesNodeGroupRequest() ); @@ -420,7 +422,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddNodesNodeGroupRequest() ); @@ -458,7 +460,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddNodesNodeGroupRequest() ); @@ -489,7 +491,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeGroupRequest() ); @@ -530,7 +532,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeGroupRequest() ); @@ -587,7 +589,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeGroupRequest() ); @@ -625,7 +627,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeGroupRequest() ); @@ -656,7 +658,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodesNodeGroupRequest() ); @@ -697,7 +699,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodesNodeGroupRequest() ); @@ -754,7 +756,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodesNodeGroupRequest() ); @@ -795,7 +797,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodesNodeGroupRequest() ); @@ -826,7 +828,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeGroupRequest() ); @@ -866,7 +868,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeGroupRequest() ); @@ -921,7 +923,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeGroupRequest() ); @@ -958,7 +960,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeGroupRequest() ); @@ -989,7 +991,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest() ); @@ -1030,7 +1032,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeGroupRequest() ); @@ -1195,7 +1197,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeGroupRequest() ); @@ -1247,7 +1249,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeGroupRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeGroupRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNodeGroupRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNodeGroupRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNodeGroupRequest() ); @@ -1438,7 +1440,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchNodeGroupRequest() ); @@ -1469,7 +1471,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest() ); @@ -1511,7 +1513,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest() ); @@ -1568,7 +1570,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest() ); @@ -1609,7 +1611,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest() ); @@ -1640,7 +1642,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest() ); @@ -1681,7 +1683,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest() ); @@ -1738,7 +1740,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest() ); @@ -1779,7 +1781,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest() ); @@ -1810,7 +1812,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest() ); @@ -1851,7 +1853,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest() ); @@ -1908,7 +1910,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest() ); @@ -1949,7 +1951,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest() ); @@ -1980,7 +1982,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest() ); @@ -2022,7 +2024,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest() ); @@ -2079,7 +2081,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest() ); @@ -2123,7 +2125,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SimulateMaintenanceEventNodeGroupRequest() ); @@ -2157,7 +2159,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest() ); @@ -2199,7 +2201,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest() ); @@ -2256,7 +2258,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest() ); @@ -2297,7 +2299,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest() ); @@ -2328,7 +2330,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNodeGroupsRequest() ); @@ -2388,7 +2390,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNodeGroupsRequest() ); @@ -2432,7 +2434,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeGroupsRequest() ); @@ -2469,7 +2471,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeGroupsRequest() ); @@ -2521,7 +2523,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeGroupsRequest() ); @@ -2553,7 +2555,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeGroupsRequest() ); @@ -2612,7 +2614,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeGroupsRequest() ); @@ -2668,7 +2670,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeGroupsRequest() ); @@ -2715,7 +2717,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeGroupsRequest() ); @@ -2763,7 +2765,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodesNodeGroupsRequest() ); @@ -2812,7 +2814,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodesNodeGroupsRequest() ); @@ -2877,7 +2879,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodesNodeGroupsRequest() ); @@ -2915,7 +2917,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodesNodeGroupsRequest() ); @@ -2985,7 +2987,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodesNodeGroupsRequest() ); @@ -3046,7 +3048,7 @@ describe('v1.NodeGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodesNodeGroupsRequest() ); @@ -3104,7 +3106,7 @@ describe('v1.NodeGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodesNodeGroupsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_node_templates_v1.ts b/packages/google-cloud-compute/test/gapic_node_templates_v1.ts index 38fc0830020..e65c601410f 100644 --- a/packages/google-cloud-compute/test/gapic_node_templates_v1.ts +++ b/packages/google-cloud-compute/test/gapic_node_templates_v1.ts @@ -265,7 +265,9 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.nodeTemplatesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeTemplateRequest() ); @@ -365,7 +367,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeTemplateRequest() ); @@ -422,7 +424,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeTemplateRequest() ); @@ -460,7 +462,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteNodeTemplateRequest() ); @@ -491,7 +493,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTemplateRequest() ); @@ -531,7 +533,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTemplateRequest() ); @@ -586,7 +588,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTemplateRequest() ); @@ -623,7 +625,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTemplateRequest() ); @@ -654,7 +656,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest() ); @@ -695,7 +697,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest() ); @@ -752,7 +754,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest() ); @@ -793,7 +795,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest() ); @@ -824,7 +826,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeTemplateRequest() ); @@ -860,7 +862,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeTemplateRequest() ); @@ -912,7 +914,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeTemplateRequest() ); @@ -945,7 +947,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertNodeTemplateRequest() ); @@ -971,7 +973,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest() ); @@ -1183,7 +1185,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest() ); @@ -1281,7 +1283,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest() ); @@ -1312,7 +1314,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest() ); @@ -1372,7 +1374,7 @@ describe('v1.NodeTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.NodeTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTemplatesRequest() ); @@ -1459,7 +1461,7 @@ describe('v1.NodeTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTemplatesRequest() ); @@ -1517,7 +1519,7 @@ describe('v1.NodeTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTemplatesRequest() ); @@ -1549,7 +1551,7 @@ describe('v1.NodeTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTemplatesRequest() ); @@ -1614,7 +1616,7 @@ describe('v1.NodeTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTemplatesRequest() ); @@ -1670,7 +1672,7 @@ describe('v1.NodeTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTemplatesRequest() ); @@ -1723,7 +1725,7 @@ describe('v1.NodeTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTemplatesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_node_types_v1.ts b/packages/google-cloud-compute/test/gapic_node_types_v1.ts index 3284b82507a..2426c0512fe 100644 --- a/packages/google-cloud-compute/test/gapic_node_types_v1.ts +++ b/packages/google-cloud-compute/test/gapic_node_types_v1.ts @@ -263,7 +263,9 @@ describe('v1.NodeTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.nodeTypesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.NodeTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTypeRequest() ); @@ -362,7 +364,7 @@ describe('v1.NodeTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTypeRequest() ); @@ -417,7 +419,7 @@ describe('v1.NodeTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTypeRequest() ); @@ -454,7 +456,7 @@ describe('v1.NodeTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNodeTypeRequest() ); @@ -485,7 +487,7 @@ describe('v1.NodeTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNodeTypesRequest() ); @@ -545,7 +547,7 @@ describe('v1.NodeTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListNodeTypesRequest() ); @@ -589,7 +591,7 @@ describe('v1.NodeTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTypesRequest() ); @@ -626,7 +628,7 @@ describe('v1.NodeTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTypesRequest() ); @@ -678,7 +680,7 @@ describe('v1.NodeTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTypesRequest() ); @@ -710,7 +712,7 @@ describe('v1.NodeTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTypesRequest() ); @@ -769,7 +771,7 @@ describe('v1.NodeTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTypesRequest() ); @@ -825,7 +827,7 @@ describe('v1.NodeTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTypesRequest() ); @@ -872,7 +874,7 @@ describe('v1.NodeTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNodeTypesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_packet_mirrorings_v1.ts b/packages/google-cloud-compute/test/gapic_packet_mirrorings_v1.ts index 44c346dc652..60f1ce19ba6 100644 --- a/packages/google-cloud-compute/test/gapic_packet_mirrorings_v1.ts +++ b/packages/google-cloud-compute/test/gapic_packet_mirrorings_v1.ts @@ -265,7 +265,9 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.packetMirroringsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePacketMirroringRequest() ); @@ -365,7 +367,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePacketMirroringRequest() ); @@ -422,7 +424,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePacketMirroringRequest() ); @@ -460,7 +462,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePacketMirroringRequest() ); @@ -491,7 +493,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRequest() ); @@ -531,7 +533,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRequest() ); @@ -586,7 +588,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRequest() ); @@ -623,7 +625,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPacketMirroringRequest() ); @@ -654,7 +656,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPacketMirroringRequest() ); @@ -690,7 +692,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPacketMirroringRequest() ); @@ -742,7 +744,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPacketMirroringRequest() ); @@ -775,7 +777,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPacketMirroringRequest() ); @@ -801,7 +803,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRequest() ); @@ -841,7 +843,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRequest() ); @@ -896,7 +898,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRequest() ); @@ -933,7 +935,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPacketMirroringRequest() ); @@ -964,7 +966,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest() ); @@ -1006,7 +1008,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest() ); @@ -1063,7 +1065,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest() ); @@ -1104,7 +1106,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest() ); @@ -1195,7 +1197,7 @@ describe('v1.PacketMirroringsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.PacketMirroringsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPacketMirroringsRequest() ); @@ -1282,7 +1284,7 @@ describe('v1.PacketMirroringsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPacketMirroringsRequest() ); @@ -1340,7 +1342,7 @@ describe('v1.PacketMirroringsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPacketMirroringsRequest() ); @@ -1372,7 +1374,7 @@ describe('v1.PacketMirroringsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPacketMirroringsRequest() ); @@ -1437,7 +1439,7 @@ describe('v1.PacketMirroringsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPacketMirroringsRequest() ); @@ -1493,7 +1495,7 @@ describe('v1.PacketMirroringsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPacketMirroringsRequest() ); @@ -1546,7 +1548,7 @@ describe('v1.PacketMirroringsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPacketMirroringsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_projects_v1.ts b/packages/google-cloud-compute/test/gapic_projects_v1.ts index 03dcf835f56..9d9844fbe36 100644 --- a/packages/google-cloud-compute/test/gapic_projects_v1.ts +++ b/packages/google-cloud-compute/test/gapic_projects_v1.ts @@ -263,7 +263,9 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.projectsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnHostProjectRequest() ); @@ -353,7 +355,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnHostProjectRequest() ); @@ -400,7 +402,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnHostProjectRequest() ); @@ -431,7 +433,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnHostProjectRequest() ); @@ -452,7 +454,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnResourceProjectRequest() ); @@ -484,7 +486,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnResourceProjectRequest() ); @@ -531,7 +533,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnResourceProjectRequest() ); @@ -562,7 +564,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DisableXpnResourceProjectRequest() ); @@ -583,7 +585,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnHostProjectRequest() ); @@ -614,7 +616,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnHostProjectRequest() ); @@ -661,7 +663,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnHostProjectRequest() ); @@ -692,7 +694,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnHostProjectRequest() ); @@ -713,7 +715,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnResourceProjectRequest() ); @@ -744,7 +746,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnResourceProjectRequest() ); @@ -791,7 +793,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnResourceProjectRequest() ); @@ -822,7 +824,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.EnableXpnResourceProjectRequest() ); @@ -843,7 +845,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetProjectRequest() ); @@ -873,7 +875,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetProjectRequest() ); @@ -918,7 +920,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetProjectRequest() ); @@ -945,7 +947,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetProjectRequest() ); @@ -966,7 +968,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnHostProjectRequest() ); @@ -997,7 +999,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnHostProjectRequest() ); @@ -1044,7 +1046,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnHostProjectRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnHostProjectRequest() ); @@ -1096,7 +1098,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveDiskProjectRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveDiskProjectRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveDiskProjectRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveDiskProjectRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveInstanceProjectRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveInstanceProjectRequest() ); @@ -1301,7 +1303,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveInstanceProjectRequest() ); @@ -1332,7 +1334,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.MoveInstanceProjectRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCloudArmorTierProjectRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCloudArmorTierProjectRequest() ); @@ -1431,7 +1433,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCloudArmorTierProjectRequest() ); @@ -1462,7 +1464,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCloudArmorTierProjectRequest() ); @@ -1483,7 +1485,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest() ); @@ -1515,7 +1517,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest() ); @@ -1562,7 +1564,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest() ); @@ -1596,7 +1598,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest() ); @@ -1652,7 +1654,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest() ); @@ -1699,7 +1701,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest() ); @@ -1733,7 +1735,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest() ); @@ -1757,7 +1759,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUsageExportBucketProjectRequest() ); @@ -1789,7 +1791,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUsageExportBucketProjectRequest() ); @@ -1836,7 +1838,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUsageExportBucketProjectRequest() ); @@ -1867,7 +1869,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUsageExportBucketProjectRequest() ); @@ -1888,7 +1890,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnResourcesProjectsRequest() ); @@ -1927,7 +1929,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnResourcesProjectsRequest() ); @@ -1982,7 +1984,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnResourcesProjectsRequest() ); @@ -2013,7 +2015,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnResourcesProjectsRequest() ); @@ -2073,7 +2075,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnResourcesProjectsRequest() ); @@ -2122,7 +2124,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnResourcesProjectsRequest() ); @@ -2171,7 +2173,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetXpnResourcesProjectsRequest() ); @@ -2213,7 +2215,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListXpnHostsProjectsRequest() ); @@ -2246,7 +2248,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListXpnHostsProjectsRequest() ); @@ -2295,7 +2297,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListXpnHostsProjectsRequest() ); @@ -2326,7 +2328,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListXpnHostsProjectsRequest() ); @@ -2380,7 +2382,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListXpnHostsProjectsRequest() ); @@ -2431,7 +2433,7 @@ describe('v1.ProjectsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListXpnHostsProjectsRequest() ); @@ -2474,7 +2476,7 @@ describe('v1.ProjectsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListXpnHostsProjectsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_public_advertised_prefixes_v1.ts b/packages/google-cloud-compute/test/gapic_public_advertised_prefixes_v1.ts index 429c7d4180d..61d6c09cca0 100644 --- a/packages/google-cloud-compute/test/gapic_public_advertised_prefixes_v1.ts +++ b/packages/google-cloud-compute/test/gapic_public_advertised_prefixes_v1.ts @@ -278,7 +278,9 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.publicAdvertisedPrefixesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicAdvertisedPrefixeRequest() ); @@ -378,7 +380,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicAdvertisedPrefixeRequest() ); @@ -431,7 +433,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicAdvertisedPrefixeRequest() ); @@ -465,7 +467,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicAdvertisedPrefixeRequest() ); @@ -492,7 +494,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest() ); @@ -529,7 +531,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest() ); @@ -582,7 +584,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest() ); @@ -616,7 +618,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest() ); @@ -643,7 +645,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest() ); @@ -679,7 +681,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest() ); @@ -730,7 +732,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest() ); @@ -763,7 +765,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest() ); @@ -790,7 +792,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest() ); @@ -822,7 +824,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest() ); @@ -870,7 +872,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest() ); @@ -899,7 +901,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest() ); @@ -921,7 +923,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest() ); @@ -957,7 +959,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest() ); @@ -1008,7 +1010,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicAdvertisedPrefixeRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicAdvertisedPrefixeRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicAdvertisedPrefixeRequest() ); @@ -1192,7 +1194,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicAdvertisedPrefixeRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest() ); @@ -1258,7 +1260,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest() ); @@ -1404,7 +1406,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest() ); @@ -1457,7 +1459,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest() ); @@ -1507,7 +1509,7 @@ describe('v1.PublicAdvertisedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_public_delegated_prefixes_v1.ts b/packages/google-cloud-compute/test/gapic_public_delegated_prefixes_v1.ts index 80bf97c3f3e..75ca633455c 100644 --- a/packages/google-cloud-compute/test/gapic_public_delegated_prefixes_v1.ts +++ b/packages/google-cloud-compute/test/gapic_public_delegated_prefixes_v1.ts @@ -278,7 +278,9 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.publicDelegatedPrefixesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicDelegatedPrefixeRequest() ); @@ -383,7 +385,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicDelegatedPrefixeRequest() ); @@ -441,7 +443,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicDelegatedPrefixeRequest() ); @@ -480,7 +482,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AnnouncePublicDelegatedPrefixeRequest() ); @@ -512,7 +514,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest() ); @@ -554,7 +556,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest() ); @@ -612,7 +614,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest() ); @@ -651,7 +653,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest() ); @@ -683,7 +685,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest() ); @@ -724,7 +726,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest() ); @@ -780,7 +782,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest() ); @@ -818,7 +820,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest() ); @@ -850,7 +852,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest() ); @@ -887,7 +889,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest() ); @@ -940,7 +942,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest() ); @@ -974,7 +976,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest() ); @@ -1136,7 +1138,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest() ); @@ -1168,7 +1170,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicDelegatedPrefixeRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicDelegatedPrefixeRequest() ); @@ -1268,7 +1270,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicDelegatedPrefixeRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WithdrawPublicDelegatedPrefixeRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest() ); @@ -1403,7 +1405,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest() ); @@ -1451,7 +1453,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest() ); @@ -1495,7 +1497,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest() ); @@ -1556,7 +1558,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest() ); @@ -1589,7 +1591,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest() ); @@ -1656,7 +1658,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest() ); @@ -1714,7 +1716,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest() ); @@ -1769,7 +1771,7 @@ describe('v1.PublicDelegatedPrefixesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_autoscalers_v1.ts b/packages/google-cloud-compute/test/gapic_region_autoscalers_v1.ts index 0e7bf8aa92a..2d80968f8cb 100644 --- a/packages/google-cloud-compute/test/gapic_region_autoscalers_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_autoscalers_v1.ts @@ -266,7 +266,9 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionAutoscalersStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionAutoscalerRequest() ); @@ -366,7 +368,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionAutoscalerRequest() ); @@ -423,7 +425,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionAutoscalerRequest() ); @@ -461,7 +463,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionAutoscalerRequest() ); @@ -492,7 +494,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionAutoscalerRequest() ); @@ -532,7 +534,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionAutoscalerRequest() ); @@ -587,7 +589,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionAutoscalerRequest() ); @@ -624,7 +626,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionAutoscalerRequest() ); @@ -655,7 +657,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionAutoscalerRequest() ); @@ -691,7 +693,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionAutoscalerRequest() ); @@ -743,7 +745,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionAutoscalerRequest() ); @@ -776,7 +778,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionAutoscalerRequest() ); @@ -802,7 +804,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionAutoscalerRequest() ); @@ -837,7 +839,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionAutoscalerRequest() ); @@ -887,7 +889,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionAutoscalerRequest() ); @@ -919,7 +921,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionAutoscalerRequest() ); @@ -945,7 +947,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionAutoscalerRequest() ); @@ -981,7 +983,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionAutoscalerRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionAutoscalerRequest() ); @@ -1066,7 +1068,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionAutoscalerRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.RegionAutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionAutoscalersRequest() ); @@ -1129,7 +1131,7 @@ describe('v1.RegionAutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionAutoscalersRequest() ); @@ -1181,7 +1183,7 @@ describe('v1.RegionAutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionAutoscalersRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.RegionAutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionAutoscalersRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.RegionAutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionAutoscalersRequest() ); @@ -1328,7 +1330,7 @@ describe('v1.RegionAutoscalersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionAutoscalersRequest() ); @@ -1375,7 +1377,7 @@ describe('v1.RegionAutoscalersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionAutoscalersRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_backend_services_v1.ts b/packages/google-cloud-compute/test/gapic_region_backend_services_v1.ts index 97ae3f1a52a..ac2eb304897 100644 --- a/packages/google-cloud-compute/test/gapic_region_backend_services_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_backend_services_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionBackendServicesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionBackendServiceRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionBackendServiceRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionBackendServiceRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionBackendServiceRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionBackendServiceRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionBackendServiceRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionBackendServiceRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionBackendServiceRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest() ); @@ -721,7 +723,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest() ); @@ -779,7 +781,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest() ); @@ -818,7 +820,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest() ); @@ -850,7 +852,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest() ); @@ -892,7 +894,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest() ); @@ -950,7 +952,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest() ); @@ -992,7 +994,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest() ); @@ -1024,7 +1026,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionBackendServiceRequest() ); @@ -1061,7 +1063,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionBackendServiceRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionBackendServiceRequest() ); @@ -1148,7 +1150,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionBackendServiceRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionBackendServiceRequest() ); @@ -1216,7 +1218,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionBackendServiceRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionBackendServiceRequest() ); @@ -1310,7 +1312,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionBackendServiceRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest() ); @@ -1442,7 +1444,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest() ); @@ -1484,7 +1486,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest() ); @@ -1516,7 +1518,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyRegionBackendServiceRequest() ); @@ -1558,7 +1560,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyRegionBackendServiceRequest() ); @@ -1616,7 +1618,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyRegionBackendServiceRequest() ); @@ -1658,7 +1660,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyRegionBackendServiceRequest() ); @@ -1690,7 +1692,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionBackendServiceRequest() ); @@ -1733,7 +1735,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionBackendServiceRequest() ); @@ -1791,7 +1793,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionBackendServiceRequest() ); @@ -1833,7 +1835,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionBackendServiceRequest() ); @@ -1865,7 +1867,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionBackendServiceRequest() ); @@ -1907,7 +1909,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionBackendServiceRequest() ); @@ -1965,7 +1967,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionBackendServiceRequest() ); @@ -2004,7 +2006,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionBackendServiceRequest() ); @@ -2036,7 +2038,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionBackendServicesRequest() ); @@ -2080,7 +2082,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionBackendServicesRequest() ); @@ -2139,7 +2141,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionBackendServicesRequest() ); @@ -2172,7 +2174,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionBackendServicesRequest() ); @@ -2238,7 +2240,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionBackendServicesRequest() ); @@ -2295,7 +2297,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionBackendServicesRequest() ); @@ -2349,7 +2351,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionBackendServicesRequest() ); @@ -2398,7 +2400,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest() ); @@ -2443,7 +2445,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest() ); @@ -2504,7 +2506,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest() ); @@ -2541,7 +2543,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest() ); @@ -2607,7 +2609,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest() ); @@ -2664,7 +2666,7 @@ describe('v1.RegionBackendServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest() ); @@ -2719,7 +2721,7 @@ describe('v1.RegionBackendServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableRegionBackendServicesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_commitments_v1.ts b/packages/google-cloud-compute/test/gapic_region_commitments_v1.ts index dc291c51f65..f7dccebfca5 100644 --- a/packages/google-cloud-compute/test/gapic_region_commitments_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_commitments_v1.ts @@ -266,7 +266,9 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionCommitmentsStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionCommitmentRequest() ); @@ -365,7 +367,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionCommitmentRequest() ); @@ -420,7 +422,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionCommitmentRequest() ); @@ -457,7 +459,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionCommitmentRequest() ); @@ -488,7 +490,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionCommitmentRequest() ); @@ -524,7 +526,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionCommitmentRequest() ); @@ -576,7 +578,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionCommitmentRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionCommitmentRequest() ); @@ -635,7 +637,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionCommitmentRequest() ); @@ -676,7 +678,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionCommitmentRequest() ); @@ -733,7 +735,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionCommitmentRequest() ); @@ -771,7 +773,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionCommitmentRequest() ); @@ -802,7 +804,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest() ); @@ -862,7 +864,7 @@ describe('v1.RegionCommitmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest() ); @@ -906,7 +908,7 @@ describe('v1.RegionCommitmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionCommitmentsRequest() ); @@ -943,7 +945,7 @@ describe('v1.RegionCommitmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionCommitmentsRequest() ); @@ -995,7 +997,7 @@ describe('v1.RegionCommitmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionCommitmentsRequest() ); @@ -1027,7 +1029,7 @@ describe('v1.RegionCommitmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionCommitmentsRequest() ); @@ -1086,7 +1088,7 @@ describe('v1.RegionCommitmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionCommitmentsRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.RegionCommitmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionCommitmentsRequest() ); @@ -1189,7 +1191,7 @@ describe('v1.RegionCommitmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionCommitmentsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_disk_types_v1.ts b/packages/google-cloud-compute/test/gapic_region_disk_types_v1.ts index 2166ca28486..4aefbb24b7d 100644 --- a/packages/google-cloud-compute/test/gapic_region_disk_types_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_disk_types_v1.ts @@ -265,7 +265,9 @@ describe('v1.RegionDiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionDiskTypesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.RegionDiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskTypeRequest() ); @@ -364,7 +366,7 @@ describe('v1.RegionDiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskTypeRequest() ); @@ -419,7 +421,7 @@ describe('v1.RegionDiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskTypeRequest() ); @@ -456,7 +458,7 @@ describe('v1.RegionDiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskTypeRequest() ); @@ -487,7 +489,7 @@ describe('v1.RegionDiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDiskTypesRequest() ); @@ -524,7 +526,7 @@ describe('v1.RegionDiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDiskTypesRequest() ); @@ -576,7 +578,7 @@ describe('v1.RegionDiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDiskTypesRequest() ); @@ -608,7 +610,7 @@ describe('v1.RegionDiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDiskTypesRequest() ); @@ -667,7 +669,7 @@ describe('v1.RegionDiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDiskTypesRequest() ); @@ -723,7 +725,7 @@ describe('v1.RegionDiskTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDiskTypesRequest() ); @@ -770,7 +772,7 @@ describe('v1.RegionDiskTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDiskTypesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_disks_v1.ts b/packages/google-cloud-compute/test/gapic_region_disks_v1.ts index a774556d4c7..9cc7c1aa1db 100644 --- a/packages/google-cloud-compute/test/gapic_region_disks_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_disks_v1.ts @@ -263,7 +263,9 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionDisksStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest() ); @@ -364,7 +366,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest() ); @@ -421,7 +423,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest() ); @@ -462,7 +464,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest() ); @@ -493,7 +495,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionDiskRequest() ); @@ -529,7 +531,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionDiskRequest() ); @@ -581,7 +583,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionDiskRequest() ); @@ -617,7 +619,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionDiskRequest() ); @@ -643,7 +645,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest() ); @@ -684,7 +686,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest() ); @@ -741,7 +743,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest() ); @@ -782,7 +784,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest() ); @@ -813,7 +815,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionDiskRequest() ); @@ -854,7 +856,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionDiskRequest() ); @@ -911,7 +913,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionDiskRequest() ); @@ -949,7 +951,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionDiskRequest() ); @@ -980,7 +982,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskRequest() ); @@ -1020,7 +1022,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionDiskRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest() ); @@ -1184,7 +1186,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest() ); @@ -1282,7 +1284,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest() ); @@ -1313,7 +1315,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionDiskRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionDiskRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionDiskRequest() ); @@ -1434,7 +1436,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionDiskRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest() ); @@ -1559,7 +1561,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest() ); @@ -1603,7 +1605,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest() ); @@ -1637,7 +1639,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionDiskRequest() ); @@ -1678,7 +1680,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionDiskRequest() ); @@ -1735,7 +1737,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionDiskRequest() ); @@ -1773,7 +1775,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionDiskRequest() ); @@ -1804,7 +1806,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest() ); @@ -1845,7 +1847,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest() ); @@ -1902,7 +1904,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest() ); @@ -1943,7 +1945,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest() ); @@ -1974,7 +1976,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionDiskRequest() ); @@ -2015,7 +2017,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionDiskRequest() ); @@ -2072,7 +2074,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionDiskRequest() ); @@ -2110,7 +2112,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionDiskRequest() ); @@ -2141,7 +2143,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationRegionDiskRequest() ); @@ -2183,7 +2185,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationRegionDiskRequest() ); @@ -2240,7 +2242,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationRegionDiskRequest() ); @@ -2284,7 +2286,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartAsyncReplicationRegionDiskRequest() ); @@ -2318,7 +2320,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationRegionDiskRequest() ); @@ -2360,7 +2362,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationRegionDiskRequest() ); @@ -2417,7 +2419,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationRegionDiskRequest() ); @@ -2458,7 +2460,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopAsyncReplicationRegionDiskRequest() ); @@ -2489,7 +2491,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationRegionDiskRequest() ); @@ -2526,7 +2528,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationRegionDiskRequest() ); @@ -2578,7 +2580,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationRegionDiskRequest() ); @@ -2617,7 +2619,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopGroupAsyncReplicationRegionDiskRequest() ); @@ -2646,7 +2648,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest() ); @@ -2688,7 +2690,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest() ); @@ -2745,7 +2747,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest() ); @@ -2786,7 +2788,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest() ); @@ -2817,7 +2819,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionDiskRequest() ); @@ -2858,7 +2860,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionDiskRequest() ); @@ -2915,7 +2917,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionDiskRequest() ); @@ -2953,7 +2955,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionDiskRequest() ); @@ -2984,7 +2986,7 @@ describe('v1.RegionDisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDisksRequest() ); @@ -3021,7 +3023,7 @@ describe('v1.RegionDisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDisksRequest() ); @@ -3073,7 +3075,7 @@ describe('v1.RegionDisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDisksRequest() ); @@ -3105,7 +3107,7 @@ describe('v1.RegionDisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDisksRequest() ); @@ -3161,7 +3163,7 @@ describe('v1.RegionDisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDisksRequest() ); @@ -3214,7 +3216,7 @@ describe('v1.RegionDisksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDisksRequest() ); @@ -3261,7 +3263,7 @@ describe('v1.RegionDisksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionDisksRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_health_check_services_v1.ts b/packages/google-cloud-compute/test/gapic_region_health_check_services_v1.ts index 2f5cf7ac948..0eaf29b6d01 100644 --- a/packages/google-cloud-compute/test/gapic_region_health_check_services_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_health_check_services_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionHealthCheckServicesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest() ); @@ -716,7 +718,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest() ); @@ -769,7 +771,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest() ); @@ -830,7 +832,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest() ); @@ -871,7 +873,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest() ); @@ -927,7 +929,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest() ); @@ -965,7 +967,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest() ); @@ -997,7 +999,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest() ); @@ -1100,7 +1102,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest() ); @@ -1258,7 +1260,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest() ); @@ -1313,7 +1315,7 @@ describe('v1.RegionHealthCheckServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_health_checks_v1.ts b/packages/google-cloud-compute/test/gapic_region_health_checks_v1.ts index 4a77fa83ab5..b5a0bf0c338 100644 --- a/packages/google-cloud-compute/test/gapic_region_health_checks_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_health_checks_v1.ts @@ -267,7 +267,9 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionHealthChecksStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckRequest() ); @@ -367,7 +369,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckRequest() ); @@ -424,7 +426,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckRequest() ); @@ -462,7 +464,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionHealthCheckRequest() ); @@ -493,7 +495,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckRequest() ); @@ -533,7 +535,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckRequest() ); @@ -588,7 +590,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckRequest() ); @@ -625,7 +627,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionHealthCheckRequest() ); @@ -656,7 +658,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckRequest() ); @@ -692,7 +694,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckRequest() ); @@ -744,7 +746,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckRequest() ); @@ -777,7 +779,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionHealthCheckRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckRequest() ); @@ -843,7 +845,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckRequest() ); @@ -898,7 +900,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckRequest() ); @@ -935,7 +937,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionHealthCheckRequest() ); @@ -966,7 +968,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionHealthCheckRequest() ); @@ -1007,7 +1009,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionHealthCheckRequest() ); @@ -1064,7 +1066,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionHealthCheckRequest() ); @@ -1102,7 +1104,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionHealthCheckRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.RegionHealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthChecksRequest() ); @@ -1170,7 +1172,7 @@ describe('v1.RegionHealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthChecksRequest() ); @@ -1222,7 +1224,7 @@ describe('v1.RegionHealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthChecksRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.RegionHealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthChecksRequest() ); @@ -1313,7 +1315,7 @@ describe('v1.RegionHealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthChecksRequest() ); @@ -1369,7 +1371,7 @@ describe('v1.RegionHealthChecksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthChecksRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.RegionHealthChecksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionHealthChecksRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_instance_group_managers_v1.ts b/packages/google-cloud-compute/test/gapic_region_instance_group_managers_v1.ts index 6a315fa8db0..55ef896e121 100644 --- a/packages/google-cloud-compute/test/gapic_region_instance_group_managers_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_instance_group_managers_v1.ts @@ -284,7 +284,9 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionInstanceGroupManagersStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest() ); @@ -399,7 +401,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest() ); @@ -459,7 +461,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest() ); @@ -503,7 +505,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest() ); @@ -537,7 +539,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest() ); @@ -582,7 +584,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest() ); @@ -642,7 +644,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest() ); @@ -689,7 +691,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest() ); @@ -726,7 +728,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest() ); @@ -770,7 +772,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest() ); @@ -830,7 +832,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest() ); @@ -874,7 +876,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest() ); @@ -908,7 +910,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest() ); @@ -952,7 +954,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest() ); @@ -1053,7 +1055,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest() ); @@ -1191,7 +1193,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest() ); @@ -1235,7 +1237,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest() ); @@ -1269,7 +1271,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -1374,7 +1376,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -1421,7 +1423,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -1458,7 +1460,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest() ); @@ -1501,7 +1503,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest() ); @@ -1559,7 +1561,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest() ); @@ -1599,7 +1601,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest() ); @@ -1633,7 +1635,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest() ); @@ -1672,7 +1674,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest() ); @@ -1727,7 +1729,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest() ); @@ -1792,7 +1794,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest() ); @@ -1835,7 +1837,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest() ); @@ -1893,7 +1895,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest() ); @@ -1933,7 +1935,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest() ); @@ -1967,7 +1969,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -2012,7 +2014,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -2072,7 +2074,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -2119,7 +2121,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -2156,7 +2158,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest() ); @@ -2200,7 +2202,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest() ); @@ -2260,7 +2262,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest() ); @@ -2304,7 +2306,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest() ); @@ -2338,7 +2340,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest() ); @@ -2382,7 +2384,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest() ); @@ -2442,7 +2444,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest() ); @@ -2483,7 +2485,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest() ); @@ -2517,7 +2519,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesRegionInstanceGroupManagerRequest() ); @@ -2561,7 +2563,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesRegionInstanceGroupManagerRequest() ); @@ -2621,7 +2623,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesRegionInstanceGroupManagerRequest() ); @@ -2665,7 +2667,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResumeInstancesRegionInstanceGroupManagerRequest() ); @@ -2699,7 +2701,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest() ); @@ -2744,7 +2746,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest() ); @@ -2804,7 +2806,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest() ); @@ -2848,7 +2850,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest() ); @@ -2882,7 +2884,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest() ); @@ -2926,7 +2928,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest() ); @@ -2986,7 +2988,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest() ); @@ -3030,7 +3032,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest() ); @@ -3064,7 +3066,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesRegionInstanceGroupManagerRequest() ); @@ -3108,7 +3110,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesRegionInstanceGroupManagerRequest() ); @@ -3168,7 +3170,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesRegionInstanceGroupManagerRequest() ); @@ -3212,7 +3214,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StartInstancesRegionInstanceGroupManagerRequest() ); @@ -3246,7 +3248,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesRegionInstanceGroupManagerRequest() ); @@ -3290,7 +3292,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesRegionInstanceGroupManagerRequest() ); @@ -3350,7 +3352,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesRegionInstanceGroupManagerRequest() ); @@ -3394,7 +3396,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.StopInstancesRegionInstanceGroupManagerRequest() ); @@ -3428,7 +3430,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesRegionInstanceGroupManagerRequest() ); @@ -3472,7 +3474,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesRegionInstanceGroupManagerRequest() ); @@ -3532,7 +3534,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesRegionInstanceGroupManagerRequest() ); @@ -3576,7 +3578,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SuspendInstancesRegionInstanceGroupManagerRequest() ); @@ -3610,7 +3612,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -3655,7 +3657,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -3715,7 +3717,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -3762,7 +3764,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest() ); @@ -3799,7 +3801,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest() ); @@ -3845,7 +3847,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest() ); @@ -3908,7 +3910,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest() ); @@ -3943,7 +3945,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest() ); @@ -4012,7 +4014,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest() ); @@ -4072,7 +4074,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest() ); @@ -4129,7 +4131,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest() ); @@ -4181,7 +4183,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest() ); @@ -4233,7 +4235,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest() ); @@ -4303,7 +4305,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest() ); @@ -4347,7 +4349,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest() ); @@ -4423,7 +4425,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest() ); @@ -4490,7 +4492,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest() ); @@ -4553,7 +4555,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest() ); @@ -4611,7 +4613,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest() ); @@ -4664,7 +4666,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest() ); @@ -4732,7 +4734,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest() ); @@ -4776,7 +4778,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest() ); @@ -4849,7 +4851,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest() ); @@ -4911,7 +4913,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest() ); @@ -4973,7 +4975,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest() ); @@ -5028,7 +5030,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest() ); @@ -5081,7 +5083,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest() ); @@ -5149,7 +5151,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest() ); @@ -5196,7 +5198,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest() ); @@ -5276,7 +5278,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest() ); @@ -5345,7 +5347,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest() ); @@ -5411,7 +5413,7 @@ describe('v1.RegionInstanceGroupManagersClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_instance_groups_v1.ts b/packages/google-cloud-compute/test/gapic_region_instance_groups_v1.ts index b3a66ffa283..b73a6166197 100644 --- a/packages/google-cloud-compute/test/gapic_region_instance_groups_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_instance_groups_v1.ts @@ -276,7 +276,9 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionInstanceGroupsStub); client.close().then(() => { done(); @@ -339,7 +341,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupRequest() ); @@ -380,7 +382,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupRequest() ); @@ -436,7 +438,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupRequest() ); @@ -474,7 +476,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceGroupRequest() ); @@ -506,7 +508,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest() ); @@ -548,7 +550,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest() ); @@ -606,7 +608,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest() ); @@ -648,7 +650,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest() ); @@ -680,7 +682,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupsRequest() ); @@ -724,7 +726,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupsRequest() ); @@ -783,7 +785,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupsRequest() ); @@ -816,7 +818,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupsRequest() ); @@ -882,7 +884,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupsRequest() ); @@ -939,7 +941,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupsRequest() ); @@ -993,7 +995,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceGroupsRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest() ); @@ -1274,7 +1276,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest() ); @@ -1335,7 +1337,7 @@ describe('v1.RegionInstanceGroupsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest() ); @@ -1396,7 +1398,7 @@ describe('v1.RegionInstanceGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_instance_templates_v1.ts b/packages/google-cloud-compute/test/gapic_region_instance_templates_v1.ts index 5af95ad0fc9..913c683011a 100644 --- a/packages/google-cloud-compute/test/gapic_region_instance_templates_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_instance_templates_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionInstanceTemplatesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstanceTemplateRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceTemplateRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceTemplateRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceTemplateRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstanceTemplateRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest() ); @@ -716,7 +718,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest() ); @@ -769,7 +771,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstanceTemplateRequest() ); @@ -830,7 +832,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest() ); @@ -874,7 +876,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest() ); @@ -933,7 +935,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest() ); @@ -966,7 +968,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.RegionInstanceTemplatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstanceTemplatesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_instances_v1.ts b/packages/google-cloud-compute/test/gapic_region_instances_v1.ts index 6c5a27d0ae8..f8298c63a9e 100644 --- a/packages/google-cloud-compute/test/gapic_region_instances_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_instances_v1.ts @@ -202,7 +202,9 @@ describe('v1.RegionInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionInstancesStub); client.close().then(() => { done(); @@ -261,7 +263,7 @@ describe('v1.RegionInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionInstanceRequest() ); @@ -297,7 +299,7 @@ describe('v1.RegionInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionInstanceRequest() ); @@ -349,7 +351,7 @@ describe('v1.RegionInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionInstanceRequest() ); @@ -385,7 +387,7 @@ describe('v1.RegionInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.BulkInsertRegionInstanceRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_instant_snapshots_v1.ts b/packages/google-cloud-compute/test/gapic_region_instant_snapshots_v1.ts index ec5be509c98..33c6dca88fd 100644 --- a/packages/google-cloud-compute/test/gapic_region_instant_snapshots_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_instant_snapshots_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionInstantSnapshotsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstantSnapshotRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstantSnapshotRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstantSnapshotRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionInstantSnapshotRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstantSnapshotRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstantSnapshotRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstantSnapshotRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionInstantSnapshotRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionInstantSnapshotRequest() ); @@ -721,7 +723,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionInstantSnapshotRequest() ); @@ -779,7 +781,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionInstantSnapshotRequest() ); @@ -821,7 +823,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionInstantSnapshotRequest() ); @@ -853,7 +855,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstantSnapshotRequest() ); @@ -890,7 +892,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstantSnapshotRequest() ); @@ -943,7 +945,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstantSnapshotRequest() ); @@ -977,7 +979,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionInstantSnapshotRequest() ); @@ -1004,7 +1006,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionInstantSnapshotRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionInstantSnapshotRequest() ); @@ -1104,7 +1106,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionInstantSnapshotRequest() ); @@ -1146,7 +1148,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionInstantSnapshotRequest() ); @@ -1178,7 +1180,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionInstantSnapshotRequest() ); @@ -1220,7 +1222,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionInstantSnapshotRequest() ); @@ -1278,7 +1280,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionInstantSnapshotRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionInstantSnapshotRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionInstantSnapshotRequest() ); @@ -1392,7 +1394,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionInstantSnapshotRequest() ); @@ -1450,7 +1452,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionInstantSnapshotRequest() ); @@ -1492,7 +1494,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionInstantSnapshotRequest() ); @@ -1524,7 +1526,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest() ); @@ -1568,7 +1570,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest() ); @@ -1627,7 +1629,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest() ); @@ -1660,7 +1662,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest() ); @@ -1726,7 +1728,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest() ); @@ -1783,7 +1785,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest() ); @@ -1837,7 +1839,7 @@ describe('v1.RegionInstantSnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionInstantSnapshotsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_network_endpoint_groups_v1.ts b/packages/google-cloud-compute/test/gapic_region_network_endpoint_groups_v1.ts index 8b3e3f4f3a5..c7b4a737e94 100644 --- a/packages/google-cloud-compute/test/gapic_region_network_endpoint_groups_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_network_endpoint_groups_v1.ts @@ -284,7 +284,9 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionNetworkEndpointGroupsStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -400,7 +402,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -460,7 +462,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -507,7 +509,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AttachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -544,7 +546,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest() ); @@ -588,7 +590,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest() ); @@ -648,7 +650,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest() ); @@ -689,7 +691,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest() ); @@ -723,7 +725,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -768,7 +770,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -828,7 +830,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -875,7 +877,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DetachNetworkEndpointsRegionNetworkEndpointGroupRequest() ); @@ -912,7 +914,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest() ); @@ -955,7 +957,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest() ); @@ -1013,7 +1015,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest() ); @@ -1053,7 +1055,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest() ); @@ -1126,7 +1128,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest() ); @@ -1181,7 +1183,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest() ); @@ -1217,7 +1219,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest() ); @@ -1246,7 +1248,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest() ); @@ -1292,7 +1294,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest() ); @@ -1355,7 +1357,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest() ); @@ -1390,7 +1392,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest() ); @@ -1459,7 +1461,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest() ); @@ -1519,7 +1521,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest() ); @@ -1576,7 +1578,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest() ); @@ -1628,7 +1630,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest() ); @@ -1681,7 +1683,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest() ); @@ -1751,7 +1753,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest() ); @@ -1795,7 +1797,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest() ); @@ -1871,7 +1873,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest() ); @@ -1936,7 +1938,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest() ); @@ -1999,7 +2001,7 @@ describe('v1.RegionNetworkEndpointGroupsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListNetworkEndpointsRegionNetworkEndpointGroupsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_network_firewall_policies_v1.ts b/packages/google-cloud-compute/test/gapic_region_network_firewall_policies_v1.ts index 5f160a09650..f353f05556a 100644 --- a/packages/google-cloud-compute/test/gapic_region_network_firewall_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_network_firewall_policies_v1.ts @@ -284,7 +284,9 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionNetworkFirewallPoliciesStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest() ); @@ -399,7 +401,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest() ); @@ -459,7 +461,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest() ); @@ -503,7 +505,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest() ); @@ -537,7 +539,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest() ); @@ -581,7 +583,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest() ); @@ -641,7 +643,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest() ); @@ -682,7 +684,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest() ); @@ -716,7 +718,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest() ); @@ -760,7 +762,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest() ); @@ -820,7 +822,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest() ); @@ -864,7 +866,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest() ); @@ -898,7 +900,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest() ); @@ -942,7 +944,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest() ); @@ -1077,7 +1079,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest() ); @@ -1120,7 +1122,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest() ); @@ -1178,7 +1180,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest() ); @@ -1218,7 +1220,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest() ); @@ -1252,7 +1254,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest() ); @@ -1356,7 +1358,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest() ); @@ -1400,7 +1402,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest() ); @@ -1434,7 +1436,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest() ); @@ -1474,7 +1476,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest() ); @@ -1529,7 +1531,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest() ); @@ -1571,7 +1573,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest() ); @@ -1603,7 +1605,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -1647,7 +1649,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -1707,7 +1709,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -1751,7 +1753,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -1785,7 +1787,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest() ); @@ -1829,7 +1831,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest() ); @@ -1889,7 +1891,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest() ); @@ -1930,7 +1932,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest() ); @@ -1964,7 +1966,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest() ); @@ -2003,7 +2005,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest() ); @@ -2058,7 +2060,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest() ); @@ -2094,7 +2096,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest() ); @@ -2123,7 +2125,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest() ); @@ -2166,7 +2168,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest() ); @@ -2224,7 +2226,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest() ); @@ -2264,7 +2266,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest() ); @@ -2298,7 +2300,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest() ); @@ -2342,7 +2344,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest() ); @@ -2402,7 +2404,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest() ); @@ -2443,7 +2445,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest() ); @@ -2477,7 +2479,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest() ); @@ -2521,7 +2523,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest() ); @@ -2581,7 +2583,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest() ); @@ -2625,7 +2627,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest() ); @@ -2659,7 +2661,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest() ); @@ -2703,7 +2705,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest() ); @@ -2763,7 +2765,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest() ); @@ -2807,7 +2809,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest() ); @@ -2841,7 +2843,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -2885,7 +2887,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -2945,7 +2947,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -2989,7 +2991,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest() ); @@ -3023,7 +3025,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest() ); @@ -3068,7 +3070,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest() ); @@ -3128,7 +3130,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest() ); @@ -3172,7 +3174,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest() ); @@ -3206,7 +3208,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest() ); @@ -3252,7 +3254,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest() ); @@ -3313,7 +3315,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest() ); @@ -3348,7 +3350,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest() ); @@ -3416,7 +3418,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest() ); @@ -3475,7 +3477,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest() ); @@ -3531,7 +3533,7 @@ describe('v1.RegionNetworkFirewallPoliciesClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_notification_endpoints_v1.ts b/packages/google-cloud-compute/test/gapic_region_notification_endpoints_v1.ts index 8ffa086554a..97086d1c65d 100644 --- a/packages/google-cloud-compute/test/gapic_region_notification_endpoints_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_notification_endpoints_v1.ts @@ -284,7 +284,9 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionNotificationEndpointsStub); client.close().then(() => { done(); @@ -355,7 +357,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest() ); @@ -399,7 +401,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest() ); @@ -459,7 +461,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest() ); @@ -500,7 +502,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest() ); @@ -534,7 +536,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNotificationEndpointRequest() ); @@ -577,7 +579,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNotificationEndpointRequest() ); @@ -635,7 +637,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNotificationEndpointRequest() ); @@ -675,7 +677,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionNotificationEndpointRequest() ); @@ -709,7 +711,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest() ); @@ -748,7 +750,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest() ); @@ -839,7 +841,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest() ); @@ -868,7 +870,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest() ); @@ -914,7 +916,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest() ); @@ -977,7 +979,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest() ); @@ -1198,7 +1200,7 @@ describe('v1.RegionNotificationEndpointsClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_operations_v1.ts b/packages/google-cloud-compute/test/gapic_region_operations_v1.ts index a9f714517b3..1fe75bc2ae4 100644 --- a/packages/google-cloud-compute/test/gapic_region_operations_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_operations_v1.ts @@ -265,7 +265,9 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionOperationsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionOperationRequest() ); @@ -365,7 +367,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionOperationRequest() ); @@ -422,7 +424,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionOperationRequest() ); @@ -460,7 +462,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionOperationRequest() ); @@ -491,7 +493,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionOperationRequest() ); @@ -531,7 +533,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionOperationRequest() ); @@ -586,7 +588,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionOperationRequest() ); @@ -623,7 +625,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionOperationRequest() ); @@ -654,7 +656,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitRegionOperationRequest() ); @@ -694,7 +696,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitRegionOperationRequest() ); @@ -749,7 +751,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitRegionOperationRequest() ); @@ -786,7 +788,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitRegionOperationRequest() ); @@ -817,7 +819,7 @@ describe('v1.RegionOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionOperationsRequest() ); @@ -854,7 +856,7 @@ describe('v1.RegionOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionOperationsRequest() ); @@ -906,7 +908,7 @@ describe('v1.RegionOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionOperationsRequest() ); @@ -938,7 +940,7 @@ describe('v1.RegionOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionOperationsRequest() ); @@ -997,7 +999,7 @@ describe('v1.RegionOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionOperationsRequest() ); @@ -1053,7 +1055,7 @@ describe('v1.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionOperationsRequest() ); @@ -1100,7 +1102,7 @@ describe('v1.RegionOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionOperationsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_operations_v1small.ts b/packages/google-cloud-compute/test/gapic_region_operations_v1small.ts index 588b43b864f..4f53b8929fc 100644 --- a/packages/google-cloud-compute/test/gapic_region_operations_v1small.ts +++ b/packages/google-cloud-compute/test/gapic_region_operations_v1small.ts @@ -207,7 +207,9 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionOperationsStub); client.close().then(() => { done(); @@ -266,7 +268,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.GetRegionOperationRequest() ); @@ -306,7 +308,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.GetRegionOperationRequest() ); @@ -361,7 +363,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.GetRegionOperationRequest() ); @@ -398,7 +400,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.GetRegionOperationRequest() ); @@ -429,7 +431,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.WaitRegionOperationRequest() ); @@ -469,7 +471,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.WaitRegionOperationRequest() ); @@ -524,7 +526,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.WaitRegionOperationRequest() ); @@ -561,7 +563,7 @@ describe('v1small.RegionOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1small.WaitRegionOperationRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_security_policies_v1.ts b/packages/google-cloud-compute/test/gapic_region_security_policies_v1.ts index 59c544ed5fc..6187953cbdd 100644 --- a/packages/google-cloud-compute/test/gapic_region_security_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_security_policies_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionSecurityPoliciesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionSecurityPolicyRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionSecurityPolicyRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionSecurityPolicyRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleRegionSecurityPolicyRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest() ); @@ -554,7 +556,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest() ); @@ -612,7 +614,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest() ); @@ -651,7 +653,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest() ); @@ -683,7 +685,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSecurityPolicyRequest() ); @@ -724,7 +726,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSecurityPolicyRequest() ); @@ -780,7 +782,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSecurityPolicyRequest() ); @@ -818,7 +820,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSecurityPolicyRequest() ); @@ -850,7 +852,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionSecurityPolicyRequest() ); @@ -892,7 +894,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionSecurityPolicyRequest() ); @@ -950,7 +952,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionSecurityPolicyRequest() ); @@ -989,7 +991,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleRegionSecurityPolicyRequest() ); @@ -1021,7 +1023,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest() ); @@ -1058,7 +1060,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest() ); @@ -1145,7 +1147,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest() ); @@ -1269,7 +1271,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionSecurityPolicyRequest() ); @@ -1381,7 +1383,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionSecurityPolicyRequest() ); @@ -1439,7 +1441,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionSecurityPolicyRequest() ); @@ -1478,7 +1480,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleRegionSecurityPolicyRequest() ); @@ -1510,7 +1512,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionSecurityPolicyRequest() ); @@ -1552,7 +1554,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionSecurityPolicyRequest() ); @@ -1610,7 +1612,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionSecurityPolicyRequest() ); @@ -1652,7 +1654,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleRegionSecurityPolicyRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionSecurityPolicyRequest() ); @@ -1726,7 +1728,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionSecurityPolicyRequest() ); @@ -1784,7 +1786,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionSecurityPolicyRequest() ); @@ -1823,7 +1825,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsRegionSecurityPolicyRequest() ); @@ -1855,7 +1857,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest() ); @@ -1899,7 +1901,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest() ); @@ -1958,7 +1960,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest() ); @@ -1991,7 +1993,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest() ); @@ -2057,7 +2059,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest() ); @@ -2114,7 +2116,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest() ); @@ -2168,7 +2170,7 @@ describe('v1.RegionSecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_ssl_certificates_v1.ts b/packages/google-cloud-compute/test/gapic_region_ssl_certificates_v1.ts index 941f719d29f..749188f9c9b 100644 --- a/packages/google-cloud-compute/test/gapic_region_ssl_certificates_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_ssl_certificates_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionSslCertificatesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslCertificateRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslCertificateRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslCertificateRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslCertificateRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslCertificateRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslCertificateRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslCertificateRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslCertificateRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslCertificateRequest() ); @@ -716,7 +718,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslCertificateRequest() ); @@ -769,7 +771,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslCertificateRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslCertificateRequest() ); @@ -830,7 +832,7 @@ describe('v1.RegionSslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslCertificatesRequest() ); @@ -874,7 +876,7 @@ describe('v1.RegionSslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslCertificatesRequest() ); @@ -933,7 +935,7 @@ describe('v1.RegionSslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslCertificatesRequest() ); @@ -966,7 +968,7 @@ describe('v1.RegionSslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslCertificatesRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.RegionSslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslCertificatesRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.RegionSslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslCertificatesRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.RegionSslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslCertificatesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_ssl_policies_v1.ts b/packages/google-cloud-compute/test/gapic_region_ssl_policies_v1.ts index 7476d98c73e..800911e4e30 100644 --- a/packages/google-cloud-compute/test/gapic_region_ssl_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_ssl_policies_v1.ts @@ -266,7 +266,9 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionSslPoliciesStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslPolicyRequest() ); @@ -366,7 +368,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslPolicyRequest() ); @@ -423,7 +425,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslPolicyRequest() ); @@ -461,7 +463,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionSslPolicyRequest() ); @@ -492,7 +494,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslPolicyRequest() ); @@ -532,7 +534,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslPolicyRequest() ); @@ -587,7 +589,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslPolicyRequest() ); @@ -624,7 +626,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionSslPolicyRequest() ); @@ -655,7 +657,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslPolicyRequest() ); @@ -691,7 +693,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslPolicyRequest() ); @@ -743,7 +745,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslPolicyRequest() ); @@ -776,7 +778,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionSslPolicyRequest() ); @@ -802,7 +804,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest() ); @@ -839,7 +841,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest() ); @@ -891,7 +893,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest() ); @@ -930,7 +932,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest() ); @@ -959,7 +961,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSslPolicyRequest() ); @@ -999,7 +1001,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSslPolicyRequest() ); @@ -1054,7 +1056,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSslPolicyRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionSslPolicyRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.RegionSslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslPoliciesRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.RegionSslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslPoliciesRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.RegionSslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslPoliciesRequest() ); @@ -1243,7 +1245,7 @@ describe('v1.RegionSslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslPoliciesRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.RegionSslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslPoliciesRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.RegionSslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslPoliciesRequest() ); @@ -1405,7 +1407,7 @@ describe('v1.RegionSslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionSslPoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_target_http_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_region_target_http_proxies_v1.ts index aac3652a66a..b8875c3c7ea 100644 --- a/packages/google-cloud-compute/test/gapic_region_target_http_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_target_http_proxies_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionTargetHttpProxiesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest() ); @@ -716,7 +718,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest() ); @@ -769,7 +771,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest() ); @@ -830,7 +832,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest() ); @@ -872,7 +874,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest() ); @@ -930,7 +932,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest() ); @@ -969,7 +971,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest() ); @@ -1045,7 +1047,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest() ); @@ -1104,7 +1106,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest() ); @@ -1137,7 +1139,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.RegionTargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_target_https_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_region_target_https_proxies_v1.ts index 6a1f16181e4..93f18a184ac 100644 --- a/packages/google-cloud-compute/test/gapic_region_target_https_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_target_https_proxies_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionTargetHttpsProxiesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest() ); @@ -716,7 +718,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest() ); @@ -769,7 +771,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest() ); @@ -830,7 +832,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest() ); @@ -871,7 +873,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest() ); @@ -927,7 +929,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest() ); @@ -965,7 +967,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest() ); @@ -997,7 +999,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest() ); @@ -1040,7 +1042,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest() ); @@ -1098,7 +1100,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest() ); @@ -1140,7 +1142,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest() ); @@ -1214,7 +1216,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest() ); @@ -1311,7 +1313,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest() ); @@ -1343,7 +1345,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest() ); @@ -1387,7 +1389,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest() ); @@ -1545,7 +1547,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest() ); @@ -1602,7 +1604,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest() ); @@ -1656,7 +1658,7 @@ describe('v1.RegionTargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_target_tcp_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_region_target_tcp_proxies_v1.ts index ee8cd4fc5ee..2ebe337c280 100644 --- a/packages/google-cloud-compute/test/gapic_region_target_tcp_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_target_tcp_proxies_v1.ts @@ -278,7 +278,9 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionTargetTcpProxiesStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest() ); @@ -383,7 +385,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest() ); @@ -441,7 +443,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest() ); @@ -480,7 +482,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest() ); @@ -512,7 +514,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest() ); @@ -553,7 +555,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest() ); @@ -609,7 +611,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest() ); @@ -647,7 +649,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest() ); @@ -679,7 +681,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest() ); @@ -716,7 +718,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest() ); @@ -769,7 +771,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest() ); @@ -803,7 +805,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest() ); @@ -830,7 +832,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest() ); @@ -874,7 +876,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest() ); @@ -933,7 +935,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest() ); @@ -966,7 +968,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.RegionTargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_url_maps_v1.ts b/packages/google-cloud-compute/test/gapic_region_url_maps_v1.ts index bbb0fe2eeb0..bebc6234946 100644 --- a/packages/google-cloud-compute/test/gapic_region_url_maps_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_url_maps_v1.ts @@ -265,7 +265,9 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionUrlMapsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionUrlMapRequest() ); @@ -365,7 +367,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionUrlMapRequest() ); @@ -422,7 +424,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionUrlMapRequest() ); @@ -460,7 +462,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRegionUrlMapRequest() ); @@ -491,7 +493,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionUrlMapRequest() ); @@ -531,7 +533,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionUrlMapRequest() ); @@ -586,7 +588,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionUrlMapRequest() ); @@ -623,7 +625,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionUrlMapRequest() ); @@ -654,7 +656,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionUrlMapRequest() ); @@ -690,7 +692,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionUrlMapRequest() ); @@ -742,7 +744,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionUrlMapRequest() ); @@ -775,7 +777,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRegionUrlMapRequest() ); @@ -801,7 +803,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionUrlMapRequest() ); @@ -841,7 +843,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionUrlMapRequest() ); @@ -896,7 +898,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionUrlMapRequest() ); @@ -933,7 +935,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRegionUrlMapRequest() ); @@ -964,7 +966,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionUrlMapRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionUrlMapRequest() ); @@ -1062,7 +1064,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionUrlMapRequest() ); @@ -1100,7 +1102,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRegionUrlMapRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateRegionUrlMapRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateRegionUrlMapRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateRegionUrlMapRequest() ); @@ -1267,7 +1269,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateRegionUrlMapRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.RegionUrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionUrlMapsRequest() ); @@ -1335,7 +1337,7 @@ describe('v1.RegionUrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionUrlMapsRequest() ); @@ -1387,7 +1389,7 @@ describe('v1.RegionUrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionUrlMapsRequest() ); @@ -1419,7 +1421,7 @@ describe('v1.RegionUrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionUrlMapsRequest() ); @@ -1475,7 +1477,7 @@ describe('v1.RegionUrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionUrlMapsRequest() ); @@ -1528,7 +1530,7 @@ describe('v1.RegionUrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionUrlMapsRequest() ); @@ -1575,7 +1577,7 @@ describe('v1.RegionUrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionUrlMapsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_region_zones_v1.ts b/packages/google-cloud-compute/test/gapic_region_zones_v1.ts index 8dac0a0df08..3e7a79489bc 100644 --- a/packages/google-cloud-compute/test/gapic_region_zones_v1.ts +++ b/packages/google-cloud-compute/test/gapic_region_zones_v1.ts @@ -263,7 +263,9 @@ describe('v1.RegionZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionZonesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.RegionZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionZonesRequest() ); @@ -359,7 +361,7 @@ describe('v1.RegionZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionZonesRequest() ); @@ -411,7 +413,7 @@ describe('v1.RegionZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionZonesRequest() ); @@ -443,7 +445,7 @@ describe('v1.RegionZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionZonesRequest() ); @@ -499,7 +501,7 @@ describe('v1.RegionZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionZonesRequest() ); @@ -552,7 +554,7 @@ describe('v1.RegionZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionZonesRequest() ); @@ -599,7 +601,7 @@ describe('v1.RegionZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionZonesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_regions_v1.ts b/packages/google-cloud-compute/test/gapic_regions_v1.ts index 65eeb091e69..3ab9b87d43f 100644 --- a/packages/google-cloud-compute/test/gapic_regions_v1.ts +++ b/packages/google-cloud-compute/test/gapic_regions_v1.ts @@ -263,7 +263,9 @@ describe('v1.RegionsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.RegionsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionRequest() ); @@ -357,7 +359,7 @@ describe('v1.RegionsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionRequest() ); @@ -407,7 +409,7 @@ describe('v1.RegionsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionRequest() ); @@ -439,7 +441,7 @@ describe('v1.RegionsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRegionRequest() ); @@ -465,7 +467,7 @@ describe('v1.RegionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionsRequest() ); @@ -497,7 +499,7 @@ describe('v1.RegionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionsRequest() ); @@ -544,7 +546,7 @@ describe('v1.RegionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionsRequest() ); @@ -571,7 +573,7 @@ describe('v1.RegionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionsRequest() ); @@ -622,7 +624,7 @@ describe('v1.RegionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionsRequest() ); @@ -670,7 +672,7 @@ describe('v1.RegionsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionsRequest() ); @@ -712,7 +714,7 @@ describe('v1.RegionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRegionsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_reservations_v1.ts b/packages/google-cloud-compute/test/gapic_reservations_v1.ts index 2206b87c08b..81c127d7520 100644 --- a/packages/google-cloud-compute/test/gapic_reservations_v1.ts +++ b/packages/google-cloud-compute/test/gapic_reservations_v1.ts @@ -265,7 +265,9 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.reservationsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteReservationRequest() ); @@ -365,7 +367,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteReservationRequest() ); @@ -422,7 +424,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteReservationRequest() ); @@ -460,7 +462,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteReservationRequest() ); @@ -491,7 +493,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetReservationRequest() ); @@ -531,7 +533,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetReservationRequest() ); @@ -586,7 +588,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetReservationRequest() ); @@ -623,7 +625,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetReservationRequest() ); @@ -654,7 +656,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyReservationRequest() ); @@ -695,7 +697,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyReservationRequest() ); @@ -752,7 +754,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyReservationRequest() ); @@ -793,7 +795,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyReservationRequest() ); @@ -824,7 +826,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertReservationRequest() ); @@ -860,7 +862,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertReservationRequest() ); @@ -912,7 +914,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertReservationRequest() ); @@ -945,7 +947,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertReservationRequest() ); @@ -971,7 +973,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeReservationRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeReservationRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeReservationRequest() ); @@ -1107,7 +1109,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ResizeReservationRequest() ); @@ -1138,7 +1140,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyReservationRequest() ); @@ -1179,7 +1181,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyReservationRequest() ); @@ -1236,7 +1238,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyReservationRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyReservationRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsReservationRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsReservationRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsReservationRequest() ); @@ -1448,7 +1450,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsReservationRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateReservationRequest() ); @@ -1520,7 +1522,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateReservationRequest() ); @@ -1577,7 +1579,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateReservationRequest() ); @@ -1615,7 +1617,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateReservationRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListReservationsRequest() ); @@ -1706,7 +1708,7 @@ describe('v1.ReservationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListReservationsRequest() ); @@ -1750,7 +1752,7 @@ describe('v1.ReservationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReservationsRequest() ); @@ -1787,7 +1789,7 @@ describe('v1.ReservationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReservationsRequest() ); @@ -1839,7 +1841,7 @@ describe('v1.ReservationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReservationsRequest() ); @@ -1871,7 +1873,7 @@ describe('v1.ReservationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReservationsRequest() ); @@ -1930,7 +1932,7 @@ describe('v1.ReservationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReservationsRequest() ); @@ -1986,7 +1988,7 @@ describe('v1.ReservationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReservationsRequest() ); @@ -2033,7 +2035,7 @@ describe('v1.ReservationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListReservationsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_resource_policies_v1.ts b/packages/google-cloud-compute/test/gapic_resource_policies_v1.ts index d4ed310ecaf..b34b617ddd0 100644 --- a/packages/google-cloud-compute/test/gapic_resource_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_resource_policies_v1.ts @@ -265,7 +265,9 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.resourcePoliciesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteResourcePolicyRequest() ); @@ -365,7 +367,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteResourcePolicyRequest() ); @@ -422,7 +424,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteResourcePolicyRequest() ); @@ -460,7 +462,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteResourcePolicyRequest() ); @@ -491,7 +493,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetResourcePolicyRequest() ); @@ -531,7 +533,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetResourcePolicyRequest() ); @@ -586,7 +588,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetResourcePolicyRequest() ); @@ -623,7 +625,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetResourcePolicyRequest() ); @@ -654,7 +656,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest() ); @@ -695,7 +697,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest() ); @@ -752,7 +754,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest() ); @@ -793,7 +795,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest() ); @@ -824,7 +826,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertResourcePolicyRequest() ); @@ -860,7 +862,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertResourcePolicyRequest() ); @@ -912,7 +914,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertResourcePolicyRequest() ); @@ -945,7 +947,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertResourcePolicyRequest() ); @@ -971,7 +973,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchResourcePolicyRequest() ); @@ -1011,7 +1013,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchResourcePolicyRequest() ); @@ -1066,7 +1068,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchResourcePolicyRequest() ); @@ -1103,7 +1105,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchResourcePolicyRequest() ); @@ -1134,7 +1136,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest() ); @@ -1273,7 +1275,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest() ); @@ -1304,7 +1306,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest() ); @@ -1403,7 +1405,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest() ); @@ -1444,7 +1446,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest() ); @@ -1475,7 +1477,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest() ); @@ -1535,7 +1537,7 @@ describe('v1.ResourcePoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest() ); @@ -1579,7 +1581,7 @@ describe('v1.ResourcePoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListResourcePoliciesRequest() ); @@ -1622,7 +1624,7 @@ describe('v1.ResourcePoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListResourcePoliciesRequest() ); @@ -1680,7 +1682,7 @@ describe('v1.ResourcePoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListResourcePoliciesRequest() ); @@ -1712,7 +1714,7 @@ describe('v1.ResourcePoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListResourcePoliciesRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.ResourcePoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListResourcePoliciesRequest() ); @@ -1833,7 +1835,7 @@ describe('v1.ResourcePoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListResourcePoliciesRequest() ); @@ -1886,7 +1888,7 @@ describe('v1.ResourcePoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListResourcePoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_routers_v1.ts b/packages/google-cloud-compute/test/gapic_routers_v1.ts index ac8c8436bb4..cefa4f7be10 100644 --- a/packages/google-cloud-compute/test/gapic_routers_v1.ts +++ b/packages/google-cloud-compute/test/gapic_routers_v1.ts @@ -263,7 +263,9 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.routersStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouterRequest() ); @@ -363,7 +365,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouterRequest() ); @@ -420,7 +422,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouterRequest() ); @@ -458,7 +460,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouterRequest() ); @@ -489,7 +491,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRoutePolicyRouterRequest() ); @@ -530,7 +532,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRoutePolicyRouterRequest() ); @@ -587,7 +589,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRoutePolicyRouterRequest() ); @@ -628,7 +630,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRoutePolicyRouterRequest() ); @@ -659,7 +661,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterRequest() ); @@ -699,7 +701,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterRequest() ); @@ -754,7 +756,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterRequest() ); @@ -791,7 +793,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterRequest() ); @@ -822,7 +824,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatIpInfoRouterRequest() ); @@ -863,7 +865,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatIpInfoRouterRequest() ); @@ -920,7 +922,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatIpInfoRouterRequest() ); @@ -961,7 +963,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatIpInfoRouterRequest() ); @@ -992,7 +994,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRoutePolicyRouterRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRoutePolicyRouterRequest() ); @@ -1090,7 +1092,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRoutePolicyRouterRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRoutePolicyRouterRequest() ); @@ -1162,7 +1164,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterStatusRouterRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterStatusRouterRequest() ); @@ -1260,7 +1262,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterStatusRouterRequest() ); @@ -1301,7 +1303,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouterStatusRouterRequest() ); @@ -1332,7 +1334,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouterRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouterRequest() ); @@ -1420,7 +1422,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouterRequest() ); @@ -1453,7 +1455,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouterRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRouterRequest() ); @@ -1519,7 +1521,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRouterRequest() ); @@ -1574,7 +1576,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRouterRequest() ); @@ -1611,7 +1613,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRouterRequest() ); @@ -1642,7 +1644,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRoutePolicyRouterRequest() ); @@ -1683,7 +1685,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRoutePolicyRouterRequest() ); @@ -1740,7 +1742,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRoutePolicyRouterRequest() ); @@ -1781,7 +1783,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRoutePolicyRouterRequest() ); @@ -1812,7 +1814,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PreviewRouterRequest() ); @@ -1853,7 +1855,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PreviewRouterRequest() ); @@ -1910,7 +1912,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PreviewRouterRequest() ); @@ -1948,7 +1950,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PreviewRouterRequest() ); @@ -1979,7 +1981,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRouterRequest() ); @@ -2020,7 +2022,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRouterRequest() ); @@ -2077,7 +2079,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRouterRequest() ); @@ -2115,7 +2117,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRouterRequest() ); @@ -2146,7 +2148,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRoutePolicyRouterRequest() ); @@ -2187,7 +2189,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRoutePolicyRouterRequest() ); @@ -2244,7 +2246,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRoutePolicyRouterRequest() ); @@ -2285,7 +2287,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateRoutePolicyRouterRequest() ); @@ -2316,7 +2318,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListRoutersRequest() ); @@ -2376,7 +2378,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListRoutersRequest() ); @@ -2420,7 +2422,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest() ); @@ -2469,7 +2471,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest() ); @@ -2536,7 +2538,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest() ); @@ -2577,7 +2579,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest() ); @@ -2648,7 +2650,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest() ); @@ -2708,7 +2710,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest() ); @@ -2768,7 +2770,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest() ); @@ -2821,7 +2823,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutersRequest() ); @@ -2858,7 +2860,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutersRequest() ); @@ -2910,7 +2912,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutersRequest() ); @@ -2942,7 +2944,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutersRequest() ); @@ -2998,7 +3000,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutersRequest() ); @@ -3051,7 +3053,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutersRequest() ); @@ -3098,7 +3100,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutersRequest() ); @@ -3146,7 +3148,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBgpRoutesRoutersRequest() ); @@ -3189,7 +3191,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBgpRoutesRoutersRequest() ); @@ -3248,7 +3250,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBgpRoutesRoutersRequest() ); @@ -3289,7 +3291,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBgpRoutesRoutersRequest() ); @@ -3353,7 +3355,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBgpRoutesRoutersRequest() ); @@ -3412,7 +3414,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBgpRoutesRoutersRequest() ); @@ -3465,7 +3467,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListBgpRoutesRoutersRequest() ); @@ -3517,7 +3519,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest() ); @@ -3560,7 +3562,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest() ); @@ -3619,7 +3621,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest() ); @@ -3660,7 +3662,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest() ); @@ -3724,7 +3726,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest() ); @@ -3783,7 +3785,7 @@ describe('v1.RoutersClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest() ); @@ -3836,7 +3838,7 @@ describe('v1.RoutersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutePoliciesRoutersRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_routes_v1.ts b/packages/google-cloud-compute/test/gapic_routes_v1.ts index 07f79f2e7ed..42b9a851f88 100644 --- a/packages/google-cloud-compute/test/gapic_routes_v1.ts +++ b/packages/google-cloud-compute/test/gapic_routes_v1.ts @@ -263,7 +263,9 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.routesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouteRequest() ); @@ -358,7 +360,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouteRequest() ); @@ -410,7 +412,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouteRequest() ); @@ -443,7 +445,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteRouteRequest() ); @@ -469,7 +471,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouteRequest() ); @@ -504,7 +506,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouteRequest() ); @@ -554,7 +556,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouteRequest() ); @@ -586,7 +588,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRouteRequest() ); @@ -612,7 +614,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouteRequest() ); @@ -643,7 +645,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouteRequest() ); @@ -690,7 +692,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouteRequest() ); @@ -718,7 +720,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertRouteRequest() ); @@ -739,7 +741,7 @@ describe('v1.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutesRequest() ); @@ -771,7 +773,7 @@ describe('v1.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutesRequest() ); @@ -818,7 +820,7 @@ describe('v1.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutesRequest() ); @@ -845,7 +847,7 @@ describe('v1.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutesRequest() ); @@ -896,7 +898,7 @@ describe('v1.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutesRequest() ); @@ -944,7 +946,7 @@ describe('v1.RoutesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutesRequest() ); @@ -986,7 +988,7 @@ describe('v1.RoutesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListRoutesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_security_policies_v1.ts b/packages/google-cloud-compute/test/gapic_security_policies_v1.ts index a637154a179..06a8628fe6e 100644 --- a/packages/google-cloud-compute/test/gapic_security_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_security_policies_v1.ts @@ -265,7 +265,9 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securityPoliciesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleSecurityPolicyRequest() ); @@ -360,7 +362,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleSecurityPolicyRequest() ); @@ -412,7 +414,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleSecurityPolicyRequest() ); @@ -445,7 +447,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddRuleSecurityPolicyRequest() ); @@ -471,7 +473,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSecurityPolicyRequest() ); @@ -507,7 +509,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSecurityPolicyRequest() ); @@ -559,7 +561,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSecurityPolicyRequest() ); @@ -592,7 +594,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSecurityPolicyRequest() ); @@ -618,7 +620,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSecurityPolicyRequest() ); @@ -653,7 +655,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSecurityPolicyRequest() ); @@ -703,7 +705,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSecurityPolicyRequest() ); @@ -735,7 +737,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSecurityPolicyRequest() ); @@ -761,7 +763,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleSecurityPolicyRequest() ); @@ -797,7 +799,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleSecurityPolicyRequest() ); @@ -849,7 +851,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleSecurityPolicyRequest() ); @@ -882,7 +884,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetRuleSecurityPolicyRequest() ); @@ -908,7 +910,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSecurityPolicyRequest() ); @@ -939,7 +941,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSecurityPolicyRequest() ); @@ -986,7 +988,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSecurityPolicyRequest() ); @@ -1014,7 +1016,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSecurityPolicyRequest() ); @@ -1035,7 +1037,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest() ); @@ -1067,7 +1069,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest() ); @@ -1148,7 +1150,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSecurityPolicyRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSecurityPolicyRequest() ); @@ -1257,7 +1259,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSecurityPolicyRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSecurityPolicyRequest() ); @@ -1315,7 +1317,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest() ); @@ -1351,7 +1353,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest() ); @@ -1403,7 +1405,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest() ); @@ -1436,7 +1438,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest() ); @@ -1462,7 +1464,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest() ); @@ -1498,7 +1500,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest() ); @@ -1550,7 +1552,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest() ); @@ -1586,7 +1588,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest() ); @@ -1612,7 +1614,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest() ); @@ -1648,7 +1650,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest() ); @@ -1700,7 +1702,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest() ); @@ -1733,7 +1735,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest() ); @@ -1759,7 +1761,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest() ); @@ -1819,7 +1821,7 @@ describe('v1.SecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest() ); @@ -1863,7 +1865,7 @@ describe('v1.SecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSecurityPoliciesRequest() ); @@ -1901,7 +1903,7 @@ describe('v1.SecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSecurityPoliciesRequest() ); @@ -1954,7 +1956,7 @@ describe('v1.SecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSecurityPoliciesRequest() ); @@ -1981,7 +1983,7 @@ describe('v1.SecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSecurityPoliciesRequest() ); @@ -2041,7 +2043,7 @@ describe('v1.SecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSecurityPoliciesRequest() ); @@ -2092,7 +2094,7 @@ describe('v1.SecurityPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSecurityPoliciesRequest() ); @@ -2140,7 +2142,7 @@ describe('v1.SecurityPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSecurityPoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_service_attachments_v1.ts b/packages/google-cloud-compute/test/gapic_service_attachments_v1.ts index a2dc30ae0e5..db0b6bb4c97 100644 --- a/packages/google-cloud-compute/test/gapic_service_attachments_v1.ts +++ b/packages/google-cloud-compute/test/gapic_service_attachments_v1.ts @@ -267,7 +267,9 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.serviceAttachmentsStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteServiceAttachmentRequest() ); @@ -367,7 +369,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteServiceAttachmentRequest() ); @@ -424,7 +426,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteServiceAttachmentRequest() ); @@ -462,7 +464,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteServiceAttachmentRequest() ); @@ -493,7 +495,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetServiceAttachmentRequest() ); @@ -533,7 +535,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetServiceAttachmentRequest() ); @@ -588,7 +590,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetServiceAttachmentRequest() ); @@ -625,7 +627,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetServiceAttachmentRequest() ); @@ -656,7 +658,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest() ); @@ -697,7 +699,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest() ); @@ -754,7 +756,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest() ); @@ -795,7 +797,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest() ); @@ -826,7 +828,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertServiceAttachmentRequest() ); @@ -862,7 +864,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertServiceAttachmentRequest() ); @@ -914,7 +916,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertServiceAttachmentRequest() ); @@ -947,7 +949,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertServiceAttachmentRequest() ); @@ -973,7 +975,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchServiceAttachmentRequest() ); @@ -1013,7 +1015,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchServiceAttachmentRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchServiceAttachmentRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchServiceAttachmentRequest() ); @@ -1136,7 +1138,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest() ); @@ -1234,7 +1236,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest() ); @@ -1348,7 +1350,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest() ); @@ -1405,7 +1407,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest() ); @@ -1477,7 +1479,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.ServiceAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest() ); @@ -1581,7 +1583,7 @@ describe('v1.ServiceAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListServiceAttachmentsRequest() ); @@ -1624,7 +1626,7 @@ describe('v1.ServiceAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListServiceAttachmentsRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.ServiceAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListServiceAttachmentsRequest() ); @@ -1714,7 +1716,7 @@ describe('v1.ServiceAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListServiceAttachmentsRequest() ); @@ -1780,7 +1782,7 @@ describe('v1.ServiceAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListServiceAttachmentsRequest() ); @@ -1837,7 +1839,7 @@ describe('v1.ServiceAttachmentsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListServiceAttachmentsRequest() ); @@ -1890,7 +1892,7 @@ describe('v1.ServiceAttachmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListServiceAttachmentsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_snapshot_settings_service_v1.ts b/packages/google-cloud-compute/test/gapic_snapshot_settings_service_v1.ts index 3513a75619c..e3870353665 100644 --- a/packages/google-cloud-compute/test/gapic_snapshot_settings_service_v1.ts +++ b/packages/google-cloud-compute/test/gapic_snapshot_settings_service_v1.ts @@ -215,7 +215,9 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.snapshotSettingsServiceStub); client.close().then(() => { done(); @@ -278,7 +280,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotSettingRequest() ); @@ -309,7 +311,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotSettingRequest() ); @@ -355,7 +357,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotSettingRequest() ); @@ -383,7 +385,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotSettingRequest() ); @@ -405,7 +407,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSnapshotSettingRequest() ); @@ -436,7 +438,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSnapshotSettingRequest() ); @@ -482,7 +484,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSnapshotSettingRequest() ); @@ -510,7 +512,7 @@ describe('v1.SnapshotSettingsServiceClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSnapshotSettingRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_snapshots_v1.ts b/packages/google-cloud-compute/test/gapic_snapshots_v1.ts index efb2aed92b7..04a869ea3e3 100644 --- a/packages/google-cloud-compute/test/gapic_snapshots_v1.ts +++ b/packages/google-cloud-compute/test/gapic_snapshots_v1.ts @@ -263,7 +263,9 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.snapshotsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSnapshotRequest() ); @@ -358,7 +360,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSnapshotRequest() ); @@ -410,7 +412,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSnapshotRequest() ); @@ -443,7 +445,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSnapshotRequest() ); @@ -469,7 +471,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotRequest() ); @@ -504,7 +506,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotRequest() ); @@ -554,7 +556,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotRequest() ); @@ -586,7 +588,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSnapshotRequest() ); @@ -612,7 +614,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySnapshotRequest() ); @@ -648,7 +650,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySnapshotRequest() ); @@ -700,7 +702,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySnapshotRequest() ); @@ -736,7 +738,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySnapshotRequest() ); @@ -762,7 +764,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSnapshotRequest() ); @@ -793,7 +795,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSnapshotRequest() ); @@ -840,7 +842,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSnapshotRequest() ); @@ -868,7 +870,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSnapshotRequest() ); @@ -889,7 +891,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySnapshotRequest() ); @@ -925,7 +927,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySnapshotRequest() ); @@ -977,7 +979,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySnapshotRequest() ); @@ -1013,7 +1015,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySnapshotRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSnapshotRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSnapshotRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSnapshotRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsSnapshotRequest() ); @@ -1186,7 +1188,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest() ); @@ -1311,7 +1313,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.SnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSnapshotsRequest() ); @@ -1369,7 +1371,7 @@ describe('v1.SnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSnapshotsRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.SnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSnapshotsRequest() ); @@ -1443,7 +1445,7 @@ describe('v1.SnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSnapshotsRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.SnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSnapshotsRequest() ); @@ -1548,7 +1550,7 @@ describe('v1.SnapshotsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSnapshotsRequest() ); @@ -1590,7 +1592,7 @@ describe('v1.SnapshotsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSnapshotsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_ssl_certificates_v1.ts b/packages/google-cloud-compute/test/gapic_ssl_certificates_v1.ts index fc987bd1fb1..658581adb55 100644 --- a/packages/google-cloud-compute/test/gapic_ssl_certificates_v1.ts +++ b/packages/google-cloud-compute/test/gapic_ssl_certificates_v1.ts @@ -265,7 +265,9 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sslCertificatesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslCertificateRequest() ); @@ -360,7 +362,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslCertificateRequest() ); @@ -412,7 +414,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslCertificateRequest() ); @@ -445,7 +447,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslCertificateRequest() ); @@ -471,7 +473,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslCertificateRequest() ); @@ -506,7 +508,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslCertificateRequest() ); @@ -556,7 +558,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslCertificateRequest() ); @@ -588,7 +590,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslCertificateRequest() ); @@ -614,7 +616,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslCertificateRequest() ); @@ -645,7 +647,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslCertificateRequest() ); @@ -692,7 +694,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslCertificateRequest() ); @@ -720,7 +722,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslCertificateRequest() ); @@ -741,7 +743,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSslCertificatesRequest() ); @@ -801,7 +803,7 @@ describe('v1.SslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSslCertificatesRequest() ); @@ -845,7 +847,7 @@ describe('v1.SslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslCertificatesRequest() ); @@ -883,7 +885,7 @@ describe('v1.SslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslCertificatesRequest() ); @@ -936,7 +938,7 @@ describe('v1.SslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslCertificatesRequest() ); @@ -963,7 +965,7 @@ describe('v1.SslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslCertificatesRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.SslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslCertificatesRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.SslCertificatesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslCertificatesRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.SslCertificatesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslCertificatesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_ssl_policies_v1.ts b/packages/google-cloud-compute/test/gapic_ssl_policies_v1.ts index 5a1e0dc6896..fa5b9651cd0 100644 --- a/packages/google-cloud-compute/test/gapic_ssl_policies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_ssl_policies_v1.ts @@ -263,7 +263,9 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sslPoliciesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslPolicyRequest() ); @@ -358,7 +360,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslPolicyRequest() ); @@ -410,7 +412,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslPolicyRequest() ); @@ -443,7 +445,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSslPolicyRequest() ); @@ -469,7 +471,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslPolicyRequest() ); @@ -504,7 +506,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslPolicyRequest() ); @@ -554,7 +556,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslPolicyRequest() ); @@ -586,7 +588,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSslPolicyRequest() ); @@ -612,7 +614,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslPolicyRequest() ); @@ -643,7 +645,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslPolicyRequest() ); @@ -690,7 +692,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslPolicyRequest() ); @@ -718,7 +720,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSslPolicyRequest() ); @@ -739,7 +741,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest() ); @@ -771,7 +773,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest() ); @@ -818,7 +820,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest() ); @@ -852,7 +854,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest() ); @@ -876,7 +878,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSslPolicyRequest() ); @@ -911,7 +913,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSslPolicyRequest() ); @@ -961,7 +963,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSslPolicyRequest() ); @@ -993,7 +995,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSslPolicyRequest() ); @@ -1019,7 +1021,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSslPoliciesRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.SslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSslPoliciesRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.SslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslPoliciesRequest() ); @@ -1155,7 +1157,7 @@ describe('v1.SslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslPoliciesRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.SslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslPoliciesRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.SslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslPoliciesRequest() ); @@ -1283,7 +1285,7 @@ describe('v1.SslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslPoliciesRequest() ); @@ -1334,7 +1336,7 @@ describe('v1.SslPoliciesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslPoliciesRequest() ); @@ -1376,7 +1378,7 @@ describe('v1.SslPoliciesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSslPoliciesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_storage_pool_types_v1.ts b/packages/google-cloud-compute/test/gapic_storage_pool_types_v1.ts index 934ddcd6f06..99d78ab9ae4 100644 --- a/packages/google-cloud-compute/test/gapic_storage_pool_types_v1.ts +++ b/packages/google-cloud-compute/test/gapic_storage_pool_types_v1.ts @@ -265,7 +265,9 @@ describe('v1.StoragePoolTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.storagePoolTypesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.StoragePoolTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolTypeRequest() ); @@ -364,7 +366,7 @@ describe('v1.StoragePoolTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolTypeRequest() ); @@ -419,7 +421,7 @@ describe('v1.StoragePoolTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolTypeRequest() ); @@ -456,7 +458,7 @@ describe('v1.StoragePoolTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolTypeRequest() ); @@ -487,7 +489,7 @@ describe('v1.StoragePoolTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListStoragePoolTypesRequest() ); @@ -547,7 +549,7 @@ describe('v1.StoragePoolTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListStoragePoolTypesRequest() ); @@ -591,7 +593,7 @@ describe('v1.StoragePoolTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolTypesRequest() ); @@ -634,7 +636,7 @@ describe('v1.StoragePoolTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolTypesRequest() ); @@ -692,7 +694,7 @@ describe('v1.StoragePoolTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolTypesRequest() ); @@ -724,7 +726,7 @@ describe('v1.StoragePoolTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolTypesRequest() ); @@ -789,7 +791,7 @@ describe('v1.StoragePoolTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolTypesRequest() ); @@ -845,7 +847,7 @@ describe('v1.StoragePoolTypesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolTypesRequest() ); @@ -898,7 +900,7 @@ describe('v1.StoragePoolTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolTypesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_storage_pools_v1.ts b/packages/google-cloud-compute/test/gapic_storage_pools_v1.ts index fbe519fb354..b4ef9c36fad 100644 --- a/packages/google-cloud-compute/test/gapic_storage_pools_v1.ts +++ b/packages/google-cloud-compute/test/gapic_storage_pools_v1.ts @@ -265,7 +265,9 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.storagePoolsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteStoragePoolRequest() ); @@ -365,7 +367,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteStoragePoolRequest() ); @@ -422,7 +424,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteStoragePoolRequest() ); @@ -460,7 +462,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteStoragePoolRequest() ); @@ -491,7 +493,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolRequest() ); @@ -531,7 +533,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolRequest() ); @@ -586,7 +588,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolRequest() ); @@ -623,7 +625,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStoragePoolRequest() ); @@ -654,7 +656,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyStoragePoolRequest() ); @@ -695,7 +697,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyStoragePoolRequest() ); @@ -752,7 +754,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyStoragePoolRequest() ); @@ -793,7 +795,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicyStoragePoolRequest() ); @@ -824,7 +826,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertStoragePoolRequest() ); @@ -860,7 +862,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertStoragePoolRequest() ); @@ -912,7 +914,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertStoragePoolRequest() ); @@ -945,7 +947,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertStoragePoolRequest() ); @@ -971,7 +973,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyStoragePoolRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyStoragePoolRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyStoragePoolRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicyStoragePoolRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsStoragePoolRequest() ); @@ -1183,7 +1185,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsStoragePoolRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsStoragePoolRequest() ); @@ -1281,7 +1283,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsStoragePoolRequest() ); @@ -1312,7 +1314,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateStoragePoolRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateStoragePoolRequest() ); @@ -1410,7 +1412,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateStoragePoolRequest() ); @@ -1448,7 +1450,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateStoragePoolRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListStoragePoolsRequest() ); @@ -1539,7 +1541,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListStoragePoolsRequest() ); @@ -1583,7 +1585,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolsRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolsRequest() ); @@ -1672,7 +1674,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolsRequest() ); @@ -1704,7 +1706,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolsRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolsRequest() ); @@ -1819,7 +1821,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolsRequest() ); @@ -1866,7 +1868,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListStoragePoolsRequest() ); @@ -1914,7 +1916,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksStoragePoolsRequest() ); @@ -1963,7 +1965,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksStoragePoolsRequest() ); @@ -2028,7 +2030,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksStoragePoolsRequest() ); @@ -2066,7 +2068,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksStoragePoolsRequest() ); @@ -2136,7 +2138,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksStoragePoolsRequest() ); @@ -2197,7 +2199,7 @@ describe('v1.StoragePoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksStoragePoolsRequest() ); @@ -2255,7 +2257,7 @@ describe('v1.StoragePoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListDisksStoragePoolsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_subnetworks_v1.ts b/packages/google-cloud-compute/test/gapic_subnetworks_v1.ts index fa41206784e..a7b6e9afaff 100644 --- a/packages/google-cloud-compute/test/gapic_subnetworks_v1.ts +++ b/packages/google-cloud-compute/test/gapic_subnetworks_v1.ts @@ -263,7 +263,9 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.subnetworksStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSubnetworkRequest() ); @@ -363,7 +365,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSubnetworkRequest() ); @@ -420,7 +422,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSubnetworkRequest() ); @@ -458,7 +460,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteSubnetworkRequest() ); @@ -489,7 +491,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest() ); @@ -530,7 +532,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest() ); @@ -587,7 +589,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest() ); @@ -628,7 +630,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest() ); @@ -659,7 +661,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSubnetworkRequest() ); @@ -699,7 +701,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSubnetworkRequest() ); @@ -754,7 +756,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSubnetworkRequest() ); @@ -791,7 +793,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetSubnetworkRequest() ); @@ -822,7 +824,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySubnetworkRequest() ); @@ -863,7 +865,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySubnetworkRequest() ); @@ -920,7 +922,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySubnetworkRequest() ); @@ -961,7 +963,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetIamPolicySubnetworkRequest() ); @@ -992,7 +994,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSubnetworkRequest() ); @@ -1028,7 +1030,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSubnetworkRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSubnetworkRequest() ); @@ -1113,7 +1115,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertSubnetworkRequest() ); @@ -1139,7 +1141,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSubnetworkRequest() ); @@ -1179,7 +1181,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSubnetworkRequest() ); @@ -1234,7 +1236,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSubnetworkRequest() ); @@ -1271,7 +1273,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchSubnetworkRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySubnetworkRequest() ); @@ -1343,7 +1345,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySubnetworkRequest() ); @@ -1400,7 +1402,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySubnetworkRequest() ); @@ -1441,7 +1443,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetIamPolicySubnetworkRequest() ); @@ -1472,7 +1474,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest() ); @@ -1514,7 +1516,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest() ); @@ -1571,7 +1573,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest() ); @@ -1615,7 +1617,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest() ); @@ -1649,7 +1651,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest() ); @@ -1691,7 +1693,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest() ); @@ -1748,7 +1750,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest() ); @@ -1789,7 +1791,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest() ); @@ -1820,7 +1822,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSubnetworksRequest() ); @@ -1880,7 +1882,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListSubnetworksRequest() ); @@ -1924,7 +1926,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSubnetworksRequest() ); @@ -1961,7 +1963,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSubnetworksRequest() ); @@ -2013,7 +2015,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSubnetworksRequest() ); @@ -2045,7 +2047,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSubnetworksRequest() ); @@ -2104,7 +2106,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSubnetworksRequest() ); @@ -2160,7 +2162,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSubnetworksRequest() ); @@ -2207,7 +2209,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListSubnetworksRequest() ); @@ -2255,7 +2257,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableSubnetworksRequest() ); @@ -2294,7 +2296,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableSubnetworksRequest() ); @@ -2349,7 +2351,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableSubnetworksRequest() ); @@ -2380,7 +2382,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableSubnetworksRequest() ); @@ -2440,7 +2442,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableSubnetworksRequest() ); @@ -2491,7 +2493,7 @@ describe('v1.SubnetworksClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableSubnetworksRequest() ); @@ -2540,7 +2542,7 @@ describe('v1.SubnetworksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUsableSubnetworksRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_grpc_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_target_grpc_proxies_v1.ts index 0f9def8cde6..5421dffd155 100644 --- a/packages/google-cloud-compute/test/gapic_target_grpc_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_grpc_proxies_v1.ts @@ -266,7 +266,9 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetGrpcProxiesStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest() ); @@ -361,7 +363,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest() ); @@ -413,7 +415,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest() ); @@ -446,7 +448,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest() ); @@ -472,7 +474,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetGrpcProxyRequest() ); @@ -507,7 +509,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetGrpcProxyRequest() ); @@ -557,7 +559,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetGrpcProxyRequest() ); @@ -589,7 +591,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetGrpcProxyRequest() ); @@ -615,7 +617,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetGrpcProxyRequest() ); @@ -646,7 +648,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetGrpcProxyRequest() ); @@ -693,7 +695,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetGrpcProxyRequest() ); @@ -721,7 +723,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetGrpcProxyRequest() ); @@ -742,7 +744,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetGrpcProxyRequest() ); @@ -777,7 +779,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetGrpcProxyRequest() ); @@ -827,7 +829,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetGrpcProxyRequest() ); @@ -859,7 +861,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetGrpcProxyRequest() ); @@ -885,7 +887,7 @@ describe('v1.TargetGrpcProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetGrpcProxiesRequest() ); @@ -923,7 +925,7 @@ describe('v1.TargetGrpcProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetGrpcProxiesRequest() ); @@ -976,7 +978,7 @@ describe('v1.TargetGrpcProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetGrpcProxiesRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.TargetGrpcProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetGrpcProxiesRequest() ); @@ -1063,7 +1065,7 @@ describe('v1.TargetGrpcProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetGrpcProxiesRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.TargetGrpcProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetGrpcProxiesRequest() ); @@ -1162,7 +1164,7 @@ describe('v1.TargetGrpcProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetGrpcProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_http_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_target_http_proxies_v1.ts index 5bae6b71155..d25ea4d5d18 100644 --- a/packages/google-cloud-compute/test/gapic_target_http_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_http_proxies_v1.ts @@ -266,7 +266,9 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetHttpProxiesStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpProxyRequest() ); @@ -361,7 +363,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpProxyRequest() ); @@ -413,7 +415,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpProxyRequest() ); @@ -446,7 +448,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpProxyRequest() ); @@ -472,7 +474,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpProxyRequest() ); @@ -507,7 +509,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpProxyRequest() ); @@ -557,7 +559,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpProxyRequest() ); @@ -589,7 +591,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpProxyRequest() ); @@ -615,7 +617,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpProxyRequest() ); @@ -646,7 +648,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpProxyRequest() ); @@ -693,7 +695,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpProxyRequest() ); @@ -721,7 +723,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpProxyRequest() ); @@ -742,7 +744,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpProxyRequest() ); @@ -777,7 +779,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpProxyRequest() ); @@ -827,7 +829,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpProxyRequest() ); @@ -859,7 +861,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpProxyRequest() ); @@ -885,7 +887,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest() ); @@ -921,7 +923,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest() ); @@ -973,7 +975,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest() ); @@ -1006,7 +1008,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetHttpProxiesRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.TargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetHttpProxiesRequest() ); @@ -1136,7 +1138,7 @@ describe('v1.TargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpProxiesRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.TargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpProxiesRequest() ); @@ -1227,7 +1229,7 @@ describe('v1.TargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpProxiesRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.TargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpProxiesRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.TargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpProxiesRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.TargetHttpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpProxiesRequest() ); @@ -1413,7 +1415,7 @@ describe('v1.TargetHttpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_https_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_target_https_proxies_v1.ts index b67b2713751..fe01bc0c13f 100644 --- a/packages/google-cloud-compute/test/gapic_target_https_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_https_proxies_v1.ts @@ -267,7 +267,9 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetHttpsProxiesStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest() ); @@ -362,7 +364,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest() ); @@ -414,7 +416,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest() ); @@ -447,7 +449,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest() ); @@ -473,7 +475,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpsProxyRequest() ); @@ -508,7 +510,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpsProxyRequest() ); @@ -558,7 +560,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpsProxyRequest() ); @@ -590,7 +592,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetHttpsProxyRequest() ); @@ -616,7 +618,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpsProxyRequest() ); @@ -647,7 +649,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpsProxyRequest() ); @@ -694,7 +696,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpsProxyRequest() ); @@ -722,7 +724,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetHttpsProxyRequest() ); @@ -743,7 +745,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpsProxyRequest() ); @@ -778,7 +780,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpsProxyRequest() ); @@ -828,7 +830,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpsProxyRequest() ); @@ -860,7 +862,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchTargetHttpsProxyRequest() ); @@ -886,7 +888,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest() ); @@ -922,7 +924,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest() ); @@ -974,7 +976,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest() ); @@ -1010,7 +1012,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest() ); @@ -1036,7 +1038,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest() ); @@ -1072,7 +1074,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest() ); @@ -1124,7 +1126,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest() ); @@ -1186,7 +1188,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest() ); @@ -1311,7 +1313,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest() ); @@ -1425,7 +1427,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest() ); @@ -1461,7 +1463,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest() ); @@ -1523,7 +1525,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest() ); @@ -1575,7 +1577,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest() ); @@ -1608,7 +1610,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest() ); @@ -1634,7 +1636,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetHttpsProxiesRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.TargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetHttpsProxiesRequest() ); @@ -1738,7 +1740,7 @@ describe('v1.TargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpsProxiesRequest() ); @@ -1776,7 +1778,7 @@ describe('v1.TargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpsProxiesRequest() ); @@ -1829,7 +1831,7 @@ describe('v1.TargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpsProxiesRequest() ); @@ -1856,7 +1858,7 @@ describe('v1.TargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpsProxiesRequest() ); @@ -1916,7 +1918,7 @@ describe('v1.TargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpsProxiesRequest() ); @@ -1967,7 +1969,7 @@ describe('v1.TargetHttpsProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpsProxiesRequest() ); @@ -2015,7 +2017,7 @@ describe('v1.TargetHttpsProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetHttpsProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_instances_v1.ts b/packages/google-cloud-compute/test/gapic_target_instances_v1.ts index fe92b3b79ff..49f59742ed9 100644 --- a/packages/google-cloud-compute/test/gapic_target_instances_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_instances_v1.ts @@ -265,7 +265,9 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetInstancesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetInstanceRequest() ); @@ -365,7 +367,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetInstanceRequest() ); @@ -422,7 +424,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetInstanceRequest() ); @@ -460,7 +462,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetInstanceRequest() ); @@ -491,7 +493,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetInstanceRequest() ); @@ -531,7 +533,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetInstanceRequest() ); @@ -586,7 +588,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetInstanceRequest() ); @@ -623,7 +625,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetInstanceRequest() ); @@ -654,7 +656,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetInstanceRequest() ); @@ -690,7 +692,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetInstanceRequest() ); @@ -742,7 +744,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetInstanceRequest() ); @@ -775,7 +777,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetInstanceRequest() ); @@ -801,7 +803,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetInstanceRequest() ); @@ -842,7 +844,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetInstanceRequest() ); @@ -899,7 +901,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetInstanceRequest() ); @@ -940,7 +942,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetInstanceRequest() ); @@ -971,7 +973,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetInstancesRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.TargetInstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetInstancesRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.TargetInstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetInstancesRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.TargetInstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetInstancesRequest() ); @@ -1176,7 +1178,7 @@ describe('v1.TargetInstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetInstancesRequest() ); @@ -1208,7 +1210,7 @@ describe('v1.TargetInstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetInstancesRequest() ); @@ -1273,7 +1275,7 @@ describe('v1.TargetInstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetInstancesRequest() ); @@ -1329,7 +1331,7 @@ describe('v1.TargetInstancesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetInstancesRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.TargetInstancesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetInstancesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_pools_v1.ts b/packages/google-cloud-compute/test/gapic_target_pools_v1.ts index 88d0159aaf2..a17c75f4b5a 100644 --- a/packages/google-cloud-compute/test/gapic_target_pools_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_pools_v1.ts @@ -263,7 +263,9 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetPoolsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest() ); @@ -363,7 +365,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest() ); @@ -420,7 +422,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest() ); @@ -461,7 +463,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest() ); @@ -492,7 +494,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstanceTargetPoolRequest() ); @@ -533,7 +535,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstanceTargetPoolRequest() ); @@ -590,7 +592,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstanceTargetPoolRequest() ); @@ -631,7 +633,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AddInstanceTargetPoolRequest() ); @@ -662,7 +664,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetPoolRequest() ); @@ -703,7 +705,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetPoolRequest() ); @@ -760,7 +762,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetPoolRequest() ); @@ -798,7 +800,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetPoolRequest() ); @@ -829,7 +831,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetPoolRequest() ); @@ -869,7 +871,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetPoolRequest() ); @@ -924,7 +926,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetPoolRequest() ); @@ -961,7 +963,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetPoolRequest() ); @@ -992,7 +994,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthTargetPoolRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthTargetPoolRequest() ); @@ -1090,7 +1092,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthTargetPoolRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetHealthTargetPoolRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetPoolRequest() ); @@ -1195,7 +1197,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetPoolRequest() ); @@ -1247,7 +1249,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetPoolRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetPoolRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest() ); @@ -1347,7 +1349,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest() ); @@ -1404,7 +1406,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest() ); @@ -1445,7 +1447,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest() ); @@ -1476,7 +1478,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest() ); @@ -1517,7 +1519,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest() ); @@ -1574,7 +1576,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest() ); @@ -1615,7 +1617,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackupTargetPoolRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackupTargetPoolRequest() ); @@ -1744,7 +1746,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackupTargetPoolRequest() ); @@ -1782,7 +1784,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackupTargetPoolRequest() ); @@ -1813,7 +1815,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetPoolRequest() ); @@ -1854,7 +1856,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetPoolRequest() ); @@ -1911,7 +1913,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetPoolRequest() ); @@ -1952,7 +1954,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSecurityPolicyTargetPoolRequest() ); @@ -1983,7 +1985,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetPoolsRequest() ); @@ -2043,7 +2045,7 @@ describe('v1.TargetPoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetPoolsRequest() ); @@ -2087,7 +2089,7 @@ describe('v1.TargetPoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetPoolsRequest() ); @@ -2124,7 +2126,7 @@ describe('v1.TargetPoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetPoolsRequest() ); @@ -2176,7 +2178,7 @@ describe('v1.TargetPoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetPoolsRequest() ); @@ -2208,7 +2210,7 @@ describe('v1.TargetPoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetPoolsRequest() ); @@ -2267,7 +2269,7 @@ describe('v1.TargetPoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetPoolsRequest() ); @@ -2323,7 +2325,7 @@ describe('v1.TargetPoolsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetPoolsRequest() ); @@ -2370,7 +2372,7 @@ describe('v1.TargetPoolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetPoolsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_ssl_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_target_ssl_proxies_v1.ts index 060145e2e9b..7b3382caf5b 100644 --- a/packages/google-cloud-compute/test/gapic_target_ssl_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_ssl_proxies_v1.ts @@ -265,7 +265,9 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetSslProxiesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetSslProxyRequest() ); @@ -360,7 +362,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetSslProxyRequest() ); @@ -412,7 +414,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetSslProxyRequest() ); @@ -445,7 +447,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetSslProxyRequest() ); @@ -471,7 +473,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetSslProxyRequest() ); @@ -506,7 +508,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetSslProxyRequest() ); @@ -556,7 +558,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetSslProxyRequest() ); @@ -588,7 +590,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetSslProxyRequest() ); @@ -614,7 +616,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetSslProxyRequest() ); @@ -645,7 +647,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetSslProxyRequest() ); @@ -692,7 +694,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetSslProxyRequest() ); @@ -720,7 +722,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetSslProxyRequest() ); @@ -741,7 +743,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest() ); @@ -777,7 +779,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest() ); @@ -829,7 +831,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest() ); @@ -865,7 +867,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest() ); @@ -891,7 +893,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest() ); @@ -927,7 +929,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest() ); @@ -979,7 +981,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest() ); @@ -1015,7 +1017,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest() ); @@ -1077,7 +1079,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest() ); @@ -1129,7 +1131,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest() ); @@ -1165,7 +1167,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest() ); @@ -1191,7 +1193,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest() ); @@ -1228,7 +1230,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest() ); @@ -1316,7 +1318,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest() ); @@ -1378,7 +1380,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest() ); @@ -1430,7 +1432,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest() ); @@ -1466,7 +1468,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest() ); @@ -1492,7 +1494,7 @@ describe('v1.TargetSslProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetSslProxiesRequest() ); @@ -1530,7 +1532,7 @@ describe('v1.TargetSslProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetSslProxiesRequest() ); @@ -1583,7 +1585,7 @@ describe('v1.TargetSslProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetSslProxiesRequest() ); @@ -1610,7 +1612,7 @@ describe('v1.TargetSslProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetSslProxiesRequest() ); @@ -1670,7 +1672,7 @@ describe('v1.TargetSslProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetSslProxiesRequest() ); @@ -1721,7 +1723,7 @@ describe('v1.TargetSslProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetSslProxiesRequest() ); @@ -1769,7 +1771,7 @@ describe('v1.TargetSslProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetSslProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_tcp_proxies_v1.ts b/packages/google-cloud-compute/test/gapic_target_tcp_proxies_v1.ts index 5da559eaa50..1b56d85382f 100644 --- a/packages/google-cloud-compute/test/gapic_target_tcp_proxies_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_tcp_proxies_v1.ts @@ -265,7 +265,9 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetTcpProxiesStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetTcpProxyRequest() ); @@ -360,7 +362,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetTcpProxyRequest() ); @@ -412,7 +414,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetTcpProxyRequest() ); @@ -445,7 +447,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetTcpProxyRequest() ); @@ -471,7 +473,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetTcpProxyRequest() ); @@ -506,7 +508,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetTcpProxyRequest() ); @@ -556,7 +558,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetTcpProxyRequest() ); @@ -588,7 +590,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetTcpProxyRequest() ); @@ -614,7 +616,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetTcpProxyRequest() ); @@ -645,7 +647,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetTcpProxyRequest() ); @@ -692,7 +694,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetTcpProxyRequest() ); @@ -720,7 +722,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetTcpProxyRequest() ); @@ -741,7 +743,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest() ); @@ -777,7 +779,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest() ); @@ -829,7 +831,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest() ); @@ -865,7 +867,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest() ); @@ -891,7 +893,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest() ); @@ -927,7 +929,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest() ); @@ -979,7 +981,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest() ); @@ -1015,7 +1017,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetTcpProxiesRequest() ); @@ -1101,7 +1103,7 @@ describe('v1.TargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetTcpProxiesRequest() ); @@ -1145,7 +1147,7 @@ describe('v1.TargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetTcpProxiesRequest() ); @@ -1183,7 +1185,7 @@ describe('v1.TargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetTcpProxiesRequest() ); @@ -1236,7 +1238,7 @@ describe('v1.TargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetTcpProxiesRequest() ); @@ -1263,7 +1265,7 @@ describe('v1.TargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetTcpProxiesRequest() ); @@ -1323,7 +1325,7 @@ describe('v1.TargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetTcpProxiesRequest() ); @@ -1374,7 +1376,7 @@ describe('v1.TargetTcpProxiesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetTcpProxiesRequest() ); @@ -1422,7 +1424,7 @@ describe('v1.TargetTcpProxiesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetTcpProxiesRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_target_vpn_gateways_v1.ts b/packages/google-cloud-compute/test/gapic_target_vpn_gateways_v1.ts index f13cf23b34e..2e89aec7899 100644 --- a/packages/google-cloud-compute/test/gapic_target_vpn_gateways_v1.ts +++ b/packages/google-cloud-compute/test/gapic_target_vpn_gateways_v1.ts @@ -266,7 +266,9 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.targetVpnGatewaysStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest() ); @@ -366,7 +368,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest() ); @@ -423,7 +425,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest() ); @@ -461,7 +463,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest() ); @@ -492,7 +494,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetVpnGatewayRequest() ); @@ -532,7 +534,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetVpnGatewayRequest() ); @@ -587,7 +589,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetVpnGatewayRequest() ); @@ -624,7 +626,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetTargetVpnGatewayRequest() ); @@ -655,7 +657,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetVpnGatewayRequest() ); @@ -691,7 +693,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetVpnGatewayRequest() ); @@ -743,7 +745,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetVpnGatewayRequest() ); @@ -776,7 +778,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertTargetVpnGatewayRequest() ); @@ -802,7 +804,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest() ); @@ -843,7 +845,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest() ); @@ -900,7 +902,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest() ); @@ -938,7 +940,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest() ); @@ -969,7 +971,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.TargetVpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest() ); @@ -1073,7 +1075,7 @@ describe('v1.TargetVpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetVpnGatewaysRequest() ); @@ -1116,7 +1118,7 @@ describe('v1.TargetVpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetVpnGatewaysRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.TargetVpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetVpnGatewaysRequest() ); @@ -1206,7 +1208,7 @@ describe('v1.TargetVpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetVpnGatewaysRequest() ); @@ -1271,7 +1273,7 @@ describe('v1.TargetVpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetVpnGatewaysRequest() ); @@ -1327,7 +1329,7 @@ describe('v1.TargetVpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetVpnGatewaysRequest() ); @@ -1380,7 +1382,7 @@ describe('v1.TargetVpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListTargetVpnGatewaysRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_url_maps_v1.ts b/packages/google-cloud-compute/test/gapic_url_maps_v1.ts index 6731341e412..e4ce0dd679e 100644 --- a/packages/google-cloud-compute/test/gapic_url_maps_v1.ts +++ b/packages/google-cloud-compute/test/gapic_url_maps_v1.ts @@ -263,7 +263,9 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.urlMapsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteUrlMapRequest() ); @@ -358,7 +360,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteUrlMapRequest() ); @@ -410,7 +412,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteUrlMapRequest() ); @@ -443,7 +445,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteUrlMapRequest() ); @@ -469,7 +471,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetUrlMapRequest() ); @@ -504,7 +506,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetUrlMapRequest() ); @@ -554,7 +556,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetUrlMapRequest() ); @@ -586,7 +588,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetUrlMapRequest() ); @@ -612,7 +614,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertUrlMapRequest() ); @@ -643,7 +645,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertUrlMapRequest() ); @@ -690,7 +692,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertUrlMapRequest() ); @@ -718,7 +720,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertUrlMapRequest() ); @@ -739,7 +741,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InvalidateCacheUrlMapRequest() ); @@ -775,7 +777,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InvalidateCacheUrlMapRequest() ); @@ -827,7 +829,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InvalidateCacheUrlMapRequest() ); @@ -863,7 +865,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InvalidateCacheUrlMapRequest() ); @@ -889,7 +891,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchUrlMapRequest() ); @@ -924,7 +926,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchUrlMapRequest() ); @@ -974,7 +976,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchUrlMapRequest() ); @@ -1006,7 +1008,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.PatchUrlMapRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateUrlMapRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateUrlMapRequest() ); @@ -1120,7 +1122,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateUrlMapRequest() ); @@ -1153,7 +1155,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.UpdateUrlMapRequest() ); @@ -1179,7 +1181,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateUrlMapRequest() ); @@ -1215,7 +1217,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateUrlMapRequest() ); @@ -1267,7 +1269,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateUrlMapRequest() ); @@ -1300,7 +1302,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ValidateUrlMapRequest() ); @@ -1326,7 +1328,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListUrlMapsRequest() ); @@ -1386,7 +1388,7 @@ describe('v1.UrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListUrlMapsRequest() ); @@ -1430,7 +1432,7 @@ describe('v1.UrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUrlMapsRequest() ); @@ -1462,7 +1464,7 @@ describe('v1.UrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUrlMapsRequest() ); @@ -1509,7 +1511,7 @@ describe('v1.UrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUrlMapsRequest() ); @@ -1536,7 +1538,7 @@ describe('v1.UrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUrlMapsRequest() ); @@ -1587,7 +1589,7 @@ describe('v1.UrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUrlMapsRequest() ); @@ -1635,7 +1637,7 @@ describe('v1.UrlMapsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUrlMapsRequest() ); @@ -1677,7 +1679,7 @@ describe('v1.UrlMapsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListUrlMapsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_vpn_gateways_v1.ts b/packages/google-cloud-compute/test/gapic_vpn_gateways_v1.ts index 852a8baa41a..da423d96d9b 100644 --- a/packages/google-cloud-compute/test/gapic_vpn_gateways_v1.ts +++ b/packages/google-cloud-compute/test/gapic_vpn_gateways_v1.ts @@ -263,7 +263,9 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.vpnGatewaysStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnGatewayRequest() ); @@ -363,7 +365,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnGatewayRequest() ); @@ -420,7 +422,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnGatewayRequest() ); @@ -458,7 +460,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnGatewayRequest() ); @@ -489,7 +491,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnGatewayRequest() ); @@ -529,7 +531,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnGatewayRequest() ); @@ -584,7 +586,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnGatewayRequest() ); @@ -621,7 +623,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnGatewayRequest() ); @@ -652,7 +654,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStatusVpnGatewayRequest() ); @@ -693,7 +695,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStatusVpnGatewayRequest() ); @@ -750,7 +752,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStatusVpnGatewayRequest() ); @@ -788,7 +790,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetStatusVpnGatewayRequest() ); @@ -819,7 +821,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnGatewayRequest() ); @@ -855,7 +857,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnGatewayRequest() ); @@ -907,7 +909,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnGatewayRequest() ); @@ -940,7 +942,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnGatewayRequest() ); @@ -966,7 +968,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnGatewayRequest() ); @@ -1007,7 +1009,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnGatewayRequest() ); @@ -1064,7 +1066,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnGatewayRequest() ); @@ -1102,7 +1104,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnGatewayRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest() ); @@ -1273,7 +1275,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest() ); @@ -1304,7 +1306,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest() ); @@ -1364,7 +1366,7 @@ describe('v1.VpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest() ); @@ -1408,7 +1410,7 @@ describe('v1.VpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnGatewaysRequest() ); @@ -1445,7 +1447,7 @@ describe('v1.VpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnGatewaysRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.VpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnGatewaysRequest() ); @@ -1529,7 +1531,7 @@ describe('v1.VpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnGatewaysRequest() ); @@ -1588,7 +1590,7 @@ describe('v1.VpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnGatewaysRequest() ); @@ -1644,7 +1646,7 @@ describe('v1.VpnGatewaysClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnGatewaysRequest() ); @@ -1691,7 +1693,7 @@ describe('v1.VpnGatewaysClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnGatewaysRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_vpn_tunnels_v1.ts b/packages/google-cloud-compute/test/gapic_vpn_tunnels_v1.ts index 6b7ade18aaf..83299ce49e6 100644 --- a/packages/google-cloud-compute/test/gapic_vpn_tunnels_v1.ts +++ b/packages/google-cloud-compute/test/gapic_vpn_tunnels_v1.ts @@ -263,7 +263,9 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.vpnTunnelsStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnTunnelRequest() ); @@ -363,7 +365,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnTunnelRequest() ); @@ -420,7 +422,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnTunnelRequest() ); @@ -458,7 +460,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteVpnTunnelRequest() ); @@ -489,7 +491,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnTunnelRequest() ); @@ -529,7 +531,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnTunnelRequest() ); @@ -584,7 +586,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnTunnelRequest() ); @@ -621,7 +623,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetVpnTunnelRequest() ); @@ -652,7 +654,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnTunnelRequest() ); @@ -688,7 +690,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnTunnelRequest() ); @@ -740,7 +742,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnTunnelRequest() ); @@ -773,7 +775,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.InsertVpnTunnelRequest() ); @@ -799,7 +801,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnTunnelRequest() ); @@ -840,7 +842,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnTunnelRequest() ); @@ -897,7 +899,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnTunnelRequest() ); @@ -935,7 +937,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.SetLabelsVpnTunnelRequest() ); @@ -966,7 +968,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest() ); @@ -1026,7 +1028,7 @@ describe('v1.VpnTunnelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.VpnTunnelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnTunnelsRequest() ); @@ -1107,7 +1109,7 @@ describe('v1.VpnTunnelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnTunnelsRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.VpnTunnelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnTunnelsRequest() ); @@ -1191,7 +1193,7 @@ describe('v1.VpnTunnelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnTunnelsRequest() ); @@ -1250,7 +1252,7 @@ describe('v1.VpnTunnelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnTunnelsRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.VpnTunnelsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnTunnelsRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.VpnTunnelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListVpnTunnelsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_zone_operations_v1.ts b/packages/google-cloud-compute/test/gapic_zone_operations_v1.ts index 9b8d12e76a9..d07f2eb42eb 100644 --- a/packages/google-cloud-compute/test/gapic_zone_operations_v1.ts +++ b/packages/google-cloud-compute/test/gapic_zone_operations_v1.ts @@ -265,7 +265,9 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.zoneOperationsStub); client.close().then(() => { done(); @@ -324,7 +326,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteZoneOperationRequest() ); @@ -365,7 +367,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteZoneOperationRequest() ); @@ -422,7 +424,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteZoneOperationRequest() ); @@ -460,7 +462,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.DeleteZoneOperationRequest() ); @@ -491,7 +493,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneOperationRequest() ); @@ -531,7 +533,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneOperationRequest() ); @@ -586,7 +588,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneOperationRequest() ); @@ -623,7 +625,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneOperationRequest() ); @@ -654,7 +656,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitZoneOperationRequest() ); @@ -694,7 +696,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitZoneOperationRequest() ); @@ -749,7 +751,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitZoneOperationRequest() ); @@ -786,7 +788,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.WaitZoneOperationRequest() ); @@ -817,7 +819,7 @@ describe('v1.ZoneOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZoneOperationsRequest() ); @@ -854,7 +856,7 @@ describe('v1.ZoneOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZoneOperationsRequest() ); @@ -906,7 +908,7 @@ describe('v1.ZoneOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZoneOperationsRequest() ); @@ -938,7 +940,7 @@ describe('v1.ZoneOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZoneOperationsRequest() ); @@ -997,7 +999,7 @@ describe('v1.ZoneOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZoneOperationsRequest() ); @@ -1053,7 +1055,7 @@ describe('v1.ZoneOperationsClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZoneOperationsRequest() ); @@ -1100,7 +1102,7 @@ describe('v1.ZoneOperationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZoneOperationsRequest() ); diff --git a/packages/google-cloud-compute/test/gapic_zones_v1.ts b/packages/google-cloud-compute/test/gapic_zones_v1.ts index 952ab9c54c0..cd7942a7b9a 100644 --- a/packages/google-cloud-compute/test/gapic_zones_v1.ts +++ b/packages/google-cloud-compute/test/gapic_zones_v1.ts @@ -263,7 +263,9 @@ describe('v1.ZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.zonesStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.ZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneRequest() ); @@ -357,7 +359,7 @@ describe('v1.ZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneRequest() ); @@ -407,7 +409,7 @@ describe('v1.ZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneRequest() ); @@ -439,7 +441,7 @@ describe('v1.ZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.GetZoneRequest() ); @@ -465,7 +467,7 @@ describe('v1.ZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZonesRequest() ); @@ -497,7 +499,7 @@ describe('v1.ZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZonesRequest() ); @@ -544,7 +546,7 @@ describe('v1.ZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZonesRequest() ); @@ -571,7 +573,7 @@ describe('v1.ZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZonesRequest() ); @@ -622,7 +624,7 @@ describe('v1.ZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZonesRequest() ); @@ -670,7 +672,7 @@ describe('v1.ZonesClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZonesRequest() ); @@ -712,7 +714,7 @@ describe('v1.ZonesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.compute.v1.ListZonesRequest() ); diff --git a/packages/google-cloud-confidentialcomputing/package.json b/packages/google-cloud-confidentialcomputing/package.json index 46518d07ac5..82148898755 100644 --- a/packages/google-cloud-confidentialcomputing/package.json +++ b/packages/google-cloud-confidentialcomputing/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json index d1084d58171..3900da80b37 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "1.8.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json index 176fed8b3cb..d05e68dcd49 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "1.8.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json index 5c951c4a022..1184850ec6d 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "1.8.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json index 5c951c4a022..1184850ec6d 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "1.8.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts index c06f0b31da8..f922d25a9c4 100644 --- a/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts +++ b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts @@ -480,7 +480,9 @@ export class ConfidentialComputingClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createChallenge request %j', request); const wrappedCallback: | Callback< @@ -625,7 +627,9 @@ export class ConfidentialComputingClient { this._gaxModule.routingHeader.fromParams({ challenge: request.challenge ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('verifyAttestation request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client.ts b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client.ts index b7c6673550d..6d77b1551e9 100644 --- a/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client.ts +++ b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client.ts @@ -480,7 +480,9 @@ export class ConfidentialComputingClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createChallenge request %j', request); const wrappedCallback: | Callback< @@ -613,7 +615,9 @@ export class ConfidentialComputingClient { this._gaxModule.routingHeader.fromParams({ challenge: request.challenge ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('verifyAttestation request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1.ts b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1.ts index 9e91688a383..17683b1d6f6 100644 --- a/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1.ts +++ b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1.ts @@ -228,7 +228,9 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.confidentialComputingStub); client.close().then(() => { done(); @@ -291,7 +293,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() ); @@ -323,7 +325,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() ); @@ -371,7 +373,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() ); @@ -403,7 +405,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() ); @@ -425,7 +427,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() ); @@ -457,7 +459,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() ); @@ -505,7 +507,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() ); @@ -537,7 +539,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() ); @@ -558,7 +560,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -589,7 +591,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -634,7 +636,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -670,7 +672,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -719,7 +721,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -756,7 +758,7 @@ describe('v1.ConfidentialComputingClient', () => { }); describe('Path templates', () => { - describe('challenge', () => { + describe('challenge', async () => { const fakePath = '/rendered/path/challenge'; const expectedParameters = { project: 'projectValue', @@ -768,7 +770,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.challengePathTemplate.render = sinon .stub() .returns(fakePath); @@ -821,7 +823,7 @@ describe('v1.ConfidentialComputingClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -832,7 +834,7 @@ describe('v1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1alpha1.ts b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1alpha1.ts index 1c2dd12287b..f7d05757992 100644 --- a/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1alpha1.ts +++ b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1alpha1.ts @@ -228,7 +228,9 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.confidentialComputingStub); client.close().then(() => { done(); @@ -291,7 +293,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() ); @@ -323,7 +325,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() ); @@ -371,7 +373,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() ); @@ -403,7 +405,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() ); @@ -425,7 +427,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() ); @@ -457,7 +459,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() ); @@ -505,7 +507,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() ); @@ -537,7 +539,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() ); @@ -558,7 +560,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -589,7 +591,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -634,7 +636,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -670,7 +672,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -719,7 +721,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -756,7 +758,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { }); describe('Path templates', () => { - describe('challenge', () => { + describe('challenge', async () => { const fakePath = '/rendered/path/challenge'; const expectedParameters = { project: 'projectValue', @@ -768,7 +770,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.challengePathTemplate.render = sinon .stub() .returns(fakePath); @@ -821,7 +823,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -832,7 +834,7 @@ describe('v1alpha1.ConfidentialComputingClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-config/package.json b/packages/google-cloud-config/package.json index bda3d16cfa6..cbac90fdd4a 100644 --- a/packages/google-cloud-config/package.json +++ b/packages/google-cloud-config/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json index f2a1751aea3..5ead9288d5f 100644 --- a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json +++ b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-config", - "version": "0.7.0", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-config/src/v1/config_client.ts b/packages/google-cloud-config/src/v1/config_client.ts index f4d848fd103..e0a1e4c2885 100644 --- a/packages/google-cloud-config/src/v1/config_client.ts +++ b/packages/google-cloud-config/src/v1/config_client.ts @@ -683,7 +683,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployment request %j', request); const wrappedCallback: | Callback< @@ -792,7 +794,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRevision request %j', request); const wrappedCallback: | Callback< @@ -900,7 +904,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getResource request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1032,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('exportDeploymentStatefile request %j', request); const wrappedCallback: | Callback< @@ -1147,7 +1155,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('exportRevisionStatefile request %j', request); const wrappedCallback: | Callback< @@ -1268,7 +1278,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importStatefile request %j', request); const wrappedCallback: | Callback< @@ -1382,7 +1394,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteStatefile request %j', request); const wrappedCallback: | Callback< @@ -1493,7 +1507,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('exportLockInfo request %j', request); const wrappedCallback: | Callback< @@ -1602,7 +1618,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPreview request %j', request); const wrappedCallback: | Callback< @@ -1718,7 +1736,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('exportPreviewResult request %j', request); const wrappedCallback: | Callback< @@ -1836,7 +1856,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTerraformVersion request %j', request); const wrappedCallback: | Callback< @@ -1985,7 +2007,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2177,7 +2201,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ 'deployment.name': request.deployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2367,7 +2393,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2535,7 +2563,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2705,7 +2735,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2891,7 +2923,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3073,7 +3107,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3259,7 +3295,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.config.v1.IListDeploymentsRequest, @@ -3353,7 +3391,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments stream %j', request); return this.descriptors.page.listDeployments.createStream( this.innerApiCalls.listDeployments as GaxCall, @@ -3429,7 +3469,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments iterate %j', request); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, @@ -3554,7 +3596,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.config.v1.IListRevisionsRequest, @@ -3648,7 +3692,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRevisions stream %j', request); return this.descriptors.page.listRevisions.createStream( this.innerApiCalls.listRevisions as GaxCall, @@ -3724,7 +3770,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRevisions iterate %j', request); return this.descriptors.page.listRevisions.asyncIterate( this.innerApiCalls['listRevisions'] as GaxCall, @@ -3841,7 +3889,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.config.v1.IListResourcesRequest, @@ -3927,7 +3977,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResources stream %j', request); return this.descriptors.page.listResources.createStream( this.innerApiCalls.listResources as GaxCall, @@ -3995,7 +4047,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listResources iterate %j', request); return this.descriptors.page.listResources.asyncIterate( this.innerApiCalls['listResources'] as GaxCall, @@ -4121,7 +4175,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.config.v1.IListPreviewsRequest, @@ -4215,7 +4271,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listPreviews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPreviews stream %j', request); return this.descriptors.page.listPreviews.createStream( this.innerApiCalls.listPreviews as GaxCall, @@ -4291,7 +4349,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listPreviews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPreviews iterate %j', request); return this.descriptors.page.listPreviews.asyncIterate( this.innerApiCalls['listPreviews'] as GaxCall, @@ -4411,7 +4471,9 @@ export class ConfigClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.config.v1.IListTerraformVersionsRequest, @@ -4493,7 +4555,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listTerraformVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTerraformVersions stream %j', request); return this.descriptors.page.listTerraformVersions.createStream( this.innerApiCalls.listTerraformVersions as GaxCall, @@ -4557,7 +4621,9 @@ export class ConfigClient { }); const defaultCallSettings = this._defaults['listTerraformVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTerraformVersions iterate %j', request); return this.descriptors.page.listTerraformVersions.asyncIterate( this.innerApiCalls['listTerraformVersions'] as GaxCall, @@ -4875,7 +4941,7 @@ export class ConfigClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-config/test/gapic_config_v1.ts b/packages/google-cloud-config/test/gapic_config_v1.ts index 76221d0599c..275a3aafc7c 100644 --- a/packages/google-cloud-config/test/gapic_config_v1.ts +++ b/packages/google-cloud-config/test/gapic_config_v1.ts @@ -288,7 +288,9 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.configStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetDeploymentRequest() ); @@ -378,7 +380,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetDeploymentRequest() ); @@ -425,7 +427,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetDeploymentRequest() ); @@ -456,7 +458,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetDeploymentRequest() ); @@ -477,7 +479,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetRevisionRequest() ); @@ -508,7 +510,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetRevisionRequest() ); @@ -555,7 +557,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetRevisionRequest() ); @@ -586,7 +588,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetRevisionRequest() ); @@ -607,7 +609,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetResourceRequest() ); @@ -638,7 +640,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetResourceRequest() ); @@ -685,7 +687,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetResourceRequest() ); @@ -716,7 +718,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetResourceRequest() ); @@ -737,7 +739,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() ); @@ -769,7 +771,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() ); @@ -816,7 +818,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() ); @@ -850,7 +852,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportDeploymentStatefileRequest() ); @@ -874,7 +876,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() ); @@ -906,7 +908,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() ); @@ -953,7 +955,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() ); @@ -987,7 +989,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportRevisionStatefileRequest() ); @@ -1011,7 +1013,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ImportStatefileRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ImportStatefileRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ImportStatefileRequest() ); @@ -1120,7 +1122,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ImportStatefileRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteStatefileRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteStatefileRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteStatefileRequest() ); @@ -1250,7 +1252,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteStatefileRequest() ); @@ -1271,7 +1273,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportLockInfoRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportLockInfoRequest() ); @@ -1349,7 +1351,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportLockInfoRequest() ); @@ -1380,7 +1382,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportLockInfoRequest() ); @@ -1401,7 +1403,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetPreviewRequest() ); @@ -1432,7 +1434,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetPreviewRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetPreviewRequest() ); @@ -1510,7 +1512,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetPreviewRequest() ); @@ -1531,7 +1533,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportPreviewResultRequest() ); @@ -1563,7 +1565,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportPreviewResultRequest() ); @@ -1610,7 +1612,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportPreviewResultRequest() ); @@ -1641,7 +1643,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ExportPreviewResultRequest() ); @@ -1662,7 +1664,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetTerraformVersionRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetTerraformVersionRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetTerraformVersionRequest() ); @@ -1772,7 +1774,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.GetTerraformVersionRequest() ); @@ -1793,7 +1795,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreateDeploymentRequest() ); @@ -1826,7 +1828,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreateDeploymentRequest() ); @@ -1880,7 +1882,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreateDeploymentRequest() ); @@ -1911,7 +1913,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreateDeploymentRequest() ); @@ -1944,7 +1946,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1966,7 +1968,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1987,7 +1989,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UpdateDeploymentRequest() ); @@ -2021,7 +2023,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UpdateDeploymentRequest() ); @@ -2076,7 +2078,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UpdateDeploymentRequest() ); @@ -2108,7 +2110,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UpdateDeploymentRequest() ); @@ -2142,7 +2144,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2164,7 +2166,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2185,7 +2187,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteDeploymentRequest() ); @@ -2218,7 +2220,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteDeploymentRequest() ); @@ -2272,7 +2274,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteDeploymentRequest() ); @@ -2303,7 +2305,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeleteDeploymentRequest() ); @@ -2336,7 +2338,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2358,7 +2360,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2379,7 +2381,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.LockDeploymentRequest() ); @@ -2412,7 +2414,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.LockDeploymentRequest() ); @@ -2466,7 +2468,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.LockDeploymentRequest() ); @@ -2497,7 +2499,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.LockDeploymentRequest() ); @@ -2530,7 +2532,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2552,7 +2554,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2573,7 +2575,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UnlockDeploymentRequest() ); @@ -2606,7 +2608,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UnlockDeploymentRequest() ); @@ -2660,7 +2662,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UnlockDeploymentRequest() ); @@ -2691,7 +2693,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.UnlockDeploymentRequest() ); @@ -2724,7 +2726,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2746,7 +2748,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2767,7 +2769,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreatePreviewRequest() ); @@ -2800,7 +2802,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreatePreviewRequest() ); @@ -2854,7 +2856,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreatePreviewRequest() ); @@ -2885,7 +2887,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.CreatePreviewRequest() ); @@ -2918,7 +2920,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2940,7 +2942,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2961,7 +2963,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeletePreviewRequest() ); @@ -2994,7 +2996,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeletePreviewRequest() ); @@ -3048,7 +3050,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeletePreviewRequest() ); @@ -3079,7 +3081,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.DeletePreviewRequest() ); @@ -3112,7 +3114,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3134,7 +3136,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3155,7 +3157,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListDeploymentsRequest() ); @@ -3188,7 +3190,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListDeploymentsRequest() ); @@ -3237,7 +3239,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListDeploymentsRequest() ); @@ -3268,7 +3270,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListDeploymentsRequest() ); @@ -3322,7 +3324,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListDeploymentsRequest() ); @@ -3371,7 +3373,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListDeploymentsRequest() ); @@ -3414,7 +3416,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListDeploymentsRequest() ); @@ -3456,7 +3458,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListRevisionsRequest() ); @@ -3489,7 +3491,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListRevisionsRequest() ); @@ -3538,7 +3540,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListRevisionsRequest() ); @@ -3569,7 +3571,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListRevisionsRequest() ); @@ -3623,7 +3625,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListRevisionsRequest() ); @@ -3672,7 +3674,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListRevisionsRequest() ); @@ -3715,7 +3717,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListRevisionsRequest() ); @@ -3757,7 +3759,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListResourcesRequest() ); @@ -3790,7 +3792,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListResourcesRequest() ); @@ -3839,7 +3841,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListResourcesRequest() ); @@ -3870,7 +3872,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListResourcesRequest() ); @@ -3924,7 +3926,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListResourcesRequest() ); @@ -3973,7 +3975,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListResourcesRequest() ); @@ -4016,7 +4018,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListResourcesRequest() ); @@ -4058,7 +4060,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListPreviewsRequest() ); @@ -4091,7 +4093,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListPreviewsRequest() ); @@ -4140,7 +4142,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListPreviewsRequest() ); @@ -4171,7 +4173,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListPreviewsRequest() ); @@ -4222,7 +4224,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListPreviewsRequest() ); @@ -4270,7 +4272,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListPreviewsRequest() ); @@ -4313,7 +4315,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListPreviewsRequest() ); @@ -4355,7 +4357,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListTerraformVersionsRequest() ); @@ -4395,7 +4397,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListTerraformVersionsRequest() ); @@ -4450,7 +4452,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListTerraformVersionsRequest() ); @@ -4484,7 +4486,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListTerraformVersionsRequest() ); @@ -4550,7 +4552,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListTerraformVersionsRequest() ); @@ -4605,7 +4607,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListTerraformVersionsRequest() ); @@ -4658,7 +4660,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.config.v1.ListTerraformVersionsRequest() ); @@ -4703,7 +4705,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4733,7 +4735,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4777,7 +4779,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4809,7 +4811,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4839,7 +4841,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4883,7 +4885,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4915,7 +4917,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4948,7 +4950,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4992,7 +4994,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5027,7 +5029,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5057,7 +5059,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5101,7 +5103,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5136,7 +5138,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5184,7 +5186,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5225,7 +5227,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5304,7 +5306,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5384,7 +5386,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5480,8 +5482,7 @@ describe('v1.ConfigClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5500,7 +5501,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5509,8 +5510,7 @@ describe('v1.ConfigClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5526,7 +5526,7 @@ describe('v1.ConfigClient', () => { }); describe('Path templates', () => { - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -5537,7 +5537,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5590,7 +5590,7 @@ describe('v1.ConfigClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5600,7 +5600,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5639,7 +5639,7 @@ describe('v1.ConfigClient', () => { }); }); - describe('preview', () => { + describe('preview', async () => { const fakePath = '/rendered/path/preview'; const expectedParameters = { project: 'projectValue', @@ -5650,7 +5650,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.previewPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5703,7 +5703,7 @@ describe('v1.ConfigClient', () => { }); }); - describe('resource', () => { + describe('resource', async () => { const fakePath = '/rendered/path/resource'; const expectedParameters = { project: 'projectValue', @@ -5716,7 +5716,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.resourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5791,7 +5791,7 @@ describe('v1.ConfigClient', () => { }); }); - describe('revision', () => { + describe('revision', async () => { const fakePath = '/rendered/path/revision'; const expectedParameters = { project: 'projectValue', @@ -5803,7 +5803,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.revisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5867,7 +5867,7 @@ describe('v1.ConfigClient', () => { }); }); - describe('serviceAccount', () => { + describe('serviceAccount', async () => { const fakePath = '/rendered/path/serviceAccount'; const expectedParameters = { project: 'projectValue', @@ -5877,7 +5877,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5920,7 +5920,7 @@ describe('v1.ConfigClient', () => { }); }); - describe('terraformVersion', () => { + describe('terraformVersion', async () => { const fakePath = '/rendered/path/terraformVersion'; const expectedParameters = { project: 'projectValue', @@ -5931,7 +5931,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.terraformVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5988,7 +5988,7 @@ describe('v1.ConfigClient', () => { }); }); - describe('workerPool', () => { + describe('workerPool', async () => { const fakePath = '/rendered/path/workerPool'; const expectedParameters = { project: 'projectValue', @@ -5999,7 +5999,7 @@ describe('v1.ConfigClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workerPoolPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-connectors/package.json b/packages/google-cloud-connectors/package.json index bb5d6802ebd..2eff8d5df60 100644 --- a/packages/google-cloud-connectors/package.json +++ b/packages/google-cloud-connectors/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json b/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json index ee5aabba50e..d6d01a1f01d 100644 --- a/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json +++ b/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connectors", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-connectors/src/v1/connectors_client.ts b/packages/google-cloud-connectors/src/v1/connectors_client.ts index 8b18be8ced1..bf74ab51d40 100644 --- a/packages/google-cloud-connectors/src/v1/connectors_client.ts +++ b/packages/google-cloud-connectors/src/v1/connectors_client.ts @@ -676,7 +676,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnection request %j', request); const wrappedCallback: | Callback< @@ -788,7 +790,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProvider request %j', request); const wrappedCallback: | Callback< @@ -900,7 +904,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnector request %j', request); const wrappedCallback: | Callback< @@ -1021,7 +1027,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectorVersion request %j', request); const wrappedCallback: | Callback< @@ -1149,7 +1157,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectionSchemaMetadata request %j', request); const wrappedCallback: | Callback< @@ -1270,7 +1280,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRuntimeConfig request %j', request); const wrappedCallback: | Callback< @@ -1390,7 +1402,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGlobalSettings request %j', request); const wrappedCallback: | Callback< @@ -1528,7 +1542,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1712,7 +1728,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ 'connection.name': request.connection!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1880,7 +1898,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2049,7 +2069,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2225,7 +2247,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.connectors.v1.IListConnectionsRequest, @@ -2298,7 +2322,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections stream %j', request); return this.descriptors.page.listConnections.createStream( this.innerApiCalls.listConnections as GaxCall, @@ -2353,7 +2379,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections iterate %j', request); return this.descriptors.page.listConnections.asyncIterate( this.innerApiCalls['listConnections'] as GaxCall, @@ -2457,7 +2485,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.connectors.v1.IListProvidersRequest, @@ -2524,7 +2554,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listProviders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProviders stream %j', request); return this.descriptors.page.listProviders.createStream( this.innerApiCalls.listProviders as GaxCall, @@ -2573,7 +2605,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listProviders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProviders iterate %j', request); return this.descriptors.page.listProviders.asyncIterate( this.innerApiCalls['listProviders'] as GaxCall, @@ -2677,7 +2711,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.connectors.v1.IListConnectorsRequest, @@ -2744,7 +2780,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectors stream %j', request); return this.descriptors.page.listConnectors.createStream( this.innerApiCalls.listConnectors as GaxCall, @@ -2793,7 +2831,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectors iterate %j', request); return this.descriptors.page.listConnectors.asyncIterate( this.innerApiCalls['listConnectors'] as GaxCall, @@ -2900,7 +2940,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.connectors.v1.IListConnectorVersionsRequest, @@ -2970,7 +3012,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listConnectorVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectorVersions stream %j', request); return this.descriptors.page.listConnectorVersions.createStream( this.innerApiCalls.listConnectorVersions as GaxCall, @@ -3022,7 +3066,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listConnectorVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectorVersions iterate %j', request); return this.descriptors.page.listConnectorVersions.asyncIterate( this.innerApiCalls['listConnectorVersions'] as GaxCall, @@ -3133,7 +3179,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.connectors.v1.IListRuntimeEntitySchemasRequest, @@ -3207,7 +3255,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listRuntimeEntitySchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeEntitySchemas stream %j', request); return this.descriptors.page.listRuntimeEntitySchemas.createStream( this.innerApiCalls.listRuntimeEntitySchemas as GaxCall, @@ -3263,7 +3313,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listRuntimeEntitySchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeEntitySchemas iterate %j', request); return this.descriptors.page.listRuntimeEntitySchemas.asyncIterate( this.innerApiCalls['listRuntimeEntitySchemas'] as GaxCall, @@ -3374,7 +3426,9 @@ export class ConnectorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.connectors.v1.IListRuntimeActionSchemasRequest, @@ -3448,7 +3502,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listRuntimeActionSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeActionSchemas stream %j', request); return this.descriptors.page.listRuntimeActionSchemas.createStream( this.innerApiCalls.listRuntimeActionSchemas as GaxCall, @@ -3504,7 +3560,9 @@ export class ConnectorsClient { }); const defaultCallSettings = this._defaults['listRuntimeActionSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeActionSchemas iterate %j', request); return this.descriptors.page.listRuntimeActionSchemas.asyncIterate( this.innerApiCalls['listRuntimeActionSchemas'] as GaxCall, @@ -3822,7 +3880,7 @@ export class ConnectorsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-connectors/test/gapic_connectors_v1.ts b/packages/google-cloud-connectors/test/gapic_connectors_v1.ts index 77b719f4ebb..640c4c6a5f5 100644 --- a/packages/google-cloud-connectors/test/gapic_connectors_v1.ts +++ b/packages/google-cloud-connectors/test/gapic_connectors_v1.ts @@ -288,7 +288,9 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.connectorsStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionRequest() ); @@ -378,7 +380,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionRequest() ); @@ -425,7 +427,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionRequest() ); @@ -456,7 +458,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionRequest() ); @@ -477,7 +479,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetProviderRequest() ); @@ -508,7 +510,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetProviderRequest() ); @@ -555,7 +557,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetProviderRequest() ); @@ -586,7 +588,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetProviderRequest() ); @@ -607,7 +609,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorRequest() ); @@ -638,7 +640,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorRequest() ); @@ -685,7 +687,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorRequest() ); @@ -716,7 +718,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorRequest() ); @@ -737,7 +739,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorVersionRequest() ); @@ -769,7 +771,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorVersionRequest() ); @@ -816,7 +818,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorVersionRequest() ); @@ -847,7 +849,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectorVersionRequest() ); @@ -868,7 +870,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionSchemaMetadataRequest() ); @@ -900,7 +902,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionSchemaMetadataRequest() ); @@ -947,7 +949,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionSchemaMetadataRequest() ); @@ -981,7 +983,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetConnectionSchemaMetadataRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetRuntimeConfigRequest() ); @@ -1036,7 +1038,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetRuntimeConfigRequest() ); @@ -1083,7 +1085,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetRuntimeConfigRequest() ); @@ -1114,7 +1116,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetRuntimeConfigRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetGlobalSettingsRequest() ); @@ -1166,7 +1168,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetGlobalSettingsRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetGlobalSettingsRequest() ); @@ -1244,7 +1246,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.GetGlobalSettingsRequest() ); @@ -1265,7 +1267,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.CreateConnectionRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.CreateConnectionRequest() ); @@ -1352,7 +1354,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.CreateConnectionRequest() ); @@ -1383,7 +1385,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.CreateConnectionRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1438,7 +1440,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1459,7 +1461,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.UpdateConnectionRequest() ); @@ -1493,7 +1495,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.UpdateConnectionRequest() ); @@ -1548,7 +1550,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.UpdateConnectionRequest() ); @@ -1580,7 +1582,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.UpdateConnectionRequest() ); @@ -1614,7 +1616,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1636,7 +1638,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1657,7 +1659,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.DeleteConnectionRequest() ); @@ -1690,7 +1692,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.DeleteConnectionRequest() ); @@ -1744,7 +1746,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.DeleteConnectionRequest() ); @@ -1775,7 +1777,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.DeleteConnectionRequest() ); @@ -1808,7 +1810,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1830,7 +1832,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1851,7 +1853,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.RefreshConnectionSchemaMetadataRequest() ); @@ -1884,7 +1886,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.RefreshConnectionSchemaMetadataRequest() ); @@ -1938,7 +1940,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.RefreshConnectionSchemaMetadataRequest() ); @@ -1970,7 +1972,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.RefreshConnectionSchemaMetadataRequest() ); @@ -2000,7 +2002,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2023,7 +2025,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2044,7 +2046,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectionsRequest() ); @@ -2083,7 +2085,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectionsRequest() ); @@ -2138,7 +2140,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectionsRequest() ); @@ -2169,7 +2171,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectionsRequest() ); @@ -2229,7 +2231,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectionsRequest() ); @@ -2278,7 +2280,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectionsRequest() ); @@ -2327,7 +2329,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectionsRequest() ); @@ -2369,7 +2371,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListProvidersRequest() ); @@ -2402,7 +2404,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListProvidersRequest() ); @@ -2451,7 +2453,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListProvidersRequest() ); @@ -2482,7 +2484,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListProvidersRequest() ); @@ -2536,7 +2538,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListProvidersRequest() ); @@ -2585,7 +2587,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListProvidersRequest() ); @@ -2628,7 +2630,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListProvidersRequest() ); @@ -2670,7 +2672,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorsRequest() ); @@ -2709,7 +2711,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorsRequest() ); @@ -2764,7 +2766,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorsRequest() ); @@ -2795,7 +2797,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorsRequest() ); @@ -2855,7 +2857,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorsRequest() ); @@ -2904,7 +2906,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorsRequest() ); @@ -2953,7 +2955,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorsRequest() ); @@ -2995,7 +2997,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorVersionsRequest() ); @@ -3035,7 +3037,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorVersionsRequest() ); @@ -3092,7 +3094,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorVersionsRequest() ); @@ -3126,7 +3128,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorVersionsRequest() ); @@ -3193,7 +3195,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorVersionsRequest() ); @@ -3249,7 +3251,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorVersionsRequest() ); @@ -3303,7 +3305,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListConnectorVersionsRequest() ); @@ -3350,7 +3352,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest() ); @@ -3390,7 +3392,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest() ); @@ -3447,7 +3449,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest() ); @@ -3481,7 +3483,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest() ); @@ -3548,7 +3550,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest() ); @@ -3604,7 +3606,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest() ); @@ -3658,7 +3660,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest() ); @@ -3705,7 +3707,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeActionSchemasRequest() ); @@ -3745,7 +3747,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeActionSchemasRequest() ); @@ -3802,7 +3804,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeActionSchemasRequest() ); @@ -3836,7 +3838,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeActionSchemasRequest() ); @@ -3903,7 +3905,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeActionSchemasRequest() ); @@ -3959,7 +3961,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeActionSchemasRequest() ); @@ -4013,7 +4015,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.connectors.v1.ListRuntimeActionSchemasRequest() ); @@ -4059,7 +4061,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4089,7 +4091,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4133,7 +4135,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4165,7 +4167,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4195,7 +4197,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4239,7 +4241,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4271,7 +4273,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4304,7 +4306,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4348,7 +4350,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4383,7 +4385,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4413,7 +4415,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4457,7 +4459,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4492,7 +4494,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4540,7 +4542,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4581,7 +4583,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4660,7 +4662,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4740,7 +4742,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4836,8 +4838,7 @@ describe('v1.ConnectorsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4856,7 +4857,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4865,8 +4866,7 @@ describe('v1.ConnectorsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4882,7 +4882,7 @@ describe('v1.ConnectorsClient', () => { }); describe('Path templates', () => { - describe('connection', () => { + describe('connection', async () => { const fakePath = '/rendered/path/connection'; const expectedParameters = { project: 'projectValue', @@ -4893,7 +4893,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4946,7 +4946,7 @@ describe('v1.ConnectorsClient', () => { }); }); - describe('connectionSchemaMetadata', () => { + describe('connectionSchemaMetadata', async () => { const fakePath = '/rendered/path/connectionSchemaMetadata'; const expectedParameters = { project: 'projectValue', @@ -4957,7 +4957,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionSchemaMetadataPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5025,7 +5025,7 @@ describe('v1.ConnectorsClient', () => { }); }); - describe('connector', () => { + describe('connector', async () => { const fakePath = '/rendered/path/connector'; const expectedParameters = { project: 'projectValue', @@ -5037,7 +5037,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5101,7 +5101,7 @@ describe('v1.ConnectorsClient', () => { }); }); - describe('connectorVersion', () => { + describe('connectorVersion', async () => { const fakePath = '/rendered/path/connectorVersion'; const expectedParameters = { project: 'projectValue', @@ -5114,7 +5114,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5192,7 +5192,7 @@ describe('v1.ConnectorsClient', () => { }); }); - describe('provider', () => { + describe('provider', async () => { const fakePath = '/rendered/path/provider'; const expectedParameters = { project: 'projectValue', @@ -5203,7 +5203,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.providerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5256,7 +5256,7 @@ describe('v1.ConnectorsClient', () => { }); }); - describe('runtimeConfig', () => { + describe('runtimeConfig', async () => { const fakePath = '/rendered/path/runtimeConfig'; const expectedParameters = { project: 'projectValue', @@ -5266,7 +5266,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5308,7 +5308,7 @@ describe('v1.ConnectorsClient', () => { }); }); - describe('settings', () => { + describe('settings', async () => { const fakePath = '/rendered/path/settings'; const expectedParameters = { project: 'projectValue', @@ -5317,7 +5317,7 @@ describe('v1.ConnectorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.settingsPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-contactcenterinsights/package.json b/packages/google-cloud-contactcenterinsights/package.json index 51a98bf2654..d1530037dbd 100644 --- a/packages/google-cloud-contactcenterinsights/package.json +++ b/packages/google-cloud-contactcenterinsights/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index dba418683b8..648b68a375f 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "3.9.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json index 5cbe5e1e6b9..3fda68f66c5 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "3.9.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts index a8f4353c412..84ffe5f2e8a 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts @@ -916,7 +916,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversation request %j', request); const wrappedCallback: | Callback< @@ -1056,7 +1058,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'conversation.name': request.conversation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConversation request %j', request); const wrappedCallback: | Callback< @@ -1183,7 +1187,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversation request %j', request); const wrappedCallback: | Callback< @@ -1312,7 +1318,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversation request %j', request); const wrappedCallback: | Callback< @@ -1437,7 +1445,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnalysis request %j', request); const wrappedCallback: | Callback< @@ -1562,7 +1572,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAnalysis request %j', request); const wrappedCallback: | Callback< @@ -1689,7 +1701,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'issue_model.name': request.issueModel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIssueModel request %j', request); const wrappedCallback: | Callback< @@ -1814,7 +1828,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIssueModel request %j', request); const wrappedCallback: | Callback< @@ -1939,7 +1955,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIssueModels request %j', request); const wrappedCallback: | Callback< @@ -2058,7 +2076,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIssue request %j', request); const wrappedCallback: | Callback< @@ -2183,7 +2203,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIssues request %j', request); const wrappedCallback: | Callback< @@ -2310,7 +2332,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'issue.name': request.issue!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIssue request %j', request); const wrappedCallback: | Callback< @@ -2435,7 +2459,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteIssue request %j', request); const wrappedCallback: | Callback< @@ -2560,7 +2586,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ issue_model: request.issueModel ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('calculateIssueModelStats request %j', request); const wrappedCallback: | Callback< @@ -2690,7 +2718,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPhraseMatcher request %j', request); const wrappedCallback: | Callback< @@ -2815,7 +2845,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPhraseMatcher request %j', request); const wrappedCallback: | Callback< @@ -2940,7 +2972,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePhraseMatcher request %j', request); const wrappedCallback: | Callback< @@ -3067,7 +3101,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'phrase_matcher.name': request.phraseMatcher!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePhraseMatcher request %j', request); const wrappedCallback: | Callback< @@ -3195,7 +3231,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('calculateStats request %j', request); const wrappedCallback: | Callback< @@ -3320,7 +3358,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSettings request %j', request); const wrappedCallback: | Callback< @@ -3447,7 +3487,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'settings.name': request.settings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSettings request %j', request); const wrappedCallback: | Callback< @@ -3577,7 +3619,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAnalysisRule request %j', request); const wrappedCallback: | Callback< @@ -3702,7 +3746,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnalysisRule request %j', request); const wrappedCallback: | Callback< @@ -3831,7 +3877,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'analysis_rule.name': request.analysisRule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAnalysisRule request %j', request); const wrappedCallback: | Callback< @@ -3956,7 +4004,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAnalysisRule request %j', request); const wrappedCallback: | Callback< @@ -4081,7 +4131,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEncryptionSpec request %j', request); const wrappedCallback: | Callback< @@ -4211,7 +4263,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createView request %j', request); const wrappedCallback: | Callback< @@ -4330,7 +4384,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getView request %j', request); const wrappedCallback: | Callback< @@ -4457,7 +4513,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'view.name': request.view!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateView request %j', request); const wrappedCallback: | Callback< @@ -4582,7 +4640,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteView request %j', request); const wrappedCallback: | Callback< @@ -4716,7 +4776,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQaQuestion request %j', request); const wrappedCallback: | Callback< @@ -4841,7 +4903,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQaQuestion request %j', request); const wrappedCallback: | Callback< @@ -4977,7 +5041,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'qa_question.name': request.qaQuestion!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQaQuestion request %j', request); const wrappedCallback: | Callback< @@ -5102,7 +5168,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteQaQuestion request %j', request); const wrappedCallback: | Callback< @@ -5236,7 +5304,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQaScorecard request %j', request); const wrappedCallback: | Callback< @@ -5361,7 +5431,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQaScorecard request %j', request); const wrappedCallback: | Callback< @@ -5493,7 +5565,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'qa_scorecard.name': request.qaScorecard!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateQaScorecard request %j', request); const wrappedCallback: | Callback< @@ -5621,7 +5695,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteQaScorecard request %j', request); const wrappedCallback: | Callback< @@ -5755,7 +5831,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQaScorecardRevision request %j', request); const wrappedCallback: | Callback< @@ -5880,7 +5958,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQaScorecardRevision request %j', request); const wrappedCallback: | Callback< @@ -6005,7 +6085,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deployQaScorecardRevision request %j', request); const wrappedCallback: | Callback< @@ -6130,7 +6212,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('undeployQaScorecardRevision request %j', request); const wrappedCallback: | Callback< @@ -6259,7 +6343,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteQaScorecardRevision request %j', request); const wrappedCallback: | Callback< @@ -6389,7 +6475,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFeedbackLabel request %j', request); const wrappedCallback: | Callback< @@ -6514,7 +6602,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFeedbackLabel request %j', request); const wrappedCallback: | Callback< @@ -6641,7 +6731,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'feedback_label.name': request.feedbackLabel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFeedbackLabel request %j', request); const wrappedCallback: | Callback< @@ -6766,7 +6858,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFeedbackLabel request %j', request); const wrappedCallback: | Callback< @@ -6915,7 +7009,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7085,7 +7181,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7260,7 +7358,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7437,7 +7537,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7623,7 +7725,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7801,7 +7905,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7970,7 +8076,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8137,7 +8245,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8305,7 +8415,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8473,7 +8585,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8642,7 +8756,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8815,7 +8931,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8989,7 +9107,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ 'encryption_spec.name': request.encryptionSpec!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9180,7 +9300,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9358,7 +9480,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9531,7 +9655,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9729,7 +9855,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9917,7 +10045,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, @@ -10008,7 +10138,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations stream %j', request); return this.descriptors.page.listConversations.createStream( this.innerApiCalls.listConversations as GaxCall, @@ -10081,7 +10213,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations iterate %j', request); return this.descriptors.page.listConversations.asyncIterate( this.innerApiCalls['listConversations'] as GaxCall, @@ -10191,7 +10325,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, @@ -10264,7 +10400,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listAnalyses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnalyses stream %j', request); return this.descriptors.page.listAnalyses.createStream( this.innerApiCalls.listAnalyses as GaxCall, @@ -10319,7 +10457,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listAnalyses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnalyses iterate %j', request); return this.descriptors.page.listAnalyses.asyncIterate( this.innerApiCalls['listAnalyses'] as GaxCall, @@ -10429,7 +10569,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, @@ -10502,7 +10644,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listPhraseMatchers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseMatchers stream %j', request); return this.descriptors.page.listPhraseMatchers.createStream( this.innerApiCalls.listPhraseMatchers as GaxCall, @@ -10557,7 +10701,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listPhraseMatchers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhraseMatchers iterate %j', request); return this.descriptors.page.listPhraseMatchers.asyncIterate( this.innerApiCalls['listPhraseMatchers'] as GaxCall, @@ -10664,7 +10810,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, @@ -10734,7 +10882,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listAnalysisRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnalysisRules stream %j', request); return this.descriptors.page.listAnalysisRules.createStream( this.innerApiCalls.listAnalysisRules as GaxCall, @@ -10786,7 +10936,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listAnalysisRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnalysisRules iterate %j', request); return this.descriptors.page.listAnalysisRules.asyncIterate( this.innerApiCalls['listAnalysisRules'] as GaxCall, @@ -10893,7 +11045,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, @@ -10963,7 +11117,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listViews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViews stream %j', request); return this.descriptors.page.listViews.createStream( this.innerApiCalls.listViews as GaxCall, @@ -11015,7 +11171,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listViews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listViews iterate %j', request); return this.descriptors.page.listViews.asyncIterate( this.innerApiCalls['listViews'] as GaxCall, @@ -11122,7 +11280,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, @@ -11192,7 +11352,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listQaQuestions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQaQuestions stream %j', request); return this.descriptors.page.listQaQuestions.createStream( this.innerApiCalls.listQaQuestions as GaxCall, @@ -11244,7 +11406,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listQaQuestions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQaQuestions iterate %j', request); return this.descriptors.page.listQaQuestions.asyncIterate( this.innerApiCalls['listQaQuestions'] as GaxCall, @@ -11351,7 +11515,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, @@ -11421,7 +11587,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listQaScorecards']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQaScorecards stream %j', request); return this.descriptors.page.listQaScorecards.createStream( this.innerApiCalls.listQaScorecards as GaxCall, @@ -11473,7 +11641,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listQaScorecards']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQaScorecards iterate %j', request); return this.descriptors.page.listQaScorecards.asyncIterate( this.innerApiCalls['listQaScorecards'] as GaxCall, @@ -11586,7 +11756,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, @@ -11662,7 +11834,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listQaScorecardRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQaScorecardRevisions stream %j', request); return this.descriptors.page.listQaScorecardRevisions.createStream( this.innerApiCalls.listQaScorecardRevisions as GaxCall, @@ -11720,7 +11894,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listQaScorecardRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQaScorecardRevisions iterate %j', request); return this.descriptors.page.listQaScorecardRevisions.asyncIterate( this.innerApiCalls['listQaScorecardRevisions'] as GaxCall, @@ -11843,7 +12019,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, @@ -11929,7 +12107,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listFeedbackLabels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeedbackLabels stream %j', request); return this.descriptors.page.listFeedbackLabels.createStream( this.innerApiCalls.listFeedbackLabels as GaxCall, @@ -11997,7 +12177,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listFeedbackLabels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeedbackLabels iterate %j', request); return this.descriptors.page.listFeedbackLabels.asyncIterate( this.innerApiCalls['listFeedbackLabels'] as GaxCall, @@ -12118,7 +12300,9 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, @@ -12202,7 +12386,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listAllFeedbackLabels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAllFeedbackLabels stream %j', request); return this.descriptors.page.listAllFeedbackLabels.createStream( this.innerApiCalls.listAllFeedbackLabels as GaxCall, @@ -12268,7 +12454,9 @@ export class ContactCenterInsightsClient { }); const defaultCallSettings = this._defaults['listAllFeedbackLabels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAllFeedbackLabels iterate %j', request); return this.descriptors.page.listAllFeedbackLabels.asyncIterate( this.innerApiCalls['listAllFeedbackLabels'] as GaxCall, @@ -12508,7 +12696,7 @@ export class ContactCenterInsightsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts index 8607abd44ae..98f50910b34 100644 --- a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts +++ b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts @@ -300,7 +300,9 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.contactCenterInsightsStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() ); @@ -396,7 +398,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() ); @@ -444,7 +446,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() ); @@ -476,7 +478,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() ); @@ -498,7 +500,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() ); @@ -532,7 +534,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() ); @@ -581,7 +583,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() ); @@ -614,7 +616,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() ); @@ -637,7 +639,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() ); @@ -669,7 +671,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() ); @@ -717,7 +719,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() ); @@ -749,7 +751,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() ); @@ -771,7 +773,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() ); @@ -804,7 +806,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() ); @@ -852,7 +854,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() ); @@ -884,7 +886,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() ); @@ -906,7 +908,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() ); @@ -938,7 +940,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() ); @@ -986,7 +988,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() ); @@ -1018,7 +1020,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() ); @@ -1040,7 +1042,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() ); @@ -1072,7 +1074,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() ); @@ -1120,7 +1122,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() ); @@ -1152,7 +1154,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() ); @@ -1256,7 +1258,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() ); @@ -1312,7 +1314,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() ); @@ -1344,7 +1346,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() ); @@ -1392,7 +1394,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() ); @@ -1478,7 +1480,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() ); @@ -1526,7 +1528,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() ); @@ -1558,7 +1560,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() ); @@ -1580,7 +1582,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() ); @@ -1612,7 +1614,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() ); @@ -1660,7 +1662,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() ); @@ -1689,7 +1691,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() ); @@ -1711,7 +1713,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() ); @@ -1743,7 +1745,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() ); @@ -1791,7 +1793,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() ); @@ -1823,7 +1825,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() ); @@ -1845,7 +1847,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() ); @@ -1878,7 +1880,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() ); @@ -1927,7 +1929,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() ); @@ -1960,7 +1962,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() ); @@ -1983,7 +1985,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() ); @@ -2015,7 +2017,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() ); @@ -2063,7 +2065,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() ); @@ -2095,7 +2097,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() ); @@ -2117,7 +2119,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() ); @@ -2150,7 +2152,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() ); @@ -2198,7 +2200,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() ); @@ -2233,7 +2235,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() ); @@ -2258,7 +2260,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() ); @@ -2291,7 +2293,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() ); @@ -2339,7 +2341,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() ); @@ -2371,7 +2373,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() ); @@ -2393,7 +2395,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() ); @@ -2425,7 +2427,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() ); @@ -2473,7 +2475,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() ); @@ -2505,7 +2507,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() ); @@ -2527,7 +2529,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() ); @@ -2560,7 +2562,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() ); @@ -2608,7 +2610,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() ); @@ -2640,7 +2642,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() ); @@ -2662,7 +2664,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() ); @@ -2696,7 +2698,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() ); @@ -2745,7 +2747,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() ); @@ -2778,7 +2780,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() ); @@ -2801,7 +2803,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() ); @@ -2833,7 +2835,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() ); @@ -2881,7 +2883,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() ); @@ -2913,7 +2915,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() ); @@ -2935,7 +2937,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() ); @@ -2967,7 +2969,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() ); @@ -3015,7 +3017,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() ); @@ -3047,7 +3049,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() ); @@ -3069,7 +3071,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() ); @@ -3102,7 +3104,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() ); @@ -3151,7 +3153,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() ); @@ -3184,7 +3186,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() ); @@ -3207,7 +3209,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); @@ -3240,7 +3242,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); @@ -3288,7 +3290,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); @@ -3320,7 +3322,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); @@ -3342,7 +3344,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); @@ -3374,7 +3376,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); @@ -3422,7 +3424,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); @@ -3454,7 +3456,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); @@ -3476,7 +3478,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); @@ -3510,7 +3512,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); @@ -3559,7 +3561,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); @@ -3592,7 +3594,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); @@ -3615,7 +3617,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); @@ -3648,7 +3650,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); @@ -3696,7 +3698,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); @@ -3728,7 +3730,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); @@ -3750,7 +3752,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); @@ -3782,7 +3784,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); @@ -3830,7 +3832,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); @@ -3862,7 +3864,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); @@ -3884,7 +3886,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); @@ -3916,7 +3918,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); @@ -3964,7 +3966,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); @@ -3996,7 +3998,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); @@ -4018,7 +4020,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); @@ -4050,7 +4052,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); @@ -4098,7 +4100,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); @@ -4127,7 +4129,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); @@ -4149,7 +4151,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() ); @@ -4182,7 +4184,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() ); @@ -4231,7 +4233,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() ); @@ -4264,7 +4266,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() ); @@ -4287,7 +4289,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); @@ -4319,7 +4321,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); @@ -4367,7 +4369,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); @@ -4399,7 +4401,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); @@ -4421,7 +4423,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() ); @@ -4453,7 +4455,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() ); @@ -4501,7 +4503,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() ); @@ -4533,7 +4535,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() ); @@ -4555,7 +4557,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() ); @@ -4587,7 +4589,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() ); @@ -4635,7 +4637,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() ); @@ -4667,7 +4669,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() ); @@ -4689,7 +4691,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); @@ -4722,7 +4724,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); @@ -4771,7 +4773,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); @@ -4804,7 +4806,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); @@ -4827,7 +4829,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); @@ -4859,7 +4861,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); @@ -4907,7 +4909,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); @@ -4939,7 +4941,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); @@ -4961,7 +4963,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); @@ -4993,7 +4995,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); @@ -5041,7 +5043,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); @@ -5073,7 +5075,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); @@ -5095,7 +5097,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); @@ -5127,7 +5129,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); @@ -5175,7 +5177,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); @@ -5207,7 +5209,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); @@ -5229,7 +5231,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() ); @@ -5262,7 +5264,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() ); @@ -5311,7 +5313,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() ); @@ -5344,7 +5346,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() ); @@ -5367,7 +5369,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); @@ -5399,7 +5401,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); @@ -5447,7 +5449,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); @@ -5479,7 +5481,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); @@ -5501,7 +5503,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() ); @@ -5534,7 +5536,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() ); @@ -5582,7 +5584,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() ); @@ -5617,7 +5619,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() ); @@ -5642,7 +5644,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); @@ -5675,7 +5677,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); @@ -5723,7 +5725,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); @@ -5758,7 +5760,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); @@ -5783,7 +5785,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); @@ -5816,7 +5818,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); @@ -5864,7 +5866,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); @@ -5899,7 +5901,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); @@ -5924,7 +5926,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); @@ -5957,7 +5959,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); @@ -6005,7 +6007,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); @@ -6040,7 +6042,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); @@ -6065,7 +6067,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); @@ -6098,7 +6100,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); @@ -6146,7 +6148,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); @@ -6181,7 +6183,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); @@ -6206,7 +6208,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() ); @@ -6239,7 +6241,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() ); @@ -6287,7 +6289,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() ); @@ -6319,7 +6321,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() ); @@ -6341,7 +6343,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() ); @@ -6373,7 +6375,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() ); @@ -6421,7 +6423,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() ); @@ -6453,7 +6455,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() ); @@ -6475,7 +6477,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() ); @@ -6509,7 +6511,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() ); @@ -6558,7 +6560,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() ); @@ -6591,7 +6593,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() ); @@ -6614,7 +6616,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() ); @@ -6647,7 +6649,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() ); @@ -6695,7 +6697,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() ); @@ -6727,7 +6729,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() ); @@ -6749,7 +6751,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() ); @@ -6783,7 +6785,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() ); @@ -6838,7 +6840,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() ); @@ -6870,7 +6872,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() ); @@ -6904,7 +6906,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6927,7 +6929,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6949,7 +6951,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() ); @@ -6983,7 +6985,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() ); @@ -7038,7 +7040,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() ); @@ -7070,7 +7072,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() ); @@ -7104,7 +7106,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7127,7 +7129,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7149,7 +7151,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() ); @@ -7183,7 +7185,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() ); @@ -7238,7 +7240,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() ); @@ -7273,7 +7275,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() ); @@ -7307,7 +7309,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7331,7 +7333,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7353,7 +7355,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() ); @@ -7387,7 +7389,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() ); @@ -7442,7 +7444,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() ); @@ -7477,7 +7479,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() ); @@ -7511,7 +7513,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7535,7 +7537,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7557,7 +7559,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() ); @@ -7591,7 +7593,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() ); @@ -7646,7 +7648,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() ); @@ -7678,7 +7680,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() ); @@ -7712,7 +7714,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7735,7 +7737,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7757,7 +7759,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() ); @@ -7791,7 +7793,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() ); @@ -7846,7 +7848,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() ); @@ -7878,7 +7880,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() ); @@ -7912,7 +7914,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7935,7 +7937,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7957,7 +7959,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() ); @@ -7991,7 +7993,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() ); @@ -8046,7 +8048,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() ); @@ -8078,7 +8080,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() ); @@ -8112,7 +8114,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8135,7 +8137,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8157,7 +8159,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() ); @@ -8191,7 +8193,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() ); @@ -8246,7 +8248,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() ); @@ -8278,7 +8280,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() ); @@ -8312,7 +8314,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8335,7 +8337,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8357,7 +8359,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() ); @@ -8391,7 +8393,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() ); @@ -8446,7 +8448,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() ); @@ -8478,7 +8480,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() ); @@ -8512,7 +8514,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8535,7 +8537,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8557,7 +8559,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() ); @@ -8591,7 +8593,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() ); @@ -8646,7 +8648,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() ); @@ -8678,7 +8680,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() ); @@ -8712,7 +8714,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8735,7 +8737,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8757,7 +8759,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); @@ -8791,7 +8793,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); @@ -8846,7 +8848,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); @@ -8878,7 +8880,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); @@ -8912,7 +8914,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8935,7 +8937,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8957,7 +8959,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() ); @@ -8991,7 +8993,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() ); @@ -9046,7 +9048,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() ); @@ -9078,7 +9080,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() ); @@ -9112,7 +9114,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9135,7 +9137,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9157,7 +9159,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() ); @@ -9192,7 +9194,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() ); @@ -9248,7 +9250,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() ); @@ -9284,7 +9286,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() ); @@ -9319,7 +9321,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9343,7 +9345,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9365,7 +9367,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() ); @@ -9398,7 +9400,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() ); @@ -9453,7 +9455,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() ); @@ -9485,7 +9487,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() ); @@ -9519,7 +9521,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9542,7 +9544,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9561,7 +9563,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() ); @@ -9595,7 +9597,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() ); @@ -9650,7 +9652,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() ); @@ -9685,7 +9687,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() ); @@ -9719,7 +9721,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9743,7 +9745,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9765,7 +9767,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() ); @@ -9799,7 +9801,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() ); @@ -9854,7 +9856,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() ); @@ -9889,7 +9891,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() ); @@ -9923,7 +9925,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9947,7 +9949,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9969,7 +9971,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() ); @@ -10003,7 +10005,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() ); @@ -10058,7 +10060,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() ); @@ -10093,7 +10095,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() ); @@ -10127,7 +10129,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -10151,7 +10153,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -10173,7 +10175,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); @@ -10213,7 +10215,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); @@ -10271,7 +10273,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); @@ -10303,7 +10305,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); @@ -10367,7 +10369,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); @@ -10420,7 +10422,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); @@ -10471,7 +10473,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); @@ -10515,7 +10517,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() ); @@ -10555,7 +10557,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() ); @@ -10613,7 +10615,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() ); @@ -10645,7 +10647,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() ); @@ -10707,7 +10709,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() ); @@ -10760,7 +10762,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() ); @@ -10811,7 +10813,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() ); @@ -10855,7 +10857,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() ); @@ -10896,7 +10898,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() ); @@ -10954,7 +10956,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() ); @@ -10986,7 +10988,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() ); @@ -11050,7 +11052,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() ); @@ -11103,7 +11105,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() ); @@ -11154,7 +11156,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() ); @@ -11198,7 +11200,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() ); @@ -11238,7 +11240,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() ); @@ -11296,7 +11298,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() ); @@ -11328,7 +11330,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() ); @@ -11392,7 +11394,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() ); @@ -11445,7 +11447,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() ); @@ -11496,7 +11498,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() ); @@ -11540,7 +11542,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() ); @@ -11580,7 +11582,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() ); @@ -11636,7 +11638,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() ); @@ -11665,7 +11667,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() ); @@ -11727,7 +11729,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() ); @@ -11780,7 +11782,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() ); @@ -11830,7 +11832,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() ); @@ -11875,7 +11877,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() ); @@ -11915,7 +11917,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() ); @@ -11973,7 +11975,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() ); @@ -12005,7 +12007,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() ); @@ -12069,7 +12071,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() ); @@ -12122,7 +12124,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() ); @@ -12173,7 +12175,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() ); @@ -12217,7 +12219,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); @@ -12257,7 +12259,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); @@ -12315,7 +12317,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); @@ -12347,7 +12349,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); @@ -12411,7 +12413,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); @@ -12464,7 +12466,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); @@ -12515,7 +12517,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); @@ -12559,7 +12561,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); @@ -12600,7 +12602,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); @@ -12658,7 +12660,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); @@ -12693,7 +12695,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); @@ -12763,7 +12765,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); @@ -12822,7 +12824,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); @@ -12877,7 +12879,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); @@ -12925,7 +12927,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); @@ -12966,7 +12968,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); @@ -13024,7 +13026,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); @@ -13056,7 +13058,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); @@ -13120,7 +13122,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); @@ -13173,7 +13175,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); @@ -13224,7 +13226,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); @@ -13268,7 +13270,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); @@ -13309,7 +13311,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); @@ -13367,7 +13369,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); @@ -13402,7 +13404,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); @@ -13472,7 +13474,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); @@ -13531,7 +13533,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); @@ -13586,7 +13588,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); @@ -13633,7 +13635,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -13664,7 +13666,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -13709,7 +13711,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -13742,7 +13744,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -13773,7 +13775,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -13818,7 +13820,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -13851,7 +13853,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -13885,7 +13887,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -13930,7 +13932,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -13966,7 +13968,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -14048,7 +14050,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -14131,7 +14133,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -14230,8 +14232,7 @@ describe('v1.ContactCenterInsightsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -14251,7 +14252,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -14260,8 +14261,7 @@ describe('v1.ContactCenterInsightsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -14277,7 +14277,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); describe('Path templates', () => { - describe('analysisRule', () => { + describe('analysisRule', async () => { const fakePath = '/rendered/path/analysisRule'; const expectedParameters = { project: 'projectValue', @@ -14289,7 +14289,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.analysisRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -14342,7 +14342,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -14353,7 +14353,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14395,7 +14395,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('issue', () => { + describe('issue', async () => { const fakePath = '/rendered/path/issue'; const expectedParameters = { project: 'projectValue', @@ -14408,7 +14408,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.issuePathTemplate.render = sinon .stub() .returns(fakePath); @@ -14472,7 +14472,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('issueModel', () => { + describe('issueModel', async () => { const fakePath = '/rendered/path/issueModel'; const expectedParameters = { project: 'projectValue', @@ -14484,7 +14484,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.issueModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14537,7 +14537,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -14548,7 +14548,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14587,7 +14587,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('phraseMatcher', () => { + describe('phraseMatcher', async () => { const fakePath = '/rendered/path/phraseMatcher'; const expectedParameters = { project: 'projectValue', @@ -14599,7 +14599,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.phraseMatcherPathTemplate.render = sinon .stub() .returns(fakePath); @@ -14652,7 +14652,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('projectLocationAuthorizedViewSetAuthorizedViewConversation', () => { + describe('projectLocationAuthorizedViewSetAuthorizedViewConversation', async () => { const fakePath = '/rendered/path/projectLocationAuthorizedViewSetAuthorizedViewConversation'; const expectedParameters = { @@ -14667,7 +14667,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAuthorizedViewSetAuthorizedViewConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAuthorizedViewSetAuthorizedViewConversationPathTemplate.match = @@ -14780,7 +14780,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('projectLocationAuthorizedViewSetAuthorizedViewConversationAnalysis', () => { + describe('projectLocationAuthorizedViewSetAuthorizedViewConversationAnalysis', async () => { const fakePath = '/rendered/path/projectLocationAuthorizedViewSetAuthorizedViewConversationAnalysis'; const expectedParameters = { @@ -14796,7 +14796,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAuthorizedViewSetAuthorizedViewConversationAnalysisPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAuthorizedViewSetAuthorizedViewConversationAnalysisPathTemplate.match = @@ -14927,7 +14927,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('projectLocationAuthorizedViewSetAuthorizedViewConversationFeedbackLabel', () => { + describe('projectLocationAuthorizedViewSetAuthorizedViewConversationFeedbackLabel', async () => { const fakePath = '/rendered/path/projectLocationAuthorizedViewSetAuthorizedViewConversationFeedbackLabel'; const expectedParameters = { @@ -14943,7 +14943,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAuthorizedViewSetAuthorizedViewConversationFeedbackLabelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAuthorizedViewSetAuthorizedViewConversationFeedbackLabelPathTemplate.match = @@ -15074,7 +15074,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -15086,7 +15086,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -15153,7 +15153,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('projectLocationConversationAnalysis', () => { + describe('projectLocationConversationAnalysis', async () => { const fakePath = '/rendered/path/projectLocationConversationAnalysis'; const expectedParameters = { project: 'projectValue', @@ -15166,7 +15166,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationAnalysisPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationAnalysisPathTemplate.match = @@ -15255,7 +15255,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('projectLocationConversationFeedbackLabel', () => { + describe('projectLocationConversationFeedbackLabel', async () => { const fakePath = '/rendered/path/projectLocationConversationFeedbackLabel'; const expectedParameters = { @@ -15269,7 +15269,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationFeedbackLabelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationFeedbackLabelPathTemplate.match = @@ -15363,7 +15363,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('qaQuestion', () => { + describe('qaQuestion', async () => { const fakePath = '/rendered/path/qaQuestion'; const expectedParameters = { project: 'projectValue', @@ -15377,7 +15377,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.qaQuestionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15452,7 +15452,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('qaScorecard', () => { + describe('qaScorecard', async () => { const fakePath = '/rendered/path/qaScorecard'; const expectedParameters = { project: 'projectValue', @@ -15464,7 +15464,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.qaScorecardPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15517,7 +15517,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('qaScorecardResult', () => { + describe('qaScorecardResult', async () => { const fakePath = '/rendered/path/qaScorecardResult'; const expectedParameters = { project: 'projectValue', @@ -15529,7 +15529,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.qaScorecardResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15595,7 +15595,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('qaScorecardRevision', () => { + describe('qaScorecardRevision', async () => { const fakePath = '/rendered/path/qaScorecardRevision'; const expectedParameters = { project: 'projectValue', @@ -15608,7 +15608,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.qaScorecardRevisionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15690,7 +15690,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('settings', () => { + describe('settings', async () => { const fakePath = '/rendered/path/settings'; const expectedParameters = { project: 'projectValue', @@ -15701,7 +15701,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.settingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -15740,7 +15740,7 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('view', () => { + describe('view', async () => { const fakePath = '/rendered/path/view'; const expectedParameters = { project: 'projectValue', @@ -15752,7 +15752,7 @@ describe('v1.ContactCenterInsightsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.viewPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-contentwarehouse/package.json b/packages/google-cloud-contentwarehouse/package.json index 26e35301dfe..60806fa4da6 100644 --- a/packages/google-cloud-contentwarehouse/package.json +++ b/packages/google-cloud-contentwarehouse/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json index 251eb547360..419cd524d44 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contentwarehouse", - "version": "1.11.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json index 6b06299f814..d2f598c2f47 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contentwarehouse", - "version": "1.11.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contentwarehouse/src/v1/document_link_service_client.ts b/packages/google-cloud-contentwarehouse/src/v1/document_link_service_client.ts index f4e7515f03d..9fe5dde48e4 100644 --- a/packages/google-cloud-contentwarehouse/src/v1/document_link_service_client.ts +++ b/packages/google-cloud-contentwarehouse/src/v1/document_link_service_client.ts @@ -502,7 +502,9 @@ export class DocumentLinkServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLinkedTargets request %j', request); const wrappedCallback: | Callback< @@ -636,7 +638,9 @@ export class DocumentLinkServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocumentLink request %j', request); const wrappedCallback: | Callback< @@ -766,7 +770,9 @@ export class DocumentLinkServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocumentLink request %j', request); const wrappedCallback: | Callback< @@ -906,7 +912,9 @@ export class DocumentLinkServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contentwarehouse.v1.IListLinkedSourcesRequest, @@ -984,7 +992,9 @@ export class DocumentLinkServiceClient { }); const defaultCallSettings = this._defaults['listLinkedSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLinkedSources stream %j', request); return this.descriptors.page.listLinkedSources.createStream( this.innerApiCalls.listLinkedSources as GaxCall, @@ -1044,7 +1054,9 @@ export class DocumentLinkServiceClient { }); const defaultCallSettings = this._defaults['listLinkedSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLinkedSources iterate %j', request); return this.descriptors.page.listLinkedSources.asyncIterate( this.innerApiCalls['listLinkedSources'] as GaxCall, diff --git a/packages/google-cloud-contentwarehouse/src/v1/document_schema_service_client.ts b/packages/google-cloud-contentwarehouse/src/v1/document_schema_service_client.ts index 7005d6d6feb..74beb0000aa 100644 --- a/packages/google-cloud-contentwarehouse/src/v1/document_schema_service_client.ts +++ b/packages/google-cloud-contentwarehouse/src/v1/document_schema_service_client.ts @@ -503,7 +503,9 @@ export class DocumentSchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocumentSchema request %j', request); const wrappedCallback: | Callback< @@ -638,7 +640,9 @@ export class DocumentSchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocumentSchema request %j', request); const wrappedCallback: | Callback< @@ -764,7 +768,9 @@ export class DocumentSchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocumentSchema request %j', request); const wrappedCallback: | Callback< @@ -891,7 +897,9 @@ export class DocumentSchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocumentSchema request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1034,9 @@ export class DocumentSchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contentwarehouse.v1.IListDocumentSchemasRequest, @@ -1099,7 +1109,9 @@ export class DocumentSchemaServiceClient { }); const defaultCallSettings = this._defaults['listDocumentSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocumentSchemas stream %j', request); return this.descriptors.page.listDocumentSchemas.createStream( this.innerApiCalls.listDocumentSchemas as GaxCall, @@ -1154,7 +1166,9 @@ export class DocumentSchemaServiceClient { }); const defaultCallSettings = this._defaults['listDocumentSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocumentSchemas iterate %j', request); return this.descriptors.page.listDocumentSchemas.asyncIterate( this.innerApiCalls['listDocumentSchemas'] as GaxCall, diff --git a/packages/google-cloud-contentwarehouse/src/v1/document_service_client.ts b/packages/google-cloud-contentwarehouse/src/v1/document_service_client.ts index ea1ff1a6793..4029a82be4a 100644 --- a/packages/google-cloud-contentwarehouse/src/v1/document_service_client.ts +++ b/packages/google-cloud-contentwarehouse/src/v1/document_service_client.ts @@ -522,7 +522,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocument request %j', request); const wrappedCallback: | Callback< @@ -647,7 +649,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -789,7 +793,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocument request %j', request); const wrappedCallback: | Callback< @@ -921,7 +927,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocument request %j', request); const wrappedCallback: | Callback< @@ -1046,7 +1054,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lockDocument request %j', request); const wrappedCallback: | Callback< @@ -1178,7 +1188,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchAcl request %j', request); const wrappedCallback: | Callback< @@ -1320,7 +1332,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setAcl request %j', request); const wrappedCallback: | Callback< @@ -1537,7 +1551,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contentwarehouse.v1.ISearchDocumentsRequest, @@ -1692,7 +1708,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['searchDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDocuments stream %j', request); return this.descriptors.page.searchDocuments.createStream( this.innerApiCalls.searchDocuments as GaxCall, @@ -1829,7 +1847,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['searchDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDocuments iterate %j', request); return this.descriptors.page.searchDocuments.asyncIterate( this.innerApiCalls['searchDocuments'] as GaxCall, diff --git a/packages/google-cloud-contentwarehouse/src/v1/pipeline_service_client.ts b/packages/google-cloud-contentwarehouse/src/v1/pipeline_service_client.ts index 04dced194bf..b3f6f1edebc 100644 --- a/packages/google-cloud-contentwarehouse/src/v1/pipeline_service_client.ts +++ b/packages/google-cloud-contentwarehouse/src/v1/pipeline_service_client.ts @@ -540,7 +540,9 @@ export class PipelineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -702,7 +704,7 @@ export class PipelineServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-contentwarehouse/src/v1/rule_set_service_client.ts b/packages/google-cloud-contentwarehouse/src/v1/rule_set_service_client.ts index 39eb0a56a66..830b6d3c69a 100644 --- a/packages/google-cloud-contentwarehouse/src/v1/rule_set_service_client.ts +++ b/packages/google-cloud-contentwarehouse/src/v1/rule_set_service_client.ts @@ -493,7 +493,9 @@ export class RuleSetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRuleSet request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class RuleSetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRuleSet request %j', request); const wrappedCallback: | Callback< @@ -738,7 +742,9 @@ export class RuleSetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRuleSet request %j', request); const wrappedCallback: | Callback< @@ -859,7 +865,9 @@ export class RuleSetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRuleSet request %j', request); const wrappedCallback: | Callback< @@ -994,7 +1002,9 @@ export class RuleSetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contentwarehouse.v1.IListRuleSetsRequest, @@ -1067,7 +1077,9 @@ export class RuleSetServiceClient { }); const defaultCallSettings = this._defaults['listRuleSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuleSets stream %j', request); return this.descriptors.page.listRuleSets.createStream( this.innerApiCalls.listRuleSets as GaxCall, @@ -1122,7 +1134,9 @@ export class RuleSetServiceClient { }); const defaultCallSettings = this._defaults['listRuleSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuleSets iterate %j', request); return this.descriptors.page.listRuleSets.asyncIterate( this.innerApiCalls['listRuleSets'] as GaxCall, diff --git a/packages/google-cloud-contentwarehouse/src/v1/synonym_set_service_client.ts b/packages/google-cloud-contentwarehouse/src/v1/synonym_set_service_client.ts index 457f4329108..b1c6594cfcc 100644 --- a/packages/google-cloud-contentwarehouse/src/v1/synonym_set_service_client.ts +++ b/packages/google-cloud-contentwarehouse/src/v1/synonym_set_service_client.ts @@ -502,7 +502,9 @@ export class SynonymSetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSynonymSet request %j', request); const wrappedCallback: | Callback< @@ -625,7 +627,9 @@ export class SynonymSetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSynonymSet request %j', request); const wrappedCallback: | Callback< @@ -756,7 +760,9 @@ export class SynonymSetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSynonymSet request %j', request); const wrappedCallback: | Callback< @@ -884,7 +890,9 @@ export class SynonymSetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSynonymSet request %j', request); const wrappedCallback: | Callback< @@ -1019,7 +1027,9 @@ export class SynonymSetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.contentwarehouse.v1.IListSynonymSetsRequest, @@ -1092,7 +1102,9 @@ export class SynonymSetServiceClient { }); const defaultCallSettings = this._defaults['listSynonymSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSynonymSets stream %j', request); return this.descriptors.page.listSynonymSets.createStream( this.innerApiCalls.listSynonymSets as GaxCall, @@ -1147,7 +1159,9 @@ export class SynonymSetServiceClient { }); const defaultCallSettings = this._defaults['listSynonymSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSynonymSets iterate %j', request); return this.descriptors.page.listSynonymSets.asyncIterate( this.innerApiCalls['listSynonymSets'] as GaxCall, diff --git a/packages/google-cloud-contentwarehouse/test/gapic_document_link_service_v1.ts b/packages/google-cloud-contentwarehouse/test/gapic_document_link_service_v1.ts index 142473ef021..93819523cce 100644 --- a/packages/google-cloud-contentwarehouse/test/gapic_document_link_service_v1.ts +++ b/packages/google-cloud-contentwarehouse/test/gapic_document_link_service_v1.ts @@ -266,7 +266,9 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentLinkServiceStub); client.close().then(() => { done(); @@ -333,7 +335,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedTargetsRequest() ); @@ -366,7 +368,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedTargetsRequest() ); @@ -415,7 +417,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedTargetsRequest() ); @@ -448,7 +450,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedTargetsRequest() ); @@ -471,7 +473,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentLinkRequest() ); @@ -505,7 +507,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentLinkRequest() ); @@ -554,7 +556,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentLinkRequest() ); @@ -587,7 +589,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentLinkRequest() ); @@ -610,7 +612,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentLinkRequest() ); @@ -644,7 +646,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentLinkRequest() ); @@ -693,7 +695,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentLinkRequest() ); @@ -726,7 +728,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentLinkRequest() ); @@ -749,7 +751,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest() ); @@ -790,7 +792,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest() ); @@ -849,7 +851,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest() ); @@ -882,7 +884,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest() ); @@ -945,7 +947,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest() ); @@ -997,7 +999,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest() ); @@ -1049,7 +1051,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListLinkedSourcesRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.DocumentLinkServiceClient', () => { }); describe('Path templates', () => { - describe('documentLink', () => { + describe('documentLink', async () => { const fakePath = '/rendered/path/documentLink'; const expectedParameters = { project: 'projectValue', @@ -1101,7 +1103,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.documentLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1165,7 +1167,7 @@ describe('v1.DocumentLinkServiceClient', () => { }); }); - describe('documentSchema', () => { + describe('documentSchema', async () => { const fakePath = '/rendered/path/documentSchema'; const expectedParameters = { project: 'projectValue', @@ -1178,7 +1180,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.documentSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1232,7 +1234,7 @@ describe('v1.DocumentLinkServiceClient', () => { }); }); - describe('projectLocationDocument', () => { + describe('projectLocationDocument', async () => { const fakePath = '/rendered/path/projectLocationDocument'; const expectedParameters = { project: 'projectValue', @@ -1245,7 +1247,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1313,7 +1315,7 @@ describe('v1.DocumentLinkServiceClient', () => { }); }); - describe('projectLocationDocumentsReferenceId', () => { + describe('projectLocationDocumentsReferenceId', async () => { const fakePath = '/rendered/path/projectLocationDocumentsReferenceId'; const expectedParameters = { project: 'projectValue', @@ -1326,7 +1328,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.match = @@ -1398,7 +1400,7 @@ describe('v1.DocumentLinkServiceClient', () => { }); }); - describe('ruleSet', () => { + describe('ruleSet', async () => { const fakePath = '/rendered/path/ruleSet'; const expectedParameters = { project: 'projectValue', @@ -1411,7 +1413,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.ruleSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1464,7 +1466,7 @@ describe('v1.DocumentLinkServiceClient', () => { }); }); - describe('synonymSet', () => { + describe('synonymSet', async () => { const fakePath = '/rendered/path/synonymSet'; const expectedParameters = { project: 'projectValue', @@ -1477,7 +1479,7 @@ describe('v1.DocumentLinkServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.synonymSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-contentwarehouse/test/gapic_document_schema_service_v1.ts b/packages/google-cloud-contentwarehouse/test/gapic_document_schema_service_v1.ts index e988bc73fe3..f7684d65e75 100644 --- a/packages/google-cloud-contentwarehouse/test/gapic_document_schema_service_v1.ts +++ b/packages/google-cloud-contentwarehouse/test/gapic_document_schema_service_v1.ts @@ -268,7 +268,9 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentSchemaServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentSchemaRequest() ); @@ -364,7 +366,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentSchemaRequest() ); @@ -412,7 +414,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentSchemaRequest() ); @@ -444,7 +446,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentSchemaRequest() ); @@ -466,7 +468,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentSchemaRequest() ); @@ -499,7 +501,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentSchemaRequest() ); @@ -547,7 +549,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentSchemaRequest() ); @@ -579,7 +581,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentSchemaRequest() ); @@ -601,7 +603,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentSchemaRequest() ); @@ -633,7 +635,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentSchemaRequest() ); @@ -681,7 +683,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentSchemaRequest() ); @@ -713,7 +715,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentSchemaRequest() ); @@ -735,7 +737,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentSchemaRequest() ); @@ -768,7 +770,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentSchemaRequest() ); @@ -816,7 +818,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentSchemaRequest() ); @@ -848,7 +850,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentSchemaRequest() ); @@ -870,7 +872,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest() ); @@ -911,7 +913,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest() ); @@ -969,7 +971,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest() ); @@ -1065,7 +1067,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest() ); @@ -1169,7 +1171,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListDocumentSchemasRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.DocumentSchemaServiceClient', () => { }); describe('Path templates', () => { - describe('documentLink', () => { + describe('documentLink', async () => { const fakePath = '/rendered/path/documentLink'; const expectedParameters = { project: 'projectValue', @@ -1220,7 +1222,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1284,7 +1286,7 @@ describe('v1.DocumentSchemaServiceClient', () => { }); }); - describe('documentSchema', () => { + describe('documentSchema', async () => { const fakePath = '/rendered/path/documentSchema'; const expectedParameters = { project: 'projectValue', @@ -1296,7 +1298,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1350,7 +1352,7 @@ describe('v1.DocumentSchemaServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1361,7 +1363,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1400,7 +1402,7 @@ describe('v1.DocumentSchemaServiceClient', () => { }); }); - describe('projectLocationDocument', () => { + describe('projectLocationDocument', async () => { const fakePath = '/rendered/path/projectLocationDocument'; const expectedParameters = { project: 'projectValue', @@ -1412,7 +1414,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1480,7 +1482,7 @@ describe('v1.DocumentSchemaServiceClient', () => { }); }); - describe('projectLocationDocumentsReferenceId', () => { + describe('projectLocationDocumentsReferenceId', async () => { const fakePath = '/rendered/path/projectLocationDocumentsReferenceId'; const expectedParameters = { project: 'projectValue', @@ -1492,7 +1494,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.match = @@ -1564,7 +1566,7 @@ describe('v1.DocumentSchemaServiceClient', () => { }); }); - describe('ruleSet', () => { + describe('ruleSet', async () => { const fakePath = '/rendered/path/ruleSet'; const expectedParameters = { project: 'projectValue', @@ -1576,7 +1578,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ruleSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1629,7 +1631,7 @@ describe('v1.DocumentSchemaServiceClient', () => { }); }); - describe('synonymSet', () => { + describe('synonymSet', async () => { const fakePath = '/rendered/path/synonymSet'; const expectedParameters = { project: 'projectValue', @@ -1641,7 +1643,7 @@ describe('v1.DocumentSchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.synonymSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-contentwarehouse/test/gapic_document_service_v1.ts b/packages/google-cloud-contentwarehouse/test/gapic_document_service_v1.ts index 3053bbc7551..af03330fc3a 100644 --- a/packages/google-cloud-contentwarehouse/test/gapic_document_service_v1.ts +++ b/packages/google-cloud-contentwarehouse/test/gapic_document_service_v1.ts @@ -255,7 +255,9 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentRequest() ); @@ -345,7 +347,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentRequest() ); @@ -392,7 +394,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentRequest() ); @@ -423,7 +425,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateDocumentRequest() ); @@ -444,7 +446,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentRequest() ); @@ -475,7 +477,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentRequest() ); @@ -522,7 +524,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentRequest() ); @@ -553,7 +555,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetDocumentRequest() ); @@ -574,7 +576,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentRequest() ); @@ -605,7 +607,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentRequest() ); @@ -652,7 +654,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentRequest() ); @@ -683,7 +685,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateDocumentRequest() ); @@ -704,7 +706,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentRequest() ); @@ -735,7 +737,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentRequest() ); @@ -782,7 +784,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentRequest() ); @@ -813,7 +815,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteDocumentRequest() ); @@ -834,7 +836,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.LockDocumentRequest() ); @@ -865,7 +867,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.LockDocumentRequest() ); @@ -912,7 +914,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.LockDocumentRequest() ); @@ -943,7 +945,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.LockDocumentRequest() ); @@ -964,7 +966,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.FetchAclRequest() ); @@ -995,7 +997,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.FetchAclRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.FetchAclRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.FetchAclRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SetAclRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SetAclRequest() ); @@ -1169,7 +1171,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SetAclRequest() ); @@ -1197,7 +1199,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SetAclRequest() ); @@ -1218,7 +1220,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SearchDocumentsRequest() ); @@ -1257,7 +1259,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SearchDocumentsRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SearchDocumentsRequest() ); @@ -1345,7 +1347,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SearchDocumentsRequest() ); @@ -1408,7 +1410,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SearchDocumentsRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SearchDocumentsRequest() ); @@ -1510,7 +1512,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.SearchDocumentsRequest() ); @@ -1548,7 +1550,7 @@ describe('v1.DocumentServiceClient', () => { }); describe('Path templates', () => { - describe('documentLink', () => { + describe('documentLink', async () => { const fakePath = '/rendered/path/documentLink'; const expectedParameters = { project: 'projectValue', @@ -1560,7 +1562,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1624,7 +1626,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('documentSchema', () => { + describe('documentSchema', async () => { const fakePath = '/rendered/path/documentSchema'; const expectedParameters = { project: 'projectValue', @@ -1635,7 +1637,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1689,7 +1691,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDocument', () => { + describe('projectLocationDocument', async () => { const fakePath = '/rendered/path/projectLocationDocument'; const expectedParameters = { project: 'projectValue', @@ -1700,7 +1702,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1768,7 +1770,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDocumentsReferenceId', () => { + describe('projectLocationDocumentsReferenceId', async () => { const fakePath = '/rendered/path/projectLocationDocumentsReferenceId'; const expectedParameters = { project: 'projectValue', @@ -1779,7 +1781,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.match = @@ -1851,7 +1853,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('ruleSet', () => { + describe('ruleSet', async () => { const fakePath = '/rendered/path/ruleSet'; const expectedParameters = { project: 'projectValue', @@ -1862,7 +1864,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ruleSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1915,7 +1917,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('synonymSet', () => { + describe('synonymSet', async () => { const fakePath = '/rendered/path/synonymSet'; const expectedParameters = { project: 'projectValue', @@ -1926,7 +1928,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.synonymSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-contentwarehouse/test/gapic_pipeline_service_v1.ts b/packages/google-cloud-contentwarehouse/test/gapic_pipeline_service_v1.ts index 5c9b5a33d66..2ce4dbdecf0 100644 --- a/packages/google-cloud-contentwarehouse/test/gapic_pipeline_service_v1.ts +++ b/packages/google-cloud-contentwarehouse/test/gapic_pipeline_service_v1.ts @@ -238,7 +238,9 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.pipelineServiceStub); client.close().then(() => { done(); @@ -297,7 +299,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.RunPipelineRequest() ); @@ -329,7 +331,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.RunPipelineRequest() ); @@ -383,7 +385,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.RunPipelineRequest() ); @@ -414,7 +416,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.RunPipelineRequest() ); @@ -447,7 +449,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -469,7 +471,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -486,7 +488,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -565,7 +567,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -645,7 +647,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -741,8 +743,7 @@ describe('v1.PipelineServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -761,7 +762,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -770,8 +771,7 @@ describe('v1.PipelineServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -787,7 +787,7 @@ describe('v1.PipelineServiceClient', () => { }); describe('Path templates', () => { - describe('documentLink', () => { + describe('documentLink', async () => { const fakePath = '/rendered/path/documentLink'; const expectedParameters = { project: 'projectValue', @@ -799,7 +799,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -863,7 +863,7 @@ describe('v1.PipelineServiceClient', () => { }); }); - describe('documentSchema', () => { + describe('documentSchema', async () => { const fakePath = '/rendered/path/documentSchema'; const expectedParameters = { project: 'projectValue', @@ -874,7 +874,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -928,7 +928,7 @@ describe('v1.PipelineServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -938,7 +938,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -977,7 +977,7 @@ describe('v1.PipelineServiceClient', () => { }); }); - describe('projectLocationDocument', () => { + describe('projectLocationDocument', async () => { const fakePath = '/rendered/path/projectLocationDocument'; const expectedParameters = { project: 'projectValue', @@ -988,7 +988,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1056,7 +1056,7 @@ describe('v1.PipelineServiceClient', () => { }); }); - describe('projectLocationDocumentsReferenceId', () => { + describe('projectLocationDocumentsReferenceId', async () => { const fakePath = '/rendered/path/projectLocationDocumentsReferenceId'; const expectedParameters = { project: 'projectValue', @@ -1067,7 +1067,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.match = @@ -1139,7 +1139,7 @@ describe('v1.PipelineServiceClient', () => { }); }); - describe('ruleSet', () => { + describe('ruleSet', async () => { const fakePath = '/rendered/path/ruleSet'; const expectedParameters = { project: 'projectValue', @@ -1150,7 +1150,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ruleSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1203,7 +1203,7 @@ describe('v1.PipelineServiceClient', () => { }); }); - describe('synonymSet', () => { + describe('synonymSet', async () => { const fakePath = '/rendered/path/synonymSet'; const expectedParameters = { project: 'projectValue', @@ -1214,7 +1214,7 @@ describe('v1.PipelineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.synonymSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-contentwarehouse/test/gapic_rule_set_service_v1.ts b/packages/google-cloud-contentwarehouse/test/gapic_rule_set_service_v1.ts index 5b52ec7eff1..9a876d9b6f1 100644 --- a/packages/google-cloud-contentwarehouse/test/gapic_rule_set_service_v1.ts +++ b/packages/google-cloud-contentwarehouse/test/gapic_rule_set_service_v1.ts @@ -255,7 +255,9 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.ruleSetServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateRuleSetRequest() ); @@ -345,7 +347,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateRuleSetRequest() ); @@ -392,7 +394,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateRuleSetRequest() ); @@ -423,7 +425,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateRuleSetRequest() ); @@ -444,7 +446,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetRuleSetRequest() ); @@ -475,7 +477,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetRuleSetRequest() ); @@ -522,7 +524,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetRuleSetRequest() ); @@ -553,7 +555,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetRuleSetRequest() ); @@ -574,7 +576,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateRuleSetRequest() ); @@ -605,7 +607,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateRuleSetRequest() ); @@ -652,7 +654,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateRuleSetRequest() ); @@ -683,7 +685,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateRuleSetRequest() ); @@ -704,7 +706,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteRuleSetRequest() ); @@ -735,7 +737,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteRuleSetRequest() ); @@ -782,7 +784,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteRuleSetRequest() ); @@ -813,7 +815,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteRuleSetRequest() ); @@ -834,7 +836,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListRuleSetsRequest() ); @@ -873,7 +875,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListRuleSetsRequest() ); @@ -928,7 +930,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListRuleSetsRequest() ); @@ -959,7 +961,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListRuleSetsRequest() ); @@ -1019,7 +1021,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListRuleSetsRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListRuleSetsRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListRuleSetsRequest() ); @@ -1157,7 +1159,7 @@ describe('v1.RuleSetServiceClient', () => { }); describe('Path templates', () => { - describe('documentLink', () => { + describe('documentLink', async () => { const fakePath = '/rendered/path/documentLink'; const expectedParameters = { project: 'projectValue', @@ -1169,7 +1171,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1233,7 +1235,7 @@ describe('v1.RuleSetServiceClient', () => { }); }); - describe('documentSchema', () => { + describe('documentSchema', async () => { const fakePath = '/rendered/path/documentSchema'; const expectedParameters = { project: 'projectValue', @@ -1244,7 +1246,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1298,7 +1300,7 @@ describe('v1.RuleSetServiceClient', () => { }); }); - describe('projectLocationDocument', () => { + describe('projectLocationDocument', async () => { const fakePath = '/rendered/path/projectLocationDocument'; const expectedParameters = { project: 'projectValue', @@ -1309,7 +1311,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1377,7 +1379,7 @@ describe('v1.RuleSetServiceClient', () => { }); }); - describe('projectLocationDocumentsReferenceId', () => { + describe('projectLocationDocumentsReferenceId', async () => { const fakePath = '/rendered/path/projectLocationDocumentsReferenceId'; const expectedParameters = { project: 'projectValue', @@ -1388,7 +1390,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.match = @@ -1460,7 +1462,7 @@ describe('v1.RuleSetServiceClient', () => { }); }); - describe('ruleSet', () => { + describe('ruleSet', async () => { const fakePath = '/rendered/path/ruleSet'; const expectedParameters = { project: 'projectValue', @@ -1471,7 +1473,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ruleSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1524,7 +1526,7 @@ describe('v1.RuleSetServiceClient', () => { }); }); - describe('synonymSet', () => { + describe('synonymSet', async () => { const fakePath = '/rendered/path/synonymSet'; const expectedParameters = { project: 'projectValue', @@ -1535,7 +1537,7 @@ describe('v1.RuleSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.synonymSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-contentwarehouse/test/gapic_synonym_set_service_v1.ts b/packages/google-cloud-contentwarehouse/test/gapic_synonym_set_service_v1.ts index 75fde92f85d..90c6969a9ba 100644 --- a/packages/google-cloud-contentwarehouse/test/gapic_synonym_set_service_v1.ts +++ b/packages/google-cloud-contentwarehouse/test/gapic_synonym_set_service_v1.ts @@ -256,7 +256,9 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.synonymSetServiceStub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateSynonymSetRequest() ); @@ -346,7 +348,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateSynonymSetRequest() ); @@ -393,7 +395,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateSynonymSetRequest() ); @@ -424,7 +426,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.CreateSynonymSetRequest() ); @@ -445,7 +447,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetSynonymSetRequest() ); @@ -476,7 +478,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetSynonymSetRequest() ); @@ -523,7 +525,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetSynonymSetRequest() ); @@ -554,7 +556,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.GetSynonymSetRequest() ); @@ -575,7 +577,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateSynonymSetRequest() ); @@ -606,7 +608,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateSynonymSetRequest() ); @@ -653,7 +655,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateSynonymSetRequest() ); @@ -684,7 +686,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.UpdateSynonymSetRequest() ); @@ -705,7 +707,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteSynonymSetRequest() ); @@ -736,7 +738,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteSynonymSetRequest() ); @@ -783,7 +785,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteSynonymSetRequest() ); @@ -814,7 +816,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.DeleteSynonymSetRequest() ); @@ -835,7 +837,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListSynonymSetsRequest() ); @@ -874,7 +876,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListSynonymSetsRequest() ); @@ -931,7 +933,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListSynonymSetsRequest() ); @@ -962,7 +964,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListSynonymSetsRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListSynonymSetsRequest() ); @@ -1073,7 +1075,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListSynonymSetsRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.contentwarehouse.v1.ListSynonymSetsRequest() ); @@ -1161,7 +1163,7 @@ describe('v1.SynonymSetServiceClient', () => { }); describe('Path templates', () => { - describe('documentLink', () => { + describe('documentLink', async () => { const fakePath = '/rendered/path/documentLink'; const expectedParameters = { project: 'projectValue', @@ -1173,7 +1175,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1237,7 +1239,7 @@ describe('v1.SynonymSetServiceClient', () => { }); }); - describe('documentSchema', () => { + describe('documentSchema', async () => { const fakePath = '/rendered/path/documentSchema'; const expectedParameters = { project: 'projectValue', @@ -1248,7 +1250,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.documentSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1302,7 +1304,7 @@ describe('v1.SynonymSetServiceClient', () => { }); }); - describe('projectLocationDocument', () => { + describe('projectLocationDocument', async () => { const fakePath = '/rendered/path/projectLocationDocument'; const expectedParameters = { project: 'projectValue', @@ -1313,7 +1315,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1381,7 +1383,7 @@ describe('v1.SynonymSetServiceClient', () => { }); }); - describe('projectLocationDocumentsReferenceId', () => { + describe('projectLocationDocumentsReferenceId', async () => { const fakePath = '/rendered/path/projectLocationDocumentsReferenceId'; const expectedParameters = { project: 'projectValue', @@ -1392,7 +1394,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDocumentsReferenceIdPathTemplate.match = @@ -1464,7 +1466,7 @@ describe('v1.SynonymSetServiceClient', () => { }); }); - describe('ruleSet', () => { + describe('ruleSet', async () => { const fakePath = '/rendered/path/ruleSet'; const expectedParameters = { project: 'projectValue', @@ -1475,7 +1477,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.ruleSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1528,7 +1530,7 @@ describe('v1.SynonymSetServiceClient', () => { }); }); - describe('synonymSet', () => { + describe('synonymSet', async () => { const fakePath = '/rendered/path/synonymSet'; const expectedParameters = { project: 'projectValue', @@ -1539,7 +1541,7 @@ describe('v1.SynonymSetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.synonymSetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datacatalog-lineage/package.json b/packages/google-cloud-datacatalog-lineage/package.json index 2b7db1e2f15..8c49be8c0ad 100644 --- a/packages/google-cloud-datacatalog-lineage/package.json +++ b/packages/google-cloud-datacatalog-lineage/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json index 187b5b4bb03..b49013a385c 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lineage", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json index 57c11a32e95..2dc9cb52f21 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lineage", - "version": "1.3.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts b/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts index 12a6843c2b4..6b5933cc732 100644 --- a/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts +++ b/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts @@ -603,7 +603,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('processOpenLineageRunEvent request %j', request); const wrappedCallback: | Callback< @@ -735,7 +737,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProcess request %j', request); const wrappedCallback: | Callback< @@ -867,7 +871,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ 'process.name': request.process!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProcess request %j', request); const wrappedCallback: | Callback< @@ -986,7 +992,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcess request %j', request); const wrappedCallback: | Callback< @@ -1111,7 +1119,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRun request %j', request); const wrappedCallback: | Callback< @@ -1240,7 +1250,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ 'run.name': request.run!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRun request %j', request); const wrappedCallback: | Callback< @@ -1359,7 +1371,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRun request %j', request); const wrappedCallback: | Callback< @@ -1487,7 +1501,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createLineageEvent request %j', request); const wrappedCallback: | Callback< @@ -1612,7 +1628,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLineageEvent request %j', request); const wrappedCallback: | Callback< @@ -1740,7 +1758,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteLineageEvent request %j', request); const wrappedCallback: | Callback< @@ -1875,7 +1895,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2045,7 +2067,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2216,7 +2240,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.lineage.v1.IListProcessesRequest, @@ -2289,7 +2315,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['listProcesses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcesses stream %j', request); return this.descriptors.page.listProcesses.createStream( this.innerApiCalls.listProcesses as GaxCall, @@ -2344,7 +2372,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['listProcesses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcesses iterate %j', request); return this.descriptors.page.listProcesses.asyncIterate( this.innerApiCalls['listProcesses'] as GaxCall, @@ -2454,7 +2484,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.lineage.v1.IListRunsRequest, @@ -2526,7 +2558,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['listRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuns stream %j', request); return this.descriptors.page.listRuns.createStream( this.innerApiCalls.listRuns as GaxCall, @@ -2580,7 +2614,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['listRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuns iterate %j', request); return this.descriptors.page.listRuns.asyncIterate( this.innerApiCalls['listRuns'] as GaxCall, @@ -2692,7 +2728,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.lineage.v1.IListLineageEventsRequest, @@ -2766,7 +2804,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['listLineageEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLineageEvents stream %j', request); return this.descriptors.page.listLineageEvents.createStream( this.innerApiCalls.listLineageEvents as GaxCall, @@ -2822,7 +2862,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['listLineageEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLineageEvents iterate %j', request); return this.descriptors.page.listLineageEvents.asyncIterate( this.innerApiCalls['listLineageEvents'] as GaxCall, @@ -2947,7 +2989,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.lineage.v1.ISearchLinksRequest, @@ -3027,7 +3071,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['searchLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchLinks stream %j', request); return this.descriptors.page.searchLinks.createStream( this.innerApiCalls.searchLinks as GaxCall, @@ -3089,7 +3135,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['searchLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchLinks iterate %j', request); return this.descriptors.page.searchLinks.asyncIterate( this.innerApiCalls['searchLinks'] as GaxCall, @@ -3218,7 +3266,9 @@ export class LineageClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datacatalog.lineage.v1.IBatchSearchLinkProcessesRequest, @@ -3297,7 +3347,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['batchSearchLinkProcesses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchSearchLinkProcesses stream %j', request); return this.descriptors.page.batchSearchLinkProcesses.createStream( this.innerApiCalls.batchSearchLinkProcesses as GaxCall, @@ -3358,7 +3410,9 @@ export class LineageClient { }); const defaultCallSettings = this._defaults['batchSearchLinkProcesses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchSearchLinkProcesses iterate %j', request); return this.descriptors.page.batchSearchLinkProcesses.asyncIterate( this.innerApiCalls['batchSearchLinkProcesses'] as GaxCall, @@ -3460,7 +3514,7 @@ export class LineageClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts b/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts index 25578da5750..cdfa60ccf12 100644 --- a/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts +++ b/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts @@ -282,7 +282,9 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.lineageStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEventRequest() ); @@ -373,7 +375,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEventRequest() ); @@ -420,7 +422,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEventRequest() ); @@ -454,7 +456,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEventRequest() ); @@ -478,7 +480,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateProcessRequest() ); @@ -509,7 +511,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateProcessRequest() ); @@ -556,7 +558,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateProcessRequest() ); @@ -587,7 +589,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateProcessRequest() ); @@ -608,7 +610,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest() ); @@ -640,7 +642,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest() ); @@ -688,7 +690,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest() ); @@ -720,7 +722,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateProcessRequest() ); @@ -742,7 +744,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetProcessRequest() ); @@ -773,7 +775,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetProcessRequest() ); @@ -820,7 +822,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetProcessRequest() ); @@ -851,7 +853,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetProcessRequest() ); @@ -872,7 +874,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateRunRequest() ); @@ -903,7 +905,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateRunRequest() ); @@ -950,7 +952,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateRunRequest() ); @@ -978,7 +980,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateRunRequest() ); @@ -999,7 +1001,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateRunRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateRunRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateRunRequest() ); @@ -1108,7 +1110,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.UpdateRunRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetRunRequest() ); @@ -1161,7 +1163,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetRunRequest() ); @@ -1208,7 +1210,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetRunRequest() ); @@ -1236,7 +1238,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetRunRequest() ); @@ -1257,7 +1259,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest() ); @@ -1336,7 +1338,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest() ); @@ -1367,7 +1369,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.CreateLineageEventRequest() ); @@ -1388,7 +1390,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest() ); @@ -1419,7 +1421,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest() ); @@ -1466,7 +1468,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.GetLineageEventRequest() ); @@ -1518,7 +1520,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest() ); @@ -1550,7 +1552,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest() ); @@ -1597,7 +1599,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest() ); @@ -1628,7 +1630,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteLineageEventRequest() ); @@ -1649,7 +1651,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest() ); @@ -1767,7 +1769,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteProcessRequest() ); @@ -1800,7 +1802,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1822,7 +1824,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1843,7 +1845,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteRunRequest() ); @@ -1875,7 +1877,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteRunRequest() ); @@ -1929,7 +1931,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteRunRequest() ); @@ -1960,7 +1962,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.DeleteRunRequest() ); @@ -1993,7 +1995,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2015,7 +2017,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2033,7 +2035,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListProcessesRequest() ); @@ -2072,7 +2074,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListProcessesRequest() ); @@ -2129,7 +2131,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListProcessesRequest() ); @@ -2160,7 +2162,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListProcessesRequest() ); @@ -2221,7 +2223,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListProcessesRequest() ); @@ -2271,7 +2273,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListProcessesRequest() ); @@ -2321,7 +2323,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListProcessesRequest() ); @@ -2364,7 +2366,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListRunsRequest() ); @@ -2403,7 +2405,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListRunsRequest() ); @@ -2458,7 +2460,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListRunsRequest() ); @@ -2486,7 +2488,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListRunsRequest() ); @@ -2546,7 +2548,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListRunsRequest() ); @@ -2597,7 +2599,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListRunsRequest() ); @@ -2645,7 +2647,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListRunsRequest() ); @@ -2688,7 +2690,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest() ); @@ -2727,7 +2729,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest() ); @@ -2784,7 +2786,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest() ); @@ -2815,7 +2817,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest() ); @@ -2878,7 +2880,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest() ); @@ -2930,7 +2932,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest() ); @@ -2980,7 +2982,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.ListLineageEventsRequest() ); @@ -3023,7 +3025,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest() ); @@ -3062,7 +3064,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest() ); @@ -3117,7 +3119,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest() ); @@ -3148,7 +3150,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest() ); @@ -3208,7 +3210,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest() ); @@ -3259,7 +3261,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest() ); @@ -3308,7 +3310,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest() ); @@ -3353,7 +3355,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest() ); @@ -3393,7 +3395,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest() ); @@ -3450,7 +3452,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest() ); @@ -3484,7 +3486,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest() ); @@ -3553,7 +3555,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest() ); @@ -3611,7 +3613,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest() ); @@ -3665,7 +3667,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesRequest() ); @@ -3711,7 +3713,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3790,7 +3792,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3870,7 +3872,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3966,8 +3968,7 @@ describe('v1.LineageClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3986,7 +3987,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3995,8 +3996,7 @@ describe('v1.LineageClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4012,7 +4012,7 @@ describe('v1.LineageClient', () => { }); describe('Path templates', () => { - describe('lineageEvent', () => { + describe('lineageEvent', async () => { const fakePath = '/rendered/path/lineageEvent'; const expectedParameters = { project: 'projectValue', @@ -4025,7 +4025,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lineageEventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4100,7 +4100,7 @@ describe('v1.LineageClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4110,7 +4110,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4149,7 +4149,7 @@ describe('v1.LineageClient', () => { }); }); - describe('process', () => { + describe('process', async () => { const fakePath = '/rendered/path/process'; const expectedParameters = { project: 'projectValue', @@ -4160,7 +4160,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.processPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4213,7 +4213,7 @@ describe('v1.LineageClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4222,7 +4222,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4251,7 +4251,7 @@ describe('v1.LineageClient', () => { }); }); - describe('run', () => { + describe('run', async () => { const fakePath = '/rendered/path/run'; const expectedParameters = { project: 'projectValue', @@ -4263,7 +4263,7 @@ describe('v1.LineageClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datacatalog/package.json b/packages/google-cloud-datacatalog/package.json index a7d29aabf29..c93839c9de6 100644 --- a/packages/google-cloud-datacatalog/package.json +++ b/packages/google-cloud-datacatalog/package.json @@ -30,7 +30,7 @@ "Google Cloud Data Catalog API" ], "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index b5ee01aa39f..cd92e46a431 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index 560050841c0..93192d8d4eb 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json index 39e2a2fdfd5..5faa0b04f89 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "1.4.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts index 887bd58582b..b1d87ce10bb 100644 --- a/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts +++ b/packages/google-cloud-dataform/src/v1beta1/dataform_client.ts @@ -624,7 +624,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRepository request %j', request); const wrappedCallback: | Callback< @@ -749,7 +751,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRepository request %j', request); const wrappedCallback: | Callback< @@ -877,7 +881,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ 'repository.name': request.repository!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRepository request %j', request); const wrappedCallback: | Callback< @@ -1000,7 +1006,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRepository request %j', request); const wrappedCallback: | Callback< @@ -1135,7 +1143,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('commitRepositoryChanges request %j', request); const wrappedCallback: | Callback< @@ -1266,7 +1276,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('readRepositoryFile request %j', request); const wrappedCallback: | Callback< @@ -1391,7 +1403,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeRepositoryAccessTokenStatus request %j', request); const wrappedCallback: | Callback< @@ -1522,7 +1536,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchRemoteBranches request %j', request); const wrappedCallback: | Callback< @@ -1641,7 +1657,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkspace request %j', request); const wrappedCallback: | Callback< @@ -1763,7 +1781,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createWorkspace request %j', request); const wrappedCallback: | Callback< @@ -1882,7 +1902,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWorkspace request %j', request); const wrappedCallback: | Callback< @@ -2007,7 +2029,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('installNpmPackages request %j', request); const wrappedCallback: | Callback< @@ -2132,7 +2156,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pullGitCommits request %j', request); const wrappedCallback: | Callback< @@ -2255,7 +2281,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pushGitCommits request %j', request); const wrappedCallback: | Callback< @@ -2380,7 +2408,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchFileGitStatuses request %j', request); const wrappedCallback: | Callback< @@ -2509,7 +2539,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchGitAheadBehind request %j', request); const wrappedCallback: | Callback< @@ -2641,7 +2673,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('commitWorkspaceChanges request %j', request); const wrappedCallback: | Callback< @@ -2771,7 +2805,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetWorkspaceChanges request %j', request); const wrappedCallback: | Callback< @@ -2893,7 +2929,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchFileDiff request %j', request); const wrappedCallback: | Callback< @@ -3015,7 +3053,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('makeDirectory request %j', request); const wrappedCallback: | Callback< @@ -3137,7 +3177,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeDirectory request %j', request); const wrappedCallback: | Callback< @@ -3263,7 +3305,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moveDirectory request %j', request); const wrappedCallback: | Callback< @@ -3382,7 +3426,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('readFile request %j', request); const wrappedCallback: | Callback< @@ -3501,7 +3547,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeFile request %j', request); const wrappedCallback: | Callback< @@ -3617,7 +3665,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('moveFile request %j', request); const wrappedCallback: | Callback< @@ -3731,7 +3781,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('writeFile request %j', request); const wrappedCallback: | Callback< @@ -3847,7 +3899,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReleaseConfig request %j', request); const wrappedCallback: | Callback< @@ -3978,7 +4032,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReleaseConfig request %j', request); const wrappedCallback: | Callback< @@ -4112,7 +4168,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ 'release_config.name': request.releaseConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateReleaseConfig request %j', request); const wrappedCallback: | Callback< @@ -4237,7 +4295,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteReleaseConfig request %j', request); const wrappedCallback: | Callback< @@ -4362,7 +4422,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCompilationResult request %j', request); const wrappedCallback: | Callback< @@ -4490,7 +4552,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCompilationResult request %j', request); const wrappedCallback: | Callback< @@ -4615,7 +4679,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkflowConfig request %j', request); const wrappedCallback: | Callback< @@ -4746,7 +4812,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createWorkflowConfig request %j', request); const wrappedCallback: | Callback< @@ -4880,7 +4948,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ 'workflow_config.name': request.workflowConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateWorkflowConfig request %j', request); const wrappedCallback: | Callback< @@ -5005,7 +5075,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWorkflowConfig request %j', request); const wrappedCallback: | Callback< @@ -5130,7 +5202,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkflowInvocation request %j', request); const wrappedCallback: | Callback< @@ -5258,7 +5332,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createWorkflowInvocation request %j', request); const wrappedCallback: | Callback< @@ -5383,7 +5459,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWorkflowInvocation request %j', request); const wrappedCallback: | Callback< @@ -5508,7 +5586,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelWorkflowInvocation request %j', request); const wrappedCallback: | Callback< @@ -5621,7 +5701,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConfig request %j', request); const wrappedCallback: | Callback< @@ -5745,7 +5827,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ 'config.name': request.config!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConfig request %j', request); const wrappedCallback: | Callback< @@ -5883,7 +5967,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IListRepositoriesRequest, @@ -5962,7 +6048,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories stream %j', request); return this.descriptors.page.listRepositories.createStream( this.innerApiCalls.listRepositories as GaxCall, @@ -6023,7 +6111,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories iterate %j', request); return this.descriptors.page.listRepositories.asyncIterate( this.innerApiCalls['listRepositories'] as GaxCall, @@ -6140,7 +6230,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IQueryRepositoryDirectoryContentsRequest, @@ -6223,7 +6315,9 @@ export class DataformClient { const defaultCallSettings = this._defaults['queryRepositoryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryRepositoryDirectoryContents stream %j', request); return this.descriptors.page.queryRepositoryDirectoryContents.createStream( this.innerApiCalls.queryRepositoryDirectoryContents as GaxCall, @@ -6285,7 +6379,9 @@ export class DataformClient { const defaultCallSettings = this._defaults['queryRepositoryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryRepositoryDirectoryContents iterate %j', request); return this.descriptors.page.queryRepositoryDirectoryContents.asyncIterate( this.innerApiCalls['queryRepositoryDirectoryContents'] as GaxCall, @@ -6395,7 +6491,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IFetchRepositoryHistoryRequest, @@ -6467,7 +6565,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['fetchRepositoryHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchRepositoryHistory stream %j', request); return this.descriptors.page.fetchRepositoryHistory.createStream( this.innerApiCalls.fetchRepositoryHistory as GaxCall, @@ -6521,7 +6621,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['fetchRepositoryHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchRepositoryHistory iterate %j', request); return this.descriptors.page.fetchRepositoryHistory.asyncIterate( this.innerApiCalls['fetchRepositoryHistory'] as GaxCall, @@ -6637,7 +6739,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IListWorkspacesRequest, @@ -6716,7 +6820,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkspaces stream %j', request); return this.descriptors.page.listWorkspaces.createStream( this.innerApiCalls.listWorkspaces as GaxCall, @@ -6777,7 +6883,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listWorkspaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkspaces iterate %j', request); return this.descriptors.page.listWorkspaces.asyncIterate( this.innerApiCalls['listWorkspaces'] as GaxCall, @@ -6889,7 +6997,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IQueryDirectoryContentsRequest, @@ -6964,7 +7074,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['queryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryDirectoryContents stream %j', request); return this.descriptors.page.queryDirectoryContents.createStream( this.innerApiCalls.queryDirectoryContents as GaxCall, @@ -7021,7 +7133,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['queryDirectoryContents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryDirectoryContents iterate %j', request); return this.descriptors.page.queryDirectoryContents.asyncIterate( this.innerApiCalls['queryDirectoryContents'] as GaxCall, @@ -7134,7 +7248,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ workspace: request.workspace ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.ISearchFilesRequest, @@ -7210,7 +7326,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['searchFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchFiles stream %j', request); return this.descriptors.page.searchFiles.createStream( this.innerApiCalls.searchFiles as GaxCall, @@ -7268,7 +7386,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['searchFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchFiles iterate %j', request); return this.descriptors.page.searchFiles.asyncIterate( this.innerApiCalls['searchFiles'] as GaxCall, @@ -7378,7 +7498,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IListReleaseConfigsRequest, @@ -7451,7 +7573,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listReleaseConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReleaseConfigs stream %j', request); return this.descriptors.page.listReleaseConfigs.createStream( this.innerApiCalls.listReleaseConfigs as GaxCall, @@ -7506,7 +7630,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listReleaseConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReleaseConfigs iterate %j', request); return this.descriptors.page.listReleaseConfigs.asyncIterate( this.innerApiCalls['listReleaseConfigs'] as GaxCall, @@ -7622,7 +7748,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IListCompilationResultsRequest, @@ -7701,7 +7829,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listCompilationResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompilationResults stream %j', request); return this.descriptors.page.listCompilationResults.createStream( this.innerApiCalls.listCompilationResults as GaxCall, @@ -7762,7 +7892,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listCompilationResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCompilationResults iterate %j', request); return this.descriptors.page.listCompilationResults.asyncIterate( this.innerApiCalls['listCompilationResults'] as GaxCall, @@ -7875,7 +8007,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IQueryCompilationResultActionsRequest, @@ -7951,7 +8085,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryCompilationResultActions stream %j', request); return this.descriptors.page.queryCompilationResultActions.createStream( this.innerApiCalls.queryCompilationResultActions as GaxCall, @@ -8009,7 +8145,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['queryCompilationResultActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryCompilationResultActions iterate %j', request); return this.descriptors.page.queryCompilationResultActions.asyncIterate( this.innerApiCalls['queryCompilationResultActions'] as GaxCall, @@ -8119,7 +8257,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IListWorkflowConfigsRequest, @@ -8192,7 +8332,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listWorkflowConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkflowConfigs stream %j', request); return this.descriptors.page.listWorkflowConfigs.createStream( this.innerApiCalls.listWorkflowConfigs as GaxCall, @@ -8247,7 +8389,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listWorkflowConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkflowConfigs iterate %j', request); return this.descriptors.page.listWorkflowConfigs.asyncIterate( this.innerApiCalls['listWorkflowConfigs'] as GaxCall, @@ -8363,7 +8507,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IListWorkflowInvocationsRequest, @@ -8442,7 +8588,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkflowInvocations stream %j', request); return this.descriptors.page.listWorkflowInvocations.createStream( this.innerApiCalls.listWorkflowInvocations as GaxCall, @@ -8503,7 +8651,9 @@ export class DataformClient { }); const defaultCallSettings = this._defaults['listWorkflowInvocations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkflowInvocations iterate %j', request); return this.descriptors.page.listWorkflowInvocations.asyncIterate( this.innerApiCalls['listWorkflowInvocations'] as GaxCall, @@ -8613,7 +8763,9 @@ export class DataformClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataform.v1beta1.IQueryWorkflowInvocationActionsRequest, @@ -8687,7 +8839,9 @@ export class DataformClient { const defaultCallSettings = this._defaults['queryWorkflowInvocationActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryWorkflowInvocationActions stream %j', request); return this.descriptors.page.queryWorkflowInvocationActions.createStream( this.innerApiCalls.queryWorkflowInvocationActions as GaxCall, @@ -8743,7 +8897,9 @@ export class DataformClient { const defaultCallSettings = this._defaults['queryWorkflowInvocationActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('queryWorkflowInvocationActions iterate %j', request); return this.descriptors.page.queryWorkflowInvocationActions.asyncIterate( this.innerApiCalls['queryWorkflowInvocationActions'] as GaxCall, diff --git a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts index 29f074f323f..4fab45ad5d6 100644 --- a/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts +++ b/packages/google-cloud-dataform/test/gapic_dataform_v1beta1.ts @@ -250,7 +250,9 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataformStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); @@ -340,7 +342,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); @@ -387,7 +389,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); @@ -418,7 +420,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetRepositoryRequest() ); @@ -439,7 +441,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); @@ -470,7 +472,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); @@ -517,7 +519,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); @@ -548,7 +550,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateRepositoryRequest() ); @@ -569,7 +571,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); @@ -601,7 +603,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); @@ -649,7 +651,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); @@ -681,7 +683,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateRepositoryRequest() ); @@ -703,7 +705,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); @@ -734,7 +736,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); @@ -781,7 +783,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); @@ -812,7 +814,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteRepositoryRequest() ); @@ -833,7 +835,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest() ); @@ -865,7 +867,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest() ); @@ -912,7 +914,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest() ); @@ -946,7 +948,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest() ); @@ -970,7 +972,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadRepositoryFileRequest() ); @@ -1002,7 +1004,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadRepositoryFileRequest() ); @@ -1049,7 +1051,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadRepositoryFileRequest() ); @@ -1080,7 +1082,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadRepositoryFileRequest() ); @@ -1101,7 +1103,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusRequest() ); @@ -1134,7 +1136,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusRequest() ); @@ -1181,7 +1183,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusRequest() ); @@ -1215,7 +1217,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusRequest() ); @@ -1239,7 +1241,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); @@ -1271,7 +1273,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); @@ -1318,7 +1320,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); @@ -1349,7 +1351,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest() ); @@ -1370,7 +1372,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); @@ -1401,7 +1403,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); @@ -1448,7 +1450,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); @@ -1479,7 +1481,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkspaceRequest() ); @@ -1500,7 +1502,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); @@ -1531,7 +1533,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); @@ -1578,7 +1580,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); @@ -1609,7 +1611,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkspaceRequest() ); @@ -1630,7 +1632,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); @@ -1661,7 +1663,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); @@ -1708,7 +1710,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); @@ -1739,7 +1741,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest() ); @@ -1760,7 +1762,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); @@ -1792,7 +1794,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); @@ -1839,7 +1841,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); @@ -1870,7 +1872,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest() ); @@ -1891,7 +1893,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); @@ -1922,7 +1924,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); @@ -1969,7 +1971,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); @@ -2000,7 +2002,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PullGitCommitsRequest() ); @@ -2021,7 +2023,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); @@ -2052,7 +2054,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); @@ -2099,7 +2101,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); @@ -2130,7 +2132,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.PushGitCommitsRequest() ); @@ -2151,7 +2153,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); @@ -2183,7 +2185,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); @@ -2230,7 +2232,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); @@ -2261,7 +2263,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest() ); @@ -2282,7 +2284,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); @@ -2314,7 +2316,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); @@ -2361,7 +2363,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); @@ -2392,7 +2394,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest() ); @@ -2413,7 +2415,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); @@ -2445,7 +2447,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); @@ -2492,7 +2494,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); @@ -2526,7 +2528,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest() ); @@ -2550,7 +2552,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); @@ -2582,7 +2584,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); @@ -2629,7 +2631,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); @@ -2663,7 +2665,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest() ); @@ -2687,7 +2689,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); @@ -2718,7 +2720,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); @@ -2765,7 +2767,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); @@ -2796,7 +2798,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchFileDiffRequest() ); @@ -2817,7 +2819,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); @@ -2848,7 +2850,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); @@ -2895,7 +2897,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); @@ -2926,7 +2928,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MakeDirectoryRequest() ); @@ -2947,7 +2949,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); @@ -2978,7 +2980,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); @@ -3025,7 +3027,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); @@ -3056,7 +3058,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveDirectoryRequest() ); @@ -3077,7 +3079,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); @@ -3108,7 +3110,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); @@ -3155,7 +3157,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); @@ -3186,7 +3188,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveDirectoryRequest() ); @@ -3207,7 +3209,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); @@ -3238,7 +3240,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); @@ -3285,7 +3287,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); @@ -3313,7 +3315,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ReadFileRequest() ); @@ -3334,7 +3336,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); @@ -3365,7 +3367,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); @@ -3412,7 +3414,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); @@ -3443,7 +3445,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.RemoveFileRequest() ); @@ -3464,7 +3466,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); @@ -3495,7 +3497,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); @@ -3542,7 +3544,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); @@ -3570,7 +3572,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.MoveFileRequest() ); @@ -3591,7 +3593,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); @@ -3622,7 +3624,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); @@ -3669,7 +3671,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); @@ -3697,7 +3699,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.WriteFileRequest() ); @@ -3718,7 +3720,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetReleaseConfigRequest() ); @@ -3749,7 +3751,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetReleaseConfigRequest() ); @@ -3796,7 +3798,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetReleaseConfigRequest() ); @@ -3827,7 +3829,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetReleaseConfigRequest() ); @@ -3848,7 +3850,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateReleaseConfigRequest() ); @@ -3880,7 +3882,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateReleaseConfigRequest() ); @@ -3927,7 +3929,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateReleaseConfigRequest() ); @@ -3958,7 +3960,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateReleaseConfigRequest() ); @@ -3979,7 +3981,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateReleaseConfigRequest() ); @@ -4012,7 +4014,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateReleaseConfigRequest() ); @@ -4060,7 +4062,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateReleaseConfigRequest() ); @@ -4092,7 +4094,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateReleaseConfigRequest() ); @@ -4114,7 +4116,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteReleaseConfigRequest() ); @@ -4146,7 +4148,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteReleaseConfigRequest() ); @@ -4193,7 +4195,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteReleaseConfigRequest() ); @@ -4224,7 +4226,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteReleaseConfigRequest() ); @@ -4245,7 +4247,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); @@ -4277,7 +4279,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); @@ -4324,7 +4326,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); @@ -4355,7 +4357,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetCompilationResultRequest() ); @@ -4376,7 +4378,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); @@ -4408,7 +4410,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); @@ -4455,7 +4457,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); @@ -4489,7 +4491,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateCompilationResultRequest() ); @@ -4513,7 +4515,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowConfigRequest() ); @@ -4544,7 +4546,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowConfigRequest() ); @@ -4591,7 +4593,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowConfigRequest() ); @@ -4622,7 +4624,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowConfigRequest() ); @@ -4643,7 +4645,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowConfigRequest() ); @@ -4675,7 +4677,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowConfigRequest() ); @@ -4722,7 +4724,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowConfigRequest() ); @@ -4753,7 +4755,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowConfigRequest() ); @@ -4774,7 +4776,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateWorkflowConfigRequest() ); @@ -4807,7 +4809,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateWorkflowConfigRequest() ); @@ -4855,7 +4857,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateWorkflowConfigRequest() ); @@ -4887,7 +4889,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateWorkflowConfigRequest() ); @@ -4909,7 +4911,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowConfigRequest() ); @@ -4941,7 +4943,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowConfigRequest() ); @@ -4988,7 +4990,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowConfigRequest() ); @@ -5019,7 +5021,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowConfigRequest() ); @@ -5040,7 +5042,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); @@ -5072,7 +5074,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); @@ -5119,7 +5121,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); @@ -5153,7 +5155,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest() ); @@ -5177,7 +5179,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); @@ -5209,7 +5211,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); @@ -5256,7 +5258,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); @@ -5290,7 +5292,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest() ); @@ -5314,7 +5316,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); @@ -5346,7 +5348,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); @@ -5393,7 +5395,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); @@ -5427,7 +5429,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest() ); @@ -5451,7 +5453,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); @@ -5483,7 +5485,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); @@ -5530,7 +5532,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); @@ -5564,7 +5566,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest() ); @@ -5588,7 +5590,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetConfigRequest() ); @@ -5619,7 +5621,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetConfigRequest() ); @@ -5666,7 +5668,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetConfigRequest() ); @@ -5694,7 +5696,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.GetConfigRequest() ); @@ -5715,7 +5717,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateConfigRequest() ); @@ -5747,7 +5749,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateConfigRequest() ); @@ -5795,7 +5797,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateConfigRequest() ); @@ -5827,7 +5829,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.UpdateConfigRequest() ); @@ -5849,7 +5851,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); @@ -5888,7 +5890,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); @@ -5943,7 +5945,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); @@ -5974,7 +5976,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); @@ -6034,7 +6036,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); @@ -6083,7 +6085,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); @@ -6132,7 +6134,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListRepositoriesRequest() ); @@ -6175,7 +6177,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest() ); @@ -6215,7 +6217,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest() ); @@ -6272,7 +6274,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest() ); @@ -6306,7 +6308,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest() ); @@ -6376,7 +6378,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest() ); @@ -6435,7 +6437,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest() ); @@ -6489,7 +6491,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest() ); @@ -6536,7 +6538,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest() ); @@ -6576,7 +6578,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest() ); @@ -6633,7 +6635,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest() ); @@ -6667,7 +6669,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest() ); @@ -6734,7 +6736,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest() ); @@ -6790,7 +6792,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest() ); @@ -6844,7 +6846,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest() ); @@ -6891,7 +6893,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); @@ -6930,7 +6932,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); @@ -6985,7 +6987,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); @@ -7016,7 +7018,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); @@ -7076,7 +7078,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); @@ -7125,7 +7127,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); @@ -7174,7 +7176,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkspacesRequest() ); @@ -7216,7 +7218,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); @@ -7256,7 +7258,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); @@ -7313,7 +7315,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); @@ -7347,7 +7349,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); @@ -7414,7 +7416,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); @@ -7470,7 +7472,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); @@ -7524,7 +7526,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest() ); @@ -7571,7 +7573,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.SearchFilesRequest() ); @@ -7610,7 +7612,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.SearchFilesRequest() ); @@ -7665,7 +7667,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.SearchFilesRequest() ); @@ -7696,7 +7698,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.SearchFilesRequest() ); @@ -7757,7 +7759,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.SearchFilesRequest() ); @@ -7809,7 +7811,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.SearchFilesRequest() ); @@ -7859,7 +7861,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.SearchFilesRequest() ); @@ -7904,7 +7906,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest() ); @@ -7944,7 +7946,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest() ); @@ -8001,7 +8003,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest() ); @@ -8032,7 +8034,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest() ); @@ -8093,7 +8095,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest() ); @@ -8143,7 +8145,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest() ); @@ -8193,7 +8195,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest() ); @@ -8236,7 +8238,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); @@ -8276,7 +8278,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); @@ -8333,7 +8335,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); @@ -8367,7 +8369,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); @@ -8436,7 +8438,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); @@ -8494,7 +8496,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); @@ -8548,7 +8550,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListCompilationResultsRequest() ); @@ -8595,7 +8597,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); @@ -8635,7 +8637,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); @@ -8692,7 +8694,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); @@ -8726,7 +8728,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); @@ -8798,7 +8800,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); @@ -8859,7 +8861,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); @@ -8913,7 +8915,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest() ); @@ -8960,7 +8962,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest() ); @@ -9000,7 +9002,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest() ); @@ -9057,7 +9059,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest() ); @@ -9088,7 +9090,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest() ); @@ -9149,7 +9151,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest() ); @@ -9199,7 +9201,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest() ); @@ -9249,7 +9251,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest() ); @@ -9292,7 +9294,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); @@ -9332,7 +9334,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); @@ -9389,7 +9391,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); @@ -9423,7 +9425,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); @@ -9492,7 +9494,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); @@ -9550,7 +9552,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); @@ -9604,7 +9606,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest() ); @@ -9651,7 +9653,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); @@ -9691,7 +9693,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); @@ -9748,7 +9750,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); @@ -9782,7 +9784,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); @@ -9854,7 +9856,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); @@ -9915,7 +9917,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); @@ -9969,7 +9971,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest() ); @@ -10015,7 +10017,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -10045,7 +10047,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -10089,7 +10091,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -10121,7 +10123,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -10151,7 +10153,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -10195,7 +10197,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -10227,7 +10229,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -10260,7 +10262,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -10304,7 +10306,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -10339,7 +10341,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10369,7 +10371,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10413,7 +10415,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10448,7 +10450,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10496,7 +10498,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10533,7 +10535,7 @@ describe('v1beta1.DataformClient', () => { }); describe('Path templates', () => { - describe('compilationResult', () => { + describe('compilationResult', async () => { const fakePath = '/rendered/path/compilationResult'; const expectedParameters = { project: 'projectValue', @@ -10545,7 +10547,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.compilationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10626,7 +10628,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('config', () => { + describe('config', async () => { const fakePath = '/rendered/path/config'; const expectedParameters = { project: 'projectValue', @@ -10636,7 +10638,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.configPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10675,7 +10677,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -10687,7 +10689,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10751,7 +10753,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -10764,7 +10766,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10843,7 +10845,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -10853,7 +10855,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10892,7 +10894,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('releaseConfig', () => { + describe('releaseConfig', async () => { const fakePath = '/rendered/path/releaseConfig'; const expectedParameters = { project: 'projectValue', @@ -10904,7 +10906,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.releaseConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10968,7 +10970,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -10979,7 +10981,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11032,7 +11034,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('secretVersion', () => { + describe('secretVersion', async () => { const fakePath = '/rendered/path/secretVersion'; const expectedParameters = { project: 'projectValue', @@ -11043,7 +11045,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.secretVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11096,7 +11098,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('workflowConfig', () => { + describe('workflowConfig', async () => { const fakePath = '/rendered/path/workflowConfig'; const expectedParameters = { project: 'projectValue', @@ -11108,7 +11110,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workflowConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11173,7 +11175,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('workflowInvocation', () => { + describe('workflowInvocation', async () => { const fakePath = '/rendered/path/workflowInvocation'; const expectedParameters = { project: 'projectValue', @@ -11185,7 +11187,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workflowInvocationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11266,7 +11268,7 @@ describe('v1beta1.DataformClient', () => { }); }); - describe('workspace', () => { + describe('workspace', async () => { const fakePath = '/rendered/path/workspace'; const expectedParameters = { project: 'projectValue', @@ -11278,7 +11280,7 @@ describe('v1beta1.DataformClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workspacePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datafusion/package.json b/packages/google-cloud-datafusion/package.json index 6ccbab4df07..7bfdefa24c7 100644 --- a/packages/google-cloud-datafusion/package.json +++ b/packages/google-cloud-datafusion/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json index 69516ce8928..0bac9200d7f 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json index 69516ce8928..0bac9200d7f 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json index 8bd9b4c598a..81d0c4ccb3b 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json index 8bd9b4c598a..81d0c4ccb3b 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/src/v1/data_fusion_client.ts b/packages/google-cloud-datafusion/src/v1/data_fusion_client.ts index 8b5d6c5f971..87e8e203c3c 100644 --- a/packages/google-cloud-datafusion/src/v1/data_fusion_client.ts +++ b/packages/google-cloud-datafusion/src/v1/data_fusion_client.ts @@ -593,7 +593,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -727,7 +729,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -895,7 +899,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1071,7 +1077,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1240,7 +1248,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1409,7 +1419,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datafusion.v1.IListAvailableVersionsRequest, @@ -1480,7 +1492,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listAvailableVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAvailableVersions stream %j', request); return this.descriptors.page.listAvailableVersions.createStream( this.innerApiCalls.listAvailableVersions as GaxCall, @@ -1533,7 +1547,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listAvailableVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAvailableVersions iterate %j', request); return this.descriptors.page.listAvailableVersions.asyncIterate( this.innerApiCalls['listAvailableVersions'] as GaxCall, @@ -1643,7 +1659,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datafusion.v1.IListInstancesRequest, @@ -1716,7 +1734,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1771,7 +1791,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, diff --git a/packages/google-cloud-datafusion/src/v1beta1/data_fusion_client.ts b/packages/google-cloud-datafusion/src/v1beta1/data_fusion_client.ts index c1c27a54be4..36e33e1e348 100644 --- a/packages/google-cloud-datafusion/src/v1beta1/data_fusion_client.ts +++ b/packages/google-cloud-datafusion/src/v1beta1/data_fusion_client.ts @@ -646,7 +646,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -771,7 +773,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -892,7 +896,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addDnsPeering request %j', request); const wrappedCallback: | Callback< @@ -1019,7 +1025,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeDnsPeering request %j', request); const wrappedCallback: | Callback< @@ -1156,7 +1164,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1324,7 +1334,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1500,7 +1512,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1669,7 +1683,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1840,7 +1856,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2009,7 +2027,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datafusion.v1beta1.IListAvailableVersionsRequest, @@ -2080,7 +2100,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listAvailableVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAvailableVersions stream %j', request); return this.descriptors.page.listAvailableVersions.createStream( this.innerApiCalls.listAvailableVersions as GaxCall, @@ -2133,7 +2155,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listAvailableVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAvailableVersions iterate %j', request); return this.descriptors.page.listAvailableVersions.asyncIterate( this.innerApiCalls['listAvailableVersions'] as GaxCall, @@ -2243,7 +2267,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datafusion.v1beta1.IListInstancesRequest, @@ -2316,7 +2342,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -2371,7 +2399,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2479,7 +2509,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datafusion.v1beta1.IListNamespacesRequest, @@ -2550,7 +2582,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listNamespaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNamespaces stream %j', request); return this.descriptors.page.listNamespaces.createStream( this.innerApiCalls.listNamespaces as GaxCall, @@ -2603,7 +2637,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listNamespaces']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNamespaces iterate %j', request); return this.descriptors.page.listNamespaces.asyncIterate( this.innerApiCalls['listNamespaces'] as GaxCall, @@ -2706,7 +2742,9 @@ export class DataFusionClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datafusion.v1beta1.IListDnsPeeringsRequest, @@ -2772,7 +2810,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listDnsPeerings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDnsPeerings stream %j', request); return this.descriptors.page.listDnsPeerings.createStream( this.innerApiCalls.listDnsPeerings as GaxCall, @@ -2820,7 +2860,9 @@ export class DataFusionClient { }); const defaultCallSettings = this._defaults['listDnsPeerings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDnsPeerings iterate %j', request); return this.descriptors.page.listDnsPeerings.asyncIterate( this.innerApiCalls['listDnsPeerings'] as GaxCall, diff --git a/packages/google-cloud-datafusion/test/gapic_data_fusion_v1.ts b/packages/google-cloud-datafusion/test/gapic_data_fusion_v1.ts index 5eacbed2738..4727e872361 100644 --- a/packages/google-cloud-datafusion/test/gapic_data_fusion_v1.ts +++ b/packages/google-cloud-datafusion/test/gapic_data_fusion_v1.ts @@ -282,7 +282,9 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataFusionStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.GetInstanceRequest() ); @@ -372,7 +374,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.GetInstanceRequest() ); @@ -419,7 +421,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.GetInstanceRequest() ); @@ -450,7 +452,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.GetInstanceRequest() ); @@ -471,7 +473,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.CreateInstanceRequest() ); @@ -504,7 +506,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.CreateInstanceRequest() ); @@ -558,7 +560,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.CreateInstanceRequest() ); @@ -589,7 +591,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.CreateInstanceRequest() ); @@ -622,7 +624,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.DeleteInstanceRequest() ); @@ -698,7 +700,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.DeleteInstanceRequest() ); @@ -752,7 +754,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.DeleteInstanceRequest() ); @@ -783,7 +785,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.DeleteInstanceRequest() ); @@ -816,7 +818,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.UpdateInstanceRequest() ); @@ -893,7 +895,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.UpdateInstanceRequest() ); @@ -948,7 +950,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.UpdateInstanceRequest() ); @@ -980,7 +982,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.UpdateInstanceRequest() ); @@ -1014,7 +1016,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1036,7 +1038,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1057,7 +1059,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.RestartInstanceRequest() ); @@ -1090,7 +1092,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.RestartInstanceRequest() ); @@ -1144,7 +1146,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.RestartInstanceRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.RestartInstanceRequest() ); @@ -1208,7 +1210,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1230,7 +1232,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1251,7 +1253,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListAvailableVersionsRequest() ); @@ -1285,7 +1287,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListAvailableVersionsRequest() ); @@ -1334,7 +1336,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListAvailableVersionsRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListAvailableVersionsRequest() ); @@ -1428,7 +1430,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListAvailableVersionsRequest() ); @@ -1483,7 +1485,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListAvailableVersionsRequest() ); @@ -1530,7 +1532,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListAvailableVersionsRequest() ); @@ -1576,7 +1578,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListInstancesRequest() ); @@ -1609,7 +1611,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListInstancesRequest() ); @@ -1658,7 +1660,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListInstancesRequest() ); @@ -1689,7 +1691,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListInstancesRequest() ); @@ -1743,7 +1745,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListInstancesRequest() ); @@ -1792,7 +1794,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListInstancesRequest() ); @@ -1835,7 +1837,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1.ListInstancesRequest() ); @@ -1872,7 +1874,7 @@ describe('v1.DataFusionClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -1884,7 +1886,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1948,7 +1950,7 @@ describe('v1.DataFusionClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -1959,7 +1961,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2012,7 +2014,7 @@ describe('v1.DataFusionClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2022,7 +2024,7 @@ describe('v1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datafusion/test/gapic_data_fusion_v1beta1.ts b/packages/google-cloud-datafusion/test/gapic_data_fusion_v1beta1.ts index 0183031bebb..5362db602b8 100644 --- a/packages/google-cloud-datafusion/test/gapic_data_fusion_v1beta1.ts +++ b/packages/google-cloud-datafusion/test/gapic_data_fusion_v1beta1.ts @@ -284,7 +284,9 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataFusionStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.GetInstanceRequest() ); @@ -374,7 +376,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.GetInstanceRequest() ); @@ -421,7 +423,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.GetInstanceRequest() ); @@ -452,7 +454,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.GetInstanceRequest() ); @@ -473,7 +475,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest() ); @@ -504,7 +506,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest() ); @@ -551,7 +553,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest() ); @@ -582,7 +584,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest() ); @@ -603,7 +605,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest() ); @@ -634,7 +636,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest() ); @@ -681,7 +683,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest() ); @@ -712,7 +714,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest() ); @@ -733,7 +735,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest() ); @@ -764,7 +766,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest() ); @@ -811,7 +813,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest() ); @@ -842,7 +844,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest() ); @@ -863,7 +865,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.CreateInstanceRequest() ); @@ -896,7 +898,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.CreateInstanceRequest() ); @@ -950,7 +952,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.CreateInstanceRequest() ); @@ -981,7 +983,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.CreateInstanceRequest() ); @@ -1014,7 +1016,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1036,7 +1038,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1057,7 +1059,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.DeleteInstanceRequest() ); @@ -1090,7 +1092,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.DeleteInstanceRequest() ); @@ -1144,7 +1146,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.DeleteInstanceRequest() ); @@ -1175,7 +1177,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.DeleteInstanceRequest() ); @@ -1208,7 +1210,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1230,7 +1232,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1251,7 +1253,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpdateInstanceRequest() ); @@ -1285,7 +1287,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpdateInstanceRequest() ); @@ -1340,7 +1342,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpdateInstanceRequest() ); @@ -1372,7 +1374,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpdateInstanceRequest() ); @@ -1406,7 +1408,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1428,7 +1430,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1449,7 +1451,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RestartInstanceRequest() ); @@ -1482,7 +1484,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RestartInstanceRequest() ); @@ -1536,7 +1538,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RestartInstanceRequest() ); @@ -1567,7 +1569,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.RestartInstanceRequest() ); @@ -1600,7 +1602,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1622,7 +1624,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1643,7 +1645,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest() ); @@ -1676,7 +1678,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest() ); @@ -1730,7 +1732,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest() ); @@ -1761,7 +1763,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest() ); @@ -1794,7 +1796,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1816,7 +1818,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1837,7 +1839,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest() ); @@ -1877,7 +1879,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest() ); @@ -1932,7 +1934,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest() ); @@ -1966,7 +1968,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest() ); @@ -2032,7 +2034,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest() ); @@ -2087,7 +2089,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest() ); @@ -2140,7 +2142,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest() ); @@ -2186,7 +2188,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListInstancesRequest() ); @@ -2225,7 +2227,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListInstancesRequest() ); @@ -2280,7 +2282,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListInstancesRequest() ); @@ -2311,7 +2313,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListInstancesRequest() ); @@ -2371,7 +2373,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListInstancesRequest() ); @@ -2420,7 +2422,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListInstancesRequest() ); @@ -2469,7 +2471,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListInstancesRequest() ); @@ -2512,7 +2514,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListNamespacesRequest() ); @@ -2551,7 +2553,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListNamespacesRequest() ); @@ -2606,7 +2608,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListNamespacesRequest() ); @@ -2637,7 +2639,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListNamespacesRequest() ); @@ -2698,7 +2700,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListNamespacesRequest() ); @@ -2748,7 +2750,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListNamespacesRequest() ); @@ -2797,7 +2799,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListNamespacesRequest() ); @@ -2840,7 +2842,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest() ); @@ -2879,7 +2881,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest() ); @@ -2934,7 +2936,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest() ); @@ -2965,7 +2967,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest() ); @@ -3026,7 +3028,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest() ); @@ -3076,7 +3078,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest() ); @@ -3126,7 +3128,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest() ); @@ -3164,7 +3166,7 @@ describe('v1beta1.DataFusionClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -3176,7 +3178,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3240,7 +3242,7 @@ describe('v1beta1.DataFusionClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -3251,7 +3253,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3304,7 +3306,7 @@ describe('v1beta1.DataFusionClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3314,7 +3316,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3353,7 +3355,7 @@ describe('v1beta1.DataFusionClient', () => { }); }); - describe('namespace', () => { + describe('namespace', async () => { const fakePath = '/rendered/path/namespace'; const expectedParameters = { project: 'projectValue', @@ -3365,7 +3367,7 @@ describe('v1beta1.DataFusionClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.namespacePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datalabeling/package.json b/packages/google-cloud-datalabeling/package.json index 230e6ce2b58..fa5de69009d 100644 --- a/packages/google-cloud-datalabeling/package.json +++ b/packages/google-cloud-datalabeling/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json index e5e3c5a655f..a2bff2bbdf3 100644 --- a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json +++ b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datalabeling", - "version": "4.2.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json index e5e3c5a655f..a2bff2bbdf3 100644 --- a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json +++ b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datalabeling", - "version": "4.2.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datalabeling/src/v1beta1/data_labeling_service_client.ts b/packages/google-cloud-datalabeling/src/v1beta1/data_labeling_service_client.ts index 97e11d35b22..ba9d27df33a 100644 --- a/packages/google-cloud-datalabeling/src/v1beta1/data_labeling_service_client.ts +++ b/packages/google-cloud-datalabeling/src/v1beta1/data_labeling_service_client.ts @@ -685,7 +685,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDataset request %j', request); const wrappedCallback: | Callback< @@ -805,7 +807,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataset request %j', request); const wrappedCallback: | Callback< @@ -931,7 +935,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDataset request %j', request); const wrappedCallback: | Callback< @@ -1052,7 +1058,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataItem request %j', request); const wrappedCallback: | Callback< @@ -1179,7 +1187,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnnotatedDataset request %j', request); const wrappedCallback: | Callback< @@ -1306,7 +1316,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAnnotatedDataset request %j', request); const wrappedCallback: | Callback< @@ -1431,7 +1443,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExample request %j', request); const wrappedCallback: | Callback< @@ -1561,7 +1575,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAnnotationSpecSet request %j', request); const wrappedCallback: | Callback< @@ -1687,7 +1703,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnnotationSpecSet request %j', request); const wrappedCallback: | Callback< @@ -1813,7 +1831,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAnnotationSpecSet request %j', request); const wrappedCallback: | Callback< @@ -1939,7 +1959,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstruction request %j', request); const wrappedCallback: | Callback< @@ -2065,7 +2087,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteInstruction request %j', request); const wrappedCallback: | Callback< @@ -2193,7 +2217,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvaluation request %j', request); const wrappedCallback: | Callback< @@ -2321,7 +2347,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEvaluationJob request %j', request); const wrappedCallback: | Callback< @@ -2461,7 +2489,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ 'evaluation_job.name': request.evaluationJob!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEvaluationJob request %j', request); const wrappedCallback: | Callback< @@ -2588,7 +2618,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvaluationJob request %j', request); const wrappedCallback: | Callback< @@ -2716,7 +2748,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseEvaluationJob request %j', request); const wrappedCallback: | Callback< @@ -2844,7 +2878,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeEvaluationJob request %j', request); const wrappedCallback: | Callback< @@ -2971,7 +3007,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEvaluationJob request %j', request); const wrappedCallback: | Callback< @@ -3113,7 +3151,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3294,7 +3334,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3483,7 +3525,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3672,7 +3716,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3853,7 +3899,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4023,7 +4071,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4193,7 +4243,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.IListDatasetsRequest, @@ -4266,7 +4318,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets stream %j', request); return this.descriptors.page.listDatasets.createStream( this.innerApiCalls.listDatasets as GaxCall, @@ -4321,7 +4375,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets iterate %j', request); return this.descriptors.page.listDatasets.asyncIterate( this.innerApiCalls['listDatasets'] as GaxCall, @@ -4432,7 +4488,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.IListDataItemsRequest, @@ -4505,7 +4563,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listDataItems']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataItems stream %j', request); return this.descriptors.page.listDataItems.createStream( this.innerApiCalls.listDataItems as GaxCall, @@ -4560,7 +4620,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listDataItems']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataItems iterate %j', request); return this.descriptors.page.listDataItems.asyncIterate( this.innerApiCalls['listDataItems'] as GaxCall, @@ -4670,7 +4732,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.IListAnnotatedDatasetsRequest, @@ -4743,7 +4807,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listAnnotatedDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnnotatedDatasets stream %j', request); return this.descriptors.page.listAnnotatedDatasets.createStream( this.innerApiCalls.listAnnotatedDatasets as GaxCall, @@ -4798,7 +4864,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listAnnotatedDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnnotatedDatasets iterate %j', request); return this.descriptors.page.listAnnotatedDatasets.asyncIterate( this.innerApiCalls['listAnnotatedDatasets'] as GaxCall, @@ -4910,7 +4978,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.IListExamplesRequest, @@ -4985,7 +5055,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listExamples']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExamples stream %j', request); return this.descriptors.page.listExamples.createStream( this.innerApiCalls.listExamples as GaxCall, @@ -5042,7 +5114,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listExamples']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExamples iterate %j', request); return this.descriptors.page.listExamples.asyncIterate( this.innerApiCalls['listExamples'] as GaxCall, @@ -5152,7 +5226,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.IListAnnotationSpecSetsRequest, @@ -5225,7 +5301,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listAnnotationSpecSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnnotationSpecSets stream %j', request); return this.descriptors.page.listAnnotationSpecSets.createStream( this.innerApiCalls.listAnnotationSpecSets as GaxCall, @@ -5280,7 +5358,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listAnnotationSpecSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnnotationSpecSets iterate %j', request); return this.descriptors.page.listAnnotationSpecSets.asyncIterate( this.innerApiCalls['listAnnotationSpecSets'] as GaxCall, @@ -5390,7 +5470,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.IListInstructionsRequest, @@ -5463,7 +5545,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listInstructions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstructions stream %j', request); return this.descriptors.page.listInstructions.createStream( this.innerApiCalls.listInstructions as GaxCall, @@ -5518,7 +5602,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listInstructions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstructions iterate %j', request); return this.descriptors.page.listInstructions.asyncIterate( this.innerApiCalls['listInstructions'] as GaxCall, @@ -5660,7 +5746,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.ISearchEvaluationsRequest, @@ -5765,7 +5853,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['searchEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchEvaluations stream %j', request); return this.descriptors.page.searchEvaluations.createStream( this.innerApiCalls.searchEvaluations as GaxCall, @@ -5852,7 +5942,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['searchEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchEvaluations iterate %j', request); return this.descriptors.page.searchEvaluations.asyncIterate( this.innerApiCalls['searchEvaluations'] as GaxCall, @@ -5966,7 +6058,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.ISearchExampleComparisonsRequest, @@ -6041,7 +6135,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['searchExampleComparisons']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchExampleComparisons stream %j', request); return this.descriptors.page.searchExampleComparisons.createStream( this.innerApiCalls.searchExampleComparisons as GaxCall, @@ -6098,7 +6194,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['searchExampleComparisons']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchExampleComparisons iterate %j', request); return this.descriptors.page.searchExampleComparisons.asyncIterate( this.innerApiCalls['searchExampleComparisons'] as GaxCall, @@ -6216,7 +6314,9 @@ export class DataLabelingServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datalabeling.v1beta1.IListEvaluationJobsRequest, @@ -6296,7 +6396,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listEvaluationJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluationJobs stream %j', request); return this.descriptors.page.listEvaluationJobs.createStream( this.innerApiCalls.listEvaluationJobs as GaxCall, @@ -6358,7 +6460,9 @@ export class DataLabelingServiceClient { }); const defaultCallSettings = this._defaults['listEvaluationJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluationJobs iterate %j', request); return this.descriptors.page.listEvaluationJobs.asyncIterate( this.innerApiCalls['listEvaluationJobs'] as GaxCall, diff --git a/packages/google-cloud-datalabeling/test/gapic_data_labeling_service_v1beta1.ts b/packages/google-cloud-datalabeling/test/gapic_data_labeling_service_v1beta1.ts index fbd03f9f932..1cbfa6485e7 100644 --- a/packages/google-cloud-datalabeling/test/gapic_data_labeling_service_v1beta1.ts +++ b/packages/google-cloud-datalabeling/test/gapic_data_labeling_service_v1beta1.ts @@ -300,7 +300,9 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataLabelingServiceStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateDatasetRequest() ); @@ -395,7 +397,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateDatasetRequest() ); @@ -443,7 +445,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateDatasetRequest() ); @@ -475,7 +477,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateDatasetRequest() ); @@ -497,7 +499,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDatasetRequest() ); @@ -529,7 +531,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDatasetRequest() ); @@ -577,7 +579,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDatasetRequest() ); @@ -609,7 +611,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDatasetRequest() ); @@ -631,7 +633,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest() ); @@ -663,7 +665,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest() ); @@ -711,7 +713,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest() ); @@ -743,7 +745,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest() ); @@ -765,7 +767,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDataItemRequest() ); @@ -797,7 +799,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDataItemRequest() ); @@ -845,7 +847,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDataItemRequest() ); @@ -877,7 +879,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetDataItemRequest() ); @@ -899,7 +901,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest() ); @@ -932,7 +934,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest() ); @@ -980,7 +982,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest() ); @@ -1012,7 +1014,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest() ); @@ -1034,7 +1036,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest() ); @@ -1067,7 +1069,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest() ); @@ -1115,7 +1117,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest() ); @@ -1150,7 +1152,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest() ); @@ -1175,7 +1177,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetExampleRequest() ); @@ -1207,7 +1209,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetExampleRequest() ); @@ -1255,7 +1257,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetExampleRequest() ); @@ -1287,7 +1289,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetExampleRequest() ); @@ -1309,7 +1311,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest() ); @@ -1342,7 +1344,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest() ); @@ -1390,7 +1392,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest() ); @@ -1425,7 +1427,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest() ); @@ -1450,7 +1452,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest() ); @@ -1483,7 +1485,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest() ); @@ -1531,7 +1533,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest() ); @@ -1563,7 +1565,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest() ); @@ -1585,7 +1587,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest() ); @@ -1618,7 +1620,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest() ); @@ -1666,7 +1668,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest() ); @@ -1701,7 +1703,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest() ); @@ -1726,7 +1728,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetInstructionRequest() ); @@ -1758,7 +1760,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetInstructionRequest() ); @@ -1806,7 +1808,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetInstructionRequest() ); @@ -1838,7 +1840,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetInstructionRequest() ); @@ -1860,7 +1862,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest() ); @@ -1892,7 +1894,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest() ); @@ -1940,7 +1942,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest() ); @@ -1972,7 +1974,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest() ); @@ -1994,7 +1996,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationRequest() ); @@ -2026,7 +2028,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationRequest() ); @@ -2074,7 +2076,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationRequest() ); @@ -2106,7 +2108,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationRequest() ); @@ -2128,7 +2130,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateEvaluationJobRequest() ); @@ -2161,7 +2163,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateEvaluationJobRequest() ); @@ -2209,7 +2211,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateEvaluationJobRequest() ); @@ -2241,7 +2243,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateEvaluationJobRequest() ); @@ -2263,7 +2265,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest() ); @@ -2297,7 +2299,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest() ); @@ -2346,7 +2348,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest() ); @@ -2379,7 +2381,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest() ); @@ -2402,7 +2404,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationJobRequest() ); @@ -2434,7 +2436,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationJobRequest() ); @@ -2482,7 +2484,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationJobRequest() ); @@ -2514,7 +2516,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.GetEvaluationJobRequest() ); @@ -2536,7 +2538,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.PauseEvaluationJobRequest() ); @@ -2569,7 +2571,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.PauseEvaluationJobRequest() ); @@ -2617,7 +2619,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.PauseEvaluationJobRequest() ); @@ -2649,7 +2651,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.PauseEvaluationJobRequest() ); @@ -2671,7 +2673,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ResumeEvaluationJobRequest() ); @@ -2704,7 +2706,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ResumeEvaluationJobRequest() ); @@ -2752,7 +2754,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ResumeEvaluationJobRequest() ); @@ -2784,7 +2786,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ResumeEvaluationJobRequest() ); @@ -2806,7 +2808,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteEvaluationJobRequest() ); @@ -2839,7 +2841,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteEvaluationJobRequest() ); @@ -2887,7 +2889,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteEvaluationJobRequest() ); @@ -2919,7 +2921,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.DeleteEvaluationJobRequest() ); @@ -2941,7 +2943,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ImportDataRequest() ); @@ -2974,7 +2976,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ImportDataRequest() ); @@ -3029,7 +3031,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ImportDataRequest() ); @@ -3061,7 +3063,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ImportDataRequest() ); @@ -3095,7 +3097,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3118,7 +3120,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3137,7 +3139,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ExportDataRequest() ); @@ -3170,7 +3172,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ExportDataRequest() ); @@ -3225,7 +3227,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ExportDataRequest() ); @@ -3257,7 +3259,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ExportDataRequest() ); @@ -3291,7 +3293,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3314,7 +3316,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3333,7 +3335,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelImageRequest() ); @@ -3366,7 +3368,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelImageRequest() ); @@ -3421,7 +3423,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelImageRequest() ); @@ -3453,7 +3455,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelImageRequest() ); @@ -3487,7 +3489,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3510,7 +3512,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3529,7 +3531,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelVideoRequest() ); @@ -3562,7 +3564,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelVideoRequest() ); @@ -3617,7 +3619,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelVideoRequest() ); @@ -3649,7 +3651,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelVideoRequest() ); @@ -3683,7 +3685,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3706,7 +3708,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3725,7 +3727,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelTextRequest() ); @@ -3758,7 +3760,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelTextRequest() ); @@ -3813,7 +3815,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelTextRequest() ); @@ -3845,7 +3847,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.LabelTextRequest() ); @@ -3879,7 +3881,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3902,7 +3904,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3921,7 +3923,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateInstructionRequest() ); @@ -3955,7 +3957,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateInstructionRequest() ); @@ -4010,7 +4012,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateInstructionRequest() ); @@ -4042,7 +4044,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.CreateInstructionRequest() ); @@ -4076,7 +4078,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4099,7 +4101,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4121,7 +4123,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDatasetsRequest() ); @@ -4161,7 +4163,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDatasetsRequest() ); @@ -4217,7 +4219,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDatasetsRequest() ); @@ -4249,7 +4251,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDatasetsRequest() ); @@ -4311,7 +4313,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDatasetsRequest() ); @@ -4364,7 +4366,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDatasetsRequest() ); @@ -4414,7 +4416,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDatasetsRequest() ); @@ -4458,7 +4460,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDataItemsRequest() ); @@ -4498,7 +4500,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDataItemsRequest() ); @@ -4554,7 +4556,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDataItemsRequest() ); @@ -4586,7 +4588,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDataItemsRequest() ); @@ -4648,7 +4650,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDataItemsRequest() ); @@ -4699,7 +4701,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDataItemsRequest() ); @@ -4750,7 +4752,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListDataItemsRequest() ); @@ -4794,7 +4796,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest() ); @@ -4835,7 +4837,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest() ); @@ -4893,7 +4895,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest() ); @@ -4928,7 +4930,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest() ); @@ -4998,7 +5000,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest() ); @@ -5057,7 +5059,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest() ); @@ -5112,7 +5114,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest() ); @@ -5160,7 +5162,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListExamplesRequest() ); @@ -5200,7 +5202,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListExamplesRequest() ); @@ -5256,7 +5258,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListExamplesRequest() ); @@ -5288,7 +5290,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListExamplesRequest() ); @@ -5350,7 +5352,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListExamplesRequest() ); @@ -5403,7 +5405,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListExamplesRequest() ); @@ -5453,7 +5455,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListExamplesRequest() ); @@ -5497,7 +5499,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest() ); @@ -5538,7 +5540,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest() ); @@ -5596,7 +5598,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest() ); @@ -5631,7 +5633,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest() ); @@ -5701,7 +5703,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest() ); @@ -5760,7 +5762,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest() ); @@ -5815,7 +5817,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest() ); @@ -5863,7 +5865,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListInstructionsRequest() ); @@ -5903,7 +5905,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListInstructionsRequest() ); @@ -5961,7 +5963,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListInstructionsRequest() ); @@ -5993,7 +5995,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListInstructionsRequest() ); @@ -6055,7 +6057,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListInstructionsRequest() ); @@ -6106,7 +6108,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListInstructionsRequest() ); @@ -6157,7 +6159,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListInstructionsRequest() ); @@ -6201,7 +6203,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest() ); @@ -6241,7 +6243,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest() ); @@ -6299,7 +6301,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest() ); @@ -6331,7 +6333,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest() ); @@ -6393,7 +6395,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest() ); @@ -6444,7 +6446,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest() ); @@ -6495,7 +6497,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest() ); @@ -6539,7 +6541,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest() ); @@ -6580,7 +6582,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest() ); @@ -6638,7 +6640,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest() ); @@ -6673,7 +6675,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest() ); @@ -6743,7 +6745,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest() ); @@ -6802,7 +6804,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest() ); @@ -6857,7 +6859,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest() ); @@ -6905,7 +6907,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest() ); @@ -6946,7 +6948,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest() ); @@ -7004,7 +7006,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest() ); @@ -7036,7 +7038,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest() ); @@ -7100,7 +7102,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest() ); @@ -7153,7 +7155,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest() ); @@ -7204,7 +7206,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest() ); @@ -7242,7 +7244,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); describe('Path templates', () => { - describe('annotatedDataset', () => { + describe('annotatedDataset', async () => { const fakePath = '/rendered/path/annotatedDataset'; const expectedParameters = { project: 'projectValue', @@ -7254,7 +7256,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.annotatedDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7311,7 +7313,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('annotationSpecSet', () => { + describe('annotationSpecSet', async () => { const fakePath = '/rendered/path/annotationSpecSet'; const expectedParameters = { project: 'projectValue', @@ -7322,7 +7324,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.annotationSpecSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7374,7 +7376,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('dataItem', () => { + describe('dataItem', async () => { const fakePath = '/rendered/path/dataItem'; const expectedParameters = { project: 'projectValue', @@ -7386,7 +7388,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataItemPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7439,7 +7441,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -7450,7 +7452,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7489,7 +7491,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -7501,7 +7503,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7554,7 +7556,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('evaluationJob', () => { + describe('evaluationJob', async () => { const fakePath = '/rendered/path/evaluationJob'; const expectedParameters = { project: 'projectValue', @@ -7565,7 +7567,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7607,7 +7609,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -7620,7 +7622,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7684,7 +7686,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('instruction', () => { + describe('instruction', async () => { const fakePath = '/rendered/path/instruction'; const expectedParameters = { project: 'projectValue', @@ -7695,7 +7697,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instructionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7737,7 +7739,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -7747,7 +7749,7 @@ describe('v1beta1.DataLabelingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 9bcb5ef15a4..f3bf67046da 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -47,7 +47,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 01d1f5ebb2f..4bb9a3af9e8 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "3.14.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json index 27aa5762a1e..bd989afa889 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "3.14.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts b/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts index 303e31619c3..a0ac0ab7dad 100644 --- a/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts @@ -980,7 +980,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntryType request %j', request); const wrappedCallback: | Callback< @@ -1091,7 +1093,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAspectType request %j', request); const wrappedCallback: | Callback< @@ -1202,7 +1206,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntryGroup request %j', request); const wrappedCallback: | Callback< @@ -1336,7 +1342,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEntry request %j', request); const wrappedCallback: | Callback< @@ -1478,7 +1486,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'entry.name': request.entry!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEntry request %j', request); const wrappedCallback: | Callback< @@ -1589,7 +1599,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEntry request %j', request); const wrappedCallback: | Callback< @@ -1707,7 +1719,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntry request %j', request); const wrappedCallback: | Callback< @@ -1828,7 +1842,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupEntry request %j', request); const wrappedCallback: | Callback< @@ -1939,7 +1955,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMetadataJob request %j', request); const wrappedCallback: | Callback< @@ -2061,7 +2079,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelMetadataJob request %j', request); const wrappedCallback: | Callback< @@ -2199,7 +2219,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2371,7 +2393,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'entry_type.name': request.entryType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2542,7 +2566,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2718,7 +2744,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2890,7 +2918,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'aspect_type.name': request.aspectType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3062,7 +3092,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3238,7 +3270,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3410,7 +3444,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ 'entry_group.name': request.entryGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3582,7 +3618,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3759,7 +3797,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3941,7 +3981,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListEntryTypesRequest, @@ -4026,7 +4068,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listEntryTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntryTypes stream %j', request); return this.descriptors.page.listEntryTypes.createStream( this.innerApiCalls.listEntryTypes as GaxCall, @@ -4093,7 +4137,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listEntryTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntryTypes iterate %j', request); return this.descriptors.page.listEntryTypes.asyncIterate( this.innerApiCalls['listEntryTypes'] as GaxCall, @@ -4215,7 +4261,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListAspectTypesRequest, @@ -4300,7 +4348,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listAspectTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAspectTypes stream %j', request); return this.descriptors.page.listAspectTypes.createStream( this.innerApiCalls.listAspectTypes as GaxCall, @@ -4367,7 +4417,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listAspectTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAspectTypes iterate %j', request); return this.descriptors.page.listAspectTypes.asyncIterate( this.innerApiCalls['listAspectTypes'] as GaxCall, @@ -4481,7 +4533,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, @@ -4558,7 +4612,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listEntryGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntryGroups stream %j', request); return this.descriptors.page.listEntryGroups.createStream( this.innerApiCalls.listEntryGroups as GaxCall, @@ -4617,7 +4673,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listEntryGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntryGroups iterate %j', request); return this.descriptors.page.listEntryGroups.asyncIterate( this.innerApiCalls['listEntryGroups'] as GaxCall, @@ -4740,7 +4798,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListEntriesRequest, @@ -4832,7 +4892,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntries stream %j', request); return this.descriptors.page.listEntries.createStream( this.innerApiCalls.listEntries as GaxCall, @@ -4906,7 +4968,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntries iterate %j', request); return this.descriptors.page.listEntries.asyncIterate( this.innerApiCalls['listEntries'] as GaxCall, @@ -5022,7 +5086,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.ISearchEntriesRequest, @@ -5107,7 +5173,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['searchEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchEntries stream %j', request); return this.descriptors.page.searchEntries.createStream( this.innerApiCalls.searchEntries as GaxCall, @@ -5174,7 +5242,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['searchEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchEntries iterate %j', request); return this.descriptors.page.searchEntries.asyncIterate( this.innerApiCalls['searchEntries'] as GaxCall, @@ -5295,7 +5365,9 @@ export class CatalogServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, @@ -5379,7 +5451,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listMetadataJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataJobs stream %j', request); return this.descriptors.page.listMetadataJobs.createStream( this.innerApiCalls.listMetadataJobs as GaxCall, @@ -5445,7 +5519,9 @@ export class CatalogServiceClient { }); const defaultCallSettings = this._defaults['listMetadataJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMetadataJobs iterate %j', request); return this.descriptors.page.listMetadataJobs.asyncIterate( this.innerApiCalls['listMetadataJobs'] as GaxCall, @@ -5625,7 +5701,7 @@ export class CatalogServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts index ebdc4a090c8..6a6b10300e7 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -820,7 +820,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createContent request %j', request); const wrappedCallback: | Callback< @@ -936,7 +938,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ 'content.name': request.content!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateContent request %j', request); const wrappedCallback: | Callback< @@ -1047,7 +1051,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteContent request %j', request); const wrappedCallback: | Callback< @@ -1158,7 +1164,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getContent request %j', request); const wrappedCallback: | Callback< @@ -1273,7 +1281,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1395,7 +1405,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1516,7 +1528,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1648,7 +1662,9 @@ export class ContentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListContentRequest, @@ -1729,7 +1745,9 @@ export class ContentServiceClient { }); const defaultCallSettings = this._defaults['listContent']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContent stream %j', request); return this.descriptors.page.listContent.createStream( this.innerApiCalls.listContent as GaxCall, @@ -1792,7 +1810,9 @@ export class ContentServiceClient { }); const defaultCallSettings = this._defaults['listContent']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContent iterate %j', request); return this.descriptors.page.listContent.asyncIterate( this.innerApiCalls['listContent'] as GaxCall, @@ -1972,7 +1992,7 @@ export class ContentServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts index 97d705c8686..de4fbb5facf 100644 --- a/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts @@ -868,7 +868,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataScan request %j', request); const wrappedCallback: | Callback< @@ -983,7 +985,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runDataScan request %j', request); const wrappedCallback: | Callback< @@ -1098,7 +1102,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataScanJob request %j', request); const wrappedCallback: | Callback< @@ -1228,7 +1234,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateDataQualityRules request %j', request); const wrappedCallback: | Callback< @@ -1376,7 +1384,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1550,7 +1560,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_scan.name': request.dataScan!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1724,7 +1736,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1893,7 +1907,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListDataScansRequest, @@ -1971,7 +1987,9 @@ export class DataScanServiceClient { }); const defaultCallSettings = this._defaults['listDataScans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataScans stream %j', request); return this.descriptors.page.listDataScans.createStream( this.innerApiCalls.listDataScans as GaxCall, @@ -2031,7 +2049,9 @@ export class DataScanServiceClient { }); const defaultCallSettings = this._defaults['listDataScans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataScans iterate %j', request); return this.descriptors.page.listDataScans.asyncIterate( this.innerApiCalls['listDataScans'] as GaxCall, @@ -2160,7 +2180,9 @@ export class DataScanServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, @@ -2252,7 +2274,9 @@ export class DataScanServiceClient { }); const defaultCallSettings = this._defaults['listDataScanJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataScanJobs stream %j', request); return this.descriptors.page.listDataScanJobs.createStream( this.innerApiCalls.listDataScanJobs as GaxCall, @@ -2326,7 +2350,9 @@ export class DataScanServiceClient { }); const defaultCallSettings = this._defaults['listDataScanJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataScanJobs iterate %j', request); return this.descriptors.page.listDataScanJobs.asyncIterate( this.innerApiCalls['listDataScanJobs'] as GaxCall, @@ -2506,7 +2532,7 @@ export class DataScanServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts b/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts index cb7e9945048..ed432c759de 100644 --- a/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts @@ -968,7 +968,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$GetDataTaxonomy', 'GetDataTaxonomy is deprecated and may be removed in a future version.', @@ -1097,7 +1099,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$GetDataAttributeBinding', 'GetDataAttributeBinding is deprecated and may be removed in a future version.', @@ -1223,7 +1227,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$GetDataAttribute', 'GetDataAttribute is deprecated and may be removed in a future version.', @@ -1369,7 +1375,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$CreateDataTaxonomy', 'CreateDataTaxonomy is deprecated and may be removed in a future version.', @@ -1553,7 +1561,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_taxonomy.name': request.dataTaxonomy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$UpdateDataTaxonomy', 'UpdateDataTaxonomy is deprecated and may be removed in a future version.', @@ -1737,7 +1747,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$DeleteDataTaxonomy', 'DeleteDataTaxonomy is deprecated and may be removed in a future version.', @@ -1929,7 +1941,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$CreateDataAttributeBinding', 'CreateDataAttributeBinding is deprecated and may be removed in a future version.', @@ -2113,7 +2127,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_attribute_binding.name': request.dataAttributeBinding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$UpdateDataAttributeBinding', 'UpdateDataAttributeBinding is deprecated and may be removed in a future version.', @@ -2300,7 +2316,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$DeleteDataAttributeBinding', 'DeleteDataAttributeBinding is deprecated and may be removed in a future version.', @@ -2492,7 +2510,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$CreateDataAttribute', 'CreateDataAttribute is deprecated and may be removed in a future version.', @@ -2676,7 +2696,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_attribute.name': request.dataAttribute!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$UpdateDataAttribute', 'UpdateDataAttribute is deprecated and may be removed in a future version.', @@ -2859,7 +2881,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$DeleteDataAttribute', 'DeleteDataAttribute is deprecated and may be removed in a future version.', @@ -3045,7 +3069,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataTaxonomies', 'ListDataTaxonomies is deprecated and may be removed in a future version.', @@ -3128,7 +3154,9 @@ export class DataTaxonomyServiceClient { }); const defaultCallSettings = this._defaults['listDataTaxonomies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataTaxonomies', 'ListDataTaxonomies is deprecated and may be removed in a future version.', @@ -3193,7 +3221,9 @@ export class DataTaxonomyServiceClient { }); const defaultCallSettings = this._defaults['listDataTaxonomies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataTaxonomies', 'ListDataTaxonomies is deprecated and may be removed in a future version.', @@ -3316,7 +3346,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataAttributeBindings', 'ListDataAttributeBindings is deprecated and may be removed in a future version.', @@ -3402,7 +3434,9 @@ export class DataTaxonomyServiceClient { }); const defaultCallSettings = this._defaults['listDataAttributeBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataAttributeBindings', 'ListDataAttributeBindings is deprecated and may be removed in a future version.', @@ -3470,7 +3504,9 @@ export class DataTaxonomyServiceClient { }); const defaultCallSettings = this._defaults['listDataAttributeBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataAttributeBindings', 'ListDataAttributeBindings is deprecated and may be removed in a future version.', @@ -3589,7 +3625,9 @@ export class DataTaxonomyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataAttributes', 'ListDataAttributes is deprecated and may be removed in a future version.', @@ -3671,7 +3709,9 @@ export class DataTaxonomyServiceClient { }); const defaultCallSettings = this._defaults['listDataAttributes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataAttributes', 'ListDataAttributes is deprecated and may be removed in a future version.', @@ -3735,7 +3775,9 @@ export class DataTaxonomyServiceClient { }); const defaultCallSettings = this._defaults['listDataAttributes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$DataTaxonomyService-$ListDataAttributes', 'ListDataAttributes is deprecated and may be removed in a future version.', @@ -3920,7 +3962,7 @@ export class DataTaxonomyServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index bb6024cc4d3..713b829b609 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -1060,7 +1060,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLake request %j', request); const wrappedCallback: | Callback< @@ -1167,7 +1169,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getZone request %j', request); const wrappedCallback: | Callback< @@ -1274,7 +1278,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAsset request %j', request); const wrappedCallback: | Callback< @@ -1381,7 +1387,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTask request %j', request); const wrappedCallback: | Callback< @@ -1504,7 +1512,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('runTask request %j', request); const wrappedCallback: | Callback< @@ -1611,7 +1621,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -1718,7 +1730,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelJob request %j', request); const wrappedCallback: | Callback< @@ -1827,7 +1841,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -1972,7 +1988,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2145,7 +2163,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ 'lake.name': request.lake!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2314,7 +2334,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2497,7 +2519,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2670,7 +2694,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ 'zone.name': request.zone!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2839,7 +2865,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3021,7 +3049,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3194,7 +3224,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ 'asset.name': request.asset!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3363,7 +3395,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3538,7 +3572,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3711,7 +3747,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ 'task.name': request.task!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3879,7 +3917,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4059,7 +4099,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4232,7 +4274,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ 'environment.name': request.environment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4401,7 +4445,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4565,7 +4611,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListLakesRequest, @@ -4638,7 +4686,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listLakes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLakes stream %j', request); return this.descriptors.page.listLakes.createStream( this.innerApiCalls.listLakes as GaxCall, @@ -4695,7 +4745,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listLakes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLakes iterate %j', request); return this.descriptors.page.listLakes.asyncIterate( this.innerApiCalls['listLakes'] as GaxCall, @@ -4797,7 +4849,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListLakeActionsRequest, @@ -4868,7 +4922,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listLakeActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLakeActions stream %j', request); return this.descriptors.page.listLakeActions.createStream( this.innerApiCalls.listLakeActions as GaxCall, @@ -4921,7 +4977,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listLakeActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLakeActions iterate %j', request); return this.descriptors.page.listLakeActions.asyncIterate( this.innerApiCalls['listLakeActions'] as GaxCall, @@ -5024,7 +5082,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListZonesRequest, @@ -5096,7 +5156,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listZones stream %j', request); return this.descriptors.page.listZones.createStream( this.innerApiCalls.listZones as GaxCall, @@ -5152,7 +5214,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listZones iterate %j', request); return this.descriptors.page.listZones.asyncIterate( this.innerApiCalls['listZones'] as GaxCall, @@ -5254,7 +5318,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListZoneActionsRequest, @@ -5325,7 +5391,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listZoneActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listZoneActions stream %j', request); return this.descriptors.page.listZoneActions.createStream( this.innerApiCalls.listZoneActions as GaxCall, @@ -5378,7 +5446,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listZoneActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listZoneActions iterate %j', request); return this.descriptors.page.listZoneActions.asyncIterate( this.innerApiCalls['listZoneActions'] as GaxCall, @@ -5484,7 +5554,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListAssetsRequest, @@ -5559,7 +5631,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets stream %j', request); return this.descriptors.page.listAssets.createStream( this.innerApiCalls.listAssets as GaxCall, @@ -5616,7 +5690,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets iterate %j', request); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, @@ -5718,7 +5794,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListAssetActionsRequest, @@ -5789,7 +5867,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listAssetActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssetActions stream %j', request); return this.descriptors.page.listAssetActions.createStream( this.innerApiCalls.listAssetActions as GaxCall, @@ -5842,7 +5922,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listAssetActions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssetActions iterate %j', request); return this.descriptors.page.listAssetActions.asyncIterate( this.innerApiCalls['listAssetActions'] as GaxCall, @@ -5945,7 +6027,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListTasksRequest, @@ -6017,7 +6101,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks stream %j', request); return this.descriptors.page.listTasks.createStream( this.innerApiCalls.listTasks as GaxCall, @@ -6073,7 +6159,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listTasks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTasks iterate %j', request); return this.descriptors.page.listTasks.asyncIterate( this.innerApiCalls['listTasks'] as GaxCall, @@ -6173,7 +6261,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListJobsRequest, @@ -6242,7 +6332,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -6295,7 +6387,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -6408,7 +6502,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, @@ -6484,7 +6580,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -6542,7 +6640,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -6654,7 +6754,9 @@ export class DataplexServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListSessionsRequest, @@ -6735,7 +6837,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions stream %j', request); return this.descriptors.page.listSessions.createStream( this.innerApiCalls.listSessions as GaxCall, @@ -6798,7 +6902,9 @@ export class DataplexServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions iterate %j', request); return this.descriptors.page.listSessions.asyncIterate( this.innerApiCalls['listSessions'] as GaxCall, @@ -6978,7 +7084,7 @@ export class DataplexServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index 14b67c0c85f..9f9d70cc976 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -827,7 +827,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEntity request %j', request); const wrappedCallback: | Callback< @@ -940,7 +942,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ 'entity.name': request.entity!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEntity request %j', request); const wrappedCallback: | Callback< @@ -1054,7 +1058,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEntity request %j', request); const wrappedCallback: | Callback< @@ -1166,7 +1172,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntity request %j', request); const wrappedCallback: | Callback< @@ -1286,7 +1294,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPartition request %j', request); const wrappedCallback: | Callback< @@ -1408,7 +1418,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePartition request %j', request); const wrappedCallback: | Callback< @@ -1521,7 +1533,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPartition request %j', request); const wrappedCallback: | Callback< @@ -1657,7 +1671,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListEntitiesRequest, @@ -1740,7 +1756,9 @@ export class MetadataServiceClient { }); const defaultCallSettings = this._defaults['listEntities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntities stream %j', request); return this.descriptors.page.listEntities.createStream( this.innerApiCalls.listEntities as GaxCall, @@ -1805,7 +1823,9 @@ export class MetadataServiceClient { }); const defaultCallSettings = this._defaults['listEntities']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntities iterate %j', request); return this.descriptors.page.listEntities.asyncIterate( this.innerApiCalls['listEntities'] as GaxCall, @@ -1934,7 +1954,9 @@ export class MetadataServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataplex.v1.IListPartitionsRequest, @@ -2026,7 +2048,9 @@ export class MetadataServiceClient { }); const defaultCallSettings = this._defaults['listPartitions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPartitions stream %j', request); return this.descriptors.page.listPartitions.createStream( this.innerApiCalls.listPartitions as GaxCall, @@ -2100,7 +2124,9 @@ export class MetadataServiceClient { }); const defaultCallSettings = this._defaults['listPartitions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPartitions iterate %j', request); return this.descriptors.page.listPartitions.asyncIterate( this.innerApiCalls['listPartitions'] as GaxCall, @@ -2280,7 +2306,7 @@ export class MetadataServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts index 9dfb23d0207..abf8623add3 100644 --- a/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts @@ -289,7 +289,9 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.catalogServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() ); @@ -379,7 +381,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() ); @@ -426,7 +428,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() ); @@ -457,7 +459,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() ); @@ -478,7 +480,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() ); @@ -509,7 +511,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() ); @@ -556,7 +558,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() ); @@ -587,7 +589,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() ); @@ -608,7 +610,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() ); @@ -639,7 +641,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() ); @@ -686,7 +688,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() ); @@ -717,7 +719,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() ); @@ -738,7 +740,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryRequest() ); @@ -769,7 +771,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryRequest() ); @@ -816,7 +818,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryRequest() ); @@ -847,7 +849,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryRequest() ); @@ -868,7 +870,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryRequest() ); @@ -900,7 +902,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryRequest() ); @@ -948,7 +950,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryRequest() ); @@ -980,7 +982,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryRequest() ); @@ -1132,7 +1134,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryRequest() ); @@ -1163,7 +1165,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryRequest() ); @@ -1238,7 +1240,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntryRequest() ); @@ -1259,7 +1261,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.LookupEntryRequest() ); @@ -1290,7 +1292,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.LookupEntryRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.LookupEntryRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.LookupEntryRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() ); @@ -1420,7 +1422,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() ); @@ -1467,7 +1469,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() ); @@ -1498,7 +1500,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() ); @@ -1519,7 +1521,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() ); @@ -1550,7 +1552,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() ); @@ -1597,7 +1599,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() ); @@ -1628,7 +1630,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() ); @@ -1649,7 +1651,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() ); @@ -1767,7 +1769,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() ); @@ -1800,7 +1802,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1822,7 +1824,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1843,7 +1845,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() ); @@ -1877,7 +1879,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() ); @@ -1932,7 +1934,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() ); @@ -1964,7 +1966,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() ); @@ -1998,7 +2000,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2020,7 +2022,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2041,7 +2043,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() ); @@ -2074,7 +2076,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() ); @@ -2128,7 +2130,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() ); @@ -2159,7 +2161,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() ); @@ -2192,7 +2194,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2214,7 +2216,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2235,7 +2237,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() ); @@ -2268,7 +2270,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() ); @@ -2322,7 +2324,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() ); @@ -2353,7 +2355,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() ); @@ -2386,7 +2388,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2408,7 +2410,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2429,7 +2431,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() ); @@ -2463,7 +2465,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() ); @@ -2518,7 +2520,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() ); @@ -2550,7 +2552,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() ); @@ -2584,7 +2586,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2606,7 +2608,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2627,7 +2629,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() ); @@ -2660,7 +2662,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() ); @@ -2714,7 +2716,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() ); @@ -2745,7 +2747,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() ); @@ -2778,7 +2780,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2800,7 +2802,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2821,7 +2823,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() ); @@ -2854,7 +2856,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() ); @@ -2908,7 +2910,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() ); @@ -2939,7 +2941,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() ); @@ -2972,7 +2974,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2994,7 +2996,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3015,7 +3017,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() ); @@ -3049,7 +3051,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() ); @@ -3104,7 +3106,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() ); @@ -3136,7 +3138,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() ); @@ -3170,7 +3172,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3192,7 +3194,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3213,7 +3215,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() ); @@ -3246,7 +3248,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() ); @@ -3300,7 +3302,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() ); @@ -3331,7 +3333,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() ); @@ -3364,7 +3366,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3386,7 +3388,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3407,7 +3409,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() ); @@ -3440,7 +3442,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() ); @@ -3494,7 +3496,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() ); @@ -3525,7 +3527,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() ); @@ -3558,7 +3560,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3580,7 +3582,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3601,7 +3603,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() ); @@ -3634,7 +3636,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() ); @@ -3683,7 +3685,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() ); @@ -3714,7 +3716,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() ); @@ -3768,7 +3770,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() ); @@ -3817,7 +3819,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() ); @@ -3860,7 +3862,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() ); @@ -3902,7 +3904,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() ); @@ -3935,7 +3937,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() ); @@ -3984,7 +3986,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() ); @@ -4015,7 +4017,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() ); @@ -4069,7 +4071,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() ); @@ -4118,7 +4120,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() ); @@ -4161,7 +4163,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() ); @@ -4203,7 +4205,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() ); @@ -4236,7 +4238,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() ); @@ -4285,7 +4287,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() ); @@ -4316,7 +4318,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() ); @@ -4370,7 +4372,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() ); @@ -4419,7 +4421,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() ); @@ -4462,7 +4464,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() ); @@ -4504,7 +4506,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntriesRequest() ); @@ -4537,7 +4539,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntriesRequest() ); @@ -4586,7 +4588,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntriesRequest() ); @@ -4617,7 +4619,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntriesRequest() ); @@ -4668,7 +4670,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntriesRequest() ); @@ -4716,7 +4718,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntriesRequest() ); @@ -4759,7 +4761,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntriesRequest() ); @@ -4803,7 +4805,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); @@ -4842,7 +4844,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); @@ -4899,7 +4901,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); @@ -4930,7 +4932,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); @@ -4991,7 +4993,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); @@ -5041,7 +5043,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); @@ -5091,7 +5093,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); @@ -5134,7 +5136,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); @@ -5173,7 +5175,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); @@ -5228,7 +5230,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); @@ -5259,7 +5261,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); @@ -5319,7 +5321,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); @@ -5368,7 +5370,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); @@ -5417,7 +5419,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); @@ -5458,7 +5460,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5488,7 +5490,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5532,7 +5534,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5567,7 +5569,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5615,7 +5617,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5656,7 +5658,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5735,7 +5737,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5815,7 +5817,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5911,8 +5913,7 @@ describe('v1.CatalogServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5931,7 +5932,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5940,8 +5941,7 @@ describe('v1.CatalogServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5957,7 +5957,7 @@ describe('v1.CatalogServiceClient', () => { }); describe('Path templates', () => { - describe('aspectType', () => { + describe('aspectType', async () => { const fakePath = '/rendered/path/aspectType'; const expectedParameters = { project: 'projectValue', @@ -5968,7 +5968,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aspectTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6021,7 +6021,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { project: 'projectValue', @@ -6034,7 +6034,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6109,7 +6109,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('content', () => { + describe('content', async () => { const fakePath = '/rendered/path/content'; const expectedParameters = { project: 'projectValue', @@ -6121,7 +6121,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6185,7 +6185,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('dataAttribute', () => { + describe('dataAttribute', async () => { const fakePath = '/rendered/path/dataAttribute'; const expectedParameters = { project: 'projectValue', @@ -6197,7 +6197,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6262,7 +6262,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('dataAttributeBinding', () => { + describe('dataAttributeBinding', async () => { const fakePath = '/rendered/path/dataAttributeBinding'; const expectedParameters = { project: 'projectValue', @@ -6273,7 +6273,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributeBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6343,7 +6343,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('dataScan', () => { + describe('dataScan', async () => { const fakePath = '/rendered/path/dataScan'; const expectedParameters = { project: 'projectValue', @@ -6354,7 +6354,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6407,7 +6407,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('dataScanJob', () => { + describe('dataScanJob', async () => { const fakePath = '/rendered/path/dataScanJob'; const expectedParameters = { project: 'projectValue', @@ -6419,7 +6419,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6483,7 +6483,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('dataTaxonomy', () => { + describe('dataTaxonomy', async () => { const fakePath = '/rendered/path/dataTaxonomy'; const expectedParameters = { project: 'projectValue', @@ -6494,7 +6494,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataTaxonomyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6547,7 +6547,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('entity', () => { + describe('entity', async () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { project: 'projectValue', @@ -6560,7 +6560,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6635,7 +6635,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -6647,7 +6647,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6711,7 +6711,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -6722,7 +6722,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6775,7 +6775,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('entryType', () => { + describe('entryType', async () => { const fakePath = '/rendered/path/entryType'; const expectedParameters = { project: 'projectValue', @@ -6786,7 +6786,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6839,7 +6839,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -6851,7 +6851,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6915,7 +6915,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -6928,7 +6928,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7003,7 +7003,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('lake', () => { + describe('lake', async () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { project: 'projectValue', @@ -7014,7 +7014,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lakePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7067,7 +7067,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -7077,7 +7077,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7116,7 +7116,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('metadataJob', () => { + describe('metadataJob', async () => { const fakePath = '/rendered/path/metadataJob'; const expectedParameters = { project: 'projectValue', @@ -7127,7 +7127,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7180,7 +7180,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('partition', () => { + describe('partition', async () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { project: 'projectValue', @@ -7194,7 +7194,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.partitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7280,7 +7280,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('projectLocationLakeAction', () => { + describe('projectLocationLakeAction', async () => { const fakePath = '/rendered/path/projectLocationLakeAction'; const expectedParameters = { project: 'projectValue', @@ -7292,7 +7292,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7375,7 +7375,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('projectLocationLakeZoneAction', () => { + describe('projectLocationLakeZoneAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAction'; const expectedParameters = { project: 'projectValue', @@ -7388,7 +7388,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = @@ -7484,7 +7484,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('projectLocationLakeZoneAssetAction', () => { + describe('projectLocationLakeZoneAssetAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; const expectedParameters = { project: 'projectValue', @@ -7498,7 +7498,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = @@ -7615,7 +7615,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -7628,7 +7628,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7703,7 +7703,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -7715,7 +7715,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7779,7 +7779,7 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('zone', () => { + describe('zone', async () => { const fakePath = '/rendered/path/zone'; const expectedParameters = { project: 'projectValue', @@ -7791,7 +7791,7 @@ describe('v1.CatalogServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.zonePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts index a62f9fb7b95..403fbadeca4 100644 --- a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -252,7 +252,9 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.contentServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); @@ -342,7 +344,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); @@ -389,7 +391,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); @@ -420,7 +422,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateContentRequest() ); @@ -441,7 +443,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); @@ -473,7 +475,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); @@ -521,7 +523,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); @@ -553,7 +555,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateContentRequest() ); @@ -575,7 +577,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); @@ -606,7 +608,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); @@ -653,7 +655,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); @@ -684,7 +686,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteContentRequest() ); @@ -705,7 +707,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); @@ -736,7 +738,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); @@ -783,7 +785,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); @@ -814,7 +816,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetContentRequest() ); @@ -835,7 +837,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -866,7 +868,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -913,7 +915,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -944,7 +946,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -965,7 +967,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -996,7 +998,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1205,7 +1207,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1226,7 +1228,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); @@ -1259,7 +1261,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); @@ -1393,7 +1395,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); @@ -1444,7 +1446,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListContentRequest() ); @@ -1530,7 +1532,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1604,7 +1606,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1639,7 +1641,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1728,7 +1730,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1807,7 +1809,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1887,7 +1889,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1983,8 +1985,7 @@ describe('v1.ContentServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2003,7 +2004,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2012,8 +2013,7 @@ describe('v1.ContentServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2029,7 +2029,7 @@ describe('v1.ContentServiceClient', () => { }); describe('Path templates', () => { - describe('aspectType', () => { + describe('aspectType', async () => { const fakePath = '/rendered/path/aspectType'; const expectedParameters = { project: 'projectValue', @@ -2040,7 +2040,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aspectTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2093,7 +2093,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { project: 'projectValue', @@ -2106,7 +2106,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2181,7 +2181,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('content', () => { + describe('content', async () => { const fakePath = '/rendered/path/content'; const expectedParameters = { project: 'projectValue', @@ -2193,7 +2193,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2257,7 +2257,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('dataAttribute', () => { + describe('dataAttribute', async () => { const fakePath = '/rendered/path/dataAttribute'; const expectedParameters = { project: 'projectValue', @@ -2269,7 +2269,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2334,7 +2334,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('dataAttributeBinding', () => { + describe('dataAttributeBinding', async () => { const fakePath = '/rendered/path/dataAttributeBinding'; const expectedParameters = { project: 'projectValue', @@ -2345,7 +2345,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributeBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2415,7 +2415,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('dataScan', () => { + describe('dataScan', async () => { const fakePath = '/rendered/path/dataScan'; const expectedParameters = { project: 'projectValue', @@ -2426,7 +2426,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2479,7 +2479,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('dataScanJob', () => { + describe('dataScanJob', async () => { const fakePath = '/rendered/path/dataScanJob'; const expectedParameters = { project: 'projectValue', @@ -2491,7 +2491,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2555,7 +2555,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('dataTaxonomy', () => { + describe('dataTaxonomy', async () => { const fakePath = '/rendered/path/dataTaxonomy'; const expectedParameters = { project: 'projectValue', @@ -2566,7 +2566,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataTaxonomyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2619,7 +2619,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('entity', () => { + describe('entity', async () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { project: 'projectValue', @@ -2632,7 +2632,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2707,7 +2707,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -2719,7 +2719,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2783,7 +2783,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -2794,7 +2794,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2847,7 +2847,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('entryType', () => { + describe('entryType', async () => { const fakePath = '/rendered/path/entryType'; const expectedParameters = { project: 'projectValue', @@ -2858,7 +2858,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2911,7 +2911,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2923,7 +2923,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2987,7 +2987,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -3000,7 +3000,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3075,7 +3075,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('lake', () => { + describe('lake', async () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { project: 'projectValue', @@ -3086,7 +3086,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lakePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3139,7 +3139,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('metadataJob', () => { + describe('metadataJob', async () => { const fakePath = '/rendered/path/metadataJob'; const expectedParameters = { project: 'projectValue', @@ -3150,7 +3150,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3203,7 +3203,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('partition', () => { + describe('partition', async () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { project: 'projectValue', @@ -3217,7 +3217,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.partitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3303,7 +3303,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('projectLocationLakeAction', () => { + describe('projectLocationLakeAction', async () => { const fakePath = '/rendered/path/projectLocationLakeAction'; const expectedParameters = { project: 'projectValue', @@ -3315,7 +3315,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3398,7 +3398,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('projectLocationLakeZoneAction', () => { + describe('projectLocationLakeZoneAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAction'; const expectedParameters = { project: 'projectValue', @@ -3411,7 +3411,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = @@ -3507,7 +3507,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('projectLocationLakeZoneAssetAction', () => { + describe('projectLocationLakeZoneAssetAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; const expectedParameters = { project: 'projectValue', @@ -3521,7 +3521,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = @@ -3638,7 +3638,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -3651,7 +3651,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3726,7 +3726,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -3738,7 +3738,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3802,7 +3802,7 @@ describe('v1.ContentServiceClient', () => { }); }); - describe('zone', () => { + describe('zone', async () => { const fakePath = '/rendered/path/zone'; const expectedParameters = { project: 'projectValue', @@ -3814,7 +3814,7 @@ describe('v1.ContentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.zonePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts index b58461e725a..0c160b644dc 100644 --- a/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts @@ -289,7 +289,9 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataScanServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanRequest() ); @@ -379,7 +381,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanRequest() ); @@ -426,7 +428,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanRequest() ); @@ -457,7 +459,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanRequest() ); @@ -478,7 +480,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunDataScanRequest() ); @@ -509,7 +511,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunDataScanRequest() ); @@ -556,7 +558,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunDataScanRequest() ); @@ -587,7 +589,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunDataScanRequest() ); @@ -608,7 +610,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() ); @@ -639,7 +641,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() ); @@ -686,7 +688,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() ); @@ -717,7 +719,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() ); @@ -738,7 +740,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() ); @@ -770,7 +772,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() ); @@ -817,7 +819,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() ); @@ -851,7 +853,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() ); @@ -875,7 +877,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateDataScanRequest() ); @@ -908,7 +910,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateDataScanRequest() ); @@ -962,7 +964,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateDataScanRequest() ); @@ -993,7 +995,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateDataScanRequest() ); @@ -1026,7 +1028,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1048,7 +1050,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1069,7 +1071,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() ); @@ -1103,7 +1105,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() ); @@ -1190,7 +1192,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() ); @@ -1224,7 +1226,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1246,7 +1248,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1267,7 +1269,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() ); @@ -1300,7 +1302,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() ); @@ -1354,7 +1356,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() ); @@ -1385,7 +1387,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() ); @@ -1418,7 +1420,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1440,7 +1442,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1461,7 +1463,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScansRequest() ); @@ -1494,7 +1496,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScansRequest() ); @@ -1543,7 +1545,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScansRequest() ); @@ -1574,7 +1576,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScansRequest() ); @@ -1628,7 +1630,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScansRequest() ); @@ -1677,7 +1679,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScansRequest() ); @@ -1720,7 +1722,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScansRequest() ); @@ -1762,7 +1764,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() ); @@ -1801,7 +1803,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() ); @@ -1856,7 +1858,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() ); @@ -1887,7 +1889,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() ); @@ -1947,7 +1949,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() ); @@ -1996,7 +1998,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() ); @@ -2045,7 +2047,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() ); @@ -2086,7 +2088,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2116,7 +2118,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2160,7 +2162,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2195,7 +2197,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2243,7 +2245,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2284,7 +2286,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2363,7 +2365,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2443,7 +2445,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2539,8 +2541,7 @@ describe('v1.DataScanServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2559,7 +2560,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2568,8 +2569,7 @@ describe('v1.DataScanServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2585,7 +2585,7 @@ describe('v1.DataScanServiceClient', () => { }); describe('Path templates', () => { - describe('aspectType', () => { + describe('aspectType', async () => { const fakePath = '/rendered/path/aspectType'; const expectedParameters = { project: 'projectValue', @@ -2596,7 +2596,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aspectTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2649,7 +2649,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { project: 'projectValue', @@ -2662,7 +2662,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2737,7 +2737,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('content', () => { + describe('content', async () => { const fakePath = '/rendered/path/content'; const expectedParameters = { project: 'projectValue', @@ -2749,7 +2749,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2813,7 +2813,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('dataAttribute', () => { + describe('dataAttribute', async () => { const fakePath = '/rendered/path/dataAttribute'; const expectedParameters = { project: 'projectValue', @@ -2825,7 +2825,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2890,7 +2890,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('dataAttributeBinding', () => { + describe('dataAttributeBinding', async () => { const fakePath = '/rendered/path/dataAttributeBinding'; const expectedParameters = { project: 'projectValue', @@ -2901,7 +2901,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributeBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2971,7 +2971,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('dataScan', () => { + describe('dataScan', async () => { const fakePath = '/rendered/path/dataScan'; const expectedParameters = { project: 'projectValue', @@ -2982,7 +2982,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3035,7 +3035,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('dataScanJob', () => { + describe('dataScanJob', async () => { const fakePath = '/rendered/path/dataScanJob'; const expectedParameters = { project: 'projectValue', @@ -3047,7 +3047,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3111,7 +3111,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('dataTaxonomy', () => { + describe('dataTaxonomy', async () => { const fakePath = '/rendered/path/dataTaxonomy'; const expectedParameters = { project: 'projectValue', @@ -3122,7 +3122,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataTaxonomyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3175,7 +3175,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('entity', () => { + describe('entity', async () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { project: 'projectValue', @@ -3188,7 +3188,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3263,7 +3263,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -3275,7 +3275,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3339,7 +3339,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -3350,7 +3350,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3403,7 +3403,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('entryType', () => { + describe('entryType', async () => { const fakePath = '/rendered/path/entryType'; const expectedParameters = { project: 'projectValue', @@ -3414,7 +3414,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3467,7 +3467,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3479,7 +3479,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3543,7 +3543,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -3556,7 +3556,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3631,7 +3631,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('lake', () => { + describe('lake', async () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { project: 'projectValue', @@ -3642,7 +3642,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lakePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3695,7 +3695,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3705,7 +3705,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3744,7 +3744,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('metadataJob', () => { + describe('metadataJob', async () => { const fakePath = '/rendered/path/metadataJob'; const expectedParameters = { project: 'projectValue', @@ -3755,7 +3755,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3808,7 +3808,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('partition', () => { + describe('partition', async () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { project: 'projectValue', @@ -3822,7 +3822,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.partitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3908,7 +3908,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('projectLocationLakeAction', () => { + describe('projectLocationLakeAction', async () => { const fakePath = '/rendered/path/projectLocationLakeAction'; const expectedParameters = { project: 'projectValue', @@ -3920,7 +3920,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4003,7 +4003,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('projectLocationLakeZoneAction', () => { + describe('projectLocationLakeZoneAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAction'; const expectedParameters = { project: 'projectValue', @@ -4016,7 +4016,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = @@ -4112,7 +4112,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('projectLocationLakeZoneAssetAction', () => { + describe('projectLocationLakeZoneAssetAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; const expectedParameters = { project: 'projectValue', @@ -4126,7 +4126,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = @@ -4243,7 +4243,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -4256,7 +4256,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4331,7 +4331,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -4343,7 +4343,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4407,7 +4407,7 @@ describe('v1.DataScanServiceClient', () => { }); }); - describe('zone', () => { + describe('zone', async () => { const fakePath = '/rendered/path/zone'; const expectedParameters = { project: 'projectValue', @@ -4419,7 +4419,7 @@ describe('v1.DataScanServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.zonePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index 0de03cf23ab..9686dfe0745 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -289,7 +289,9 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataplexServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); @@ -379,7 +381,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); @@ -426,7 +428,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); @@ -454,7 +456,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetLakeRequest() ); @@ -475,7 +477,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); @@ -506,7 +508,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); @@ -553,7 +555,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); @@ -581,7 +583,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetZoneRequest() ); @@ -602,7 +604,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); @@ -633,7 +635,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); @@ -680,7 +682,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); @@ -708,7 +710,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetAssetRequest() ); @@ -729,7 +731,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); @@ -760,7 +762,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); @@ -807,7 +809,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); @@ -835,7 +837,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetTaskRequest() ); @@ -856,7 +858,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunTaskRequest() ); @@ -887,7 +889,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunTaskRequest() ); @@ -934,7 +936,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunTaskRequest() ); @@ -962,7 +964,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.RunTaskRequest() ); @@ -983,7 +985,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); @@ -1014,7 +1016,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); @@ -1061,7 +1063,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetJobRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); @@ -1188,7 +1190,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); @@ -1216,7 +1218,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CancelJobRequest() ); @@ -1237,7 +1239,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); @@ -1268,7 +1270,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); @@ -1315,7 +1317,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() ); @@ -1367,7 +1369,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); @@ -1399,7 +1401,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); @@ -1453,7 +1455,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); @@ -1484,7 +1486,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateLakeRequest() ); @@ -1517,7 +1519,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1539,7 +1541,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1557,7 +1559,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); @@ -1590,7 +1592,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); @@ -1645,7 +1647,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); @@ -1677,7 +1679,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateLakeRequest() ); @@ -1711,7 +1713,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1733,7 +1735,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1751,7 +1753,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); @@ -1783,7 +1785,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); @@ -1837,7 +1839,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); @@ -1868,7 +1870,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteLakeRequest() ); @@ -1901,7 +1903,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1923,7 +1925,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1941,7 +1943,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); @@ -1973,7 +1975,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); @@ -2027,7 +2029,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); @@ -2058,7 +2060,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateZoneRequest() ); @@ -2091,7 +2093,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2113,7 +2115,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2131,7 +2133,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); @@ -2164,7 +2166,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); @@ -2219,7 +2221,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); @@ -2251,7 +2253,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateZoneRequest() ); @@ -2285,7 +2287,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2307,7 +2309,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2325,7 +2327,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); @@ -2357,7 +2359,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); @@ -2411,7 +2413,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); @@ -2442,7 +2444,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteZoneRequest() ); @@ -2475,7 +2477,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2497,7 +2499,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2515,7 +2517,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); @@ -2547,7 +2549,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); @@ -2601,7 +2603,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); @@ -2632,7 +2634,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateAssetRequest() ); @@ -2665,7 +2667,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2687,7 +2689,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2705,7 +2707,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); @@ -2738,7 +2740,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); @@ -2793,7 +2795,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); @@ -2825,7 +2827,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateAssetRequest() ); @@ -2859,7 +2861,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2881,7 +2883,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2899,7 +2901,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); @@ -2931,7 +2933,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); @@ -2985,7 +2987,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); @@ -3016,7 +3018,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteAssetRequest() ); @@ -3049,7 +3051,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3071,7 +3073,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3089,7 +3091,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); @@ -3121,7 +3123,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); @@ -3175,7 +3177,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); @@ -3206,7 +3208,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateTaskRequest() ); @@ -3239,7 +3241,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3261,7 +3263,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3279,7 +3281,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); @@ -3312,7 +3314,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); @@ -3367,7 +3369,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); @@ -3399,7 +3401,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateTaskRequest() ); @@ -3433,7 +3435,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3455,7 +3457,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3473,7 +3475,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); @@ -3505,7 +3507,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); @@ -3559,7 +3561,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); @@ -3590,7 +3592,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteTaskRequest() ); @@ -3623,7 +3625,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3645,7 +3647,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3663,7 +3665,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); @@ -3696,7 +3698,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); @@ -3750,7 +3752,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); @@ -3781,7 +3783,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() ); @@ -3814,7 +3816,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3836,7 +3838,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3857,7 +3859,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); @@ -3891,7 +3893,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); @@ -3946,7 +3948,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); @@ -3978,7 +3980,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() ); @@ -4012,7 +4014,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4034,7 +4036,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4055,7 +4057,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); @@ -4088,7 +4090,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); @@ -4142,7 +4144,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); @@ -4173,7 +4175,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() ); @@ -4206,7 +4208,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4228,7 +4230,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4249,7 +4251,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); @@ -4282,7 +4284,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); @@ -4331,7 +4333,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); @@ -4359,7 +4361,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); @@ -4410,7 +4412,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); @@ -4458,7 +4460,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); @@ -4500,7 +4502,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakesRequest() ); @@ -4543,7 +4545,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); @@ -4576,7 +4578,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); @@ -4625,7 +4627,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); @@ -4656,7 +4658,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); @@ -4710,7 +4712,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); @@ -4759,7 +4761,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); @@ -4802,7 +4804,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() ); @@ -4844,7 +4846,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); @@ -4877,7 +4879,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); @@ -4926,7 +4928,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); @@ -4954,7 +4956,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); @@ -5005,7 +5007,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); @@ -5053,7 +5055,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); @@ -5095,7 +5097,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZonesRequest() ); @@ -5138,7 +5140,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); @@ -5171,7 +5173,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); @@ -5220,7 +5222,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); @@ -5251,7 +5253,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); @@ -5305,7 +5307,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); @@ -5354,7 +5356,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); @@ -5397,7 +5399,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() ); @@ -5439,7 +5441,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); @@ -5472,7 +5474,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); @@ -5521,7 +5523,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); @@ -5552,7 +5554,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); @@ -5603,7 +5605,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); @@ -5651,7 +5653,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); @@ -5694,7 +5696,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetsRequest() ); @@ -5738,7 +5740,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); @@ -5771,7 +5773,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); @@ -5820,7 +5822,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); @@ -5851,7 +5853,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); @@ -5905,7 +5907,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); @@ -5954,7 +5956,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); @@ -5997,7 +5999,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() ); @@ -6039,7 +6041,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); @@ -6072,7 +6074,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); @@ -6121,7 +6123,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); @@ -6149,7 +6151,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); @@ -6200,7 +6202,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); @@ -6248,7 +6250,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); @@ -6290,7 +6292,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListTasksRequest() ); @@ -6333,7 +6335,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); @@ -6366,7 +6368,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); @@ -6415,7 +6417,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); @@ -6443,7 +6445,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); @@ -6494,7 +6496,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); @@ -6542,7 +6544,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); @@ -6584,7 +6586,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListJobsRequest() ); @@ -6627,7 +6629,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); @@ -6666,7 +6668,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); @@ -6721,7 +6723,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); @@ -6752,7 +6754,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); @@ -6812,7 +6814,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); @@ -6861,7 +6863,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); @@ -6910,7 +6912,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() ); @@ -6952,7 +6954,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); @@ -6985,7 +6987,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); @@ -7034,7 +7036,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); @@ -7065,7 +7067,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); @@ -7119,7 +7121,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); @@ -7170,7 +7172,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); @@ -7213,7 +7215,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListSessionsRequest() ); @@ -7254,7 +7256,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7284,7 +7286,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7328,7 +7330,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7363,7 +7365,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7411,7 +7413,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7452,7 +7454,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7531,7 +7533,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7611,7 +7613,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7707,8 +7709,7 @@ describe('v1.DataplexServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7727,7 +7728,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7736,8 +7737,7 @@ describe('v1.DataplexServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -7753,7 +7753,7 @@ describe('v1.DataplexServiceClient', () => { }); describe('Path templates', () => { - describe('aspectType', () => { + describe('aspectType', async () => { const fakePath = '/rendered/path/aspectType'; const expectedParameters = { project: 'projectValue', @@ -7764,7 +7764,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aspectTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7817,7 +7817,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { project: 'projectValue', @@ -7830,7 +7830,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7905,7 +7905,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('content', () => { + describe('content', async () => { const fakePath = '/rendered/path/content'; const expectedParameters = { project: 'projectValue', @@ -7917,7 +7917,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7981,7 +7981,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('dataAttribute', () => { + describe('dataAttribute', async () => { const fakePath = '/rendered/path/dataAttribute'; const expectedParameters = { project: 'projectValue', @@ -7993,7 +7993,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8058,7 +8058,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('dataAttributeBinding', () => { + describe('dataAttributeBinding', async () => { const fakePath = '/rendered/path/dataAttributeBinding'; const expectedParameters = { project: 'projectValue', @@ -8069,7 +8069,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributeBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8139,7 +8139,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('dataScan', () => { + describe('dataScan', async () => { const fakePath = '/rendered/path/dataScan'; const expectedParameters = { project: 'projectValue', @@ -8150,7 +8150,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8203,7 +8203,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('dataScanJob', () => { + describe('dataScanJob', async () => { const fakePath = '/rendered/path/dataScanJob'; const expectedParameters = { project: 'projectValue', @@ -8215,7 +8215,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8279,7 +8279,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('dataTaxonomy', () => { + describe('dataTaxonomy', async () => { const fakePath = '/rendered/path/dataTaxonomy'; const expectedParameters = { project: 'projectValue', @@ -8290,7 +8290,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataTaxonomyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8343,7 +8343,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('entity', () => { + describe('entity', async () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { project: 'projectValue', @@ -8356,7 +8356,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8431,7 +8431,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -8443,7 +8443,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8507,7 +8507,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -8518,7 +8518,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8571,7 +8571,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('entryType', () => { + describe('entryType', async () => { const fakePath = '/rendered/path/entryType'; const expectedParameters = { project: 'projectValue', @@ -8582,7 +8582,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8635,7 +8635,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -8647,7 +8647,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8711,7 +8711,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -8724,7 +8724,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8799,7 +8799,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('lake', () => { + describe('lake', async () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { project: 'projectValue', @@ -8810,7 +8810,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lakePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8863,7 +8863,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8873,7 +8873,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8912,7 +8912,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('metadataJob', () => { + describe('metadataJob', async () => { const fakePath = '/rendered/path/metadataJob'; const expectedParameters = { project: 'projectValue', @@ -8923,7 +8923,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8976,7 +8976,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('partition', () => { + describe('partition', async () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { project: 'projectValue', @@ -8990,7 +8990,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.partitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9076,7 +9076,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('projectLocationLakeAction', () => { + describe('projectLocationLakeAction', async () => { const fakePath = '/rendered/path/projectLocationLakeAction'; const expectedParameters = { project: 'projectValue', @@ -9088,7 +9088,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9171,7 +9171,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('projectLocationLakeZoneAction', () => { + describe('projectLocationLakeZoneAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAction'; const expectedParameters = { project: 'projectValue', @@ -9184,7 +9184,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = @@ -9280,7 +9280,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('projectLocationLakeZoneAssetAction', () => { + describe('projectLocationLakeZoneAssetAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; const expectedParameters = { project: 'projectValue', @@ -9294,7 +9294,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = @@ -9411,7 +9411,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -9424,7 +9424,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9499,7 +9499,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -9511,7 +9511,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9575,7 +9575,7 @@ describe('v1.DataplexServiceClient', () => { }); }); - describe('zone', () => { + describe('zone', async () => { const fakePath = '/rendered/path/zone'; const expectedParameters = { project: 'projectValue', @@ -9587,7 +9587,7 @@ describe('v1.DataplexServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.zonePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index 420ed7a6298..a8c8e00f1bc 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -252,7 +252,9 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.metadataServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); @@ -342,7 +344,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); @@ -389,7 +391,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); @@ -420,7 +422,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreateEntityRequest() ); @@ -441,7 +443,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); @@ -473,7 +475,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); @@ -521,7 +523,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); @@ -553,7 +555,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.UpdateEntityRequest() ); @@ -575,7 +577,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); @@ -606,7 +608,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); @@ -653,7 +655,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); @@ -684,7 +686,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeleteEntityRequest() ); @@ -705,7 +707,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); @@ -736,7 +738,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); @@ -783,7 +785,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); @@ -811,7 +813,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetEntityRequest() ); @@ -832,7 +834,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); @@ -863,7 +865,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); @@ -910,7 +912,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); @@ -941,7 +943,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.CreatePartitionRequest() ); @@ -962,7 +964,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); @@ -993,7 +995,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); @@ -1040,7 +1042,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.DeletePartitionRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); @@ -1170,7 +1172,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); @@ -1201,7 +1203,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.GetPartitionRequest() ); @@ -1222,7 +1224,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); @@ -1255,7 +1257,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); @@ -1304,7 +1306,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); @@ -1335,7 +1337,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); @@ -1440,7 +1442,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); @@ -1483,7 +1485,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListEntitiesRequest() ); @@ -1525,7 +1527,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); @@ -1558,7 +1560,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); @@ -1607,7 +1609,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); @@ -1638,7 +1640,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); @@ -1692,7 +1694,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); @@ -1784,7 +1786,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataplex.v1.ListPartitionsRequest() ); @@ -1825,7 +1827,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1855,7 +1857,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1899,7 +1901,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1934,7 +1936,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1982,7 +1984,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2023,7 +2025,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2102,7 +2104,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2182,7 +2184,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2278,8 +2280,7 @@ describe('v1.MetadataServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2298,7 +2299,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2307,8 +2308,7 @@ describe('v1.MetadataServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2324,7 +2324,7 @@ describe('v1.MetadataServiceClient', () => { }); describe('Path templates', () => { - describe('aspectType', () => { + describe('aspectType', async () => { const fakePath = '/rendered/path/aspectType'; const expectedParameters = { project: 'projectValue', @@ -2335,7 +2335,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aspectTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2388,7 +2388,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { project: 'projectValue', @@ -2401,7 +2401,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2476,7 +2476,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('content', () => { + describe('content', async () => { const fakePath = '/rendered/path/content'; const expectedParameters = { project: 'projectValue', @@ -2488,7 +2488,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.contentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2552,7 +2552,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('dataAttribute', () => { + describe('dataAttribute', async () => { const fakePath = '/rendered/path/dataAttribute'; const expectedParameters = { project: 'projectValue', @@ -2564,7 +2564,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2629,7 +2629,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('dataAttributeBinding', () => { + describe('dataAttributeBinding', async () => { const fakePath = '/rendered/path/dataAttributeBinding'; const expectedParameters = { project: 'projectValue', @@ -2640,7 +2640,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataAttributeBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2710,7 +2710,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('dataScan', () => { + describe('dataScan', async () => { const fakePath = '/rendered/path/dataScan'; const expectedParameters = { project: 'projectValue', @@ -2721,7 +2721,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2774,7 +2774,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('dataScanJob', () => { + describe('dataScanJob', async () => { const fakePath = '/rendered/path/dataScanJob'; const expectedParameters = { project: 'projectValue', @@ -2786,7 +2786,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataScanJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2850,7 +2850,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('dataTaxonomy', () => { + describe('dataTaxonomy', async () => { const fakePath = '/rendered/path/dataTaxonomy'; const expectedParameters = { project: 'projectValue', @@ -2861,7 +2861,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dataTaxonomyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2914,7 +2914,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('entity', () => { + describe('entity', async () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { project: 'projectValue', @@ -2927,7 +2927,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3002,7 +3002,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('entry', () => { + describe('entry', async () => { const fakePath = '/rendered/path/entry'; const expectedParameters = { project: 'projectValue', @@ -3014,7 +3014,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3078,7 +3078,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('entryGroup', () => { + describe('entryGroup', async () => { const fakePath = '/rendered/path/entryGroup'; const expectedParameters = { project: 'projectValue', @@ -3089,7 +3089,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3142,7 +3142,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('entryType', () => { + describe('entryType', async () => { const fakePath = '/rendered/path/entryType'; const expectedParameters = { project: 'projectValue', @@ -3153,7 +3153,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entryTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3206,7 +3206,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3218,7 +3218,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3282,7 +3282,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -3295,7 +3295,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3370,7 +3370,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('lake', () => { + describe('lake', async () => { const fakePath = '/rendered/path/lake'; const expectedParameters = { project: 'projectValue', @@ -3381,7 +3381,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lakePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3434,7 +3434,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('metadataJob', () => { + describe('metadataJob', async () => { const fakePath = '/rendered/path/metadataJob'; const expectedParameters = { project: 'projectValue', @@ -3445,7 +3445,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.metadataJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3498,7 +3498,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('partition', () => { + describe('partition', async () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { project: 'projectValue', @@ -3512,7 +3512,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.partitionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3598,7 +3598,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('projectLocationLakeAction', () => { + describe('projectLocationLakeAction', async () => { const fakePath = '/rendered/path/projectLocationLakeAction'; const expectedParameters = { project: 'projectValue', @@ -3610,7 +3610,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3693,7 +3693,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('projectLocationLakeZoneAction', () => { + describe('projectLocationLakeZoneAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAction'; const expectedParameters = { project: 'projectValue', @@ -3706,7 +3706,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = @@ -3802,7 +3802,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('projectLocationLakeZoneAssetAction', () => { + describe('projectLocationLakeZoneAssetAction', async () => { const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; const expectedParameters = { project: 'projectValue', @@ -3816,7 +3816,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = @@ -3933,7 +3933,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -3946,7 +3946,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4021,7 +4021,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('task', () => { + describe('task', async () => { const fakePath = '/rendered/path/task'; const expectedParameters = { project: 'projectValue', @@ -4033,7 +4033,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.taskPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4097,7 +4097,7 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('zone', () => { + describe('zone', async () => { const fakePath = '/rendered/path/zone'; const expectedParameters = { project: 'projectValue', @@ -4109,7 +4109,7 @@ describe('v1.MetadataServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.zonePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/package.json b/packages/google-cloud-dataproc/package.json index 88119428391..4045920e97f 100644 --- a/packages/google-cloud-dataproc/package.json +++ b/packages/google-cloud-dataproc/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json index 5596ad0d432..06cc4ba4c48 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json index 2057766223a..93fd26db345 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "5.13.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts b/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts index 9ae8683460e..c996de254b5 100644 --- a/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts +++ b/packages/google-cloud-dataproc/src/v1/autoscaling_policy_service_client.ts @@ -529,7 +529,9 @@ export class AutoscalingPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAutoscalingPolicy request %j', request); const wrappedCallback: | Callback< @@ -657,7 +659,9 @@ export class AutoscalingPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ 'policy.name': request.policy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAutoscalingPolicy request %j', request); const wrappedCallback: | Callback< @@ -785,7 +789,9 @@ export class AutoscalingPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAutoscalingPolicy request %j', request); const wrappedCallback: | Callback< @@ -920,7 +926,9 @@ export class AutoscalingPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAutoscalingPolicy request %j', request); const wrappedCallback: | Callback< @@ -1058,7 +1066,9 @@ export class AutoscalingPolicyServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataproc.v1.IListAutoscalingPoliciesRequest, @@ -1134,7 +1144,9 @@ export class AutoscalingPolicyServiceClient { }); const defaultCallSettings = this._defaults['listAutoscalingPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutoscalingPolicies stream %j', request); return this.descriptors.page.listAutoscalingPolicies.createStream( this.innerApiCalls.listAutoscalingPolicies as GaxCall, @@ -1192,7 +1204,9 @@ export class AutoscalingPolicyServiceClient { }); const defaultCallSettings = this._defaults['listAutoscalingPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutoscalingPolicies iterate %j', request); return this.descriptors.page.listAutoscalingPolicies.asyncIterate( this.innerApiCalls['listAutoscalingPolicies'] as GaxCall, diff --git a/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts b/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts index 16f583ca01a..48478e1db02 100644 --- a/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/batch_controller_client.ts @@ -660,7 +660,9 @@ export class BatchControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBatch request %j', request); const wrappedCallback: | Callback< @@ -771,7 +773,9 @@ export class BatchControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBatch request %j', request); const wrappedCallback: | Callback< @@ -920,7 +924,9 @@ export class BatchControllerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1099,7 +1105,9 @@ export class BatchControllerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataproc.v1.IListBatchesRequest, @@ -1187,7 +1195,9 @@ export class BatchControllerClient { }); const defaultCallSettings = this._defaults['listBatches']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBatches stream %j', request); return this.descriptors.page.listBatches.createStream( this.innerApiCalls.listBatches as GaxCall, @@ -1257,7 +1267,9 @@ export class BatchControllerClient { }); const defaultCallSettings = this._defaults['listBatches']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBatches iterate %j', request); return this.descriptors.page.listBatches.asyncIterate( this.innerApiCalls['listBatches'] as GaxCall, @@ -1497,7 +1509,7 @@ export class BatchControllerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts b/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts index f1758629c69..ae5d08a2737 100644 --- a/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/cluster_controller_client.ts @@ -725,7 +725,9 @@ export class ClusterControllerClient { region: request.region ?? '', cluster_name: request.clusterName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -875,7 +877,9 @@ export class ClusterControllerClient { project_id: request.projectId ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1131,7 +1135,9 @@ export class ClusterControllerClient { region: request.region ?? '', cluster_name: request.clusterName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1321,7 +1327,9 @@ export class ClusterControllerClient { region: request.region ?? '', cluster_name: request.clusterName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1511,7 +1519,9 @@ export class ClusterControllerClient { region: request.region ?? '', cluster_name: request.clusterName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1703,7 +1713,9 @@ export class ClusterControllerClient { region: request.region ?? '', cluster_name: request.clusterName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1899,7 +1911,9 @@ export class ClusterControllerClient { region: request.region ?? '', cluster_name: request.clusterName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2079,7 +2093,9 @@ export class ClusterControllerClient { project_id: request.projectId ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataproc.v1.IListClustersRequest, @@ -2168,7 +2184,9 @@ export class ClusterControllerClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -2239,7 +2257,9 @@ export class ClusterControllerClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -2479,7 +2499,7 @@ export class ClusterControllerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataproc/src/v1/job_controller_client.ts b/packages/google-cloud-dataproc/src/v1/job_controller_client.ts index 49bad6cbf65..3e01e8b1b02 100644 --- a/packages/google-cloud-dataproc/src/v1/job_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/job_controller_client.ts @@ -674,7 +674,9 @@ export class JobControllerClient { project_id: request.projectId ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('submitJob request %j', request); const wrappedCallback: | Callback< @@ -787,7 +789,9 @@ export class JobControllerClient { region: request.region ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -909,7 +913,9 @@ export class JobControllerClient { region: request.region ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJob request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1032,9 @@ export class JobControllerClient { region: request.region ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelJob request %j', request); const wrappedCallback: | Callback< @@ -1140,7 +1148,9 @@ export class JobControllerClient { region: request.region ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJob request %j', request); const wrappedCallback: | Callback< @@ -1286,7 +1296,9 @@ export class JobControllerClient { project_id: request.projectId ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1468,7 +1480,9 @@ export class JobControllerClient { project_id: request.projectId ?? '', region: request.region ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataproc.v1.IListJobsRequest, @@ -1559,7 +1573,9 @@ export class JobControllerClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -1634,7 +1650,9 @@ export class JobControllerClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -1874,7 +1892,7 @@ export class JobControllerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts b/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts index 8e5dc44c36a..0e4bebecc29 100644 --- a/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/node_group_controller_client.ts @@ -661,7 +661,9 @@ export class NodeGroupControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNodeGroup request %j', request); const wrappedCallback: | Callback< @@ -814,7 +816,9 @@ export class NodeGroupControllerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1015,7 +1019,9 @@ export class NodeGroupControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1315,7 +1321,7 @@ export class NodeGroupControllerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataproc/src/v1/session_controller_client.ts b/packages/google-cloud-dataproc/src/v1/session_controller_client.ts index b85a2f5c08a..1ff294fa1d0 100644 --- a/packages/google-cloud-dataproc/src/v1/session_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/session_controller_client.ts @@ -681,7 +681,9 @@ export class SessionControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSession request %j', request); const wrappedCallback: | Callback< @@ -829,7 +831,9 @@ export class SessionControllerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1007,7 +1011,9 @@ export class SessionControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1186,7 +1192,9 @@ export class SessionControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1360,7 +1368,9 @@ export class SessionControllerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataproc.v1.IListSessionsRequest, @@ -1443,7 +1453,9 @@ export class SessionControllerClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions stream %j', request); return this.descriptors.page.listSessions.createStream( this.innerApiCalls.listSessions as GaxCall, @@ -1508,7 +1520,9 @@ export class SessionControllerClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions iterate %j', request); return this.descriptors.page.listSessions.asyncIterate( this.innerApiCalls['listSessions'] as GaxCall, @@ -1748,7 +1762,7 @@ export class SessionControllerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataproc/src/v1/session_template_controller_client.ts b/packages/google-cloud-dataproc/src/v1/session_template_controller_client.ts index d24151c7161..c426a8ccbb9 100644 --- a/packages/google-cloud-dataproc/src/v1/session_template_controller_client.ts +++ b/packages/google-cloud-dataproc/src/v1/session_template_controller_client.ts @@ -513,7 +513,9 @@ export class SessionTemplateControllerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSessionTemplate request %j', request); const wrappedCallback: | Callback< @@ -632,7 +634,9 @@ export class SessionTemplateControllerClient { this._gaxModule.routingHeader.fromParams({ 'session_template.name': request.sessionTemplate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSessionTemplate request %j', request); const wrappedCallback: | Callback< @@ -751,7 +755,9 @@ export class SessionTemplateControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSessionTemplate request %j', request); const wrappedCallback: | Callback< @@ -870,7 +876,9 @@ export class SessionTemplateControllerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSessionTemplate request %j', request); const wrappedCallback: | Callback< @@ -1004,7 +1012,9 @@ export class SessionTemplateControllerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataproc.v1.IListSessionTemplatesRequest, @@ -1076,7 +1086,9 @@ export class SessionTemplateControllerClient { }); const defaultCallSettings = this._defaults['listSessionTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionTemplates stream %j', request); return this.descriptors.page.listSessionTemplates.createStream( this.innerApiCalls.listSessionTemplates as GaxCall, @@ -1130,7 +1142,9 @@ export class SessionTemplateControllerClient { }); const defaultCallSettings = this._defaults['listSessionTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionTemplates iterate %j', request); return this.descriptors.page.listSessionTemplates.asyncIterate( this.innerApiCalls['listSessionTemplates'] as GaxCall, diff --git a/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts b/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts index 2f2ef267b7a..e9055a7aff5 100644 --- a/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts +++ b/packages/google-cloud-dataproc/src/v1/workflow_template_service_client.ts @@ -709,7 +709,9 @@ export class WorkflowTemplateServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createWorkflowTemplate request %j', request); const wrappedCallback: | Callback< @@ -845,7 +847,9 @@ export class WorkflowTemplateServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkflowTemplate request %j', request); const wrappedCallback: | Callback< @@ -973,7 +977,9 @@ export class WorkflowTemplateServiceClient { this._gaxModule.routingHeader.fromParams({ 'template.name': request.template!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateWorkflowTemplate request %j', request); const wrappedCallback: | Callback< @@ -1111,7 +1117,9 @@ export class WorkflowTemplateServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWorkflowTemplate request %j', request); const wrappedCallback: | Callback< @@ -1291,7 +1299,9 @@ export class WorkflowTemplateServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1509,7 +1519,9 @@ export class WorkflowTemplateServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1687,7 +1699,9 @@ export class WorkflowTemplateServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dataproc.v1.IListWorkflowTemplatesRequest, @@ -1762,7 +1776,9 @@ export class WorkflowTemplateServiceClient { }); const defaultCallSettings = this._defaults['listWorkflowTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkflowTemplates stream %j', request); return this.descriptors.page.listWorkflowTemplates.createStream( this.innerApiCalls.listWorkflowTemplates as GaxCall, @@ -1819,7 +1835,9 @@ export class WorkflowTemplateServiceClient { }); const defaultCallSettings = this._defaults['listWorkflowTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkflowTemplates iterate %j', request); return this.descriptors.page.listWorkflowTemplates.asyncIterate( this.innerApiCalls['listWorkflowTemplates'] as GaxCall, @@ -2059,7 +2077,7 @@ export class WorkflowTemplateServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts b/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts index d276ae29f6f..d66a6dfca79 100644 --- a/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_autoscaling_policy_service_v1.ts @@ -265,7 +265,9 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autoscalingPolicyServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest() ); @@ -361,7 +363,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest() ); @@ -409,7 +411,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest() ); @@ -444,7 +446,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest() ); @@ -469,7 +471,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest() ); @@ -503,7 +505,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest() ); @@ -552,7 +554,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest() ); @@ -588,7 +590,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest() ); @@ -614,7 +616,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest() ); @@ -647,7 +649,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest() ); @@ -695,7 +697,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest() ); @@ -727,7 +729,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest() ); @@ -749,7 +751,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest() ); @@ -782,7 +784,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest() ); @@ -830,7 +832,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest() ); @@ -865,7 +867,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest() ); @@ -890,7 +892,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest() ); @@ -931,7 +933,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest() ); @@ -987,7 +989,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest() ); @@ -1022,7 +1024,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest() ); @@ -1090,7 +1092,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest() ); @@ -1147,7 +1149,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest() ); @@ -1249,7 +1251,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1325,7 +1327,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1434,7 +1436,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1467,7 +1469,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1501,7 +1503,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1546,7 +1548,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1577,7 +1579,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -1589,7 +1591,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1642,7 +1644,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1653,7 +1655,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1692,7 +1694,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -1705,7 +1707,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1769,7 +1771,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1779,7 +1781,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1808,7 +1810,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -1820,7 +1822,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -1890,7 +1892,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -1902,7 +1904,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -1970,7 +1972,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -1982,7 +1984,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -2050,7 +2052,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2062,7 +2064,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -2130,7 +2132,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -2142,7 +2144,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2195,7 +2197,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -2207,7 +2209,7 @@ describe('v1.AutoscalingPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts index 1fd2a82270d..ff476992ade 100644 --- a/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_batch_controller_v1.ts @@ -284,7 +284,9 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.batchControllerStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetBatchRequest() ); @@ -374,7 +376,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetBatchRequest() ); @@ -421,7 +423,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetBatchRequest() ); @@ -449,7 +451,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetBatchRequest() ); @@ -470,7 +472,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteBatchRequest() ); @@ -501,7 +503,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteBatchRequest() ); @@ -548,7 +550,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteBatchRequest() ); @@ -579,7 +581,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteBatchRequest() ); @@ -600,7 +602,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateBatchRequest() ); @@ -632,7 +634,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateBatchRequest() ); @@ -686,7 +688,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateBatchRequest() ); @@ -717,7 +719,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateBatchRequest() ); @@ -750,7 +752,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -772,7 +774,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -790,7 +792,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListBatchesRequest() ); @@ -823,7 +825,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListBatchesRequest() ); @@ -872,7 +874,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListBatchesRequest() ); @@ -903,7 +905,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListBatchesRequest() ); @@ -954,7 +956,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListBatchesRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListBatchesRequest() ); @@ -1045,7 +1047,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListBatchesRequest() ); @@ -1088,7 +1090,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1162,7 +1164,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1194,7 +1196,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1224,7 +1226,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1268,7 +1270,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1300,7 +1302,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1333,7 +1335,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1377,7 +1379,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1412,7 +1414,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1491,7 +1493,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1571,7 +1573,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1667,8 +1669,7 @@ describe('v1.BatchControllerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1687,7 +1688,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1696,8 +1697,7 @@ describe('v1.BatchControllerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1713,7 +1713,7 @@ describe('v1.BatchControllerClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -1724,7 +1724,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1777,7 +1777,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1787,7 +1787,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1826,7 +1826,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -1838,7 +1838,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1902,7 +1902,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1911,7 +1911,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1940,7 +1940,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -1951,7 +1951,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -2021,7 +2021,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2032,7 +2032,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -2100,7 +2100,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -2111,7 +2111,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -2179,7 +2179,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2190,7 +2190,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -2258,7 +2258,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -2269,7 +2269,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2322,7 +2322,7 @@ describe('v1.BatchControllerClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -2333,7 +2333,7 @@ describe('v1.BatchControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts index 9e0e0c32403..23d49d73916 100644 --- a/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_cluster_controller_v1.ts @@ -285,7 +285,9 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.clusterControllerStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetClusterRequest() ); @@ -385,7 +387,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetClusterRequest() ); @@ -442,7 +444,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetClusterRequest() ); @@ -483,7 +485,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetClusterRequest() ); @@ -514,7 +516,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateClusterRequest() ); @@ -552,7 +554,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateClusterRequest() ); @@ -611,7 +613,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateClusterRequest() ); @@ -647,7 +649,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateClusterRequest() ); @@ -685,7 +687,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -707,7 +709,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -728,7 +730,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateClusterRequest() ); @@ -771,7 +773,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateClusterRequest() ); @@ -835,7 +837,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateClusterRequest() ); @@ -876,7 +878,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateClusterRequest() ); @@ -919,7 +921,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -941,7 +943,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -962,7 +964,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StopClusterRequest() ); @@ -1004,7 +1006,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StopClusterRequest() ); @@ -1068,7 +1070,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StopClusterRequest() ); @@ -1109,7 +1111,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StopClusterRequest() ); @@ -1152,7 +1154,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1174,7 +1176,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1192,7 +1194,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StartClusterRequest() ); @@ -1234,7 +1236,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StartClusterRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StartClusterRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.StartClusterRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1404,7 +1406,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1422,7 +1424,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteClusterRequest() ); @@ -1465,7 +1467,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteClusterRequest() ); @@ -1529,7 +1531,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteClusterRequest() ); @@ -1570,7 +1572,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteClusterRequest() ); @@ -1613,7 +1615,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1635,7 +1637,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1656,7 +1658,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DiagnoseClusterRequest() ); @@ -1699,7 +1701,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DiagnoseClusterRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DiagnoseClusterRequest() ); @@ -1804,7 +1806,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DiagnoseClusterRequest() ); @@ -1847,7 +1849,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1869,7 +1871,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1890,7 +1892,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListClustersRequest() ); @@ -1928,7 +1930,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListClustersRequest() ); @@ -1982,7 +1984,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListClustersRequest() ); @@ -2018,7 +2020,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListClustersRequest() ); @@ -2077,7 +2079,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListClustersRequest() ); @@ -2133,7 +2135,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListClustersRequest() ); @@ -2181,7 +2183,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListClustersRequest() ); @@ -2227,7 +2229,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2257,7 +2259,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2301,7 +2303,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2333,7 +2335,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2363,7 +2365,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2407,7 +2409,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2439,7 +2441,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2472,7 +2474,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2516,7 +2518,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2551,7 +2553,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2630,7 +2632,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2710,7 +2712,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2806,8 +2808,7 @@ describe('v1.ClusterControllerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2826,7 +2827,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2835,8 +2836,7 @@ describe('v1.ClusterControllerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2852,7 +2852,7 @@ describe('v1.ClusterControllerClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -2863,7 +2863,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2916,7 +2916,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -2928,7 +2928,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2992,7 +2992,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -3004,7 +3004,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3068,7 +3068,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -3079,7 +3079,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -3149,7 +3149,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -3160,7 +3160,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -3228,7 +3228,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -3239,7 +3239,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -3307,7 +3307,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -3318,7 +3318,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -3386,7 +3386,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -3397,7 +3397,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3450,7 +3450,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -3461,7 +3461,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3514,7 +3514,7 @@ describe('v1.ClusterControllerClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -3525,7 +3525,7 @@ describe('v1.ClusterControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts index 34db021146a..595659d6113 100644 --- a/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_job_controller_v1.ts @@ -284,7 +284,9 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.jobControllerStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -379,7 +381,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -431,7 +433,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -464,7 +466,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -490,7 +492,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetJobRequest() ); @@ -531,7 +533,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetJobRequest() ); @@ -588,7 +590,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetJobRequest() ); @@ -626,7 +628,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetJobRequest() ); @@ -657,7 +659,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateJobRequest() ); @@ -698,7 +700,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateJobRequest() ); @@ -755,7 +757,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateJobRequest() ); @@ -793,7 +795,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateJobRequest() ); @@ -824,7 +826,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CancelJobRequest() ); @@ -865,7 +867,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CancelJobRequest() ); @@ -922,7 +924,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CancelJobRequest() ); @@ -960,7 +962,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CancelJobRequest() ); @@ -991,7 +993,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteJobRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteJobRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteJobRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteJobRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -1196,7 +1198,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -1255,7 +1257,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -1291,7 +1293,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.SubmitJobRequest() ); @@ -1329,7 +1331,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1351,7 +1353,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1372,7 +1374,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListJobsRequest() ); @@ -1410,7 +1412,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListJobsRequest() ); @@ -1464,7 +1466,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListJobsRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListJobsRequest() ); @@ -1553,7 +1555,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListJobsRequest() ); @@ -1606,7 +1608,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListJobsRequest() ); @@ -1653,7 +1655,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListJobsRequest() ); @@ -1700,7 +1702,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1730,7 +1732,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1774,7 +1776,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1806,7 +1808,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1836,7 +1838,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1880,7 +1882,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1912,7 +1914,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1945,7 +1947,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1989,7 +1991,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2024,7 +2026,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2103,7 +2105,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2183,7 +2185,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2279,8 +2281,7 @@ describe('v1.JobControllerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2299,7 +2300,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2308,8 +2309,7 @@ describe('v1.JobControllerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2325,7 +2325,7 @@ describe('v1.JobControllerClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -2336,7 +2336,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2389,7 +2389,7 @@ describe('v1.JobControllerClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -2401,7 +2401,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2465,7 +2465,7 @@ describe('v1.JobControllerClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -2476,7 +2476,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -2546,7 +2546,7 @@ describe('v1.JobControllerClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2557,7 +2557,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -2625,7 +2625,7 @@ describe('v1.JobControllerClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -2636,7 +2636,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -2704,7 +2704,7 @@ describe('v1.JobControllerClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2715,7 +2715,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -2783,7 +2783,7 @@ describe('v1.JobControllerClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -2794,7 +2794,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2847,7 +2847,7 @@ describe('v1.JobControllerClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -2858,7 +2858,7 @@ describe('v1.JobControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts index 8bf3b455a06..8d8f2133f36 100644 --- a/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_node_group_controller_v1.ts @@ -255,7 +255,9 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.nodeGroupControllerStub); client.close().then(() => { done(); @@ -322,7 +324,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetNodeGroupRequest() ); @@ -355,7 +357,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetNodeGroupRequest() ); @@ -404,7 +406,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetNodeGroupRequest() ); @@ -437,7 +439,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetNodeGroupRequest() ); @@ -460,7 +462,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateNodeGroupRequest() ); @@ -495,7 +497,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateNodeGroupRequest() ); @@ -551,7 +553,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateNodeGroupRequest() ); @@ -584,7 +586,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateNodeGroupRequest() ); @@ -619,7 +621,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -643,7 +645,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -666,7 +668,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ResizeNodeGroupRequest() ); @@ -701,7 +703,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ResizeNodeGroupRequest() ); @@ -757,7 +759,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ResizeNodeGroupRequest() ); @@ -790,7 +792,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ResizeNodeGroupRequest() ); @@ -825,7 +827,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -849,7 +851,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -871,7 +873,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -903,7 +905,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -949,7 +951,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -983,7 +985,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1015,7 +1017,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1061,7 +1063,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1176,7 +1178,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1486,8 +1488,7 @@ describe('v1.NodeGroupControllerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1508,7 +1509,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1517,8 +1518,7 @@ describe('v1.NodeGroupControllerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1534,7 +1534,7 @@ describe('v1.NodeGroupControllerClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -1547,7 +1547,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1600,7 +1600,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('clusterRegion', () => { + describe('clusterRegion', async () => { const fakePath = '/rendered/path/clusterRegion'; const expectedParameters = { project: 'projectValue', @@ -1613,7 +1613,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterRegionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1666,7 +1666,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -1680,7 +1680,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1744,7 +1744,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1755,7 +1755,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1784,7 +1784,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -1797,7 +1797,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -1867,7 +1867,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -1880,7 +1880,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -1948,7 +1948,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -1961,7 +1961,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -2029,7 +2029,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2042,7 +2042,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -2110,7 +2110,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { project: 'projectValue', @@ -2122,7 +2122,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2161,7 +2161,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -2174,7 +2174,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2227,7 +2227,7 @@ describe('v1.NodeGroupControllerClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -2240,7 +2240,7 @@ describe('v1.NodeGroupControllerClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/test/gapic_session_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_session_controller_v1.ts index c2a5241079b..4da31675e9c 100644 --- a/packages/google-cloud-dataproc/test/gapic_session_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_session_controller_v1.ts @@ -285,7 +285,9 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionControllerStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionRequest() ); @@ -375,7 +377,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionRequest() ); @@ -422,7 +424,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionRequest() ); @@ -453,7 +455,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionRequest() ); @@ -474,7 +476,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionRequest() ); @@ -507,7 +509,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionRequest() ); @@ -561,7 +563,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionRequest() ); @@ -592,7 +594,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionRequest() ); @@ -625,7 +627,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -647,7 +649,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -668,7 +670,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.TerminateSessionRequest() ); @@ -701,7 +703,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.TerminateSessionRequest() ); @@ -755,7 +757,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.TerminateSessionRequest() ); @@ -786,7 +788,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.TerminateSessionRequest() ); @@ -819,7 +821,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -841,7 +843,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -862,7 +864,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionRequest() ); @@ -895,7 +897,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionRequest() ); @@ -949,7 +951,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionRequest() ); @@ -980,7 +982,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionRequest() ); @@ -1013,7 +1015,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1035,7 +1037,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1056,7 +1058,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionsRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionsRequest() ); @@ -1138,7 +1140,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionsRequest() ); @@ -1169,7 +1171,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionsRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionsRequest() ); @@ -1274,7 +1276,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionsRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionsRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1388,7 +1390,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1432,7 +1434,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1464,7 +1466,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1494,7 +1496,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1538,7 +1540,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1570,7 +1572,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1603,7 +1605,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1647,7 +1649,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1761,7 +1763,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1841,7 +1843,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1937,8 +1939,7 @@ describe('v1.SessionControllerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1957,7 +1958,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1966,8 +1967,7 @@ describe('v1.SessionControllerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1983,7 +1983,7 @@ describe('v1.SessionControllerClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -1994,7 +1994,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2047,7 +2047,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2057,7 +2057,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2096,7 +2096,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -2108,7 +2108,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2172,7 +2172,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2181,7 +2181,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2210,7 +2210,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -2221,7 +2221,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -2291,7 +2291,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2302,7 +2302,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -2370,7 +2370,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -2381,7 +2381,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -2449,7 +2449,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2460,7 +2460,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -2528,7 +2528,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -2539,7 +2539,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2592,7 +2592,7 @@ describe('v1.SessionControllerClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -2603,7 +2603,7 @@ describe('v1.SessionControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/test/gapic_session_template_controller_v1.ts b/packages/google-cloud-dataproc/test/gapic_session_template_controller_v1.ts index e5fe71662f2..22638ab41f3 100644 --- a/packages/google-cloud-dataproc/test/gapic_session_template_controller_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_session_template_controller_v1.ts @@ -265,7 +265,9 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionTemplateControllerStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionTemplateRequest() ); @@ -361,7 +363,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionTemplateRequest() ); @@ -409,7 +411,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionTemplateRequest() ); @@ -444,7 +446,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateSessionTemplateRequest() ); @@ -469,7 +471,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateSessionTemplateRequest() ); @@ -503,7 +505,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateSessionTemplateRequest() ); @@ -552,7 +554,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateSessionTemplateRequest() ); @@ -588,7 +590,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateSessionTemplateRequest() ); @@ -614,7 +616,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionTemplateRequest() ); @@ -647,7 +649,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionTemplateRequest() ); @@ -695,7 +697,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionTemplateRequest() ); @@ -727,7 +729,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetSessionTemplateRequest() ); @@ -749,7 +751,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionTemplateRequest() ); @@ -782,7 +784,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionTemplateRequest() ); @@ -830,7 +832,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionTemplateRequest() ); @@ -865,7 +867,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteSessionTemplateRequest() ); @@ -890,7 +892,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionTemplatesRequest() ); @@ -931,7 +933,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionTemplatesRequest() ); @@ -987,7 +989,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionTemplatesRequest() ); @@ -1019,7 +1021,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionTemplatesRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionTemplatesRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionTemplatesRequest() ); @@ -1180,7 +1182,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListSessionTemplatesRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1299,7 +1301,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1332,7 +1334,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1363,7 +1365,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1408,7 +1410,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1441,7 +1443,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1475,7 +1477,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1520,7 +1522,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1551,7 +1553,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -1563,7 +1565,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1616,7 +1618,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1627,7 +1629,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1666,7 +1668,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -1679,7 +1681,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1743,7 +1745,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1753,7 +1755,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1782,7 +1784,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -1794,7 +1796,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -1864,7 +1866,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -1876,7 +1878,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -1944,7 +1946,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -1956,7 +1958,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -2024,7 +2026,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2036,7 +2038,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -2104,7 +2106,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -2116,7 +2118,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2169,7 +2171,7 @@ describe('v1.SessionTemplateControllerClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -2181,7 +2183,7 @@ describe('v1.SessionTemplateControllerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts b/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts index 9b69e27aca9..4f8018e9f25 100644 --- a/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts +++ b/packages/google-cloud-dataproc/test/gapic_workflow_template_service_v1.ts @@ -297,7 +297,9 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.workflowTemplateServiceStub); client.close().then(() => { done(); @@ -360,7 +362,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest() ); @@ -393,7 +395,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest() ); @@ -441,7 +443,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest() ); @@ -476,7 +478,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest() ); @@ -501,7 +503,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetWorkflowTemplateRequest() ); @@ -534,7 +536,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetWorkflowTemplateRequest() ); @@ -582,7 +584,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetWorkflowTemplateRequest() ); @@ -614,7 +616,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.GetWorkflowTemplateRequest() ); @@ -636,7 +638,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest() ); @@ -670,7 +672,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest() ); @@ -719,7 +721,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest() ); @@ -755,7 +757,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest() ); @@ -781,7 +783,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest() ); @@ -814,7 +816,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest() ); @@ -862,7 +864,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest() ); @@ -897,7 +899,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest() ); @@ -922,7 +924,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest() ); @@ -956,7 +958,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest() ); @@ -1011,7 +1013,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest() ); @@ -1046,7 +1048,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1104,7 +1106,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1126,7 +1128,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest() ); @@ -1161,7 +1163,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest() ); @@ -1216,7 +1218,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest() ); @@ -1249,7 +1251,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest() ); @@ -1281,7 +1283,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1305,7 +1307,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1327,7 +1329,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest() ); @@ -1459,7 +1461,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest() ); @@ -1527,7 +1529,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest() ); @@ -1584,7 +1586,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest() ); @@ -1638,7 +1640,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest() ); @@ -1685,7 +1687,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1716,7 +1718,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1761,7 +1763,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1794,7 +1796,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1825,7 +1827,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1870,7 +1872,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1903,7 +1905,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1937,7 +1939,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1982,7 +1984,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2018,7 +2020,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2100,7 +2102,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2183,7 +2185,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2282,8 +2284,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2303,7 +2304,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2312,8 +2313,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2329,7 +2329,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); describe('Path templates', () => { - describe('batch', () => { + describe('batch', async () => { const fakePath = '/rendered/path/batch'; const expectedParameters = { project: 'projectValue', @@ -2341,7 +2341,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.batchPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2394,7 +2394,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('nodeGroup', () => { + describe('nodeGroup', async () => { const fakePath = '/rendered/path/nodeGroup'; const expectedParameters = { project: 'projectValue', @@ -2407,7 +2407,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2471,7 +2471,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2481,7 +2481,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2510,7 +2510,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('projectLocationAutoscalingPolicy', () => { + describe('projectLocationAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectLocationAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -2522,7 +2522,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAutoscalingPolicyPathTemplate.match = @@ -2592,7 +2592,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('projectLocationWorkflowTemplate', () => { + describe('projectLocationWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectLocationWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2604,7 +2604,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationWorkflowTemplatePathTemplate.match = @@ -2672,7 +2672,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('projectRegionAutoscalingPolicy', () => { + describe('projectRegionAutoscalingPolicy', async () => { const fakePath = '/rendered/path/projectRegionAutoscalingPolicy'; const expectedParameters = { project: 'projectValue', @@ -2684,7 +2684,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionAutoscalingPolicyPathTemplate.match = @@ -2752,7 +2752,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('projectRegionWorkflowTemplate', () => { + describe('projectRegionWorkflowTemplate', async () => { const fakePath = '/rendered/path/projectRegionWorkflowTemplate'; const expectedParameters = { project: 'projectValue', @@ -2764,7 +2764,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectRegionWorkflowTemplatePathTemplate.match = @@ -2832,7 +2832,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('region', () => { + describe('region', async () => { const fakePath = '/rendered/path/region'; const expectedParameters = { project: 'projectValue', @@ -2843,7 +2843,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2882,7 +2882,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('session', () => { + describe('session', async () => { const fakePath = '/rendered/path/session'; const expectedParameters = { project: 'projectValue', @@ -2894,7 +2894,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2947,7 +2947,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { }); }); - describe('sessionTemplate', () => { + describe('sessionTemplate', async () => { const fakePath = '/rendered/path/sessionTemplate'; const expectedParameters = { project: 'projectValue', @@ -2959,7 +2959,7 @@ describe('v1.WorkflowTemplateServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sessionTemplatePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataqna/package.json b/packages/google-cloud-dataqna/package.json index a2875f8021c..9a9f3768685 100644 --- a/packages/google-cloud-dataqna/package.json +++ b/packages/google-cloud-dataqna/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json index e8382e0230b..989d1439361 100644 --- a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json +++ b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataqna", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json index e8382e0230b..989d1439361 100644 --- a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json +++ b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataqna", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataqna/src/v1alpha/auto_suggestion_service_client.ts b/packages/google-cloud-dataqna/src/v1alpha/auto_suggestion_service_client.ts index d57494530fd..9ee88680d48 100644 --- a/packages/google-cloud-dataqna/src/v1alpha/auto_suggestion_service_client.ts +++ b/packages/google-cloud-dataqna/src/v1alpha/auto_suggestion_service_client.ts @@ -542,7 +542,9 @@ export class AutoSuggestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestQueries request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-dataqna/src/v1alpha/question_service_client.ts b/packages/google-cloud-dataqna/src/v1alpha/question_service_client.ts index 1fac878d1da..ecf6332fc1d 100644 --- a/packages/google-cloud-dataqna/src/v1alpha/question_service_client.ts +++ b/packages/google-cloud-dataqna/src/v1alpha/question_service_client.ts @@ -481,7 +481,9 @@ export class QuestionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQuestion request %j', request); const wrappedCallback: | Callback< @@ -600,7 +602,9 @@ export class QuestionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createQuestion request %j', request); const wrappedCallback: | Callback< @@ -722,7 +726,9 @@ export class QuestionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executeQuestion request %j', request); const wrappedCallback: | Callback< @@ -843,7 +849,9 @@ export class QuestionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUserFeedback request %j', request); const wrappedCallback: | Callback< @@ -974,7 +982,9 @@ export class QuestionServiceClient { this._gaxModule.routingHeader.fromParams({ 'user_feedback.name': request.userFeedback!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUserFeedback request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-dataqna/test/gapic_auto_suggestion_service_v1alpha.ts b/packages/google-cloud-dataqna/test/gapic_auto_suggestion_service_v1alpha.ts index af85ba43d5c..76b681e46f8 100644 --- a/packages/google-cloud-dataqna/test/gapic_auto_suggestion_service_v1alpha.ts +++ b/packages/google-cloud-dataqna/test/gapic_auto_suggestion_service_v1alpha.ts @@ -202,7 +202,9 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.autoSuggestionServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.SuggestQueriesRequest() ); @@ -297,7 +299,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.SuggestQueriesRequest() ); @@ -345,7 +347,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.SuggestQueriesRequest() ); @@ -377,7 +379,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.SuggestQueriesRequest() ); @@ -393,7 +395,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -404,7 +406,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -443,7 +445,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { }); }); - describe('question', () => { + describe('question', async () => { const fakePath = '/rendered/path/question'; const expectedParameters = { project: 'projectValue', @@ -455,7 +457,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.questionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -508,7 +510,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { }); }); - describe('userFeedback', () => { + describe('userFeedback', async () => { const fakePath = '/rendered/path/userFeedback'; const expectedParameters = { project: 'projectValue', @@ -520,7 +522,7 @@ describe('v1alpha.AutoSuggestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userFeedbackPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dataqna/test/gapic_question_service_v1alpha.ts b/packages/google-cloud-dataqna/test/gapic_question_service_v1alpha.ts index 6393e2b7390..ca66e8e3291 100644 --- a/packages/google-cloud-dataqna/test/gapic_question_service_v1alpha.ts +++ b/packages/google-cloud-dataqna/test/gapic_question_service_v1alpha.ts @@ -191,7 +191,9 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.questionServiceStub); client.close().then(() => { done(); @@ -250,7 +252,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetQuestionRequest() ); @@ -281,7 +283,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetQuestionRequest() ); @@ -328,7 +330,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetQuestionRequest() ); @@ -359,7 +361,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetQuestionRequest() ); @@ -380,7 +382,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.CreateQuestionRequest() ); @@ -411,7 +413,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.CreateQuestionRequest() ); @@ -458,7 +460,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.CreateQuestionRequest() ); @@ -489,7 +491,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.CreateQuestionRequest() ); @@ -510,7 +512,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.ExecuteQuestionRequest() ); @@ -541,7 +543,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.ExecuteQuestionRequest() ); @@ -588,7 +590,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.ExecuteQuestionRequest() ); @@ -619,7 +621,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.ExecuteQuestionRequest() ); @@ -640,7 +642,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetUserFeedbackRequest() ); @@ -671,7 +673,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetUserFeedbackRequest() ); @@ -718,7 +720,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetUserFeedbackRequest() ); @@ -749,7 +751,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.GetUserFeedbackRequest() ); @@ -770,7 +772,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest() ); @@ -803,7 +805,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest() ); @@ -851,7 +853,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest() ); @@ -883,7 +885,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest() ); @@ -900,7 +902,7 @@ describe('v1alpha.QuestionServiceClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -910,7 +912,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -949,7 +951,7 @@ describe('v1alpha.QuestionServiceClient', () => { }); }); - describe('question', () => { + describe('question', async () => { const fakePath = '/rendered/path/question'; const expectedParameters = { project: 'projectValue', @@ -960,7 +962,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.questionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1013,7 +1015,7 @@ describe('v1alpha.QuestionServiceClient', () => { }); }); - describe('userFeedback', () => { + describe('userFeedback', async () => { const fakePath = '/rendered/path/userFeedback'; const expectedParameters = { project: 'projectValue', @@ -1024,7 +1026,7 @@ describe('v1alpha.QuestionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userFeedbackPathTemplate.render = sinon .stub() .returns(fakePath); From 0eab6d40a12aa7f387a4621c6611aa4cbc86e178 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:39:48 -0700 Subject: [PATCH 30/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRyYW5zbGF0ZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLWxpdmVzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXN0aXRjaGVyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXRyYW5zY29kZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvaW50ZWxsaWdlbmNlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpc2lvbi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtbWlncmF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtd2FyZWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZwY2FjY2Vzcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdlYnJpc2svLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdlYnNlY3VyaXR5c2Nhbm5lci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy1leGVjdXRpb25zLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRhdGFmbG93Ly5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWFydGlmYWN0cmVnaXN0cnkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNsb3VkYnVpbGQvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNsb3VkcHJvZmlsZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google-cloud-texttospeech/package.json | 2 +- ...metadata.google.cloud.texttospeech.v1.json | 2 +- ...metadata_google.cloud.texttospeech.v1.json | 2 +- ...ata.google.cloud.texttospeech.v1beta1.json | 2 +- ...ata_google.cloud.texttospeech.v1beta1.json | 2 +- .../src/v1/text_to_speech_client.ts | 12 +- ..._to_speech_long_audio_synthesize_client.ts | 6 +- .../src/v1beta1/text_to_speech_client.ts | 12 +- ..._to_speech_long_audio_synthesize_client.ts | 6 +- ...text_to_speech_long_audio_synthesize_v1.ts | 30 +- ...to_speech_long_audio_synthesize_v1beta1.ts | 30 +- .../test/gapic_text_to_speech_v1.ts | 28 +- .../test/gapic_text_to_speech_v1beta1.ts | 28 +- packages/google-cloud-tpu/package.json | 2 +- .../snippet_metadata.google.cloud.tpu.v1.json | 2 +- .../snippet_metadata_google.cloud.tpu.v1.json | 2 +- .../snippet_metadata.google.cloud.tpu.v2.json | 2 +- .../snippet_metadata_google.cloud.tpu.v2.json | 2 +- ...et_metadata.google.cloud.tpu.v2alpha1.json | 2 +- ...et_metadata_google.cloud.tpu.v2alpha1.json | 2 +- .../google-cloud-tpu/src/v1/tpu_client.ts | 70 +- .../google-cloud-tpu/src/v2/tpu_client.ts | 106 +- .../src/v2alpha1/tpu_client.ts | 130 ++- .../google-cloud-tpu/test/gapic_tpu_v1.ts | 174 ++-- .../google-cloud-tpu/test/gapic_tpu_v2.ts | 252 ++--- .../test/gapic_tpu_v2alpha1.ts | 306 +++--- packages/google-cloud-translate/package.json | 2 +- ..._metadata.google.cloud.translation.v3.json | 2 +- ..._metadata_google.cloud.translation.v3.json | 2 +- ...data.google.cloud.translation.v3beta1.json | 2 +- ...data_google.cloud.translation.v3beta1.json | 2 +- .../src/v3/translation_service_client.ts | 218 +++- .../src/v3beta1/translation_service_client.ts | 48 +- .../test/gapic_translation_service_v3.ts | 478 ++++----- .../test/gapic_translation_service_v3beta1.ts | 114 ++- packages/google-cloud-translate/tsconfig.json | 2 +- .../package.json | 2 +- ...data.google.cloud.video.livestream.v1.json | 2 +- ...data_google.cloud.video.livestream.v1.json | 2 +- .../src/v1/livestream_service_client.ts | 146 ++- .../test/gapic_livestream_service_v1.ts | 350 +++---- .../google-cloud-video-stitcher/package.json | 2 +- ...tadata.google.cloud.video.stitcher.v1.json | 2 +- ...tadata_google.cloud.video.stitcher.v1.json | 2 +- .../src/v1/video_stitcher_service_client.ts | 178 +++- .../test/gapic_video_stitcher_service_v1.ts | 392 +++---- .../package.json | 2 +- ...data.google.cloud.video.transcoder.v1.json | 2 +- ...data_google.cloud.video.transcoder.v1.json | 2 +- .../src/v1/transcoder_service_client.ts | 48 +- .../test/gapic_transcoder_service_v1.ts | 92 +- .../package.json | 2 +- ...ata.google.cloud.videointelligence.v1.json | 2 +- ...ata_google.cloud.videointelligence.v1.json | 2 +- ...oogle.cloud.videointelligence.v1beta2.json | 2 +- ...oogle.cloud.videointelligence.v1beta2.json | 2 +- ...gle.cloud.videointelligence.v1p1beta1.json | 2 +- ...gle.cloud.videointelligence.v1p1beta1.json | 2 +- ...gle.cloud.videointelligence.v1p2beta1.json | 2 +- ...gle.cloud.videointelligence.v1p2beta1.json | 2 +- ...gle.cloud.videointelligence.v1p3beta1.json | 2 +- ...gle.cloud.videointelligence.v1p3beta1.json | 2 +- .../v1/video_intelligence_service_client.ts | 4 +- .../video_intelligence_service_client.ts | 4 +- .../video_intelligence_service_client.ts | 4 +- .../video_intelligence_service_client.ts | 4 +- ...aming_video_intelligence_service_client.ts | 4 +- .../video_intelligence_service_client.ts | 4 +- ...ng_video_intelligence_service_v1p3beta1.ts | 8 +- .../gapic_video_intelligence_service_v1.ts | 16 +- ...apic_video_intelligence_service_v1beta2.ts | 16 +- ...ic_video_intelligence_service_v1p1beta1.ts | 16 +- ...ic_video_intelligence_service_v1p2beta1.ts | 16 +- ...ic_video_intelligence_service_v1p3beta1.ts | 16 +- packages/google-cloud-vision/package.json | 2 +- .../src/v1/image_annotator_client.ts | 18 +- .../src/v1/product_search_client.ts | 110 +- .../src/v1p1beta1/image_annotator_client.ts | 4 +- .../src/v1p2beta1/image_annotator_client.ts | 8 +- .../src/v1p3beta1/image_annotator_client.ts | 8 +- .../src/v1p3beta1/product_search_client.ts | 104 +- .../src/v1p4beta1/image_annotator_client.ts | 16 +- .../src/v1p4beta1/product_search_client.ts | 108 +- .../test/gapic_image_annotator_v1.ts | 70 +- .../test/gapic_image_annotator_v1p1beta1.ts | 12 +- .../test/gapic_image_annotator_v1p2beta1.ts | 24 +- .../test/gapic_image_annotator_v1p3beta1.ts | 36 +- .../test/gapic_image_annotator_v1p4beta1.ts | 56 +- .../test/gapic_product_search_v1.ts | 218 ++-- .../test/gapic_product_search_v1p3beta1.ts | 192 ++-- .../test/gapic_product_search_v1p4beta1.ts | 204 ++-- .../google-cloud-vmmigration/package.json | 2 +- ..._metadata.google.cloud.vmmigration.v1.json | 2 +- ..._metadata_google.cloud.vmmigration.v1.json | 2 +- .../src/v1/vm_migration_client.ts | 258 +++-- .../test/gapic_vm_migration_v1.ts | 620 +++++------ .../google-cloud-vmwareengine/package.json | 2 +- ...metadata.google.cloud.vmwareengine.v1.json | 2 +- ...metadata_google.cloud.vmwareengine.v1.json | 2 +- .../src/v1/vmware_engine_client.ts | 434 ++++++-- .../test/gapic_vmware_engine_v1.ts | 968 +++++++++--------- packages/google-cloud-vpcaccess/package.json | 2 +- ...et_metadata.google.cloud.vpcaccess.v1.json | 2 +- ...et_metadata_google.cloud.vpcaccess.v1.json | 2 +- .../src/v1/vpc_access_service_client.ts | 26 +- .../test/gapic_vpc_access_service_v1.ts | 82 +- packages/google-cloud-webrisk/package.json | 2 +- ...ppet_metadata.google.cloud.webrisk.v1.json | 2 +- ...ppet_metadata_google.cloud.webrisk.v1.json | 2 +- ...metadata.google.cloud.webrisk.v1beta1.json | 2 +- ...metadata_google.cloud.webrisk.v1beta1.json | 2 +- .../src/v1/web_risk_service_client.ts | 22 +- .../web_risk_service_v1_beta1_client.ts | 12 +- .../test/gapic_web_risk_service_v1.ts | 66 +- ...gapic_web_risk_service_v1_beta1_v1beta1.ts | 28 +- .../package.json | 2 +- ...ta.google.cloud.websecurityscanner.v1.json | 2 +- ...ta_google.cloud.websecurityscanner.v1.json | 2 +- ...ogle.cloud.websecurityscanner.v1alpha.json | 2 +- ...ogle.cloud.websecurityscanner.v1alpha.json | 2 +- ...oogle.cloud.websecurityscanner.v1beta.json | 2 +- ...oogle.cloud.websecurityscanner.v1beta.json | 2 +- .../src/v1/web_security_scanner_client.ts | 84 +- .../v1alpha/web_security_scanner_client.ts | 84 +- .../src/v1beta/web_security_scanner_client.ts | 84 +- .../test/gapic_web_security_scanner_v1.ts | 136 +-- .../gapic_web_security_scanner_v1alpha.ts | 148 +-- .../test/gapic_web_security_scanner_v1beta.ts | 148 +-- .../package.json | 2 +- ....google.cloud.workflows.executions.v1.json | 2 +- ...et_metadata.google.cloud.workflows.v1.json | 2 +- ..._google.cloud.workflows.executions.v1.json | 2 +- ...et_metadata_google.cloud.workflows.v1.json | 2 +- ...gle.cloud.workflows.executions.v1beta.json | 2 +- ...etadata.google.cloud.workflows.v1beta.json | 2 +- ...gle.cloud.workflows.executions.v1beta.json | 2 +- ...etadata_google.cloud.workflows.v1beta.json | 2 +- .../src/v1/executions_client.ts | 24 +- .../src/v1/workflows_client.ts | 42 +- .../src/v1beta/executions_client.ts | 24 +- .../src/v1beta/workflows_client.ts | 28 +- .../test/gapic_executions_v1.ts | 50 +- .../test/gapic_executions_v1beta.ts | 50 +- .../test/gapic_workflows_v1.ts | 116 +-- .../test/gapic_workflows_v1beta.ts | 70 +- .../google-cloud-workstations/package.json | 2 +- ...metadata.google.cloud.workstations.v1.json | 2 +- ...metadata_google.cloud.workstations.v1.json | 2 +- ...data.google.cloud.workstations.v1beta.json | 2 +- ...data_google.cloud.workstations.v1beta.json | 2 +- .../src/v1/workstations_client.ts | 122 ++- .../src/v1beta/workstations_client.ts | 122 ++- .../test/gapic_workstations_v1.ts | 300 +++--- .../test/gapic_workstations_v1beta.ts | 300 +++--- packages/google-container/package.json | 2 +- .../snippet_metadata.google.container.v1.json | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata.google.container.v1beta1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- .../src/v1/cluster_manager_client.ts | 144 ++- .../src/v1beta1/cluster_manager_client.ts | 148 ++- .../test/gapic_cluster_manager_v1.ts | 290 +++--- .../test/gapic_cluster_manager_v1beta1.ts | 290 +++--- packages/google-dataflow/package.json | 2 +- ...ppet_metadata.google.dataflow.v1beta3.json | 2 +- ...ppet_metadata_google.dataflow.v1beta3.json | 2 +- .../v1beta3/flex_templates_service_client.ts | 4 +- .../src/v1beta3/jobs_v1_beta3_client.ts | 44 +- .../src/v1beta3/messages_v1_beta3_client.ts | 12 +- .../src/v1beta3/metrics_v1_beta3_client.ts | 28 +- .../src/v1beta3/snapshots_v1_beta3_client.ts | 12 +- .../src/v1beta3/templates_service_client.ts | 12 +- .../gapic_flex_templates_service_v1beta3.ts | 12 +- .../test/gapic_jobs_v1_beta3_v1beta3.ts | 72 +- .../test/gapic_messages_v1_beta3_v1beta3.ts | 18 +- .../test/gapic_metrics_v1_beta3_v1beta3.ts | 40 +- .../test/gapic_snapshots_v1_beta3_v1beta3.ts | 28 +- .../test/gapic_templates_service_v1beta3.ts | 28 +- .../package.json | 2 +- ...a.google.devtools.artifactregistry.v1.json | 2 +- ...a_google.devtools.artifactregistry.v1.json | 2 +- ...gle.devtools.artifactregistry.v1beta2.json | 2 +- ...gle.devtools.artifactregistry.v1beta2.json | 2 +- .../src/v1/artifact_registry_client.ts | 286 ++++-- .../src/v1beta2/artifact_registry_client.ts | 140 ++- .../test/gapic_artifact_registry_v1.ts | 590 +++++------ .../test/gapic_artifact_registry_v1beta2.ts | 296 +++--- .../google-devtools-cloudbuild/package.json | 2 +- ...etadata.google.devtools.cloudbuild.v1.json | 2 +- ...etadata_google.devtools.cloudbuild.v1.json | 2 +- ...etadata.google.devtools.cloudbuild.v2.json | 2 +- ...etadata_google.devtools.cloudbuild.v2.json | 2 +- .../src/v1/cloud_build_client.ts | 96 +- .../src/v2/repository_manager_client.ts | 82 +- .../test/gapic_cloud_build_v1.ts | 258 ++--- .../test/gapic_repository_manager_v2.ts | 224 ++-- .../package.json | 2 +- ...data_google.devtools.cloudprofiler.v2.json | 2 +- .../src/v2/export_service_client.ts | 12 +- .../src/v2/profiler_service_client.ts | 12 +- .../test/gapic_export_service_v2.ts | 26 +- .../test/gapic_profiler_service_v2.ts | 36 +- 202 files changed, 7185 insertions(+), 5245 deletions(-) diff --git a/packages/google-cloud-texttospeech/package.json b/packages/google-cloud-texttospeech/package.json index b757cf10391..ad5d36d729f 100644 --- a/packages/google-cloud-texttospeech/package.json +++ b/packages/google-cloud-texttospeech/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json index b16ea762d5a..d895b3e116c 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "5.8.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json index 63274fa70f3..2c29ef10a98 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "5.8.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json index 4808c1020d0..57d1e82a68a 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "5.8.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json index aa6d2a19780..bcf8f5cc662 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "5.8.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/src/v1/text_to_speech_client.ts b/packages/google-cloud-texttospeech/src/v1/text_to_speech_client.ts index 048f0345c0e..73b87e57deb 100644 --- a/packages/google-cloud-texttospeech/src/v1/text_to_speech_client.ts +++ b/packages/google-cloud-texttospeech/src/v1/text_to_speech_client.ts @@ -478,7 +478,9 @@ export class TextToSpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVoices request %j', request); const wrappedCallback: | Callback< @@ -597,7 +599,9 @@ export class TextToSpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('synthesizeSpeech request %j', request); const wrappedCallback: | Callback< @@ -646,7 +650,9 @@ export class TextToSpeechClient { * region_tag:texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_async */ streamingSynthesize(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingSynthesize stream %j', options); return this.innerApiCalls.streamingSynthesize(null, options); } diff --git a/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts b/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts index 03e9d1ed256..88af2cd8094 100644 --- a/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts +++ b/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts @@ -513,7 +513,9 @@ export class TextToSpeechLongAudioSynthesizeClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -675,7 +677,7 @@ export class TextToSpeechLongAudioSynthesizeClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_client.ts b/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_client.ts index f7b0c54cc0e..b96b7ab2644 100644 --- a/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_client.ts +++ b/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_client.ts @@ -484,7 +484,9 @@ export class TextToSpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVoices request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class TextToSpeechClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('synthesizeSpeech request %j', request); const wrappedCallback: | Callback< @@ -663,7 +667,9 @@ export class TextToSpeechClient { * region_tag:texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_async */ streamingSynthesize(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingSynthesize stream %j', options); return this.innerApiCalls.streamingSynthesize(null, options); } diff --git a/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts b/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts index 798cd2b631d..e3564ecbb30 100644 --- a/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts +++ b/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts @@ -513,7 +513,9 @@ export class TextToSpeechLongAudioSynthesizeClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -675,7 +677,7 @@ export class TextToSpeechLongAudioSynthesizeClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1.ts b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1.ts index 8e1fc7f02f5..513fef89323 100644 --- a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1.ts +++ b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1.ts @@ -257,7 +257,9 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textToSpeechLongAudioSynthesizeStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest() ); @@ -364,7 +366,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest() ); @@ -421,7 +423,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest() ); @@ -455,7 +457,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest() ); @@ -491,7 +493,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -516,7 +518,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -539,7 +541,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -627,7 +629,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -716,7 +718,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -821,8 +823,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -844,7 +845,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -853,8 +854,7 @@ describe('v1.TextToSpeechLongAudioSynthesizeClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1beta1.ts b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1beta1.ts index e76e4e6ad1d..75201291129 100644 --- a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1beta1.ts +++ b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_long_audio_synthesize_v1beta1.ts @@ -257,7 +257,9 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textToSpeechLongAudioSynthesizeStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeLongAudioRequest() ); @@ -364,7 +366,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeLongAudioRequest() ); @@ -421,7 +423,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeLongAudioRequest() ); @@ -455,7 +457,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeLongAudioRequest() ); @@ -491,7 +493,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -516,7 +518,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -539,7 +541,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -627,7 +629,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -716,7 +718,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -821,8 +823,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -844,7 +845,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -853,8 +854,7 @@ describe('v1beta1.TextToSpeechLongAudioSynthesizeClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1.ts b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1.ts index ebf31dc3144..c013599afeb 100644 --- a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1.ts +++ b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1.ts @@ -208,7 +208,9 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textToSpeechStub); client.close().then(() => { done(); @@ -267,7 +269,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.ListVoicesRequest() ); @@ -284,7 +286,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.ListVoicesRequest() ); @@ -317,7 +319,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.ListVoicesRequest() ); @@ -334,7 +336,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.ListVoicesRequest() ); @@ -350,7 +352,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeSpeechRequest() ); @@ -367,7 +369,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeSpeechRequest() ); @@ -400,7 +402,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeSpeechRequest() ); @@ -417,7 +419,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.SynthesizeSpeechRequest() ); @@ -433,7 +435,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.StreamingSynthesizeRequest() ); @@ -478,7 +480,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1.StreamingSynthesizeRequest() ); @@ -518,7 +520,7 @@ describe('v1.TextToSpeechClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -529,7 +531,7 @@ describe('v1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1beta1.ts b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1beta1.ts index 075d736f6dc..376a408dbf9 100644 --- a/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1beta1.ts +++ b/packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1beta1.ts @@ -208,7 +208,9 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.textToSpeechStub); client.close().then(() => { done(); @@ -267,7 +269,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.ListVoicesRequest() ); @@ -284,7 +286,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.ListVoicesRequest() ); @@ -317,7 +319,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.ListVoicesRequest() ); @@ -334,7 +336,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.ListVoicesRequest() ); @@ -350,7 +352,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest() ); @@ -367,7 +369,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest() ); @@ -400,7 +402,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest() ); @@ -417,7 +419,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest() ); @@ -433,7 +435,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.StreamingSynthesizeRequest() ); @@ -478,7 +480,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.texttospeech.v1beta1.StreamingSynthesizeRequest() ); @@ -518,7 +520,7 @@ describe('v1beta1.TextToSpeechClient', () => { }); describe('Path templates', () => { - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -529,7 +531,7 @@ describe('v1beta1.TextToSpeechClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-tpu/package.json b/packages/google-cloud-tpu/package.json index abeb7d5dc3e..36400ff1586 100644 --- a/packages/google-cloud-tpu/package.json +++ b/packages/google-cloud-tpu/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json index f338181520b..454b11ec4e4 100644 --- a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json +++ b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "3.8.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json index f338181520b..454b11ec4e4 100644 --- a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json +++ b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "3.8.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json index 14a51f73fe9..9dbe65504dc 100644 --- a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json +++ b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "3.8.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json index 471a72b4597..7b318ad321e 100644 --- a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json +++ b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "3.8.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json index 51283d27d9f..22223d23921 100644 --- a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "3.8.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json index bceb22ad325..e4df154d12f 100644 --- a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "3.8.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/src/v1/tpu_client.ts b/packages/google-cloud-tpu/src/v1/tpu_client.ts index 873225e96e2..65b3a906d13 100644 --- a/packages/google-cloud-tpu/src/v1/tpu_client.ts +++ b/packages/google-cloud-tpu/src/v1/tpu_client.ts @@ -608,7 +608,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNode request %j', request); const wrappedCallback: | Callback< @@ -722,7 +724,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTensorFlowVersion request %j', request); const wrappedCallback: | Callback< @@ -832,7 +836,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAcceleratorType request %j', request); const wrappedCallback: | Callback< @@ -965,7 +971,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1132,7 +1140,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1301,7 +1311,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1468,7 +1480,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1635,7 +1649,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1789,7 +1805,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v1.IListNodesRequest, @@ -1852,7 +1870,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes stream %j', request); return this.descriptors.page.listNodes.createStream( this.innerApiCalls.listNodes as GaxCall, @@ -1899,7 +1919,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes iterate %j', request); return this.descriptors.page.listNodes.asyncIterate( this.innerApiCalls['listNodes'] as GaxCall, @@ -2005,7 +2027,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v1.IListTensorFlowVersionsRequest, @@ -2074,7 +2098,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listTensorFlowVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTensorFlowVersions stream %j', request); return this.descriptors.page.listTensorFlowVersions.createStream( this.innerApiCalls.listTensorFlowVersions as GaxCall, @@ -2125,7 +2151,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listTensorFlowVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTensorFlowVersions iterate %j', request); return this.descriptors.page.listTensorFlowVersions.asyncIterate( this.innerApiCalls['listTensorFlowVersions'] as GaxCall, @@ -2231,7 +2259,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v1.IListAcceleratorTypesRequest, @@ -2300,7 +2330,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listAcceleratorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAcceleratorTypes stream %j', request); return this.descriptors.page.listAcceleratorTypes.createStream( this.innerApiCalls.listAcceleratorTypes as GaxCall, @@ -2351,7 +2383,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listAcceleratorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAcceleratorTypes iterate %j', request); return this.descriptors.page.listAcceleratorTypes.asyncIterate( this.innerApiCalls['listAcceleratorTypes'] as GaxCall, @@ -2531,7 +2565,7 @@ export class TpuClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-tpu/src/v2/tpu_client.ts b/packages/google-cloud-tpu/src/v2/tpu_client.ts index 4c36c53aea1..a53f6d6ef9d 100644 --- a/packages/google-cloud-tpu/src/v2/tpu_client.ts +++ b/packages/google-cloud-tpu/src/v2/tpu_client.ts @@ -656,7 +656,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNode request %j', request); const wrappedCallback: | Callback< @@ -764,7 +766,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQueuedResource request %j', request); const wrappedCallback: | Callback< @@ -880,7 +884,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateServiceIdentity request %j', request); const wrappedCallback: | Callback< @@ -993,7 +999,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAcceleratorType request %j', request); const wrappedCallback: | Callback< @@ -1103,7 +1111,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRuntimeVersion request %j', request); const wrappedCallback: | Callback< @@ -1218,7 +1228,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGuestAttributes request %j', request); const wrappedCallback: | Callback< @@ -1351,7 +1363,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1518,7 +1532,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1685,7 +1701,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1852,7 +1870,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2023,7 +2043,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ 'node.name': request.node!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2197,7 +2219,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2372,7 +2396,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2539,7 +2565,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2693,7 +2721,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2.IListNodesRequest, @@ -2756,7 +2786,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes stream %j', request); return this.descriptors.page.listNodes.createStream( this.innerApiCalls.listNodes as GaxCall, @@ -2803,7 +2835,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes iterate %j', request); return this.descriptors.page.listNodes.asyncIterate( this.innerApiCalls['listNodes'] as GaxCall, @@ -2906,7 +2940,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2.IListQueuedResourcesRequest, @@ -2972,7 +3008,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listQueuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueuedResources stream %j', request); return this.descriptors.page.listQueuedResources.createStream( this.innerApiCalls.listQueuedResources as GaxCall, @@ -3020,7 +3058,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listQueuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueuedResources iterate %j', request); return this.descriptors.page.listQueuedResources.asyncIterate( this.innerApiCalls['listQueuedResources'] as GaxCall, @@ -3126,7 +3166,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2.IListAcceleratorTypesRequest, @@ -3195,7 +3237,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listAcceleratorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAcceleratorTypes stream %j', request); return this.descriptors.page.listAcceleratorTypes.createStream( this.innerApiCalls.listAcceleratorTypes as GaxCall, @@ -3246,7 +3290,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listAcceleratorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAcceleratorTypes iterate %j', request); return this.descriptors.page.listAcceleratorTypes.asyncIterate( this.innerApiCalls['listAcceleratorTypes'] as GaxCall, @@ -3352,7 +3398,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2.IListRuntimeVersionsRequest, @@ -3421,7 +3469,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listRuntimeVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeVersions stream %j', request); return this.descriptors.page.listRuntimeVersions.createStream( this.innerApiCalls.listRuntimeVersions as GaxCall, @@ -3472,7 +3522,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listRuntimeVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeVersions iterate %j', request); return this.descriptors.page.listRuntimeVersions.asyncIterate( this.innerApiCalls['listRuntimeVersions'] as GaxCall, @@ -3652,7 +3704,7 @@ export class TpuClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts index 921a40f6403..e1030ed4617 100644 --- a/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts +++ b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts @@ -710,7 +710,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNode request %j', request); const wrappedCallback: | Callback< @@ -824,7 +826,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getQueuedResource request %j', request); const wrappedCallback: | Callback< @@ -949,7 +953,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateServiceIdentity request %j', request); const wrappedCallback: | Callback< @@ -1068,7 +1074,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAcceleratorType request %j', request); const wrappedCallback: | Callback< @@ -1187,7 +1195,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRuntimeVersion request %j', request); const wrappedCallback: | Callback< @@ -1311,7 +1321,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGuestAttributes request %j', request); const wrappedCallback: | Callback< @@ -1449,7 +1461,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1618,7 +1632,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1785,7 +1801,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1952,7 +1970,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2123,7 +2143,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ 'node.name': request.node!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2290,7 +2312,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2464,7 +2488,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2639,7 +2665,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2806,7 +2834,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2976,7 +3006,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3154,7 +3186,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3310,7 +3344,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2alpha1.IListNodesRequest, @@ -3375,7 +3411,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes stream %j', request); return this.descriptors.page.listNodes.createStream( this.innerApiCalls.listNodes as GaxCall, @@ -3422,7 +3460,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes iterate %j', request); return this.descriptors.page.listNodes.asyncIterate( this.innerApiCalls['listNodes'] as GaxCall, @@ -3524,7 +3564,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2alpha1.IListQueuedResourcesRequest, @@ -3589,7 +3631,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listQueuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueuedResources stream %j', request); return this.descriptors.page.listQueuedResources.createStream( this.innerApiCalls.listQueuedResources as GaxCall, @@ -3636,7 +3680,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listQueuedResources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQueuedResources iterate %j', request); return this.descriptors.page.listQueuedResources.asyncIterate( this.innerApiCalls['listQueuedResources'] as GaxCall, @@ -3742,7 +3788,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2alpha1.IListAcceleratorTypesRequest, @@ -3811,7 +3859,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listAcceleratorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAcceleratorTypes stream %j', request); return this.descriptors.page.listAcceleratorTypes.createStream( this.innerApiCalls.listAcceleratorTypes as GaxCall, @@ -3862,7 +3912,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listAcceleratorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAcceleratorTypes iterate %j', request); return this.descriptors.page.listAcceleratorTypes.asyncIterate( this.innerApiCalls['listAcceleratorTypes'] as GaxCall, @@ -3968,7 +4020,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2alpha1.IListRuntimeVersionsRequest, @@ -4037,7 +4091,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listRuntimeVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeVersions stream %j', request); return this.descriptors.page.listRuntimeVersions.createStream( this.innerApiCalls.listRuntimeVersions as GaxCall, @@ -4088,7 +4144,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listRuntimeVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimeVersions iterate %j', request); return this.descriptors.page.listRuntimeVersions.asyncIterate( this.innerApiCalls['listRuntimeVersions'] as GaxCall, @@ -4191,7 +4249,9 @@ export class TpuClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.tpu.v2alpha1.IListReservationsRequest, @@ -4257,7 +4317,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listReservations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReservations stream %j', request); return this.descriptors.page.listReservations.createStream( this.innerApiCalls.listReservations as GaxCall, @@ -4305,7 +4367,9 @@ export class TpuClient { }); const defaultCallSettings = this._defaults['listReservations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReservations iterate %j', request); return this.descriptors.page.listReservations.asyncIterate( this.innerApiCalls['listReservations'] as GaxCall, @@ -4485,7 +4549,7 @@ export class TpuClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-tpu/test/gapic_tpu_v1.ts b/packages/google-cloud-tpu/test/gapic_tpu_v1.ts index 429cbdf0a19..b1adda8c64a 100644 --- a/packages/google-cloud-tpu/test/gapic_tpu_v1.ts +++ b/packages/google-cloud-tpu/test/gapic_tpu_v1.ts @@ -287,7 +287,9 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tpuStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetNodeRequest() ); @@ -377,7 +379,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetNodeRequest() ); @@ -424,7 +426,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetNodeRequest() ); @@ -452,7 +454,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetNodeRequest() ); @@ -473,7 +475,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetTensorFlowVersionRequest() ); @@ -505,7 +507,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetTensorFlowVersionRequest() ); @@ -552,7 +554,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetTensorFlowVersionRequest() ); @@ -583,7 +585,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetTensorFlowVersionRequest() ); @@ -604,7 +606,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetAcceleratorTypeRequest() ); @@ -636,7 +638,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetAcceleratorTypeRequest() ); @@ -683,7 +685,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetAcceleratorTypeRequest() ); @@ -714,7 +716,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.GetAcceleratorTypeRequest() ); @@ -735,7 +737,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.CreateNodeRequest() ); @@ -767,7 +769,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.CreateNodeRequest() ); @@ -821,7 +823,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.CreateNodeRequest() ); @@ -852,7 +854,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.CreateNodeRequest() ); @@ -885,7 +887,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -907,7 +909,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -925,7 +927,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.DeleteNodeRequest() ); @@ -957,7 +959,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.DeleteNodeRequest() ); @@ -1011,7 +1013,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.DeleteNodeRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.DeleteNodeRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1097,7 +1099,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1115,7 +1117,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ReimageNodeRequest() ); @@ -1147,7 +1149,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ReimageNodeRequest() ); @@ -1201,7 +1203,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ReimageNodeRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ReimageNodeRequest() ); @@ -1265,7 +1267,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1287,7 +1289,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1305,7 +1307,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StopNodeRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StopNodeRequest() ); @@ -1391,7 +1393,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StopNodeRequest() ); @@ -1422,7 +1424,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StopNodeRequest() ); @@ -1455,7 +1457,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1477,7 +1479,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1495,7 +1497,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StartNodeRequest() ); @@ -1527,7 +1529,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StartNodeRequest() ); @@ -1581,7 +1583,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StartNodeRequest() ); @@ -1612,7 +1614,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.StartNodeRequest() ); @@ -1645,7 +1647,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1667,7 +1669,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1685,7 +1687,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListNodesRequest() ); @@ -1718,7 +1720,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListNodesRequest() ); @@ -1767,7 +1769,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListNodesRequest() ); @@ -1795,7 +1797,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListNodesRequest() ); @@ -1846,7 +1848,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListNodesRequest() ); @@ -1894,7 +1896,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListNodesRequest() ); @@ -1936,7 +1938,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListNodesRequest() ); @@ -1979,7 +1981,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListTensorFlowVersionsRequest() ); @@ -2019,7 +2021,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListTensorFlowVersionsRequest() ); @@ -2074,7 +2076,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListTensorFlowVersionsRequest() ); @@ -2108,7 +2110,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListTensorFlowVersionsRequest() ); @@ -2174,7 +2176,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListTensorFlowVersionsRequest() ); @@ -2229,7 +2231,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListTensorFlowVersionsRequest() ); @@ -2282,7 +2284,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListTensorFlowVersionsRequest() ); @@ -2328,7 +2330,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListAcceleratorTypesRequest() ); @@ -2362,7 +2364,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListAcceleratorTypesRequest() ); @@ -2411,7 +2413,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListAcceleratorTypesRequest() ); @@ -2442,7 +2444,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListAcceleratorTypesRequest() ); @@ -2496,7 +2498,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListAcceleratorTypesRequest() ); @@ -2545,7 +2547,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListAcceleratorTypesRequest() ); @@ -2588,7 +2590,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v1.ListAcceleratorTypesRequest() ); @@ -2629,7 +2631,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2659,7 +2661,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2703,7 +2705,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2738,7 +2740,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2786,7 +2788,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2827,7 +2829,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2906,7 +2908,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2986,7 +2988,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3082,8 +3084,7 @@ describe('v1.TpuClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3102,7 +3103,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3111,8 +3112,7 @@ describe('v1.TpuClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3128,7 +3128,7 @@ describe('v1.TpuClient', () => { }); describe('Path templates', () => { - describe('acceleratorType', () => { + describe('acceleratorType', async () => { const fakePath = '/rendered/path/acceleratorType'; const expectedParameters = { project: 'projectValue', @@ -3139,7 +3139,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.acceleratorTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3193,7 +3193,7 @@ describe('v1.TpuClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3203,7 +3203,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3242,7 +3242,7 @@ describe('v1.TpuClient', () => { }); }); - describe('node', () => { + describe('node', async () => { const fakePath = '/rendered/path/node'; const expectedParameters = { project: 'projectValue', @@ -3253,7 +3253,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3306,7 +3306,7 @@ describe('v1.TpuClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3315,7 +3315,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3344,7 +3344,7 @@ describe('v1.TpuClient', () => { }); }); - describe('tensorFlowVersion', () => { + describe('tensorFlowVersion', async () => { const fakePath = '/rendered/path/tensorFlowVersion'; const expectedParameters = { project: 'projectValue', @@ -3355,7 +3355,7 @@ describe('v1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tensorFlowVersionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-tpu/test/gapic_tpu_v2.ts b/packages/google-cloud-tpu/test/gapic_tpu_v2.ts index fb201bea1b1..1f7a9581257 100644 --- a/packages/google-cloud-tpu/test/gapic_tpu_v2.ts +++ b/packages/google-cloud-tpu/test/gapic_tpu_v2.ts @@ -287,7 +287,9 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tpuStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetNodeRequest() ); @@ -377,7 +379,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetNodeRequest() ); @@ -424,7 +426,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetNodeRequest() ); @@ -452,7 +454,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetNodeRequest() ); @@ -473,7 +475,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetQueuedResourceRequest() ); @@ -504,7 +506,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetQueuedResourceRequest() ); @@ -551,7 +553,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetQueuedResourceRequest() ); @@ -582,7 +584,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetQueuedResourceRequest() ); @@ -603,7 +605,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GenerateServiceIdentityRequest() ); @@ -635,7 +637,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GenerateServiceIdentityRequest() ); @@ -682,7 +684,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GenerateServiceIdentityRequest() ); @@ -716,7 +718,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GenerateServiceIdentityRequest() ); @@ -740,7 +742,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetAcceleratorTypeRequest() ); @@ -772,7 +774,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetAcceleratorTypeRequest() ); @@ -819,7 +821,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetAcceleratorTypeRequest() ); @@ -850,7 +852,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetAcceleratorTypeRequest() ); @@ -871,7 +873,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetRuntimeVersionRequest() ); @@ -902,7 +904,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetRuntimeVersionRequest() ); @@ -949,7 +951,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetRuntimeVersionRequest() ); @@ -980,7 +982,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetRuntimeVersionRequest() ); @@ -1001,7 +1003,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetGuestAttributesRequest() ); @@ -1033,7 +1035,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetGuestAttributesRequest() ); @@ -1080,7 +1082,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetGuestAttributesRequest() ); @@ -1111,7 +1113,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.GetGuestAttributesRequest() ); @@ -1132,7 +1134,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateNodeRequest() ); @@ -1164,7 +1166,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateNodeRequest() ); @@ -1218,7 +1220,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateNodeRequest() ); @@ -1249,7 +1251,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateNodeRequest() ); @@ -1282,7 +1284,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1304,7 +1306,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1322,7 +1324,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteNodeRequest() ); @@ -1354,7 +1356,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteNodeRequest() ); @@ -1408,7 +1410,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteNodeRequest() ); @@ -1439,7 +1441,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteNodeRequest() ); @@ -1472,7 +1474,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1494,7 +1496,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1512,7 +1514,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StopNodeRequest() ); @@ -1544,7 +1546,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StopNodeRequest() ); @@ -1598,7 +1600,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StopNodeRequest() ); @@ -1629,7 +1631,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StopNodeRequest() ); @@ -1662,7 +1664,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1684,7 +1686,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1702,7 +1704,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StartNodeRequest() ); @@ -1734,7 +1736,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StartNodeRequest() ); @@ -1788,7 +1790,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StartNodeRequest() ); @@ -1819,7 +1821,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.StartNodeRequest() ); @@ -1852,7 +1854,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1874,7 +1876,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1892,7 +1894,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.UpdateNodeRequest() ); @@ -1925,7 +1927,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.UpdateNodeRequest() ); @@ -1980,7 +1982,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.UpdateNodeRequest() ); @@ -2012,7 +2014,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.UpdateNodeRequest() ); @@ -2046,7 +2048,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2068,7 +2070,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2086,7 +2088,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateQueuedResourceRequest() ); @@ -2119,7 +2121,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateQueuedResourceRequest() ); @@ -2173,7 +2175,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateQueuedResourceRequest() ); @@ -2204,7 +2206,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.CreateQueuedResourceRequest() ); @@ -2237,7 +2239,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2259,7 +2261,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2280,7 +2282,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteQueuedResourceRequest() ); @@ -2313,7 +2315,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteQueuedResourceRequest() ); @@ -2367,7 +2369,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteQueuedResourceRequest() ); @@ -2398,7 +2400,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.DeleteQueuedResourceRequest() ); @@ -2431,7 +2433,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2453,7 +2455,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2474,7 +2476,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ResetQueuedResourceRequest() ); @@ -2507,7 +2509,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ResetQueuedResourceRequest() ); @@ -2561,7 +2563,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ResetQueuedResourceRequest() ); @@ -2592,7 +2594,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ResetQueuedResourceRequest() ); @@ -2625,7 +2627,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2647,7 +2649,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2668,7 +2670,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListNodesRequest() ); @@ -2701,7 +2703,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListNodesRequest() ); @@ -2750,7 +2752,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListNodesRequest() ); @@ -2778,7 +2780,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListNodesRequest() ); @@ -2829,7 +2831,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListNodesRequest() ); @@ -2877,7 +2879,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListNodesRequest() ); @@ -2919,7 +2921,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListNodesRequest() ); @@ -2962,7 +2964,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListQueuedResourcesRequest() ); @@ -2996,7 +2998,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListQueuedResourcesRequest() ); @@ -3045,7 +3047,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListQueuedResourcesRequest() ); @@ -3076,7 +3078,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListQueuedResourcesRequest() ); @@ -3130,7 +3132,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListQueuedResourcesRequest() ); @@ -3179,7 +3181,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListQueuedResourcesRequest() ); @@ -3222,7 +3224,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListQueuedResourcesRequest() ); @@ -3264,7 +3266,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListAcceleratorTypesRequest() ); @@ -3298,7 +3300,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListAcceleratorTypesRequest() ); @@ -3347,7 +3349,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListAcceleratorTypesRequest() ); @@ -3378,7 +3380,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListAcceleratorTypesRequest() ); @@ -3432,7 +3434,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListAcceleratorTypesRequest() ); @@ -3481,7 +3483,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListAcceleratorTypesRequest() ); @@ -3524,7 +3526,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListAcceleratorTypesRequest() ); @@ -3566,7 +3568,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListRuntimeVersionsRequest() ); @@ -3600,7 +3602,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListRuntimeVersionsRequest() ); @@ -3649,7 +3651,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListRuntimeVersionsRequest() ); @@ -3680,7 +3682,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListRuntimeVersionsRequest() ); @@ -3734,7 +3736,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListRuntimeVersionsRequest() ); @@ -3783,7 +3785,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListRuntimeVersionsRequest() ); @@ -3826,7 +3828,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2.ListRuntimeVersionsRequest() ); @@ -3867,7 +3869,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3897,7 +3899,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3941,7 +3943,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3976,7 +3978,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4024,7 +4026,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4065,7 +4067,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4144,7 +4146,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4224,7 +4226,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4320,8 +4322,7 @@ describe('v2.TpuClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4340,7 +4341,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4349,8 +4350,7 @@ describe('v2.TpuClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4366,7 +4366,7 @@ describe('v2.TpuClient', () => { }); describe('Path templates', () => { - describe('acceleratorType', () => { + describe('acceleratorType', async () => { const fakePath = '/rendered/path/acceleratorType'; const expectedParameters = { project: 'projectValue', @@ -4377,7 +4377,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.acceleratorTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4431,7 +4431,7 @@ describe('v2.TpuClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4441,7 +4441,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4480,7 +4480,7 @@ describe('v2.TpuClient', () => { }); }); - describe('node', () => { + describe('node', async () => { const fakePath = '/rendered/path/node'; const expectedParameters = { project: 'projectValue', @@ -4491,7 +4491,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4544,7 +4544,7 @@ describe('v2.TpuClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4553,7 +4553,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4582,7 +4582,7 @@ describe('v2.TpuClient', () => { }); }); - describe('queuedResource', () => { + describe('queuedResource', async () => { const fakePath = '/rendered/path/queuedResource'; const expectedParameters = { project: 'projectValue', @@ -4593,7 +4593,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.queuedResourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4647,7 +4647,7 @@ describe('v2.TpuClient', () => { }); }); - describe('runtimeVersion', () => { + describe('runtimeVersion', async () => { const fakePath = '/rendered/path/runtimeVersion'; const expectedParameters = { project: 'projectValue', @@ -4658,7 +4658,7 @@ describe('v2.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeVersionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-tpu/test/gapic_tpu_v2alpha1.ts b/packages/google-cloud-tpu/test/gapic_tpu_v2alpha1.ts index b4814a5a834..b6f6f83f1e0 100644 --- a/packages/google-cloud-tpu/test/gapic_tpu_v2alpha1.ts +++ b/packages/google-cloud-tpu/test/gapic_tpu_v2alpha1.ts @@ -287,7 +287,9 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.tpuStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetNodeRequest() ); @@ -377,7 +379,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetNodeRequest() ); @@ -424,7 +426,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetNodeRequest() ); @@ -452,7 +454,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetNodeRequest() ); @@ -473,7 +475,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest() ); @@ -504,7 +506,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest() ); @@ -551,7 +553,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest() ); @@ -582,7 +584,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest() ); @@ -603,7 +605,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest() ); @@ -635,7 +637,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest() ); @@ -682,7 +684,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest() ); @@ -716,7 +718,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest() ); @@ -740,7 +742,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest() ); @@ -772,7 +774,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest() ); @@ -819,7 +821,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest() ); @@ -850,7 +852,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest() ); @@ -871,7 +873,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest() ); @@ -902,7 +904,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest() ); @@ -949,7 +951,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest() ); @@ -980,7 +982,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest() ); @@ -1001,7 +1003,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest() ); @@ -1033,7 +1035,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest() ); @@ -1080,7 +1082,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest() ); @@ -1111,7 +1113,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest() ); @@ -1132,7 +1134,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateNodeRequest() ); @@ -1164,7 +1166,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateNodeRequest() ); @@ -1218,7 +1220,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateNodeRequest() ); @@ -1249,7 +1251,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateNodeRequest() ); @@ -1282,7 +1284,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1304,7 +1306,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1322,7 +1324,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteNodeRequest() ); @@ -1354,7 +1356,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteNodeRequest() ); @@ -1408,7 +1410,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteNodeRequest() ); @@ -1439,7 +1441,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteNodeRequest() ); @@ -1472,7 +1474,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1494,7 +1496,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1512,7 +1514,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StopNodeRequest() ); @@ -1544,7 +1546,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StopNodeRequest() ); @@ -1598,7 +1600,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StopNodeRequest() ); @@ -1629,7 +1631,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StopNodeRequest() ); @@ -1662,7 +1664,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1684,7 +1686,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1702,7 +1704,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StartNodeRequest() ); @@ -1734,7 +1736,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StartNodeRequest() ); @@ -1788,7 +1790,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StartNodeRequest() ); @@ -1819,7 +1821,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.StartNodeRequest() ); @@ -1852,7 +1854,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1874,7 +1876,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1892,7 +1894,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.UpdateNodeRequest() ); @@ -1925,7 +1927,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.UpdateNodeRequest() ); @@ -1980,7 +1982,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.UpdateNodeRequest() ); @@ -2012,7 +2014,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.UpdateNodeRequest() ); @@ -2046,7 +2048,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2068,7 +2070,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2086,7 +2088,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceRequest() ); @@ -2119,7 +2121,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceRequest() ); @@ -2173,7 +2175,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceRequest() ); @@ -2204,7 +2206,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceRequest() ); @@ -2237,7 +2239,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2259,7 +2261,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2280,7 +2282,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest() ); @@ -2313,7 +2315,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest() ); @@ -2367,7 +2369,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest() ); @@ -2398,7 +2400,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest() ); @@ -2431,7 +2433,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2453,7 +2455,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2474,7 +2476,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest() ); @@ -2507,7 +2509,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest() ); @@ -2561,7 +2563,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest() ); @@ -2592,7 +2594,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest() ); @@ -2625,7 +2627,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2647,7 +2649,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2668,7 +2670,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest() ); @@ -2701,7 +2703,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest() ); @@ -2755,7 +2757,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest() ); @@ -2786,7 +2788,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest() ); @@ -2819,7 +2821,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2841,7 +2843,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2862,7 +2864,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceQueuedResourceRequest() ); @@ -2896,7 +2898,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceQueuedResourceRequest() ); @@ -2950,7 +2952,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceQueuedResourceRequest() ); @@ -2982,7 +2984,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.PerformMaintenanceQueuedResourceRequest() ); @@ -3013,7 +3015,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3036,7 +3038,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3057,7 +3059,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest() ); @@ -3090,7 +3092,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest() ); @@ -3144,7 +3146,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest() ); @@ -3178,7 +3180,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest() ); @@ -3211,7 +3213,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3234,7 +3236,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3255,7 +3257,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListNodesRequest() ); @@ -3288,7 +3290,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListNodesRequest() ); @@ -3337,7 +3339,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListNodesRequest() ); @@ -3365,7 +3367,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListNodesRequest() ); @@ -3416,7 +3418,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListNodesRequest() ); @@ -3464,7 +3466,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListNodesRequest() ); @@ -3506,7 +3508,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListNodesRequest() ); @@ -3549,7 +3551,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest() ); @@ -3589,7 +3591,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest() ); @@ -3644,7 +3646,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest() ); @@ -3675,7 +3677,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest() ); @@ -3735,7 +3737,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest() ); @@ -3784,7 +3786,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest() ); @@ -3833,7 +3835,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest() ); @@ -3876,7 +3878,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest() ); @@ -3916,7 +3918,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest() ); @@ -3971,7 +3973,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest() ); @@ -4002,7 +4004,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest() ); @@ -4063,7 +4065,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest() ); @@ -4113,7 +4115,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest() ); @@ -4162,7 +4164,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest() ); @@ -4205,7 +4207,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest() ); @@ -4245,7 +4247,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest() ); @@ -4300,7 +4302,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest() ); @@ -4331,7 +4333,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest() ); @@ -4391,7 +4393,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest() ); @@ -4440,7 +4442,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest() ); @@ -4489,7 +4491,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest() ); @@ -4532,7 +4534,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListReservationsRequest() ); @@ -4571,7 +4573,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListReservationsRequest() ); @@ -4626,7 +4628,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListReservationsRequest() ); @@ -4657,7 +4659,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListReservationsRequest() ); @@ -4717,7 +4719,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListReservationsRequest() ); @@ -4766,7 +4768,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListReservationsRequest() ); @@ -4815,7 +4817,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.tpu.v2alpha1.ListReservationsRequest() ); @@ -4856,7 +4858,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4886,7 +4888,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4930,7 +4932,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4965,7 +4967,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5013,7 +5015,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5054,7 +5056,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5133,7 +5135,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5213,7 +5215,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5309,8 +5311,7 @@ describe('v2alpha1.TpuClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5329,7 +5330,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5338,8 +5339,7 @@ describe('v2alpha1.TpuClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5355,7 +5355,7 @@ describe('v2alpha1.TpuClient', () => { }); describe('Path templates', () => { - describe('acceleratorType', () => { + describe('acceleratorType', async () => { const fakePath = '/rendered/path/acceleratorType'; const expectedParameters = { project: 'projectValue', @@ -5366,7 +5366,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.acceleratorTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5420,7 +5420,7 @@ describe('v2alpha1.TpuClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5430,7 +5430,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5469,7 +5469,7 @@ describe('v2alpha1.TpuClient', () => { }); }); - describe('node', () => { + describe('node', async () => { const fakePath = '/rendered/path/node'; const expectedParameters = { project: 'projectValue', @@ -5480,7 +5480,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5533,7 +5533,7 @@ describe('v2alpha1.TpuClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5542,7 +5542,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5571,7 +5571,7 @@ describe('v2alpha1.TpuClient', () => { }); }); - describe('queuedResource', () => { + describe('queuedResource', async () => { const fakePath = '/rendered/path/queuedResource'; const expectedParameters = { project: 'projectValue', @@ -5582,7 +5582,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.queuedResourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5636,7 +5636,7 @@ describe('v2alpha1.TpuClient', () => { }); }); - describe('reservation', () => { + describe('reservation', async () => { const fakePath = '/rendered/path/reservation'; const expectedParameters = { project: 'projectValue', @@ -5647,7 +5647,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.reservationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5700,7 +5700,7 @@ describe('v2alpha1.TpuClient', () => { }); }); - describe('runtimeVersion', () => { + describe('runtimeVersion', async () => { const fakePath = '/rendered/path/runtimeVersion'; const expectedParameters = { project: 'projectValue', @@ -5711,7 +5711,7 @@ describe('v2alpha1.TpuClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimeVersionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-translate/package.json b/packages/google-cloud-translate/package.json index 0eceb1728e5..4d0e96fc377 100644 --- a/packages/google-cloud-translate/package.json +++ b/packages/google-cloud-translate/package.json @@ -53,7 +53,7 @@ "@google-cloud/promisify": "^5.0.0", "arrify": "^2.0.0", "extend": "^3.0.2", - "google-gax": "^5.0.0-rc.3", + "google-gax": "^5.0.1-rc.0", "is-html": "^2.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json index b42ec83982c..5ea49addbb0 100644 --- a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "8.5.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json index 179df6a77e1..4975ed9e795 100644 --- a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "8.5.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json index f01616ed22f..677f254185f 100644 --- a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "8.5.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json index f1e77ca63c9..5403458f9a0 100644 --- a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "8.5.1", + "version": "9.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/src/v3/translation_service_client.ts b/packages/google-cloud-translate/src/v3/translation_service_client.ts index 56de403369a..51e77fd41e0 100644 --- a/packages/google-cloud-translate/src/v3/translation_service_client.ts +++ b/packages/google-cloud-translate/src/v3/translation_service_client.ts @@ -826,7 +826,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('translateText request %j', request); const wrappedCallback: | Callback< @@ -956,7 +958,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('romanizeText request %j', request); const wrappedCallback: | Callback< @@ -1107,7 +1111,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detectLanguage request %j', request); const wrappedCallback: | Callback< @@ -1259,7 +1265,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSupportedLanguages request %j', request); const wrappedCallback: | Callback< @@ -1451,7 +1459,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('translateDocument request %j', request); const wrappedCallback: | Callback< @@ -1565,7 +1575,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGlossary request %j', request); const wrappedCallback: | Callback< @@ -1681,7 +1693,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGlossaryEntry request %j', request); const wrappedCallback: | Callback< @@ -1808,7 +1822,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGlossaryEntry request %j', request); const wrappedCallback: | Callback< @@ -1933,7 +1949,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ 'glossary_entry.name': request.glossaryEntry!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGlossaryEntry request %j', request); const wrappedCallback: | Callback< @@ -2058,7 +2076,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGlossaryEntry request %j', request); const wrappedCallback: | Callback< @@ -2171,7 +2191,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataset request %j', request); const wrappedCallback: | Callback< @@ -2296,7 +2318,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAdaptiveMtDataset request %j', request); const wrappedCallback: | Callback< @@ -2423,7 +2447,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAdaptiveMtDataset request %j', request); const wrappedCallback: | Callback< @@ -2549,7 +2575,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAdaptiveMtDataset request %j', request); const wrappedCallback: | Callback< @@ -2687,7 +2715,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('adaptiveMtTranslate request %j', request); const wrappedCallback: | Callback< @@ -2807,7 +2837,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAdaptiveMtFile request %j', request); const wrappedCallback: | Callback< @@ -2933,7 +2965,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAdaptiveMtFile request %j', request); const wrappedCallback: | Callback< @@ -3064,7 +3098,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importAdaptiveMtFile request %j', request); const wrappedCallback: | Callback< @@ -3177,7 +3213,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getModel request %j', request); const wrappedCallback: | Callback< @@ -3362,7 +3400,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3600,7 +3640,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3770,7 +3812,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3941,7 +3985,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ 'glossary.name': request.glossary!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4110,7 +4156,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4279,7 +4327,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4446,7 +4496,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4616,7 +4668,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ dataset: request.dataset ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4786,7 +4840,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ dataset: request.dataset ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4956,7 +5012,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5123,7 +5181,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5307,7 +5367,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListGlossariesRequest, @@ -5393,7 +5455,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listGlossaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGlossaries stream %j', request); return this.descriptors.page.listGlossaries.createStream( this.innerApiCalls.listGlossaries as GaxCall, @@ -5461,7 +5525,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listGlossaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGlossaries iterate %j', request); return this.descriptors.page.listGlossaries.asyncIterate( this.innerApiCalls['listGlossaries'] as GaxCall, @@ -5568,7 +5634,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListGlossaryEntriesRequest, @@ -5638,7 +5706,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listGlossaryEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGlossaryEntries stream %j', request); return this.descriptors.page.listGlossaryEntries.createStream( this.innerApiCalls.listGlossaryEntries as GaxCall, @@ -5690,7 +5760,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listGlossaryEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGlossaryEntries iterate %j', request); return this.descriptors.page.listGlossaryEntries.asyncIterate( this.innerApiCalls['listGlossaryEntries'] as GaxCall, @@ -5796,7 +5868,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListDatasetsRequest, @@ -5865,7 +5939,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets stream %j', request); return this.descriptors.page.listDatasets.createStream( this.innerApiCalls.listDatasets as GaxCall, @@ -5916,7 +5992,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatasets iterate %j', request); return this.descriptors.page.listDatasets.asyncIterate( this.innerApiCalls['listDatasets'] as GaxCall, @@ -6027,7 +6105,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListAdaptiveMtDatasetsRequest, @@ -6101,7 +6181,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listAdaptiveMtDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdaptiveMtDatasets stream %j', request); return this.descriptors.page.listAdaptiveMtDatasets.createStream( this.innerApiCalls.listAdaptiveMtDatasets as GaxCall, @@ -6157,7 +6239,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listAdaptiveMtDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdaptiveMtDatasets iterate %j', request); return this.descriptors.page.listAdaptiveMtDatasets.asyncIterate( this.innerApiCalls['listAdaptiveMtDatasets'] as GaxCall, @@ -6265,7 +6349,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListAdaptiveMtFilesRequest, @@ -6336,7 +6422,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listAdaptiveMtFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdaptiveMtFiles stream %j', request); return this.descriptors.page.listAdaptiveMtFiles.createStream( this.innerApiCalls.listAdaptiveMtFiles as GaxCall, @@ -6389,7 +6477,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listAdaptiveMtFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdaptiveMtFiles iterate %j', request); return this.descriptors.page.listAdaptiveMtFiles.asyncIterate( this.innerApiCalls['listAdaptiveMtFiles'] as GaxCall, @@ -6498,7 +6588,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListAdaptiveMtSentencesRequest, @@ -6570,7 +6662,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listAdaptiveMtSentences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdaptiveMtSentences stream %j', request); return this.descriptors.page.listAdaptiveMtSentences.createStream( this.innerApiCalls.listAdaptiveMtSentences as GaxCall, @@ -6624,7 +6718,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listAdaptiveMtSentences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAdaptiveMtSentences iterate %j', request); return this.descriptors.page.listAdaptiveMtSentences.asyncIterate( this.innerApiCalls['listAdaptiveMtSentences'] as GaxCall, @@ -6734,7 +6830,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListExamplesRequest, @@ -6807,7 +6905,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listExamples']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExamples stream %j', request); return this.descriptors.page.listExamples.createStream( this.innerApiCalls.listExamples as GaxCall, @@ -6862,7 +6962,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listExamples']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExamples iterate %j', request); return this.descriptors.page.listExamples.asyncIterate( this.innerApiCalls['listExamples'] as GaxCall, @@ -6966,7 +7068,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3.IListModelsRequest, @@ -7039,7 +7143,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels stream %j', request); return this.descriptors.page.listModels.createStream( this.innerApiCalls.listModels as GaxCall, @@ -7094,7 +7200,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listModels iterate %j', request); return this.descriptors.page.listModels.asyncIterate( this.innerApiCalls['listModels'] as GaxCall, @@ -7412,7 +7520,7 @@ export class TranslationServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts b/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts index 4b330bf238d..722bc13fb2c 100644 --- a/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts +++ b/packages/google-cloud-translate/src/v3beta1/translation_service_client.ts @@ -650,7 +650,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('translateText request %j', request); const wrappedCallback: | Callback< @@ -809,7 +811,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detectLanguage request %j', request); const wrappedCallback: | Callback< @@ -964,7 +968,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSupportedLanguages request %j', request); const wrappedCallback: | Callback< @@ -1161,7 +1167,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('translateDocument request %j', request); const wrappedCallback: | Callback< @@ -1281,7 +1289,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGlossary request %j', request); const wrappedCallback: | Callback< @@ -1468,7 +1478,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1706,7 +1718,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1876,7 +1890,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2045,7 +2061,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2229,7 +2247,9 @@ export class TranslationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.translation.v3beta1.IListGlossariesRequest, @@ -2315,7 +2335,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listGlossaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGlossaries stream %j', request); return this.descriptors.page.listGlossaries.createStream( this.innerApiCalls.listGlossaries as GaxCall, @@ -2383,7 +2405,9 @@ export class TranslationServiceClient { }); const defaultCallSettings = this._defaults['listGlossaries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGlossaries iterate %j', request); return this.descriptors.page.listGlossaries.asyncIterate( this.innerApiCalls['listGlossaries'] as GaxCall, diff --git a/packages/google-cloud-translate/test/gapic_translation_service_v3.ts b/packages/google-cloud-translate/test/gapic_translation_service_v3.ts index 045bb934abe..18b0adaee09 100644 --- a/packages/google-cloud-translate/test/gapic_translation_service_v3.ts +++ b/packages/google-cloud-translate/test/gapic_translation_service_v3.ts @@ -292,7 +292,9 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.translationServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateTextRequest() ); @@ -382,7 +384,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateTextRequest() ); @@ -429,7 +431,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateTextRequest() ); @@ -460,7 +462,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateTextRequest() ); @@ -481,7 +483,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.RomanizeTextRequest() ); @@ -512,7 +514,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.RomanizeTextRequest() ); @@ -559,7 +561,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.RomanizeTextRequest() ); @@ -590,7 +592,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.RomanizeTextRequest() ); @@ -611,7 +613,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DetectLanguageRequest() ); @@ -642,7 +644,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DetectLanguageRequest() ); @@ -689,7 +691,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DetectLanguageRequest() ); @@ -720,7 +722,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DetectLanguageRequest() ); @@ -741,7 +743,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetSupportedLanguagesRequest() ); @@ -773,7 +775,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetSupportedLanguagesRequest() ); @@ -820,7 +822,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetSupportedLanguagesRequest() ); @@ -854,7 +856,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetSupportedLanguagesRequest() ); @@ -878,7 +880,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateDocumentRequest() ); @@ -909,7 +911,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateDocumentRequest() ); @@ -956,7 +958,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateDocumentRequest() ); @@ -987,7 +989,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.TranslateDocumentRequest() ); @@ -1008,7 +1010,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryRequest() ); @@ -1039,7 +1041,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryRequest() ); @@ -1086,7 +1088,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryRequest() ); @@ -1117,7 +1119,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryRequest() ); @@ -1138,7 +1140,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryEntryRequest() ); @@ -1169,7 +1171,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryEntryRequest() ); @@ -1216,7 +1218,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryEntryRequest() ); @@ -1247,7 +1249,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetGlossaryEntryRequest() ); @@ -1268,7 +1270,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryEntryRequest() ); @@ -1300,7 +1302,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryEntryRequest() ); @@ -1347,7 +1349,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryEntryRequest() ); @@ -1378,7 +1380,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryEntryRequest() ); @@ -1399,7 +1401,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryEntryRequest() ); @@ -1432,7 +1434,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryEntryRequest() ); @@ -1480,7 +1482,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryEntryRequest() ); @@ -1512,7 +1514,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryEntryRequest() ); @@ -1534,7 +1536,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryEntryRequest() ); @@ -1566,7 +1568,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryEntryRequest() ); @@ -1613,7 +1615,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryEntryRequest() ); @@ -1644,7 +1646,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryEntryRequest() ); @@ -1665,7 +1667,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetDatasetRequest() ); @@ -1696,7 +1698,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetDatasetRequest() ); @@ -1743,7 +1745,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetDatasetRequest() ); @@ -1774,7 +1776,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetDatasetRequest() ); @@ -1795,7 +1797,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest() ); @@ -1827,7 +1829,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest() ); @@ -1874,7 +1876,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest() ); @@ -1908,7 +1910,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest() ); @@ -1932,7 +1934,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest() ); @@ -1964,7 +1966,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest() ); @@ -2011,7 +2013,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest() ); @@ -2045,7 +2047,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest() ); @@ -2069,7 +2071,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest() ); @@ -2101,7 +2103,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest() ); @@ -2148,7 +2150,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest() ); @@ -2179,7 +2181,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtDatasetRequest() ); @@ -2200,7 +2202,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.AdaptiveMtTranslateRequest() ); @@ -2232,7 +2234,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.AdaptiveMtTranslateRequest() ); @@ -2279,7 +2281,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.AdaptiveMtTranslateRequest() ); @@ -2310,7 +2312,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.AdaptiveMtTranslateRequest() ); @@ -2331,7 +2333,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtFileRequest() ); @@ -2362,7 +2364,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtFileRequest() ); @@ -2409,7 +2411,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtFileRequest() ); @@ -2440,7 +2442,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetAdaptiveMtFileRequest() ); @@ -2461,7 +2463,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest() ); @@ -2493,7 +2495,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest() ); @@ -2540,7 +2542,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest() ); @@ -2571,7 +2573,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteAdaptiveMtFileRequest() ); @@ -2592,7 +2594,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportAdaptiveMtFileRequest() ); @@ -2624,7 +2626,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportAdaptiveMtFileRequest() ); @@ -2671,7 +2673,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportAdaptiveMtFileRequest() ); @@ -2702,7 +2704,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportAdaptiveMtFileRequest() ); @@ -2723,7 +2725,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetModelRequest() ); @@ -2754,7 +2756,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetModelRequest() ); @@ -2801,7 +2803,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetModelRequest() ); @@ -2829,7 +2831,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.GetModelRequest() ); @@ -2850,7 +2852,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateTextRequest() ); @@ -2883,7 +2885,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateTextRequest() ); @@ -2937,7 +2939,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateTextRequest() ); @@ -2968,7 +2970,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateTextRequest() ); @@ -3001,7 +3003,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3023,7 +3025,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3044,7 +3046,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateDocumentRequest() ); @@ -3077,7 +3079,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateDocumentRequest() ); @@ -3131,7 +3133,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateDocumentRequest() ); @@ -3165,7 +3167,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.BatchTranslateDocumentRequest() ); @@ -3198,7 +3200,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3220,7 +3222,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3241,7 +3243,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryRequest() ); @@ -3274,7 +3276,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryRequest() ); @@ -3328,7 +3330,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryRequest() ); @@ -3359,7 +3361,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateGlossaryRequest() ); @@ -3392,7 +3394,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3414,7 +3416,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3435,7 +3437,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryRequest() ); @@ -3469,7 +3471,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryRequest() ); @@ -3524,7 +3526,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryRequest() ); @@ -3556,7 +3558,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.UpdateGlossaryRequest() ); @@ -3590,7 +3592,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3612,7 +3614,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3633,7 +3635,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryRequest() ); @@ -3666,7 +3668,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryRequest() ); @@ -3720,7 +3722,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryRequest() ); @@ -3751,7 +3753,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteGlossaryRequest() ); @@ -3784,7 +3786,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3806,7 +3808,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3827,7 +3829,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateDatasetRequest() ); @@ -3860,7 +3862,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateDatasetRequest() ); @@ -3914,7 +3916,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateDatasetRequest() ); @@ -3945,7 +3947,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateDatasetRequest() ); @@ -3978,7 +3980,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4000,7 +4002,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4021,7 +4023,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteDatasetRequest() ); @@ -4054,7 +4056,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteDatasetRequest() ); @@ -4108,7 +4110,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteDatasetRequest() ); @@ -4139,7 +4141,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteDatasetRequest() ); @@ -4172,7 +4174,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4194,7 +4196,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4215,7 +4217,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportDataRequest() ); @@ -4247,7 +4249,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportDataRequest() ); @@ -4301,7 +4303,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportDataRequest() ); @@ -4332,7 +4334,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ImportDataRequest() ); @@ -4365,7 +4367,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4387,7 +4389,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4405,7 +4407,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ExportDataRequest() ); @@ -4437,7 +4439,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ExportDataRequest() ); @@ -4491,7 +4493,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ExportDataRequest() ); @@ -4522,7 +4524,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ExportDataRequest() ); @@ -4555,7 +4557,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4577,7 +4579,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4595,7 +4597,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateModelRequest() ); @@ -4627,7 +4629,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateModelRequest() ); @@ -4681,7 +4683,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateModelRequest() ); @@ -4712,7 +4714,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.CreateModelRequest() ); @@ -4745,7 +4747,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4767,7 +4769,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4785,7 +4787,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteModelRequest() ); @@ -4817,7 +4819,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteModelRequest() ); @@ -4871,7 +4873,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteModelRequest() ); @@ -4902,7 +4904,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.DeleteModelRequest() ); @@ -4935,7 +4937,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4957,7 +4959,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4975,7 +4977,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossariesRequest() ); @@ -5014,7 +5016,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossariesRequest() ); @@ -5069,7 +5071,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossariesRequest() ); @@ -5100,7 +5102,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossariesRequest() ); @@ -5160,7 +5162,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossariesRequest() ); @@ -5209,7 +5211,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossariesRequest() ); @@ -5258,7 +5260,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossariesRequest() ); @@ -5300,7 +5302,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossaryEntriesRequest() ); @@ -5340,7 +5342,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossaryEntriesRequest() ); @@ -5395,7 +5397,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossaryEntriesRequest() ); @@ -5426,7 +5428,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossaryEntriesRequest() ); @@ -5487,7 +5489,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossaryEntriesRequest() ); @@ -5537,7 +5539,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossaryEntriesRequest() ); @@ -5586,7 +5588,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListGlossaryEntriesRequest() ); @@ -5629,7 +5631,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListDatasetsRequest() ); @@ -5662,7 +5664,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListDatasetsRequest() ); @@ -5711,7 +5713,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListDatasetsRequest() ); @@ -5742,7 +5744,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListDatasetsRequest() ); @@ -5796,7 +5798,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListDatasetsRequest() ); @@ -5847,7 +5849,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListDatasetsRequest() ); @@ -5890,7 +5892,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListDatasetsRequest() ); @@ -5932,7 +5934,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest() ); @@ -5972,7 +5974,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest() ); @@ -6029,7 +6031,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest() ); @@ -6063,7 +6065,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest() ); @@ -6130,7 +6132,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest() ); @@ -6186,7 +6188,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest() ); @@ -6240,7 +6242,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest() ); @@ -6287,7 +6289,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtFilesRequest() ); @@ -6327,7 +6329,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtFilesRequest() ); @@ -6382,7 +6384,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtFilesRequest() ); @@ -6413,7 +6415,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtFilesRequest() ); @@ -6474,7 +6476,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtFilesRequest() ); @@ -6524,7 +6526,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtFilesRequest() ); @@ -6574,7 +6576,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtFilesRequest() ); @@ -6617,7 +6619,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest() ); @@ -6657,7 +6659,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest() ); @@ -6714,7 +6716,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest() ); @@ -6748,7 +6750,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest() ); @@ -6815,7 +6817,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest() ); @@ -6871,7 +6873,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest() ); @@ -6925,7 +6927,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListAdaptiveMtSentencesRequest() ); @@ -6972,7 +6974,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListExamplesRequest() ); @@ -7005,7 +7007,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListExamplesRequest() ); @@ -7054,7 +7056,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListExamplesRequest() ); @@ -7085,7 +7087,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListExamplesRequest() ); @@ -7139,7 +7141,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListExamplesRequest() ); @@ -7190,7 +7192,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListExamplesRequest() ); @@ -7233,7 +7235,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListExamplesRequest() ); @@ -7275,7 +7277,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListModelsRequest() ); @@ -7308,7 +7310,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListModelsRequest() ); @@ -7357,7 +7359,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListModelsRequest() ); @@ -7388,7 +7390,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListModelsRequest() ); @@ -7442,7 +7444,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListModelsRequest() ); @@ -7493,7 +7495,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListModelsRequest() ); @@ -7536,7 +7538,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3.ListModelsRequest() ); @@ -7579,7 +7581,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7609,7 +7611,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7653,7 +7655,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7685,7 +7687,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7715,7 +7717,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7759,7 +7761,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7791,7 +7793,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7824,7 +7826,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7868,7 +7870,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7903,7 +7905,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7933,7 +7935,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7977,7 +7979,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -8012,7 +8014,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -8060,7 +8062,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -8101,7 +8103,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -8180,7 +8182,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -8260,7 +8262,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -8356,8 +8358,7 @@ describe('v3.TranslationServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -8376,7 +8377,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -8385,8 +8386,7 @@ describe('v3.TranslationServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -8402,7 +8402,7 @@ describe('v3.TranslationServiceClient', () => { }); describe('Path templates', () => { - describe('adaptiveMtDataset', () => { + describe('adaptiveMtDataset', async () => { const fakePath = '/rendered/path/adaptiveMtDataset'; const expectedParameters = { project: 'projectValue', @@ -8413,7 +8413,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adaptiveMtDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8478,7 +8478,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('adaptiveMtFile', () => { + describe('adaptiveMtFile', async () => { const fakePath = '/rendered/path/adaptiveMtFile'; const expectedParameters = { project: 'projectValue', @@ -8490,7 +8490,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adaptiveMtFilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8554,7 +8554,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('adaptiveMtSentence', () => { + describe('adaptiveMtSentence', async () => { const fakePath = '/rendered/path/adaptiveMtSentence'; const expectedParameters = { project: 'projectValue', @@ -8567,7 +8567,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.adaptiveMtSentencePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8660,7 +8660,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -8671,7 +8671,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8724,7 +8724,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -8736,7 +8736,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8800,7 +8800,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('glossary', () => { + describe('glossary', async () => { const fakePath = '/rendered/path/glossary'; const expectedParameters = { project: 'projectValue', @@ -8811,7 +8811,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.glossaryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8864,7 +8864,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('glossaryEntry', () => { + describe('glossaryEntry', async () => { const fakePath = '/rendered/path/glossaryEntry'; const expectedParameters = { project: 'projectValue', @@ -8876,7 +8876,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.glossaryEntryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8940,7 +8940,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8950,7 +8950,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8989,7 +8989,7 @@ describe('v3.TranslationServiceClient', () => { }); }); - describe('model', () => { + describe('model', async () => { const fakePath = '/rendered/path/model'; const expectedParameters = { project: 'projectValue', @@ -9000,7 +9000,7 @@ describe('v3.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.modelPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-translate/test/gapic_translation_service_v3beta1.ts b/packages/google-cloud-translate/test/gapic_translation_service_v3beta1.ts index f78b786b318..da66dca5ea9 100644 --- a/packages/google-cloud-translate/test/gapic_translation_service_v3beta1.ts +++ b/packages/google-cloud-translate/test/gapic_translation_service_v3beta1.ts @@ -295,7 +295,9 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.translationServiceStub); client.close().then(() => { done(); @@ -358,7 +360,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateTextRequest() ); @@ -390,7 +392,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateTextRequest() ); @@ -438,7 +440,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateTextRequest() ); @@ -470,7 +472,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateTextRequest() ); @@ -492,7 +494,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DetectLanguageRequest() ); @@ -524,7 +526,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DetectLanguageRequest() ); @@ -572,7 +574,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DetectLanguageRequest() ); @@ -604,7 +606,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DetectLanguageRequest() ); @@ -626,7 +628,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest() ); @@ -659,7 +661,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest() ); @@ -707,7 +709,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest() ); @@ -742,7 +744,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest() ); @@ -767,7 +769,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateDocumentRequest() ); @@ -799,7 +801,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateDocumentRequest() ); @@ -847,7 +849,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateDocumentRequest() ); @@ -879,7 +881,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.TranslateDocumentRequest() ); @@ -901,7 +903,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetGlossaryRequest() ); @@ -933,7 +935,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetGlossaryRequest() ); @@ -981,7 +983,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetGlossaryRequest() ); @@ -1013,7 +1015,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.GetGlossaryRequest() ); @@ -1035,7 +1037,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateTextRequest() ); @@ -1069,7 +1071,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateTextRequest() ); @@ -1124,7 +1126,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateTextRequest() ); @@ -1156,7 +1158,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateTextRequest() ); @@ -1190,7 +1192,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1213,7 +1215,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1235,7 +1237,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateDocumentRequest() ); @@ -1269,7 +1271,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateDocumentRequest() ); @@ -1324,7 +1326,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateDocumentRequest() ); @@ -1359,7 +1361,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.BatchTranslateDocumentRequest() ); @@ -1393,7 +1395,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1416,7 +1418,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1438,7 +1440,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.CreateGlossaryRequest() ); @@ -1472,7 +1474,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.CreateGlossaryRequest() ); @@ -1527,7 +1529,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.CreateGlossaryRequest() ); @@ -1559,7 +1561,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.CreateGlossaryRequest() ); @@ -1593,7 +1595,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1616,7 +1618,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1638,7 +1640,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DeleteGlossaryRequest() ); @@ -1672,7 +1674,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DeleteGlossaryRequest() ); @@ -1727,7 +1729,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DeleteGlossaryRequest() ); @@ -1759,7 +1761,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.DeleteGlossaryRequest() ); @@ -1793,7 +1795,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1816,7 +1818,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1838,7 +1840,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.ListGlossariesRequest() ); @@ -1878,7 +1880,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.ListGlossariesRequest() ); @@ -1934,7 +1936,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.ListGlossariesRequest() ); @@ -1966,7 +1968,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.ListGlossariesRequest() ); @@ -2028,7 +2030,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.ListGlossariesRequest() ); @@ -2079,7 +2081,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.ListGlossariesRequest() ); @@ -2129,7 +2131,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.translation.v3beta1.ListGlossariesRequest() ); @@ -2167,7 +2169,7 @@ describe('v3beta1.TranslationServiceClient', () => { }); describe('Path templates', () => { - describe('glossary', () => { + describe('glossary', async () => { const fakePath = '/rendered/path/glossary'; const expectedParameters = { project: 'projectValue', @@ -2179,7 +2181,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.glossaryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2232,7 +2234,7 @@ describe('v3beta1.TranslationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2243,7 +2245,7 @@ describe('v3beta1.TranslationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-translate/tsconfig.json b/packages/google-cloud-translate/tsconfig.json index 557a53c966f..860d6bf027b 100644 --- a/packages/google-cloud-translate/tsconfig.json +++ b/packages/google-cloud-translate/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2023", + "es2018", "dom" ] }, diff --git a/packages/google-cloud-video-livestream/package.json b/packages/google-cloud-video-livestream/package.json index 276f926ac53..600b54f29cc 100644 --- a/packages/google-cloud-video-livestream/package.json +++ b/packages/google-cloud-video-livestream/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json index c525d268251..d427b1d1e12 100644 --- a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json +++ b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-livestream", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json index 6bd6b46dec4..7a582047bf0 100644 --- a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json +++ b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-livestream", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts b/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts index 5c82a997e20..61416edd769 100644 --- a/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts +++ b/packages/google-cloud-video-livestream/src/v1/livestream_service_client.ts @@ -743,7 +743,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChannel request %j', request); const wrappedCallback: | Callback< @@ -863,7 +865,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInput request %j', request); const wrappedCallback: | Callback< @@ -1000,7 +1004,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEvent request %j', request); const wrappedCallback: | Callback< @@ -1120,7 +1126,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvent request %j', request); const wrappedCallback: | Callback< @@ -1251,7 +1259,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEvent request %j', request); const wrappedCallback: | Callback< @@ -1371,7 +1381,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getClip request %j', request); const wrappedCallback: | Callback< @@ -1488,7 +1500,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAsset request %j', request); const wrappedCallback: | Callback< @@ -1605,7 +1619,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPool request %j', request); const wrappedCallback: | Callback< @@ -1756,7 +1772,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1943,7 +1961,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2145,7 +2165,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ 'channel.name': request.channel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2328,7 +2350,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2511,7 +2535,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2699,7 +2725,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2881,7 +2909,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3075,7 +3105,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ 'input.name': request.input!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3264,7 +3296,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3447,7 +3481,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3636,7 +3672,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3818,7 +3856,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4007,7 +4047,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ 'pool.name': request.pool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4179,7 +4221,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.livestream.v1.IListChannelsRequest, @@ -4254,7 +4298,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listChannels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannels stream %j', request); return this.descriptors.page.listChannels.createStream( this.innerApiCalls.listChannels as GaxCall, @@ -4311,7 +4357,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listChannels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannels iterate %j', request); return this.descriptors.page.listChannels.asyncIterate( this.innerApiCalls['listChannels'] as GaxCall, @@ -4423,7 +4471,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.livestream.v1.IListInputsRequest, @@ -4498,7 +4548,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listInputs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInputs stream %j', request); return this.descriptors.page.listInputs.createStream( this.innerApiCalls.listInputs as GaxCall, @@ -4555,7 +4607,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listInputs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInputs iterate %j', request); return this.descriptors.page.listInputs.asyncIterate( this.innerApiCalls['listInputs'] as GaxCall, @@ -4667,7 +4721,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.livestream.v1.IListEventsRequest, @@ -4742,7 +4798,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvents stream %j', request); return this.descriptors.page.listEvents.createStream( this.innerApiCalls.listEvents as GaxCall, @@ -4799,7 +4857,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listEvents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvents iterate %j', request); return this.descriptors.page.listEvents.asyncIterate( this.innerApiCalls['listEvents'] as GaxCall, @@ -4906,7 +4966,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.livestream.v1.IListClipsRequest, @@ -4976,7 +5038,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listClips']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClips stream %j', request); return this.descriptors.page.listClips.createStream( this.innerApiCalls.listClips as GaxCall, @@ -5028,7 +5092,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listClips']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClips iterate %j', request); return this.descriptors.page.listClips.asyncIterate( this.innerApiCalls['listClips'] as GaxCall, @@ -5136,7 +5202,9 @@ export class LivestreamServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.livestream.v1.IListAssetsRequest, @@ -5207,7 +5275,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets stream %j', request); return this.descriptors.page.listAssets.createStream( this.innerApiCalls.listAssets as GaxCall, @@ -5260,7 +5330,9 @@ export class LivestreamServiceClient { }); const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAssets iterate %j', request); return this.descriptors.page.listAssets.asyncIterate( this.innerApiCalls['listAssets'] as GaxCall, @@ -5440,7 +5512,7 @@ export class LivestreamServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts b/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts index c2e5774af74..fdfc9ec339c 100644 --- a/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts +++ b/packages/google-cloud-video-livestream/test/gapic_livestream_service_v1.ts @@ -290,7 +290,9 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.livestreamServiceStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetChannelRequest() ); @@ -380,7 +382,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetChannelRequest() ); @@ -427,7 +429,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetChannelRequest() ); @@ -458,7 +460,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetChannelRequest() ); @@ -479,7 +481,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetInputRequest() ); @@ -510,7 +512,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetInputRequest() ); @@ -557,7 +559,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetInputRequest() ); @@ -585,7 +587,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetInputRequest() ); @@ -606,7 +608,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateEventRequest() ); @@ -637,7 +639,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateEventRequest() ); @@ -684,7 +686,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateEventRequest() ); @@ -715,7 +717,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateEventRequest() ); @@ -736,7 +738,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetEventRequest() ); @@ -767,7 +769,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetEventRequest() ); @@ -814,7 +816,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetEventRequest() ); @@ -842,7 +844,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetEventRequest() ); @@ -863,7 +865,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteEventRequest() ); @@ -894,7 +896,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteEventRequest() ); @@ -941,7 +943,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteEventRequest() ); @@ -972,7 +974,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteEventRequest() ); @@ -993,7 +995,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetClipRequest() ); @@ -1024,7 +1026,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetClipRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetClipRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetClipRequest() ); @@ -1120,7 +1122,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetAssetRequest() ); @@ -1151,7 +1153,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetAssetRequest() ); @@ -1198,7 +1200,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetAssetRequest() ); @@ -1226,7 +1228,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetAssetRequest() ); @@ -1247,7 +1249,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetPoolRequest() ); @@ -1278,7 +1280,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetPoolRequest() ); @@ -1325,7 +1327,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetPoolRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.GetPoolRequest() ); @@ -1374,7 +1376,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateChannelRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateChannelRequest() ); @@ -1461,7 +1463,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateChannelRequest() ); @@ -1492,7 +1494,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateChannelRequest() ); @@ -1525,7 +1527,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1547,7 +1549,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1568,7 +1570,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteChannelRequest() ); @@ -1601,7 +1603,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteChannelRequest() ); @@ -1655,7 +1657,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteChannelRequest() ); @@ -1686,7 +1688,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteChannelRequest() ); @@ -1719,7 +1721,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1741,7 +1743,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1762,7 +1764,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateChannelRequest() ); @@ -1796,7 +1798,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateChannelRequest() ); @@ -1851,7 +1853,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateChannelRequest() ); @@ -1883,7 +1885,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateChannelRequest() ); @@ -1917,7 +1919,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1939,7 +1941,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1960,7 +1962,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StartChannelRequest() ); @@ -1992,7 +1994,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StartChannelRequest() ); @@ -2046,7 +2048,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StartChannelRequest() ); @@ -2077,7 +2079,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StartChannelRequest() ); @@ -2110,7 +2112,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2132,7 +2134,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2150,7 +2152,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StopChannelRequest() ); @@ -2182,7 +2184,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StopChannelRequest() ); @@ -2236,7 +2238,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StopChannelRequest() ); @@ -2267,7 +2269,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.StopChannelRequest() ); @@ -2300,7 +2302,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2322,7 +2324,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2340,7 +2342,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateInputRequest() ); @@ -2372,7 +2374,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateInputRequest() ); @@ -2426,7 +2428,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateInputRequest() ); @@ -2457,7 +2459,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateInputRequest() ); @@ -2490,7 +2492,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2512,7 +2514,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2530,7 +2532,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteInputRequest() ); @@ -2562,7 +2564,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteInputRequest() ); @@ -2616,7 +2618,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteInputRequest() ); @@ -2647,7 +2649,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteInputRequest() ); @@ -2680,7 +2682,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2702,7 +2704,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2720,7 +2722,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateInputRequest() ); @@ -2753,7 +2755,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateInputRequest() ); @@ -2808,7 +2810,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateInputRequest() ); @@ -2840,7 +2842,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdateInputRequest() ); @@ -2874,7 +2876,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2896,7 +2898,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2914,7 +2916,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateClipRequest() ); @@ -2946,7 +2948,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateClipRequest() ); @@ -3000,7 +3002,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateClipRequest() ); @@ -3031,7 +3033,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateClipRequest() ); @@ -3064,7 +3066,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3086,7 +3088,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3104,7 +3106,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteClipRequest() ); @@ -3136,7 +3138,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteClipRequest() ); @@ -3190,7 +3192,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteClipRequest() ); @@ -3221,7 +3223,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteClipRequest() ); @@ -3254,7 +3256,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3276,7 +3278,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3294,7 +3296,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); @@ -3326,7 +3328,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); @@ -3380,7 +3382,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); @@ -3411,7 +3413,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.CreateAssetRequest() ); @@ -3444,7 +3446,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3466,7 +3468,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3484,7 +3486,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() ); @@ -3516,7 +3518,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() ); @@ -3570,7 +3572,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() ); @@ -3601,7 +3603,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.DeleteAssetRequest() ); @@ -3634,7 +3636,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3656,7 +3658,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3674,7 +3676,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() ); @@ -3707,7 +3709,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() ); @@ -3762,7 +3764,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() ); @@ -3794,7 +3796,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.UpdatePoolRequest() ); @@ -3828,7 +3830,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3850,7 +3852,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3868,7 +3870,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListChannelsRequest() ); @@ -3907,7 +3909,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListChannelsRequest() ); @@ -3962,7 +3964,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListChannelsRequest() ); @@ -3993,7 +3995,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListChannelsRequest() ); @@ -4053,7 +4055,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListChannelsRequest() ); @@ -4104,7 +4106,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListChannelsRequest() ); @@ -4153,7 +4155,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListChannelsRequest() ); @@ -4196,7 +4198,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); @@ -4235,7 +4237,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); @@ -4290,7 +4292,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); @@ -4321,7 +4323,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); @@ -4381,7 +4383,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); @@ -4432,7 +4434,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); @@ -4481,7 +4483,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListInputsRequest() ); @@ -4525,7 +4527,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); @@ -4564,7 +4566,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); @@ -4619,7 +4621,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); @@ -4650,7 +4652,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); @@ -4710,7 +4712,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); @@ -4761,7 +4763,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); @@ -4810,7 +4812,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListEventsRequest() ); @@ -4854,7 +4856,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListClipsRequest() ); @@ -4893,7 +4895,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListClipsRequest() ); @@ -4948,7 +4950,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListClipsRequest() ); @@ -4976,7 +4978,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListClipsRequest() ); @@ -5036,7 +5038,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListClipsRequest() ); @@ -5087,7 +5089,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListClipsRequest() ); @@ -5135,7 +5137,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListClipsRequest() ); @@ -5178,7 +5180,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); @@ -5217,7 +5219,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); @@ -5272,7 +5274,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); @@ -5303,7 +5305,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); @@ -5363,7 +5365,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); @@ -5414,7 +5416,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); @@ -5463,7 +5465,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.livestream.v1.ListAssetsRequest() ); @@ -5506,7 +5508,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5536,7 +5538,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5580,7 +5582,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5615,7 +5617,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5663,7 +5665,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5704,7 +5706,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5783,7 +5785,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5863,7 +5865,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5959,8 +5961,7 @@ describe('v1.LivestreamServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5979,7 +5980,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5988,8 +5989,7 @@ describe('v1.LivestreamServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -6005,7 +6005,7 @@ describe('v1.LivestreamServiceClient', () => { }); describe('Path templates', () => { - describe('asset', () => { + describe('asset', async () => { const fakePath = '/rendered/path/asset'; const expectedParameters = { project: 'projectValue', @@ -6016,7 +6016,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.assetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6069,7 +6069,7 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('channel', () => { + describe('channel', async () => { const fakePath = '/rendered/path/channel'; const expectedParameters = { project: 'projectValue', @@ -6080,7 +6080,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.channelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6133,7 +6133,7 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('clip', () => { + describe('clip', async () => { const fakePath = '/rendered/path/clip'; const expectedParameters = { project: 'projectValue', @@ -6145,7 +6145,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clipPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6209,7 +6209,7 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('event', () => { + describe('event', async () => { const fakePath = '/rendered/path/event'; const expectedParameters = { project: 'projectValue', @@ -6221,7 +6221,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.eventPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6285,7 +6285,7 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('input', () => { + describe('input', async () => { const fakePath = '/rendered/path/input'; const expectedParameters = { project: 'projectValue', @@ -6296,7 +6296,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.inputPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6349,7 +6349,7 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -6359,7 +6359,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6398,7 +6398,7 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('pool', () => { + describe('pool', async () => { const fakePath = '/rendered/path/pool'; const expectedParameters = { project: 'projectValue', @@ -6409,7 +6409,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.poolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6462,7 +6462,7 @@ describe('v1.LivestreamServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -6471,7 +6471,7 @@ describe('v1.LivestreamServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-video-stitcher/package.json b/packages/google-cloud-video-stitcher/package.json index a29e55a8acc..14be01633b8 100644 --- a/packages/google-cloud-video-stitcher/package.json +++ b/packages/google-cloud-video-stitcher/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", 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 7cc5eea38f5..c97d396a38b 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-stitcher", - "version": "2.4.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { 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 d51be96dcf6..c0984804f48 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-stitcher", - "version": "2.4.1", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { 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 d89d65084ec..3a1dd10936f 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 @@ -740,7 +740,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCdnKey request %j', request); const wrappedCallback: | Callback< @@ -866,7 +868,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createVodSession request %j', request); const wrappedCallback: | Callback< @@ -987,7 +991,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVodSession request %j', request); const wrappedCallback: | Callback< @@ -1114,7 +1120,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVodStitchDetail request %j', request); const wrappedCallback: | Callback< @@ -1241,7 +1249,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVodAdTagDetail request %j', request); const wrappedCallback: | Callback< @@ -1367,7 +1377,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLiveAdTagDetail request %j', request); const wrappedCallback: | Callback< @@ -1481,7 +1493,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSlate request %j', request); const wrappedCallback: | Callback< @@ -1606,7 +1620,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createLiveSession request %j', request); const wrappedCallback: | Callback< @@ -1726,7 +1742,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLiveSession request %j', request); const wrappedCallback: | Callback< @@ -1848,7 +1866,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLiveConfig request %j', request); const wrappedCallback: | Callback< @@ -1969,7 +1989,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVodConfig request %j', request); const wrappedCallback: | Callback< @@ -2111,7 +2133,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2279,7 +2303,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2451,7 +2477,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ 'cdn_key.name': request.cdnKey!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2640,7 +2668,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2809,7 +2839,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ 'slate.name': request.slate!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2977,7 +3009,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3164,7 +3198,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3332,7 +3368,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3505,7 +3543,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ 'live_config.name': request.liveConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3692,7 +3732,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3860,7 +3902,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4033,7 +4077,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ 'vod_config.name': request.vodConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4201,7 +4247,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.stitcher.v1.IListCdnKeysRequest, @@ -4272,7 +4320,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listCdnKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCdnKeys stream %j', request); return this.descriptors.page.listCdnKeys.createStream( this.innerApiCalls.listCdnKeys as GaxCall, @@ -4325,7 +4375,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listCdnKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCdnKeys iterate %j', request); return this.descriptors.page.listCdnKeys.asyncIterate( this.innerApiCalls['listCdnKeys'] as GaxCall, @@ -4429,7 +4481,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.stitcher.v1.IListVodStitchDetailsRequest, @@ -4495,7 +4549,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listVodStitchDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVodStitchDetails stream %j', request); return this.descriptors.page.listVodStitchDetails.createStream( this.innerApiCalls.listVodStitchDetails as GaxCall, @@ -4543,7 +4599,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listVodStitchDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVodStitchDetails iterate %j', request); return this.descriptors.page.listVodStitchDetails.asyncIterate( this.innerApiCalls['listVodStitchDetails'] as GaxCall, @@ -4646,7 +4704,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.stitcher.v1.IListVodAdTagDetailsRequest, @@ -4712,7 +4772,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listVodAdTagDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVodAdTagDetails stream %j', request); return this.descriptors.page.listVodAdTagDetails.createStream( this.innerApiCalls.listVodAdTagDetails as GaxCall, @@ -4760,7 +4822,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listVodAdTagDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVodAdTagDetails iterate %j', request); return this.descriptors.page.listVodAdTagDetails.asyncIterate( this.innerApiCalls['listVodAdTagDetails'] as GaxCall, @@ -4863,7 +4927,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.stitcher.v1.IListLiveAdTagDetailsRequest, @@ -4929,7 +4995,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listLiveAdTagDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLiveAdTagDetails stream %j', request); return this.descriptors.page.listLiveAdTagDetails.createStream( this.innerApiCalls.listLiveAdTagDetails as GaxCall, @@ -4977,7 +5045,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listLiveAdTagDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLiveAdTagDetails iterate %j', request); return this.descriptors.page.listLiveAdTagDetails.asyncIterate( this.innerApiCalls['listLiveAdTagDetails'] as GaxCall, @@ -5085,7 +5155,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.stitcher.v1.IListSlatesRequest, @@ -5156,7 +5228,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listSlates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSlates stream %j', request); return this.descriptors.page.listSlates.createStream( this.innerApiCalls.listSlates as GaxCall, @@ -5209,7 +5283,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listSlates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSlates iterate %j', request); return this.descriptors.page.listSlates.asyncIterate( this.innerApiCalls['listSlates'] as GaxCall, @@ -5320,7 +5396,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.stitcher.v1.IListLiveConfigsRequest, @@ -5393,7 +5471,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listLiveConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLiveConfigs stream %j', request); return this.descriptors.page.listLiveConfigs.createStream( this.innerApiCalls.listLiveConfigs as GaxCall, @@ -5448,7 +5528,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listLiveConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLiveConfigs iterate %j', request); return this.descriptors.page.listLiveConfigs.asyncIterate( this.innerApiCalls['listLiveConfigs'] as GaxCall, @@ -5560,7 +5642,9 @@ export class VideoStitcherServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.stitcher.v1.IListVodConfigsRequest, @@ -5634,7 +5718,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listVodConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVodConfigs stream %j', request); return this.descriptors.page.listVodConfigs.createStream( this.innerApiCalls.listVodConfigs as GaxCall, @@ -5690,7 +5776,9 @@ export class VideoStitcherServiceClient { }); const defaultCallSettings = this._defaults['listVodConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVodConfigs iterate %j', request); return this.descriptors.page.listVodConfigs.asyncIterate( this.innerApiCalls['listVodConfigs'] as GaxCall, @@ -5792,7 +5880,7 @@ export class VideoStitcherServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; 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 0c7baf358dd..a70f5bfa815 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 @@ -298,7 +298,9 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.videoStitcherServiceStub); client.close().then(() => { done(); @@ -361,7 +363,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); @@ -393,7 +395,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); @@ -441,7 +443,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); @@ -470,7 +472,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetCdnKeyRequest() ); @@ -492,7 +494,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); @@ -524,7 +526,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); @@ -572,7 +574,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); @@ -604,7 +606,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodSessionRequest() ); @@ -626,7 +628,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); @@ -658,7 +660,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); @@ -706,7 +708,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); @@ -738,7 +740,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodSessionRequest() ); @@ -760,7 +762,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); @@ -793,7 +795,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); @@ -841,7 +843,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); @@ -873,7 +875,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest() ); @@ -895,7 +897,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); @@ -927,7 +929,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); @@ -975,7 +977,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); @@ -1007,7 +1009,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); @@ -1062,7 +1064,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); @@ -1196,7 +1198,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); @@ -1244,7 +1246,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); @@ -1273,7 +1275,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetSlateRequest() ); @@ -1295,7 +1297,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); @@ -1327,7 +1329,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); @@ -1375,7 +1377,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveSessionRequest() ); @@ -1429,7 +1431,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); @@ -1461,7 +1463,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); @@ -1509,7 +1511,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); @@ -1541,7 +1543,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveSessionRequest() ); @@ -1563,7 +1565,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); @@ -1595,7 +1597,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); @@ -1643,7 +1645,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); @@ -1675,7 +1677,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetLiveConfigRequest() ); @@ -1697,7 +1699,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodConfigRequest() ); @@ -1729,7 +1731,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodConfigRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodConfigRequest() ); @@ -1809,7 +1811,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.GetVodConfigRequest() ); @@ -1831,7 +1833,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); @@ -1864,7 +1866,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); @@ -1919,7 +1921,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); @@ -1951,7 +1953,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateCdnKeyRequest() ); @@ -1985,7 +1987,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2008,7 +2010,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2027,7 +2029,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); @@ -2060,7 +2062,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); @@ -2115,7 +2117,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); @@ -2147,7 +2149,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest() ); @@ -2181,7 +2183,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2204,7 +2206,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2223,7 +2225,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); @@ -2257,7 +2259,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); @@ -2313,7 +2315,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); @@ -2346,7 +2348,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest() ); @@ -2381,7 +2383,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2404,7 +2406,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2423,7 +2425,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() ); @@ -2456,7 +2458,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() ); @@ -2511,7 +2513,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() ); @@ -2543,7 +2545,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateSlateRequest() ); @@ -2577,7 +2579,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2600,7 +2602,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2619,7 +2621,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() ); @@ -2653,7 +2655,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() ); @@ -2709,7 +2711,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() ); @@ -2742,7 +2744,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateSlateRequest() ); @@ -2777,7 +2779,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2800,7 +2802,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2819,7 +2821,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() ); @@ -2852,7 +2854,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() ); @@ -2907,7 +2909,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() ); @@ -2939,7 +2941,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteSlateRequest() ); @@ -2973,7 +2975,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2996,7 +2998,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3015,7 +3017,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() ); @@ -3049,7 +3051,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() ); @@ -3104,7 +3106,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() ); @@ -3136,7 +3138,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateLiveConfigRequest() ); @@ -3170,7 +3172,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3193,7 +3195,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3215,7 +3217,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() ); @@ -3249,7 +3251,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() ); @@ -3304,7 +3306,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() ); @@ -3336,7 +3338,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest() ); @@ -3370,7 +3372,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3393,7 +3395,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3415,7 +3417,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest() ); @@ -3450,7 +3452,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest() ); @@ -3506,7 +3508,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest() ); @@ -3539,7 +3541,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest() ); @@ -3574,7 +3576,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3597,7 +3599,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3619,7 +3621,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodConfigRequest() ); @@ -3653,7 +3655,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodConfigRequest() ); @@ -3708,7 +3710,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodConfigRequest() ); @@ -3740,7 +3742,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.CreateVodConfigRequest() ); @@ -3774,7 +3776,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3797,7 +3799,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3819,7 +3821,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteVodConfigRequest() ); @@ -3853,7 +3855,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteVodConfigRequest() ); @@ -3908,7 +3910,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteVodConfigRequest() ); @@ -3940,7 +3942,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.DeleteVodConfigRequest() ); @@ -3974,7 +3976,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3997,7 +3999,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4019,7 +4021,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateVodConfigRequest() ); @@ -4054,7 +4056,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateVodConfigRequest() ); @@ -4110,7 +4112,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateVodConfigRequest() ); @@ -4143,7 +4145,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.UpdateVodConfigRequest() ); @@ -4178,7 +4180,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4201,7 +4203,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4223,7 +4225,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() ); @@ -4263,7 +4265,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() ); @@ -4319,7 +4321,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() ); @@ -4351,7 +4353,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() ); @@ -4412,7 +4414,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() ); @@ -4464,7 +4466,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() ); @@ -4514,7 +4516,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListCdnKeysRequest() ); @@ -4559,7 +4561,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); @@ -4600,7 +4602,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); @@ -4658,7 +4660,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); @@ -4690,7 +4692,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); @@ -4752,7 +4754,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); @@ -4803,7 +4805,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); @@ -4854,7 +4856,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest() ); @@ -4898,7 +4900,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); @@ -4939,7 +4941,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); @@ -4997,7 +4999,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); @@ -5029,7 +5031,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); @@ -5091,7 +5093,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); @@ -5142,7 +5144,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); @@ -5193,7 +5195,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest() ); @@ -5237,7 +5239,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); @@ -5278,7 +5280,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); @@ -5336,7 +5338,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); @@ -5368,7 +5370,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); @@ -5430,7 +5432,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); @@ -5481,7 +5483,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); @@ -5532,7 +5534,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest() ); @@ -5576,7 +5578,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); @@ -5616,7 +5618,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); @@ -5672,7 +5674,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); @@ -5704,7 +5706,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); @@ -5765,7 +5767,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); @@ -5817,7 +5819,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); @@ -5867,7 +5869,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListSlatesRequest() ); @@ -5912,7 +5914,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); @@ -5952,7 +5954,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); @@ -6008,7 +6010,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); @@ -6040,7 +6042,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); @@ -6102,7 +6104,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); @@ -6153,7 +6155,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); @@ -6203,7 +6205,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListLiveConfigsRequest() ); @@ -6247,7 +6249,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodConfigsRequest() ); @@ -6287,7 +6289,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodConfigsRequest() ); @@ -6343,7 +6345,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodConfigsRequest() ); @@ -6375,7 +6377,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodConfigsRequest() ); @@ -6436,7 +6438,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodConfigsRequest() ); @@ -6486,7 +6488,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodConfigsRequest() ); @@ -6536,7 +6538,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.stitcher.v1.ListVodConfigsRequest() ); @@ -6579,7 +6581,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -6661,7 +6663,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -6744,7 +6746,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -6843,8 +6845,7 @@ describe('v1.VideoStitcherServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -6864,7 +6865,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -6873,8 +6874,7 @@ describe('v1.VideoStitcherServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -6890,7 +6890,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); describe('Path templates', () => { - describe('cdnKey', () => { + describe('cdnKey', async () => { const fakePath = '/rendered/path/cdnKey'; const expectedParameters = { project: 'projectValue', @@ -6902,7 +6902,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cdnKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6955,7 +6955,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('liveAdTagDetail', () => { + describe('liveAdTagDetail', async () => { const fakePath = '/rendered/path/liveAdTagDetail'; const expectedParameters = { project: 'projectValue', @@ -6968,7 +6968,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.liveAdTagDetailPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7033,7 +7033,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('liveConfig', () => { + describe('liveConfig', async () => { const fakePath = '/rendered/path/liveConfig'; const expectedParameters = { project: 'projectValue', @@ -7045,7 +7045,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.liveConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7098,7 +7098,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('liveSession', () => { + describe('liveSession', async () => { const fakePath = '/rendered/path/liveSession'; const expectedParameters = { project: 'projectValue', @@ -7110,7 +7110,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.liveSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7163,7 +7163,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -7174,7 +7174,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7213,7 +7213,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -7223,7 +7223,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7252,7 +7252,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('slate', () => { + describe('slate', async () => { const fakePath = '/rendered/path/slate'; const expectedParameters = { project: 'projectValue', @@ -7264,7 +7264,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.slatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7317,7 +7317,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('vodAdTagDetail', () => { + describe('vodAdTagDetail', async () => { const fakePath = '/rendered/path/vodAdTagDetail'; const expectedParameters = { project: 'projectValue', @@ -7330,7 +7330,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vodAdTagDetailPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7395,7 +7395,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('vodConfig', () => { + describe('vodConfig', async () => { const fakePath = '/rendered/path/vodConfig'; const expectedParameters = { project: 'projectValue', @@ -7407,7 +7407,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vodConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7460,7 +7460,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('vodSession', () => { + describe('vodSession', async () => { const fakePath = '/rendered/path/vodSession'; const expectedParameters = { project: 'projectValue', @@ -7472,7 +7472,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vodSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7525,7 +7525,7 @@ describe('v1.VideoStitcherServiceClient', () => { }); }); - describe('vodStitchDetail', () => { + describe('vodStitchDetail', async () => { const fakePath = '/rendered/path/vodStitchDetail'; const expectedParameters = { project: 'projectValue', @@ -7538,7 +7538,7 @@ describe('v1.VideoStitcherServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vodStitchDetailPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 928d86680f8..f63b7903f7a 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index c8323156b9b..ff901da29fc 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json index c8323156b9b..ff901da29fc 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts index 4bfe9e39b4c..984b270c747 100644 --- a/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts +++ b/packages/google-cloud-video-transcoder/src/v1/transcoder_service_client.ts @@ -497,7 +497,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -608,7 +610,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -728,7 +732,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJob request %j', request); const wrappedCallback: | Callback< @@ -859,7 +865,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJobTemplate request %j', request); const wrappedCallback: | Callback< @@ -986,7 +994,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJobTemplate request %j', request); const wrappedCallback: | Callback< @@ -1115,7 +1125,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteJobTemplate request %j', request); const wrappedCallback: | Callback< @@ -1249,7 +1261,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.transcoder.v1.IListJobsRequest, @@ -1321,7 +1335,9 @@ export class TranscoderServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -1375,7 +1391,9 @@ export class TranscoderServiceClient { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -1485,7 +1503,9 @@ export class TranscoderServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, @@ -1558,7 +1578,9 @@ export class TranscoderServiceClient { }); const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobTemplates stream %j', request); return this.descriptors.page.listJobTemplates.createStream( this.innerApiCalls.listJobTemplates as GaxCall, @@ -1613,7 +1635,9 @@ export class TranscoderServiceClient { }); const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobTemplates iterate %j', request); return this.descriptors.page.listJobTemplates.asyncIterate( this.innerApiCalls['listJobTemplates'] as GaxCall, diff --git a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts index 0423d260edb..03b41008a8f 100644 --- a/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts +++ b/packages/google-cloud-video-transcoder/test/gapic_transcoder_service_v1.ts @@ -253,7 +253,9 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.transcoderServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); @@ -343,7 +345,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); @@ -390,7 +392,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); @@ -418,7 +420,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobRequest() ); @@ -439,7 +441,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); @@ -470,7 +472,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); @@ -517,7 +519,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); @@ -545,7 +547,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobRequest() ); @@ -566,7 +568,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); @@ -597,7 +599,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); @@ -644,7 +646,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); @@ -672,7 +674,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobRequest() ); @@ -693,7 +695,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); @@ -724,7 +726,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); @@ -771,7 +773,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); @@ -802,7 +804,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.CreateJobTemplateRequest() ); @@ -823,7 +825,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); @@ -854,7 +856,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); @@ -901,7 +903,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); @@ -932,7 +934,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.GetJobTemplateRequest() ); @@ -953,7 +955,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); @@ -984,7 +986,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); @@ -1062,7 +1064,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest() ); @@ -1083,7 +1085,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); @@ -1205,7 +1207,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); @@ -1265,7 +1267,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); @@ -1316,7 +1318,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); @@ -1364,7 +1366,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobsRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); @@ -1503,7 +1505,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); @@ -1534,7 +1536,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); @@ -1595,7 +1597,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); @@ -1645,7 +1647,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); @@ -1695,7 +1697,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.video.transcoder.v1.ListJobTemplatesRequest() ); @@ -1733,7 +1735,7 @@ describe('v1.TranscoderServiceClient', () => { }); describe('Path templates', () => { - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -1744,7 +1746,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1797,7 +1799,7 @@ describe('v1.TranscoderServiceClient', () => { }); }); - describe('jobTemplate', () => { + describe('jobTemplate', async () => { const fakePath = '/rendered/path/jobTemplate'; const expectedParameters = { project: 'projectValue', @@ -1808,7 +1810,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobTemplatePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1861,7 +1863,7 @@ describe('v1.TranscoderServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1871,7 +1873,7 @@ describe('v1.TranscoderServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-videointelligence/package.json b/packages/google-cloud-videointelligence/package.json index 63b1a438a7c..fb19f29f686 100644 --- a/packages/google-cloud-videointelligence/package.json +++ b/packages/google-cloud-videointelligence/package.json @@ -49,7 +49,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json index cb03960243f..2b8035e9ab4 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json index cb03960243f..2b8035e9ab4 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json index 23098e3961e..91fad5bbf76 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json index 23098e3961e..91fad5bbf76 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json index 5c28a7ea83c..2ed66950120 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json index 5c28a7ea83c..2ed66950120 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json index c8ba295ac95..d4228512c12 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json index c8ba295ac95..d4228512c12 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json index 8ed27fd573e..a4302184a4f 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json index 8ed27fd573e..a4302184a4f 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "5.3.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.ts b/packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.ts index 299ccc53564..cd3761bb3e3 100644 --- a/packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.ts +++ b/packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.ts @@ -555,7 +555,9 @@ export class VideoIntelligenceServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.ts b/packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.ts index 2be9886a2d3..c3f0cbb39cc 100644 --- a/packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.ts +++ b/packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.ts @@ -556,7 +556,9 @@ export class VideoIntelligenceServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.ts b/packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.ts index 052d1478a68..36ea6caf9cf 100644 --- a/packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.ts +++ b/packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.ts @@ -556,7 +556,9 @@ export class VideoIntelligenceServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-videointelligence/src/v1p2beta1/video_intelligence_service_client.ts b/packages/google-cloud-videointelligence/src/v1p2beta1/video_intelligence_service_client.ts index 43c9afdc3ab..692a2ed283d 100644 --- a/packages/google-cloud-videointelligence/src/v1p2beta1/video_intelligence_service_client.ts +++ b/packages/google-cloud-videointelligence/src/v1p2beta1/video_intelligence_service_client.ts @@ -554,7 +554,9 @@ export class VideoIntelligenceServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-videointelligence/src/v1p3beta1/streaming_video_intelligence_service_client.ts b/packages/google-cloud-videointelligence/src/v1p3beta1/streaming_video_intelligence_service_client.ts index f8463392922..06417ff2a98 100644 --- a/packages/google-cloud-videointelligence/src/v1p3beta1/streaming_video_intelligence_service_client.ts +++ b/packages/google-cloud-videointelligence/src/v1p3beta1/streaming_video_intelligence_service_client.ts @@ -402,7 +402,9 @@ export class StreamingVideoIntelligenceServiceClient { * region_tag:videointelligence_v1p3beta1_generated_StreamingVideoIntelligenceService_StreamingAnnotateVideo_async */ streamingAnnotateVideo(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingAnnotateVideo stream %j', options); return this.innerApiCalls.streamingAnnotateVideo(null, options); } diff --git a/packages/google-cloud-videointelligence/src/v1p3beta1/video_intelligence_service_client.ts b/packages/google-cloud-videointelligence/src/v1p3beta1/video_intelligence_service_client.ts index c19f8faa9fa..6a6af1724dc 100644 --- a/packages/google-cloud-videointelligence/src/v1p3beta1/video_intelligence_service_client.ts +++ b/packages/google-cloud-videointelligence/src/v1p3beta1/video_intelligence_service_client.ts @@ -523,7 +523,9 @@ export class VideoIntelligenceServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-videointelligence/test/gapic_streaming_video_intelligence_service_v1p3beta1.ts b/packages/google-cloud-videointelligence/test/gapic_streaming_video_intelligence_service_v1p3beta1.ts index 0c8e14345a9..33d26fa3317 100644 --- a/packages/google-cloud-videointelligence/test/gapic_streaming_video_intelligence_service_v1p3beta1.ts +++ b/packages/google-cloud-videointelligence/test/gapic_streaming_video_intelligence_service_v1p3beta1.ts @@ -215,7 +215,9 @@ describe('v1p3beta1.StreamingVideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.streamingVideoIntelligenceServiceStub); client.close().then(() => { done(); @@ -289,7 +291,7 @@ describe('v1p3beta1.StreamingVideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest() ); @@ -337,7 +339,7 @@ describe('v1p3beta1.StreamingVideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest() ); diff --git a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1.ts b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1.ts index 3609eddfec5..4dcec9143d3 100644 --- a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1.ts +++ b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1.ts @@ -228,7 +228,9 @@ describe('v1.VideoIntelligenceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.videoIntelligenceServiceStub); client.close().then(() => { done(); @@ -291,7 +293,7 @@ describe('v1.VideoIntelligenceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1.AnnotateVideoRequest() ); @@ -311,7 +313,7 @@ describe('v1.VideoIntelligenceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1.AnnotateVideoRequest() ); @@ -352,7 +354,7 @@ describe('v1.VideoIntelligenceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1.AnnotateVideoRequest() ); @@ -370,7 +372,7 @@ describe('v1.VideoIntelligenceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1.AnnotateVideoRequest() ); @@ -390,7 +392,7 @@ describe('v1.VideoIntelligenceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -413,7 +415,7 @@ describe('v1.VideoIntelligenceServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( diff --git a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1beta2.ts b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1beta2.ts index fb01416272f..f5538d46a31 100644 --- a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1beta2.ts +++ b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1beta2.ts @@ -234,7 +234,9 @@ describe('v1beta2.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.videoIntelligenceServiceStub); client.close().then(() => { done(); @@ -305,7 +307,7 @@ describe('v1beta2.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest() ); @@ -327,7 +329,7 @@ describe('v1beta2.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest() ); @@ -370,7 +372,7 @@ describe('v1beta2.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest() ); @@ -390,7 +392,7 @@ describe('v1beta2.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1beta2.AnnotateVideoRequest() ); @@ -412,7 +414,7 @@ describe('v1beta2.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -437,7 +439,7 @@ describe('v1beta2.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( diff --git a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p1beta1.ts b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p1beta1.ts index 40b6258859c..99596afd303 100644 --- a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p1beta1.ts +++ b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p1beta1.ts @@ -234,7 +234,9 @@ describe('v1p1beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.videoIntelligenceServiceStub); client.close().then(() => { done(); @@ -305,7 +307,7 @@ describe('v1p1beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest() ); @@ -327,7 +329,7 @@ describe('v1p1beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest() ); @@ -370,7 +372,7 @@ describe('v1p1beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest() ); @@ -390,7 +392,7 @@ describe('v1p1beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p1beta1.AnnotateVideoRequest() ); @@ -412,7 +414,7 @@ describe('v1p1beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -437,7 +439,7 @@ describe('v1p1beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( diff --git a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p2beta1.ts b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p2beta1.ts index b166b8fab07..18481960cc2 100644 --- a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p2beta1.ts +++ b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p2beta1.ts @@ -234,7 +234,9 @@ describe('v1p2beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.videoIntelligenceServiceStub); client.close().then(() => { done(); @@ -305,7 +307,7 @@ describe('v1p2beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest() ); @@ -327,7 +329,7 @@ describe('v1p2beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest() ); @@ -370,7 +372,7 @@ describe('v1p2beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest() ); @@ -390,7 +392,7 @@ describe('v1p2beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p2beta1.AnnotateVideoRequest() ); @@ -412,7 +414,7 @@ describe('v1p2beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -437,7 +439,7 @@ describe('v1p2beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( diff --git a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p3beta1.ts b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p3beta1.ts index 4aeccaa92df..7f517aaa818 100644 --- a/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p3beta1.ts +++ b/packages/google-cloud-videointelligence/test/gapic_video_intelligence_service_v1p3beta1.ts @@ -234,7 +234,9 @@ describe('v1p3beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.videoIntelligenceServiceStub); client.close().then(() => { done(); @@ -305,7 +307,7 @@ describe('v1p3beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest() ); @@ -327,7 +329,7 @@ describe('v1p3beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest() ); @@ -370,7 +372,7 @@ describe('v1p3beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest() ); @@ -390,7 +392,7 @@ describe('v1p3beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.videointelligence.v1p3beta1.AnnotateVideoRequest() ); @@ -412,7 +414,7 @@ describe('v1p3beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -437,7 +439,7 @@ describe('v1p3beta1.VideoIntelligenceServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( diff --git a/packages/google-cloud-vision/package.json b/packages/google-cloud-vision/package.json index 5663d9fa725..823ac6b37be 100644 --- a/packages/google-cloud-vision/package.json +++ b/packages/google-cloud-vision/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "@google-cloud/promisify": "^5.0.0", - "google-gax": "^5.0.0-rc.0", + "google-gax": "^5.0.1-rc.0", "is": "^3.3.0" }, "devDependencies": { diff --git a/packages/google-cloud-vision/src/v1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1/image_annotator_client.ts index 4ae40287f57..192d32a6ab8 100644 --- a/packages/google-cloud-vision/src/v1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1/image_annotator_client.ts @@ -553,7 +553,9 @@ export class ImageAnnotatorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchAnnotateImages request %j', request); const wrappedCallback: | Callback< @@ -696,7 +698,9 @@ export class ImageAnnotatorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchAnnotateFiles request %j', request); const wrappedCallback: | Callback< @@ -855,7 +859,9 @@ export class ImageAnnotatorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1047,7 +1053,9 @@ export class ImageAnnotatorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1209,7 +1217,7 @@ export class ImageAnnotatorClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-vision/src/v1/product_search_client.ts b/packages/google-cloud-vision/src/v1/product_search_client.ts index df503832bed..ef343b9120c 100644 --- a/packages/google-cloud-vision/src/v1/product_search_client.ts +++ b/packages/google-cloud-vision/src/v1/product_search_client.ts @@ -595,7 +595,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProductSet request %j', request); const wrappedCallback: | Callback< @@ -712,7 +714,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProductSet request %j', request); const wrappedCallback: | Callback< @@ -834,7 +838,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ 'product_set.name': request.productSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProductSet request %j', request); const wrappedCallback: | Callback< @@ -950,7 +956,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProductSet request %j', request); const wrappedCallback: | Callback< @@ -1077,7 +1085,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProduct request %j', request); const wrappedCallback: | Callback< @@ -1192,7 +1202,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProduct request %j', request); const wrappedCallback: | Callback< @@ -1321,7 +1333,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ 'product.name': request.product!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProduct request %j', request); const wrappedCallback: | Callback< @@ -1438,7 +1452,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProduct request %j', request); const wrappedCallback: | Callback< @@ -1584,7 +1600,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -1712,7 +1730,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -1838,7 +1858,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -1969,7 +1991,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addProductToProductSet request %j', request); const wrappedCallback: | Callback< @@ -2103,7 +2127,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeProductFromProductSet request %j', request); const wrappedCallback: | Callback< @@ -2249,7 +2275,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2449,7 +2477,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2612,7 +2642,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1.IListProductSetsRequest, @@ -2679,7 +2711,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductSets stream %j', request); return this.descriptors.page.listProductSets.createStream( this.innerApiCalls.listProductSets as GaxCall, @@ -2728,7 +2762,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductSets iterate %j', request); return this.descriptors.page.listProductSets.asyncIterate( this.innerApiCalls['listProductSets'] as GaxCall, @@ -2831,7 +2867,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1.IListProductsRequest, @@ -2899,7 +2937,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -2949,7 +2989,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, @@ -3063,7 +3105,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1.IListReferenceImagesRequest, @@ -3134,7 +3178,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listReferenceImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferenceImages stream %j', request); return this.descriptors.page.listReferenceImages.createStream( this.innerApiCalls.listReferenceImages as GaxCall, @@ -3187,7 +3233,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listReferenceImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferenceImages iterate %j', request); return this.descriptors.page.listReferenceImages.asyncIterate( this.innerApiCalls['listReferenceImages'] as GaxCall, @@ -3298,7 +3346,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1.IListProductsInProductSetRequest, @@ -3366,7 +3416,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductsInProductSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductsInProductSet stream %j', request); return this.descriptors.page.listProductsInProductSet.createStream( this.innerApiCalls.listProductsInProductSet as GaxCall, @@ -3416,7 +3468,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductsInProductSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductsInProductSet iterate %j', request); return this.descriptors.page.listProductsInProductSet.asyncIterate( this.innerApiCalls['listProductsInProductSet'] as GaxCall, @@ -3518,7 +3572,7 @@ export class ProductSearchClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts index a652a31e3cc..8ee8342f566 100644 --- a/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts @@ -452,7 +452,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchAnnotateImages request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts index 8b8b89f6728..63bcf32b7aa 100644 --- a/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts @@ -492,7 +492,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchAnnotateImages request %j', request); const wrappedCallback: | Callback< @@ -625,7 +627,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts index 7e20012d585..896ffb9d58e 100644 --- a/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts @@ -508,7 +508,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchAnnotateImages request %j', request); const wrappedCallback: | Callback< @@ -641,7 +643,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts b/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts index f99ddc1c8f5..d7af70dbf8c 100644 --- a/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts +++ b/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts @@ -577,7 +577,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProductSet request %j', request); const wrappedCallback: | Callback< @@ -703,7 +705,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProductSet request %j', request); const wrappedCallback: | Callback< @@ -834,7 +838,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ 'product_set.name': request.productSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProductSet request %j', request); const wrappedCallback: | Callback< @@ -963,7 +969,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProductSet request %j', request); const wrappedCallback: | Callback< @@ -1099,7 +1107,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProduct request %j', request); const wrappedCallback: | Callback< @@ -1225,7 +1235,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProduct request %j', request); const wrappedCallback: | Callback< @@ -1361,7 +1373,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ 'product.name': request.product!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProduct request %j', request); const wrappedCallback: | Callback< @@ -1491,7 +1505,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProduct request %j', request); const wrappedCallback: | Callback< @@ -1645,7 +1661,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -1784,7 +1802,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -1917,7 +1937,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -2057,7 +2079,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addProductToProductSet request %j', request); const wrappedCallback: | Callback< @@ -2194,7 +2218,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeProductFromProductSet request %j', request); const wrappedCallback: | Callback< @@ -2340,7 +2366,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2509,7 +2537,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p3beta1.IListProductSetsRequest, @@ -2576,7 +2606,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductSets stream %j', request); return this.descriptors.page.listProductSets.createStream( this.innerApiCalls.listProductSets as GaxCall, @@ -2625,7 +2657,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductSets iterate %j', request); return this.descriptors.page.listProductSets.asyncIterate( this.innerApiCalls['listProductSets'] as GaxCall, @@ -2734,7 +2768,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p3beta1.IListProductsRequest, @@ -2802,7 +2838,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -2852,7 +2890,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, @@ -2966,7 +3006,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p3beta1.IListReferenceImagesRequest, @@ -3037,7 +3079,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listReferenceImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferenceImages stream %j', request); return this.descriptors.page.listReferenceImages.createStream( this.innerApiCalls.listReferenceImages as GaxCall, @@ -3090,7 +3134,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listReferenceImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferenceImages iterate %j', request); return this.descriptors.page.listReferenceImages.asyncIterate( this.innerApiCalls['listReferenceImages'] as GaxCall, @@ -3201,7 +3247,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p3beta1.IListProductsInProductSetRequest, @@ -3269,7 +3317,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductsInProductSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductsInProductSet stream %j', request); return this.descriptors.page.listProductsInProductSet.createStream( this.innerApiCalls.listProductsInProductSet as GaxCall, @@ -3319,7 +3369,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductsInProductSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductsInProductSet iterate %j', request); return this.descriptors.page.listProductsInProductSet.asyncIterate( this.innerApiCalls['listProductsInProductSet'] as GaxCall, diff --git a/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts index 0840163fabd..9a03f02b1ba 100644 --- a/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts @@ -525,7 +525,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchAnnotateImages request %j', request); const wrappedCallback: | Callback< @@ -653,7 +655,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchAnnotateFiles request %j', request); const wrappedCallback: | Callback< @@ -791,7 +795,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -959,7 +965,9 @@ export class ImageAnnotatorClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< diff --git a/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts b/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts index 10cbeafeafd..4310863737c 100644 --- a/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts +++ b/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts @@ -593,7 +593,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProductSet request %j', request); const wrappedCallback: | Callback< @@ -719,7 +721,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProductSet request %j', request); const wrappedCallback: | Callback< @@ -850,7 +854,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ 'product_set.name': request.productSet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProductSet request %j', request); const wrappedCallback: | Callback< @@ -975,7 +981,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProductSet request %j', request); const wrappedCallback: | Callback< @@ -1111,7 +1119,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProduct request %j', request); const wrappedCallback: | Callback< @@ -1237,7 +1247,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProduct request %j', request); const wrappedCallback: | Callback< @@ -1374,7 +1386,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ 'product.name': request.product!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProduct request %j', request); const wrappedCallback: | Callback< @@ -1500,7 +1514,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProduct request %j', request); const wrappedCallback: | Callback< @@ -1655,7 +1671,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -1790,7 +1808,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -1923,7 +1943,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReferenceImage request %j', request); const wrappedCallback: | Callback< @@ -2063,7 +2085,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addProductToProductSet request %j', request); const wrappedCallback: | Callback< @@ -2197,7 +2221,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeProductFromProductSet request %j', request); const wrappedCallback: | Callback< @@ -2343,7 +2369,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2543,7 +2571,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2712,7 +2742,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p4beta1.IListProductSetsRequest, @@ -2779,7 +2811,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductSets stream %j', request); return this.descriptors.page.listProductSets.createStream( this.innerApiCalls.listProductSets as GaxCall, @@ -2828,7 +2862,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductSets iterate %j', request); return this.descriptors.page.listProductSets.asyncIterate( this.innerApiCalls['listProductSets'] as GaxCall, @@ -2937,7 +2973,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p4beta1.IListProductsRequest, @@ -3005,7 +3043,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -3055,7 +3095,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, @@ -3169,7 +3211,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p4beta1.IListReferenceImagesRequest, @@ -3240,7 +3284,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listReferenceImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferenceImages stream %j', request); return this.descriptors.page.listReferenceImages.createStream( this.innerApiCalls.listReferenceImages as GaxCall, @@ -3293,7 +3339,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listReferenceImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReferenceImages iterate %j', request); return this.descriptors.page.listReferenceImages.asyncIterate( this.innerApiCalls['listReferenceImages'] as GaxCall, @@ -3404,7 +3452,9 @@ export class ProductSearchClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest, @@ -3472,7 +3522,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductsInProductSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductsInProductSet stream %j', request); return this.descriptors.page.listProductsInProductSet.createStream( this.innerApiCalls.listProductsInProductSet as GaxCall, @@ -3522,7 +3574,9 @@ export class ProductSearchClient { }); const defaultCallSettings = this._defaults['listProductsInProductSet']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductsInProductSet iterate %j', request); return this.descriptors.page.listProductsInProductSet.asyncIterate( this.innerApiCalls['listProductsInProductSet'] as GaxCall, diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts index b69024775ff..d84f2b405ee 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts @@ -244,7 +244,9 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageAnnotatorStub); client.close().then(() => { done(); @@ -303,7 +305,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateImagesRequest() ); @@ -335,7 +337,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateImagesRequest() ); @@ -382,7 +384,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateImagesRequest() ); @@ -413,7 +415,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateImagesRequest() ); @@ -434,7 +436,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateFilesRequest() ); @@ -466,7 +468,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateFilesRequest() ); @@ -513,7 +515,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateFilesRequest() ); @@ -544,7 +546,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.BatchAnnotateFilesRequest() ); @@ -565,7 +567,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest() ); @@ -598,7 +600,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest() ); @@ -652,7 +654,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest() ); @@ -686,7 +688,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest() ); @@ -719,7 +721,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -742,7 +744,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -763,7 +765,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest() ); @@ -796,7 +798,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest() ); @@ -850,7 +852,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest() ); @@ -884,7 +886,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest() ); @@ -917,7 +919,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -940,7 +942,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -960,7 +962,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1215,8 +1217,7 @@ describe('v1.ImageAnnotatorClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1235,7 +1236,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1244,8 +1245,7 @@ describe('v1.ImageAnnotatorClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1261,7 +1261,7 @@ describe('v1.ImageAnnotatorClient', () => { }); describe('Path templates', () => { - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -1272,7 +1272,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1325,7 +1325,7 @@ describe('v1.ImageAnnotatorClient', () => { }); }); - describe('productSet', () => { + describe('productSet', async () => { const fakePath = '/rendered/path/productSet'; const expectedParameters = { project: 'projectValue', @@ -1336,7 +1336,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1389,7 +1389,7 @@ describe('v1.ImageAnnotatorClient', () => { }); }); - describe('referenceImage', () => { + describe('referenceImage', async () => { const fakePath = '/rendered/path/referenceImage'; const expectedParameters = { project: 'projectValue', @@ -1401,7 +1401,7 @@ describe('v1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.referenceImagePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts index 8d77017c679..5f4054a2755 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts @@ -191,7 +191,9 @@ describe('v1p1beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageAnnotatorStub); client.close().then(() => { done(); @@ -250,7 +252,7 @@ describe('v1p1beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest() ); @@ -268,7 +270,7 @@ describe('v1p1beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest() ); @@ -301,7 +303,7 @@ describe('v1p1beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest() ); @@ -318,7 +320,7 @@ describe('v1p1beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest() ); diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts index 0fbca092f88..07d38a8ed65 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts @@ -223,7 +223,9 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageAnnotatorStub); client.close().then(() => { done(); @@ -282,7 +284,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest() ); @@ -300,7 +302,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest() ); @@ -333,7 +335,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest() ); @@ -350,7 +352,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest() ); @@ -366,7 +368,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest() ); @@ -385,7 +387,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest() ); @@ -425,7 +427,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest() ); @@ -445,7 +447,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest() ); @@ -464,7 +466,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -487,7 +489,7 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts index bccaa36cf45..f55eacfc7d6 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts @@ -223,7 +223,9 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageAnnotatorStub); client.close().then(() => { done(); @@ -282,7 +284,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest() ); @@ -300,7 +302,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest() ); @@ -333,7 +335,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest() ); @@ -350,7 +352,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest() ); @@ -366,7 +368,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest() ); @@ -385,7 +387,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest() ); @@ -425,7 +427,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest() ); @@ -445,7 +447,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest() ); @@ -464,7 +466,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -487,7 +489,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -503,7 +505,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { }); describe('Path templates', () => { - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -514,7 +516,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -567,7 +569,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { }); }); - describe('productSet', () => { + describe('productSet', async () => { const fakePath = '/rendered/path/productSet'; const expectedParameters = { project: 'projectValue', @@ -578,7 +580,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -631,7 +633,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { }); }); - describe('referenceImage', () => { + describe('referenceImage', async () => { const fakePath = '/rendered/path/referenceImage'; const expectedParameters = { project: 'projectValue', @@ -643,7 +645,7 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.referenceImagePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts index 66d833dfcf8..5ab9620ae78 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts @@ -223,7 +223,9 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageAnnotatorStub); client.close().then(() => { done(); @@ -282,7 +284,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest() ); @@ -300,7 +302,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest() ); @@ -333,7 +335,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest() ); @@ -350,7 +352,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest() ); @@ -366,7 +368,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest() ); @@ -384,7 +386,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest() ); @@ -417,7 +419,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest() ); @@ -434,7 +436,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest() ); @@ -450,7 +452,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest() ); @@ -469,7 +471,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest() ); @@ -509,7 +511,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest() ); @@ -529,7 +531,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest() ); @@ -548,7 +550,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -571,7 +573,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -592,7 +594,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest() ); @@ -611,7 +613,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest() ); @@ -651,7 +653,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest() ); @@ -671,7 +673,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest() ); @@ -690,7 +692,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -713,7 +715,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -729,7 +731,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { }); describe('Path templates', () => { - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -740,7 +742,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -793,7 +795,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { }); }); - describe('productSet', () => { + describe('productSet', async () => { const fakePath = '/rendered/path/productSet'; const expectedParameters = { project: 'projectValue', @@ -804,7 +806,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -857,7 +859,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { }); }); - describe('referenceImage', () => { + describe('referenceImage', async () => { const fakePath = '/rendered/path/referenceImage'; const expectedParameters = { project: 'projectValue', @@ -869,7 +871,7 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.referenceImagePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vision/test/gapic_product_search_v1.ts b/packages/google-cloud-vision/test/gapic_product_search_v1.ts index 5dc46449a0a..30e3881072b 100644 --- a/packages/google-cloud-vision/test/gapic_product_search_v1.ts +++ b/packages/google-cloud-vision/test/gapic_product_search_v1.ts @@ -284,7 +284,9 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productSearchStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductSetRequest() ); @@ -374,7 +376,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductSetRequest() ); @@ -421,7 +423,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductSetRequest() ); @@ -452,7 +454,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductSetRequest() ); @@ -473,7 +475,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductSetRequest() ); @@ -504,7 +506,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductSetRequest() ); @@ -551,7 +553,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductSetRequest() ); @@ -582,7 +584,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductSetRequest() ); @@ -603,7 +605,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductSetRequest() ); @@ -635,7 +637,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductSetRequest() ); @@ -683,7 +685,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductSetRequest() ); @@ -715,7 +717,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductSetRequest() ); @@ -737,7 +739,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductSetRequest() ); @@ -768,7 +770,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductSetRequest() ); @@ -815,7 +817,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductSetRequest() ); @@ -846,7 +848,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductSetRequest() ); @@ -867,7 +869,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductRequest() ); @@ -898,7 +900,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductRequest() ); @@ -945,7 +947,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductRequest() ); @@ -976,7 +978,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateProductRequest() ); @@ -997,7 +999,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductRequest() ); @@ -1028,7 +1030,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductRequest() ); @@ -1106,7 +1108,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetProductRequest() ); @@ -1127,7 +1129,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.UpdateProductRequest() ); @@ -1261,7 +1263,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductRequest() ); @@ -1292,7 +1294,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductRequest() ); @@ -1370,7 +1372,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteProductRequest() ); @@ -1391,7 +1393,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateReferenceImageRequest() ); @@ -1423,7 +1425,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateReferenceImageRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateReferenceImageRequest() ); @@ -1501,7 +1503,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.CreateReferenceImageRequest() ); @@ -1522,7 +1524,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteReferenceImageRequest() ); @@ -1554,7 +1556,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteReferenceImageRequest() ); @@ -1601,7 +1603,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteReferenceImageRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.DeleteReferenceImageRequest() ); @@ -1653,7 +1655,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetReferenceImageRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetReferenceImageRequest() ); @@ -1731,7 +1733,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetReferenceImageRequest() ); @@ -1762,7 +1764,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.GetReferenceImageRequest() ); @@ -1783,7 +1785,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AddProductToProductSetRequest() ); @@ -1815,7 +1817,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AddProductToProductSetRequest() ); @@ -1862,7 +1864,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AddProductToProductSetRequest() ); @@ -1896,7 +1898,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.AddProductToProductSetRequest() ); @@ -1920,7 +1922,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.RemoveProductFromProductSetRequest() ); @@ -1952,7 +1954,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.RemoveProductFromProductSetRequest() ); @@ -1999,7 +2001,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.RemoveProductFromProductSetRequest() ); @@ -2033,7 +2035,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.RemoveProductFromProductSetRequest() ); @@ -2057,7 +2059,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ImportProductSetsRequest() ); @@ -2090,7 +2092,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ImportProductSetsRequest() ); @@ -2144,7 +2146,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ImportProductSetsRequest() ); @@ -2175,7 +2177,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ImportProductSetsRequest() ); @@ -2208,7 +2210,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2230,7 +2232,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2251,7 +2253,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.PurgeProductsRequest() ); @@ -2284,7 +2286,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.PurgeProductsRequest() ); @@ -2338,7 +2340,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.PurgeProductsRequest() ); @@ -2369,7 +2371,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.PurgeProductsRequest() ); @@ -2402,7 +2404,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2424,7 +2426,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2445,7 +2447,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductSetsRequest() ); @@ -2478,7 +2480,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductSetsRequest() ); @@ -2527,7 +2529,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductSetsRequest() ); @@ -2558,7 +2560,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductSetsRequest() ); @@ -2612,7 +2614,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductSetsRequest() ); @@ -2661,7 +2663,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductSetsRequest() ); @@ -2704,7 +2706,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductSetsRequest() ); @@ -2746,7 +2748,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsRequest() ); @@ -2779,7 +2781,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsRequest() ); @@ -2828,7 +2830,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsRequest() ); @@ -2859,7 +2861,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsRequest() ); @@ -2910,7 +2912,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsRequest() ); @@ -2958,7 +2960,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsRequest() ); @@ -3001,7 +3003,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsRequest() ); @@ -3043,7 +3045,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListReferenceImagesRequest() ); @@ -3083,7 +3085,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListReferenceImagesRequest() ); @@ -3138,7 +3140,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListReferenceImagesRequest() ); @@ -3169,7 +3171,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListReferenceImagesRequest() ); @@ -3229,7 +3231,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListReferenceImagesRequest() ); @@ -3278,7 +3280,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListReferenceImagesRequest() ); @@ -3327,7 +3329,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListReferenceImagesRequest() ); @@ -3369,7 +3371,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsInProductSetRequest() ); @@ -3403,7 +3405,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsInProductSetRequest() ); @@ -3452,7 +3454,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsInProductSetRequest() ); @@ -3486,7 +3488,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsInProductSetRequest() ); @@ -3543,7 +3545,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsInProductSetRequest() ); @@ -3595,7 +3597,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsInProductSetRequest() ); @@ -3642,7 +3644,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1.ListProductsInProductSetRequest() ); @@ -3687,7 +3689,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3766,7 +3768,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3846,7 +3848,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3942,8 +3944,7 @@ describe('v1.ProductSearchClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3962,7 +3963,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3971,8 +3972,7 @@ describe('v1.ProductSearchClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3988,7 +3988,7 @@ describe('v1.ProductSearchClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3998,7 +3998,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4037,7 +4037,7 @@ describe('v1.ProductSearchClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -4048,7 +4048,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4101,7 +4101,7 @@ describe('v1.ProductSearchClient', () => { }); }); - describe('productSet', () => { + describe('productSet', async () => { const fakePath = '/rendered/path/productSet'; const expectedParameters = { project: 'projectValue', @@ -4112,7 +4112,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4165,7 +4165,7 @@ describe('v1.ProductSearchClient', () => { }); }); - describe('referenceImage', () => { + describe('referenceImage', async () => { const fakePath = '/rendered/path/referenceImage'; const expectedParameters = { project: 'projectValue', @@ -4177,7 +4177,7 @@ describe('v1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.referenceImagePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts b/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts index 1fb3f52ab56..f7590bd5957 100644 --- a/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts +++ b/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts @@ -285,7 +285,9 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productSearchStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductSetRequest() ); @@ -375,7 +377,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductSetRequest() ); @@ -422,7 +424,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductSetRequest() ); @@ -453,7 +455,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductSetRequest() ); @@ -474,7 +476,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductSetRequest() ); @@ -505,7 +507,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductSetRequest() ); @@ -552,7 +554,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductSetRequest() ); @@ -583,7 +585,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductSetRequest() ); @@ -604,7 +606,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductSetRequest() ); @@ -636,7 +638,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductSetRequest() ); @@ -684,7 +686,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductSetRequest() ); @@ -716,7 +718,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductSetRequest() ); @@ -738,7 +740,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductSetRequest() ); @@ -769,7 +771,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductSetRequest() ); @@ -816,7 +818,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductSetRequest() ); @@ -847,7 +849,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductSetRequest() ); @@ -868,7 +870,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductRequest() ); @@ -899,7 +901,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductRequest() ); @@ -946,7 +948,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductRequest() ); @@ -977,7 +979,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateProductRequest() ); @@ -998,7 +1000,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductRequest() ); @@ -1029,7 +1031,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductRequest() ); @@ -1076,7 +1078,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductRequest() ); @@ -1107,7 +1109,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetProductRequest() ); @@ -1128,7 +1130,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductRequest() ); @@ -1160,7 +1162,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductRequest() ); @@ -1208,7 +1210,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductRequest() ); @@ -1240,7 +1242,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.UpdateProductRequest() ); @@ -1262,7 +1264,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductRequest() ); @@ -1293,7 +1295,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductRequest() ); @@ -1340,7 +1342,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductRequest() ); @@ -1371,7 +1373,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteProductRequest() ); @@ -1392,7 +1394,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest() ); @@ -1424,7 +1426,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest() ); @@ -1471,7 +1473,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest() ); @@ -1502,7 +1504,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest() ); @@ -1523,7 +1525,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest() ); @@ -1555,7 +1557,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest() ); @@ -1602,7 +1604,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest() ); @@ -1633,7 +1635,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest() ); @@ -1654,7 +1656,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetReferenceImageRequest() ); @@ -1685,7 +1687,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetReferenceImageRequest() ); @@ -1732,7 +1734,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetReferenceImageRequest() ); @@ -1763,7 +1765,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.GetReferenceImageRequest() ); @@ -1784,7 +1786,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest() ); @@ -1816,7 +1818,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest() ); @@ -1863,7 +1865,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest() ); @@ -1897,7 +1899,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest() ); @@ -1921,7 +1923,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest() ); @@ -1953,7 +1955,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest() ); @@ -2000,7 +2002,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest() ); @@ -2034,7 +2036,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest() ); @@ -2058,7 +2060,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ImportProductSetsRequest() ); @@ -2091,7 +2093,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ImportProductSetsRequest() ); @@ -2145,7 +2147,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ImportProductSetsRequest() ); @@ -2176,7 +2178,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ImportProductSetsRequest() ); @@ -2209,7 +2211,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2231,7 +2233,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2252,7 +2254,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductSetsRequest() ); @@ -2291,7 +2293,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductSetsRequest() ); @@ -2346,7 +2348,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductSetsRequest() ); @@ -2377,7 +2379,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductSetsRequest() ); @@ -2437,7 +2439,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductSetsRequest() ); @@ -2486,7 +2488,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductSetsRequest() ); @@ -2535,7 +2537,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductSetsRequest() ); @@ -2578,7 +2580,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsRequest() ); @@ -2617,7 +2619,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsRequest() ); @@ -2672,7 +2674,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsRequest() ); @@ -2703,7 +2705,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsRequest() ); @@ -2763,7 +2765,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsRequest() ); @@ -2814,7 +2816,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsRequest() ); @@ -2863,7 +2865,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsRequest() ); @@ -2905,7 +2907,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest() ); @@ -2945,7 +2947,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest() ); @@ -3002,7 +3004,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest() ); @@ -3033,7 +3035,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest() ); @@ -3094,7 +3096,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest() ); @@ -3144,7 +3146,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest() ); @@ -3194,7 +3196,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest() ); @@ -3237,7 +3239,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest() ); @@ -3277,7 +3279,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest() ); @@ -3332,7 +3334,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest() ); @@ -3366,7 +3368,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest() ); @@ -3432,7 +3434,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest() ); @@ -3487,7 +3489,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest() ); @@ -3540,7 +3542,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest() ); @@ -3581,7 +3583,7 @@ describe('v1p3beta1.ProductSearchClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3591,7 +3593,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3630,7 +3632,7 @@ describe('v1p3beta1.ProductSearchClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -3641,7 +3643,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3694,7 +3696,7 @@ describe('v1p3beta1.ProductSearchClient', () => { }); }); - describe('productSet', () => { + describe('productSet', async () => { const fakePath = '/rendered/path/productSet'; const expectedParameters = { project: 'projectValue', @@ -3705,7 +3707,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3758,7 +3760,7 @@ describe('v1p3beta1.ProductSearchClient', () => { }); }); - describe('referenceImage', () => { + describe('referenceImage', async () => { const fakePath = '/rendered/path/referenceImage'; const expectedParameters = { project: 'projectValue', @@ -3770,7 +3772,7 @@ describe('v1p3beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.referenceImagePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts b/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts index e80201bc884..ef7d37cf7da 100644 --- a/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts +++ b/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts @@ -285,7 +285,9 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productSearchStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductSetRequest() ); @@ -375,7 +377,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductSetRequest() ); @@ -422,7 +424,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductSetRequest() ); @@ -453,7 +455,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductSetRequest() ); @@ -474,7 +476,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductSetRequest() ); @@ -505,7 +507,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductSetRequest() ); @@ -552,7 +554,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductSetRequest() ); @@ -583,7 +585,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductSetRequest() ); @@ -604,7 +606,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductSetRequest() ); @@ -636,7 +638,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductSetRequest() ); @@ -684,7 +686,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductSetRequest() ); @@ -716,7 +718,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductSetRequest() ); @@ -738,7 +740,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductSetRequest() ); @@ -769,7 +771,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductSetRequest() ); @@ -816,7 +818,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductSetRequest() ); @@ -847,7 +849,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductSetRequest() ); @@ -868,7 +870,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductRequest() ); @@ -899,7 +901,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductRequest() ); @@ -946,7 +948,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductRequest() ); @@ -977,7 +979,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateProductRequest() ); @@ -998,7 +1000,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductRequest() ); @@ -1029,7 +1031,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductRequest() ); @@ -1076,7 +1078,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductRequest() ); @@ -1107,7 +1109,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetProductRequest() ); @@ -1128,7 +1130,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductRequest() ); @@ -1160,7 +1162,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductRequest() ); @@ -1208,7 +1210,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductRequest() ); @@ -1240,7 +1242,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.UpdateProductRequest() ); @@ -1262,7 +1264,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductRequest() ); @@ -1293,7 +1295,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductRequest() ); @@ -1340,7 +1342,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductRequest() ); @@ -1371,7 +1373,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteProductRequest() ); @@ -1392,7 +1394,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest() ); @@ -1424,7 +1426,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest() ); @@ -1471,7 +1473,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest() ); @@ -1502,7 +1504,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest() ); @@ -1523,7 +1525,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest() ); @@ -1555,7 +1557,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest() ); @@ -1602,7 +1604,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest() ); @@ -1633,7 +1635,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest() ); @@ -1654,7 +1656,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetReferenceImageRequest() ); @@ -1685,7 +1687,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetReferenceImageRequest() ); @@ -1732,7 +1734,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetReferenceImageRequest() ); @@ -1763,7 +1765,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.GetReferenceImageRequest() ); @@ -1784,7 +1786,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest() ); @@ -1816,7 +1818,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest() ); @@ -1863,7 +1865,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest() ); @@ -1897,7 +1899,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest() ); @@ -1921,7 +1923,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest() ); @@ -1953,7 +1955,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest() ); @@ -2000,7 +2002,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest() ); @@ -2034,7 +2036,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest() ); @@ -2058,7 +2060,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ImportProductSetsRequest() ); @@ -2091,7 +2093,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ImportProductSetsRequest() ); @@ -2145,7 +2147,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ImportProductSetsRequest() ); @@ -2176,7 +2178,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ImportProductSetsRequest() ); @@ -2209,7 +2211,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2231,7 +2233,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2252,7 +2254,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.PurgeProductsRequest() ); @@ -2285,7 +2287,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.PurgeProductsRequest() ); @@ -2339,7 +2341,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.PurgeProductsRequest() ); @@ -2370,7 +2372,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.PurgeProductsRequest() ); @@ -2403,7 +2405,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2425,7 +2427,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2446,7 +2448,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductSetsRequest() ); @@ -2485,7 +2487,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductSetsRequest() ); @@ -2540,7 +2542,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductSetsRequest() ); @@ -2571,7 +2573,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductSetsRequest() ); @@ -2631,7 +2633,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductSetsRequest() ); @@ -2680,7 +2682,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductSetsRequest() ); @@ -2729,7 +2731,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductSetsRequest() ); @@ -2772,7 +2774,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsRequest() ); @@ -2811,7 +2813,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsRequest() ); @@ -2866,7 +2868,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsRequest() ); @@ -2897,7 +2899,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsRequest() ); @@ -2957,7 +2959,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsRequest() ); @@ -3008,7 +3010,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsRequest() ); @@ -3057,7 +3059,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsRequest() ); @@ -3099,7 +3101,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest() ); @@ -3139,7 +3141,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest() ); @@ -3196,7 +3198,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest() ); @@ -3227,7 +3229,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest() ); @@ -3288,7 +3290,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest() ); @@ -3338,7 +3340,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest() ); @@ -3388,7 +3390,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest() ); @@ -3431,7 +3433,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest() ); @@ -3471,7 +3473,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest() ); @@ -3526,7 +3528,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest() ); @@ -3560,7 +3562,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest() ); @@ -3626,7 +3628,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest() ); @@ -3681,7 +3683,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest() ); @@ -3734,7 +3736,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest() ); @@ -3775,7 +3777,7 @@ describe('v1p4beta1.ProductSearchClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3785,7 +3787,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3824,7 +3826,7 @@ describe('v1p4beta1.ProductSearchClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { project: 'projectValue', @@ -3835,7 +3837,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3888,7 +3890,7 @@ describe('v1p4beta1.ProductSearchClient', () => { }); }); - describe('productSet', () => { + describe('productSet', async () => { const fakePath = '/rendered/path/productSet'; const expectedParameters = { project: 'projectValue', @@ -3899,7 +3901,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productSetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3952,7 +3954,7 @@ describe('v1p4beta1.ProductSearchClient', () => { }); }); - describe('referenceImage', () => { + describe('referenceImage', async () => { const fakePath = '/rendered/path/referenceImage'; const expectedParameters = { project: 'projectValue', @@ -3964,7 +3966,7 @@ describe('v1p4beta1.ProductSearchClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.referenceImagePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vmmigration/package.json b/packages/google-cloud-vmmigration/package.json index 5305371f117..b37bf0d9e7e 100644 --- a/packages/google-cloud-vmmigration/package.json +++ b/packages/google-cloud-vmmigration/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json index ef2507c626a..70f2f0b270b 100644 --- a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json +++ b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmmigration", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json index ef2507c626a..70f2f0b270b 100644 --- a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json +++ b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmmigration", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmmigration/src/v1/vm_migration_client.ts b/packages/google-cloud-vmmigration/src/v1/vm_migration_client.ts index 154978c2bcc..2d05b087594 100644 --- a/packages/google-cloud-vmmigration/src/v1/vm_migration_client.ts +++ b/packages/google-cloud-vmmigration/src/v1/vm_migration_client.ts @@ -955,7 +955,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSource request %j', request); const wrappedCallback: | Callback< @@ -1078,7 +1080,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ source: request.source ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchInventory request %j', request); const wrappedCallback: | Callback< @@ -1203,7 +1207,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUtilizationReport request %j', request); const wrappedCallback: | Callback< @@ -1328,7 +1334,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDatacenterConnector request %j', request); const wrappedCallback: | Callback< @@ -1449,7 +1457,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMigratingVm request %j', request); const wrappedCallback: | Callback< @@ -1559,7 +1569,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCloneJob request %j', request); const wrappedCallback: | Callback< @@ -1675,7 +1687,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCutoverJob request %j', request); const wrappedCallback: | Callback< @@ -1785,7 +1799,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGroup request %j', request); const wrappedCallback: | Callback< @@ -1904,7 +1920,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTargetProject request %j', request); const wrappedCallback: | Callback< @@ -2029,7 +2047,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReplicationCycle request %j', request); const wrappedCallback: | Callback< @@ -2179,7 +2199,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2366,7 +2388,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ 'source.name': request.source!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2547,7 +2571,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2737,7 +2763,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2918,7 +2946,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3106,7 +3136,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3287,7 +3319,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3469,7 +3503,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ datacenter_connector: request.datacenterConnector ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3654,7 +3690,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3841,7 +3879,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ 'migrating_vm.name': request.migratingVm!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4008,7 +4048,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4176,7 +4218,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ migrating_vm: request.migratingVm ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4346,7 +4390,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ migrating_vm: request.migratingVm ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4515,7 +4561,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ migrating_vm: request.migratingVm ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4683,7 +4731,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ migrating_vm: request.migratingVm ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4868,7 +4918,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5035,7 +5087,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5222,7 +5276,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5389,7 +5445,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5574,7 +5632,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5761,7 +5821,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ 'group.name': request.group!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5942,7 +6004,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6111,7 +6175,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ group: request.group ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6280,7 +6346,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ group: request.group ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6468,7 +6536,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6658,7 +6728,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ 'target_project.name': request.targetProject!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6842,7 +6914,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7015,7 +7089,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListSourcesRequest, @@ -7091,7 +7167,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources stream %j', request); return this.descriptors.page.listSources.createStream( this.innerApiCalls.listSources as GaxCall, @@ -7149,7 +7227,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSources iterate %j', request); return this.descriptors.page.listSources.asyncIterate( this.innerApiCalls['listSources'] as GaxCall, @@ -7265,7 +7345,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListUtilizationReportsRequest, @@ -7344,7 +7426,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listUtilizationReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUtilizationReports stream %j', request); return this.descriptors.page.listUtilizationReports.createStream( this.innerApiCalls.listUtilizationReports as GaxCall, @@ -7405,7 +7489,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listUtilizationReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUtilizationReports iterate %j', request); return this.descriptors.page.listUtilizationReports.asyncIterate( this.innerApiCalls['listUtilizationReports'] as GaxCall, @@ -7519,7 +7605,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListDatacenterConnectorsRequest, @@ -7596,7 +7684,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listDatacenterConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatacenterConnectors stream %j', request); return this.descriptors.page.listDatacenterConnectors.createStream( this.innerApiCalls.listDatacenterConnectors as GaxCall, @@ -7655,7 +7745,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listDatacenterConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDatacenterConnectors iterate %j', request); return this.descriptors.page.listDatacenterConnectors.asyncIterate( this.innerApiCalls['listDatacenterConnectors'] as GaxCall, @@ -7770,7 +7862,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListMigratingVmsRequest, @@ -7848,7 +7942,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listMigratingVms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigratingVms stream %j', request); return this.descriptors.page.listMigratingVms.createStream( this.innerApiCalls.listMigratingVms as GaxCall, @@ -7908,7 +8004,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listMigratingVms']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMigratingVms iterate %j', request); return this.descriptors.page.listMigratingVms.asyncIterate( this.innerApiCalls['listMigratingVms'] as GaxCall, @@ -8021,7 +8119,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListCloneJobsRequest, @@ -8097,7 +8197,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listCloneJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCloneJobs stream %j', request); return this.descriptors.page.listCloneJobs.createStream( this.innerApiCalls.listCloneJobs as GaxCall, @@ -8155,7 +8257,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listCloneJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCloneJobs iterate %j', request); return this.descriptors.page.listCloneJobs.asyncIterate( this.innerApiCalls['listCloneJobs'] as GaxCall, @@ -8268,7 +8372,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListCutoverJobsRequest, @@ -8344,7 +8450,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listCutoverJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCutoverJobs stream %j', request); return this.descriptors.page.listCutoverJobs.createStream( this.innerApiCalls.listCutoverJobs as GaxCall, @@ -8402,7 +8510,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listCutoverJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCutoverJobs iterate %j', request); return this.descriptors.page.listCutoverJobs.asyncIterate( this.innerApiCalls['listCutoverJobs'] as GaxCall, @@ -8509,7 +8619,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListGroupsRequest, @@ -8585,7 +8697,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGroups stream %j', request); return this.descriptors.page.listGroups.createStream( this.innerApiCalls.listGroups as GaxCall, @@ -8643,7 +8757,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGroups iterate %j', request); return this.descriptors.page.listGroups.asyncIterate( this.innerApiCalls['listGroups'] as GaxCall, @@ -8759,7 +8875,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListTargetProjectsRequest, @@ -8835,7 +8953,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listTargetProjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetProjects stream %j', request); return this.descriptors.page.listTargetProjects.createStream( this.innerApiCalls.listTargetProjects as GaxCall, @@ -8893,7 +9013,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listTargetProjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetProjects iterate %j', request); return this.descriptors.page.listTargetProjects.asyncIterate( this.innerApiCalls['listTargetProjects'] as GaxCall, @@ -9006,7 +9128,9 @@ export class VmMigrationClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmmigration.v1.IListReplicationCyclesRequest, @@ -9082,7 +9206,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listReplicationCycles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReplicationCycles stream %j', request); return this.descriptors.page.listReplicationCycles.createStream( this.innerApiCalls.listReplicationCycles as GaxCall, @@ -9140,7 +9266,9 @@ export class VmMigrationClient { }); const defaultCallSettings = this._defaults['listReplicationCycles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReplicationCycles iterate %j', request); return this.descriptors.page.listReplicationCycles.asyncIterate( this.innerApiCalls['listReplicationCycles'] as GaxCall, @@ -9458,7 +9586,7 @@ export class VmMigrationClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-vmmigration/test/gapic_vm_migration_v1.ts b/packages/google-cloud-vmmigration/test/gapic_vm_migration_v1.ts index df4bfa4b433..8e714982df1 100644 --- a/packages/google-cloud-vmmigration/test/gapic_vm_migration_v1.ts +++ b/packages/google-cloud-vmmigration/test/gapic_vm_migration_v1.ts @@ -288,7 +288,9 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.vmMigrationStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetSourceRequest() ); @@ -378,7 +380,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetSourceRequest() ); @@ -425,7 +427,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetSourceRequest() ); @@ -453,7 +455,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetSourceRequest() ); @@ -474,7 +476,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FetchInventoryRequest() ); @@ -505,7 +507,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FetchInventoryRequest() ); @@ -552,7 +554,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FetchInventoryRequest() ); @@ -583,7 +585,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FetchInventoryRequest() ); @@ -604,7 +606,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetUtilizationReportRequest() ); @@ -636,7 +638,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetUtilizationReportRequest() ); @@ -683,7 +685,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetUtilizationReportRequest() ); @@ -714,7 +716,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetUtilizationReportRequest() ); @@ -735,7 +737,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetDatacenterConnectorRequest() ); @@ -767,7 +769,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetDatacenterConnectorRequest() ); @@ -814,7 +816,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetDatacenterConnectorRequest() ); @@ -848,7 +850,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetDatacenterConnectorRequest() ); @@ -872,7 +874,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetMigratingVmRequest() ); @@ -903,7 +905,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetMigratingVmRequest() ); @@ -950,7 +952,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetMigratingVmRequest() ); @@ -981,7 +983,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetMigratingVmRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCloneJobRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCloneJobRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCloneJobRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCloneJobRequest() ); @@ -1132,7 +1134,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCutoverJobRequest() ); @@ -1163,7 +1165,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCutoverJobRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCutoverJobRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetCutoverJobRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetGroupRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetGroupRequest() ); @@ -1340,7 +1342,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetGroupRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetGroupRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetTargetProjectRequest() ); @@ -1420,7 +1422,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetTargetProjectRequest() ); @@ -1467,7 +1469,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetTargetProjectRequest() ); @@ -1498,7 +1500,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetTargetProjectRequest() ); @@ -1519,7 +1521,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetReplicationCycleRequest() ); @@ -1551,7 +1553,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetReplicationCycleRequest() ); @@ -1598,7 +1600,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetReplicationCycleRequest() ); @@ -1629,7 +1631,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.GetReplicationCycleRequest() ); @@ -1650,7 +1652,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateSourceRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateSourceRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateSourceRequest() ); @@ -1767,7 +1769,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateSourceRequest() ); @@ -1800,7 +1802,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1822,7 +1824,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1840,7 +1842,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateSourceRequest() ); @@ -1873,7 +1875,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateSourceRequest() ); @@ -1928,7 +1930,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateSourceRequest() ); @@ -1960,7 +1962,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateSourceRequest() ); @@ -1994,7 +1996,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2016,7 +2018,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2034,7 +2036,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteSourceRequest() ); @@ -2066,7 +2068,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteSourceRequest() ); @@ -2120,7 +2122,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteSourceRequest() ); @@ -2151,7 +2153,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteSourceRequest() ); @@ -2184,7 +2186,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2206,7 +2208,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2224,7 +2226,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateUtilizationReportRequest() ); @@ -2257,7 +2259,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateUtilizationReportRequest() ); @@ -2311,7 +2313,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateUtilizationReportRequest() ); @@ -2345,7 +2347,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateUtilizationReportRequest() ); @@ -2378,7 +2380,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2401,7 +2403,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2422,7 +2424,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteUtilizationReportRequest() ); @@ -2455,7 +2457,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteUtilizationReportRequest() ); @@ -2509,7 +2511,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteUtilizationReportRequest() ); @@ -2543,7 +2545,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteUtilizationReportRequest() ); @@ -2576,7 +2578,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2599,7 +2601,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2620,7 +2622,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest() ); @@ -2653,7 +2655,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest() ); @@ -2707,7 +2709,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest() ); @@ -2741,7 +2743,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest() ); @@ -2774,7 +2776,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2797,7 +2799,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2818,7 +2820,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest() ); @@ -2851,7 +2853,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest() ); @@ -2905,7 +2907,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest() ); @@ -2939,7 +2941,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest() ); @@ -2972,7 +2974,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2995,7 +2997,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3016,7 +3018,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpgradeApplianceRequest() ); @@ -3049,7 +3051,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpgradeApplianceRequest() ); @@ -3103,7 +3105,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpgradeApplianceRequest() ); @@ -3134,7 +3136,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpgradeApplianceRequest() ); @@ -3167,7 +3169,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3189,7 +3191,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3210,7 +3212,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateMigratingVmRequest() ); @@ -3243,7 +3245,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateMigratingVmRequest() ); @@ -3297,7 +3299,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateMigratingVmRequest() ); @@ -3328,7 +3330,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateMigratingVmRequest() ); @@ -3361,7 +3363,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3383,7 +3385,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3404,7 +3406,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateMigratingVmRequest() ); @@ -3438,7 +3440,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateMigratingVmRequest() ); @@ -3493,7 +3495,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateMigratingVmRequest() ); @@ -3525,7 +3527,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateMigratingVmRequest() ); @@ -3559,7 +3561,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3581,7 +3583,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3602,7 +3604,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteMigratingVmRequest() ); @@ -3635,7 +3637,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteMigratingVmRequest() ); @@ -3689,7 +3691,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteMigratingVmRequest() ); @@ -3720,7 +3722,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteMigratingVmRequest() ); @@ -3753,7 +3755,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3775,7 +3777,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3796,7 +3798,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.StartMigrationRequest() ); @@ -3829,7 +3831,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.StartMigrationRequest() ); @@ -3883,7 +3885,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.StartMigrationRequest() ); @@ -3914,7 +3916,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.StartMigrationRequest() ); @@ -3947,7 +3949,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3969,7 +3971,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3990,7 +3992,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ResumeMigrationRequest() ); @@ -4023,7 +4025,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ResumeMigrationRequest() ); @@ -4077,7 +4079,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ResumeMigrationRequest() ); @@ -4108,7 +4110,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ResumeMigrationRequest() ); @@ -4141,7 +4143,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4163,7 +4165,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4184,7 +4186,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.PauseMigrationRequest() ); @@ -4217,7 +4219,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.PauseMigrationRequest() ); @@ -4271,7 +4273,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.PauseMigrationRequest() ); @@ -4302,7 +4304,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.PauseMigrationRequest() ); @@ -4335,7 +4337,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4357,7 +4359,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4378,7 +4380,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FinalizeMigrationRequest() ); @@ -4411,7 +4413,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FinalizeMigrationRequest() ); @@ -4465,7 +4467,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FinalizeMigrationRequest() ); @@ -4496,7 +4498,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.FinalizeMigrationRequest() ); @@ -4529,7 +4531,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4551,7 +4553,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4572,7 +4574,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCloneJobRequest() ); @@ -4605,7 +4607,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCloneJobRequest() ); @@ -4659,7 +4661,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCloneJobRequest() ); @@ -4690,7 +4692,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCloneJobRequest() ); @@ -4723,7 +4725,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4745,7 +4747,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4766,7 +4768,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCloneJobRequest() ); @@ -4799,7 +4801,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCloneJobRequest() ); @@ -4853,7 +4855,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCloneJobRequest() ); @@ -4884,7 +4886,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCloneJobRequest() ); @@ -4917,7 +4919,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4939,7 +4941,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4960,7 +4962,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCutoverJobRequest() ); @@ -4993,7 +4995,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCutoverJobRequest() ); @@ -5047,7 +5049,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCutoverJobRequest() ); @@ -5078,7 +5080,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateCutoverJobRequest() ); @@ -5111,7 +5113,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5133,7 +5135,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5154,7 +5156,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCutoverJobRequest() ); @@ -5187,7 +5189,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCutoverJobRequest() ); @@ -5241,7 +5243,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCutoverJobRequest() ); @@ -5272,7 +5274,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CancelCutoverJobRequest() ); @@ -5305,7 +5307,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5327,7 +5329,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5348,7 +5350,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateGroupRequest() ); @@ -5380,7 +5382,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateGroupRequest() ); @@ -5434,7 +5436,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateGroupRequest() ); @@ -5465,7 +5467,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateGroupRequest() ); @@ -5498,7 +5500,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5520,7 +5522,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5538,7 +5540,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateGroupRequest() ); @@ -5571,7 +5573,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateGroupRequest() ); @@ -5626,7 +5628,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateGroupRequest() ); @@ -5658,7 +5660,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateGroupRequest() ); @@ -5692,7 +5694,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5714,7 +5716,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5732,7 +5734,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteGroupRequest() ); @@ -5764,7 +5766,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteGroupRequest() ); @@ -5818,7 +5820,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteGroupRequest() ); @@ -5849,7 +5851,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteGroupRequest() ); @@ -5882,7 +5884,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5904,7 +5906,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5922,7 +5924,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.AddGroupMigrationRequest() ); @@ -5955,7 +5957,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.AddGroupMigrationRequest() ); @@ -6009,7 +6011,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.AddGroupMigrationRequest() ); @@ -6040,7 +6042,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.AddGroupMigrationRequest() ); @@ -6073,7 +6075,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6095,7 +6097,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6116,7 +6118,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.RemoveGroupMigrationRequest() ); @@ -6149,7 +6151,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.RemoveGroupMigrationRequest() ); @@ -6203,7 +6205,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.RemoveGroupMigrationRequest() ); @@ -6234,7 +6236,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.RemoveGroupMigrationRequest() ); @@ -6267,7 +6269,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6289,7 +6291,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6310,7 +6312,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateTargetProjectRequest() ); @@ -6343,7 +6345,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateTargetProjectRequest() ); @@ -6397,7 +6399,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateTargetProjectRequest() ); @@ -6428,7 +6430,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.CreateTargetProjectRequest() ); @@ -6461,7 +6463,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6483,7 +6485,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6504,7 +6506,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateTargetProjectRequest() ); @@ -6538,7 +6540,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateTargetProjectRequest() ); @@ -6593,7 +6595,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateTargetProjectRequest() ); @@ -6625,7 +6627,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.UpdateTargetProjectRequest() ); @@ -6659,7 +6661,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6681,7 +6683,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6702,7 +6704,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteTargetProjectRequest() ); @@ -6735,7 +6737,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteTargetProjectRequest() ); @@ -6789,7 +6791,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteTargetProjectRequest() ); @@ -6820,7 +6822,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.DeleteTargetProjectRequest() ); @@ -6853,7 +6855,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6875,7 +6877,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6896,7 +6898,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListSourcesRequest() ); @@ -6929,7 +6931,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListSourcesRequest() ); @@ -6978,7 +6980,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListSourcesRequest() ); @@ -7009,7 +7011,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListSourcesRequest() ); @@ -7063,7 +7065,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListSourcesRequest() ); @@ -7114,7 +7116,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListSourcesRequest() ); @@ -7157,7 +7159,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListSourcesRequest() ); @@ -7201,7 +7203,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListUtilizationReportsRequest() ); @@ -7241,7 +7243,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListUtilizationReportsRequest() ); @@ -7298,7 +7300,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListUtilizationReportsRequest() ); @@ -7332,7 +7334,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListUtilizationReportsRequest() ); @@ -7399,7 +7401,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListUtilizationReportsRequest() ); @@ -7455,7 +7457,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListUtilizationReportsRequest() ); @@ -7509,7 +7511,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListUtilizationReportsRequest() ); @@ -7556,7 +7558,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest() ); @@ -7596,7 +7598,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest() ); @@ -7653,7 +7655,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest() ); @@ -7687,7 +7689,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest() ); @@ -7756,7 +7758,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest() ); @@ -7814,7 +7816,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest() ); @@ -7868,7 +7870,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest() ); @@ -7915,7 +7917,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListMigratingVmsRequest() ); @@ -7954,7 +7956,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListMigratingVmsRequest() ); @@ -8009,7 +8011,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListMigratingVmsRequest() ); @@ -8040,7 +8042,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListMigratingVmsRequest() ); @@ -8100,7 +8102,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListMigratingVmsRequest() ); @@ -8149,7 +8151,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListMigratingVmsRequest() ); @@ -8198,7 +8200,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListMigratingVmsRequest() ); @@ -8240,7 +8242,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCloneJobsRequest() ); @@ -8279,7 +8281,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCloneJobsRequest() ); @@ -8334,7 +8336,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCloneJobsRequest() ); @@ -8365,7 +8367,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCloneJobsRequest() ); @@ -8425,7 +8427,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCloneJobsRequest() ); @@ -8474,7 +8476,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCloneJobsRequest() ); @@ -8523,7 +8525,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCloneJobsRequest() ); @@ -8565,7 +8567,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCutoverJobsRequest() ); @@ -8604,7 +8606,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCutoverJobsRequest() ); @@ -8659,7 +8661,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCutoverJobsRequest() ); @@ -8690,7 +8692,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCutoverJobsRequest() ); @@ -8750,7 +8752,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCutoverJobsRequest() ); @@ -8799,7 +8801,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCutoverJobsRequest() ); @@ -8848,7 +8850,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListCutoverJobsRequest() ); @@ -8890,7 +8892,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListGroupsRequest() ); @@ -8923,7 +8925,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListGroupsRequest() ); @@ -8972,7 +8974,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListGroupsRequest() ); @@ -9003,7 +9005,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListGroupsRequest() ); @@ -9057,7 +9059,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListGroupsRequest() ); @@ -9108,7 +9110,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListGroupsRequest() ); @@ -9151,7 +9153,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListGroupsRequest() ); @@ -9195,7 +9197,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListTargetProjectsRequest() ); @@ -9235,7 +9237,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListTargetProjectsRequest() ); @@ -9290,7 +9292,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListTargetProjectsRequest() ); @@ -9321,7 +9323,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListTargetProjectsRequest() ); @@ -9382,7 +9384,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListTargetProjectsRequest() ); @@ -9432,7 +9434,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListTargetProjectsRequest() ); @@ -9481,7 +9483,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListTargetProjectsRequest() ); @@ -9524,7 +9526,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListReplicationCyclesRequest() ); @@ -9564,7 +9566,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListReplicationCyclesRequest() ); @@ -9621,7 +9623,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListReplicationCyclesRequest() ); @@ -9655,7 +9657,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListReplicationCyclesRequest() ); @@ -9722,7 +9724,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListReplicationCyclesRequest() ); @@ -9778,7 +9780,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListReplicationCyclesRequest() ); @@ -9832,7 +9834,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmmigration.v1.ListReplicationCyclesRequest() ); @@ -9878,7 +9880,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9908,7 +9910,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9952,7 +9954,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9984,7 +9986,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -10014,7 +10016,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -10058,7 +10060,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -10090,7 +10092,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -10123,7 +10125,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -10167,7 +10169,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -10202,7 +10204,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10232,7 +10234,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10276,7 +10278,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -10311,7 +10313,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10359,7 +10361,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -10400,7 +10402,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -10479,7 +10481,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -10559,7 +10561,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -10655,8 +10657,7 @@ describe('v1.VmMigrationClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -10675,7 +10676,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -10684,8 +10685,7 @@ describe('v1.VmMigrationClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -10701,7 +10701,7 @@ describe('v1.VmMigrationClient', () => { }); describe('Path templates', () => { - describe('cloneJob', () => { + describe('cloneJob', async () => { const fakePath = '/rendered/path/cloneJob'; const expectedParameters = { project: 'projectValue', @@ -10714,7 +10714,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cloneJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10789,7 +10789,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('cutoverJob', () => { + describe('cutoverJob', async () => { const fakePath = '/rendered/path/cutoverJob'; const expectedParameters = { project: 'projectValue', @@ -10802,7 +10802,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cutoverJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10877,7 +10877,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('datacenterConnector', () => { + describe('datacenterConnector', async () => { const fakePath = '/rendered/path/datacenterConnector'; const expectedParameters = { project: 'projectValue', @@ -10889,7 +10889,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datacenterConnectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10970,7 +10970,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('group', () => { + describe('group', async () => { const fakePath = '/rendered/path/group'; const expectedParameters = { project: 'projectValue', @@ -10981,7 +10981,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11034,7 +11034,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -11044,7 +11044,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11083,7 +11083,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('migratingVm', () => { + describe('migratingVm', async () => { const fakePath = '/rendered/path/migratingVm'; const expectedParameters = { project: 'projectValue', @@ -11095,7 +11095,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.migratingVmPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11159,7 +11159,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -11168,7 +11168,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11197,7 +11197,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('replicationCycle', () => { + describe('replicationCycle', async () => { const fakePath = '/rendered/path/replicationCycle'; const expectedParameters = { project: 'projectValue', @@ -11210,7 +11210,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.replicationCyclePathTemplate.render = sinon .stub() .returns(fakePath); @@ -11290,7 +11290,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('source', () => { + describe('source', async () => { const fakePath = '/rendered/path/source'; const expectedParameters = { project: 'projectValue', @@ -11301,7 +11301,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -11354,7 +11354,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('targetProject', () => { + describe('targetProject', async () => { const fakePath = '/rendered/path/targetProject'; const expectedParameters = { project: 'projectValue', @@ -11365,7 +11365,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.targetProjectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11418,7 +11418,7 @@ describe('v1.VmMigrationClient', () => { }); }); - describe('utilizationReport', () => { + describe('utilizationReport', async () => { const fakePath = '/rendered/path/utilizationReport'; const expectedParameters = { project: 'projectValue', @@ -11430,7 +11430,7 @@ describe('v1.VmMigrationClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.utilizationReportPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vmwareengine/package.json b/packages/google-cloud-vmwareengine/package.json index 02c21c803bc..a748c7386a0 100644 --- a/packages/google-cloud-vmwareengine/package.json +++ b/packages/google-cloud-vmwareengine/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json index fff61105a47..033ecc10bee 100644 --- a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json +++ b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmwareengine", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json index b87e04f410d..4ec8d12e0c6 100644 --- a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json +++ b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmwareengine", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmwareengine/src/v1/vmware_engine_client.ts b/packages/google-cloud-vmwareengine/src/v1/vmware_engine_client.ts index 13adf5fe2ce..9b6f7568c2b 100644 --- a/packages/google-cloud-vmwareengine/src/v1/vmware_engine_client.ts +++ b/packages/google-cloud-vmwareengine/src/v1/vmware_engine_client.ts @@ -1281,7 +1281,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPrivateCloud request %j', request); const wrappedCallback: | Callback< @@ -1398,7 +1400,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -1510,7 +1514,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNode request %j', request); const wrappedCallback: | Callback< @@ -1636,7 +1642,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExternalAddress request %j', request); const wrappedCallback: | Callback< @@ -1753,7 +1761,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSubnet request %j', request); const wrappedCallback: | Callback< @@ -1879,7 +1889,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExternalAccessRule request %j', request); const wrappedCallback: | Callback< @@ -2002,7 +2014,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLoggingServer request %j', request); const wrappedCallback: | Callback< @@ -2125,7 +2139,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNodeType request %j', request); const wrappedCallback: | Callback< @@ -2252,7 +2268,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ private_cloud: request.privateCloud ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('showNsxCredentials request %j', request); const wrappedCallback: | Callback< @@ -2393,7 +2411,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ private_cloud: request.privateCloud ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('showVcenterCredentials request %j', request); const wrappedCallback: | Callback< @@ -2516,7 +2536,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDnsForwarding request %j', request); const wrappedCallback: | Callback< @@ -2642,7 +2664,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNetworkPeering request %j', request); const wrappedCallback: | Callback< @@ -2771,7 +2795,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHcxActivationKey request %j', request); const wrappedCallback: | Callback< @@ -2894,7 +2920,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNetworkPolicy request %j', request); const wrappedCallback: | Callback< @@ -3023,7 +3051,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getManagementDnsZoneBinding request %j', request); const wrappedCallback: | Callback< @@ -3155,7 +3185,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVmwareEngineNetwork request %j', request); const wrappedCallback: | Callback< @@ -3286,7 +3318,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPrivateConnection request %j', request); const wrappedCallback: | Callback< @@ -3418,7 +3452,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDnsBindPermission request %j', request); const wrappedCallback: | Callback< @@ -3580,7 +3616,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3763,7 +3801,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'private_cloud.name': request.privateCloud!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3966,7 +4006,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4143,7 +4185,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4337,7 +4381,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4522,7 +4568,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4699,7 +4747,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4902,7 +4952,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5096,7 +5148,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'external_address.name': request.externalAddress!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5284,7 +5338,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5462,7 +5518,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'subnet.name': request.subnet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5663,7 +5721,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5852,7 +5912,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'external_access_rule.name': request.externalAccessRule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6038,7 +6100,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6239,7 +6303,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6428,7 +6494,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'logging_server.name': request.loggingServer!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6614,7 +6682,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6801,7 +6871,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ private_cloud: request.privateCloud ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6998,7 +7070,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ private_cloud: request.privateCloud ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7187,7 +7261,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'dns_forwarding.name': request.dnsForwarding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7389,7 +7465,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7578,7 +7656,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7768,7 +7848,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'network_peering.name': request.networkPeering!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -7969,7 +8051,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8173,7 +8257,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8372,7 +8458,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'network_policy.name': request.networkPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8560,7 +8648,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8768,7 +8858,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -8964,7 +9056,9 @@ export class VmwareEngineClient { 'management_dns_zone_binding.name': request.managementDnsZoneBinding!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9158,7 +9252,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9351,7 +9447,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9562,7 +9660,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9753,7 +9853,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'vmware_engine_network.name': request.vmwareEngineNetwork!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -9947,7 +10049,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -10148,7 +10252,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -10338,7 +10444,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ 'private_connection.name': request.privateConnection!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -10526,7 +10634,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -10720,7 +10830,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -10913,7 +11025,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -11119,7 +11233,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListPrivateCloudsRequest, @@ -11228,7 +11344,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listPrivateClouds']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateClouds stream %j', request); return this.descriptors.page.listPrivateClouds.createStream( this.innerApiCalls.listPrivateClouds as GaxCall, @@ -11319,7 +11437,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listPrivateClouds']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateClouds iterate %j', request); return this.descriptors.page.listPrivateClouds.asyncIterate( this.innerApiCalls['listPrivateClouds'] as GaxCall, @@ -11453,7 +11573,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListClustersRequest, @@ -11550,7 +11672,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -11629,7 +11753,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -11737,7 +11863,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListNodesRequest, @@ -11814,7 +11942,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes stream %j', request); return this.descriptors.page.listNodes.createStream( this.innerApiCalls.listNodes as GaxCall, @@ -11873,7 +12003,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodes iterate %j', request); return this.descriptors.page.listNodes.asyncIterate( this.innerApiCalls['listNodes'] as GaxCall, @@ -12020,7 +12152,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListExternalAddressesRequest, @@ -12129,7 +12263,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listExternalAddresses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExternalAddresses stream %j', request); return this.descriptors.page.listExternalAddresses.createStream( this.innerApiCalls.listExternalAddresses as GaxCall, @@ -12220,7 +12356,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listExternalAddresses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExternalAddresses iterate %j', request); return this.descriptors.page.listExternalAddresses.asyncIterate( this.innerApiCalls['listExternalAddresses'] as GaxCall, @@ -12336,7 +12474,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ network_policy: request.networkPolicy ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IFetchNetworkPolicyExternalAddressesRequest, @@ -12421,7 +12561,9 @@ export class VmwareEngineClient { const defaultCallSettings = this._defaults['fetchNetworkPolicyExternalAddresses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchNetworkPolicyExternalAddresses stream %j', request); return this.descriptors.page.fetchNetworkPolicyExternalAddresses.createStream( this.innerApiCalls.fetchNetworkPolicyExternalAddresses as GaxCall, @@ -12482,7 +12624,9 @@ export class VmwareEngineClient { const defaultCallSettings = this._defaults['fetchNetworkPolicyExternalAddresses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchNetworkPolicyExternalAddresses iterate %j', request); return this.descriptors.page.fetchNetworkPolicyExternalAddresses.asyncIterate( this.innerApiCalls['fetchNetworkPolicyExternalAddresses'] as GaxCall, @@ -12596,7 +12740,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListSubnetsRequest, @@ -12673,7 +12819,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listSubnets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubnets stream %j', request); return this.descriptors.page.listSubnets.createStream( this.innerApiCalls.listSubnets as GaxCall, @@ -12732,7 +12880,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listSubnets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubnets iterate %j', request); return this.descriptors.page.listSubnets.asyncIterate( this.innerApiCalls['listSubnets'] as GaxCall, @@ -12878,7 +13028,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListExternalAccessRulesRequest, @@ -12987,7 +13139,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listExternalAccessRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExternalAccessRules stream %j', request); return this.descriptors.page.listExternalAccessRules.createStream( this.innerApiCalls.listExternalAccessRules as GaxCall, @@ -13078,7 +13232,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listExternalAccessRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExternalAccessRules iterate %j', request); return this.descriptors.page.listExternalAccessRules.asyncIterate( this.innerApiCalls['listExternalAccessRules'] as GaxCall, @@ -13226,7 +13382,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListLoggingServersRequest, @@ -13336,7 +13494,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listLoggingServers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLoggingServers stream %j', request); return this.descriptors.page.listLoggingServers.createStream( this.innerApiCalls.listLoggingServers as GaxCall, @@ -13428,7 +13588,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listLoggingServers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLoggingServers iterate %j', request); return this.descriptors.page.listLoggingServers.asyncIterate( this.innerApiCalls['listLoggingServers'] as GaxCall, @@ -13567,7 +13729,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListNodeTypesRequest, @@ -13669,7 +13833,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNodeTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodeTypes stream %j', request); return this.descriptors.page.listNodeTypes.createStream( this.innerApiCalls.listNodeTypes as GaxCall, @@ -13753,7 +13919,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNodeTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodeTypes iterate %j', request); return this.descriptors.page.listNodeTypes.asyncIterate( this.innerApiCalls['listNodeTypes'] as GaxCall, @@ -13898,7 +14066,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListNetworkPeeringsRequest, @@ -14005,7 +14175,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNetworkPeerings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkPeerings stream %j', request); return this.descriptors.page.listNetworkPeerings.createStream( this.innerApiCalls.listNetworkPeerings as GaxCall, @@ -14094,7 +14266,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNetworkPeerings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkPeerings iterate %j', request); return this.descriptors.page.listNetworkPeerings.asyncIterate( this.innerApiCalls['listNetworkPeerings'] as GaxCall, @@ -14212,7 +14386,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListPeeringRoutesRequest, @@ -14292,7 +14468,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listPeeringRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPeeringRoutes stream %j', request); return this.descriptors.page.listPeeringRoutes.createStream( this.innerApiCalls.listPeeringRoutes as GaxCall, @@ -14354,7 +14532,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listPeeringRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPeeringRoutes iterate %j', request); return this.descriptors.page.listPeeringRoutes.asyncIterate( this.innerApiCalls['listPeeringRoutes'] as GaxCall, @@ -14469,7 +14649,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListHcxActivationKeysRequest, @@ -14547,7 +14729,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listHcxActivationKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHcxActivationKeys stream %j', request); return this.descriptors.page.listHcxActivationKeys.createStream( this.innerApiCalls.listHcxActivationKeys as GaxCall, @@ -14607,7 +14791,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listHcxActivationKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHcxActivationKeys iterate %j', request); return this.descriptors.page.listHcxActivationKeys.asyncIterate( this.innerApiCalls['listHcxActivationKeys'] as GaxCall, @@ -14752,7 +14938,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListNetworkPoliciesRequest, @@ -14860,7 +15048,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNetworkPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkPolicies stream %j', request); return this.descriptors.page.listNetworkPolicies.createStream( this.innerApiCalls.listNetworkPolicies as GaxCall, @@ -14950,7 +15140,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listNetworkPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworkPolicies iterate %j', request); return this.descriptors.page.listNetworkPolicies.asyncIterate( this.innerApiCalls['listNetworkPolicies'] as GaxCall, @@ -15097,7 +15289,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListManagementDnsZoneBindingsRequest, @@ -15207,7 +15401,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listManagementDnsZoneBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagementDnsZoneBindings stream %j', request); return this.descriptors.page.listManagementDnsZoneBindings.createStream( this.innerApiCalls.listManagementDnsZoneBindings as GaxCall, @@ -15299,7 +15495,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listManagementDnsZoneBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagementDnsZoneBindings iterate %j', request); return this.descriptors.page.listManagementDnsZoneBindings.asyncIterate( this.innerApiCalls['listManagementDnsZoneBindings'] as GaxCall, @@ -15443,7 +15641,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListVmwareEngineNetworksRequest, @@ -15550,7 +15750,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listVmwareEngineNetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVmwareEngineNetworks stream %j', request); return this.descriptors.page.listVmwareEngineNetworks.createStream( this.innerApiCalls.listVmwareEngineNetworks as GaxCall, @@ -15639,7 +15841,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listVmwareEngineNetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVmwareEngineNetworks iterate %j', request); return this.descriptors.page.listVmwareEngineNetworks.asyncIterate( this.innerApiCalls['listVmwareEngineNetworks'] as GaxCall, @@ -15783,7 +15987,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListPrivateConnectionsRequest, @@ -15890,7 +16096,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections stream %j', request); return this.descriptors.page.listPrivateConnections.createStream( this.innerApiCalls.listPrivateConnections as GaxCall, @@ -15979,7 +16187,9 @@ export class VmwareEngineClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections iterate %j', request); return this.descriptors.page.listPrivateConnections.asyncIterate( this.innerApiCalls['listPrivateConnections'] as GaxCall, @@ -16090,7 +16300,9 @@ export class VmwareEngineClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vmwareengine.v1.IListPrivateConnectionPeeringRoutesRequest, @@ -16171,7 +16383,9 @@ export class VmwareEngineClient { const defaultCallSettings = this._defaults['listPrivateConnectionPeeringRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnectionPeeringRoutes stream %j', request); return this.descriptors.page.listPrivateConnectionPeeringRoutes.createStream( this.innerApiCalls.listPrivateConnectionPeeringRoutes as GaxCall, @@ -16228,7 +16442,9 @@ export class VmwareEngineClient { const defaultCallSettings = this._defaults['listPrivateConnectionPeeringRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnectionPeeringRoutes iterate %j', request); return this.descriptors.page.listPrivateConnectionPeeringRoutes.asyncIterate( this.innerApiCalls['listPrivateConnectionPeeringRoutes'] as GaxCall, @@ -16546,7 +16762,7 @@ export class VmwareEngineClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-vmwareengine/test/gapic_vmware_engine_v1.ts b/packages/google-cloud-vmwareengine/test/gapic_vmware_engine_v1.ts index d32167797f3..d56f1894f9e 100644 --- a/packages/google-cloud-vmwareengine/test/gapic_vmware_engine_v1.ts +++ b/packages/google-cloud-vmwareengine/test/gapic_vmware_engine_v1.ts @@ -293,7 +293,9 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.vmwareEngineStub); client.close().then(() => { done(); @@ -352,7 +354,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateCloudRequest() ); @@ -383,7 +385,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateCloudRequest() ); @@ -430,7 +432,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateCloudRequest() ); @@ -461,7 +463,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateCloudRequest() ); @@ -482,7 +484,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetClusterRequest() ); @@ -513,7 +515,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetClusterRequest() ); @@ -560,7 +562,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetClusterRequest() ); @@ -591,7 +593,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetClusterRequest() ); @@ -612,7 +614,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeRequest() ); @@ -643,7 +645,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeRequest() ); @@ -690,7 +692,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeRequest() ); @@ -718,7 +720,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeRequest() ); @@ -739,7 +741,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAddressRequest() ); @@ -771,7 +773,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAddressRequest() ); @@ -818,7 +820,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAddressRequest() ); @@ -849,7 +851,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAddressRequest() ); @@ -870,7 +872,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetSubnetRequest() ); @@ -901,7 +903,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetSubnetRequest() ); @@ -948,7 +950,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetSubnetRequest() ); @@ -976,7 +978,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetSubnetRequest() ); @@ -997,7 +999,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest() ); @@ -1076,7 +1078,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest() ); @@ -1134,7 +1136,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetLoggingServerRequest() ); @@ -1165,7 +1167,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetLoggingServerRequest() ); @@ -1212,7 +1214,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetLoggingServerRequest() ); @@ -1243,7 +1245,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetLoggingServerRequest() ); @@ -1264,7 +1266,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeTypeRequest() ); @@ -1295,7 +1297,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeTypeRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeTypeRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNodeTypeRequest() ); @@ -1394,7 +1396,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest() ); @@ -1426,7 +1428,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest() ); @@ -1473,7 +1475,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest() ); @@ -1504,7 +1506,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest() ); @@ -1525,7 +1527,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest() ); @@ -1557,7 +1559,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest() ); @@ -1604,7 +1606,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest() ); @@ -1638,7 +1640,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest() ); @@ -1662,7 +1664,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsForwardingRequest() ); @@ -1693,7 +1695,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsForwardingRequest() ); @@ -1740,7 +1742,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsForwardingRequest() ); @@ -1771,7 +1773,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsForwardingRequest() ); @@ -1792,7 +1794,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPeeringRequest() ); @@ -1823,7 +1825,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPeeringRequest() ); @@ -1870,7 +1872,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPeeringRequest() ); @@ -1901,7 +1903,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPeeringRequest() ); @@ -1922,7 +1924,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest() ); @@ -1954,7 +1956,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest() ); @@ -2001,7 +2003,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest() ); @@ -2032,7 +2034,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest() ); @@ -2053,7 +2055,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPolicyRequest() ); @@ -2084,7 +2086,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPolicyRequest() ); @@ -2131,7 +2133,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPolicyRequest() ); @@ -2162,7 +2164,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetNetworkPolicyRequest() ); @@ -2183,7 +2185,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest() ); @@ -2215,7 +2217,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest() ); @@ -2262,7 +2264,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest() ); @@ -2296,7 +2298,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest() ); @@ -2320,7 +2322,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest() ); @@ -2352,7 +2354,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest() ); @@ -2399,7 +2401,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest() ); @@ -2433,7 +2435,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest() ); @@ -2457,7 +2459,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateConnectionRequest() ); @@ -2489,7 +2491,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateConnectionRequest() ); @@ -2536,7 +2538,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateConnectionRequest() ); @@ -2567,7 +2569,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetPrivateConnectionRequest() ); @@ -2588,7 +2590,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest() ); @@ -2620,7 +2622,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest() ); @@ -2667,7 +2669,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest() ); @@ -2698,7 +2700,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest() ); @@ -2719,7 +2721,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateCloudRequest() ); @@ -2752,7 +2754,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateCloudRequest() ); @@ -2806,7 +2808,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateCloudRequest() ); @@ -2837,7 +2839,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateCloudRequest() ); @@ -2870,7 +2872,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2892,7 +2894,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2913,7 +2915,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest() ); @@ -2947,7 +2949,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest() ); @@ -3002,7 +3004,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest() ); @@ -3034,7 +3036,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest() ); @@ -3068,7 +3070,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3090,7 +3092,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3111,7 +3113,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateCloudRequest() ); @@ -3144,7 +3146,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateCloudRequest() ); @@ -3198,7 +3200,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateCloudRequest() ); @@ -3229,7 +3231,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateCloudRequest() ); @@ -3262,7 +3264,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3284,7 +3286,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3305,7 +3307,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest() ); @@ -3338,7 +3340,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest() ); @@ -3392,7 +3394,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest() ); @@ -3423,7 +3425,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest() ); @@ -3456,7 +3458,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3478,7 +3480,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3499,7 +3501,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateClusterRequest() ); @@ -3532,7 +3534,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateClusterRequest() ); @@ -3586,7 +3588,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateClusterRequest() ); @@ -3617,7 +3619,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateClusterRequest() ); @@ -3650,7 +3652,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3672,7 +3674,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3693,7 +3695,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateClusterRequest() ); @@ -3727,7 +3729,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateClusterRequest() ); @@ -3782,7 +3784,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateClusterRequest() ); @@ -3814,7 +3816,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateClusterRequest() ); @@ -3848,7 +3850,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3870,7 +3872,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3891,7 +3893,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteClusterRequest() ); @@ -3924,7 +3926,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteClusterRequest() ); @@ -3978,7 +3980,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteClusterRequest() ); @@ -4009,7 +4011,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteClusterRequest() ); @@ -4042,7 +4044,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4064,7 +4066,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4085,7 +4087,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAddressRequest() ); @@ -4118,7 +4120,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAddressRequest() ); @@ -4172,7 +4174,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAddressRequest() ); @@ -4206,7 +4208,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAddressRequest() ); @@ -4239,7 +4241,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4261,7 +4263,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4282,7 +4284,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAddressRequest() ); @@ -4316,7 +4318,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAddressRequest() ); @@ -4371,7 +4373,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAddressRequest() ); @@ -4406,7 +4408,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAddressRequest() ); @@ -4440,7 +4442,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4462,7 +4464,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4483,7 +4485,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAddressRequest() ); @@ -4516,7 +4518,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAddressRequest() ); @@ -4570,7 +4572,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAddressRequest() ); @@ -4604,7 +4606,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAddressRequest() ); @@ -4637,7 +4639,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4659,7 +4661,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4680,7 +4682,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateSubnetRequest() ); @@ -4713,7 +4715,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateSubnetRequest() ); @@ -4768,7 +4770,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateSubnetRequest() ); @@ -4800,7 +4802,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateSubnetRequest() ); @@ -4834,7 +4836,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4856,7 +4858,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4874,7 +4876,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest() ); @@ -4907,7 +4909,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest() ); @@ -4961,7 +4963,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest() ); @@ -4995,7 +4997,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest() ); @@ -5028,7 +5030,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5051,7 +5053,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5072,7 +5074,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest() ); @@ -5106,7 +5108,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest() ); @@ -5161,7 +5163,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest() ); @@ -5196,7 +5198,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest() ); @@ -5230,7 +5232,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5253,7 +5255,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5274,7 +5276,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest() ); @@ -5307,7 +5309,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest() ); @@ -5361,7 +5363,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest() ); @@ -5395,7 +5397,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest() ); @@ -5428,7 +5430,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5451,7 +5453,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5472,7 +5474,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateLoggingServerRequest() ); @@ -5505,7 +5507,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateLoggingServerRequest() ); @@ -5559,7 +5561,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateLoggingServerRequest() ); @@ -5590,7 +5592,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateLoggingServerRequest() ); @@ -5623,7 +5625,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5645,7 +5647,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5666,7 +5668,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateLoggingServerRequest() ); @@ -5700,7 +5702,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateLoggingServerRequest() ); @@ -5755,7 +5757,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateLoggingServerRequest() ); @@ -5787,7 +5789,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateLoggingServerRequest() ); @@ -5821,7 +5823,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5843,7 +5845,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5864,7 +5866,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteLoggingServerRequest() ); @@ -5897,7 +5899,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteLoggingServerRequest() ); @@ -5951,7 +5953,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteLoggingServerRequest() ); @@ -5982,7 +5984,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteLoggingServerRequest() ); @@ -6015,7 +6017,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6037,7 +6039,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6058,7 +6060,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest() ); @@ -6091,7 +6093,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest() ); @@ -6145,7 +6147,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest() ); @@ -6176,7 +6178,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest() ); @@ -6209,7 +6211,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6231,7 +6233,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6252,7 +6254,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest() ); @@ -6285,7 +6287,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest() ); @@ -6339,7 +6341,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest() ); @@ -6373,7 +6375,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest() ); @@ -6406,7 +6408,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6429,7 +6431,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6450,7 +6452,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest() ); @@ -6484,7 +6486,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest() ); @@ -6539,7 +6541,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest() ); @@ -6571,7 +6573,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest() ); @@ -6605,7 +6607,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6627,7 +6629,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6648,7 +6650,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest() ); @@ -6681,7 +6683,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest() ); @@ -6735,7 +6737,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest() ); @@ -6766,7 +6768,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest() ); @@ -6799,7 +6801,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6821,7 +6823,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6842,7 +6844,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest() ); @@ -6875,7 +6877,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest() ); @@ -6929,7 +6931,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest() ); @@ -6960,7 +6962,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest() ); @@ -6993,7 +6995,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7015,7 +7017,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7036,7 +7038,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest() ); @@ -7070,7 +7072,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest() ); @@ -7125,7 +7127,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest() ); @@ -7157,7 +7159,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest() ); @@ -7191,7 +7193,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7213,7 +7215,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7234,7 +7236,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest() ); @@ -7267,7 +7269,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest() ); @@ -7321,7 +7323,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest() ); @@ -7355,7 +7357,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest() ); @@ -7388,7 +7390,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7410,7 +7412,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7431,7 +7433,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest() ); @@ -7464,7 +7466,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest() ); @@ -7518,7 +7520,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest() ); @@ -7549,7 +7551,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest() ); @@ -7582,7 +7584,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7604,7 +7606,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7625,7 +7627,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest() ); @@ -7659,7 +7661,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest() ); @@ -7714,7 +7716,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest() ); @@ -7746,7 +7748,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest() ); @@ -7780,7 +7782,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7802,7 +7804,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -7823,7 +7825,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest() ); @@ -7856,7 +7858,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest() ); @@ -7910,7 +7912,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest() ); @@ -7941,7 +7943,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest() ); @@ -7974,7 +7976,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -7996,7 +7998,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8017,7 +8019,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest() ); @@ -8050,7 +8052,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest() ); @@ -8104,7 +8106,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest() ); @@ -8138,7 +8140,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest() ); @@ -8171,7 +8173,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8194,7 +8196,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8215,7 +8217,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest() ); @@ -8249,7 +8251,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest() ); @@ -8304,7 +8306,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest() ); @@ -8339,7 +8341,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest() ); @@ -8373,7 +8375,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8396,7 +8398,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8417,7 +8419,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest() ); @@ -8450,7 +8452,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest() ); @@ -8504,7 +8506,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest() ); @@ -8538,7 +8540,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest() ); @@ -8571,7 +8573,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8594,7 +8596,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8615,7 +8617,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest() ); @@ -8648,7 +8650,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest() ); @@ -8702,7 +8704,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest() ); @@ -8736,7 +8738,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest() ); @@ -8769,7 +8771,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8792,7 +8794,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -8813,7 +8815,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest() ); @@ -8846,7 +8848,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest() ); @@ -8900,7 +8902,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest() ); @@ -8934,7 +8936,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest() ); @@ -8967,7 +8969,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -8990,7 +8992,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9011,7 +9013,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest() ); @@ -9045,7 +9047,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest() ); @@ -9100,7 +9102,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest() ); @@ -9135,7 +9137,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest() ); @@ -9169,7 +9171,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9192,7 +9194,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9213,7 +9215,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest() ); @@ -9246,7 +9248,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest() ); @@ -9300,7 +9302,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest() ); @@ -9334,7 +9336,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest() ); @@ -9367,7 +9369,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9390,7 +9392,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9411,7 +9413,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest() ); @@ -9444,7 +9446,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest() ); @@ -9498,7 +9500,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest() ); @@ -9532,7 +9534,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest() ); @@ -9565,7 +9567,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9588,7 +9590,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9609,7 +9611,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest() ); @@ -9643,7 +9645,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest() ); @@ -9698,7 +9700,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest() ); @@ -9733,7 +9735,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest() ); @@ -9767,7 +9769,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9790,7 +9792,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -9811,7 +9813,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest() ); @@ -9844,7 +9846,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest() ); @@ -9898,7 +9900,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest() ); @@ -9932,7 +9934,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest() ); @@ -9965,7 +9967,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -9988,7 +9990,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -10009,7 +10011,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest() ); @@ -10042,7 +10044,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest() ); @@ -10096,7 +10098,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest() ); @@ -10130,7 +10132,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest() ); @@ -10163,7 +10165,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -10185,7 +10187,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -10206,7 +10208,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest() ); @@ -10239,7 +10241,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest() ); @@ -10293,7 +10295,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest() ); @@ -10327,7 +10329,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest() ); @@ -10360,7 +10362,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -10383,7 +10385,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -10404,7 +10406,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateCloudsRequest() ); @@ -10443,7 +10445,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateCloudsRequest() ); @@ -10498,7 +10500,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateCloudsRequest() ); @@ -10529,7 +10531,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateCloudsRequest() ); @@ -10590,7 +10592,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateCloudsRequest() ); @@ -10640,7 +10642,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateCloudsRequest() ); @@ -10689,7 +10691,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateCloudsRequest() ); @@ -10732,7 +10734,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListClustersRequest() ); @@ -10771,7 +10773,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListClustersRequest() ); @@ -10826,7 +10828,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListClustersRequest() ); @@ -10857,7 +10859,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListClustersRequest() ); @@ -10917,7 +10919,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListClustersRequest() ); @@ -10968,7 +10970,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListClustersRequest() ); @@ -11017,7 +11019,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListClustersRequest() ); @@ -11059,7 +11061,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodesRequest() ); @@ -11092,7 +11094,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodesRequest() ); @@ -11141,7 +11143,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodesRequest() ); @@ -11169,7 +11171,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodesRequest() ); @@ -11223,7 +11225,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodesRequest() ); @@ -11274,7 +11276,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodesRequest() ); @@ -11316,7 +11318,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodesRequest() ); @@ -11359,7 +11361,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAddressesRequest() ); @@ -11399,7 +11401,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAddressesRequest() ); @@ -11456,7 +11458,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAddressesRequest() ); @@ -11490,7 +11492,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAddressesRequest() ); @@ -11557,7 +11559,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAddressesRequest() ); @@ -11613,7 +11615,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAddressesRequest() ); @@ -11667,7 +11669,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAddressesRequest() ); @@ -11714,7 +11716,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest() ); @@ -11755,7 +11757,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest() ); @@ -11812,7 +11814,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest() ); @@ -11846,7 +11848,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest() ); @@ -11916,7 +11918,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest() ); @@ -11975,7 +11977,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest() ); @@ -12029,7 +12031,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest() ); @@ -12076,7 +12078,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListSubnetsRequest() ); @@ -12109,7 +12111,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListSubnetsRequest() ); @@ -12158,7 +12160,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListSubnetsRequest() ); @@ -12189,7 +12191,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListSubnetsRequest() ); @@ -12243,7 +12245,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListSubnetsRequest() ); @@ -12294,7 +12296,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListSubnetsRequest() ); @@ -12337,7 +12339,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListSubnetsRequest() ); @@ -12381,7 +12383,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest() ); @@ -12421,7 +12423,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest() ); @@ -12478,7 +12480,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest() ); @@ -12512,7 +12514,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest() ); @@ -12581,7 +12583,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest() ); @@ -12639,7 +12641,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest() ); @@ -12693,7 +12695,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest() ); @@ -12740,7 +12742,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListLoggingServersRequest() ); @@ -12780,7 +12782,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListLoggingServersRequest() ); @@ -12835,7 +12837,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListLoggingServersRequest() ); @@ -12866,7 +12868,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListLoggingServersRequest() ); @@ -12927,7 +12929,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListLoggingServersRequest() ); @@ -12977,7 +12979,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListLoggingServersRequest() ); @@ -13027,7 +13029,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListLoggingServersRequest() ); @@ -13070,7 +13072,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodeTypesRequest() ); @@ -13109,7 +13111,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodeTypesRequest() ); @@ -13164,7 +13166,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodeTypesRequest() ); @@ -13195,7 +13197,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodeTypesRequest() ); @@ -13255,7 +13257,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodeTypesRequest() ); @@ -13304,7 +13306,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodeTypesRequest() ); @@ -13353,7 +13355,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNodeTypesRequest() ); @@ -13395,7 +13397,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest() ); @@ -13435,7 +13437,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest() ); @@ -13492,7 +13494,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest() ); @@ -13523,7 +13525,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest() ); @@ -13584,7 +13586,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest() ); @@ -13634,7 +13636,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest() ); @@ -13684,7 +13686,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest() ); @@ -13727,7 +13729,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPeeringRoutesRequest() ); @@ -13766,7 +13768,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPeeringRoutesRequest() ); @@ -13821,7 +13823,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPeeringRoutesRequest() ); @@ -13852,7 +13854,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPeeringRoutesRequest() ); @@ -13913,7 +13915,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPeeringRoutesRequest() ); @@ -13963,7 +13965,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPeeringRoutesRequest() ); @@ -14012,7 +14014,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPeeringRoutesRequest() ); @@ -14055,7 +14057,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest() ); @@ -14095,7 +14097,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest() ); @@ -14152,7 +14154,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest() ); @@ -14186,7 +14188,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest() ); @@ -14253,7 +14255,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest() ); @@ -14309,7 +14311,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest() ); @@ -14363,7 +14365,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest() ); @@ -14410,7 +14412,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest() ); @@ -14450,7 +14452,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest() ); @@ -14505,7 +14507,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest() ); @@ -14536,7 +14538,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest() ); @@ -14597,7 +14599,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest() ); @@ -14647,7 +14649,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest() ); @@ -14697,7 +14699,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest() ); @@ -14740,7 +14742,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest() ); @@ -14780,7 +14782,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest() ); @@ -14837,7 +14839,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest() ); @@ -14871,7 +14873,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest() ); @@ -14943,7 +14945,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest() ); @@ -15004,7 +15006,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest() ); @@ -15058,7 +15060,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest() ); @@ -15105,7 +15107,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest() ); @@ -15145,7 +15147,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest() ); @@ -15202,7 +15204,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest() ); @@ -15236,7 +15238,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest() ); @@ -15305,7 +15307,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest() ); @@ -15363,7 +15365,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest() ); @@ -15417,7 +15419,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest() ); @@ -15464,7 +15466,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest() ); @@ -15504,7 +15506,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest() ); @@ -15561,7 +15563,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest() ); @@ -15595,7 +15597,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest() ); @@ -15662,7 +15664,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest() ); @@ -15718,7 +15720,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest() ); @@ -15772,7 +15774,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest() ); @@ -15819,7 +15821,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest() ); @@ -15860,7 +15862,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest() ); @@ -15915,7 +15917,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest() ); @@ -15949,7 +15951,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest() ); @@ -16019,7 +16021,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest() ); @@ -16078,7 +16080,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest() ); @@ -16131,7 +16133,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest() ); @@ -16177,7 +16179,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -16207,7 +16209,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -16251,7 +16253,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -16283,7 +16285,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -16313,7 +16315,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -16357,7 +16359,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -16389,7 +16391,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -16422,7 +16424,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -16466,7 +16468,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -16501,7 +16503,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -16531,7 +16533,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -16575,7 +16577,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -16610,7 +16612,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -16658,7 +16660,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -16699,7 +16701,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -16778,7 +16780,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -16858,7 +16860,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -16954,8 +16956,7 @@ describe('v1.VmwareEngineClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -16974,7 +16975,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -16983,8 +16984,7 @@ describe('v1.VmwareEngineClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -17000,7 +17000,7 @@ describe('v1.VmwareEngineClient', () => { }); describe('Path templates', () => { - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -17012,7 +17012,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17076,7 +17076,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('dnsBindPermission', () => { + describe('dnsBindPermission', async () => { const fakePath = '/rendered/path/dnsBindPermission'; const expectedParameters = { project: 'projectValue', @@ -17086,7 +17086,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dnsBindPermissionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17137,7 +17137,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('dnsForwarding', () => { + describe('dnsForwarding', async () => { const fakePath = '/rendered/path/dnsForwarding'; const expectedParameters = { project: 'projectValue', @@ -17148,7 +17148,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dnsForwardingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17201,7 +17201,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('externalAccessRule', () => { + describe('externalAccessRule', async () => { const fakePath = '/rendered/path/externalAccessRule'; const expectedParameters = { project: 'projectValue', @@ -17213,7 +17213,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.externalAccessRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -17294,7 +17294,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('externalAddress', () => { + describe('externalAddress', async () => { const fakePath = '/rendered/path/externalAddress'; const expectedParameters = { project: 'projectValue', @@ -17306,7 +17306,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.externalAddressPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17372,7 +17372,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('hcxActivationKey', () => { + describe('hcxActivationKey', async () => { const fakePath = '/rendered/path/hcxActivationKey'; const expectedParameters = { project: 'projectValue', @@ -17384,7 +17384,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hcxActivationKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17453,7 +17453,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -17463,7 +17463,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17502,7 +17502,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('loggingServer', () => { + describe('loggingServer', async () => { const fakePath = '/rendered/path/loggingServer'; const expectedParameters = { project: 'projectValue', @@ -17514,7 +17514,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.loggingServerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17578,7 +17578,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('managementDnsZoneBinding', () => { + describe('managementDnsZoneBinding', async () => { const fakePath = '/rendered/path/managementDnsZoneBinding'; const expectedParameters = { project: 'projectValue', @@ -17590,7 +17590,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.managementDnsZoneBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17675,7 +17675,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('networkPeering', () => { + describe('networkPeering', async () => { const fakePath = '/rendered/path/networkPeering'; const expectedParameters = { project: 'projectValue', @@ -17686,7 +17686,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPeeringPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17740,7 +17740,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('networkPolicy', () => { + describe('networkPolicy', async () => { const fakePath = '/rendered/path/networkPolicy'; const expectedParameters = { project: 'projectValue', @@ -17751,7 +17751,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -17804,7 +17804,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('node', () => { + describe('node', async () => { const fakePath = '/rendered/path/node'; const expectedParameters = { project: 'projectValue', @@ -17817,7 +17817,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodePathTemplate.render = sinon .stub() .returns(fakePath); @@ -17892,7 +17892,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('nodeType', () => { + describe('nodeType', async () => { const fakePath = '/rendered/path/nodeType'; const expectedParameters = { project: 'projectValue', @@ -17903,7 +17903,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodeTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -17956,7 +17956,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('privateCloud', () => { + describe('privateCloud', async () => { const fakePath = '/rendered/path/privateCloud'; const expectedParameters = { project: 'projectValue', @@ -17967,7 +17967,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.privateCloudPathTemplate.render = sinon .stub() .returns(fakePath); @@ -18020,7 +18020,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('privateConnection', () => { + describe('privateConnection', async () => { const fakePath = '/rendered/path/privateConnection'; const expectedParameters = { project: 'projectValue', @@ -18031,7 +18031,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.privateConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -18097,7 +18097,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -18106,7 +18106,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -18135,7 +18135,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('subnet', () => { + describe('subnet', async () => { const fakePath = '/rendered/path/subnet'; const expectedParameters = { project: 'projectValue', @@ -18147,7 +18147,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.subnetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -18211,7 +18211,7 @@ describe('v1.VmwareEngineClient', () => { }); }); - describe('vmwareEngineNetwork', () => { + describe('vmwareEngineNetwork', async () => { const fakePath = '/rendered/path/vmwareEngineNetwork'; const expectedParameters = { project: 'projectValue', @@ -18222,7 +18222,7 @@ describe('v1.VmwareEngineClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vmwareEngineNetworkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-vpcaccess/package.json b/packages/google-cloud-vpcaccess/package.json index 8ee6abfb423..b9564420f67 100644 --- a/packages/google-cloud-vpcaccess/package.json +++ b/packages/google-cloud-vpcaccess/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json index 4af911da73f..2201ef5b478 100644 --- a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json +++ b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vpcaccess", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json index 4af911da73f..2201ef5b478 100644 --- a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json +++ b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vpcaccess", - "version": "3.3.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vpcaccess/src/v1/vpc_access_service_client.ts b/packages/google-cloud-vpcaccess/src/v1/vpc_access_service_client.ts index 269dd496a7e..48b72092234 100644 --- a/packages/google-cloud-vpcaccess/src/v1/vpc_access_service_client.ts +++ b/packages/google-cloud-vpcaccess/src/v1/vpc_access_service_client.ts @@ -540,7 +540,9 @@ export class VpcAccessServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnector request %j', request); const wrappedCallback: | Callback< @@ -674,7 +676,9 @@ export class VpcAccessServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -842,7 +846,9 @@ export class VpcAccessServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1004,7 +1010,9 @@ export class VpcAccessServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.vpcaccess.v1.IListConnectorsRequest, @@ -1069,7 +1077,9 @@ export class VpcAccessServiceClient { }); const defaultCallSettings = this._defaults['listConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectors stream %j', request); return this.descriptors.page.listConnectors.createStream( this.innerApiCalls.listConnectors as GaxCall, @@ -1116,7 +1126,9 @@ export class VpcAccessServiceClient { }); const defaultCallSettings = this._defaults['listConnectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectors iterate %j', request); return this.descriptors.page.listConnectors.asyncIterate( this.innerApiCalls['listConnectors'] as GaxCall, @@ -1296,7 +1308,7 @@ export class VpcAccessServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-vpcaccess/test/gapic_vpc_access_service_v1.ts b/packages/google-cloud-vpcaccess/test/gapic_vpc_access_service_v1.ts index 0807e35e135..63ba5427e93 100644 --- a/packages/google-cloud-vpcaccess/test/gapic_vpc_access_service_v1.ts +++ b/packages/google-cloud-vpcaccess/test/gapic_vpc_access_service_v1.ts @@ -289,7 +289,9 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.vpcAccessServiceStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.GetConnectorRequest() ); @@ -379,7 +381,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.GetConnectorRequest() ); @@ -426,7 +428,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.GetConnectorRequest() ); @@ -457,7 +459,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.GetConnectorRequest() ); @@ -478,7 +480,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.CreateConnectorRequest() ); @@ -511,7 +513,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.CreateConnectorRequest() ); @@ -565,7 +567,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.CreateConnectorRequest() ); @@ -596,7 +598,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.CreateConnectorRequest() ); @@ -629,7 +631,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -651,7 +653,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -672,7 +674,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.DeleteConnectorRequest() ); @@ -705,7 +707,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.DeleteConnectorRequest() ); @@ -759,7 +761,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.DeleteConnectorRequest() ); @@ -790,7 +792,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.DeleteConnectorRequest() ); @@ -823,7 +825,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -845,7 +847,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -866,7 +868,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.ListConnectorsRequest() ); @@ -899,7 +901,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.ListConnectorsRequest() ); @@ -948,7 +950,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.ListConnectorsRequest() ); @@ -979,7 +981,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.ListConnectorsRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.ListConnectorsRequest() ); @@ -1082,7 +1084,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.ListConnectorsRequest() ); @@ -1125,7 +1127,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.vpcaccess.v1.ListConnectorsRequest() ); @@ -1166,7 +1168,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1196,7 +1198,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1240,7 +1242,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1323,7 +1325,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1364,7 +1366,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1443,7 +1445,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1523,7 +1525,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1619,8 +1621,7 @@ describe('v1.VpcAccessServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1639,7 +1640,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1648,8 +1649,7 @@ describe('v1.VpcAccessServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1665,7 +1665,7 @@ describe('v1.VpcAccessServiceClient', () => { }); describe('Path templates', () => { - describe('connector', () => { + describe('connector', async () => { const fakePath = '/rendered/path/connector'; const expectedParameters = { project: 'projectValue', @@ -1676,7 +1676,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1729,7 +1729,7 @@ describe('v1.VpcAccessServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1739,7 +1739,7 @@ describe('v1.VpcAccessServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-webrisk/package.json b/packages/google-cloud-webrisk/package.json index 900d50b16d9..52c1faf38ce 100644 --- a/packages/google-cloud-webrisk/package.json +++ b/packages/google-cloud-webrisk/package.json @@ -28,7 +28,7 @@ "Web Risk API" ], "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/chai": "^4.2.7", diff --git a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json index 4398a178f78..fe52800cd2f 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json index 4398a178f78..fe52800cd2f 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json index 198b6d9f273..699e4226c3e 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json index 198b6d9f273..699e4226c3e 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts b/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts index 9ea1b79289b..ea4b5832aff 100644 --- a/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts +++ b/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts @@ -524,7 +524,9 @@ export class WebRiskServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeThreatListDiff request %j', request); const wrappedCallback: | Callback< @@ -638,7 +640,9 @@ export class WebRiskServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchUris request %j', request); const wrappedCallback: | Callback< @@ -752,7 +756,9 @@ export class WebRiskServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchHashes request %j', request); const wrappedCallback: | Callback< @@ -877,7 +883,9 @@ export class WebRiskServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSubmission request %j', request); const wrappedCallback: | Callback< @@ -1022,7 +1030,9 @@ export class WebRiskServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1184,7 +1194,7 @@ export class WebRiskServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-webrisk/src/v1beta1/web_risk_service_v1_beta1_client.ts b/packages/google-cloud-webrisk/src/v1beta1/web_risk_service_v1_beta1_client.ts index 2062b7c797c..c6b9f680fa8 100644 --- a/packages/google-cloud-webrisk/src/v1beta1/web_risk_service_v1_beta1_client.ts +++ b/packages/google-cloud-webrisk/src/v1beta1/web_risk_service_v1_beta1_client.ts @@ -459,7 +459,9 @@ export class WebRiskServiceV1Beta1Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeThreatListDiff request %j', request); const wrappedCallback: | Callback< @@ -570,7 +572,9 @@ export class WebRiskServiceV1Beta1Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchUris request %j', request); const wrappedCallback: | Callback< @@ -689,7 +693,9 @@ export class WebRiskServiceV1Beta1Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchHashes request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts b/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts index 0e509b4f5bb..81923d45ffd 100644 --- a/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts +++ b/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts @@ -244,7 +244,9 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.webRiskServiceStub); client.close().then(() => { done(); @@ -303,7 +305,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.ComputeThreatListDiffRequest() ); @@ -321,7 +323,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.ComputeThreatListDiffRequest() ); @@ -354,7 +356,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.ComputeThreatListDiffRequest() ); @@ -374,7 +376,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.ComputeThreatListDiffRequest() ); @@ -393,7 +395,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchUrisRequest() ); @@ -410,7 +412,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchUrisRequest() ); @@ -443,7 +445,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchUrisRequest() ); @@ -460,7 +462,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchUrisRequest() ); @@ -476,7 +478,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchHashesRequest() ); @@ -493,7 +495,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchHashesRequest() ); @@ -526,7 +528,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchHashesRequest() ); @@ -543,7 +545,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SearchHashesRequest() ); @@ -559,7 +561,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.CreateSubmissionRequest() ); @@ -590,7 +592,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.CreateSubmissionRequest() ); @@ -637,7 +639,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.CreateSubmissionRequest() ); @@ -668,7 +670,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.CreateSubmissionRequest() ); @@ -689,7 +691,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SubmitUriRequest() ); @@ -721,7 +723,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SubmitUriRequest() ); @@ -775,7 +777,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SubmitUriRequest() ); @@ -806,7 +808,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1.SubmitUriRequest() ); @@ -839,7 +841,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -861,7 +863,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -878,7 +880,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -957,7 +959,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1037,7 +1039,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1133,8 +1135,7 @@ describe('v1.WebRiskServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1153,7 +1154,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1162,8 +1163,7 @@ describe('v1.WebRiskServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1179,7 +1179,7 @@ describe('v1.WebRiskServiceClient', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1188,7 +1188,7 @@ describe('v1.WebRiskServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1_beta1_v1beta1.ts b/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1_beta1_v1beta1.ts index 639ded5593d..91b803fa621 100644 --- a/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1_beta1_v1beta1.ts +++ b/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1_beta1_v1beta1.ts @@ -202,7 +202,9 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.webRiskServiceV1Beta1Stub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest() ); @@ -284,7 +286,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest() ); @@ -318,7 +320,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest() ); @@ -339,7 +341,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest() ); @@ -359,7 +361,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchUrisRequest() ); @@ -377,7 +379,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchUrisRequest() ); @@ -411,7 +413,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchUrisRequest() ); @@ -429,7 +431,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchUrisRequest() ); @@ -446,7 +448,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchHashesRequest() ); @@ -464,7 +466,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchHashesRequest() ); @@ -498,7 +500,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchHashesRequest() ); @@ -516,7 +518,7 @@ describe('v1beta1.WebRiskServiceV1Beta1Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.webrisk.v1beta1.SearchHashesRequest() ); diff --git a/packages/google-cloud-websecurityscanner/package.json b/packages/google-cloud-websecurityscanner/package.json index 42b9164bd52..930d4cd88ce 100644 --- a/packages/google-cloud-websecurityscanner/package.json +++ b/packages/google-cloud-websecurityscanner/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json index f92946ca250..a62dfde3808 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json index f92946ca250..a62dfde3808 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json index a331d4c496c..ae05cd17684 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json index a331d4c496c..ae05cd17684 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json index 0bbe572bb60..de6839aea9d 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json index 0bbe572bb60..de6839aea9d 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/src/v1/web_security_scanner_client.ts b/packages/google-cloud-websecurityscanner/src/v1/web_security_scanner_client.ts index 711947ca651..ceba3f44b0c 100644 --- a/packages/google-cloud-websecurityscanner/src/v1/web_security_scanner_client.ts +++ b/packages/google-cloud-websecurityscanner/src/v1/web_security_scanner_client.ts @@ -509,7 +509,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createScanConfig request %j', request); const wrappedCallback: | Callback< @@ -635,7 +637,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteScanConfig request %j', request); const wrappedCallback: | Callback< @@ -761,7 +765,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getScanConfig request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ 'scan_config.name': request.scanConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateScanConfig request %j', request); const wrappedCallback: | Callback< @@ -1018,7 +1026,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startScanRun request %j', request); const wrappedCallback: | Callback< @@ -1139,7 +1149,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getScanRun request %j', request); const wrappedCallback: | Callback< @@ -1260,7 +1272,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopScanRun request %j', request); const wrappedCallback: | Callback< @@ -1381,7 +1395,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFinding request %j', request); const wrappedCallback: | Callback< @@ -1508,7 +1524,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindingTypeStats request %j', request); const wrappedCallback: | Callback< @@ -1640,7 +1658,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1.IListScanConfigsRequest, @@ -1710,7 +1730,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanConfigs stream %j', request); return this.descriptors.page.listScanConfigs.createStream( this.innerApiCalls.listScanConfigs as GaxCall, @@ -1762,7 +1784,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanConfigs iterate %j', request); return this.descriptors.page.listScanConfigs.asyncIterate( this.innerApiCalls['listScanConfigs'] as GaxCall, @@ -1870,7 +1894,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1.IListScanRunsRequest, @@ -1940,7 +1966,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanRuns stream %j', request); return this.descriptors.page.listScanRuns.createStream( this.innerApiCalls.listScanRuns as GaxCall, @@ -1992,7 +2020,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanRuns iterate %j', request); return this.descriptors.page.listScanRuns.asyncIterate( this.innerApiCalls['listScanRuns'] as GaxCall, @@ -2100,7 +2130,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1.IListCrawledUrlsRequest, @@ -2171,7 +2203,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listCrawledUrls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCrawledUrls stream %j', request); return this.descriptors.page.listCrawledUrls.createStream( this.innerApiCalls.listCrawledUrls as GaxCall, @@ -2224,7 +2258,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listCrawledUrls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCrawledUrls iterate %j', request); return this.descriptors.page.listCrawledUrls.asyncIterate( this.innerApiCalls['listCrawledUrls'] as GaxCall, @@ -2337,7 +2373,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1.IListFindingsRequest, @@ -2413,7 +2451,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings stream %j', request); return this.descriptors.page.listFindings.createStream( this.innerApiCalls.listFindings as GaxCall, @@ -2471,7 +2511,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings iterate %j', request); return this.descriptors.page.listFindings.asyncIterate( this.innerApiCalls['listFindings'] as GaxCall, diff --git a/packages/google-cloud-websecurityscanner/src/v1alpha/web_security_scanner_client.ts b/packages/google-cloud-websecurityscanner/src/v1alpha/web_security_scanner_client.ts index bc05e16871f..0b279718225 100644 --- a/packages/google-cloud-websecurityscanner/src/v1alpha/web_security_scanner_client.ts +++ b/packages/google-cloud-websecurityscanner/src/v1alpha/web_security_scanner_client.ts @@ -518,7 +518,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createScanConfig request %j', request); const wrappedCallback: | Callback< @@ -644,7 +646,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteScanConfig request %j', request); const wrappedCallback: | Callback< @@ -770,7 +774,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getScanConfig request %j', request); const wrappedCallback: | Callback< @@ -901,7 +907,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ 'scan_config.name': request.scanConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateScanConfig request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1035,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startScanRun request %j', request); const wrappedCallback: | Callback< @@ -1154,7 +1164,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getScanRun request %j', request); const wrappedCallback: | Callback< @@ -1281,7 +1293,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopScanRun request %j', request); const wrappedCallback: | Callback< @@ -1408,7 +1422,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFinding request %j', request); const wrappedCallback: | Callback< @@ -1535,7 +1551,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindingTypeStats request %j', request); const wrappedCallback: | Callback< @@ -1667,7 +1685,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1alpha.IListScanConfigsRequest, @@ -1737,7 +1757,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanConfigs stream %j', request); return this.descriptors.page.listScanConfigs.createStream( this.innerApiCalls.listScanConfigs as GaxCall, @@ -1789,7 +1811,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanConfigs iterate %j', request); return this.descriptors.page.listScanConfigs.asyncIterate( this.innerApiCalls['listScanConfigs'] as GaxCall, @@ -1897,7 +1921,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1alpha.IListScanRunsRequest, @@ -1967,7 +1993,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanRuns stream %j', request); return this.descriptors.page.listScanRuns.createStream( this.innerApiCalls.listScanRuns as GaxCall, @@ -2019,7 +2047,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanRuns iterate %j', request); return this.descriptors.page.listScanRuns.asyncIterate( this.innerApiCalls['listScanRuns'] as GaxCall, @@ -2127,7 +2157,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1alpha.IListCrawledUrlsRequest, @@ -2198,7 +2230,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listCrawledUrls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCrawledUrls stream %j', request); return this.descriptors.page.listCrawledUrls.createStream( this.innerApiCalls.listCrawledUrls as GaxCall, @@ -2251,7 +2285,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listCrawledUrls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCrawledUrls iterate %j', request); return this.descriptors.page.listCrawledUrls.asyncIterate( this.innerApiCalls['listCrawledUrls'] as GaxCall, @@ -2364,7 +2400,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1alpha.IListFindingsRequest, @@ -2440,7 +2478,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings stream %j', request); return this.descriptors.page.listFindings.createStream( this.innerApiCalls.listFindings as GaxCall, @@ -2498,7 +2538,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings iterate %j', request); return this.descriptors.page.listFindings.asyncIterate( this.innerApiCalls['listFindings'] as GaxCall, diff --git a/packages/google-cloud-websecurityscanner/src/v1beta/web_security_scanner_client.ts b/packages/google-cloud-websecurityscanner/src/v1beta/web_security_scanner_client.ts index 5f7b3bf4247..577d0831b95 100644 --- a/packages/google-cloud-websecurityscanner/src/v1beta/web_security_scanner_client.ts +++ b/packages/google-cloud-websecurityscanner/src/v1beta/web_security_scanner_client.ts @@ -518,7 +518,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createScanConfig request %j', request); const wrappedCallback: | Callback< @@ -644,7 +646,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteScanConfig request %j', request); const wrappedCallback: | Callback< @@ -770,7 +774,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getScanConfig request %j', request); const wrappedCallback: | Callback< @@ -901,7 +907,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ 'scan_config.name': request.scanConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateScanConfig request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1035,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startScanRun request %j', request); const wrappedCallback: | Callback< @@ -1154,7 +1164,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getScanRun request %j', request); const wrappedCallback: | Callback< @@ -1281,7 +1293,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopScanRun request %j', request); const wrappedCallback: | Callback< @@ -1408,7 +1422,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFinding request %j', request); const wrappedCallback: | Callback< @@ -1535,7 +1551,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindingTypeStats request %j', request); const wrappedCallback: | Callback< @@ -1667,7 +1685,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1beta.IListScanConfigsRequest, @@ -1737,7 +1757,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanConfigs stream %j', request); return this.descriptors.page.listScanConfigs.createStream( this.innerApiCalls.listScanConfigs as GaxCall, @@ -1789,7 +1811,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanConfigs iterate %j', request); return this.descriptors.page.listScanConfigs.asyncIterate( this.innerApiCalls['listScanConfigs'] as GaxCall, @@ -1897,7 +1921,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1beta.IListScanRunsRequest, @@ -1967,7 +1993,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanRuns stream %j', request); return this.descriptors.page.listScanRuns.createStream( this.innerApiCalls.listScanRuns as GaxCall, @@ -2019,7 +2047,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listScanRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listScanRuns iterate %j', request); return this.descriptors.page.listScanRuns.asyncIterate( this.innerApiCalls['listScanRuns'] as GaxCall, @@ -2127,7 +2157,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1beta.IListCrawledUrlsRequest, @@ -2198,7 +2230,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listCrawledUrls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCrawledUrls stream %j', request); return this.descriptors.page.listCrawledUrls.createStream( this.innerApiCalls.listCrawledUrls as GaxCall, @@ -2251,7 +2285,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listCrawledUrls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCrawledUrls iterate %j', request); return this.descriptors.page.listCrawledUrls.asyncIterate( this.innerApiCalls['listCrawledUrls'] as GaxCall, @@ -2364,7 +2400,9 @@ export class WebSecurityScannerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.websecurityscanner.v1beta.IListFindingsRequest, @@ -2440,7 +2478,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings stream %j', request); return this.descriptors.page.listFindings.createStream( this.innerApiCalls.listFindings as GaxCall, @@ -2498,7 +2538,9 @@ export class WebSecurityScannerClient { }); const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFindings iterate %j', request); return this.descriptors.page.listFindings.asyncIterate( this.innerApiCalls['listFindings'] as GaxCall, diff --git a/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1.ts b/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1.ts index f518f9b7c65..0345aa4c700 100644 --- a/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1.ts +++ b/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1.ts @@ -257,7 +257,9 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.webSecurityScannerStub); client.close().then(() => { done(); @@ -316,7 +318,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.CreateScanConfigRequest() ); @@ -347,7 +349,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.CreateScanConfigRequest() ); @@ -394,7 +396,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.CreateScanConfigRequest() ); @@ -425,7 +427,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.CreateScanConfigRequest() ); @@ -446,7 +448,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest() ); @@ -477,7 +479,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest() ); @@ -524,7 +526,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest() ); @@ -555,7 +557,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest() ); @@ -576,7 +578,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanConfigRequest() ); @@ -607,7 +609,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanConfigRequest() ); @@ -654,7 +656,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanConfigRequest() ); @@ -685,7 +687,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanConfigRequest() ); @@ -706,7 +708,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.UpdateScanConfigRequest() ); @@ -738,7 +740,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.UpdateScanConfigRequest() ); @@ -786,7 +788,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.UpdateScanConfigRequest() ); @@ -818,7 +820,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.UpdateScanConfigRequest() ); @@ -840,7 +842,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StartScanRunRequest() ); @@ -871,7 +873,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StartScanRunRequest() ); @@ -918,7 +920,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StartScanRunRequest() ); @@ -949,7 +951,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StartScanRunRequest() ); @@ -970,7 +972,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanRunRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanRunRequest() ); @@ -1048,7 +1050,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanRunRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetScanRunRequest() ); @@ -1100,7 +1102,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StopScanRunRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StopScanRunRequest() ); @@ -1178,7 +1180,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StopScanRunRequest() ); @@ -1209,7 +1211,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.StopScanRunRequest() ); @@ -1230,7 +1232,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetFindingRequest() ); @@ -1261,7 +1263,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetFindingRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetFindingRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.GetFindingRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingTypeStatsRequest() ); @@ -1392,7 +1394,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingTypeStatsRequest() ); @@ -1439,7 +1441,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingTypeStatsRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingTypeStatsRequest() ); @@ -1491,7 +1493,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanConfigsRequest() ); @@ -1530,7 +1532,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanConfigsRequest() ); @@ -1587,7 +1589,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanConfigsRequest() ); @@ -1618,7 +1620,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanConfigsRequest() ); @@ -1679,7 +1681,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanConfigsRequest() ); @@ -1729,7 +1731,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanConfigsRequest() ); @@ -1779,7 +1781,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanConfigsRequest() ); @@ -1822,7 +1824,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanRunsRequest() ); @@ -1861,7 +1863,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanRunsRequest() ); @@ -1916,7 +1918,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanRunsRequest() ); @@ -1947,7 +1949,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanRunsRequest() ); @@ -2008,7 +2010,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanRunsRequest() ); @@ -2060,7 +2062,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanRunsRequest() ); @@ -2110,7 +2112,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListScanRunsRequest() ); @@ -2153,7 +2155,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest() ); @@ -2192,7 +2194,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest() ); @@ -2249,7 +2251,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest() ); @@ -2280,7 +2282,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest() ); @@ -2341,7 +2343,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest() ); @@ -2391,7 +2393,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest() ); @@ -2441,7 +2443,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest() ); @@ -2484,7 +2486,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingsRequest() ); @@ -2523,7 +2525,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingsRequest() ); @@ -2578,7 +2580,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingsRequest() ); @@ -2609,7 +2611,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingsRequest() ); @@ -2670,7 +2672,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingsRequest() ); @@ -2722,7 +2724,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingsRequest() ); @@ -2772,7 +2774,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1.ListFindingsRequest() ); @@ -2810,7 +2812,7 @@ describe('v1.WebSecurityScannerClient', () => { }); describe('Path templates', () => { - describe('finding', () => { + describe('finding', async () => { const fakePath = '/rendered/path/finding'; const expectedParameters = { project: 'projectValue', @@ -2822,7 +2824,7 @@ describe('v1.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.findingPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1alpha.ts b/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1alpha.ts index 385a6bd99e5..28c8c3dadfe 100644 --- a/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1alpha.ts +++ b/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1alpha.ts @@ -266,7 +266,9 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.webSecurityScannerStub); client.close().then(() => { done(); @@ -329,7 +331,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest() ); @@ -361,7 +363,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest() ); @@ -409,7 +411,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest() ); @@ -441,7 +443,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest() ); @@ -463,7 +465,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.DeleteScanConfigRequest() ); @@ -495,7 +497,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.DeleteScanConfigRequest() ); @@ -543,7 +545,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.DeleteScanConfigRequest() ); @@ -575,7 +577,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.DeleteScanConfigRequest() ); @@ -597,7 +599,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest() ); @@ -629,7 +631,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest() ); @@ -677,7 +679,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest() ); @@ -709,7 +711,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest() ); @@ -731,7 +733,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest() ); @@ -764,7 +766,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest() ); @@ -813,7 +815,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest() ); @@ -846,7 +848,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest() ); @@ -869,7 +871,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StartScanRunRequest() ); @@ -901,7 +903,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StartScanRunRequest() ); @@ -949,7 +951,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StartScanRunRequest() ); @@ -981,7 +983,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StartScanRunRequest() ); @@ -1003,7 +1005,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanRunRequest() ); @@ -1035,7 +1037,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanRunRequest() ); @@ -1083,7 +1085,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanRunRequest() ); @@ -1115,7 +1117,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetScanRunRequest() ); @@ -1137,7 +1139,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StopScanRunRequest() ); @@ -1169,7 +1171,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StopScanRunRequest() ); @@ -1217,7 +1219,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StopScanRunRequest() ); @@ -1249,7 +1251,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.StopScanRunRequest() ); @@ -1271,7 +1273,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetFindingRequest() ); @@ -1303,7 +1305,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetFindingRequest() ); @@ -1351,7 +1353,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetFindingRequest() ); @@ -1383,7 +1385,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.GetFindingRequest() ); @@ -1405,7 +1407,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsRequest() ); @@ -1438,7 +1440,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsRequest() ); @@ -1486,7 +1488,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsRequest() ); @@ -1518,7 +1520,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsRequest() ); @@ -1540,7 +1542,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest() ); @@ -1580,7 +1582,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest() ); @@ -1638,7 +1640,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest() ); @@ -1670,7 +1672,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest() ); @@ -1734,7 +1736,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest() ); @@ -1787,7 +1789,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest() ); @@ -1838,7 +1840,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest() ); @@ -1882,7 +1884,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest() ); @@ -1922,7 +1924,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest() ); @@ -1980,7 +1982,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest() ); @@ -2012,7 +2014,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest() ); @@ -2076,7 +2078,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest() ); @@ -2131,7 +2133,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest() ); @@ -2182,7 +2184,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest() ); @@ -2226,7 +2228,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest() ); @@ -2266,7 +2268,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest() ); @@ -2324,7 +2326,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest() ); @@ -2356,7 +2358,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest() ); @@ -2420,7 +2422,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest() ); @@ -2473,7 +2475,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest() ); @@ -2524,7 +2526,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest() ); @@ -2568,7 +2570,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingsRequest() ); @@ -2608,7 +2610,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingsRequest() ); @@ -2666,7 +2668,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingsRequest() ); @@ -2698,7 +2700,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingsRequest() ); @@ -2762,7 +2764,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingsRequest() ); @@ -2817,7 +2819,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingsRequest() ); @@ -2868,7 +2870,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1alpha.ListFindingsRequest() ); @@ -2906,7 +2908,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { }); describe('Path templates', () => { - describe('finding', () => { + describe('finding', async () => { const fakePath = '/rendered/path/finding'; const expectedParameters = { project: 'projectValue', @@ -2919,7 +2921,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.findingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2983,7 +2985,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2993,7 +2995,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3022,7 +3024,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { }); }); - describe('scanConfig', () => { + describe('scanConfig', async () => { const fakePath = '/rendered/path/scanConfig'; const expectedParameters = { project: 'projectValue', @@ -3033,7 +3035,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.scanConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3072,7 +3074,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { }); }); - describe('scanRun', () => { + describe('scanRun', async () => { const fakePath = '/rendered/path/scanRun'; const expectedParameters = { project: 'projectValue', @@ -3084,7 +3086,7 @@ describe('v1alpha.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.scanRunPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1beta.ts b/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1beta.ts index b9eeb2a66c1..845d2a12687 100644 --- a/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1beta.ts +++ b/packages/google-cloud-websecurityscanner/test/gapic_web_security_scanner_v1beta.ts @@ -266,7 +266,9 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.webSecurityScannerStub); client.close().then(() => { done(); @@ -329,7 +331,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest() ); @@ -361,7 +363,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest() ); @@ -409,7 +411,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest() ); @@ -441,7 +443,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest() ); @@ -463,7 +465,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest() ); @@ -495,7 +497,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest() ); @@ -543,7 +545,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest() ); @@ -575,7 +577,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest() ); @@ -597,7 +599,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest() ); @@ -629,7 +631,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest() ); @@ -677,7 +679,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest() ); @@ -709,7 +711,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest() ); @@ -731,7 +733,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest() ); @@ -764,7 +766,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest() ); @@ -813,7 +815,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest() ); @@ -846,7 +848,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest() ); @@ -869,7 +871,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StartScanRunRequest() ); @@ -901,7 +903,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StartScanRunRequest() ); @@ -949,7 +951,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StartScanRunRequest() ); @@ -981,7 +983,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StartScanRunRequest() ); @@ -1003,7 +1005,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanRunRequest() ); @@ -1035,7 +1037,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanRunRequest() ); @@ -1083,7 +1085,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanRunRequest() ); @@ -1115,7 +1117,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetScanRunRequest() ); @@ -1137,7 +1139,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StopScanRunRequest() ); @@ -1169,7 +1171,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StopScanRunRequest() ); @@ -1217,7 +1219,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StopScanRunRequest() ); @@ -1249,7 +1251,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.StopScanRunRequest() ); @@ -1271,7 +1273,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetFindingRequest() ); @@ -1303,7 +1305,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetFindingRequest() ); @@ -1351,7 +1353,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetFindingRequest() ); @@ -1383,7 +1385,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.GetFindingRequest() ); @@ -1405,7 +1407,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest() ); @@ -1438,7 +1440,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest() ); @@ -1486,7 +1488,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest() ); @@ -1518,7 +1520,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest() ); @@ -1540,7 +1542,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest() ); @@ -1580,7 +1582,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest() ); @@ -1638,7 +1640,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest() ); @@ -1670,7 +1672,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest() ); @@ -1734,7 +1736,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest() ); @@ -1787,7 +1789,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest() ); @@ -1838,7 +1840,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest() ); @@ -1882,7 +1884,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest() ); @@ -1922,7 +1924,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest() ); @@ -1980,7 +1982,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest() ); @@ -2012,7 +2014,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest() ); @@ -2074,7 +2076,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest() ); @@ -2127,7 +2129,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest() ); @@ -2178,7 +2180,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest() ); @@ -2222,7 +2224,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest() ); @@ -2262,7 +2264,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest() ); @@ -2320,7 +2322,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest() ); @@ -2352,7 +2354,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest() ); @@ -2416,7 +2418,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest() ); @@ -2469,7 +2471,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest() ); @@ -2520,7 +2522,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest() ); @@ -2564,7 +2566,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingsRequest() ); @@ -2604,7 +2606,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingsRequest() ); @@ -2662,7 +2664,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingsRequest() ); @@ -2694,7 +2696,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingsRequest() ); @@ -2756,7 +2758,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingsRequest() ); @@ -2809,7 +2811,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingsRequest() ); @@ -2860,7 +2862,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.websecurityscanner.v1beta.ListFindingsRequest() ); @@ -2898,7 +2900,7 @@ describe('v1beta.WebSecurityScannerClient', () => { }); describe('Path templates', () => { - describe('finding', () => { + describe('finding', async () => { const fakePath = '/rendered/path/finding'; const expectedParameters = { project: 'projectValue', @@ -2911,7 +2913,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.findingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2975,7 +2977,7 @@ describe('v1beta.WebSecurityScannerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2985,7 +2987,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3014,7 +3016,7 @@ describe('v1beta.WebSecurityScannerClient', () => { }); }); - describe('scanConfig', () => { + describe('scanConfig', async () => { const fakePath = '/rendered/path/scanConfig'; const expectedParameters = { project: 'projectValue', @@ -3025,7 +3027,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.scanConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3064,7 +3066,7 @@ describe('v1beta.WebSecurityScannerClient', () => { }); }); - describe('scanRun', () => { + describe('scanRun', async () => { const fakePath = '/rendered/path/scanRun'; const expectedParameters = { project: 'projectValue', @@ -3076,7 +3078,7 @@ describe('v1beta.WebSecurityScannerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.scanRunPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-workflows-executions/package.json b/packages/google-cloud-workflows-executions/package.json index be93d5f51b2..e3392d33dab 100644 --- a/packages/google-cloud-workflows-executions/package.json +++ b/packages/google-cloud-workflows-executions/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json index 9153fd4166b..395339c28d8 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json index 240ad997ccb..d02876e5fab 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json index 5075710a7fd..488f7720de3 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json index b6f59b7959c..15908326c9f 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json index c3378b0ce47..8061537c5ab 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json index c31c305e7f2..d9dcebc3f48 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json index c3378b0ce47..8061537c5ab 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json index c31c305e7f2..d9dcebc3f48 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/src/v1/executions_client.ts b/packages/google-cloud-workflows-executions/src/v1/executions_client.ts index caba3d4b789..ea4ab2ce8c2 100644 --- a/packages/google-cloud-workflows-executions/src/v1/executions_client.ts +++ b/packages/google-cloud-workflows-executions/src/v1/executions_client.ts @@ -484,7 +484,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('createExecution request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('getExecution request %j', request); const wrappedCallback: | Callback< @@ -741,7 +745,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('cancelExecution request %j', request); const wrappedCallback: | Callback< @@ -896,7 +902,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workflows.executions.v1.IListExecutionsRequest, @@ -986,7 +994,9 @@ export class ExecutionsClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listExecutions stream %j', request); return this.descriptors.page.listExecutions.createStream( this.innerApiCalls.listExecutions as GaxCall, @@ -1058,7 +1068,9 @@ export class ExecutionsClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listExecutions iterate %j', request); return this.descriptors.page.listExecutions.asyncIterate( this.innerApiCalls['listExecutions'] as GaxCall, diff --git a/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts b/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts index 5155cea22f2..241435e3655 100644 --- a/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts +++ b/packages/google-cloud-workflows-executions/src/v1/workflows_client.ts @@ -578,7 +578,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('getWorkflow request %j', request); const wrappedCallback: | Callback< @@ -721,7 +723,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -891,7 +895,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1065,7 +1071,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ 'workflow.name': request.workflow!.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1253,7 +1261,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workflows.v1.IListWorkflowsRequest, @@ -1343,7 +1353,9 @@ export class WorkflowsClient { }); const defaultCallSettings = this._defaults['listWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listWorkflows stream %j', request); return this.descriptors.page.listWorkflows.createStream( this.innerApiCalls.listWorkflows as GaxCall, @@ -1415,7 +1427,9 @@ export class WorkflowsClient { }); const defaultCallSettings = this._defaults['listWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listWorkflows iterate %j', request); return this.descriptors.page.listWorkflows.asyncIterate( this.innerApiCalls['listWorkflows'] as GaxCall, @@ -1521,7 +1535,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workflows.v1.IListWorkflowRevisionsRequest, @@ -1590,7 +1606,9 @@ export class WorkflowsClient { }); const defaultCallSettings = this._defaults['listWorkflowRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listWorkflowRevisions stream %j', request); return this.descriptors.page.listWorkflowRevisions.createStream( this.innerApiCalls.listWorkflowRevisions as GaxCall, @@ -1641,7 +1659,9 @@ export class WorkflowsClient { }); const defaultCallSettings = this._defaults['listWorkflowRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listWorkflowRevisions iterate %j', request); return this.descriptors.page.listWorkflowRevisions.asyncIterate( this.innerApiCalls['listWorkflowRevisions'] as GaxCall, @@ -1821,7 +1841,7 @@ export class WorkflowsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-workflows-executions/src/v1beta/executions_client.ts b/packages/google-cloud-workflows-executions/src/v1beta/executions_client.ts index ec4b370b3cb..a04dae968c4 100644 --- a/packages/google-cloud-workflows-executions/src/v1beta/executions_client.ts +++ b/packages/google-cloud-workflows-executions/src/v1beta/executions_client.ts @@ -485,7 +485,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('createExecution request %j', request); const wrappedCallback: | Callback< @@ -615,7 +617,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('getExecution request %j', request); const wrappedCallback: | Callback< @@ -742,7 +746,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('cancelExecution request %j', request); const wrappedCallback: | Callback< @@ -884,7 +890,9 @@ export class ExecutionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workflows.executions.v1beta.IListExecutionsRequest, @@ -961,7 +969,9 @@ export class ExecutionsClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listExecutions stream %j', request); return this.descriptors.page.listExecutions.createStream( this.innerApiCalls.listExecutions as GaxCall, @@ -1020,7 +1030,9 @@ export class ExecutionsClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listExecutions iterate %j', request); return this.descriptors.page.listExecutions.asyncIterate( this.innerApiCalls['listExecutions'] as GaxCall, diff --git a/packages/google-cloud-workflows-executions/src/v1beta/workflows_client.ts b/packages/google-cloud-workflows-executions/src/v1beta/workflows_client.ts index 3c8c1b0554d..29b4099b61b 100644 --- a/packages/google-cloud-workflows-executions/src/v1beta/workflows_client.ts +++ b/packages/google-cloud-workflows-executions/src/v1beta/workflows_client.ts @@ -559,7 +559,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('getWorkflow request %j', request); const wrappedCallback: | Callback< @@ -702,7 +704,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -872,7 +876,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1046,7 +1052,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ 'workflow.name': request.workflow!.name ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1224,7 +1232,9 @@ export class WorkflowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workflows.v1beta.IListWorkflowsRequest, @@ -1304,7 +1314,9 @@ export class WorkflowsClient { }); const defaultCallSettings = this._defaults['listWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listWorkflows stream %j', request); return this.descriptors.page.listWorkflows.createStream( this.innerApiCalls.listWorkflows as GaxCall, @@ -1366,7 +1378,9 @@ export class WorkflowsClient { }); const defaultCallSettings = this._defaults['listWorkflows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch((err) => { + throw err; + }); this._log.info('listWorkflows iterate %j', request); return this.descriptors.page.listWorkflows.asyncIterate( this.innerApiCalls['listWorkflows'] as GaxCall, diff --git a/packages/google-cloud-workflows-executions/test/gapic_executions_v1.ts b/packages/google-cloud-workflows-executions/test/gapic_executions_v1.ts index 3b2ce93ea43..26f28c60d21 100644 --- a/packages/google-cloud-workflows-executions/test/gapic_executions_v1.ts +++ b/packages/google-cloud-workflows-executions/test/gapic_executions_v1.ts @@ -253,7 +253,9 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch((err) => { + throw err; + }); assert(client.executionsStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CreateExecutionRequest() ); @@ -343,7 +345,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CreateExecutionRequest() ); @@ -390,7 +392,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CreateExecutionRequest() ); @@ -421,7 +423,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CreateExecutionRequest() ); @@ -442,7 +444,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.GetExecutionRequest() ); @@ -473,7 +475,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.GetExecutionRequest() ); @@ -520,7 +522,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.GetExecutionRequest() ); @@ -551,7 +553,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.GetExecutionRequest() ); @@ -572,7 +574,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CancelExecutionRequest() ); @@ -603,7 +605,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CancelExecutionRequest() ); @@ -650,7 +652,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CancelExecutionRequest() ); @@ -681,7 +683,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.CancelExecutionRequest() ); @@ -702,7 +704,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.ListExecutionsRequest() ); @@ -741,7 +743,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.ListExecutionsRequest() ); @@ -798,7 +800,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.ListExecutionsRequest() ); @@ -829,7 +831,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.ListExecutionsRequest() ); @@ -890,7 +892,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.ListExecutionsRequest() ); @@ -940,7 +942,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.ListExecutionsRequest() ); @@ -990,7 +992,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1.ListExecutionsRequest() ); @@ -1028,7 +1030,7 @@ describe('v1.ExecutionsClient', () => { }); describe('Path templates', () => { - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -1040,7 +1042,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1104,7 +1106,7 @@ describe('v1.ExecutionsClient', () => { }); }); - describe('workflow', () => { + describe('workflow', async () => { const fakePath = '/rendered/path/workflow'; const expectedParameters = { project: 'projectValue', @@ -1115,7 +1117,7 @@ describe('v1.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workflowPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-workflows-executions/test/gapic_executions_v1beta.ts b/packages/google-cloud-workflows-executions/test/gapic_executions_v1beta.ts index ae0f785a88f..36e97201adc 100644 --- a/packages/google-cloud-workflows-executions/test/gapic_executions_v1beta.ts +++ b/packages/google-cloud-workflows-executions/test/gapic_executions_v1beta.ts @@ -255,7 +255,9 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch((err) => { + throw err; + }); assert(client.executionsStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CreateExecutionRequest() ); @@ -345,7 +347,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CreateExecutionRequest() ); @@ -392,7 +394,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CreateExecutionRequest() ); @@ -423,7 +425,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CreateExecutionRequest() ); @@ -444,7 +446,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.GetExecutionRequest() ); @@ -475,7 +477,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.GetExecutionRequest() ); @@ -522,7 +524,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.GetExecutionRequest() ); @@ -553,7 +555,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.GetExecutionRequest() ); @@ -574,7 +576,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CancelExecutionRequest() ); @@ -605,7 +607,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CancelExecutionRequest() ); @@ -652,7 +654,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CancelExecutionRequest() ); @@ -683,7 +685,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.CancelExecutionRequest() ); @@ -704,7 +706,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() ); @@ -743,7 +745,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() ); @@ -800,7 +802,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() ); @@ -831,7 +833,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() ); @@ -894,7 +896,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() ); @@ -946,7 +948,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() ); @@ -996,7 +998,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.executions.v1beta.ListExecutionsRequest() ); @@ -1034,7 +1036,7 @@ describe('v1beta.ExecutionsClient', () => { }); describe('Path templates', () => { - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -1046,7 +1048,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1110,7 +1112,7 @@ describe('v1beta.ExecutionsClient', () => { }); }); - describe('workflow', () => { + describe('workflow', async () => { const fakePath = '/rendered/path/workflow'; const expectedParameters = { project: 'projectValue', @@ -1121,7 +1123,7 @@ describe('v1beta.ExecutionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workflowPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts b/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts index 5fcceeed1fe..4439f7170ff 100644 --- a/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts +++ b/packages/google-cloud-workflows-executions/test/gapic_workflows_v1.ts @@ -287,7 +287,9 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch((err) => { + throw err; + }); assert(client.workflowsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.GetWorkflowRequest() ); @@ -377,7 +379,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.GetWorkflowRequest() ); @@ -424,7 +426,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.GetWorkflowRequest() ); @@ -455,7 +457,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.GetWorkflowRequest() ); @@ -476,7 +478,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.CreateWorkflowRequest() ); @@ -509,7 +511,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.CreateWorkflowRequest() ); @@ -563,7 +565,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.CreateWorkflowRequest() ); @@ -594,7 +596,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.CreateWorkflowRequest() ); @@ -627,7 +629,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -649,7 +651,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -670,7 +672,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.DeleteWorkflowRequest() ); @@ -703,7 +705,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.DeleteWorkflowRequest() ); @@ -757,7 +759,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.DeleteWorkflowRequest() ); @@ -788,7 +790,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.DeleteWorkflowRequest() ); @@ -821,7 +823,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -843,7 +845,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -864,7 +866,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.UpdateWorkflowRequest() ); @@ -898,7 +900,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.UpdateWorkflowRequest() ); @@ -953,7 +955,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.UpdateWorkflowRequest() ); @@ -985,7 +987,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.UpdateWorkflowRequest() ); @@ -1019,7 +1021,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1041,7 +1043,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1062,7 +1064,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowsRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowsRequest() ); @@ -1144,7 +1146,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowsRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowsRequest() ); @@ -1229,7 +1231,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowsRequest() ); @@ -1278,7 +1280,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowsRequest() ); @@ -1321,7 +1323,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowsRequest() ); @@ -1363,7 +1365,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() ); @@ -1397,7 +1399,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() ); @@ -1446,7 +1448,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() ); @@ -1480,7 +1482,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() ); @@ -1540,7 +1542,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() ); @@ -1595,7 +1597,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() ); @@ -1642,7 +1644,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1.ListWorkflowRevisionsRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1717,7 +1719,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1761,7 +1763,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1796,7 +1798,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1844,7 +1846,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1885,7 +1887,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1964,7 +1966,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2044,7 +2046,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2140,8 +2142,7 @@ describe('v1.WorkflowsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2160,7 +2161,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2169,8 +2170,7 @@ describe('v1.WorkflowsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2186,7 +2186,7 @@ describe('v1.WorkflowsClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -2198,7 +2198,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2262,7 +2262,7 @@ describe('v1.WorkflowsClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -2275,7 +2275,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2354,7 +2354,7 @@ describe('v1.WorkflowsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2364,7 +2364,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2403,7 +2403,7 @@ describe('v1.WorkflowsClient', () => { }); }); - describe('workflow', () => { + describe('workflow', async () => { const fakePath = '/rendered/path/workflow'; const expectedParameters = { project: 'projectValue', @@ -2414,7 +2414,7 @@ describe('v1.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workflowPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-workflows-executions/test/gapic_workflows_v1beta.ts b/packages/google-cloud-workflows-executions/test/gapic_workflows_v1beta.ts index 3047f01cba6..81c49dba116 100644 --- a/packages/google-cloud-workflows-executions/test/gapic_workflows_v1beta.ts +++ b/packages/google-cloud-workflows-executions/test/gapic_workflows_v1beta.ts @@ -282,7 +282,9 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch((err) => { + throw err; + }); assert(client.workflowsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.GetWorkflowRequest() ); @@ -372,7 +374,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.GetWorkflowRequest() ); @@ -419,7 +421,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.GetWorkflowRequest() ); @@ -450,7 +452,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.GetWorkflowRequest() ); @@ -471,7 +473,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() ); @@ -504,7 +506,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() ); @@ -558,7 +560,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() ); @@ -589,7 +591,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.CreateWorkflowRequest() ); @@ -622,7 +624,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() ); @@ -698,7 +700,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() ); @@ -752,7 +754,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() ); @@ -783,7 +785,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.DeleteWorkflowRequest() ); @@ -816,7 +818,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() ); @@ -893,7 +895,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() ); @@ -948,7 +950,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() ); @@ -980,7 +982,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.UpdateWorkflowRequest() ); @@ -1014,7 +1016,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1036,7 +1038,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1057,7 +1059,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() ); @@ -1096,7 +1098,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() ); @@ -1151,7 +1153,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() ); @@ -1182,7 +1184,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() ); @@ -1242,7 +1244,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() ); @@ -1291,7 +1293,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() ); @@ -1340,7 +1342,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workflows.v1beta.ListWorkflowsRequest() ); @@ -1377,7 +1379,7 @@ describe('v1beta.WorkflowsClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1387,7 +1389,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1426,7 +1428,7 @@ describe('v1beta.WorkflowsClient', () => { }); }); - describe('workflow', () => { + describe('workflow', async () => { const fakePath = '/rendered/path/workflow'; const expectedParameters = { project: 'projectValue', @@ -1437,7 +1439,7 @@ describe('v1beta.WorkflowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workflowPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-workstations/package.json b/packages/google-cloud-workstations/package.json index 29bd0c27f5d..8aa1da21a36 100644 --- a/packages/google-cloud-workstations/package.json +++ b/packages/google-cloud-workstations/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json index c385b703265..3d562c4ea93 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json +++ b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json index 363932ced06..db646910f25 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json +++ b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json index 03e518c9c46..473c12627fa 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json +++ b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json index 87ccf4fc511..733f5f5f2c3 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json +++ b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/src/v1/workstations_client.ts b/packages/google-cloud-workstations/src/v1/workstations_client.ts index ed0d4220dd2..d2c1eed7670 100644 --- a/packages/google-cloud-workstations/src/v1/workstations_client.ts +++ b/packages/google-cloud-workstations/src/v1/workstations_client.ts @@ -758,7 +758,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkstationCluster request %j', request); const wrappedCallback: | Callback< @@ -883,7 +885,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkstationConfig request %j', request); const wrappedCallback: | Callback< @@ -1002,7 +1006,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkstation request %j', request); const wrappedCallback: | Callback< @@ -1138,7 +1144,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ workstation: request.workstation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAccessToken request %j', request); const wrappedCallback: | Callback< @@ -1277,7 +1285,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1454,7 +1464,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ 'workstation_cluster.name': request.workstationCluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1631,7 +1643,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1805,7 +1819,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1982,7 +1998,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ 'workstation_config.name': request.workstationConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2159,7 +2177,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2333,7 +2353,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2510,7 +2532,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ 'workstation.name': request.workstation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2683,7 +2707,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2856,7 +2882,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3029,7 +3057,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3192,7 +3222,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, @@ -3258,7 +3290,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationClusters stream %j', request); return this.descriptors.page.listWorkstationClusters.createStream( this.innerApiCalls.listWorkstationClusters as GaxCall, @@ -3306,7 +3340,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationClusters iterate %j', request); return this.descriptors.page.listWorkstationClusters.asyncIterate( this.innerApiCalls['listWorkstationClusters'] as GaxCall, @@ -3409,7 +3445,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, @@ -3475,7 +3513,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationConfigs stream %j', request); return this.descriptors.page.listWorkstationConfigs.createStream( this.innerApiCalls.listWorkstationConfigs as GaxCall, @@ -3523,7 +3563,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationConfigs iterate %j', request); return this.descriptors.page.listWorkstationConfigs.asyncIterate( this.innerApiCalls['listWorkstationConfigs'] as GaxCall, @@ -3627,7 +3669,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, @@ -3693,7 +3737,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstationConfigs stream %j', request); return this.descriptors.page.listUsableWorkstationConfigs.createStream( this.innerApiCalls.listUsableWorkstationConfigs as GaxCall, @@ -3741,7 +3787,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstationConfigs iterate %j', request); return this.descriptors.page.listUsableWorkstationConfigs.asyncIterate( this.innerApiCalls['listUsableWorkstationConfigs'] as GaxCall, @@ -3844,7 +3892,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1.IListWorkstationsRequest, @@ -3910,7 +3960,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstations stream %j', request); return this.descriptors.page.listWorkstations.createStream( this.innerApiCalls.listWorkstations as GaxCall, @@ -3958,7 +4010,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstations iterate %j', request); return this.descriptors.page.listWorkstations.asyncIterate( this.innerApiCalls['listWorkstations'] as GaxCall, @@ -4062,7 +4116,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, @@ -4128,7 +4184,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstations stream %j', request); return this.descriptors.page.listUsableWorkstations.createStream( this.innerApiCalls.listUsableWorkstations as GaxCall, @@ -4176,7 +4234,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstations iterate %j', request); return this.descriptors.page.listUsableWorkstations.asyncIterate( this.innerApiCalls['listUsableWorkstations'] as GaxCall, @@ -4494,7 +4554,7 @@ export class WorkstationsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-workstations/src/v1beta/workstations_client.ts b/packages/google-cloud-workstations/src/v1beta/workstations_client.ts index 35f37399a37..10f5ea8edcd 100644 --- a/packages/google-cloud-workstations/src/v1beta/workstations_client.ts +++ b/packages/google-cloud-workstations/src/v1beta/workstations_client.ts @@ -758,7 +758,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkstationCluster request %j', request); const wrappedCallback: | Callback< @@ -883,7 +885,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkstationConfig request %j', request); const wrappedCallback: | Callback< @@ -1008,7 +1012,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkstation request %j', request); const wrappedCallback: | Callback< @@ -1144,7 +1150,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ workstation: request.workstation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAccessToken request %j', request); const wrappedCallback: | Callback< @@ -1283,7 +1291,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1460,7 +1470,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ 'workstation_cluster.name': request.workstationCluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1637,7 +1649,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1811,7 +1825,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1988,7 +2004,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ 'workstation_config.name': request.workstationConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2165,7 +2183,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2339,7 +2359,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2516,7 +2538,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ 'workstation.name': request.workstation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2689,7 +2713,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2862,7 +2888,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3035,7 +3063,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3198,7 +3228,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1beta.IListWorkstationClustersRequest, @@ -3264,7 +3296,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationClusters stream %j', request); return this.descriptors.page.listWorkstationClusters.createStream( this.innerApiCalls.listWorkstationClusters as GaxCall, @@ -3312,7 +3346,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationClusters iterate %j', request); return this.descriptors.page.listWorkstationClusters.asyncIterate( this.innerApiCalls['listWorkstationClusters'] as GaxCall, @@ -3415,7 +3451,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1beta.IListWorkstationConfigsRequest, @@ -3481,7 +3519,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationConfigs stream %j', request); return this.descriptors.page.listWorkstationConfigs.createStream( this.innerApiCalls.listWorkstationConfigs as GaxCall, @@ -3529,7 +3569,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstationConfigs iterate %j', request); return this.descriptors.page.listWorkstationConfigs.asyncIterate( this.innerApiCalls['listWorkstationConfigs'] as GaxCall, @@ -3633,7 +3675,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1beta.IListUsableWorkstationConfigsRequest, @@ -3699,7 +3743,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstationConfigs stream %j', request); return this.descriptors.page.listUsableWorkstationConfigs.createStream( this.innerApiCalls.listUsableWorkstationConfigs as GaxCall, @@ -3747,7 +3793,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstationConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstationConfigs iterate %j', request); return this.descriptors.page.listUsableWorkstationConfigs.asyncIterate( this.innerApiCalls['listUsableWorkstationConfigs'] as GaxCall, @@ -3850,7 +3898,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1beta.IListWorkstationsRequest, @@ -3916,7 +3966,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstations stream %j', request); return this.descriptors.page.listWorkstations.createStream( this.innerApiCalls.listWorkstations as GaxCall, @@ -3964,7 +4016,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkstations iterate %j', request); return this.descriptors.page.listWorkstations.asyncIterate( this.innerApiCalls['listWorkstations'] as GaxCall, @@ -4068,7 +4122,9 @@ export class WorkstationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.workstations.v1beta.IListUsableWorkstationsRequest, @@ -4134,7 +4190,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstations stream %j', request); return this.descriptors.page.listUsableWorkstations.createStream( this.innerApiCalls.listUsableWorkstations as GaxCall, @@ -4182,7 +4240,9 @@ export class WorkstationsClient { }); const defaultCallSettings = this._defaults['listUsableWorkstations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableWorkstations iterate %j', request); return this.descriptors.page.listUsableWorkstations.asyncIterate( this.innerApiCalls['listUsableWorkstations'] as GaxCall, @@ -4500,7 +4560,7 @@ export class WorkstationsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-workstations/test/gapic_workstations_v1.ts b/packages/google-cloud-workstations/test/gapic_workstations_v1.ts index b3149467656..c26d3bc66de 100644 --- a/packages/google-cloud-workstations/test/gapic_workstations_v1.ts +++ b/packages/google-cloud-workstations/test/gapic_workstations_v1.ts @@ -293,7 +293,9 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.workstationsStub); client.close().then(() => { done(); @@ -352,7 +354,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationClusterRequest() ); @@ -384,7 +386,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationClusterRequest() ); @@ -431,7 +433,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationClusterRequest() ); @@ -465,7 +467,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationClusterRequest() ); @@ -489,7 +491,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationConfigRequest() ); @@ -521,7 +523,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationConfigRequest() ); @@ -568,7 +570,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationConfigRequest() ); @@ -599,7 +601,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationConfigRequest() ); @@ -620,7 +622,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationRequest() ); @@ -651,7 +653,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationRequest() ); @@ -698,7 +700,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationRequest() ); @@ -729,7 +731,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GetWorkstationRequest() ); @@ -750,7 +752,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GenerateAccessTokenRequest() ); @@ -782,7 +784,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GenerateAccessTokenRequest() ); @@ -829,7 +831,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GenerateAccessTokenRequest() ); @@ -860,7 +862,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.GenerateAccessTokenRequest() ); @@ -881,7 +883,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationClusterRequest() ); @@ -914,7 +916,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationClusterRequest() ); @@ -968,7 +970,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationClusterRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationClusterRequest() ); @@ -1035,7 +1037,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1058,7 +1060,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1079,7 +1081,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationClusterRequest() ); @@ -1113,7 +1115,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationClusterRequest() ); @@ -1168,7 +1170,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationClusterRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationClusterRequest() ); @@ -1237,7 +1239,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1260,7 +1262,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1281,7 +1283,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationClusterRequest() ); @@ -1314,7 +1316,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationClusterRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationClusterRequest() ); @@ -1402,7 +1404,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationClusterRequest() ); @@ -1435,7 +1437,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1458,7 +1460,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1479,7 +1481,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationConfigRequest() ); @@ -1512,7 +1514,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationConfigRequest() ); @@ -1566,7 +1568,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationConfigRequest() ); @@ -1600,7 +1602,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationConfigRequest() ); @@ -1633,7 +1635,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1656,7 +1658,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1677,7 +1679,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationConfigRequest() ); @@ -1711,7 +1713,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationConfigRequest() ); @@ -1766,7 +1768,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationConfigRequest() ); @@ -1801,7 +1803,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationConfigRequest() ); @@ -1835,7 +1837,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1858,7 +1860,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1879,7 +1881,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationConfigRequest() ); @@ -1912,7 +1914,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationConfigRequest() ); @@ -1966,7 +1968,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationConfigRequest() ); @@ -2000,7 +2002,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationConfigRequest() ); @@ -2033,7 +2035,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2056,7 +2058,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2077,7 +2079,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationRequest() ); @@ -2110,7 +2112,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationRequest() ); @@ -2164,7 +2166,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationRequest() ); @@ -2195,7 +2197,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.CreateWorkstationRequest() ); @@ -2228,7 +2230,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2250,7 +2252,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2271,7 +2273,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationRequest() ); @@ -2305,7 +2307,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationRequest() ); @@ -2360,7 +2362,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationRequest() ); @@ -2392,7 +2394,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.UpdateWorkstationRequest() ); @@ -2426,7 +2428,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2448,7 +2450,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2469,7 +2471,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationRequest() ); @@ -2502,7 +2504,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationRequest() ); @@ -2556,7 +2558,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationRequest() ); @@ -2587,7 +2589,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.DeleteWorkstationRequest() ); @@ -2620,7 +2622,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2642,7 +2644,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2663,7 +2665,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StartWorkstationRequest() ); @@ -2696,7 +2698,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StartWorkstationRequest() ); @@ -2750,7 +2752,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StartWorkstationRequest() ); @@ -2781,7 +2783,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StartWorkstationRequest() ); @@ -2814,7 +2816,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2836,7 +2838,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2857,7 +2859,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StopWorkstationRequest() ); @@ -2890,7 +2892,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StopWorkstationRequest() ); @@ -2944,7 +2946,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StopWorkstationRequest() ); @@ -2975,7 +2977,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.StopWorkstationRequest() ); @@ -3008,7 +3010,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3030,7 +3032,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3051,7 +3053,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationClustersRequest() ); @@ -3091,7 +3093,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationClustersRequest() ); @@ -3148,7 +3150,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationClustersRequest() ); @@ -3182,7 +3184,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationClustersRequest() ); @@ -3251,7 +3253,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationClustersRequest() ); @@ -3309,7 +3311,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationClustersRequest() ); @@ -3363,7 +3365,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationClustersRequest() ); @@ -3410,7 +3412,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationConfigsRequest() ); @@ -3450,7 +3452,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationConfigsRequest() ); @@ -3507,7 +3509,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationConfigsRequest() ); @@ -3541,7 +3543,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationConfigsRequest() ); @@ -3608,7 +3610,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationConfigsRequest() ); @@ -3664,7 +3666,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationConfigsRequest() ); @@ -3718,7 +3720,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationConfigsRequest() ); @@ -3765,7 +3767,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest() ); @@ -3805,7 +3807,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest() ); @@ -3862,7 +3864,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest() ); @@ -3896,7 +3898,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest() ); @@ -3966,7 +3968,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest() ); @@ -4025,7 +4027,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest() ); @@ -4079,7 +4081,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest() ); @@ -4126,7 +4128,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationsRequest() ); @@ -4165,7 +4167,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationsRequest() ); @@ -4220,7 +4222,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationsRequest() ); @@ -4251,7 +4253,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationsRequest() ); @@ -4311,7 +4313,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationsRequest() ); @@ -4360,7 +4362,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationsRequest() ); @@ -4409,7 +4411,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListWorkstationsRequest() ); @@ -4452,7 +4454,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationsRequest() ); @@ -4492,7 +4494,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationsRequest() ); @@ -4547,7 +4549,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationsRequest() ); @@ -4581,7 +4583,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationsRequest() ); @@ -4647,7 +4649,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationsRequest() ); @@ -4702,7 +4704,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationsRequest() ); @@ -4755,7 +4757,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1.ListUsableWorkstationsRequest() ); @@ -4801,7 +4803,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4831,7 +4833,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4875,7 +4877,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4907,7 +4909,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4937,7 +4939,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4981,7 +4983,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5013,7 +5015,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5046,7 +5048,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5090,7 +5092,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5125,7 +5127,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5155,7 +5157,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5199,7 +5201,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5234,7 +5236,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5282,7 +5284,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5323,7 +5325,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5402,7 +5404,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5482,7 +5484,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5578,8 +5580,7 @@ describe('v1.WorkstationsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5598,7 +5599,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5607,8 +5608,7 @@ describe('v1.WorkstationsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5624,7 +5624,7 @@ describe('v1.WorkstationsClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5634,7 +5634,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5673,7 +5673,7 @@ describe('v1.WorkstationsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5682,7 +5682,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5711,7 +5711,7 @@ describe('v1.WorkstationsClient', () => { }); }); - describe('workstation', () => { + describe('workstation', async () => { const fakePath = '/rendered/path/workstation'; const expectedParameters = { project: 'projectValue', @@ -5724,7 +5724,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workstationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5801,7 +5801,7 @@ describe('v1.WorkstationsClient', () => { }); }); - describe('workstationCluster', () => { + describe('workstationCluster', async () => { const fakePath = '/rendered/path/workstationCluster'; const expectedParameters = { project: 'projectValue', @@ -5812,7 +5812,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workstationClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5878,7 +5878,7 @@ describe('v1.WorkstationsClient', () => { }); }); - describe('workstationConfig', () => { + describe('workstationConfig', async () => { const fakePath = '/rendered/path/workstationConfig'; const expectedParameters = { project: 'projectValue', @@ -5890,7 +5890,7 @@ describe('v1.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workstationConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-workstations/test/gapic_workstations_v1beta.ts b/packages/google-cloud-workstations/test/gapic_workstations_v1beta.ts index 3a225693933..53378234fdb 100644 --- a/packages/google-cloud-workstations/test/gapic_workstations_v1beta.ts +++ b/packages/google-cloud-workstations/test/gapic_workstations_v1beta.ts @@ -293,7 +293,9 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.workstationsStub); client.close().then(() => { done(); @@ -352,7 +354,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationClusterRequest() ); @@ -384,7 +386,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationClusterRequest() ); @@ -431,7 +433,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationClusterRequest() ); @@ -465,7 +467,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationClusterRequest() ); @@ -489,7 +491,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationConfigRequest() ); @@ -521,7 +523,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationConfigRequest() ); @@ -568,7 +570,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationConfigRequest() ); @@ -599,7 +601,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationConfigRequest() ); @@ -620,7 +622,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationRequest() ); @@ -651,7 +653,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationRequest() ); @@ -698,7 +700,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationRequest() ); @@ -729,7 +731,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GetWorkstationRequest() ); @@ -750,7 +752,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GenerateAccessTokenRequest() ); @@ -782,7 +784,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GenerateAccessTokenRequest() ); @@ -829,7 +831,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GenerateAccessTokenRequest() ); @@ -860,7 +862,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.GenerateAccessTokenRequest() ); @@ -881,7 +883,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationClusterRequest() ); @@ -914,7 +916,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationClusterRequest() ); @@ -968,7 +970,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationClusterRequest() ); @@ -1002,7 +1004,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationClusterRequest() ); @@ -1035,7 +1037,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1058,7 +1060,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1079,7 +1081,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest() ); @@ -1113,7 +1115,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest() ); @@ -1168,7 +1170,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest() ); @@ -1203,7 +1205,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest() ); @@ -1237,7 +1239,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1260,7 +1262,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1281,7 +1283,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest() ); @@ -1314,7 +1316,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest() ); @@ -1368,7 +1370,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest() ); @@ -1402,7 +1404,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest() ); @@ -1435,7 +1437,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1458,7 +1460,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1479,7 +1481,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationConfigRequest() ); @@ -1512,7 +1514,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationConfigRequest() ); @@ -1566,7 +1568,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationConfigRequest() ); @@ -1600,7 +1602,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationConfigRequest() ); @@ -1633,7 +1635,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1656,7 +1658,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1677,7 +1679,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest() ); @@ -1711,7 +1713,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest() ); @@ -1766,7 +1768,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest() ); @@ -1801,7 +1803,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest() ); @@ -1835,7 +1837,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1858,7 +1860,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1879,7 +1881,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest() ); @@ -1912,7 +1914,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest() ); @@ -1966,7 +1968,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest() ); @@ -2000,7 +2002,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest() ); @@ -2033,7 +2035,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2056,7 +2058,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2077,7 +2079,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationRequest() ); @@ -2110,7 +2112,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationRequest() ); @@ -2164,7 +2166,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationRequest() ); @@ -2195,7 +2197,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.CreateWorkstationRequest() ); @@ -2228,7 +2230,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2250,7 +2252,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2271,7 +2273,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationRequest() ); @@ -2305,7 +2307,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationRequest() ); @@ -2360,7 +2362,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationRequest() ); @@ -2392,7 +2394,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.UpdateWorkstationRequest() ); @@ -2426,7 +2428,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2448,7 +2450,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2469,7 +2471,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationRequest() ); @@ -2502,7 +2504,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationRequest() ); @@ -2556,7 +2558,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationRequest() ); @@ -2587,7 +2589,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.DeleteWorkstationRequest() ); @@ -2620,7 +2622,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2642,7 +2644,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2663,7 +2665,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StartWorkstationRequest() ); @@ -2696,7 +2698,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StartWorkstationRequest() ); @@ -2750,7 +2752,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StartWorkstationRequest() ); @@ -2781,7 +2783,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StartWorkstationRequest() ); @@ -2814,7 +2816,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2836,7 +2838,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2857,7 +2859,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StopWorkstationRequest() ); @@ -2890,7 +2892,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StopWorkstationRequest() ); @@ -2944,7 +2946,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StopWorkstationRequest() ); @@ -2975,7 +2977,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.StopWorkstationRequest() ); @@ -3008,7 +3010,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3030,7 +3032,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3051,7 +3053,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationClustersRequest() ); @@ -3091,7 +3093,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationClustersRequest() ); @@ -3148,7 +3150,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationClustersRequest() ); @@ -3182,7 +3184,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationClustersRequest() ); @@ -3251,7 +3253,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationClustersRequest() ); @@ -3309,7 +3311,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationClustersRequest() ); @@ -3363,7 +3365,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationClustersRequest() ); @@ -3410,7 +3412,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest() ); @@ -3450,7 +3452,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest() ); @@ -3507,7 +3509,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest() ); @@ -3541,7 +3543,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest() ); @@ -3610,7 +3612,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest() ); @@ -3668,7 +3670,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest() ); @@ -3722,7 +3724,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest() ); @@ -3769,7 +3771,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest() ); @@ -3809,7 +3811,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest() ); @@ -3866,7 +3868,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest() ); @@ -3900,7 +3902,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest() ); @@ -3972,7 +3974,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest() ); @@ -4033,7 +4035,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest() ); @@ -4087,7 +4089,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest() ); @@ -4134,7 +4136,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationsRequest() ); @@ -4173,7 +4175,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationsRequest() ); @@ -4230,7 +4232,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationsRequest() ); @@ -4261,7 +4263,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationsRequest() ); @@ -4322,7 +4324,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationsRequest() ); @@ -4372,7 +4374,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationsRequest() ); @@ -4422,7 +4424,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListWorkstationsRequest() ); @@ -4465,7 +4467,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest() ); @@ -4505,7 +4507,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest() ); @@ -4562,7 +4564,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest() ); @@ -4596,7 +4598,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest() ); @@ -4663,7 +4665,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest() ); @@ -4719,7 +4721,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest() ); @@ -4773,7 +4775,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest() ); @@ -4819,7 +4821,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4849,7 +4851,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4893,7 +4895,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4925,7 +4927,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4955,7 +4957,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4999,7 +5001,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5031,7 +5033,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5064,7 +5066,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5108,7 +5110,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5143,7 +5145,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5173,7 +5175,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5217,7 +5219,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5252,7 +5254,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5300,7 +5302,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5341,7 +5343,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5420,7 +5422,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5500,7 +5502,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5596,8 +5598,7 @@ describe('v1beta.WorkstationsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5616,7 +5617,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5625,8 +5626,7 @@ describe('v1beta.WorkstationsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5642,7 +5642,7 @@ describe('v1beta.WorkstationsClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5652,7 +5652,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5691,7 +5691,7 @@ describe('v1beta.WorkstationsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5700,7 +5700,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5729,7 +5729,7 @@ describe('v1beta.WorkstationsClient', () => { }); }); - describe('workstation', () => { + describe('workstation', async () => { const fakePath = '/rendered/path/workstation'; const expectedParameters = { project: 'projectValue', @@ -5742,7 +5742,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workstationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5819,7 +5819,7 @@ describe('v1beta.WorkstationsClient', () => { }); }); - describe('workstationCluster', () => { + describe('workstationCluster', async () => { const fakePath = '/rendered/path/workstationCluster'; const expectedParameters = { project: 'projectValue', @@ -5830,7 +5830,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workstationClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5896,7 +5896,7 @@ describe('v1beta.WorkstationsClient', () => { }); }); - describe('workstationConfig', () => { + describe('workstationConfig', async () => { const fakePath = '/rendered/path/workstationConfig'; const expectedParameters = { project: 'projectValue', @@ -5908,7 +5908,7 @@ describe('v1beta.WorkstationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workstationConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-container/package.json b/packages/google-container/package.json index 4d9d4ca1c2b..40e40751cf3 100644 --- a/packages/google-container/package.json +++ b/packages/google-container/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index 82f142f784e..bf3bca95b1e 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.19.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json index 0db8a6cf04e..1e5c58902c1 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.19.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json index d63bf68bf95..23dd44d4231 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.19.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json index 8127de42f46..1f6a62ff2fa 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.19.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/src/v1/cluster_manager_client.ts b/packages/google-container/src/v1/cluster_manager_client.ts index 1b07c22ee05..5f7aba3b333 100644 --- a/packages/google-container/src/v1/cluster_manager_client.ts +++ b/packages/google-container/src/v1/cluster_manager_client.ts @@ -512,7 +512,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters request %j', request); const wrappedCallback: | Callback< @@ -634,7 +636,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -768,7 +772,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCluster request %j', request); const wrappedCallback: | Callback< @@ -892,7 +898,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCluster request %j', request); const wrappedCallback: | Callback< @@ -1115,7 +1123,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNodePool request %j', request); const wrappedCallback: | Callback< @@ -1252,7 +1262,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNodePoolAutoscaling request %j', request); const wrappedCallback: | Callback< @@ -1390,7 +1402,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLoggingService request %j', request); const wrappedCallback: | Callback< @@ -1534,7 +1548,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMonitoringService request %j', request); const wrappedCallback: | Callback< @@ -1661,7 +1677,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setAddonsConfig request %j', request); const wrappedCallback: | Callback< @@ -1795,7 +1813,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ClusterManager-$SetLocations', 'SetLocations is deprecated and may be removed in a future version.', @@ -1933,7 +1953,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMaster request %j', request); const wrappedCallback: | Callback< @@ -2061,7 +2083,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMasterAuth request %j', request); const wrappedCallback: | Callback< @@ -2191,7 +2215,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCluster request %j', request); const wrappedCallback: | Callback< @@ -2310,7 +2336,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOperations request %j', request); const wrappedCallback: | Callback< @@ -2432,7 +2460,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', operation_id: request.operationId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOperation request %j', request); const wrappedCallback: | Callback< @@ -2554,7 +2584,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', operation_id: request.operationId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelOperation request %j', request); const wrappedCallback: | Callback< @@ -2672,7 +2704,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServerConfig request %j', request); const wrappedCallback: | Callback< @@ -2780,7 +2814,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJSONWebKeys request %j', request); const wrappedCallback: | Callback< @@ -2902,7 +2938,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodePools request %j', request); const wrappedCallback: | Callback< @@ -3029,7 +3067,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNodePool request %j', request); const wrappedCallback: | Callback< @@ -3154,7 +3194,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNodePool request %j', request); const wrappedCallback: | Callback< @@ -3281,7 +3323,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNodePool request %j', request); const wrappedCallback: | Callback< @@ -3398,7 +3442,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeNodePoolUpgrade request %j', request); const wrappedCallback: | Callback< @@ -3542,7 +3588,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rollbackNodePoolUpgrade request %j', request); const wrappedCallback: | Callback< @@ -3684,7 +3732,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNodePoolManagement request %j', request); const wrappedCallback: | Callback< @@ -3817,7 +3867,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -3941,7 +3993,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLegacyAbac request %j', request); const wrappedCallback: | Callback< @@ -4065,7 +4119,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startIPRotation request %j', request); const wrappedCallback: | Callback< @@ -4189,7 +4245,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeIPRotation request %j', request); const wrappedCallback: | Callback< @@ -4322,7 +4380,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNodePoolSize request %j', request); const wrappedCallback: | Callback< @@ -4448,7 +4508,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNetworkPolicy request %j', request); const wrappedCallback: | Callback< @@ -4581,7 +4643,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMaintenancePolicy request %j', request); const wrappedCallback: | Callback< @@ -4705,7 +4769,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkAutopilotCompatibility request %j', request); const wrappedCallback: | Callback< @@ -4842,7 +4908,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.container.v1.IListUsableSubnetworksRequest, @@ -4917,7 +4985,9 @@ export class ClusterManagerClient { }); const defaultCallSettings = this._defaults['listUsableSubnetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableSubnetworks stream %j', request); return this.descriptors.page.listUsableSubnetworks.createStream( this.innerApiCalls.listUsableSubnetworks as GaxCall, @@ -4974,7 +5044,9 @@ export class ClusterManagerClient { }); const defaultCallSettings = this._defaults['listUsableSubnetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableSubnetworks iterate %j', request); return this.descriptors.page.listUsableSubnetworks.asyncIterate( this.innerApiCalls['listUsableSubnetworks'] as GaxCall, diff --git a/packages/google-container/src/v1beta1/cluster_manager_client.ts b/packages/google-container/src/v1beta1/cluster_manager_client.ts index 71662209d55..9f72739794b 100644 --- a/packages/google-container/src/v1beta1/cluster_manager_client.ts +++ b/packages/google-container/src/v1beta1/cluster_manager_client.ts @@ -502,7 +502,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters request %j', request); const wrappedCallback: | Callback< @@ -626,7 +628,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -762,7 +766,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCluster request %j', request); const wrappedCallback: | Callback< @@ -890,7 +896,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCluster request %j', request); const wrappedCallback: | Callback< @@ -1111,7 +1119,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNodePool request %j', request); const wrappedCallback: | Callback< @@ -1256,7 +1266,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNodePoolAutoscaling request %j', request); const wrappedCallback: | Callback< @@ -1403,7 +1415,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLoggingService request %j', request); const wrappedCallback: | Callback< @@ -1547,7 +1561,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMonitoringService request %j', request); const wrappedCallback: | Callback< @@ -1685,7 +1701,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setAddonsConfig request %j', request); const wrappedCallback: | Callback< @@ -1823,7 +1841,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$ClusterManager-$SetLocations', 'SetLocations is deprecated and may be removed in a future version.', @@ -1965,7 +1985,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateMaster request %j', request); const wrappedCallback: | Callback< @@ -2097,7 +2119,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMasterAuth request %j', request); const wrappedCallback: | Callback< @@ -2231,7 +2255,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCluster request %j', request); const wrappedCallback: | Callback< @@ -2354,7 +2380,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOperations request %j', request); const wrappedCallback: | Callback< @@ -2480,7 +2508,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', operation_id: request.operationId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOperation request %j', request); const wrappedCallback: | Callback< @@ -2612,7 +2642,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', operation_id: request.operationId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelOperation request %j', request); const wrappedCallback: | Callback< @@ -2740,7 +2772,9 @@ export class ClusterManagerClient { project_id: request.projectId ?? '', zone: request.zone ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServerConfig request %j', request); const wrappedCallback: | Callback< @@ -2852,7 +2886,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJSONWebKeys request %j', request); const wrappedCallback: | Callback< @@ -2978,7 +3014,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodePools request %j', request); const wrappedCallback: | Callback< @@ -3109,7 +3147,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNodePool request %j', request); const wrappedCallback: | Callback< @@ -3238,7 +3278,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNodePool request %j', request); const wrappedCallback: | Callback< @@ -3369,7 +3411,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNodePool request %j', request); const wrappedCallback: | Callback< @@ -3494,7 +3538,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeNodePoolUpgrade request %j', request); const wrappedCallback: | Callback< @@ -3644,7 +3690,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rollbackNodePoolUpgrade request %j', request); const wrappedCallback: | Callback< @@ -3786,7 +3834,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNodePoolManagement request %j', request); const wrappedCallback: | Callback< @@ -3922,7 +3972,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLabels request %j', request); const wrappedCallback: | Callback< @@ -4048,7 +4100,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setLegacyAbac request %j', request); const wrappedCallback: | Callback< @@ -4182,7 +4236,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startIPRotation request %j', request); const wrappedCallback: | Callback< @@ -4314,7 +4370,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeIPRotation request %j', request); const wrappedCallback: | Callback< @@ -4458,7 +4516,9 @@ export class ClusterManagerClient { cluster_id: request.clusterId ?? '', node_pool_id: request.nodePoolId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNodePoolSize request %j', request); const wrappedCallback: | Callback< @@ -4592,7 +4652,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setNetworkPolicy request %j', request); const wrappedCallback: | Callback< @@ -4725,7 +4787,9 @@ export class ClusterManagerClient { zone: request.zone ?? '', cluster_id: request.clusterId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setMaintenancePolicy request %j', request); const wrappedCallback: | Callback< @@ -4852,7 +4916,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkAutopilotCompatibility request %j', request); const wrappedCallback: | Callback< @@ -4966,7 +5032,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLocations request %j', request); const wrappedCallback: | Callback< @@ -5100,7 +5168,9 @@ export class ClusterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.container.v1beta1.IListUsableSubnetworksRequest, @@ -5175,7 +5245,9 @@ export class ClusterManagerClient { }); const defaultCallSettings = this._defaults['listUsableSubnetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableSubnetworks stream %j', request); return this.descriptors.page.listUsableSubnetworks.createStream( this.innerApiCalls.listUsableSubnetworks as GaxCall, @@ -5232,7 +5304,9 @@ export class ClusterManagerClient { }); const defaultCallSettings = this._defaults['listUsableSubnetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUsableSubnetworks iterate %j', request); return this.descriptors.page.listUsableSubnetworks.asyncIterate( this.innerApiCalls['listUsableSubnetworks'] as GaxCall, diff --git a/packages/google-container/test/gapic_cluster_manager_v1.ts b/packages/google-container/test/gapic_cluster_manager_v1.ts index 172c1c4de42..51686deea14 100644 --- a/packages/google-container/test/gapic_cluster_manager_v1.ts +++ b/packages/google-container/test/gapic_cluster_manager_v1.ts @@ -252,7 +252,9 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.clusterManagerStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListClustersRequest() ); @@ -352,7 +354,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListClustersRequest() ); @@ -409,7 +411,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListClustersRequest() ); @@ -450,7 +452,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListClustersRequest() ); @@ -481,7 +483,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetClusterRequest() ); @@ -527,7 +529,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetClusterRequest() ); @@ -589,7 +591,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetClusterRequest() ); @@ -635,7 +637,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetClusterRequest() ); @@ -671,7 +673,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateClusterRequest() ); @@ -712,7 +714,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateClusterRequest() ); @@ -769,7 +771,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateClusterRequest() ); @@ -810,7 +812,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateClusterRequest() ); @@ -841,7 +843,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateClusterRequest() ); @@ -887,7 +889,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateClusterRequest() ); @@ -949,7 +951,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateClusterRequest() ); @@ -995,7 +997,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateClusterRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateNodePoolRequest() ); @@ -1082,7 +1084,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateNodePoolRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateNodePoolRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateNodePoolRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolAutoscalingRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolAutoscalingRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolAutoscalingRequest() ); @@ -1414,7 +1416,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolAutoscalingRequest() ); @@ -1458,7 +1460,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLoggingServiceRequest() ); @@ -1504,7 +1506,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLoggingServiceRequest() ); @@ -1566,7 +1568,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLoggingServiceRequest() ); @@ -1612,7 +1614,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLoggingServiceRequest() ); @@ -1648,7 +1650,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMonitoringServiceRequest() ); @@ -1695,7 +1697,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMonitoringServiceRequest() ); @@ -1757,7 +1759,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMonitoringServiceRequest() ); @@ -1803,7 +1805,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMonitoringServiceRequest() ); @@ -1839,7 +1841,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetAddonsConfigRequest() ); @@ -1885,7 +1887,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetAddonsConfigRequest() ); @@ -1947,7 +1949,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetAddonsConfigRequest() ); @@ -1993,7 +1995,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetAddonsConfigRequest() ); @@ -2030,7 +2032,7 @@ describe('v1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLocationsRequest() ); @@ -2078,7 +2080,7 @@ describe('v1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLocationsRequest() ); @@ -2142,7 +2144,7 @@ describe('v1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLocationsRequest() ); @@ -2190,7 +2192,7 @@ describe('v1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLocationsRequest() ); @@ -2227,7 +2229,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateMasterRequest() ); @@ -2273,7 +2275,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateMasterRequest() ); @@ -2335,7 +2337,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateMasterRequest() ); @@ -2381,7 +2383,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.UpdateMasterRequest() ); @@ -2417,7 +2419,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMasterAuthRequest() ); @@ -2463,7 +2465,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMasterAuthRequest() ); @@ -2525,7 +2527,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMasterAuthRequest() ); @@ -2571,7 +2573,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMasterAuthRequest() ); @@ -2607,7 +2609,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteClusterRequest() ); @@ -2653,7 +2655,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteClusterRequest() ); @@ -2715,7 +2717,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteClusterRequest() ); @@ -2761,7 +2763,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteClusterRequest() ); @@ -2797,7 +2799,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListOperationsRequest() ); @@ -2838,7 +2840,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListOperationsRequest() ); @@ -2895,7 +2897,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListOperationsRequest() ); @@ -2936,7 +2938,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListOperationsRequest() ); @@ -2967,7 +2969,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetOperationRequest() ); @@ -3013,7 +3015,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetOperationRequest() ); @@ -3075,7 +3077,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetOperationRequest() ); @@ -3121,7 +3123,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetOperationRequest() ); @@ -3157,7 +3159,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CancelOperationRequest() ); @@ -3203,7 +3205,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CancelOperationRequest() ); @@ -3265,7 +3267,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CancelOperationRequest() ); @@ -3311,7 +3313,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CancelOperationRequest() ); @@ -3347,7 +3349,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetServerConfigRequest() ); @@ -3388,7 +3390,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetServerConfigRequest() ); @@ -3445,7 +3447,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetServerConfigRequest() ); @@ -3486,7 +3488,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetServerConfigRequest() ); @@ -3517,7 +3519,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetJSONWebKeysRequest() ); @@ -3548,7 +3550,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetJSONWebKeysRequest() ); @@ -3595,7 +3597,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetJSONWebKeysRequest() ); @@ -3626,7 +3628,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetJSONWebKeysRequest() ); @@ -3647,7 +3649,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListNodePoolsRequest() ); @@ -3693,7 +3695,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListNodePoolsRequest() ); @@ -3755,7 +3757,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListNodePoolsRequest() ); @@ -3801,7 +3803,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListNodePoolsRequest() ); @@ -3837,7 +3839,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetNodePoolRequest() ); @@ -3888,7 +3890,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetNodePoolRequest() ); @@ -3955,7 +3957,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetNodePoolRequest() ); @@ -4006,7 +4008,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.GetNodePoolRequest() ); @@ -4047,7 +4049,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateNodePoolRequest() ); @@ -4093,7 +4095,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateNodePoolRequest() ); @@ -4155,7 +4157,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateNodePoolRequest() ); @@ -4201,7 +4203,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CreateNodePoolRequest() ); @@ -4237,7 +4239,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteNodePoolRequest() ); @@ -4288,7 +4290,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteNodePoolRequest() ); @@ -4355,7 +4357,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteNodePoolRequest() ); @@ -4406,7 +4408,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.DeleteNodePoolRequest() ); @@ -4447,7 +4449,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteNodePoolUpgradeRequest() ); @@ -4479,7 +4481,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteNodePoolUpgradeRequest() ); @@ -4526,7 +4528,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteNodePoolUpgradeRequest() ); @@ -4560,7 +4562,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteNodePoolUpgradeRequest() ); @@ -4584,7 +4586,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.RollbackNodePoolUpgradeRequest() ); @@ -4636,7 +4638,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.RollbackNodePoolUpgradeRequest() ); @@ -4703,7 +4705,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.RollbackNodePoolUpgradeRequest() ); @@ -4757,7 +4759,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.RollbackNodePoolUpgradeRequest() ); @@ -4801,7 +4803,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolManagementRequest() ); @@ -4853,7 +4855,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolManagementRequest() ); @@ -4920,7 +4922,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolManagementRequest() ); @@ -4974,7 +4976,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolManagementRequest() ); @@ -5018,7 +5020,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLabelsRequest() ); @@ -5064,7 +5066,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLabelsRequest() ); @@ -5126,7 +5128,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLabelsRequest() ); @@ -5169,7 +5171,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLabelsRequest() ); @@ -5205,7 +5207,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLegacyAbacRequest() ); @@ -5251,7 +5253,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLegacyAbacRequest() ); @@ -5313,7 +5315,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLegacyAbacRequest() ); @@ -5359,7 +5361,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetLegacyAbacRequest() ); @@ -5395,7 +5397,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.StartIPRotationRequest() ); @@ -5441,7 +5443,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.StartIPRotationRequest() ); @@ -5503,7 +5505,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.StartIPRotationRequest() ); @@ -5549,7 +5551,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.StartIPRotationRequest() ); @@ -5585,7 +5587,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteIPRotationRequest() ); @@ -5632,7 +5634,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteIPRotationRequest() ); @@ -5694,7 +5696,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteIPRotationRequest() ); @@ -5740,7 +5742,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CompleteIPRotationRequest() ); @@ -5776,7 +5778,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolSizeRequest() ); @@ -5827,7 +5829,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolSizeRequest() ); @@ -5894,7 +5896,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolSizeRequest() ); @@ -5945,7 +5947,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNodePoolSizeRequest() ); @@ -5986,7 +5988,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNetworkPolicyRequest() ); @@ -6032,7 +6034,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNetworkPolicyRequest() ); @@ -6094,7 +6096,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNetworkPolicyRequest() ); @@ -6140,7 +6142,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetNetworkPolicyRequest() ); @@ -6176,7 +6178,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMaintenancePolicyRequest() ); @@ -6223,7 +6225,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMaintenancePolicyRequest() ); @@ -6285,7 +6287,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMaintenancePolicyRequest() ); @@ -6331,7 +6333,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.SetMaintenancePolicyRequest() ); @@ -6367,7 +6369,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CheckAutopilotCompatibilityRequest() ); @@ -6399,7 +6401,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CheckAutopilotCompatibilityRequest() ); @@ -6446,7 +6448,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CheckAutopilotCompatibilityRequest() ); @@ -6480,7 +6482,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.CheckAutopilotCompatibilityRequest() ); @@ -6504,7 +6506,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListUsableSubnetworksRequest() ); @@ -6544,7 +6546,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListUsableSubnetworksRequest() ); @@ -6599,7 +6601,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListUsableSubnetworksRequest() ); @@ -6633,7 +6635,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListUsableSubnetworksRequest() ); @@ -6699,7 +6701,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListUsableSubnetworksRequest() ); @@ -6754,7 +6756,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListUsableSubnetworksRequest() ); @@ -6807,7 +6809,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1.ListUsableSubnetworksRequest() ); @@ -6848,7 +6850,7 @@ describe('v1.ClusterManagerClient', () => { }); describe('Path templates', () => { - describe('caPool', () => { + describe('caPool', async () => { const fakePath = '/rendered/path/caPool'; const expectedParameters = { project: 'projectValue', @@ -6859,7 +6861,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.caPoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6912,7 +6914,7 @@ describe('v1.ClusterManagerClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -6925,7 +6927,7 @@ describe('v1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-container/test/gapic_cluster_manager_v1beta1.ts b/packages/google-container/test/gapic_cluster_manager_v1beta1.ts index e5821595658..ea06b5fe248 100644 --- a/packages/google-container/test/gapic_cluster_manager_v1beta1.ts +++ b/packages/google-container/test/gapic_cluster_manager_v1beta1.ts @@ -253,7 +253,9 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.clusterManagerStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListClustersRequest() ); @@ -353,7 +355,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListClustersRequest() ); @@ -410,7 +412,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListClustersRequest() ); @@ -451,7 +453,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListClustersRequest() ); @@ -482,7 +484,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetClusterRequest() ); @@ -528,7 +530,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetClusterRequest() ); @@ -590,7 +592,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetClusterRequest() ); @@ -636,7 +638,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetClusterRequest() ); @@ -672,7 +674,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateClusterRequest() ); @@ -713,7 +715,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateClusterRequest() ); @@ -770,7 +772,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateClusterRequest() ); @@ -811,7 +813,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateClusterRequest() ); @@ -842,7 +844,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateClusterRequest() ); @@ -888,7 +890,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateClusterRequest() ); @@ -950,7 +952,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateClusterRequest() ); @@ -996,7 +998,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateClusterRequest() ); @@ -1032,7 +1034,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateNodePoolRequest() ); @@ -1083,7 +1085,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateNodePoolRequest() ); @@ -1150,7 +1152,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateNodePoolRequest() ); @@ -1201,7 +1203,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateNodePoolRequest() ); @@ -1242,7 +1244,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() ); @@ -1294,7 +1296,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() ); @@ -1361,7 +1363,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() ); @@ -1415,7 +1417,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolAutoscalingRequest() ); @@ -1459,7 +1461,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLoggingServiceRequest() ); @@ -1505,7 +1507,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLoggingServiceRequest() ); @@ -1567,7 +1569,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLoggingServiceRequest() ); @@ -1613,7 +1615,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLoggingServiceRequest() ); @@ -1649,7 +1651,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMonitoringServiceRequest() ); @@ -1696,7 +1698,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMonitoringServiceRequest() ); @@ -1758,7 +1760,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMonitoringServiceRequest() ); @@ -1804,7 +1806,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMonitoringServiceRequest() ); @@ -1840,7 +1842,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetAddonsConfigRequest() ); @@ -1886,7 +1888,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetAddonsConfigRequest() ); @@ -1948,7 +1950,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetAddonsConfigRequest() ); @@ -1994,7 +1996,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetAddonsConfigRequest() ); @@ -2031,7 +2033,7 @@ describe('v1beta1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLocationsRequest() ); @@ -2079,7 +2081,7 @@ describe('v1beta1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLocationsRequest() ); @@ -2143,7 +2145,7 @@ describe('v1beta1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLocationsRequest() ); @@ -2191,7 +2193,7 @@ describe('v1beta1.ClusterManagerClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLocationsRequest() ); @@ -2228,7 +2230,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateMasterRequest() ); @@ -2274,7 +2276,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateMasterRequest() ); @@ -2336,7 +2338,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateMasterRequest() ); @@ -2382,7 +2384,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.UpdateMasterRequest() ); @@ -2418,7 +2420,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMasterAuthRequest() ); @@ -2464,7 +2466,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMasterAuthRequest() ); @@ -2526,7 +2528,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMasterAuthRequest() ); @@ -2572,7 +2574,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMasterAuthRequest() ); @@ -2608,7 +2610,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteClusterRequest() ); @@ -2654,7 +2656,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteClusterRequest() ); @@ -2716,7 +2718,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteClusterRequest() ); @@ -2762,7 +2764,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteClusterRequest() ); @@ -2798,7 +2800,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListOperationsRequest() ); @@ -2839,7 +2841,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListOperationsRequest() ); @@ -2896,7 +2898,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListOperationsRequest() ); @@ -2937,7 +2939,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListOperationsRequest() ); @@ -2968,7 +2970,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetOperationRequest() ); @@ -3014,7 +3016,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetOperationRequest() ); @@ -3076,7 +3078,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetOperationRequest() ); @@ -3122,7 +3124,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetOperationRequest() ); @@ -3158,7 +3160,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CancelOperationRequest() ); @@ -3204,7 +3206,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CancelOperationRequest() ); @@ -3266,7 +3268,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CancelOperationRequest() ); @@ -3312,7 +3314,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CancelOperationRequest() ); @@ -3348,7 +3350,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetServerConfigRequest() ); @@ -3389,7 +3391,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetServerConfigRequest() ); @@ -3446,7 +3448,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetServerConfigRequest() ); @@ -3487,7 +3489,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetServerConfigRequest() ); @@ -3518,7 +3520,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetJSONWebKeysRequest() ); @@ -3549,7 +3551,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetJSONWebKeysRequest() ); @@ -3596,7 +3598,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetJSONWebKeysRequest() ); @@ -3627,7 +3629,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetJSONWebKeysRequest() ); @@ -3648,7 +3650,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListNodePoolsRequest() ); @@ -3694,7 +3696,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListNodePoolsRequest() ); @@ -3756,7 +3758,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListNodePoolsRequest() ); @@ -3802,7 +3804,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListNodePoolsRequest() ); @@ -3838,7 +3840,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetNodePoolRequest() ); @@ -3889,7 +3891,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetNodePoolRequest() ); @@ -3956,7 +3958,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetNodePoolRequest() ); @@ -4007,7 +4009,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.GetNodePoolRequest() ); @@ -4048,7 +4050,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateNodePoolRequest() ); @@ -4094,7 +4096,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateNodePoolRequest() ); @@ -4156,7 +4158,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateNodePoolRequest() ); @@ -4202,7 +4204,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CreateNodePoolRequest() ); @@ -4238,7 +4240,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteNodePoolRequest() ); @@ -4289,7 +4291,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteNodePoolRequest() ); @@ -4356,7 +4358,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteNodePoolRequest() ); @@ -4407,7 +4409,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.DeleteNodePoolRequest() ); @@ -4448,7 +4450,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() ); @@ -4480,7 +4482,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() ); @@ -4527,7 +4529,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() ); @@ -4561,7 +4563,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteNodePoolUpgradeRequest() ); @@ -4585,7 +4587,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() ); @@ -4637,7 +4639,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() ); @@ -4704,7 +4706,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() ); @@ -4758,7 +4760,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.RollbackNodePoolUpgradeRequest() ); @@ -4802,7 +4804,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolManagementRequest() ); @@ -4854,7 +4856,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolManagementRequest() ); @@ -4921,7 +4923,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolManagementRequest() ); @@ -4975,7 +4977,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolManagementRequest() ); @@ -5019,7 +5021,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLabelsRequest() ); @@ -5065,7 +5067,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLabelsRequest() ); @@ -5127,7 +5129,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLabelsRequest() ); @@ -5170,7 +5172,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLabelsRequest() ); @@ -5206,7 +5208,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLegacyAbacRequest() ); @@ -5252,7 +5254,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLegacyAbacRequest() ); @@ -5314,7 +5316,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLegacyAbacRequest() ); @@ -5360,7 +5362,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetLegacyAbacRequest() ); @@ -5396,7 +5398,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.StartIPRotationRequest() ); @@ -5442,7 +5444,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.StartIPRotationRequest() ); @@ -5504,7 +5506,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.StartIPRotationRequest() ); @@ -5550,7 +5552,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.StartIPRotationRequest() ); @@ -5586,7 +5588,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteIPRotationRequest() ); @@ -5633,7 +5635,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteIPRotationRequest() ); @@ -5695,7 +5697,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteIPRotationRequest() ); @@ -5741,7 +5743,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CompleteIPRotationRequest() ); @@ -5777,7 +5779,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolSizeRequest() ); @@ -5828,7 +5830,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolSizeRequest() ); @@ -5895,7 +5897,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolSizeRequest() ); @@ -5946,7 +5948,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNodePoolSizeRequest() ); @@ -5987,7 +5989,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNetworkPolicyRequest() ); @@ -6033,7 +6035,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNetworkPolicyRequest() ); @@ -6095,7 +6097,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNetworkPolicyRequest() ); @@ -6141,7 +6143,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetNetworkPolicyRequest() ); @@ -6177,7 +6179,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMaintenancePolicyRequest() ); @@ -6224,7 +6226,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMaintenancePolicyRequest() ); @@ -6286,7 +6288,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMaintenancePolicyRequest() ); @@ -6332,7 +6334,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.SetMaintenancePolicyRequest() ); @@ -6368,7 +6370,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() ); @@ -6400,7 +6402,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() ); @@ -6447,7 +6449,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() ); @@ -6481,7 +6483,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.CheckAutopilotCompatibilityRequest() ); @@ -6505,7 +6507,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListLocationsRequest() ); @@ -6536,7 +6538,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListLocationsRequest() ); @@ -6583,7 +6585,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListLocationsRequest() ); @@ -6614,7 +6616,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListLocationsRequest() ); @@ -6635,7 +6637,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListUsableSubnetworksRequest() ); @@ -6675,7 +6677,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListUsableSubnetworksRequest() ); @@ -6730,7 +6732,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListUsableSubnetworksRequest() ); @@ -6764,7 +6766,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListUsableSubnetworksRequest() ); @@ -6831,7 +6833,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListUsableSubnetworksRequest() ); @@ -6887,7 +6889,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListUsableSubnetworksRequest() ); @@ -6940,7 +6942,7 @@ describe('v1beta1.ClusterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.container.v1beta1.ListUsableSubnetworksRequest() ); diff --git a/packages/google-dataflow/package.json b/packages/google-dataflow/package.json index fd0fcda62ed..bc1f4a046c2 100644 --- a/packages/google-dataflow/package.json +++ b/packages/google-dataflow/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json index 18b21b3ad8c..a63c4903577 100644 --- a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json +++ b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataflow", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json index 18b21b3ad8c..a63c4903577 100644 --- a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json +++ b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataflow", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-dataflow/src/v1beta3/flex_templates_service_client.ts b/packages/google-dataflow/src/v1beta3/flex_templates_service_client.ts index d130a6fc99a..c1680ec616f 100644 --- a/packages/google-dataflow/src/v1beta3/flex_templates_service_client.ts +++ b/packages/google-dataflow/src/v1beta3/flex_templates_service_client.ts @@ -460,7 +460,9 @@ export class FlexTemplatesServiceClient { project_id: request.projectId ?? '', location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('launchFlexTemplate request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-dataflow/src/v1beta3/jobs_v1_beta3_client.ts b/packages/google-dataflow/src/v1beta3/jobs_v1_beta3_client.ts index f36dbaf3094..97199afa658 100644 --- a/packages/google-dataflow/src/v1beta3/jobs_v1_beta3_client.ts +++ b/packages/google-dataflow/src/v1beta3/jobs_v1_beta3_client.ts @@ -486,7 +486,9 @@ export class JobsV1Beta3Client { project_id: request.projectId ?? '', location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJob request %j', request); const wrappedCallback: | Callback< @@ -608,7 +610,9 @@ export class JobsV1Beta3Client { location: request.location ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJob request %j', request); const wrappedCallback: | Callback< @@ -731,7 +735,9 @@ export class JobsV1Beta3Client { location: request.location ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateJob request %j', request); const wrappedCallback: | Callback< @@ -835,7 +841,9 @@ export class JobsV1Beta3Client { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkActiveJobs request %j', request); const wrappedCallback: | Callback< @@ -955,7 +963,9 @@ export class JobsV1Beta3Client { location: request.location ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('snapshotJob request %j', request); const wrappedCallback: | Callback< @@ -1089,7 +1099,9 @@ export class JobsV1Beta3Client { project_id: request.projectId ?? '', location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.dataflow.v1beta3.IListJobsRequest, @@ -1165,7 +1177,9 @@ export class JobsV1Beta3Client { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs stream %j', request); return this.descriptors.page.listJobs.createStream( this.innerApiCalls.listJobs as GaxCall, @@ -1225,7 +1239,9 @@ export class JobsV1Beta3Client { }); const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobs iterate %j', request); return this.descriptors.page.listJobs.asyncIterate( this.innerApiCalls['listJobs'] as GaxCall, @@ -1331,7 +1347,9 @@ export class JobsV1Beta3Client { this._gaxModule.routingHeader.fromParams({ project_id: request.projectId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.dataflow.v1beta3.IListJobsRequest, @@ -1406,7 +1424,9 @@ export class JobsV1Beta3Client { }); const defaultCallSettings = this._defaults['aggregatedListJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedListJobs stream %j', request); return this.descriptors.page.aggregatedListJobs.createStream( this.innerApiCalls.aggregatedListJobs as GaxCall, @@ -1465,7 +1485,9 @@ export class JobsV1Beta3Client { }); const defaultCallSettings = this._defaults['aggregatedListJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('aggregatedListJobs iterate %j', request); return this.descriptors.page.aggregatedListJobs.asyncIterate( this.innerApiCalls['aggregatedListJobs'] as GaxCall, diff --git a/packages/google-dataflow/src/v1beta3/messages_v1_beta3_client.ts b/packages/google-dataflow/src/v1beta3/messages_v1_beta3_client.ts index f0932084913..17e292abdde 100644 --- a/packages/google-dataflow/src/v1beta3/messages_v1_beta3_client.ts +++ b/packages/google-dataflow/src/v1beta3/messages_v1_beta3_client.ts @@ -498,7 +498,9 @@ export class MessagesV1Beta3Client { location: request.location ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.dataflow.v1beta3.IListJobMessagesRequest, @@ -583,7 +585,9 @@ export class MessagesV1Beta3Client { }); const defaultCallSettings = this._defaults['listJobMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobMessages stream %j', request); return this.descriptors.page.listJobMessages.createStream( this.innerApiCalls.listJobMessages as GaxCall, @@ -650,7 +654,9 @@ export class MessagesV1Beta3Client { }); const defaultCallSettings = this._defaults['listJobMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobMessages iterate %j', request); return this.descriptors.page.listJobMessages.asyncIterate( this.innerApiCalls['listJobMessages'] as GaxCall, diff --git a/packages/google-dataflow/src/v1beta3/metrics_v1_beta3_client.ts b/packages/google-dataflow/src/v1beta3/metrics_v1_beta3_client.ts index fdf174970e1..d6ba030f322 100644 --- a/packages/google-dataflow/src/v1beta3/metrics_v1_beta3_client.ts +++ b/packages/google-dataflow/src/v1beta3/metrics_v1_beta3_client.ts @@ -484,7 +484,9 @@ export class MetricsV1Beta3Client { location: request.location ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJobMetrics request %j', request); const wrappedCallback: | Callback< @@ -616,7 +618,9 @@ export class MetricsV1Beta3Client { location: request.location ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.dataflow.v1beta3.IGetJobExecutionDetailsRequest, @@ -693,7 +697,9 @@ export class MetricsV1Beta3Client { }); const defaultCallSettings = this._defaults['getJobExecutionDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJobExecutionDetails stream %j', request); return this.descriptors.page.getJobExecutionDetails.createStream( this.innerApiCalls.getJobExecutionDetails as GaxCall, @@ -752,7 +758,9 @@ export class MetricsV1Beta3Client { }); const defaultCallSettings = this._defaults['getJobExecutionDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJobExecutionDetails iterate %j', request); return this.descriptors.page.getJobExecutionDetails.asyncIterate( this.innerApiCalls['getJobExecutionDetails'] as GaxCall, @@ -870,7 +878,9 @@ export class MetricsV1Beta3Client { job_id: request.jobId ?? '', stage_id: request.stageId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.dataflow.v1beta3.IGetStageExecutionDetailsRequest, @@ -954,7 +964,9 @@ export class MetricsV1Beta3Client { }); const defaultCallSettings = this._defaults['getStageExecutionDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStageExecutionDetails stream %j', request); return this.descriptors.page.getStageExecutionDetails.createStream( this.innerApiCalls.getStageExecutionDetails as GaxCall, @@ -1020,7 +1032,9 @@ export class MetricsV1Beta3Client { }); const defaultCallSettings = this._defaults['getStageExecutionDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStageExecutionDetails iterate %j', request); return this.descriptors.page.getStageExecutionDetails.asyncIterate( this.innerApiCalls['getStageExecutionDetails'] as GaxCall, diff --git a/packages/google-dataflow/src/v1beta3/snapshots_v1_beta3_client.ts b/packages/google-dataflow/src/v1beta3/snapshots_v1_beta3_client.ts index 5ec9f82faa8..59f2b1e7010 100644 --- a/packages/google-dataflow/src/v1beta3/snapshots_v1_beta3_client.ts +++ b/packages/google-dataflow/src/v1beta3/snapshots_v1_beta3_client.ts @@ -452,7 +452,9 @@ export class SnapshotsV1Beta3Client { location: request.location ?? '', snapshot_id: request.snapshotId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSnapshot request %j', request); const wrappedCallback: | Callback< @@ -566,7 +568,9 @@ export class SnapshotsV1Beta3Client { location: request.location ?? '', snapshot_id: request.snapshotId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSnapshot request %j', request); const wrappedCallback: | Callback< @@ -682,7 +686,9 @@ export class SnapshotsV1Beta3Client { location: request.location ?? '', job_id: request.jobId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSnapshots request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-dataflow/src/v1beta3/templates_service_client.ts b/packages/google-dataflow/src/v1beta3/templates_service_client.ts index 4baa733a0f8..1af0bb45d21 100644 --- a/packages/google-dataflow/src/v1beta3/templates_service_client.ts +++ b/packages/google-dataflow/src/v1beta3/templates_service_client.ts @@ -469,7 +469,9 @@ export class TemplatesServiceClient { project_id: request.projectId ?? '', location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createJobFromTemplate request %j', request); const wrappedCallback: | Callback< @@ -599,7 +601,9 @@ export class TemplatesServiceClient { project_id: request.projectId ?? '', location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('launchTemplate request %j', request); const wrappedCallback: | Callback< @@ -718,7 +722,9 @@ export class TemplatesServiceClient { project_id: request.projectId ?? '', location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTemplate request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-dataflow/test/gapic_flex_templates_service_v1beta3.ts b/packages/google-dataflow/test/gapic_flex_templates_service_v1beta3.ts index 3deb9c4f5a2..7109c8df10d 100644 --- a/packages/google-dataflow/test/gapic_flex_templates_service_v1beta3.ts +++ b/packages/google-dataflow/test/gapic_flex_templates_service_v1beta3.ts @@ -202,7 +202,9 @@ describe('v1beta3.FlexTemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.flexTemplatesServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta3.FlexTemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest() ); @@ -303,7 +305,7 @@ describe('v1beta3.FlexTemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest() ); @@ -356,7 +358,7 @@ describe('v1beta3.FlexTemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest() ); @@ -393,7 +395,7 @@ describe('v1beta3.FlexTemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest() ); diff --git a/packages/google-dataflow/test/gapic_jobs_v1_beta3_v1beta3.ts b/packages/google-dataflow/test/gapic_jobs_v1_beta3_v1beta3.ts index 7bbd13189a0..d95f76911bb 100644 --- a/packages/google-dataflow/test/gapic_jobs_v1_beta3_v1beta3.ts +++ b/packages/google-dataflow/test/gapic_jobs_v1_beta3_v1beta3.ts @@ -252,7 +252,9 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.jobsV1Beta3Stub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobRequest() ); @@ -347,7 +349,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobRequest() ); @@ -399,7 +401,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobRequest() ); @@ -432,7 +434,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobRequest() ); @@ -458,7 +460,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobRequest() ); @@ -499,7 +501,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobRequest() ); @@ -556,7 +558,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobRequest() ); @@ -594,7 +596,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobRequest() ); @@ -625,7 +627,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.UpdateJobRequest() ); @@ -666,7 +668,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.UpdateJobRequest() ); @@ -723,7 +725,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.UpdateJobRequest() ); @@ -761,7 +763,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.UpdateJobRequest() ); @@ -792,7 +794,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CheckActiveJobsRequest() ); @@ -809,7 +811,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CheckActiveJobsRequest() ); @@ -842,7 +844,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CheckActiveJobsRequest() ); @@ -859,7 +861,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CheckActiveJobsRequest() ); @@ -875,7 +877,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.SnapshotJobRequest() ); @@ -916,7 +918,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.SnapshotJobRequest() ); @@ -973,7 +975,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.SnapshotJobRequest() ); @@ -1014,7 +1016,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.SnapshotJobRequest() ); @@ -1045,7 +1047,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1083,7 +1085,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1137,7 +1139,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1170,7 +1172,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1226,7 +1228,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1279,7 +1281,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1326,7 +1328,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1374,7 +1376,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1408,7 +1410,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1457,7 +1459,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1488,7 +1490,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1539,7 +1541,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1585,7 +1587,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); @@ -1628,7 +1630,7 @@ describe('v1beta3.JobsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobsRequest() ); diff --git a/packages/google-dataflow/test/gapic_messages_v1_beta3_v1beta3.ts b/packages/google-dataflow/test/gapic_messages_v1_beta3_v1beta3.ts index 0415d0e0952..0799a9cf760 100644 --- a/packages/google-dataflow/test/gapic_messages_v1_beta3_v1beta3.ts +++ b/packages/google-dataflow/test/gapic_messages_v1_beta3_v1beta3.ts @@ -254,7 +254,9 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.messagesV1Beta3Stub); client.close().then(() => { done(); @@ -313,7 +315,7 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobMessagesRequest() ); @@ -356,7 +358,7 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobMessagesRequest() ); @@ -415,7 +417,7 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobMessagesRequest() ); @@ -456,7 +458,7 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobMessagesRequest() ); @@ -520,7 +522,7 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobMessagesRequest() ); @@ -579,7 +581,7 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobMessagesRequest() ); @@ -632,7 +634,7 @@ describe('v1beta3.MessagesV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListJobMessagesRequest() ); diff --git a/packages/google-dataflow/test/gapic_metrics_v1_beta3_v1beta3.ts b/packages/google-dataflow/test/gapic_metrics_v1_beta3_v1beta3.ts index a72b92cad3c..c71255e5473 100644 --- a/packages/google-dataflow/test/gapic_metrics_v1_beta3_v1beta3.ts +++ b/packages/google-dataflow/test/gapic_metrics_v1_beta3_v1beta3.ts @@ -253,7 +253,9 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.metricsV1Beta3Stub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobMetricsRequest() ); @@ -353,7 +355,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobMetricsRequest() ); @@ -410,7 +412,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobMetricsRequest() ); @@ -451,7 +453,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobMetricsRequest() ); @@ -482,7 +484,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobExecutionDetailsRequest() ); @@ -532,7 +534,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobExecutionDetailsRequest() ); @@ -597,7 +599,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobExecutionDetailsRequest() ); @@ -641,7 +643,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobExecutionDetailsRequest() ); @@ -717,7 +719,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobExecutionDetailsRequest() ); @@ -782,7 +784,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobExecutionDetailsRequest() ); @@ -845,7 +847,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetJobExecutionDetailsRequest() ); @@ -901,7 +903,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetStageExecutionDetailsRequest() ); @@ -956,7 +958,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetStageExecutionDetailsRequest() ); @@ -1026,7 +1028,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetStageExecutionDetailsRequest() ); @@ -1075,7 +1077,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetStageExecutionDetailsRequest() ); @@ -1156,7 +1158,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetStageExecutionDetailsRequest() ); @@ -1226,7 +1228,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetStageExecutionDetailsRequest() ); @@ -1294,7 +1296,7 @@ describe('v1beta3.MetricsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetStageExecutionDetailsRequest() ); diff --git a/packages/google-dataflow/test/gapic_snapshots_v1_beta3_v1beta3.ts b/packages/google-dataflow/test/gapic_snapshots_v1_beta3_v1beta3.ts index e0f95984c81..71070636b58 100644 --- a/packages/google-dataflow/test/gapic_snapshots_v1_beta3_v1beta3.ts +++ b/packages/google-dataflow/test/gapic_snapshots_v1_beta3_v1beta3.ts @@ -194,7 +194,9 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.snapshotsV1Beta3Stub); client.close().then(() => { done(); @@ -253,7 +255,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetSnapshotRequest() ); @@ -294,7 +296,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetSnapshotRequest() ); @@ -351,7 +353,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetSnapshotRequest() ); @@ -392,7 +394,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetSnapshotRequest() ); @@ -423,7 +425,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.DeleteSnapshotRequest() ); @@ -464,7 +466,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.DeleteSnapshotRequest() ); @@ -521,7 +523,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.DeleteSnapshotRequest() ); @@ -562,7 +564,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.DeleteSnapshotRequest() ); @@ -593,7 +595,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListSnapshotsRequest() ); @@ -634,7 +636,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListSnapshotsRequest() ); @@ -691,7 +693,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListSnapshotsRequest() ); @@ -732,7 +734,7 @@ describe('v1beta3.SnapshotsV1Beta3Client', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.ListSnapshotsRequest() ); diff --git a/packages/google-dataflow/test/gapic_templates_service_v1beta3.ts b/packages/google-dataflow/test/gapic_templates_service_v1beta3.ts index 1c27f8fb9c1..5d76985f52c 100644 --- a/packages/google-dataflow/test/gapic_templates_service_v1beta3.ts +++ b/packages/google-dataflow/test/gapic_templates_service_v1beta3.ts @@ -194,7 +194,9 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.templatesServiceStub); client.close().then(() => { done(); @@ -253,7 +255,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobFromTemplateRequest() ); @@ -290,7 +292,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobFromTemplateRequest() ); @@ -342,7 +344,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobFromTemplateRequest() ); @@ -381,7 +383,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.CreateJobFromTemplateRequest() ); @@ -410,7 +412,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchTemplateRequest() ); @@ -446,7 +448,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchTemplateRequest() ); @@ -498,7 +500,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchTemplateRequest() ); @@ -534,7 +536,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.LaunchTemplateRequest() ); @@ -560,7 +562,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetTemplateRequest() ); @@ -596,7 +598,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetTemplateRequest() ); @@ -648,7 +650,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetTemplateRequest() ); @@ -684,7 +686,7 @@ describe('v1beta3.TemplatesServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.dataflow.v1beta3.GetTemplateRequest() ); diff --git a/packages/google-devtools-artifactregistry/package.json b/packages/google-devtools-artifactregistry/package.json index d493906fba2..aa810a9bc52 100644 --- a/packages/google-devtools-artifactregistry/package.json +++ b/packages/google-devtools-artifactregistry/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json index a3def36aa6e..6aff0be06a4 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "3.5.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json index 6e7006dd106..de90ac9b0c9 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "3.5.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json index ef28d4363c1..d65dbf60e02 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "3.5.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json index ef28d4363c1..d65dbf60e02 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "3.5.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts index e48923561da..f599d2ca6f4 100644 --- a/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts +++ b/packages/google-devtools-artifactregistry/src/v1/artifact_registry_client.ts @@ -790,7 +790,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDockerImage request %j', request); const wrappedCallback: | Callback< @@ -915,7 +917,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMavenArtifact request %j', request); const wrappedCallback: | Callback< @@ -1040,7 +1044,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNpmPackage request %j', request); const wrappedCallback: | Callback< @@ -1165,7 +1171,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPythonPackage request %j', request); const wrappedCallback: | Callback< @@ -1290,7 +1298,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRepository request %j', request); const wrappedCallback: | Callback< @@ -1419,7 +1429,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'repository.name': request.repository!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRepository request %j', request); const wrappedCallback: | Callback< @@ -1538,7 +1550,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPackage request %j', request); const wrappedCallback: | Callback< @@ -1659,7 +1673,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -1788,7 +1804,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'version.name': request.version!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateVersion request %j', request); const wrappedCallback: | Callback< @@ -1907,7 +1925,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFile request %j', request); const wrappedCallback: | Callback< @@ -2030,7 +2050,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'file.name': request.file!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFile request %j', request); const wrappedCallback: | Callback< @@ -2149,7 +2171,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTag request %j', request); const wrappedCallback: | Callback< @@ -2269,7 +2293,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTag request %j', request); const wrappedCallback: | Callback< @@ -2392,7 +2418,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'tag.name': request.tag!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTag request %j', request); const wrappedCallback: | Callback< @@ -2511,7 +2539,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTag request %j', request); const wrappedCallback: | Callback< @@ -2634,7 +2664,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createRule request %j', request); const wrappedCallback: | Callback< @@ -2753,7 +2785,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRule request %j', request); const wrappedCallback: | Callback< @@ -2876,7 +2910,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'rule.name': request.rule!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRule request %j', request); const wrappedCallback: | Callback< @@ -2995,7 +3031,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRule request %j', request); const wrappedCallback: | Callback< @@ -3118,7 +3156,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -3228,7 +3268,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -3340,7 +3382,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -3460,7 +3504,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProjectSettings request %j', request); const wrappedCallback: | Callback< @@ -3587,7 +3633,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'project_settings.name': request.projectSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProjectSettings request %j', request); const wrappedCallback: | Callback< @@ -3712,7 +3760,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVPCSCConfig request %j', request); const wrappedCallback: | Callback< @@ -3839,7 +3889,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'vpcsc_config.name': request.vpcscConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateVPCSCConfig request %j', request); const wrappedCallback: | Callback< @@ -3968,7 +4020,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'package.name': request.package!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePackage request %j', request); const wrappedCallback: | Callback< @@ -4093,7 +4147,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttachment request %j', request); const wrappedCallback: | Callback< @@ -4230,7 +4286,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4402,7 +4460,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4575,7 +4635,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4744,7 +4806,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4912,7 +4976,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5083,7 +5149,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5256,7 +5324,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5425,7 +5495,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5598,7 +5670,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5767,7 +5841,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5932,7 +6008,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListDockerImagesRequest, @@ -6000,7 +6078,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listDockerImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDockerImages stream %j', request); return this.descriptors.page.listDockerImages.createStream( this.innerApiCalls.listDockerImages as GaxCall, @@ -6050,7 +6130,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listDockerImages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDockerImages iterate %j', request); return this.descriptors.page.listDockerImages.asyncIterate( this.innerApiCalls['listDockerImages'] as GaxCall, @@ -6153,7 +6235,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListMavenArtifactsRequest, @@ -6219,7 +6303,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listMavenArtifacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMavenArtifacts stream %j', request); return this.descriptors.page.listMavenArtifacts.createStream( this.innerApiCalls.listMavenArtifacts as GaxCall, @@ -6267,7 +6353,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listMavenArtifacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMavenArtifacts iterate %j', request); return this.descriptors.page.listMavenArtifacts.asyncIterate( this.innerApiCalls['listMavenArtifacts'] as GaxCall, @@ -6370,7 +6458,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListNpmPackagesRequest, @@ -6436,7 +6526,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listNpmPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNpmPackages stream %j', request); return this.descriptors.page.listNpmPackages.createStream( this.innerApiCalls.listNpmPackages as GaxCall, @@ -6484,7 +6576,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listNpmPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNpmPackages iterate %j', request); return this.descriptors.page.listNpmPackages.asyncIterate( this.innerApiCalls['listNpmPackages'] as GaxCall, @@ -6587,7 +6681,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListPythonPackagesRequest, @@ -6653,7 +6749,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listPythonPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPythonPackages stream %j', request); return this.descriptors.page.listPythonPackages.createStream( this.innerApiCalls.listPythonPackages as GaxCall, @@ -6701,7 +6799,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listPythonPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPythonPackages iterate %j', request); return this.descriptors.page.listPythonPackages.asyncIterate( this.innerApiCalls['listPythonPackages'] as GaxCall, @@ -6826,7 +6926,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListRepositoriesRequest, @@ -6914,7 +7016,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories stream %j', request); return this.descriptors.page.listRepositories.createStream( this.innerApiCalls.listRepositories as GaxCall, @@ -6984,7 +7088,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories iterate %j', request); return this.descriptors.page.listRepositories.asyncIterate( this.innerApiCalls['listRepositories'] as GaxCall, @@ -7134,7 +7240,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListPackagesRequest, @@ -7247,7 +7355,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPackages stream %j', request); return this.descriptors.page.listPackages.createStream( this.innerApiCalls.listPackages as GaxCall, @@ -7342,7 +7452,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPackages iterate %j', request); return this.descriptors.page.listPackages.asyncIterate( this.innerApiCalls['listPackages'] as GaxCall, @@ -7494,7 +7606,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListVersionsRequest, @@ -7609,7 +7723,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -7706,7 +7822,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, @@ -7862,7 +7980,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListFilesRequest, @@ -7981,7 +8101,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles stream %j', request); return this.descriptors.page.listFiles.createStream( this.innerApiCalls.listFiles as GaxCall, @@ -8082,7 +8204,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles iterate %j', request); return this.descriptors.page.listFiles.asyncIterate( this.innerApiCalls['listFiles'] as GaxCall, @@ -8214,7 +8338,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListTagsRequest, @@ -8309,7 +8435,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTags stream %j', request); return this.descriptors.page.listTags.createStream( this.innerApiCalls.listTags as GaxCall, @@ -8386,7 +8514,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTags iterate %j', request); return this.descriptors.page.listTags.asyncIterate( this.innerApiCalls['listTags'] as GaxCall, @@ -8490,7 +8620,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListRulesRequest, @@ -8557,7 +8689,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRules stream %j', request); return this.descriptors.page.listRules.createStream( this.innerApiCalls.listRules as GaxCall, @@ -8606,7 +8740,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listRules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRules iterate %j', request); return this.descriptors.page.listRules.asyncIterate( this.innerApiCalls['listRules'] as GaxCall, @@ -8715,7 +8851,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1.IListAttachmentsRequest, @@ -8787,7 +8925,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttachments stream %j', request); return this.descriptors.page.listAttachments.createStream( this.innerApiCalls.listAttachments as GaxCall, @@ -8841,7 +8981,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttachments iterate %j', request); return this.descriptors.page.listAttachments.asyncIterate( this.innerApiCalls['listAttachments'] as GaxCall, @@ -9021,7 +9163,7 @@ export class ArtifactRegistryClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts b/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts index d04b6d29203..3a192d1400b 100644 --- a/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts +++ b/packages/google-devtools-artifactregistry/src/v1beta2/artifact_registry_client.ts @@ -665,7 +665,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRepository request %j', request); const wrappedCallback: | Callback< @@ -794,7 +796,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'repository.name': request.repository!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRepository request %j', request); const wrappedCallback: | Callback< @@ -919,7 +923,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPackage request %j', request); const wrappedCallback: | Callback< @@ -1046,7 +1052,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -1171,7 +1179,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFile request %j', request); const wrappedCallback: | Callback< @@ -1296,7 +1306,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTag request %j', request); const wrappedCallback: | Callback< @@ -1425,7 +1437,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTag request %j', request); const wrappedCallback: | Callback< @@ -1554,7 +1568,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'tag.name': request.tag!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTag request %j', request); const wrappedCallback: | Callback< @@ -1679,7 +1695,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTag request %j', request); const wrappedCallback: | Callback< @@ -1802,7 +1820,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1912,7 +1932,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -2024,7 +2046,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -2144,7 +2168,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProjectSettings request %j', request); const wrappedCallback: | Callback< @@ -2271,7 +2297,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ 'project_settings.name': request.projectSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProjectSettings request %j', request); const wrappedCallback: | Callback< @@ -2408,7 +2436,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2580,7 +2610,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2752,7 +2784,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2921,7 +2955,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3089,7 +3125,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3260,7 +3298,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3422,7 +3462,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1beta2.IListRepositoriesRequest, @@ -3487,7 +3529,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories stream %j', request); return this.descriptors.page.listRepositories.createStream( this.innerApiCalls.listRepositories as GaxCall, @@ -3534,7 +3578,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories iterate %j', request); return this.descriptors.page.listRepositories.asyncIterate( this.innerApiCalls['listRepositories'] as GaxCall, @@ -3637,7 +3683,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1beta2.IListPackagesRequest, @@ -3703,7 +3751,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPackages stream %j', request); return this.descriptors.page.listPackages.createStream( this.innerApiCalls.listPackages as GaxCall, @@ -3751,7 +3801,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listPackages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPackages iterate %j', request); return this.descriptors.page.listPackages.asyncIterate( this.innerApiCalls['listPackages'] as GaxCall, @@ -3857,7 +3909,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1beta2.IListVersionsRequest, @@ -3926,7 +3980,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -3977,7 +4033,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, @@ -4093,7 +4151,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1beta2.IListFilesRequest, @@ -4172,7 +4232,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles stream %j', request); return this.descriptors.page.listFiles.createStream( this.innerApiCalls.listFiles as GaxCall, @@ -4233,7 +4295,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listFiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFiles iterate %j', request); return this.descriptors.page.listFiles.asyncIterate( this.innerApiCalls['listFiles'] as GaxCall, @@ -4345,7 +4409,9 @@ export class ArtifactRegistryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.artifactregistry.v1beta2.IListTagsRequest, @@ -4420,7 +4486,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTags stream %j', request); return this.descriptors.page.listTags.createStream( this.innerApiCalls.listTags as GaxCall, @@ -4477,7 +4545,9 @@ export class ArtifactRegistryClient { }); const defaultCallSettings = this._defaults['listTags']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTags iterate %j', request); return this.descriptors.page.listTags.asyncIterate( this.innerApiCalls['listTags'] as GaxCall, diff --git a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts index 01fb6d24ed9..5a3044f8e3e 100644 --- a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts +++ b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1.ts @@ -292,7 +292,9 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.artifactRegistryStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() ); @@ -382,7 +384,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() ); @@ -429,7 +431,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() ); @@ -460,7 +462,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetDockerImageRequest() ); @@ -481,7 +483,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() ); @@ -512,7 +514,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() ); @@ -559,7 +561,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() ); @@ -590,7 +592,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetMavenArtifactRequest() ); @@ -611,7 +613,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() ); @@ -642,7 +644,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() ); @@ -689,7 +691,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() ); @@ -720,7 +722,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetNpmPackageRequest() ); @@ -741,7 +743,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() ); @@ -772,7 +774,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() ); @@ -819,7 +821,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() ); @@ -850,7 +852,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPythonPackageRequest() ); @@ -871,7 +873,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() ); @@ -902,7 +904,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() ); @@ -949,7 +951,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() ); @@ -980,7 +982,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRepositoryRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); @@ -1113,7 +1115,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRepositoryRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPackageRequest() ); @@ -1166,7 +1168,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPackageRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPackageRequest() ); @@ -1244,7 +1246,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetPackageRequest() ); @@ -1265,7 +1267,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVersionRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVersionRequest() ); @@ -1343,7 +1345,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVersionRequest() ); @@ -1374,7 +1376,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVersionRequest() ); @@ -1395,7 +1397,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() ); @@ -1427,7 +1429,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() ); @@ -1475,7 +1477,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() ); @@ -1507,7 +1509,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVersionRequest() ); @@ -1529,7 +1531,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetFileRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetFileRequest() ); @@ -1607,7 +1609,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetFileRequest() ); @@ -1635,7 +1637,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetFileRequest() ); @@ -1656,7 +1658,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() ); @@ -1688,7 +1690,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() ); @@ -1736,7 +1738,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() ); @@ -1768,7 +1770,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateFileRequest() ); @@ -1790,7 +1792,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetTagRequest() ); @@ -1821,7 +1823,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetTagRequest() ); @@ -1868,7 +1870,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetTagRequest() ); @@ -1896,7 +1898,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetTagRequest() ); @@ -1917,7 +1919,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateTagRequest() ); @@ -1948,7 +1950,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateTagRequest() ); @@ -1995,7 +1997,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateTagRequest() ); @@ -2023,7 +2025,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateTagRequest() ); @@ -2044,7 +2046,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() ); @@ -2076,7 +2078,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() ); @@ -2124,7 +2126,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() ); @@ -2153,7 +2155,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateTagRequest() ); @@ -2175,7 +2177,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() ); @@ -2206,7 +2208,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() ); @@ -2253,7 +2255,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() ); @@ -2281,7 +2283,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteTagRequest() ); @@ -2302,7 +2304,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() ); @@ -2333,7 +2335,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() ); @@ -2380,7 +2382,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() ); @@ -2411,7 +2413,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRuleRequest() ); @@ -2432,7 +2434,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRuleRequest() ); @@ -2463,7 +2465,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRuleRequest() ); @@ -2510,7 +2512,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRuleRequest() ); @@ -2538,7 +2540,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetRuleRequest() ); @@ -2559,7 +2561,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() ); @@ -2591,7 +2593,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() ); @@ -2639,7 +2641,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() ); @@ -2671,7 +2673,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateRuleRequest() ); @@ -2693,7 +2695,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() ); @@ -2724,7 +2726,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() ); @@ -2771,7 +2773,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() ); @@ -2802,7 +2804,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRuleRequest() ); @@ -2823,7 +2825,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2854,7 +2856,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2901,7 +2903,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2932,7 +2934,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -2953,7 +2955,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -2984,7 +2986,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -3031,7 +3033,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -3062,7 +3064,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -3083,7 +3085,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3115,7 +3117,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3162,7 +3164,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3193,7 +3195,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3214,7 +3216,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() ); @@ -3246,7 +3248,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() ); @@ -3293,7 +3295,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() ); @@ -3324,7 +3326,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetProjectSettingsRequest() ); @@ -3345,7 +3347,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() ); @@ -3378,7 +3380,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() ); @@ -3426,7 +3428,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() ); @@ -3461,7 +3463,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateProjectSettingsRequest() ); @@ -3486,7 +3488,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() ); @@ -3517,7 +3519,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() ); @@ -3564,7 +3566,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() ); @@ -3595,7 +3597,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetVPCSCConfigRequest() ); @@ -3616,7 +3618,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() ); @@ -3648,7 +3650,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() ); @@ -3696,7 +3698,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() ); @@ -3728,7 +3730,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdateVPCSCConfigRequest() ); @@ -3750,7 +3752,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() ); @@ -3782,7 +3784,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() ); @@ -3830,7 +3832,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() ); @@ -3862,7 +3864,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.UpdatePackageRequest() ); @@ -3884,7 +3886,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() ); @@ -3915,7 +3917,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() ); @@ -3962,7 +3964,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() ); @@ -3993,7 +3995,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.GetAttachmentRequest() ); @@ -4014,7 +4016,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() ); @@ -4047,7 +4049,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() ); @@ -4101,7 +4103,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() ); @@ -4132,7 +4134,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportAptArtifactsRequest() ); @@ -4165,7 +4167,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4187,7 +4189,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4208,7 +4210,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() ); @@ -4241,7 +4243,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() ); @@ -4295,7 +4297,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() ); @@ -4326,7 +4328,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ImportYumArtifactsRequest() ); @@ -4359,7 +4361,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4381,7 +4383,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4402,7 +4404,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() ); @@ -4435,7 +4437,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() ); @@ -4489,7 +4491,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() ); @@ -4520,7 +4522,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateRepositoryRequest() ); @@ -4553,7 +4555,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4575,7 +4577,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4596,7 +4598,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() ); @@ -4629,7 +4631,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() ); @@ -4683,7 +4685,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() ); @@ -4714,7 +4716,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteRepositoryRequest() ); @@ -4747,7 +4749,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4769,7 +4771,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4790,7 +4792,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() ); @@ -4823,7 +4825,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() ); @@ -4877,7 +4879,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() ); @@ -4908,7 +4910,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeletePackageRequest() ); @@ -4941,7 +4943,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4963,7 +4965,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4984,7 +4986,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() ); @@ -5017,7 +5019,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() ); @@ -5071,7 +5073,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() ); @@ -5102,7 +5104,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteVersionRequest() ); @@ -5135,7 +5137,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5157,7 +5159,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5178,7 +5180,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() ); @@ -5211,7 +5213,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() ); @@ -5265,7 +5267,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() ); @@ -5296,7 +5298,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest() ); @@ -5329,7 +5331,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5351,7 +5353,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5372,7 +5374,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() ); @@ -5404,7 +5406,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() ); @@ -5458,7 +5460,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() ); @@ -5489,7 +5491,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteFileRequest() ); @@ -5522,7 +5524,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5544,7 +5546,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5562,7 +5564,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() ); @@ -5595,7 +5597,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() ); @@ -5649,7 +5651,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() ); @@ -5680,7 +5682,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.CreateAttachmentRequest() ); @@ -5713,7 +5715,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5735,7 +5737,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5756,7 +5758,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() ); @@ -5789,7 +5791,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() ); @@ -5843,7 +5845,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() ); @@ -5874,7 +5876,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.DeleteAttachmentRequest() ); @@ -5907,7 +5909,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5929,7 +5931,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5950,7 +5952,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() ); @@ -5989,7 +5991,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() ); @@ -6046,7 +6048,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() ); @@ -6077,7 +6079,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() ); @@ -6140,7 +6142,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() ); @@ -6192,7 +6194,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() ); @@ -6242,7 +6244,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListDockerImagesRequest() ); @@ -6285,7 +6287,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() ); @@ -6325,7 +6327,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() ); @@ -6382,7 +6384,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() ); @@ -6413,7 +6415,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() ); @@ -6476,7 +6478,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() ); @@ -6528,7 +6530,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() ); @@ -6578,7 +6580,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListMavenArtifactsRequest() ); @@ -6621,7 +6623,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() ); @@ -6660,7 +6662,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() ); @@ -6717,7 +6719,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() ); @@ -6748,7 +6750,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() ); @@ -6809,7 +6811,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() ); @@ -6859,7 +6861,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() ); @@ -6909,7 +6911,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListNpmPackagesRequest() ); @@ -6952,7 +6954,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() ); @@ -6992,7 +6994,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() ); @@ -7049,7 +7051,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() ); @@ -7080,7 +7082,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() ); @@ -7143,7 +7145,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() ); @@ -7195,7 +7197,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() ); @@ -7245,7 +7247,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPythonPackagesRequest() ); @@ -7288,7 +7290,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() ); @@ -7327,7 +7329,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() ); @@ -7384,7 +7386,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() ); @@ -7415,7 +7417,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() ); @@ -7476,7 +7478,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() ); @@ -7526,7 +7528,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() ); @@ -7576,7 +7578,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRepositoriesRequest() ); @@ -7619,7 +7621,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() ); @@ -7658,7 +7660,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() ); @@ -7715,7 +7717,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() ); @@ -7746,7 +7748,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() ); @@ -7807,7 +7809,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() ); @@ -7859,7 +7861,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() ); @@ -7909,7 +7911,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListPackagesRequest() ); @@ -7952,7 +7954,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() ); @@ -7991,7 +7993,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() ); @@ -8048,7 +8050,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() ); @@ -8079,7 +8081,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() ); @@ -8140,7 +8142,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() ); @@ -8192,7 +8194,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() ); @@ -8242,7 +8244,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListVersionsRequest() ); @@ -8285,7 +8287,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); @@ -8324,7 +8326,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); @@ -8379,7 +8381,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); @@ -8407,7 +8409,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); @@ -8467,7 +8469,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); @@ -8518,7 +8520,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); @@ -8566,7 +8568,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListFilesRequest() ); @@ -8610,7 +8612,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); @@ -8649,7 +8651,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); @@ -8704,7 +8706,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); @@ -8732,7 +8734,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); @@ -8792,7 +8794,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); @@ -8843,7 +8845,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); @@ -8891,7 +8893,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListTagsRequest() ); @@ -8934,7 +8936,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRulesRequest() ); @@ -8973,7 +8975,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRulesRequest() ); @@ -9028,7 +9030,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRulesRequest() ); @@ -9056,7 +9058,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRulesRequest() ); @@ -9116,7 +9118,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRulesRequest() ); @@ -9167,7 +9169,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRulesRequest() ); @@ -9215,7 +9217,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListRulesRequest() ); @@ -9259,7 +9261,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() ); @@ -9298,7 +9300,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() ); @@ -9355,7 +9357,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() ); @@ -9386,7 +9388,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() ); @@ -9447,7 +9449,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() ); @@ -9497,7 +9499,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() ); @@ -9547,7 +9549,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1.ListAttachmentsRequest() ); @@ -9589,7 +9591,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9619,7 +9621,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9663,7 +9665,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9698,7 +9700,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9746,7 +9748,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9787,7 +9789,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -9866,7 +9868,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -9946,7 +9948,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -10042,8 +10044,7 @@ describe('v1.ArtifactRegistryClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -10062,7 +10063,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -10071,8 +10072,7 @@ describe('v1.ArtifactRegistryClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -10088,7 +10088,7 @@ describe('v1.ArtifactRegistryClient', () => { }); describe('Path templates', () => { - describe('aptArtifact', () => { + describe('aptArtifact', async () => { const fakePath = '/rendered/path/aptArtifact'; const expectedParameters = { project: 'projectValue', @@ -10100,7 +10100,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aptArtifactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10164,7 +10164,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('attachment', () => { + describe('attachment', async () => { const fakePath = '/rendered/path/attachment'; const expectedParameters = { project: 'projectValue', @@ -10176,7 +10176,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10240,7 +10240,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('dockerImage', () => { + describe('dockerImage', async () => { const fakePath = '/rendered/path/dockerImage'; const expectedParameters = { project: 'projectValue', @@ -10252,7 +10252,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dockerImagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10316,7 +10316,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { project: 'projectValue', @@ -10328,7 +10328,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10392,7 +10392,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('genericArtifact', () => { + describe('genericArtifact', async () => { const fakePath = '/rendered/path/genericArtifact'; const expectedParameters = { project: 'projectValue', @@ -10404,7 +10404,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.genericArtifactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10469,7 +10469,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('mavenArtifact', () => { + describe('mavenArtifact', async () => { const fakePath = '/rendered/path/mavenArtifact'; const expectedParameters = { project: 'projectValue', @@ -10481,7 +10481,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.mavenArtifactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10545,7 +10545,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('npmPackage', () => { + describe('npmPackage', async () => { const fakePath = '/rendered/path/npmPackage'; const expectedParameters = { project: 'projectValue', @@ -10557,7 +10557,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.npmPackagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10621,7 +10621,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('package', () => { + describe('package', async () => { const fakePath = '/rendered/path/package'; const expectedParameters = { project: 'projectValue', @@ -10633,7 +10633,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.packagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10697,7 +10697,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('projectSettings', () => { + describe('projectSettings', async () => { const fakePath = '/rendered/path/projectSettings'; const expectedParameters = { project: 'projectValue', @@ -10706,7 +10706,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10735,7 +10735,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('pythonPackage', () => { + describe('pythonPackage', async () => { const fakePath = '/rendered/path/pythonPackage'; const expectedParameters = { project: 'projectValue', @@ -10747,7 +10747,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pythonPackagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10811,7 +10811,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -10822,7 +10822,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10875,7 +10875,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('rule', () => { + describe('rule', async () => { const fakePath = '/rendered/path/rule'; const expectedParameters = { project: 'projectValue', @@ -10887,7 +10887,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10951,7 +10951,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('tag', () => { + describe('tag', async () => { const fakePath = '/rendered/path/tag'; const expectedParameters = { project: 'projectValue', @@ -10964,7 +10964,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11039,7 +11039,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -11052,7 +11052,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11127,7 +11127,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('vpcscConfig', () => { + describe('vpcscConfig', async () => { const fakePath = '/rendered/path/vpcscConfig'; const expectedParameters = { project: 'projectValue', @@ -11137,7 +11137,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vpcscConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -11176,7 +11176,7 @@ describe('v1.ArtifactRegistryClient', () => { }); }); - describe('yumArtifact', () => { + describe('yumArtifact', async () => { const fakePath = '/rendered/path/yumArtifact'; const expectedParameters = { project: 'projectValue', @@ -11188,7 +11188,7 @@ describe('v1.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.yumArtifactPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts index f7226cf4e01..24d682296d5 100644 --- a/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts +++ b/packages/google-devtools-artifactregistry/test/gapic_artifact_registry_v1beta2.ts @@ -297,7 +297,9 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.artifactRegistryStub); client.close().then(() => { done(); @@ -356,7 +358,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() ); @@ -387,7 +389,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() ); @@ -434,7 +436,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() ); @@ -465,7 +467,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest() ); @@ -486,7 +488,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() ); @@ -518,7 +520,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() ); @@ -566,7 +568,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() ); @@ -598,7 +600,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest() ); @@ -620,7 +622,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() ); @@ -651,7 +653,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() ); @@ -698,7 +700,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() ); @@ -729,7 +731,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetPackageRequest() ); @@ -750,7 +752,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() ); @@ -781,7 +783,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() ); @@ -828,7 +830,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() ); @@ -859,7 +861,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetVersionRequest() ); @@ -880,7 +882,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() ); @@ -911,7 +913,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() ); @@ -958,7 +960,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() ); @@ -986,7 +988,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetFileRequest() ); @@ -1007,7 +1009,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() ); @@ -1038,7 +1040,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() ); @@ -1085,7 +1087,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() ); @@ -1113,7 +1115,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetTagRequest() ); @@ -1134,7 +1136,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() ); @@ -1165,7 +1167,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() ); @@ -1212,7 +1214,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() ); @@ -1240,7 +1242,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateTagRequest() ); @@ -1261,7 +1263,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() ); @@ -1293,7 +1295,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() ); @@ -1341,7 +1343,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() ); @@ -1370,7 +1372,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateTagRequest() ); @@ -1392,7 +1394,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() ); @@ -1423,7 +1425,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() ); @@ -1470,7 +1472,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() ); @@ -1498,7 +1500,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteTagRequest() ); @@ -1519,7 +1521,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1550,7 +1552,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1597,7 +1599,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1628,7 +1630,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1649,7 +1651,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1680,7 +1682,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1727,7 +1729,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1758,7 +1760,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1779,7 +1781,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1811,7 +1813,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1858,7 +1860,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1889,7 +1891,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1910,7 +1912,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() ); @@ -1942,7 +1944,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() ); @@ -1989,7 +1991,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() ); @@ -2020,7 +2022,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest() ); @@ -2041,7 +2043,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() ); @@ -2074,7 +2076,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() ); @@ -2122,7 +2124,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() ); @@ -2157,7 +2159,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest() ); @@ -2182,7 +2184,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() ); @@ -2215,7 +2217,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() ); @@ -2269,7 +2271,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() ); @@ -2300,7 +2302,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest() ); @@ -2333,7 +2335,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2355,7 +2357,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2376,7 +2378,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() ); @@ -2409,7 +2411,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() ); @@ -2463,7 +2465,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() ); @@ -2494,7 +2496,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest() ); @@ -2527,7 +2529,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2549,7 +2551,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2570,7 +2572,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() ); @@ -2603,7 +2605,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() ); @@ -2657,7 +2659,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() ); @@ -2688,7 +2690,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest() ); @@ -2721,7 +2723,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2743,7 +2745,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2764,7 +2766,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() ); @@ -2797,7 +2799,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() ); @@ -2851,7 +2853,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() ); @@ -2882,7 +2884,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest() ); @@ -2915,7 +2917,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2937,7 +2939,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2958,7 +2960,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() ); @@ -2991,7 +2993,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() ); @@ -3045,7 +3047,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() ); @@ -3076,7 +3078,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeletePackageRequest() ); @@ -3109,7 +3111,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3131,7 +3133,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3152,7 +3154,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() ); @@ -3185,7 +3187,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() ); @@ -3239,7 +3241,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() ); @@ -3270,7 +3272,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.DeleteVersionRequest() ); @@ -3303,7 +3305,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3325,7 +3327,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3346,7 +3348,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() ); @@ -3385,7 +3387,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() ); @@ -3442,7 +3444,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() ); @@ -3473,7 +3475,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() ); @@ -3536,7 +3538,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() ); @@ -3588,7 +3590,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() ); @@ -3638,7 +3640,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest() ); @@ -3681,7 +3683,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() ); @@ -3720,7 +3722,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() ); @@ -3777,7 +3779,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() ); @@ -3808,7 +3810,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() ); @@ -3871,7 +3873,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() ); @@ -3925,7 +3927,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() ); @@ -3975,7 +3977,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListPackagesRequest() ); @@ -4018,7 +4020,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() ); @@ -4057,7 +4059,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() ); @@ -4114,7 +4116,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() ); @@ -4145,7 +4147,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() ); @@ -4208,7 +4210,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() ); @@ -4262,7 +4264,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() ); @@ -4312,7 +4314,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListVersionsRequest() ); @@ -4355,7 +4357,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() ); @@ -4394,7 +4396,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() ); @@ -4451,7 +4453,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() ); @@ -4479,7 +4481,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() ); @@ -4540,7 +4542,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() ); @@ -4592,7 +4594,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() ); @@ -4641,7 +4643,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListFilesRequest() ); @@ -4685,7 +4687,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() ); @@ -4724,7 +4726,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() ); @@ -4781,7 +4783,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() ); @@ -4809,7 +4811,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() ); @@ -4870,7 +4872,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() ); @@ -4922,7 +4924,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() ); @@ -4971,7 +4973,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.artifactregistry.v1beta2.ListTagsRequest() ); @@ -5014,7 +5016,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5044,7 +5046,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5088,7 +5090,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5123,7 +5125,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5171,7 +5173,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5208,7 +5210,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); describe('Path templates', () => { - describe('aptArtifact', () => { + describe('aptArtifact', async () => { const fakePath = '/rendered/path/aptArtifact'; const expectedParameters = { project: 'projectValue', @@ -5220,7 +5222,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aptArtifactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5284,7 +5286,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); }); - describe('file', () => { + describe('file', async () => { const fakePath = '/rendered/path/file'; const expectedParameters = { project: 'projectValue', @@ -5296,7 +5298,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.filePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5360,7 +5362,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); }); - describe('projectSettings', () => { + describe('projectSettings', async () => { const fakePath = '/rendered/path/projectSettings'; const expectedParameters = { project: 'projectValue', @@ -5369,7 +5371,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5398,7 +5400,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -5409,7 +5411,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5462,7 +5464,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); }); - describe('tag', () => { + describe('tag', async () => { const fakePath = '/rendered/path/tag'; const expectedParameters = { project: 'projectValue', @@ -5475,7 +5477,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tagPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5550,7 +5552,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -5563,7 +5565,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5638,7 +5640,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { }); }); - describe('yumArtifact', () => { + describe('yumArtifact', async () => { const fakePath = '/rendered/path/yumArtifact'; const expectedParameters = { project: 'projectValue', @@ -5650,7 +5652,7 @@ describe('v1beta2.ArtifactRegistryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.yumArtifactPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 2cfbe4edef8..56736f0ef60 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -66,7 +66,7 @@ "node": ">=18" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-devtools-cloudbuild" } diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 24001518c68..7b68dd36fec 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.8.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json index 222d91d1f4e..0e29335333e 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.8.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json index f184ef691d5..db252b43a45 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.8.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json index f184ef691d5..db252b43a45 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.8.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index c8c7cc645b6..c4521949147 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -685,7 +685,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBuild request %j', request); const wrappedCallback: | Callback< @@ -819,7 +821,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelBuild request %j', request); const wrappedCallback: | Callback< @@ -959,7 +963,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createBuildTrigger request %j', request); const wrappedCallback: | Callback< @@ -1098,7 +1104,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBuildTrigger request %j', request); const wrappedCallback: | Callback< @@ -1243,7 +1251,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteBuildTrigger request %j', request); const wrappedCallback: | Callback< @@ -1391,7 +1401,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateBuildTrigger request %j', request); const wrappedCallback: | Callback< @@ -1528,7 +1540,9 @@ export class CloudBuildClient { trigger: request.trigger ?? '', name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('receiveTriggerWebhook request %j', request); const wrappedCallback: | Callback< @@ -1663,7 +1677,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWorkerPool request %j', request); const wrappedCallback: | Callback< @@ -1815,7 +1831,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2026,7 +2044,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2214,7 +2234,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2408,7 +2430,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2598,7 +2622,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2791,7 +2817,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2981,7 +3009,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3170,7 +3200,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.cloudbuild.v1.IListBuildsRequest, @@ -3259,7 +3291,9 @@ export class CloudBuildClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listBuilds']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBuilds stream %j', request); return this.descriptors.page.listBuilds.createStream( this.innerApiCalls.listBuilds as GaxCall, @@ -3330,7 +3364,9 @@ export class CloudBuildClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listBuilds']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBuilds iterate %j', request); return this.descriptors.page.listBuilds.asyncIterate( this.innerApiCalls['listBuilds'] as GaxCall, @@ -3448,7 +3484,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, @@ -3527,7 +3565,9 @@ export class CloudBuildClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listBuildTriggers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBuildTriggers stream %j', request); return this.descriptors.page.listBuildTriggers.createStream( this.innerApiCalls.listBuildTriggers as GaxCall, @@ -3588,7 +3628,9 @@ export class CloudBuildClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listBuildTriggers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBuildTriggers iterate %j', request); return this.descriptors.page.listBuildTriggers.asyncIterate( this.innerApiCalls['listBuildTriggers'] as GaxCall, @@ -3704,7 +3746,9 @@ export class CloudBuildClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, @@ -3783,7 +3827,9 @@ export class CloudBuildClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listWorkerPools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkerPools stream %j', request); return this.descriptors.page.listWorkerPools.createStream( this.innerApiCalls.listWorkerPools as GaxCall, @@ -3844,7 +3890,9 @@ export class CloudBuildClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listWorkerPools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkerPools iterate %j', request); return this.descriptors.page.listWorkerPools.asyncIterate( this.innerApiCalls['listWorkerPools'] as GaxCall, diff --git a/packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts b/packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts index 63f1bdb98e6..d9fe95ae9e8 100644 --- a/packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts +++ b/packages/google-devtools-cloudbuild/src/v2/repository_manager_client.ts @@ -640,7 +640,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnection request %j', request); const wrappedCallback: | Callback< @@ -760,7 +762,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRepository request %j', request); const wrappedCallback: | Callback< @@ -886,7 +890,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ repository: request.repository ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchReadWriteToken request %j', request); const wrappedCallback: | Callback< @@ -1006,7 +1012,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ repository: request.repository ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchReadToken request %j', request); const wrappedCallback: | Callback< @@ -1128,7 +1136,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ repository: request.repository ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchGitRefs request %j', request); const wrappedCallback: | Callback< @@ -1265,7 +1275,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1444,7 +1456,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ 'connection.name': request.connection!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1618,7 +1632,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1794,7 +1810,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1966,7 +1984,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2140,7 +2160,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2303,7 +2325,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, @@ -2369,7 +2393,9 @@ export class RepositoryManagerClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections stream %j', request); return this.descriptors.page.listConnections.createStream( this.innerApiCalls.listConnections as GaxCall, @@ -2417,7 +2443,9 @@ export class RepositoryManagerClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections iterate %j', request); return this.descriptors.page.listConnections.asyncIterate( this.innerApiCalls['listConnections'] as GaxCall, @@ -2525,7 +2553,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, @@ -2596,7 +2626,9 @@ export class RepositoryManagerClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories stream %j', request); return this.descriptors.page.listRepositories.createStream( this.innerApiCalls.listRepositories as GaxCall, @@ -2649,7 +2681,9 @@ export class RepositoryManagerClient { }); const defaultCallSettings = this._defaults['listRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRepositories iterate %j', request); return this.descriptors.page.listRepositories.asyncIterate( this.innerApiCalls['listRepositories'] as GaxCall, @@ -2753,7 +2787,9 @@ export class RepositoryManagerClient { this._gaxModule.routingHeader.fromParams({ connection: request.connection ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, @@ -2819,7 +2855,9 @@ export class RepositoryManagerClient { }); const defaultCallSettings = this._defaults['fetchLinkableRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchLinkableRepositories stream %j', request); return this.descriptors.page.fetchLinkableRepositories.createStream( this.innerApiCalls.fetchLinkableRepositories as GaxCall, @@ -2867,7 +2905,9 @@ export class RepositoryManagerClient { }); const defaultCallSettings = this._defaults['fetchLinkableRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchLinkableRepositories iterate %j', request); return this.descriptors.page.fetchLinkableRepositories.asyncIterate( this.innerApiCalls['fetchLinkableRepositories'] as GaxCall, @@ -3185,7 +3225,7 @@ export class RepositoryManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 1e42481af28..a69bc4c62ab 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -282,7 +282,9 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudBuildStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); @@ -369,7 +371,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); @@ -413,7 +415,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); @@ -438,7 +440,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); @@ -456,7 +458,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); @@ -484,7 +486,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); @@ -528,7 +530,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); @@ -556,7 +558,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); @@ -574,7 +576,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); @@ -603,7 +605,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); @@ -647,7 +649,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); @@ -675,7 +677,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); @@ -693,7 +695,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); @@ -721,7 +723,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); @@ -765,7 +767,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); @@ -793,7 +795,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); @@ -811,7 +813,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); @@ -840,7 +842,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); @@ -884,7 +886,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); @@ -912,7 +914,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); @@ -930,7 +932,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); @@ -961,7 +963,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); @@ -1007,7 +1009,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); @@ -1037,7 +1039,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); @@ -1057,7 +1059,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); @@ -1156,7 +1158,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); @@ -1234,7 +1236,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); @@ -1334,7 +1336,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); @@ -1352,7 +1354,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); @@ -1381,7 +1383,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); @@ -1432,7 +1434,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); @@ -1490,7 +1492,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1512,7 +1514,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1530,7 +1532,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); @@ -1559,7 +1561,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); @@ -1610,7 +1612,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); @@ -1638,7 +1640,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); @@ -1668,7 +1670,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1690,7 +1692,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1708,7 +1710,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); @@ -1737,7 +1739,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); @@ -1788,7 +1790,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); @@ -1816,7 +1818,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); @@ -1846,7 +1848,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1868,7 +1870,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1886,7 +1888,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); @@ -1916,7 +1918,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); @@ -1967,7 +1969,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); @@ -1995,7 +1997,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); @@ -2025,7 +2027,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2047,7 +2049,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2068,7 +2070,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); @@ -2098,7 +2100,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); @@ -2149,7 +2151,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); @@ -2177,7 +2179,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); @@ -2207,7 +2209,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2229,7 +2231,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2250,7 +2252,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); @@ -2280,7 +2282,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); @@ -2331,7 +2333,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); @@ -2359,7 +2361,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); @@ -2389,7 +2391,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2411,7 +2413,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2432,7 +2434,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); @@ -2464,7 +2466,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); @@ -2517,7 +2519,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); @@ -2547,7 +2549,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); @@ -2579,7 +2581,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2601,7 +2603,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2622,7 +2624,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); @@ -2652,7 +2654,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); @@ -2698,7 +2700,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); @@ -2726,7 +2728,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); @@ -2777,7 +2779,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); @@ -2825,7 +2827,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); @@ -2865,7 +2867,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); @@ -2906,7 +2908,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); @@ -2942,7 +2944,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); @@ -2994,7 +2996,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); @@ -3022,7 +3024,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); @@ -3080,7 +3082,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); @@ -3127,7 +3129,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); @@ -3174,7 +3176,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); @@ -3214,7 +3216,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); @@ -3250,7 +3252,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); @@ -3302,7 +3304,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); @@ -3330,7 +3332,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); @@ -3387,7 +3389,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); @@ -3433,7 +3435,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); @@ -3479,7 +3481,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); @@ -3514,7 +3516,7 @@ describe('v1.CloudBuildClient', () => { }); describe('Path templates', () => { - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -3526,7 +3528,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3590,7 +3592,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3600,7 +3602,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3639,7 +3641,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -3649,7 +3651,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3688,7 +3690,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3697,7 +3699,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3726,7 +3728,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('projectBuild', () => { + describe('projectBuild', async () => { const fakePath = '/rendered/path/projectBuild'; const expectedParameters = { project: 'projectValue', @@ -3736,7 +3738,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectBuildPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3775,7 +3777,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('projectConfig', () => { + describe('projectConfig', async () => { const fakePath = '/rendered/path/projectConfig'; const expectedParameters = { project: 'projectValue', @@ -3785,7 +3787,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3824,7 +3826,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('projectLocationBuild', () => { + describe('projectLocationBuild', async () => { const fakePath = '/rendered/path/projectLocationBuild'; const expectedParameters = { project: 'projectValue', @@ -3835,7 +3837,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationBuildPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3902,7 +3904,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('projectLocationConfig', () => { + describe('projectLocationConfig', async () => { const fakePath = '/rendered/path/projectLocationConfig'; const expectedParameters = { project: 'projectValue', @@ -3913,7 +3915,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3981,7 +3983,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('projectLocationTrigger', () => { + describe('projectLocationTrigger', async () => { const fakePath = '/rendered/path/projectLocationTrigger'; const expectedParameters = { project: 'projectValue', @@ -3992,7 +3994,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationTriggerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4060,7 +4062,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('projectTrigger', () => { + describe('projectTrigger', async () => { const fakePath = '/rendered/path/projectTrigger'; const expectedParameters = { project: 'projectValue', @@ -4070,7 +4072,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectTriggerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4112,7 +4114,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -4124,7 +4126,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4188,7 +4190,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('secretVersion', () => { + describe('secretVersion', async () => { const fakePath = '/rendered/path/secretVersion'; const expectedParameters = { project: 'projectValue', @@ -4199,7 +4201,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.secretVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4252,7 +4254,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('serviceAccount', () => { + describe('serviceAccount', async () => { const fakePath = '/rendered/path/serviceAccount'; const expectedParameters = { project: 'projectValue', @@ -4262,7 +4264,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4305,7 +4307,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('subscription', () => { + describe('subscription', async () => { const fakePath = '/rendered/path/subscription'; const expectedParameters = { project: 'projectValue', @@ -4315,7 +4317,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.subscriptionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4357,7 +4359,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -4367,7 +4369,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4406,7 +4408,7 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('workerPool', () => { + describe('workerPool', async () => { const fakePath = '/rendered/path/workerPool'; const expectedParameters = { project: 'projectValue', @@ -4417,7 +4419,7 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workerPoolPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts b/packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts index 03c0f7cb718..b185e31befe 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_repository_manager_v2.ts @@ -291,7 +291,9 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.repositoryManagerStub); client.close().then(() => { done(); @@ -350,7 +352,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() ); @@ -381,7 +383,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() ); @@ -428,7 +430,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() ); @@ -459,7 +461,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetConnectionRequest() ); @@ -480,7 +482,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() ); @@ -511,7 +513,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() ); @@ -558,7 +560,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() ); @@ -589,7 +591,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.GetRepositoryRequest() ); @@ -610,7 +612,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() ); @@ -642,7 +644,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() ); @@ -689,7 +691,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() ); @@ -720,7 +722,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest() ); @@ -741,7 +743,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() ); @@ -772,7 +774,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() ); @@ -819,7 +821,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() ); @@ -850,7 +852,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchReadTokenRequest() ); @@ -871,7 +873,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchGitRefsRequest() ); @@ -902,7 +904,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchGitRefsRequest() ); @@ -949,7 +951,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchGitRefsRequest() ); @@ -980,7 +982,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchGitRefsRequest() ); @@ -1001,7 +1003,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() ); @@ -1034,7 +1036,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() ); @@ -1088,7 +1090,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() ); @@ -1119,7 +1121,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateConnectionRequest() ); @@ -1152,7 +1154,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1174,7 +1176,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1195,7 +1197,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() ); @@ -1229,7 +1231,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() ); @@ -1284,7 +1286,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() ); @@ -1316,7 +1318,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.UpdateConnectionRequest() ); @@ -1350,7 +1352,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1372,7 +1374,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1393,7 +1395,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() ); @@ -1426,7 +1428,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() ); @@ -1480,7 +1482,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() ); @@ -1511,7 +1513,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteConnectionRequest() ); @@ -1544,7 +1546,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1566,7 +1568,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1587,7 +1589,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() ); @@ -1620,7 +1622,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() ); @@ -1674,7 +1676,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() ); @@ -1705,7 +1707,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.CreateRepositoryRequest() ); @@ -1738,7 +1740,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1760,7 +1762,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1781,7 +1783,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() ); @@ -1814,7 +1816,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() ); @@ -1868,7 +1870,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() ); @@ -1902,7 +1904,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest() ); @@ -1935,7 +1937,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1958,7 +1960,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1979,7 +1981,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() ); @@ -2012,7 +2014,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() ); @@ -2066,7 +2068,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() ); @@ -2097,7 +2099,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.DeleteRepositoryRequest() ); @@ -2130,7 +2132,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2152,7 +2154,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2173,7 +2175,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() ); @@ -2212,7 +2214,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() ); @@ -2267,7 +2269,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() ); @@ -2298,7 +2300,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() ); @@ -2358,7 +2360,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() ); @@ -2407,7 +2409,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() ); @@ -2456,7 +2458,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListConnectionsRequest() ); @@ -2499,7 +2501,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() ); @@ -2538,7 +2540,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() ); @@ -2593,7 +2595,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() ); @@ -2624,7 +2626,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() ); @@ -2684,7 +2686,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() ); @@ -2733,7 +2735,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() ); @@ -2782,7 +2784,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.ListRepositoriesRequest() ); @@ -2825,7 +2827,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() ); @@ -2865,7 +2867,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() ); @@ -2920,7 +2922,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() ); @@ -2954,7 +2956,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() ); @@ -3020,7 +3022,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() ); @@ -3075,7 +3077,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() ); @@ -3128,7 +3130,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest() ); @@ -3174,7 +3176,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3204,7 +3206,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3248,7 +3250,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3280,7 +3282,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3310,7 +3312,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3354,7 +3356,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3386,7 +3388,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3419,7 +3421,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3463,7 +3465,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3498,7 +3500,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3528,7 +3530,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3572,7 +3574,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3607,7 +3609,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3655,7 +3657,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3696,7 +3698,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3775,7 +3777,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3855,7 +3857,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3951,8 +3953,7 @@ describe('v2.RepositoryManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3971,7 +3972,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3980,8 +3981,7 @@ describe('v2.RepositoryManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3997,7 +3997,7 @@ describe('v2.RepositoryManagerClient', () => { }); describe('Path templates', () => { - describe('connection', () => { + describe('connection', async () => { const fakePath = '/rendered/path/connection'; const expectedParameters = { project: 'projectValue', @@ -4008,7 +4008,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4061,7 +4061,7 @@ describe('v2.RepositoryManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4071,7 +4071,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4110,7 +4110,7 @@ describe('v2.RepositoryManagerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4119,7 +4119,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4148,7 +4148,7 @@ describe('v2.RepositoryManagerClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -4160,7 +4160,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4224,7 +4224,7 @@ describe('v2.RepositoryManagerClient', () => { }); }); - describe('secretVersion', () => { + describe('secretVersion', async () => { const fakePath = '/rendered/path/secretVersion'; const expectedParameters = { project: 'projectValue', @@ -4235,7 +4235,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.secretVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4288,7 +4288,7 @@ describe('v2.RepositoryManagerClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -4300,7 +4300,7 @@ describe('v2.RepositoryManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-devtools-cloudprofiler/package.json b/packages/google-devtools-cloudprofiler/package.json index 7e29cc24425..0518ee720a8 100644 --- a/packages/google-devtools-cloudprofiler/package.json +++ b/packages/google-devtools-cloudprofiler/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json b/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json index 22622210931..9884c75f91c 100644 --- a/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json +++ b/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudprofiler", - "version": "0.6.0", + "version": "0.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudprofiler/src/v2/export_service_client.ts b/packages/google-devtools-cloudprofiler/src/v2/export_service_client.ts index 7dfde18ecb0..4d998c554d3 100644 --- a/packages/google-devtools-cloudprofiler/src/v2/export_service_client.ts +++ b/packages/google-devtools-cloudprofiler/src/v2/export_service_client.ts @@ -490,7 +490,9 @@ export class ExportServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.devtools.cloudprofiler.v2.IListProfilesRequest, @@ -560,7 +562,9 @@ export class ExportServiceClient { }); const defaultCallSettings = this._defaults['listProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProfiles stream %j', request); return this.descriptors.page.listProfiles.createStream( this.innerApiCalls.listProfiles as GaxCall, @@ -612,7 +616,9 @@ export class ExportServiceClient { }); const defaultCallSettings = this._defaults['listProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProfiles iterate %j', request); return this.descriptors.page.listProfiles.asyncIterate( this.innerApiCalls['listProfiles'] as GaxCall, diff --git a/packages/google-devtools-cloudprofiler/src/v2/profiler_service_client.ts b/packages/google-devtools-cloudprofiler/src/v2/profiler_service_client.ts index 2cee1ca970c..1f43d57e617 100644 --- a/packages/google-devtools-cloudprofiler/src/v2/profiler_service_client.ts +++ b/packages/google-devtools-cloudprofiler/src/v2/profiler_service_client.ts @@ -493,7 +493,9 @@ export class ProfilerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProfile request %j', request); const wrappedCallback: | Callback< @@ -627,7 +629,9 @@ export class ProfilerServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createOfflineProfile request %j', request); const wrappedCallback: | Callback< @@ -759,7 +763,9 @@ export class ProfilerServiceClient { this._gaxModule.routingHeader.fromParams({ 'profile.name': request.profile!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProfile request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-devtools-cloudprofiler/test/gapic_export_service_v2.ts b/packages/google-devtools-cloudprofiler/test/gapic_export_service_v2.ts index 2acef003cca..12f4cb50df0 100644 --- a/packages/google-devtools-cloudprofiler/test/gapic_export_service_v2.ts +++ b/packages/google-devtools-cloudprofiler/test/gapic_export_service_v2.ts @@ -255,7 +255,9 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.exportServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.ListProfilesRequest() ); @@ -353,7 +355,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.ListProfilesRequest() ); @@ -408,7 +410,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.ListProfilesRequest() ); @@ -439,7 +441,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.ListProfilesRequest() ); @@ -499,7 +501,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.ListProfilesRequest() ); @@ -550,7 +552,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.ListProfilesRequest() ); @@ -599,7 +601,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.ListProfilesRequest() ); @@ -637,7 +639,7 @@ describe('v2.ExportServiceClient', () => { }); describe('Path templates', () => { - describe('profile', () => { + describe('profile', async () => { const fakePath = '/rendered/path/profile'; const expectedParameters = { project: 'projectValue', @@ -647,7 +649,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.profilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -686,7 +688,7 @@ describe('v2.ExportServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -695,7 +697,7 @@ describe('v2.ExportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-devtools-cloudprofiler/test/gapic_profiler_service_v2.ts b/packages/google-devtools-cloudprofiler/test/gapic_profiler_service_v2.ts index af092d2a60d..f849920d86d 100644 --- a/packages/google-devtools-cloudprofiler/test/gapic_profiler_service_v2.ts +++ b/packages/google-devtools-cloudprofiler/test/gapic_profiler_service_v2.ts @@ -192,7 +192,9 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.profilerServiceStub); client.close().then(() => { done(); @@ -251,7 +253,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateProfileRequest() ); @@ -282,7 +284,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateProfileRequest() ); @@ -329,7 +331,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateProfileRequest() ); @@ -360,7 +362,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateProfileRequest() ); @@ -381,7 +383,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest() ); @@ -413,7 +415,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest() ); @@ -460,7 +462,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest() ); @@ -491,7 +493,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest() ); @@ -512,7 +514,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.UpdateProfileRequest() ); @@ -544,7 +546,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.UpdateProfileRequest() ); @@ -592,7 +594,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.UpdateProfileRequest() ); @@ -624,7 +626,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.devtools.cloudprofiler.v2.UpdateProfileRequest() ); @@ -641,7 +643,7 @@ describe('v2.ProfilerServiceClient', () => { }); describe('Path templates', () => { - describe('profile', () => { + describe('profile', async () => { const fakePath = '/rendered/path/profile'; const expectedParameters = { project: 'projectValue', @@ -651,7 +653,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.profilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -690,7 +692,7 @@ describe('v2.ProfilerServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -699,7 +701,7 @@ describe('v2.ProfilerServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); From c9adc6150ad09630854554c2ed7e558fb3e04315 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:44:30 -0700 Subject: [PATCH 31/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: https://github.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://github.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW5vdGlmaWNhdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXF1b3RhLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJldmlld3MvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXN0b3JhZ2UtY29udHJvbC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXN0b3JhZ2V0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXN0cmVldHZpZXctcHVibGlzaC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ3JhZmVhcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon --- .../package.json | 2 +- ....shopping.merchant.inventories.v1beta.json | 2 +- .../v1beta/local_inventory_service_client.ts | 20 ++- .../regional_inventory_service_client.ts | 20 ++- .../gapic_local_inventory_service_v1beta.ts | 46 +++--- ...gapic_regional_inventory_service_v1beta.ts | 46 +++--- .../google-shopping-merchant-lfp/package.json | 2 +- ...a_google.shopping.merchant.lfp.v1beta.json | 2 +- .../v1beta/lfp_inventory_service_client.ts | 4 +- .../src/v1beta/lfp_sale_service_client.ts | 4 +- .../src/v1beta/lfp_store_service_client.ts | 24 ++- .../gapic_lfp_inventory_service_v1beta.ts | 28 ++-- .../test/gapic_lfp_sale_service_v1beta.ts | 24 +-- .../test/gapic_lfp_store_service_v1beta.ts | 58 +++---- .../package.json | 2 +- ...hopping.merchant.notifications.v1beta.json | 2 +- .../notifications_api_service_client.ts | 28 +++- .../gapic_notifications_api_service_v1beta.ts | 58 +++---- .../package.json | 2 +- ...gle.shopping.merchant.products.v1beta.json | 2 +- .../v1beta/product_inputs_service_client.ts | 12 +- .../src/v1beta/products_service_client.ts | 16 +- .../gapic_product_inputs_service_v1beta.ts | 40 ++--- .../test/gapic_products_service_v1beta.ts | 38 ++--- .../package.json | 2 +- ...e.shopping.merchant.promotions.v1beta.json | 2 +- .../src/v1beta/promotions_service_client.ts | 20 ++- .../test/gapic_promotions_service_v1beta.ts | 38 ++--- .../package.json | 2 +- ...google.shopping.merchant.quota.v1beta.json | 2 +- .../src/v1beta/quota_service_client.ts | 12 +- .../test/gapic_quota_service_v1beta.ts | 26 +-- .../package.json | 2 +- ...ogle.shopping.merchant.reports.v1beta.json | 2 +- .../src/v1beta/report_service_client.ts | 12 +- .../test/gapic_report_service_v1beta.ts | 18 ++- .../package.json | 2 +- ...ogle.shopping.merchant.reviews.v1beta.json | 2 +- .../v1beta/merchant_reviews_service_client.ts | 24 ++- .../v1beta/product_reviews_service_client.ts | 24 ++- .../gapic_merchant_reviews_service_v1beta.ts | 54 ++++--- .../gapic_product_reviews_service_v1beta.ts | 54 ++++--- packages/google-storage-control/package.json | 2 +- ...et_metadata_google.storage.control.v2.json | 2 +- .../src/v2/storage_control_client.ts | 58 +++++-- .../test/gapic_storage_control_v2.ts | 134 ++++++++-------- packages/google-storagetransfer/package.json | 2 +- ...et_metadata.google.storagetransfer.v1.json | 2 +- ...et_metadata_google.storagetransfer.v1.json | 2 +- .../src/v1/storage_transfer_service_client.ts | 74 ++++++--- .../test/gapic_storage_transfer_service_v1.ts | 150 +++++++++--------- .../google-streetview-publish/package.json | 2 +- ...metadata_google.streetview.publish.v1.json | 2 +- .../v1/street_view_publish_service_client.ts | 72 ++++++--- .../gapic_street_view_publish_service_v1.ts | 136 ++++++++-------- .../v1/snippet_metadata.grafeas.v1.json | 2 +- .../v1/snippet_metadata_grafeas.v1.json | 2 +- packages/grafeas/src/v1/grafeas_client.ts | 80 +++++++--- packages/grafeas/test/gapic_grafeas_v1.ts | 146 ++++++++--------- 59 files changed, 964 insertions(+), 684 deletions(-) diff --git a/packages/google-shopping-merchant-inventories/package.json b/packages/google-shopping-merchant-inventories/package.json index 36c9b1532c6..e4070e8473d 100644 --- a/packages/google-shopping-merchant-inventories/package.json +++ b/packages/google-shopping-merchant-inventories/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-inventories/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.inventories.v1beta.json b/packages/google-shopping-merchant-inventories/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.inventories.v1beta.json index 3e8ab987f38..318aeab967a 100644 --- a/packages/google-shopping-merchant-inventories/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.inventories.v1beta.json +++ b/packages/google-shopping-merchant-inventories/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.inventories.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-inventories", - "version": "0.6.0", + "version": "0.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-inventories/src/v1beta/local_inventory_service_client.ts b/packages/google-shopping-merchant-inventories/src/v1beta/local_inventory_service_client.ts index 50773531469..68aa4342d30 100644 --- a/packages/google-shopping-merchant-inventories/src/v1beta/local_inventory_service_client.ts +++ b/packages/google-shopping-merchant-inventories/src/v1beta/local_inventory_service_client.ts @@ -499,7 +499,9 @@ export class LocalInventoryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertLocalInventory request %j', request); const wrappedCallback: | Callback< @@ -630,7 +632,9 @@ export class LocalInventoryServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteLocalInventory request %j', request); const wrappedCallback: | Callback< @@ -774,7 +778,9 @@ export class LocalInventoryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.inventories.v1beta.IListLocalInventoriesRequest, @@ -851,7 +857,9 @@ export class LocalInventoryServiceClient { }); const defaultCallSettings = this._defaults['listLocalInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLocalInventories stream %j', request); return this.descriptors.page.listLocalInventories.createStream( this.innerApiCalls.listLocalInventories as GaxCall, @@ -910,7 +918,9 @@ export class LocalInventoryServiceClient { }); const defaultCallSettings = this._defaults['listLocalInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLocalInventories iterate %j', request); return this.descriptors.page.listLocalInventories.asyncIterate( this.innerApiCalls['listLocalInventories'] as GaxCall, diff --git a/packages/google-shopping-merchant-inventories/src/v1beta/regional_inventory_service_client.ts b/packages/google-shopping-merchant-inventories/src/v1beta/regional_inventory_service_client.ts index 9fe4355bded..e505f55eb9c 100644 --- a/packages/google-shopping-merchant-inventories/src/v1beta/regional_inventory_service_client.ts +++ b/packages/google-shopping-merchant-inventories/src/v1beta/regional_inventory_service_client.ts @@ -500,7 +500,9 @@ export class RegionalInventoryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertRegionalInventory request %j', request); const wrappedCallback: | Callback< @@ -631,7 +633,9 @@ export class RegionalInventoryServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteRegionalInventory request %j', request); const wrappedCallback: | Callback< @@ -774,7 +778,9 @@ export class RegionalInventoryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.inventories.v1beta.IListRegionalInventoriesRequest, @@ -850,7 +856,9 @@ export class RegionalInventoryServiceClient { }); const defaultCallSettings = this._defaults['listRegionalInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegionalInventories stream %j', request); return this.descriptors.page.listRegionalInventories.createStream( this.innerApiCalls.listRegionalInventories as GaxCall, @@ -908,7 +916,9 @@ export class RegionalInventoryServiceClient { }); const defaultCallSettings = this._defaults['listRegionalInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegionalInventories iterate %j', request); return this.descriptors.page.listRegionalInventories.asyncIterate( this.innerApiCalls['listRegionalInventories'] as GaxCall, diff --git a/packages/google-shopping-merchant-inventories/test/gapic_local_inventory_service_v1beta.ts b/packages/google-shopping-merchant-inventories/test/gapic_local_inventory_service_v1beta.ts index ab32b3c6054..d43ace82d71 100644 --- a/packages/google-shopping-merchant-inventories/test/gapic_local_inventory_service_v1beta.ts +++ b/packages/google-shopping-merchant-inventories/test/gapic_local_inventory_service_v1beta.ts @@ -265,7 +265,9 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.localInventoryServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest() ); @@ -361,7 +363,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest() ); @@ -409,7 +411,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest() ); @@ -441,7 +443,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest() ); @@ -463,7 +465,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest() ); @@ -496,7 +498,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest() ); @@ -544,7 +546,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest() ); @@ -576,7 +578,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest() ); @@ -598,7 +600,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest() ); @@ -639,7 +641,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest() ); @@ -697,7 +699,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest() ); @@ -729,7 +731,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest() ); @@ -793,7 +795,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest() ); @@ -846,7 +848,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest() ); @@ -897,7 +899,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest() ); @@ -935,7 +937,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { }); describe('Path templates', () => { - describe('localInventory', () => { + describe('localInventory', async () => { const fakePath = '/rendered/path/localInventory'; const expectedParameters = { account: 'accountValue', @@ -947,7 +949,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.localInventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1000,7 +1002,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { account: 'accountValue', @@ -1011,7 +1013,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1050,7 +1052,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { }); }); - describe('regionalInventory', () => { + describe('regionalInventory', async () => { const fakePath = '/rendered/path/regionalInventory'; const expectedParameters = { account: 'accountValue', @@ -1062,7 +1064,7 @@ describe('v1beta.LocalInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.regionalInventoryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-inventories/test/gapic_regional_inventory_service_v1beta.ts b/packages/google-shopping-merchant-inventories/test/gapic_regional_inventory_service_v1beta.ts index f5771060659..0781fdae163 100644 --- a/packages/google-shopping-merchant-inventories/test/gapic_regional_inventory_service_v1beta.ts +++ b/packages/google-shopping-merchant-inventories/test/gapic_regional_inventory_service_v1beta.ts @@ -271,7 +271,9 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.regionalInventoryServiceStub); client.close().then(() => { done(); @@ -342,7 +344,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest() ); @@ -377,7 +379,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest() ); @@ -427,7 +429,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest() ); @@ -464,7 +466,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest() ); @@ -491,7 +493,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest() ); @@ -526,7 +528,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest() ); @@ -576,7 +578,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest() ); @@ -613,7 +615,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest() ); @@ -640,7 +642,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest() ); @@ -683,7 +685,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest() ); @@ -743,7 +745,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest() ); @@ -780,7 +782,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest() ); @@ -852,7 +854,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest() ); @@ -913,7 +915,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest() ); @@ -970,7 +972,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest() ); @@ -1012,7 +1014,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { }); describe('Path templates', () => { - describe('localInventory', () => { + describe('localInventory', async () => { const fakePath = '/rendered/path/localInventory'; const expectedParameters = { account: 'accountValue', @@ -1026,7 +1028,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.localInventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1079,7 +1081,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { account: 'accountValue', @@ -1092,7 +1094,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1131,7 +1133,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { }); }); - describe('regionalInventory', () => { + describe('regionalInventory', async () => { const fakePath = '/rendered/path/regionalInventory'; const expectedParameters = { account: 'accountValue', @@ -1145,7 +1147,7 @@ describe('v1beta.RegionalInventoryServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.regionalInventoryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-lfp/package.json b/packages/google-shopping-merchant-lfp/package.json index 350b8b26c70..d8a6478557a 100644 --- a/packages/google-shopping-merchant-lfp/package.json +++ b/packages/google-shopping-merchant-lfp/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-lfp/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.lfp.v1beta.json b/packages/google-shopping-merchant-lfp/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.lfp.v1beta.json index cb15750509b..af4c2db1895 100644 --- a/packages/google-shopping-merchant-lfp/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.lfp.v1beta.json +++ b/packages/google-shopping-merchant-lfp/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.lfp.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lfp", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-lfp/src/v1beta/lfp_inventory_service_client.ts b/packages/google-shopping-merchant-lfp/src/v1beta/lfp_inventory_service_client.ts index 61d938f2e72..bceebf60c35 100644 --- a/packages/google-shopping-merchant-lfp/src/v1beta/lfp_inventory_service_client.ts +++ b/packages/google-shopping-merchant-lfp/src/v1beta/lfp_inventory_service_client.ts @@ -478,7 +478,9 @@ export class LfpInventoryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertLfpInventory request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-lfp/src/v1beta/lfp_sale_service_client.ts b/packages/google-shopping-merchant-lfp/src/v1beta/lfp_sale_service_client.ts index d960f1e0b91..d70c7fd727a 100644 --- a/packages/google-shopping-merchant-lfp/src/v1beta/lfp_sale_service_client.ts +++ b/packages/google-shopping-merchant-lfp/src/v1beta/lfp_sale_service_client.ts @@ -473,7 +473,9 @@ export class LfpSaleServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertLfpSale request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-lfp/src/v1beta/lfp_store_service_client.ts b/packages/google-shopping-merchant-lfp/src/v1beta/lfp_store_service_client.ts index 90b824fa220..e20782a0aa3 100644 --- a/packages/google-shopping-merchant-lfp/src/v1beta/lfp_store_service_client.ts +++ b/packages/google-shopping-merchant-lfp/src/v1beta/lfp_store_service_client.ts @@ -492,7 +492,9 @@ export class LfpStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLfpStore request %j', request); const wrappedCallback: | Callback< @@ -621,7 +623,9 @@ export class LfpStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertLfpStore request %j', request); const wrappedCallback: | Callback< @@ -747,7 +751,9 @@ export class LfpStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteLfpStore request %j', request); const wrappedCallback: | Callback< @@ -887,7 +893,9 @@ export class LfpStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.lfp.v1beta.IListLfpStoresRequest, @@ -964,7 +972,9 @@ export class LfpStoreServiceClient { }); const defaultCallSettings = this._defaults['listLfpStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLfpStores stream %j', request); return this.descriptors.page.listLfpStores.createStream( this.innerApiCalls.listLfpStores as GaxCall, @@ -1023,7 +1033,9 @@ export class LfpStoreServiceClient { }); const defaultCallSettings = this._defaults['listLfpStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLfpStores iterate %j', request); return this.descriptors.page.listLfpStores.asyncIterate( this.innerApiCalls['listLfpStores'] as GaxCall, diff --git a/packages/google-shopping-merchant-lfp/test/gapic_lfp_inventory_service_v1beta.ts b/packages/google-shopping-merchant-lfp/test/gapic_lfp_inventory_service_v1beta.ts index efcb18e89a5..17e7a18ce33 100644 --- a/packages/google-shopping-merchant-lfp/test/gapic_lfp_inventory_service_v1beta.ts +++ b/packages/google-shopping-merchant-lfp/test/gapic_lfp_inventory_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.lfpInventoryServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest() ); @@ -298,7 +300,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest() ); @@ -346,7 +348,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest() ); @@ -378,7 +380,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpInventoryRequest() ); @@ -394,7 +396,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -404,7 +406,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -433,7 +435,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { }); }); - describe('lfpInventory', () => { + describe('lfpInventory', async () => { const fakePath = '/rendered/path/lfpInventory'; const expectedParameters = { account: 'accountValue', @@ -446,7 +448,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpInventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -510,7 +512,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { }); }); - describe('lfpSale', () => { + describe('lfpSale', async () => { const fakePath = '/rendered/path/lfpSale'; const expectedParameters = { account: 'accountValue', @@ -521,7 +523,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpSalePathTemplate.render = sinon .stub() .returns(fakePath); @@ -560,7 +562,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { }); }); - describe('lfpStore', () => { + describe('lfpStore', async () => { const fakePath = '/rendered/path/lfpStore'; const expectedParameters = { account: 'accountValue', @@ -572,7 +574,7 @@ describe('v1beta.LfpInventoryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpStorePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-lfp/test/gapic_lfp_sale_service_v1beta.ts b/packages/google-shopping-merchant-lfp/test/gapic_lfp_sale_service_v1beta.ts index 39a406b21c9..9e85c1c5915 100644 --- a/packages/google-shopping-merchant-lfp/test/gapic_lfp_sale_service_v1beta.ts +++ b/packages/google-shopping-merchant-lfp/test/gapic_lfp_sale_service_v1beta.ts @@ -189,7 +189,9 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.lfpSaleServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest() ); @@ -279,7 +281,7 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest() ); @@ -326,7 +328,7 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest() ); @@ -357,7 +359,7 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpSaleRequest() ); @@ -373,7 +375,7 @@ describe('v1beta.LfpSaleServiceClient', () => { }); describe('Path templates', () => { - describe('lfpInventory', () => { + describe('lfpInventory', async () => { const fakePath = '/rendered/path/lfpInventory'; const expectedParameters = { account: 'accountValue', @@ -385,7 +387,7 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpInventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -449,7 +451,7 @@ describe('v1beta.LfpSaleServiceClient', () => { }); }); - describe('lfpSale', () => { + describe('lfpSale', async () => { const fakePath = '/rendered/path/lfpSale'; const expectedParameters = { account: 'accountValue', @@ -459,7 +461,7 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpSalePathTemplate.render = sinon .stub() .returns(fakePath); @@ -498,7 +500,7 @@ describe('v1beta.LfpSaleServiceClient', () => { }); }); - describe('lfpStore', () => { + describe('lfpStore', async () => { const fakePath = '/rendered/path/lfpStore'; const expectedParameters = { account: 'accountValue', @@ -509,7 +511,7 @@ describe('v1beta.LfpSaleServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpStorePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-lfp/test/gapic_lfp_store_service_v1beta.ts b/packages/google-shopping-merchant-lfp/test/gapic_lfp_store_service_v1beta.ts index b2cd809a959..cc386a33713 100644 --- a/packages/google-shopping-merchant-lfp/test/gapic_lfp_store_service_v1beta.ts +++ b/packages/google-shopping-merchant-lfp/test/gapic_lfp_store_service_v1beta.ts @@ -253,7 +253,9 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.lfpStoreServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest() ); @@ -343,7 +345,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest() ); @@ -390,7 +392,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest() ); @@ -421,7 +423,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.GetLfpStoreRequest() ); @@ -442,7 +444,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest() ); @@ -473,7 +475,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest() ); @@ -520,7 +522,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest() ); @@ -551,7 +553,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.InsertLfpStoreRequest() ); @@ -572,7 +574,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest() ); @@ -603,7 +605,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest() ); @@ -650,7 +652,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest() ); @@ -681,7 +683,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.DeleteLfpStoreRequest() ); @@ -702,7 +704,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest() ); @@ -741,7 +743,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest() ); @@ -798,7 +800,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest() ); @@ -829,7 +831,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest() ); @@ -890,7 +892,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest() ); @@ -940,7 +942,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest() ); @@ -990,7 +992,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.lfp.v1beta.ListLfpStoresRequest() ); @@ -1028,7 +1030,7 @@ describe('v1beta.LfpStoreServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1037,7 +1039,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1066,7 +1068,7 @@ describe('v1beta.LfpStoreServiceClient', () => { }); }); - describe('lfpInventory', () => { + describe('lfpInventory', async () => { const fakePath = '/rendered/path/lfpInventory'; const expectedParameters = { account: 'accountValue', @@ -1078,7 +1080,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpInventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1142,7 +1144,7 @@ describe('v1beta.LfpStoreServiceClient', () => { }); }); - describe('lfpSale', () => { + describe('lfpSale', async () => { const fakePath = '/rendered/path/lfpSale'; const expectedParameters = { account: 'accountValue', @@ -1152,7 +1154,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpSalePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1191,7 +1193,7 @@ describe('v1beta.LfpStoreServiceClient', () => { }); }); - describe('lfpStore', () => { + describe('lfpStore', async () => { const fakePath = '/rendered/path/lfpStore'; const expectedParameters = { account: 'accountValue', @@ -1202,7 +1204,7 @@ describe('v1beta.LfpStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lfpStorePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-notifications/package.json b/packages/google-shopping-merchant-notifications/package.json index c242b03866a..ffd8bf6fc63 100644 --- a/packages/google-shopping-merchant-notifications/package.json +++ b/packages/google-shopping-merchant-notifications/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-notifications/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.notifications.v1beta.json b/packages/google-shopping-merchant-notifications/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.notifications.v1beta.json index de9050b4f8b..a4409bda941 100644 --- a/packages/google-shopping-merchant-notifications/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.notifications.v1beta.json +++ b/packages/google-shopping-merchant-notifications/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.notifications.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-notifications", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-notifications/src/v1beta/notifications_api_service_client.ts b/packages/google-shopping-merchant-notifications/src/v1beta/notifications_api_service_client.ts index 21b24592b2b..ece762d8f32 100644 --- a/packages/google-shopping-merchant-notifications/src/v1beta/notifications_api_service_client.ts +++ b/packages/google-shopping-merchant-notifications/src/v1beta/notifications_api_service_client.ts @@ -485,7 +485,9 @@ export class NotificationsApiServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNotificationSubscription request %j', request); const wrappedCallback: | Callback< @@ -624,7 +626,9 @@ export class NotificationsApiServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNotificationSubscription request %j', request); const wrappedCallback: | Callback< @@ -759,7 +763,9 @@ export class NotificationsApiServiceClient { 'notification_subscription.name': request.notificationSubscription!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNotificationSubscription request %j', request); const wrappedCallback: | Callback< @@ -890,7 +896,9 @@ export class NotificationsApiServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNotificationSubscription request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1035,9 @@ export class NotificationsApiServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.notifications.v1beta.IListNotificationSubscriptionsRequest, @@ -1096,7 +1106,9 @@ export class NotificationsApiServiceClient { }); const defaultCallSettings = this._defaults['listNotificationSubscriptions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationSubscriptions stream %j', request); return this.descriptors.page.listNotificationSubscriptions.createStream( this.innerApiCalls.listNotificationSubscriptions as GaxCall, @@ -1147,7 +1159,9 @@ export class NotificationsApiServiceClient { }); const defaultCallSettings = this._defaults['listNotificationSubscriptions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotificationSubscriptions iterate %j', request); return this.descriptors.page.listNotificationSubscriptions.asyncIterate( this.innerApiCalls['listNotificationSubscriptions'] as GaxCall, diff --git a/packages/google-shopping-merchant-notifications/test/gapic_notifications_api_service_v1beta.ts b/packages/google-shopping-merchant-notifications/test/gapic_notifications_api_service_v1beta.ts index 2b0c50ef72d..3ebb29fc90b 100644 --- a/packages/google-shopping-merchant-notifications/test/gapic_notifications_api_service_v1beta.ts +++ b/packages/google-shopping-merchant-notifications/test/gapic_notifications_api_service_v1beta.ts @@ -265,7 +265,9 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.notificationsApiServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest() ); @@ -361,7 +363,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest() ); @@ -409,7 +411,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest() ); @@ -444,7 +446,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest() ); @@ -469,7 +471,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest() ); @@ -502,7 +504,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest() ); @@ -550,7 +552,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest() ); @@ -585,7 +587,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest() ); @@ -610,7 +612,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest() ); @@ -644,7 +646,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest() ); @@ -693,7 +695,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest() ); @@ -729,7 +731,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest() ); @@ -755,7 +757,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest() ); @@ -788,7 +790,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest() ); @@ -836,7 +838,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest() ); @@ -871,7 +873,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest() ); @@ -896,7 +898,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest() ); @@ -937,7 +939,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest() ); @@ -995,7 +997,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest() ); @@ -1030,7 +1032,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest() ); @@ -1103,7 +1105,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest() ); @@ -1165,7 +1167,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest() ); @@ -1220,7 +1222,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest() ); @@ -1262,7 +1264,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1272,7 +1274,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1301,7 +1303,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { }); }); - describe('notificationSubscription', () => { + describe('notificationSubscription', async () => { const fakePath = '/rendered/path/notificationSubscription'; const expectedParameters = { account: 'accountValue', @@ -1312,7 +1314,7 @@ describe('v1beta.NotificationsApiServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.notificationSubscriptionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-products/package.json b/packages/google-shopping-merchant-products/package.json index c657258a459..f2f4ba552ab 100644 --- a/packages/google-shopping-merchant-products/package.json +++ b/packages/google-shopping-merchant-products/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json b/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json index 351190f3737..1381680f4ff 100644 --- a/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json +++ b/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-products", - "version": "0.1.1", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts b/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts index a3b326b4a41..f5c3c30de5c 100644 --- a/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts +++ b/packages/google-shopping-merchant-products/src/v1beta/product_inputs_service_client.ts @@ -489,7 +489,9 @@ export class ProductInputsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertProductInput request %j', request); const wrappedCallback: | Callback< @@ -641,7 +643,9 @@ export class ProductInputsServiceClient { this._gaxModule.routingHeader.fromParams({ 'product_input.name': request.productInput!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateProductInput request %j', request); const wrappedCallback: | Callback< @@ -778,7 +782,9 @@ export class ProductInputsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProductInput request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-shopping-merchant-products/src/v1beta/products_service_client.ts b/packages/google-shopping-merchant-products/src/v1beta/products_service_client.ts index e56e7e307a9..d1a36ff2465 100644 --- a/packages/google-shopping-merchant-products/src/v1beta/products_service_client.ts +++ b/packages/google-shopping-merchant-products/src/v1beta/products_service_client.ts @@ -490,7 +490,9 @@ export class ProductsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProduct request %j', request); const wrappedCallback: | Callback< @@ -630,7 +632,9 @@ export class ProductsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.products.v1beta.IListProductsRequest, @@ -703,7 +707,9 @@ export class ProductsServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts stream %j', request); return this.descriptors.page.listProducts.createStream( this.innerApiCalls.listProducts as GaxCall, @@ -758,7 +764,9 @@ export class ProductsServiceClient { }); const defaultCallSettings = this._defaults['listProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProducts iterate %j', request); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, diff --git a/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts b/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts index 730e1ff5f53..336bdca8ddc 100644 --- a/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts +++ b/packages/google-shopping-merchant-products/test/gapic_product_inputs_service_v1beta.ts @@ -202,7 +202,9 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productInputsServiceStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.InsertProductInputRequest() ); @@ -298,7 +300,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.InsertProductInputRequest() ); @@ -346,7 +348,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.InsertProductInputRequest() ); @@ -378,7 +380,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.InsertProductInputRequest() ); @@ -400,7 +402,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() ); @@ -434,7 +436,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() ); @@ -483,7 +485,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() ); @@ -516,7 +518,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.UpdateProductInputRequest() ); @@ -539,7 +541,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.DeleteProductInputRequest() ); @@ -572,7 +574,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.DeleteProductInputRequest() ); @@ -620,7 +622,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.DeleteProductInputRequest() ); @@ -652,7 +654,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.DeleteProductInputRequest() ); @@ -668,7 +670,7 @@ describe('v1beta.ProductInputsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -678,7 +680,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -707,7 +709,7 @@ describe('v1beta.ProductInputsServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { account: 'accountValue', @@ -718,7 +720,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -757,7 +759,7 @@ describe('v1beta.ProductInputsServiceClient', () => { }); }); - describe('productInput', () => { + describe('productInput', async () => { const fakePath = '/rendered/path/productInput'; const expectedParameters = { account: 'accountValue', @@ -768,7 +770,7 @@ describe('v1beta.ProductInputsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productInputPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-products/test/gapic_products_service_v1beta.ts b/packages/google-shopping-merchant-products/test/gapic_products_service_v1beta.ts index 30af85c4eda..81a2fb16beb 100644 --- a/packages/google-shopping-merchant-products/test/gapic_products_service_v1beta.ts +++ b/packages/google-shopping-merchant-products/test/gapic_products_service_v1beta.ts @@ -253,7 +253,9 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productsServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.GetProductRequest() ); @@ -343,7 +345,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.GetProductRequest() ); @@ -390,7 +392,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.GetProductRequest() ); @@ -421,7 +423,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.GetProductRequest() ); @@ -442,7 +444,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.ListProductsRequest() ); @@ -481,7 +483,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.ListProductsRequest() ); @@ -538,7 +540,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.ListProductsRequest() ); @@ -569,7 +571,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.ListProductsRequest() ); @@ -632,7 +634,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.ListProductsRequest() ); @@ -686,7 +688,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.ListProductsRequest() ); @@ -736,7 +738,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.products.v1beta.ListProductsRequest() ); @@ -774,7 +776,7 @@ describe('v1beta.ProductsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -783,7 +785,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -812,7 +814,7 @@ describe('v1beta.ProductsServiceClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { account: 'accountValue', @@ -822,7 +824,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -861,7 +863,7 @@ describe('v1beta.ProductsServiceClient', () => { }); }); - describe('productInput', () => { + describe('productInput', async () => { const fakePath = '/rendered/path/productInput'; const expectedParameters = { account: 'accountValue', @@ -871,7 +873,7 @@ describe('v1beta.ProductsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productInputPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-promotions/package.json b/packages/google-shopping-merchant-promotions/package.json index 0d1ffe20844..61efc8f8574 100644 --- a/packages/google-shopping-merchant-promotions/package.json +++ b/packages/google-shopping-merchant-promotions/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-promotions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.promotions.v1beta.json b/packages/google-shopping-merchant-promotions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.promotions.v1beta.json index 7ce3114c639..65b573e7ca7 100644 --- a/packages/google-shopping-merchant-promotions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.promotions.v1beta.json +++ b/packages/google-shopping-merchant-promotions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.promotions.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-promotions", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-promotions/src/v1beta/promotions_service_client.ts b/packages/google-shopping-merchant-promotions/src/v1beta/promotions_service_client.ts index 0207d8a9c56..2616f1a88be 100644 --- a/packages/google-shopping-merchant-promotions/src/v1beta/promotions_service_client.ts +++ b/packages/google-shopping-merchant-promotions/src/v1beta/promotions_service_client.ts @@ -488,7 +488,9 @@ export class PromotionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertPromotion request %j', request); const wrappedCallback: | Callback< @@ -617,7 +619,9 @@ export class PromotionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPromotion request %j', request); const wrappedCallback: | Callback< @@ -757,7 +761,9 @@ export class PromotionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.promotions.v1beta.IListPromotionsRequest, @@ -830,7 +836,9 @@ export class PromotionsServiceClient { }); const defaultCallSettings = this._defaults['listPromotions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPromotions stream %j', request); return this.descriptors.page.listPromotions.createStream( this.innerApiCalls.listPromotions as GaxCall, @@ -885,7 +893,9 @@ export class PromotionsServiceClient { }); const defaultCallSettings = this._defaults['listPromotions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPromotions iterate %j', request); return this.descriptors.page.listPromotions.asyncIterate( this.innerApiCalls['listPromotions'] as GaxCall, diff --git a/packages/google-shopping-merchant-promotions/test/gapic_promotions_service_v1beta.ts b/packages/google-shopping-merchant-promotions/test/gapic_promotions_service_v1beta.ts index ecf2e43b710..7479fbcceca 100644 --- a/packages/google-shopping-merchant-promotions/test/gapic_promotions_service_v1beta.ts +++ b/packages/google-shopping-merchant-promotions/test/gapic_promotions_service_v1beta.ts @@ -263,7 +263,9 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.promotionsServiceStub); client.close().then(() => { done(); @@ -330,7 +332,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.InsertPromotionRequest() ); @@ -363,7 +365,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.InsertPromotionRequest() ); @@ -412,7 +414,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.InsertPromotionRequest() ); @@ -445,7 +447,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.InsertPromotionRequest() ); @@ -468,7 +470,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.GetPromotionRequest() ); @@ -501,7 +503,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.GetPromotionRequest() ); @@ -550,7 +552,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.GetPromotionRequest() ); @@ -583,7 +585,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.GetPromotionRequest() ); @@ -606,7 +608,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest() ); @@ -647,7 +649,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest() ); @@ -706,7 +708,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest() ); @@ -739,7 +741,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest() ); @@ -804,7 +806,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest() ); @@ -858,7 +860,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest() ); @@ -910,7 +912,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest() ); @@ -948,7 +950,7 @@ describe('v1beta.PromotionsServiceClient', () => { }); describe('Path templates', () => { - describe('promotion', () => { + describe('promotion', async () => { const fakePath = '/rendered/path/promotion'; const expectedParameters = { account: 'accountValue', @@ -960,7 +962,7 @@ describe('v1beta.PromotionsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.promotionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-quota/package.json b/packages/google-shopping-merchant-quota/package.json index 0d351c00ce6..8582ab3ef72 100644 --- a/packages/google-shopping-merchant-quota/package.json +++ b/packages/google-shopping-merchant-quota/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-quota/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.quota.v1beta.json b/packages/google-shopping-merchant-quota/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.quota.v1beta.json index e28cdb45d11..772036ef965 100644 --- a/packages/google-shopping-merchant-quota/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.quota.v1beta.json +++ b/packages/google-shopping-merchant-quota/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.quota.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-quota", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-quota/src/v1beta/quota_service_client.ts b/packages/google-shopping-merchant-quota/src/v1beta/quota_service_client.ts index 7fa76425a04..7367bd703c6 100644 --- a/packages/google-shopping-merchant-quota/src/v1beta/quota_service_client.ts +++ b/packages/google-shopping-merchant-quota/src/v1beta/quota_service_client.ts @@ -484,7 +484,9 @@ export class QuotaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.quota.v1beta.IListQuotaGroupsRequest, @@ -552,7 +554,9 @@ export class QuotaServiceClient { }); const defaultCallSettings = this._defaults['listQuotaGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaGroups stream %j', request); return this.descriptors.page.listQuotaGroups.createStream( this.innerApiCalls.listQuotaGroups as GaxCall, @@ -602,7 +606,9 @@ export class QuotaServiceClient { }); const defaultCallSettings = this._defaults['listQuotaGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listQuotaGroups iterate %j', request); return this.descriptors.page.listQuotaGroups.asyncIterate( this.innerApiCalls['listQuotaGroups'] as GaxCall, diff --git a/packages/google-shopping-merchant-quota/test/gapic_quota_service_v1beta.ts b/packages/google-shopping-merchant-quota/test/gapic_quota_service_v1beta.ts index 75d25c8abcc..dcf78a3d92b 100644 --- a/packages/google-shopping-merchant-quota/test/gapic_quota_service_v1beta.ts +++ b/packages/google-shopping-merchant-quota/test/gapic_quota_service_v1beta.ts @@ -252,7 +252,9 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.quotaServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest() ); @@ -350,7 +352,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest() ); @@ -407,7 +409,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest() ); @@ -438,7 +440,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest() ); @@ -501,7 +503,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest() ); @@ -553,7 +555,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest() ); @@ -603,7 +605,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest() ); @@ -641,7 +643,7 @@ describe('v1beta.QuotaServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -650,7 +652,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -679,7 +681,7 @@ describe('v1beta.QuotaServiceClient', () => { }); }); - describe('quotaGroup', () => { + describe('quotaGroup', async () => { const fakePath = '/rendered/path/quotaGroup'; const expectedParameters = { account: 'accountValue', @@ -689,7 +691,7 @@ describe('v1beta.QuotaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.quotaGroupPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-reports/package.json b/packages/google-shopping-merchant-reports/package.json index 4a444d45387..9cf25dba8e5 100644 --- a/packages/google-shopping-merchant-reports/package.json +++ b/packages/google-shopping-merchant-reports/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-reports/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reports.v1beta.json b/packages/google-shopping-merchant-reports/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reports.v1beta.json index 1acf1cce0d9..6874f808ac4 100644 --- a/packages/google-shopping-merchant-reports/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reports.v1beta.json +++ b/packages/google-shopping-merchant-reports/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reports.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-reports", - "version": "0.7.0", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-reports/src/v1beta/report_service_client.ts b/packages/google-shopping-merchant-reports/src/v1beta/report_service_client.ts index e1dcef4cd85..b956e1becc4 100644 --- a/packages/google-shopping-merchant-reports/src/v1beta/report_service_client.ts +++ b/packages/google-shopping-merchant-reports/src/v1beta/report_service_client.ts @@ -481,7 +481,9 @@ export class ReportServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.reports.v1beta.ISearchRequest, @@ -557,7 +559,9 @@ export class ReportServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search stream %j', request); return this.descriptors.page.search.createStream( this.innerApiCalls.search as GaxCall, @@ -615,7 +619,9 @@ export class ReportServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search iterate %j', request); return this.descriptors.page.search.asyncIterate( this.innerApiCalls['search'] as GaxCall, diff --git a/packages/google-shopping-merchant-reports/test/gapic_report_service_v1beta.ts b/packages/google-shopping-merchant-reports/test/gapic_report_service_v1beta.ts index 29657b84d72..5f0bb1e1aa1 100644 --- a/packages/google-shopping-merchant-reports/test/gapic_report_service_v1beta.ts +++ b/packages/google-shopping-merchant-reports/test/gapic_report_service_v1beta.ts @@ -252,7 +252,9 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.reportServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reports.v1beta.SearchRequest() ); @@ -350,7 +352,7 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reports.v1beta.SearchRequest() ); @@ -407,7 +409,7 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reports.v1beta.SearchRequest() ); @@ -435,7 +437,7 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reports.v1beta.SearchRequest() ); @@ -498,7 +500,7 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reports.v1beta.SearchRequest() ); @@ -552,7 +554,7 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reports.v1beta.SearchRequest() ); @@ -601,7 +603,7 @@ describe('v1beta.ReportServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reports.v1beta.SearchRequest() ); diff --git a/packages/google-shopping-merchant-reviews/package.json b/packages/google-shopping-merchant-reviews/package.json index f96b0435352..7d3b398f43a 100644 --- a/packages/google-shopping-merchant-reviews/package.json +++ b/packages/google-shopping-merchant-reviews/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-shopping-merchant-reviews/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reviews.v1beta.json b/packages/google-shopping-merchant-reviews/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reviews.v1beta.json index 15f16560a3f..a64f1c12c79 100644 --- a/packages/google-shopping-merchant-reviews/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reviews.v1beta.json +++ b/packages/google-shopping-merchant-reviews/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reviews.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-reviews", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-reviews/src/v1beta/merchant_reviews_service_client.ts b/packages/google-shopping-merchant-reviews/src/v1beta/merchant_reviews_service_client.ts index 0349e069c2d..c70465772fb 100644 --- a/packages/google-shopping-merchant-reviews/src/v1beta/merchant_reviews_service_client.ts +++ b/packages/google-shopping-merchant-reviews/src/v1beta/merchant_reviews_service_client.ts @@ -488,7 +488,9 @@ export class MerchantReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMerchantReview request %j', request); const wrappedCallback: | Callback< @@ -622,7 +624,9 @@ export class MerchantReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertMerchantReview request %j', request); const wrappedCallback: | Callback< @@ -748,7 +752,9 @@ export class MerchantReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteMerchantReview request %j', request); const wrappedCallback: | Callback< @@ -883,7 +889,9 @@ export class MerchantReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.reviews.v1beta.IListMerchantReviewsRequest, @@ -956,7 +964,9 @@ export class MerchantReviewsServiceClient { }); const defaultCallSettings = this._defaults['listMerchantReviews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMerchantReviews stream %j', request); return this.descriptors.page.listMerchantReviews.createStream( this.innerApiCalls.listMerchantReviews as GaxCall, @@ -1011,7 +1021,9 @@ export class MerchantReviewsServiceClient { }); const defaultCallSettings = this._defaults['listMerchantReviews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMerchantReviews iterate %j', request); return this.descriptors.page.listMerchantReviews.asyncIterate( this.innerApiCalls['listMerchantReviews'] as GaxCall, diff --git a/packages/google-shopping-merchant-reviews/src/v1beta/product_reviews_service_client.ts b/packages/google-shopping-merchant-reviews/src/v1beta/product_reviews_service_client.ts index 930df82cf5a..c4c6ca46ac2 100644 --- a/packages/google-shopping-merchant-reviews/src/v1beta/product_reviews_service_client.ts +++ b/packages/google-shopping-merchant-reviews/src/v1beta/product_reviews_service_client.ts @@ -488,7 +488,9 @@ export class ProductReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProductReview request %j', request); const wrappedCallback: | Callback< @@ -619,7 +621,9 @@ export class ProductReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('insertProductReview request %j', request); const wrappedCallback: | Callback< @@ -745,7 +749,9 @@ export class ProductReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteProductReview request %j', request); const wrappedCallback: | Callback< @@ -878,7 +884,9 @@ export class ProductReviewsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.shopping.merchant.reviews.v1beta.IListProductReviewsRequest, @@ -949,7 +957,9 @@ export class ProductReviewsServiceClient { }); const defaultCallSettings = this._defaults['listProductReviews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductReviews stream %j', request); return this.descriptors.page.listProductReviews.createStream( this.innerApiCalls.listProductReviews as GaxCall, @@ -1002,7 +1012,9 @@ export class ProductReviewsServiceClient { }); const defaultCallSettings = this._defaults['listProductReviews']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProductReviews iterate %j', request); return this.descriptors.page.listProductReviews.asyncIterate( this.innerApiCalls['listProductReviews'] as GaxCall, diff --git a/packages/google-shopping-merchant-reviews/test/gapic_merchant_reviews_service_v1beta.ts b/packages/google-shopping-merchant-reviews/test/gapic_merchant_reviews_service_v1beta.ts index 309edde5b95..3a90e607d87 100644 --- a/packages/google-shopping-merchant-reviews/test/gapic_merchant_reviews_service_v1beta.ts +++ b/packages/google-shopping-merchant-reviews/test/gapic_merchant_reviews_service_v1beta.ts @@ -265,7 +265,9 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.merchantReviewsServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest() ); @@ -360,7 +362,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest() ); @@ -408,7 +410,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest() ); @@ -440,7 +442,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest() ); @@ -462,7 +464,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest() ); @@ -495,7 +497,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest() ); @@ -543,7 +545,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest() ); @@ -575,7 +577,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest() ); @@ -597,7 +599,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest() ); @@ -630,7 +632,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest() ); @@ -678,7 +680,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest() ); @@ -710,7 +712,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest() ); @@ -732,7 +734,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest() ); @@ -773,7 +775,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest() ); @@ -831,7 +833,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest() ); @@ -863,7 +865,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest() ); @@ -927,7 +929,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest() ); @@ -980,7 +982,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest() ); @@ -1031,7 +1033,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest() ); @@ -1069,7 +1071,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1079,7 +1081,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1108,7 +1110,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { }); }); - describe('merchantReview', () => { + describe('merchantReview', async () => { const fakePath = '/rendered/path/merchantReview'; const expectedParameters = { account: 'accountValue', @@ -1119,7 +1121,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantReviewPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1158,7 +1160,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { }); }); - describe('productReview', () => { + describe('productReview', async () => { const fakePath = '/rendered/path/productReview'; const expectedParameters = { account: 'accountValue', @@ -1169,7 +1171,7 @@ describe('v1beta.MerchantReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productReviewPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-shopping-merchant-reviews/test/gapic_product_reviews_service_v1beta.ts b/packages/google-shopping-merchant-reviews/test/gapic_product_reviews_service_v1beta.ts index 2bc51374f83..02127fec33a 100644 --- a/packages/google-shopping-merchant-reviews/test/gapic_product_reviews_service_v1beta.ts +++ b/packages/google-shopping-merchant-reviews/test/gapic_product_reviews_service_v1beta.ts @@ -265,7 +265,9 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.productReviewsServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest() ); @@ -360,7 +362,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest() ); @@ -408,7 +410,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest() ); @@ -440,7 +442,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest() ); @@ -462,7 +464,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest() ); @@ -495,7 +497,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest() ); @@ -543,7 +545,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest() ); @@ -575,7 +577,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest() ); @@ -597,7 +599,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest() ); @@ -630,7 +632,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest() ); @@ -678,7 +680,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest() ); @@ -710,7 +712,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest() ); @@ -732,7 +734,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest() ); @@ -773,7 +775,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest() ); @@ -831,7 +833,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest() ); @@ -863,7 +865,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest() ); @@ -927,7 +929,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest() ); @@ -980,7 +982,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest() ); @@ -1031,7 +1033,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest() ); @@ -1069,7 +1071,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { }); describe('Path templates', () => { - describe('account', () => { + describe('account', async () => { const fakePath = '/rendered/path/account'; const expectedParameters = { account: 'accountValue', @@ -1079,7 +1081,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.accountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1108,7 +1110,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { }); }); - describe('merchantReview', () => { + describe('merchantReview', async () => { const fakePath = '/rendered/path/merchantReview'; const expectedParameters = { account: 'accountValue', @@ -1119,7 +1121,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.merchantReviewPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1158,7 +1160,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { }); }); - describe('productReview', () => { + describe('productReview', async () => { const fakePath = '/rendered/path/productReview'; const expectedParameters = { account: 'accountValue', @@ -1169,7 +1171,7 @@ describe('v1beta.ProductReviewsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productReviewPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-storage-control/package.json b/packages/google-storage-control/package.json index 9324c21876b..26c9831d335 100644 --- a/packages/google-storage-control/package.json +++ b/packages/google-storage-control/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json b/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json index 8d803f06263..bb7bc766a07 100644 --- a/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json +++ b/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-control", - "version": "0.2.1", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-storage-control/src/v2/storage_control_client.ts b/packages/google-storage-control/src/v2/storage_control_client.ts index 262332e0119..c680867f316 100644 --- a/packages/google-storage-control/src/v2/storage_control_client.ts +++ b/packages/google-storage-control/src/v2/storage_control_client.ts @@ -563,7 +563,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFolder request %j', request); const wrappedCallback: | Callback< @@ -698,7 +700,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFolder request %j', request); const wrappedCallback: | Callback< @@ -831,7 +835,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFolder request %j', request); const wrappedCallback: | Callback< @@ -966,7 +972,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStorageLayout request %j', request); const wrappedCallback: | Callback< @@ -1105,7 +1113,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createManagedFolder request %j', request); const wrappedCallback: | Callback< @@ -1254,7 +1264,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteManagedFolder request %j', request); const wrappedCallback: | Callback< @@ -1398,7 +1410,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getManagedFolder request %j', request); const wrappedCallback: | Callback< @@ -1557,7 +1571,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1746,7 +1762,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.storage.control.v2.IListFoldersRequest, @@ -1843,7 +1861,9 @@ export class StorageControlClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFolders stream %j', request); return this.descriptors.page.listFolders.createStream( this.innerApiCalls.listFolders as GaxCall, @@ -1922,7 +1942,9 @@ export class StorageControlClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFolders iterate %j', request); return this.descriptors.page.listFolders.asyncIterate( this.innerApiCalls['listFolders'] as GaxCall, @@ -2044,7 +2066,9 @@ export class StorageControlClient { } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.storage.control.v2.IListManagedFoldersRequest, @@ -2129,7 +2153,9 @@ export class StorageControlClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listManagedFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagedFolders stream %j', request); return this.descriptors.page.listManagedFolders.createStream( this.innerApiCalls.listManagedFolders as GaxCall, @@ -2196,7 +2222,9 @@ export class StorageControlClient { this._gaxModule.routingHeader.fromParams(routingParameter); const defaultCallSettings = this._defaults['listManagedFolders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listManagedFolders iterate %j', request); return this.descriptors.page.listManagedFolders.asyncIterate( this.innerApiCalls['listManagedFolders'] as GaxCall, @@ -2298,7 +2326,7 @@ export class StorageControlClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-storage-control/test/gapic_storage_control_v2.ts b/packages/google-storage-control/test/gapic_storage_control_v2.ts index d9471c6f632..63f07290a2d 100644 --- a/packages/google-storage-control/test/gapic_storage_control_v2.ts +++ b/packages/google-storage-control/test/gapic_storage_control_v2.ts @@ -284,7 +284,9 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.storageControlStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateFolderRequest() ); @@ -376,7 +378,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateFolderRequest() ); @@ -425,7 +427,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateFolderRequest() ); @@ -458,7 +460,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateFolderRequest() ); @@ -476,7 +478,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteFolderRequest() ); @@ -510,7 +512,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteFolderRequest() ); @@ -560,7 +562,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteFolderRequest() ); @@ -594,7 +596,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteFolderRequest() ); @@ -612,7 +614,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetFolderRequest() ); @@ -646,7 +648,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetFolderRequest() ); @@ -696,7 +698,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetFolderRequest() ); @@ -727,7 +729,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetFolderRequest() ); @@ -745,7 +747,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetStorageLayoutRequest() ); @@ -779,7 +781,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetStorageLayoutRequest() ); @@ -829,7 +831,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetStorageLayoutRequest() ); @@ -863,7 +865,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetStorageLayoutRequest() ); @@ -881,7 +883,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateManagedFolderRequest() ); @@ -915,7 +917,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateManagedFolderRequest() ); @@ -964,7 +966,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateManagedFolderRequest() ); @@ -997,7 +999,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.CreateManagedFolderRequest() ); @@ -1015,7 +1017,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteManagedFolderRequest() ); @@ -1050,7 +1052,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteManagedFolderRequest() ); @@ -1100,7 +1102,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteManagedFolderRequest() ); @@ -1134,7 +1136,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.DeleteManagedFolderRequest() ); @@ -1152,7 +1154,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetManagedFolderRequest() ); @@ -1186,7 +1188,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetManagedFolderRequest() ); @@ -1236,7 +1238,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetManagedFolderRequest() ); @@ -1270,7 +1272,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.GetManagedFolderRequest() ); @@ -1288,7 +1290,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.RenameFolderRequest() ); @@ -1323,7 +1325,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.RenameFolderRequest() ); @@ -1380,7 +1382,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.RenameFolderRequest() ); @@ -1414,7 +1416,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.RenameFolderRequest() ); @@ -1450,7 +1452,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1472,7 +1474,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1490,7 +1492,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListFoldersRequest() ); @@ -1520,7 +1522,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListFoldersRequest() ); @@ -1566,7 +1568,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListFoldersRequest() ); @@ -1594,7 +1596,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListFoldersRequest() ); @@ -1645,7 +1647,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListFoldersRequest() ); @@ -1693,7 +1695,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListFoldersRequest() ); @@ -1733,7 +1735,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListFoldersRequest() ); @@ -1774,7 +1776,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListManagedFoldersRequest() ); @@ -1816,7 +1818,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListManagedFoldersRequest() ); @@ -1873,7 +1875,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListManagedFoldersRequest() ); @@ -1906,7 +1908,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListManagedFoldersRequest() ); @@ -1963,7 +1965,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListManagedFoldersRequest() ); @@ -2009,7 +2011,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListManagedFoldersRequest() ); @@ -2061,7 +2063,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storage.control.v2.ListManagedFoldersRequest() ); @@ -2105,7 +2107,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2184,7 +2186,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2264,7 +2266,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2360,8 +2362,7 @@ describe('v2.StorageControlClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2380,7 +2381,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2389,8 +2390,7 @@ describe('v2.StorageControlClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2406,7 +2406,7 @@ describe('v2.StorageControlClient', () => { }); describe('Path templates', () => { - describe('bucket', () => { + describe('bucket', async () => { const fakePath = '/rendered/path/bucket'; const expectedParameters = { project: 'projectValue', @@ -2416,7 +2416,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.bucketPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2455,7 +2455,7 @@ describe('v2.StorageControlClient', () => { }); }); - describe('folder', () => { + describe('folder', async () => { const fakePath = '/rendered/path/folder'; const expectedParameters = { project: 'projectValue', @@ -2466,7 +2466,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2519,7 +2519,7 @@ describe('v2.StorageControlClient', () => { }); }); - describe('managedFolder', () => { + describe('managedFolder', async () => { const fakePath = '/rendered/path/managedFolder'; const expectedParameters = { project: 'projectValue', @@ -2530,7 +2530,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.managedFolderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2583,7 +2583,7 @@ describe('v2.StorageControlClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2592,7 +2592,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2621,7 +2621,7 @@ describe('v2.StorageControlClient', () => { }); }); - describe('storageLayout', () => { + describe('storageLayout', async () => { const fakePath = '/rendered/path/storageLayout'; const expectedParameters = { project: 'projectValue', @@ -2631,7 +2631,7 @@ describe('v2.StorageControlClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.storageLayoutPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-storagetransfer/package.json b/packages/google-storagetransfer/package.json index e6f81264f3a..331cec57bbf 100644 --- a/packages/google-storagetransfer/package.json +++ b/packages/google-storagetransfer/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json b/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json index 15c94a4401f..0171656a519 100644 --- a/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json +++ b/packages/google-storagetransfer/samples/generated/v1/snippet_metadata.google.storagetransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-storagetransfer", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-storagetransfer/samples/generated/v1/snippet_metadata_google.storagetransfer.v1.json b/packages/google-storagetransfer/samples/generated/v1/snippet_metadata_google.storagetransfer.v1.json index edca94ac813..948b6953237 100644 --- a/packages/google-storagetransfer/samples/generated/v1/snippet_metadata_google.storagetransfer.v1.json +++ b/packages/google-storagetransfer/samples/generated/v1/snippet_metadata_google.storagetransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-storagetransfer", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-storagetransfer/src/v1/storage_transfer_service_client.ts b/packages/google-storagetransfer/src/v1/storage_transfer_service_client.ts index e6ef8d3d72b..d2435f5acc5 100644 --- a/packages/google-storagetransfer/src/v1/storage_transfer_service_client.ts +++ b/packages/google-storagetransfer/src/v1/storage_transfer_service_client.ts @@ -556,7 +556,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ project_id: request.projectId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGoogleServiceAccount request %j', request); const wrappedCallback: | Callback< @@ -671,7 +673,9 @@ export class StorageTransferServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTransferJob request %j', request); const wrappedCallback: | Callback< @@ -825,7 +829,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ job_name: request.jobName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTransferJob request %j', request); const wrappedCallback: | Callback< @@ -947,7 +953,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ job_name: request.jobName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTransferJob request %j', request); const wrappedCallback: | Callback< @@ -1069,7 +1077,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseTransferOperation request %j', request); const wrappedCallback: | Callback< @@ -1194,7 +1204,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeTransferOperation request %j', request); const wrappedCallback: | Callback< @@ -1317,7 +1329,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ job_name: request.jobName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTransferJob request %j', request); const wrappedCallback: | Callback< @@ -1453,7 +1467,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ project_id: request.projectId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAgentPool request %j', request); const wrappedCallback: | Callback< @@ -1587,7 +1603,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ 'agent_pool.name': request.agentPool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAgentPool request %j', request); const wrappedCallback: | Callback< @@ -1697,7 +1715,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAgentPool request %j', request); const wrappedCallback: | Callback< @@ -1813,7 +1833,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAgentPool request %j', request); const wrappedCallback: | Callback< @@ -1948,7 +1970,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ job_name: request.jobName ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2132,7 +2156,9 @@ export class StorageTransferServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.storagetransfer.v1.IListTransferJobsRequest, @@ -2219,7 +2245,9 @@ export class StorageTransferServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTransferJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferJobs stream %j', request); return this.descriptors.page.listTransferJobs.createStream( this.innerApiCalls.listTransferJobs as GaxCall, @@ -2288,7 +2316,9 @@ export class StorageTransferServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listTransferJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransferJobs iterate %j', request); return this.descriptors.page.listTransferJobs.asyncIterate( this.innerApiCalls['listTransferJobs'] as GaxCall, @@ -2399,7 +2429,9 @@ export class StorageTransferServiceClient { this._gaxModule.routingHeader.fromParams({ project_id: request.projectId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.storagetransfer.v1.IListAgentPoolsRequest, @@ -2473,7 +2505,9 @@ export class StorageTransferServiceClient { }); const defaultCallSettings = this._defaults['listAgentPools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAgentPools stream %j', request); return this.descriptors.page.listAgentPools.createStream( this.innerApiCalls.listAgentPools as GaxCall, @@ -2529,7 +2563,9 @@ export class StorageTransferServiceClient { }); const defaultCallSettings = this._defaults['listAgentPools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAgentPools iterate %j', request); return this.descriptors.page.listAgentPools.asyncIterate( this.innerApiCalls['listAgentPools'] as GaxCall, @@ -2631,7 +2667,7 @@ export class StorageTransferServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-storagetransfer/test/gapic_storage_transfer_service_v1.ts b/packages/google-storagetransfer/test/gapic_storage_transfer_service_v1.ts index c3a4181c1c6..4e5cdcf7975 100644 --- a/packages/google-storagetransfer/test/gapic_storage_transfer_service_v1.ts +++ b/packages/google-storagetransfer/test/gapic_storage_transfer_service_v1.ts @@ -300,7 +300,9 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.storageTransferServiceStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetGoogleServiceAccountRequest() ); @@ -396,7 +398,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetGoogleServiceAccountRequest() ); @@ -444,7 +446,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetGoogleServiceAccountRequest() ); @@ -479,7 +481,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetGoogleServiceAccountRequest() ); @@ -504,7 +506,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateTransferJobRequest() ); @@ -522,7 +524,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateTransferJobRequest() ); @@ -556,7 +558,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateTransferJobRequest() ); @@ -574,7 +576,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateTransferJobRequest() ); @@ -591,7 +593,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateTransferJobRequest() ); @@ -623,7 +625,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateTransferJobRequest() ); @@ -671,7 +673,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateTransferJobRequest() ); @@ -703,7 +705,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateTransferJobRequest() ); @@ -725,7 +727,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetTransferJobRequest() ); @@ -757,7 +759,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetTransferJobRequest() ); @@ -805,7 +807,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetTransferJobRequest() ); @@ -837,7 +839,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetTransferJobRequest() ); @@ -859,7 +861,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.PauseTransferOperationRequest() ); @@ -892,7 +894,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.PauseTransferOperationRequest() ); @@ -940,7 +942,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.PauseTransferOperationRequest() ); @@ -975,7 +977,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.PauseTransferOperationRequest() ); @@ -1000,7 +1002,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ResumeTransferOperationRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ResumeTransferOperationRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ResumeTransferOperationRequest() ); @@ -1116,7 +1118,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ResumeTransferOperationRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteTransferJobRequest() ); @@ -1173,7 +1175,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteTransferJobRequest() ); @@ -1221,7 +1223,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteTransferJobRequest() ); @@ -1253,7 +1255,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteTransferJobRequest() ); @@ -1275,7 +1277,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateAgentPoolRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateAgentPoolRequest() ); @@ -1355,7 +1357,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateAgentPoolRequest() ); @@ -1387,7 +1389,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.CreateAgentPoolRequest() ); @@ -1409,7 +1411,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateAgentPoolRequest() ); @@ -1442,7 +1444,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateAgentPoolRequest() ); @@ -1491,7 +1493,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateAgentPoolRequest() ); @@ -1524,7 +1526,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.UpdateAgentPoolRequest() ); @@ -1547,7 +1549,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetAgentPoolRequest() ); @@ -1579,7 +1581,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetAgentPoolRequest() ); @@ -1627,7 +1629,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetAgentPoolRequest() ); @@ -1659,7 +1661,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.GetAgentPoolRequest() ); @@ -1681,7 +1683,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteAgentPoolRequest() ); @@ -1713,7 +1715,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteAgentPoolRequest() ); @@ -1761,7 +1763,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteAgentPoolRequest() ); @@ -1793,7 +1795,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.DeleteAgentPoolRequest() ); @@ -1815,7 +1817,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.RunTransferJobRequest() ); @@ -1849,7 +1851,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.RunTransferJobRequest() ); @@ -1904,7 +1906,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.RunTransferJobRequest() ); @@ -1936,7 +1938,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.RunTransferJobRequest() ); @@ -1970,7 +1972,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1993,7 +1995,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2015,7 +2017,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListTransferJobsRequest() ); @@ -2041,7 +2043,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListTransferJobsRequest() ); @@ -2083,7 +2085,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListTransferJobsRequest() ); @@ -2101,7 +2103,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListTransferJobsRequest() ); @@ -2149,7 +2151,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListTransferJobsRequest() ); @@ -2186,7 +2188,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListTransferJobsRequest() ); @@ -2223,7 +2225,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListTransferJobsRequest() ); @@ -2253,7 +2255,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListAgentPoolsRequest() ); @@ -2287,7 +2289,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListAgentPoolsRequest() ); @@ -2337,7 +2339,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListAgentPoolsRequest() ); @@ -2369,7 +2371,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListAgentPoolsRequest() ); @@ -2424,7 +2426,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListAgentPoolsRequest() ); @@ -2474,7 +2476,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListAgentPoolsRequest() ); @@ -2518,7 +2520,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.storagetransfer.v1.ListAgentPoolsRequest() ); @@ -2560,7 +2562,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2642,7 +2644,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2725,7 +2727,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2824,8 +2826,7 @@ describe('v1.StorageTransferServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2845,7 +2846,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2854,8 +2855,7 @@ describe('v1.StorageTransferServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2871,7 +2871,7 @@ describe('v1.StorageTransferServiceClient', () => { }); describe('Path templates', () => { - describe('agentPools', () => { + describe('agentPools', async () => { const fakePath = '/rendered/path/agentPools'; const expectedParameters = { project_id: 'projectIdValue', @@ -2882,7 +2882,7 @@ describe('v1.StorageTransferServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPoolsPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-streetview-publish/package.json b/packages/google-streetview-publish/package.json index d03b4480193..24aa362f6ab 100644 --- a/packages/google-streetview-publish/package.json +++ b/packages/google-streetview-publish/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-streetview-publish/samples/generated/v1/snippet_metadata_google.streetview.publish.v1.json b/packages/google-streetview-publish/samples/generated/v1/snippet_metadata_google.streetview.publish.v1.json index 10495f062d8..ad3ad032af8 100644 --- a/packages/google-streetview-publish/samples/generated/v1/snippet_metadata_google.streetview.publish.v1.json +++ b/packages/google-streetview-publish/samples/generated/v1/snippet_metadata_google.streetview.publish.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publish", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-streetview-publish/src/v1/street_view_publish_service_client.ts b/packages/google-streetview-publish/src/v1/street_view_publish_service_client.ts index 3da62d85be4..55cac95d454 100644 --- a/packages/google-streetview-publish/src/v1/street_view_publish_service_client.ts +++ b/packages/google-streetview-publish/src/v1/street_view_publish_service_client.ts @@ -532,7 +532,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startUpload request %j', request); const wrappedCallback: | Callback< @@ -661,7 +663,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPhoto request %j', request); const wrappedCallback: | Callback< @@ -792,7 +796,9 @@ export class StreetViewPublishServiceClient { this._gaxModule.routingHeader.fromParams({ photo_id: request.photoId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPhoto request %j', request); const wrappedCallback: | Callback< @@ -930,7 +936,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetPhotos request %j', request); const wrappedCallback: | Callback< @@ -1096,7 +1104,9 @@ export class StreetViewPublishServiceClient { this._gaxModule.routingHeader.fromParams({ 'photo.photo_id.id': request.photo!.photoId!.id ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePhoto request %j', request); const wrappedCallback: | Callback< @@ -1241,7 +1251,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchUpdatePhotos request %j', request); const wrappedCallback: | Callback< @@ -1367,7 +1379,9 @@ export class StreetViewPublishServiceClient { this._gaxModule.routingHeader.fromParams({ photo_id: request.photoId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePhoto request %j', request); const wrappedCallback: | Callback< @@ -1496,7 +1510,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeletePhotos request %j', request); const wrappedCallback: | Callback< @@ -1610,7 +1626,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startPhotoSequenceUpload request %j', request); const wrappedCallback: | Callback< @@ -1741,7 +1759,9 @@ export class StreetViewPublishServiceClient { this._gaxModule.routingHeader.fromParams({ sequence_id: request.sequenceId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePhotoSequence request %j', request); const wrappedCallback: | Callback< @@ -1890,7 +1910,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2088,7 +2110,9 @@ export class StreetViewPublishServiceClient { this._gaxModule.routingHeader.fromParams({ sequence_id: request.sequenceId ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2272,7 +2296,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.streetview.publish.v1.IListPhotosRequest, @@ -2355,7 +2381,9 @@ export class StreetViewPublishServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listPhotos']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhotos stream %j', request); return this.descriptors.page.listPhotos.createStream( this.innerApiCalls.listPhotos as GaxCall, @@ -2420,7 +2448,9 @@ export class StreetViewPublishServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listPhotos']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhotos iterate %j', request); return this.descriptors.page.listPhotos.asyncIterate( this.innerApiCalls['listPhotos'] as GaxCall, @@ -2536,7 +2566,9 @@ export class StreetViewPublishServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.streetview.publish.v1.IListPhotoSequencesRequest, @@ -2614,7 +2646,9 @@ export class StreetViewPublishServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listPhotoSequences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhotoSequences stream %j', request); return this.descriptors.page.listPhotoSequences.createStream( this.innerApiCalls.listPhotoSequences as GaxCall, @@ -2674,7 +2708,9 @@ export class StreetViewPublishServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listPhotoSequences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhotoSequences iterate %j', request); return this.descriptors.page.listPhotoSequences.asyncIterate( this.innerApiCalls['listPhotoSequences'] as GaxCall, diff --git a/packages/google-streetview-publish/test/gapic_street_view_publish_service_v1.ts b/packages/google-streetview-publish/test/gapic_street_view_publish_service_v1.ts index b19427f3b7a..e2ba7fbc313 100644 --- a/packages/google-streetview-publish/test/gapic_street_view_publish_service_v1.ts +++ b/packages/google-streetview-publish/test/gapic_street_view_publish_service_v1.ts @@ -300,7 +300,9 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.streetViewPublishServiceStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedResponse = generateSampleMessage( new protos.google.streetview.publish.v1.UploadRef() @@ -379,7 +381,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedResponse = generateSampleMessage( new protos.google.streetview.publish.v1.UploadRef() @@ -411,7 +413,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedError = new Error('expected'); client.innerApiCalls.startUpload = stubSimpleCall( @@ -427,7 +429,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedError = new Error('The client has already been closed.'); client.close(); @@ -442,7 +444,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoRequest() ); @@ -460,7 +462,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoRequest() ); @@ -494,7 +496,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoRequest() ); @@ -512,7 +514,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoRequest() ); @@ -529,7 +531,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoRequest() ); @@ -561,7 +563,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoRequest() ); @@ -609,7 +611,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoRequest() ); @@ -638,7 +640,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoRequest() ); @@ -660,7 +662,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchGetPhotosRequest() ); @@ -678,7 +680,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchGetPhotosRequest() ); @@ -712,7 +714,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchGetPhotosRequest() ); @@ -730,7 +732,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchGetPhotosRequest() ); @@ -747,7 +749,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.UpdatePhotoRequest() ); @@ -781,7 +783,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.UpdatePhotoRequest() ); @@ -831,7 +833,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.UpdatePhotoRequest() ); @@ -865,7 +867,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.UpdatePhotoRequest() ); @@ -889,7 +891,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchUpdatePhotosRequest() ); @@ -907,7 +909,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchUpdatePhotosRequest() ); @@ -941,7 +943,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchUpdatePhotosRequest() ); @@ -959,7 +961,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchUpdatePhotosRequest() ); @@ -976,7 +978,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoRequest() ); @@ -1008,7 +1010,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoRequest() ); @@ -1056,7 +1058,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoRequest() ); @@ -1088,7 +1090,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoRequest() ); @@ -1110,7 +1112,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchDeletePhotosRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchDeletePhotosRequest() ); @@ -1162,7 +1164,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchDeletePhotosRequest() ); @@ -1180,7 +1182,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.BatchDeletePhotosRequest() ); @@ -1197,7 +1199,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedResponse = generateSampleMessage( new protos.google.streetview.publish.v1.UploadRef() @@ -1214,7 +1216,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedResponse = generateSampleMessage( new protos.google.streetview.publish.v1.UploadRef() @@ -1246,7 +1248,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedError = new Error('expected'); client.innerApiCalls.startPhotoSequenceUpload = stubSimpleCall( @@ -1265,7 +1267,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage(new protos.google.protobuf.Empty()); const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1283,7 +1285,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoSequenceRequest() ); @@ -1316,7 +1318,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoSequenceRequest() ); @@ -1364,7 +1366,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoSequenceRequest() ); @@ -1396,7 +1398,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.DeletePhotoSequenceRequest() ); @@ -1418,7 +1420,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoSequenceRequest() ); @@ -1438,7 +1440,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoSequenceRequest() ); @@ -1479,7 +1481,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoSequenceRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.CreatePhotoSequenceRequest() ); @@ -1517,7 +1519,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1540,7 +1542,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1562,7 +1564,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoSequenceRequest() ); @@ -1596,7 +1598,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoSequenceRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoSequenceRequest() ); @@ -1683,7 +1685,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.GetPhotoSequenceRequest() ); @@ -1717,7 +1719,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1740,7 +1742,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1762,7 +1764,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotosRequest() ); @@ -1782,7 +1784,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotosRequest() ); @@ -1818,7 +1820,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotosRequest() ); @@ -1836,7 +1838,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotosRequest() ); @@ -1878,7 +1880,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotosRequest() ); @@ -1917,7 +1919,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotosRequest() ); @@ -1948,7 +1950,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotosRequest() ); @@ -1980,7 +1982,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotoSequencesRequest() ); @@ -2001,7 +2003,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotoSequencesRequest() ); @@ -2037,7 +2039,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotoSequencesRequest() ); @@ -2055,7 +2057,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotoSequencesRequest() ); @@ -2094,7 +2096,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotoSequencesRequest() ); @@ -2128,7 +2130,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotoSequencesRequest() ); @@ -2159,7 +2161,7 @@ describe('v1.StreetViewPublishServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.streetview.publish.v1.ListPhotoSequencesRequest() ); diff --git a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json index 05397f5bfbf..749bb0d6273 100644 --- a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json +++ b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-grafeas", - "version": "5.5.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/grafeas/samples/generated/v1/snippet_metadata_grafeas.v1.json b/packages/grafeas/samples/generated/v1/snippet_metadata_grafeas.v1.json index 05397f5bfbf..749bb0d6273 100644 --- a/packages/grafeas/samples/generated/v1/snippet_metadata_grafeas.v1.json +++ b/packages/grafeas/samples/generated/v1/snippet_metadata_grafeas.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-grafeas", - "version": "5.5.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/grafeas/src/v1/grafeas_client.ts b/packages/grafeas/src/v1/grafeas_client.ts index ae89ba5e2f3..dd9d7a9257d 100644 --- a/packages/grafeas/src/v1/grafeas_client.ts +++ b/packages/grafeas/src/v1/grafeas_client.ts @@ -503,7 +503,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOccurrence request %j', request); const wrappedCallback: | Callback< @@ -612,7 +614,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteOccurrence request %j', request); const wrappedCallback: | Callback< @@ -721,7 +725,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createOccurrence request %j', request); const wrappedCallback: | Callback< @@ -830,7 +836,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateOccurrences request %j', request); const wrappedCallback: | Callback< @@ -941,7 +949,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateOccurrence request %j', request); const wrappedCallback: | Callback< @@ -1049,7 +1059,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOccurrenceNote request %j', request); const wrappedCallback: | Callback< @@ -1156,7 +1168,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNote request %j', request); const wrappedCallback: | Callback< @@ -1263,7 +1277,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteNote request %j', request); const wrappedCallback: | Callback< @@ -1374,7 +1390,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createNote request %j', request); const wrappedCallback: | Callback< @@ -1483,7 +1501,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateNotes request %j', request); const wrappedCallback: | Callback< @@ -1594,7 +1614,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateNote request %j', request); const wrappedCallback: | Callback< @@ -1712,7 +1734,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.grafeas.v1.IListOccurrencesRequest, @@ -1779,7 +1803,9 @@ export class GrafeasClient { }); const defaultCallSettings = this._defaults['listOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOccurrences stream %j', request); return this.descriptors.page.listOccurrences.createStream( this.innerApiCalls.listOccurrences as GaxCall, @@ -1830,7 +1856,9 @@ export class GrafeasClient { }); const defaultCallSettings = this._defaults['listOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOccurrences iterate %j', request); return this.descriptors.page.listOccurrences.asyncIterate( this.innerApiCalls['listOccurrences'] as GaxCall, @@ -1928,7 +1956,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.grafeas.v1.IListNotesRequest, @@ -1995,7 +2025,9 @@ export class GrafeasClient { }); const defaultCallSettings = this._defaults['listNotes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotes stream %j', request); return this.descriptors.page.listNotes.createStream( this.innerApiCalls.listNotes as GaxCall, @@ -2046,7 +2078,9 @@ export class GrafeasClient { }); const defaultCallSettings = this._defaults['listNotes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNotes iterate %j', request); return this.descriptors.page.listNotes.asyncIterate( this.innerApiCalls['listNotes'] as GaxCall, @@ -2145,7 +2179,9 @@ export class GrafeasClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.grafeas.v1.IListNoteOccurrencesRequest, @@ -2211,7 +2247,9 @@ export class GrafeasClient { }); const defaultCallSettings = this._defaults['listNoteOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNoteOccurrences stream %j', request); return this.descriptors.page.listNoteOccurrences.createStream( this.innerApiCalls.listNoteOccurrences as GaxCall, @@ -2261,7 +2299,9 @@ export class GrafeasClient { }); const defaultCallSettings = this._defaults['listNoteOccurrences']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNoteOccurrences iterate %j', request); return this.descriptors.page.listNoteOccurrences.asyncIterate( this.innerApiCalls['listNoteOccurrences'] as GaxCall, diff --git a/packages/grafeas/test/gapic_grafeas_v1.ts b/packages/grafeas/test/gapic_grafeas_v1.ts index 51bfb1daf65..d84bb37e8dd 100644 --- a/packages/grafeas/test/gapic_grafeas_v1.ts +++ b/packages/grafeas/test/gapic_grafeas_v1.ts @@ -253,7 +253,9 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.grafeasStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceRequest() ); @@ -343,7 +345,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceRequest() ); @@ -390,7 +392,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceRequest() ); @@ -421,7 +423,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceRequest() ); @@ -442,7 +444,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteOccurrenceRequest() ); @@ -473,7 +475,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteOccurrenceRequest() ); @@ -520,7 +522,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteOccurrenceRequest() ); @@ -551,7 +553,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteOccurrenceRequest() ); @@ -572,7 +574,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateOccurrenceRequest() ); @@ -603,7 +605,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateOccurrenceRequest() ); @@ -650,7 +652,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateOccurrenceRequest() ); @@ -681,7 +683,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateOccurrenceRequest() ); @@ -702,7 +704,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateOccurrencesRequest() ); @@ -734,7 +736,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateOccurrencesRequest() ); @@ -781,7 +783,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateOccurrencesRequest() ); @@ -815,7 +817,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateOccurrencesRequest() ); @@ -839,7 +841,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateOccurrenceRequest() ); @@ -870,7 +872,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateOccurrenceRequest() ); @@ -917,7 +919,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateOccurrenceRequest() ); @@ -948,7 +950,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateOccurrenceRequest() ); @@ -969,7 +971,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceNoteRequest() ); @@ -1000,7 +1002,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceNoteRequest() ); @@ -1044,7 +1046,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceNoteRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetOccurrenceNoteRequest() ); @@ -1096,7 +1098,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetNoteRequest() ); @@ -1126,7 +1128,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetNoteRequest() ); @@ -1169,7 +1171,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetNoteRequest() ); @@ -1196,7 +1198,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.GetNoteRequest() ); @@ -1216,7 +1218,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteNoteRequest() ); @@ -1247,7 +1249,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteNoteRequest() ); @@ -1294,7 +1296,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteNoteRequest() ); @@ -1325,7 +1327,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.DeleteNoteRequest() ); @@ -1346,7 +1348,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateNoteRequest() ); @@ -1377,7 +1379,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateNoteRequest() ); @@ -1421,7 +1423,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateNoteRequest() ); @@ -1452,7 +1454,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.CreateNoteRequest() ); @@ -1473,7 +1475,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateNotesRequest() ); @@ -1504,7 +1506,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateNotesRequest() ); @@ -1551,7 +1553,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateNotesRequest() ); @@ -1582,7 +1584,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.BatchCreateNotesRequest() ); @@ -1603,7 +1605,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateNoteRequest() ); @@ -1634,7 +1636,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateNoteRequest() ); @@ -1678,7 +1680,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateNoteRequest() ); @@ -1709,7 +1711,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.UpdateNoteRequest() ); @@ -1730,7 +1732,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListOccurrencesRequest() ); @@ -1763,7 +1765,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListOccurrencesRequest() ); @@ -1812,7 +1814,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListOccurrencesRequest() ); @@ -1843,7 +1845,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListOccurrencesRequest() ); @@ -1894,7 +1896,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListOccurrencesRequest() ); @@ -1940,7 +1942,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListOccurrencesRequest() ); @@ -1983,7 +1985,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListOccurrencesRequest() ); @@ -2025,7 +2027,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNotesRequest() ); @@ -2058,7 +2060,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNotesRequest() ); @@ -2104,7 +2106,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNotesRequest() ); @@ -2132,7 +2134,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNotesRequest() ); @@ -2183,7 +2185,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNotesRequest() ); @@ -2231,7 +2233,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNotesRequest() ); @@ -2273,7 +2275,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNotesRequest() ); @@ -2316,7 +2318,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNoteOccurrencesRequest() ); @@ -2350,7 +2352,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNoteOccurrencesRequest() ); @@ -2399,7 +2401,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNoteOccurrencesRequest() ); @@ -2430,7 +2432,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNoteOccurrencesRequest() ); @@ -2481,7 +2483,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNoteOccurrencesRequest() ); @@ -2527,7 +2529,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNoteOccurrencesRequest() ); @@ -2570,7 +2572,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.grafeas.v1.ListNoteOccurrencesRequest() ); @@ -2607,7 +2609,7 @@ describe('v1.GrafeasClient', () => { }); describe('Path templates', () => { - describe('note', () => { + describe('note', async () => { const fakePath = '/rendered/path/note'; const expectedParameters = { project: 'projectValue', @@ -2617,7 +2619,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.notePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2656,7 +2658,7 @@ describe('v1.GrafeasClient', () => { }); }); - describe('occurrence', () => { + describe('occurrence', async () => { const fakePath = '/rendered/path/occurrence'; const expectedParameters = { project: 'projectValue', @@ -2666,7 +2668,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.occurrencePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2705,7 +2707,7 @@ describe('v1.GrafeasClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2714,7 +2716,7 @@ describe('v1.GrafeasClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); From b33692d64bd42b99f37d0f919f2b0c06a673ab7f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 15:24:27 +0000 Subject: [PATCH 32/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6187) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 738212310 Source-Link: https://togithub.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmtzZXJ2aWNlcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5vdGVib29rcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yYWNsZWRhdGFiYXNlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yY2hlc3RyYXRpb24tYWlyZmxvdy1zZXJ2aWNlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yZ3BvbGljeS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9zY29uZmlnLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9zbG9naW4vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBhcmFtZXRlcm1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBoaXNoaW5ncHJvdGVjdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBvbGljeXNpbXVsYXRvci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBvbGljeXRyb3VibGVzaG9vdGVyLWlhbS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBvbGljeXRyb3VibGVzaG9vdGVyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXByaXZhdGVjYXRhbG9nLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXByaXZpbGVnZWRhY2Nlc3NtYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJhcGlkbWlncmF0aW9uYXNzZXNzbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYWVudGVycHJpc2UvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGVyLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlZGlzLWNsdXN0ZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlZGlzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= --- .../google-cloud-networkservices/package.json | 2 +- ...adata_google.cloud.networkservices.v1.json | 2 +- ..._google.cloud.networkservices.v1beta1.json | 2 +- .../src/v1/dep_service_client.ts | 58 +- .../src/v1/network_services_client.ts | 222 ++++++-- .../src/v1beta1/dep_service_client.ts | 56 +- .../src/v1beta1/network_services_client.ts | 28 +- .../test/gapic_dep_service_v1.ts | 210 +++---- .../test/gapic_dep_service_v1beta1.ts | 140 ++--- .../test/gapic_network_services_v1.ts | 538 +++++++++--------- .../test/gapic_network_services_v1beta1.ts | 74 +-- packages/google-cloud-notebooks/package.json | 2 +- ...et_metadata.google.cloud.notebooks.v1.json | 2 +- ...et_metadata_google.cloud.notebooks.v1.json | 2 +- ...tadata.google.cloud.notebooks.v1beta1.json | 2 +- ...tadata_google.cloud.notebooks.v1beta1.json | 2 +- ...et_metadata_google.cloud.notebooks.v2.json | 2 +- .../src/v1/managed_notebook_service_client.ts | 62 +- .../src/v1/notebook_service_client.ts | 170 ++++-- .../src/v1beta1/notebook_service_client.ts | 94 ++- .../src/v2/notebook_service_client.ts | 58 +- .../test/gapic_managed_notebook_service_v1.ts | 224 ++++---- .../test/gapic_notebook_service_v1.ts | 454 +++++++-------- .../test/gapic_notebook_service_v1beta1.ts | 274 ++++----- .../test/gapic_notebook_service_v2.ts | 196 +++---- .../google-cloud-oracledatabase/package.json | 2 +- ...tadata_google.cloud.oracledatabase.v1.json | 2 +- .../src/v1/oracle_database_client.ts | 178 ++++-- .../test/gapic_oracle_database_v1.ts | 350 ++++++------ .../package.json | 2 +- .../src/v1/environments_client.ts | 130 +++-- .../src/v1/image_versions_client.ts | 12 +- .../src/v1beta1/environments_client.ts | 134 +++-- .../src/v1beta1/image_versions_client.ts | 12 +- .../test/gapic_environments_v1.ts | 274 ++++----- .../test/gapic_environments_v1beta1.ts | 286 +++++----- .../test/gapic_image_versions_v1.ts | 30 +- .../test/gapic_image_versions_v1beta1.ts | 30 +- packages/google-cloud-orgpolicy/package.json | 2 +- ...et_metadata.google.cloud.orgpolicy.v2.json | 2 +- ...et_metadata_google.cloud.orgpolicy.v2.json | 2 +- .../src/v2/org_policy_client.ts | 72 ++- .../test/gapic_org_policy_v2.ts | 154 ++--- packages/google-cloud-osconfig/package.json | 2 +- ...pet_metadata.google.cloud.osconfig.v1.json | 2 +- ...pet_metadata_google.cloud.osconfig.v1.json | 2 +- ...etadata.google.cloud.osconfig.v1alpha.json | 2 +- ...etadata_google.cloud.osconfig.v1alpha.json | 2 +- ...metadata.google.cloud.osconfig.v1beta.json | 2 +- ...metadata_google.cloud.osconfig.v1beta.json | 2 +- .../src/v1/os_config_service_client.ts | 72 ++- .../src/v1/os_config_zonal_service_client.ts | 88 ++- .../v1alpha/os_config_zonal_service_client.ts | 104 +++- .../src/v1beta/os_config_service_client.ts | 104 +++- .../test/gapic_os_config_service_v1.ts | 142 ++--- .../test/gapic_os_config_service_v1beta.ts | 184 +++--- .../test/gapic_os_config_zonal_service_v1.ts | 166 +++--- .../gapic_os_config_zonal_service_v1alpha.ts | 184 +++--- packages/google-cloud-oslogin/package.json | 2 +- ...ppet_metadata.google.cloud.oslogin.v1.json | 2 +- ...ppet_metadata_google.cloud.oslogin.v1.json | 2 +- ..._metadata.google.cloud.oslogin.v1beta.json | 2 +- ..._metadata_google.cloud.oslogin.v1beta.json | 2 +- .../src/v1/os_login_service_client.ts | 28 +- .../src/v1beta/os_login_service_client.ts | 32 +- .../test/gapic_os_login_service_v1.ts | 72 +-- .../test/gapic_os_login_service_v1beta.ts | 80 +-- .../google-cloud-parallelstore/package.json | 2 +- ...etadata_google.cloud.parallelstore.v1.json | 2 +- ...ata_google.cloud.parallelstore.v1beta.json | 2 +- .../src/v1/parallelstore_client.ts | 38 +- .../src/v1beta/parallelstore_client.ts | 38 +- .../test/gapic_parallelstore_v1.ts | 134 ++--- .../test/gapic_parallelstore_v1beta.ts | 134 ++--- .../package.json | 2 +- ...data_google.cloud.parametermanager.v1.json | 2 +- .../src/v1/parameter_manager_client.ts | 60 +- .../test/gapic_parameter_manager_v1.ts | 130 ++--- .../package.json | 2 +- ...ogle.cloud.phishingprotection.v1beta1.json | 2 +- ...ogle.cloud.phishingprotection.v1beta1.json | 2 +- ...hing_protection_service_v1_beta1_client.ts | 4 +- ...ing_protection_service_v1_beta1_v1beta1.ts | 16 +- .../google-cloud-policysimulator/package.json | 2 +- ...adata_google.cloud.policysimulator.v1.json | 2 +- .../src/v1/simulator_client.ts | 22 +- .../test/gapic_simulator_v1.ts | 76 +-- .../package.json | 2 +- ...gle.cloud.policytroubleshooter.iam.v3.json | 2 +- ...cloud.policytroubleshooter.iam.v3beta.json | 2 +- .../src/v3/policy_troubleshooter_client.ts | 4 +- .../v3beta/policy_troubleshooter_client.ts | 4 +- .../test/gapic_policy_troubleshooter_v3.ts | 12 +- .../gapic_policy_troubleshooter_v3beta.ts | 12 +- .../package.json | 2 +- ....google.cloud.policytroubleshooter.v1.json | 2 +- ..._google.cloud.policytroubleshooter.v1.json | 2 +- .../src/v1/iam_checker_client.ts | 4 +- .../test/gapic_iam_checker_v1.ts | 12 +- .../google-cloud-privatecatalog/package.json | 2 +- ...a.google.cloud.privatecatalog.v1beta1.json | 2 +- ...a_google.cloud.privatecatalog.v1beta1.json | 2 +- .../src/v1beta1/private_catalog_client.ts | 36 +- .../test/gapic_private_catalog_v1beta1.ts | 58 +- .../package.json | 2 +- ...ogle.cloud.privilegedaccessmanager.v1.json | 2 +- .../v1/privileged_access_manager_client.ts | 90 ++- .../gapic_privileged_access_manager_v1.ts | 212 +++---- .../package.json | 2 +- ...gle.cloud.rapidmigrationassessment.v1.json | 2 +- ...gle.cloud.rapidmigrationassessment.v1.json | 2 +- .../v1/rapid_migration_assessment_client.ts | 50 +- .../gapic_rapid_migration_assessment_v1.ts | 154 ++--- .../package.json | 2 +- .../v1/recaptcha_enterprise_service_client.ts | 136 +++-- ...tcha_enterprise_service_v1_beta1_client.ts | 8 +- .../gapic_recaptcha_enterprise_service_v1.ts | 244 ++++---- ...cha_enterprise_service_v1_beta1_v1beta1.ts | 28 +- .../google-cloud-recommender/package.json | 2 +- ..._metadata.google.cloud.recommender.v1.json | 2 +- ..._metadata_google.cloud.recommender.v1.json | 2 +- ...data.google.cloud.recommender.v1beta1.json | 2 +- ...data_google.cloud.recommender.v1beta1.json | 2 +- .../src/v1/recommender_client.ts | 68 ++- .../src/v1beta1/recommender_client.ts | 88 ++- .../test/gapic_recommender_v1.ts | 208 +++---- .../test/gapic_recommender_v1beta1.ts | 228 ++++---- .../google-cloud-redis-cluster/package.json | 2 +- ...etadata_google.cloud.redis.cluster.v1.json | 2 +- ...ta_google.cloud.redis.cluster.v1beta1.json | 2 +- .../src/v1/cloud_redis_cluster_client.ts | 82 ++- .../src/v1beta1/cloud_redis_cluster_client.ts | 82 ++- .../test/gapic_cloud_redis_cluster_v1.ts | 230 ++++---- .../test/gapic_cloud_redis_cluster_v1beta1.ts | 230 ++++---- packages/google-cloud-redis/package.json | 2 +- ...nippet_metadata.google.cloud.redis.v1.json | 2 +- ...nippet_metadata_google.cloud.redis.v1.json | 2 +- ...t_metadata.google.cloud.redis.v1beta1.json | 2 +- ...t_metadata_google.cloud.redis.v1beta1.json | 2 +- .../src/v1/cloud_redis_client.ts | 54 +- .../src/v1beta1/cloud_redis_client.ts | 52 +- .../test/gapic_cloud_redis_v1.ts | 162 +++--- .../test/gapic_cloud_redis_v1beta1.ts | 138 ++--- 143 files changed, 5294 insertions(+), 3950 deletions(-) diff --git a/packages/google-cloud-networkservices/package.json b/packages/google-cloud-networkservices/package.json index 56e3dc488ea..74fe0dee890 100644 --- a/packages/google-cloud-networkservices/package.json +++ b/packages/google-cloud-networkservices/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-networkservices/samples/generated/v1/snippet_metadata_google.cloud.networkservices.v1.json b/packages/google-cloud-networkservices/samples/generated/v1/snippet_metadata_google.cloud.networkservices.v1.json index ecff9fc15d7..5da4e9cc248 100644 --- a/packages/google-cloud-networkservices/samples/generated/v1/snippet_metadata_google.cloud.networkservices.v1.json +++ b/packages/google-cloud-networkservices/samples/generated/v1/snippet_metadata_google.cloud.networkservices.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkservices", - "version": "0.7.1", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkservices/samples/generated/v1beta1/snippet_metadata_google.cloud.networkservices.v1beta1.json b/packages/google-cloud-networkservices/samples/generated/v1beta1/snippet_metadata_google.cloud.networkservices.v1beta1.json index 63bf0d014d3..1df5b1e0303 100644 --- a/packages/google-cloud-networkservices/samples/generated/v1beta1/snippet_metadata_google.cloud.networkservices.v1beta1.json +++ b/packages/google-cloud-networkservices/samples/generated/v1beta1/snippet_metadata_google.cloud.networkservices.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkservices", - "version": "0.7.1", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkservices/src/v1/dep_service_client.ts b/packages/google-cloud-networkservices/src/v1/dep_service_client.ts index 2bee6529a2e..a02c1973af7 100644 --- a/packages/google-cloud-networkservices/src/v1/dep_service_client.ts +++ b/packages/google-cloud-networkservices/src/v1/dep_service_client.ts @@ -764,7 +764,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLbTrafficExtension request %j', request); const wrappedCallback: | Callback< @@ -891,7 +893,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLbRouteExtension request %j', request); const wrappedCallback: | Callback< @@ -1044,7 +1048,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1231,7 +1237,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ 'lb_traffic_extension.name': request.lbTrafficExtension!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1414,7 +1422,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1601,7 +1611,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1788,7 +1800,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ 'lb_route_extension.name': request.lbRouteExtension!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1971,7 +1985,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2140,7 +2156,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListLbTrafficExtensionsRequest, @@ -2212,7 +2230,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbTrafficExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbTrafficExtensions stream %j', request); return this.descriptors.page.listLbTrafficExtensions.createStream( this.innerApiCalls.listLbTrafficExtensions as GaxCall, @@ -2266,7 +2286,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbTrafficExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbTrafficExtensions iterate %j', request); return this.descriptors.page.listLbTrafficExtensions.asyncIterate( this.innerApiCalls['listLbTrafficExtensions'] as GaxCall, @@ -2375,7 +2397,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListLbRouteExtensionsRequest, @@ -2447,7 +2471,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbRouteExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbRouteExtensions stream %j', request); return this.descriptors.page.listLbRouteExtensions.createStream( this.innerApiCalls.listLbRouteExtensions as GaxCall, @@ -2501,7 +2527,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbRouteExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbRouteExtensions iterate %j', request); return this.descriptors.page.listLbRouteExtensions.asyncIterate( this.innerApiCalls['listLbRouteExtensions'] as GaxCall, @@ -2819,7 +2847,7 @@ export class DepServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkservices/src/v1/network_services_client.ts b/packages/google-cloud-networkservices/src/v1/network_services_client.ts index 64beb6d5921..89345a76e5e 100644 --- a/packages/google-cloud-networkservices/src/v1/network_services_client.ts +++ b/packages/google-cloud-networkservices/src/v1/network_services_client.ts @@ -979,7 +979,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEndpointPolicy request %j', request); const wrappedCallback: | Callback< @@ -1099,7 +1101,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGateway request %j', request); const wrappedCallback: | Callback< @@ -1216,7 +1220,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGrpcRoute request %j', request); const wrappedCallback: | Callback< @@ -1336,7 +1342,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHttpRoute request %j', request); const wrappedCallback: | Callback< @@ -1456,7 +1464,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTcpRoute request %j', request); const wrappedCallback: | Callback< @@ -1576,7 +1586,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTlsRoute request %j', request); const wrappedCallback: | Callback< @@ -1702,7 +1714,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServiceBinding request %j', request); const wrappedCallback: | Callback< @@ -1816,7 +1830,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMesh request %j', request); const wrappedCallback: | Callback< @@ -1951,7 +1967,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2124,7 +2142,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'endpoint_policy.name': request.endpointPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2292,7 +2312,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2464,7 +2486,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2637,7 +2661,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'gateway.name': request.gateway!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2805,7 +2831,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2977,7 +3005,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3150,7 +3180,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'grpc_route.name': request.grpcRoute!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3318,7 +3350,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3490,7 +3524,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3663,7 +3699,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'http_route.name': request.httpRoute!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3831,7 +3869,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4003,7 +4043,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4176,7 +4218,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'tcp_route.name': request.tcpRoute!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4344,7 +4388,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4516,7 +4562,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4689,7 +4737,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'tls_route.name': request.tlsRoute!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4857,7 +4907,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5029,7 +5081,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5197,7 +5251,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5369,7 +5425,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5542,7 +5600,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'mesh.name': request.mesh!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5710,7 +5770,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5876,7 +5938,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListEndpointPoliciesRequest, @@ -5945,7 +6009,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listEndpointPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpointPolicies stream %j', request); return this.descriptors.page.listEndpointPolicies.createStream( this.innerApiCalls.listEndpointPolicies as GaxCall, @@ -5996,7 +6062,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listEndpointPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpointPolicies iterate %j', request); return this.descriptors.page.listEndpointPolicies.asyncIterate( this.innerApiCalls['listEndpointPolicies'] as GaxCall, @@ -6101,7 +6169,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListGatewaysRequest, @@ -6169,7 +6239,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGateways stream %j', request); return this.descriptors.page.listGateways.createStream( this.innerApiCalls.listGateways as GaxCall, @@ -6219,7 +6291,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listGateways']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGateways iterate %j', request); return this.descriptors.page.listGateways.asyncIterate( this.innerApiCalls['listGateways'] as GaxCall, @@ -6324,7 +6398,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListGrpcRoutesRequest, @@ -6392,7 +6468,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listGrpcRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGrpcRoutes stream %j', request); return this.descriptors.page.listGrpcRoutes.createStream( this.innerApiCalls.listGrpcRoutes as GaxCall, @@ -6442,7 +6520,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listGrpcRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGrpcRoutes iterate %j', request); return this.descriptors.page.listGrpcRoutes.asyncIterate( this.innerApiCalls['listGrpcRoutes'] as GaxCall, @@ -6547,7 +6627,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListHttpRoutesRequest, @@ -6615,7 +6697,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listHttpRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHttpRoutes stream %j', request); return this.descriptors.page.listHttpRoutes.createStream( this.innerApiCalls.listHttpRoutes as GaxCall, @@ -6665,7 +6749,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listHttpRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHttpRoutes iterate %j', request); return this.descriptors.page.listHttpRoutes.asyncIterate( this.innerApiCalls['listHttpRoutes'] as GaxCall, @@ -6770,7 +6856,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListTcpRoutesRequest, @@ -6838,7 +6926,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listTcpRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTcpRoutes stream %j', request); return this.descriptors.page.listTcpRoutes.createStream( this.innerApiCalls.listTcpRoutes as GaxCall, @@ -6888,7 +6978,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listTcpRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTcpRoutes iterate %j', request); return this.descriptors.page.listTcpRoutes.asyncIterate( this.innerApiCalls['listTcpRoutes'] as GaxCall, @@ -6993,7 +7085,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListTlsRoutesRequest, @@ -7061,7 +7155,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listTlsRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTlsRoutes stream %j', request); return this.descriptors.page.listTlsRoutes.createStream( this.innerApiCalls.listTlsRoutes as GaxCall, @@ -7111,7 +7207,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listTlsRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTlsRoutes iterate %j', request); return this.descriptors.page.listTlsRoutes.asyncIterate( this.innerApiCalls['listTlsRoutes'] as GaxCall, @@ -7216,7 +7314,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListServiceBindingsRequest, @@ -7284,7 +7384,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listServiceBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceBindings stream %j', request); return this.descriptors.page.listServiceBindings.createStream( this.innerApiCalls.listServiceBindings as GaxCall, @@ -7334,7 +7436,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listServiceBindings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServiceBindings iterate %j', request); return this.descriptors.page.listServiceBindings.asyncIterate( this.innerApiCalls['listServiceBindings'] as GaxCall, @@ -7439,7 +7543,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1.IListMeshesRequest, @@ -7507,7 +7613,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listMeshes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMeshes stream %j', request); return this.descriptors.page.listMeshes.createStream( this.innerApiCalls.listMeshes as GaxCall, @@ -7557,7 +7665,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listMeshes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMeshes iterate %j', request); return this.descriptors.page.listMeshes.asyncIterate( this.innerApiCalls['listMeshes'] as GaxCall, @@ -7875,7 +7985,7 @@ export class NetworkServicesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-networkservices/src/v1beta1/dep_service_client.ts b/packages/google-cloud-networkservices/src/v1beta1/dep_service_client.ts index 38ab2ffd900..445bbb27b78 100644 --- a/packages/google-cloud-networkservices/src/v1beta1/dep_service_client.ts +++ b/packages/google-cloud-networkservices/src/v1beta1/dep_service_client.ts @@ -659,7 +659,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLbTrafficExtension request %j', request); const wrappedCallback: | Callback< @@ -786,7 +788,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLbRouteExtension request %j', request); const wrappedCallback: | Callback< @@ -939,7 +943,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1126,7 +1132,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ 'lb_traffic_extension.name': request.lbTrafficExtension!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1309,7 +1317,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1496,7 +1506,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1683,7 +1695,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ 'lb_route_extension.name': request.lbRouteExtension!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1866,7 +1880,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2035,7 +2051,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1beta1.IListLbTrafficExtensionsRequest, @@ -2107,7 +2125,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbTrafficExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbTrafficExtensions stream %j', request); return this.descriptors.page.listLbTrafficExtensions.createStream( this.innerApiCalls.listLbTrafficExtensions as GaxCall, @@ -2161,7 +2181,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbTrafficExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbTrafficExtensions iterate %j', request); return this.descriptors.page.listLbTrafficExtensions.asyncIterate( this.innerApiCalls['listLbTrafficExtensions'] as GaxCall, @@ -2270,7 +2292,9 @@ export class DepServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1beta1.IListLbRouteExtensionsRequest, @@ -2342,7 +2366,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbRouteExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbRouteExtensions stream %j', request); return this.descriptors.page.listLbRouteExtensions.createStream( this.innerApiCalls.listLbRouteExtensions as GaxCall, @@ -2396,7 +2422,9 @@ export class DepServiceClient { }); const defaultCallSettings = this._defaults['listLbRouteExtensions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listLbRouteExtensions iterate %j', request); return this.descriptors.page.listLbRouteExtensions.asyncIterate( this.innerApiCalls['listLbRouteExtensions'] as GaxCall, diff --git a/packages/google-cloud-networkservices/src/v1beta1/network_services_client.ts b/packages/google-cloud-networkservices/src/v1beta1/network_services_client.ts index 3362eb2b74e..1bc61533c97 100644 --- a/packages/google-cloud-networkservices/src/v1beta1/network_services_client.ts +++ b/packages/google-cloud-networkservices/src/v1beta1/network_services_client.ts @@ -586,7 +586,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEndpointPolicy request %j', request); const wrappedCallback: | Callback< @@ -724,7 +726,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -897,7 +901,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ 'endpoint_policy.name': request.endpointPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1065,7 +1071,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1231,7 +1239,9 @@ export class NetworkServicesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.networkservices.v1beta1.IListEndpointPoliciesRequest, @@ -1300,7 +1310,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listEndpointPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpointPolicies stream %j', request); return this.descriptors.page.listEndpointPolicies.createStream( this.innerApiCalls.listEndpointPolicies as GaxCall, @@ -1351,7 +1363,9 @@ export class NetworkServicesClient { }); const defaultCallSettings = this._defaults['listEndpointPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEndpointPolicies iterate %j', request); return this.descriptors.page.listEndpointPolicies.asyncIterate( this.innerApiCalls['listEndpointPolicies'] as GaxCall, diff --git a/packages/google-cloud-networkservices/test/gapic_dep_service_v1.ts b/packages/google-cloud-networkservices/test/gapic_dep_service_v1.ts index a63285e25ba..f846ffec9b6 100644 --- a/packages/google-cloud-networkservices/test/gapic_dep_service_v1.ts +++ b/packages/google-cloud-networkservices/test/gapic_dep_service_v1.ts @@ -291,7 +291,9 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.depServiceStub); client.close().then(() => { done(); @@ -350,7 +352,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest() ); @@ -382,7 +384,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest() ); @@ -429,7 +431,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest() ); @@ -463,7 +465,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest() ); @@ -487,7 +489,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbRouteExtensionRequest() ); @@ -519,7 +521,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbRouteExtensionRequest() ); @@ -566,7 +568,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbRouteExtensionRequest() ); @@ -597,7 +599,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetLbRouteExtensionRequest() ); @@ -618,7 +620,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest() ); @@ -651,7 +653,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest() ); @@ -705,7 +707,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest() ); @@ -739,7 +741,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest() ); @@ -772,7 +774,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -795,7 +797,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -816,7 +818,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest() ); @@ -850,7 +852,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest() ); @@ -905,7 +907,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest() ); @@ -940,7 +942,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest() ); @@ -974,7 +976,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -997,7 +999,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1018,7 +1020,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest() ); @@ -1051,7 +1053,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest() ); @@ -1139,7 +1141,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1195,7 +1197,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1216,7 +1218,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest() ); @@ -1249,7 +1251,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest() ); @@ -1303,7 +1305,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest() ); @@ -1370,7 +1372,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1392,7 +1394,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1413,7 +1415,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest() ); @@ -1447,7 +1449,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest() ); @@ -1571,7 +1573,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1593,7 +1595,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1614,7 +1616,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest() ); @@ -1647,7 +1649,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest() ); @@ -1701,7 +1703,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest() ); @@ -1735,7 +1737,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest() ); @@ -1768,7 +1770,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1790,7 +1792,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1811,7 +1813,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest() ); @@ -1851,7 +1853,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest() ); @@ -1908,7 +1910,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest() ); @@ -1942,7 +1944,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest() ); @@ -2011,7 +2013,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest() ); @@ -2069,7 +2071,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest() ); @@ -2123,7 +2125,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest() ); @@ -2170,7 +2172,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest() ); @@ -2210,7 +2212,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest() ); @@ -2267,7 +2269,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest() ); @@ -2301,7 +2303,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest() ); @@ -2370,7 +2372,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest() ); @@ -2428,7 +2430,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest() ); @@ -2482,7 +2484,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest() ); @@ -2528,7 +2530,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2558,7 +2560,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2602,7 +2604,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2634,7 +2636,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2664,7 +2666,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2708,7 +2710,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2740,7 +2742,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2773,7 +2775,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2817,7 +2819,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2852,7 +2854,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2882,7 +2884,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2926,7 +2928,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2961,7 +2963,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3009,7 +3011,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3050,7 +3052,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3129,7 +3131,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3209,7 +3211,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3305,8 +3307,7 @@ describe('v1.DepServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3325,7 +3326,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3334,8 +3335,7 @@ describe('v1.DepServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3351,7 +3351,7 @@ describe('v1.DepServiceClient', () => { }); describe('Path templates', () => { - describe('endpointPolicy', () => { + describe('endpointPolicy', async () => { const fakePath = '/rendered/path/endpointPolicy'; const expectedParameters = { project: 'projectValue', @@ -3362,7 +3362,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3416,7 +3416,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('gateway', () => { + describe('gateway', async () => { const fakePath = '/rendered/path/gateway'; const expectedParameters = { project: 'projectValue', @@ -3427,7 +3427,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.gatewayPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3480,7 +3480,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('grpcRoute', () => { + describe('grpcRoute', async () => { const fakePath = '/rendered/path/grpcRoute'; const expectedParameters = { project: 'projectValue', @@ -3491,7 +3491,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.grpcRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3544,7 +3544,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('httpRoute', () => { + describe('httpRoute', async () => { const fakePath = '/rendered/path/httpRoute'; const expectedParameters = { project: 'projectValue', @@ -3555,7 +3555,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.httpRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3608,7 +3608,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('lbRouteExtension', () => { + describe('lbRouteExtension', async () => { const fakePath = '/rendered/path/lbRouteExtension'; const expectedParameters = { project: 'projectValue', @@ -3619,7 +3619,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbRouteExtensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3676,7 +3676,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('lbTrafficExtension', () => { + describe('lbTrafficExtension', async () => { const fakePath = '/rendered/path/lbTrafficExtension'; const expectedParameters = { project: 'projectValue', @@ -3687,7 +3687,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbTrafficExtensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3753,7 +3753,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3763,7 +3763,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3802,7 +3802,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('mesh', () => { + describe('mesh', async () => { const fakePath = '/rendered/path/mesh'; const expectedParameters = { project: 'projectValue', @@ -3813,7 +3813,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.meshPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3866,7 +3866,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3875,7 +3875,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3904,7 +3904,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('serviceBinding', () => { + describe('serviceBinding', async () => { const fakePath = '/rendered/path/serviceBinding'; const expectedParameters = { project: 'projectValue', @@ -3915,7 +3915,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3969,7 +3969,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('tcpRoute', () => { + describe('tcpRoute', async () => { const fakePath = '/rendered/path/tcpRoute'; const expectedParameters = { project: 'projectValue', @@ -3980,7 +3980,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tcpRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4033,7 +4033,7 @@ describe('v1.DepServiceClient', () => { }); }); - describe('tlsRoute', () => { + describe('tlsRoute', async () => { const fakePath = '/rendered/path/tlsRoute'; const expectedParameters = { project: 'projectValue', @@ -4044,7 +4044,7 @@ describe('v1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tlsRoutePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkservices/test/gapic_dep_service_v1beta1.ts b/packages/google-cloud-networkservices/test/gapic_dep_service_v1beta1.ts index 0b83f00d994..91390580a0c 100644 --- a/packages/google-cloud-networkservices/test/gapic_dep_service_v1beta1.ts +++ b/packages/google-cloud-networkservices/test/gapic_dep_service_v1beta1.ts @@ -287,7 +287,9 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.depServiceStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbTrafficExtensionRequest() ); @@ -378,7 +380,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbTrafficExtensionRequest() ); @@ -425,7 +427,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbTrafficExtensionRequest() ); @@ -459,7 +461,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbTrafficExtensionRequest() ); @@ -483,7 +485,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbRouteExtensionRequest() ); @@ -515,7 +517,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbRouteExtensionRequest() ); @@ -562,7 +564,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbRouteExtensionRequest() ); @@ -593,7 +595,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetLbRouteExtensionRequest() ); @@ -614,7 +616,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbTrafficExtensionRequest() ); @@ -647,7 +649,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbTrafficExtensionRequest() ); @@ -701,7 +703,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbTrafficExtensionRequest() ); @@ -735,7 +737,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbTrafficExtensionRequest() ); @@ -768,7 +770,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -791,7 +793,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -812,7 +814,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbTrafficExtensionRequest() ); @@ -846,7 +848,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbTrafficExtensionRequest() ); @@ -901,7 +903,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbTrafficExtensionRequest() ); @@ -936,7 +938,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbTrafficExtensionRequest() ); @@ -970,7 +972,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -993,7 +995,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1014,7 +1016,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbTrafficExtensionRequest() ); @@ -1047,7 +1049,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbTrafficExtensionRequest() ); @@ -1101,7 +1103,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbTrafficExtensionRequest() ); @@ -1135,7 +1137,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbTrafficExtensionRequest() ); @@ -1168,7 +1170,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1191,7 +1193,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1212,7 +1214,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbRouteExtensionRequest() ); @@ -1245,7 +1247,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbRouteExtensionRequest() ); @@ -1299,7 +1301,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbRouteExtensionRequest() ); @@ -1333,7 +1335,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateLbRouteExtensionRequest() ); @@ -1366,7 +1368,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1388,7 +1390,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1409,7 +1411,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbRouteExtensionRequest() ); @@ -1443,7 +1445,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbRouteExtensionRequest() ); @@ -1498,7 +1500,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbRouteExtensionRequest() ); @@ -1533,7 +1535,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateLbRouteExtensionRequest() ); @@ -1567,7 +1569,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1589,7 +1591,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1610,7 +1612,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbRouteExtensionRequest() ); @@ -1643,7 +1645,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbRouteExtensionRequest() ); @@ -1697,7 +1699,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbRouteExtensionRequest() ); @@ -1731,7 +1733,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteLbRouteExtensionRequest() ); @@ -1764,7 +1766,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1786,7 +1788,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1807,7 +1809,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbTrafficExtensionsRequest() ); @@ -1847,7 +1849,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbTrafficExtensionsRequest() ); @@ -1904,7 +1906,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbTrafficExtensionsRequest() ); @@ -1938,7 +1940,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbTrafficExtensionsRequest() ); @@ -2007,7 +2009,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbTrafficExtensionsRequest() ); @@ -2065,7 +2067,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbTrafficExtensionsRequest() ); @@ -2119,7 +2121,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbTrafficExtensionsRequest() ); @@ -2166,7 +2168,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbRouteExtensionsRequest() ); @@ -2206,7 +2208,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbRouteExtensionsRequest() ); @@ -2263,7 +2265,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbRouteExtensionsRequest() ); @@ -2297,7 +2299,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbRouteExtensionsRequest() ); @@ -2366,7 +2368,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbRouteExtensionsRequest() ); @@ -2424,7 +2426,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbRouteExtensionsRequest() ); @@ -2478,7 +2480,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListLbRouteExtensionsRequest() ); @@ -2520,7 +2522,7 @@ describe('v1beta1.DepServiceClient', () => { }); describe('Path templates', () => { - describe('endpointPolicy', () => { + describe('endpointPolicy', async () => { const fakePath = '/rendered/path/endpointPolicy'; const expectedParameters = { project: 'projectValue', @@ -2531,7 +2533,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2585,7 +2587,7 @@ describe('v1beta1.DepServiceClient', () => { }); }); - describe('lbRouteExtension', () => { + describe('lbRouteExtension', async () => { const fakePath = '/rendered/path/lbRouteExtension'; const expectedParameters = { project: 'projectValue', @@ -2596,7 +2598,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbRouteExtensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2653,7 +2655,7 @@ describe('v1beta1.DepServiceClient', () => { }); }); - describe('lbTrafficExtension', () => { + describe('lbTrafficExtension', async () => { const fakePath = '/rendered/path/lbTrafficExtension'; const expectedParameters = { project: 'projectValue', @@ -2664,7 +2666,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbTrafficExtensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2730,7 +2732,7 @@ describe('v1beta1.DepServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2740,7 +2742,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2779,7 +2781,7 @@ describe('v1beta1.DepServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2788,7 +2790,7 @@ describe('v1beta1.DepServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkservices/test/gapic_network_services_v1.ts b/packages/google-cloud-networkservices/test/gapic_network_services_v1.ts index 94c9cdf4f91..60678417325 100644 --- a/packages/google-cloud-networkservices/test/gapic_network_services_v1.ts +++ b/packages/google-cloud-networkservices/test/gapic_network_services_v1.ts @@ -293,7 +293,9 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkServicesStub); client.close().then(() => { done(); @@ -352,7 +354,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetEndpointPolicyRequest() ); @@ -383,7 +385,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetEndpointPolicyRequest() ); @@ -430,7 +432,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetEndpointPolicyRequest() ); @@ -461,7 +463,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetEndpointPolicyRequest() ); @@ -482,7 +484,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGatewayRequest() ); @@ -513,7 +515,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGatewayRequest() ); @@ -560,7 +562,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGatewayRequest() ); @@ -591,7 +593,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGatewayRequest() ); @@ -612,7 +614,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGrpcRouteRequest() ); @@ -643,7 +645,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGrpcRouteRequest() ); @@ -690,7 +692,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGrpcRouteRequest() ); @@ -721,7 +723,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetGrpcRouteRequest() ); @@ -742,7 +744,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetHttpRouteRequest() ); @@ -773,7 +775,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetHttpRouteRequest() ); @@ -820,7 +822,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetHttpRouteRequest() ); @@ -851,7 +853,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetHttpRouteRequest() ); @@ -872,7 +874,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTcpRouteRequest() ); @@ -903,7 +905,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTcpRouteRequest() ); @@ -950,7 +952,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTcpRouteRequest() ); @@ -981,7 +983,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTcpRouteRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTlsRouteRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTlsRouteRequest() ); @@ -1080,7 +1082,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTlsRouteRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetTlsRouteRequest() ); @@ -1132,7 +1134,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetServiceBindingRequest() ); @@ -1163,7 +1165,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetServiceBindingRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetServiceBindingRequest() ); @@ -1241,7 +1243,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetServiceBindingRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetMeshRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetMeshRequest() ); @@ -1340,7 +1342,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetMeshRequest() ); @@ -1368,7 +1370,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.GetMeshRequest() ); @@ -1389,7 +1391,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateEndpointPolicyRequest() ); @@ -1422,7 +1424,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateEndpointPolicyRequest() ); @@ -1476,7 +1478,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateEndpointPolicyRequest() ); @@ -1507,7 +1509,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateEndpointPolicyRequest() ); @@ -1540,7 +1542,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1562,7 +1564,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1583,7 +1585,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest() ); @@ -1617,7 +1619,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest() ); @@ -1672,7 +1674,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest() ); @@ -1704,7 +1706,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest() ); @@ -1738,7 +1740,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1760,7 +1762,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1781,7 +1783,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest() ); @@ -1814,7 +1816,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest() ); @@ -1868,7 +1870,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest() ); @@ -1899,7 +1901,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest() ); @@ -1932,7 +1934,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1954,7 +1956,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1975,7 +1977,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGatewayRequest() ); @@ -2008,7 +2010,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGatewayRequest() ); @@ -2062,7 +2064,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGatewayRequest() ); @@ -2093,7 +2095,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGatewayRequest() ); @@ -2126,7 +2128,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2148,7 +2150,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2169,7 +2171,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGatewayRequest() ); @@ -2203,7 +2205,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGatewayRequest() ); @@ -2258,7 +2260,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGatewayRequest() ); @@ -2290,7 +2292,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGatewayRequest() ); @@ -2324,7 +2326,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2346,7 +2348,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2367,7 +2369,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGatewayRequest() ); @@ -2400,7 +2402,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGatewayRequest() ); @@ -2454,7 +2456,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGatewayRequest() ); @@ -2485,7 +2487,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGatewayRequest() ); @@ -2518,7 +2520,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2540,7 +2542,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2561,7 +2563,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGrpcRouteRequest() ); @@ -2594,7 +2596,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGrpcRouteRequest() ); @@ -2648,7 +2650,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGrpcRouteRequest() ); @@ -2679,7 +2681,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateGrpcRouteRequest() ); @@ -2712,7 +2714,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2734,7 +2736,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2755,7 +2757,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGrpcRouteRequest() ); @@ -2789,7 +2791,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGrpcRouteRequest() ); @@ -2844,7 +2846,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGrpcRouteRequest() ); @@ -2876,7 +2878,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateGrpcRouteRequest() ); @@ -2910,7 +2912,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2932,7 +2934,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2953,7 +2955,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGrpcRouteRequest() ); @@ -2986,7 +2988,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGrpcRouteRequest() ); @@ -3040,7 +3042,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGrpcRouteRequest() ); @@ -3071,7 +3073,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteGrpcRouteRequest() ); @@ -3104,7 +3106,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3126,7 +3128,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3147,7 +3149,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateHttpRouteRequest() ); @@ -3180,7 +3182,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateHttpRouteRequest() ); @@ -3234,7 +3236,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateHttpRouteRequest() ); @@ -3265,7 +3267,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateHttpRouteRequest() ); @@ -3298,7 +3300,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3320,7 +3322,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3341,7 +3343,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateHttpRouteRequest() ); @@ -3375,7 +3377,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateHttpRouteRequest() ); @@ -3430,7 +3432,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateHttpRouteRequest() ); @@ -3462,7 +3464,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateHttpRouteRequest() ); @@ -3496,7 +3498,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3518,7 +3520,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3539,7 +3541,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteHttpRouteRequest() ); @@ -3572,7 +3574,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteHttpRouteRequest() ); @@ -3626,7 +3628,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteHttpRouteRequest() ); @@ -3657,7 +3659,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteHttpRouteRequest() ); @@ -3690,7 +3692,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3712,7 +3714,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3733,7 +3735,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTcpRouteRequest() ); @@ -3766,7 +3768,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTcpRouteRequest() ); @@ -3820,7 +3822,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTcpRouteRequest() ); @@ -3851,7 +3853,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTcpRouteRequest() ); @@ -3884,7 +3886,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3906,7 +3908,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3927,7 +3929,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTcpRouteRequest() ); @@ -3961,7 +3963,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTcpRouteRequest() ); @@ -4016,7 +4018,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTcpRouteRequest() ); @@ -4048,7 +4050,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTcpRouteRequest() ); @@ -4082,7 +4084,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4104,7 +4106,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4125,7 +4127,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTcpRouteRequest() ); @@ -4158,7 +4160,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTcpRouteRequest() ); @@ -4212,7 +4214,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTcpRouteRequest() ); @@ -4243,7 +4245,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTcpRouteRequest() ); @@ -4276,7 +4278,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4298,7 +4300,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4319,7 +4321,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTlsRouteRequest() ); @@ -4352,7 +4354,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTlsRouteRequest() ); @@ -4406,7 +4408,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTlsRouteRequest() ); @@ -4437,7 +4439,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateTlsRouteRequest() ); @@ -4470,7 +4472,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4492,7 +4494,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4513,7 +4515,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTlsRouteRequest() ); @@ -4547,7 +4549,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTlsRouteRequest() ); @@ -4602,7 +4604,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTlsRouteRequest() ); @@ -4634,7 +4636,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateTlsRouteRequest() ); @@ -4668,7 +4670,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4690,7 +4692,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4711,7 +4713,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTlsRouteRequest() ); @@ -4744,7 +4746,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTlsRouteRequest() ); @@ -4798,7 +4800,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTlsRouteRequest() ); @@ -4829,7 +4831,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteTlsRouteRequest() ); @@ -4862,7 +4864,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4884,7 +4886,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4905,7 +4907,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateServiceBindingRequest() ); @@ -4938,7 +4940,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateServiceBindingRequest() ); @@ -4992,7 +4994,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateServiceBindingRequest() ); @@ -5023,7 +5025,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateServiceBindingRequest() ); @@ -5056,7 +5058,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5078,7 +5080,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5099,7 +5101,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteServiceBindingRequest() ); @@ -5132,7 +5134,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteServiceBindingRequest() ); @@ -5186,7 +5188,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteServiceBindingRequest() ); @@ -5217,7 +5219,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteServiceBindingRequest() ); @@ -5250,7 +5252,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5272,7 +5274,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5293,7 +5295,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateMeshRequest() ); @@ -5325,7 +5327,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateMeshRequest() ); @@ -5379,7 +5381,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateMeshRequest() ); @@ -5410,7 +5412,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.CreateMeshRequest() ); @@ -5443,7 +5445,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5465,7 +5467,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5483,7 +5485,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateMeshRequest() ); @@ -5516,7 +5518,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateMeshRequest() ); @@ -5571,7 +5573,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateMeshRequest() ); @@ -5603,7 +5605,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.UpdateMeshRequest() ); @@ -5637,7 +5639,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5659,7 +5661,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5677,7 +5679,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteMeshRequest() ); @@ -5709,7 +5711,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteMeshRequest() ); @@ -5763,7 +5765,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteMeshRequest() ); @@ -5794,7 +5796,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.DeleteMeshRequest() ); @@ -5827,7 +5829,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5849,7 +5851,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5867,7 +5869,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListEndpointPoliciesRequest() ); @@ -5907,7 +5909,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListEndpointPoliciesRequest() ); @@ -5964,7 +5966,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListEndpointPoliciesRequest() ); @@ -5995,7 +5997,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListEndpointPoliciesRequest() ); @@ -6056,7 +6058,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListEndpointPoliciesRequest() ); @@ -6106,7 +6108,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListEndpointPoliciesRequest() ); @@ -6156,7 +6158,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListEndpointPoliciesRequest() ); @@ -6199,7 +6201,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGatewaysRequest() ); @@ -6238,7 +6240,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGatewaysRequest() ); @@ -6293,7 +6295,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGatewaysRequest() ); @@ -6324,7 +6326,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGatewaysRequest() ); @@ -6384,7 +6386,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGatewaysRequest() ); @@ -6435,7 +6437,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGatewaysRequest() ); @@ -6484,7 +6486,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGatewaysRequest() ); @@ -6526,7 +6528,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGrpcRoutesRequest() ); @@ -6565,7 +6567,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGrpcRoutesRequest() ); @@ -6620,7 +6622,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGrpcRoutesRequest() ); @@ -6651,7 +6653,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGrpcRoutesRequest() ); @@ -6712,7 +6714,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGrpcRoutesRequest() ); @@ -6762,7 +6764,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGrpcRoutesRequest() ); @@ -6811,7 +6813,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListGrpcRoutesRequest() ); @@ -6854,7 +6856,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListHttpRoutesRequest() ); @@ -6893,7 +6895,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListHttpRoutesRequest() ); @@ -6948,7 +6950,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListHttpRoutesRequest() ); @@ -6979,7 +6981,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListHttpRoutesRequest() ); @@ -7040,7 +7042,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListHttpRoutesRequest() ); @@ -7090,7 +7092,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListHttpRoutesRequest() ); @@ -7139,7 +7141,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListHttpRoutesRequest() ); @@ -7182,7 +7184,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTcpRoutesRequest() ); @@ -7221,7 +7223,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTcpRoutesRequest() ); @@ -7276,7 +7278,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTcpRoutesRequest() ); @@ -7307,7 +7309,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTcpRoutesRequest() ); @@ -7367,7 +7369,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTcpRoutesRequest() ); @@ -7416,7 +7418,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTcpRoutesRequest() ); @@ -7465,7 +7467,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTcpRoutesRequest() ); @@ -7508,7 +7510,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTlsRoutesRequest() ); @@ -7547,7 +7549,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTlsRoutesRequest() ); @@ -7602,7 +7604,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTlsRoutesRequest() ); @@ -7633,7 +7635,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTlsRoutesRequest() ); @@ -7693,7 +7695,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTlsRoutesRequest() ); @@ -7742,7 +7744,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTlsRoutesRequest() ); @@ -7791,7 +7793,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListTlsRoutesRequest() ); @@ -7834,7 +7836,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListServiceBindingsRequest() ); @@ -7874,7 +7876,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListServiceBindingsRequest() ); @@ -7931,7 +7933,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListServiceBindingsRequest() ); @@ -7962,7 +7964,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListServiceBindingsRequest() ); @@ -8023,7 +8025,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListServiceBindingsRequest() ); @@ -8073,7 +8075,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListServiceBindingsRequest() ); @@ -8123,7 +8125,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListServiceBindingsRequest() ); @@ -8166,7 +8168,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListMeshesRequest() ); @@ -8205,7 +8207,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListMeshesRequest() ); @@ -8260,7 +8262,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListMeshesRequest() ); @@ -8291,7 +8293,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListMeshesRequest() ); @@ -8351,7 +8353,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListMeshesRequest() ); @@ -8402,7 +8404,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListMeshesRequest() ); @@ -8451,7 +8453,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1.ListMeshesRequest() ); @@ -8494,7 +8496,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8524,7 +8526,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8568,7 +8570,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8600,7 +8602,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -8630,7 +8632,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -8674,7 +8676,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -8706,7 +8708,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -8739,7 +8741,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -8783,7 +8785,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -8818,7 +8820,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -8848,7 +8850,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -8892,7 +8894,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -8927,7 +8929,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -8975,7 +8977,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9016,7 +9018,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -9095,7 +9097,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -9175,7 +9177,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -9271,8 +9273,7 @@ describe('v1.NetworkServicesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -9291,7 +9292,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -9300,8 +9301,7 @@ describe('v1.NetworkServicesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -9317,7 +9317,7 @@ describe('v1.NetworkServicesClient', () => { }); describe('Path templates', () => { - describe('endpointPolicy', () => { + describe('endpointPolicy', async () => { const fakePath = '/rendered/path/endpointPolicy'; const expectedParameters = { project: 'projectValue', @@ -9328,7 +9328,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9382,7 +9382,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('gateway', () => { + describe('gateway', async () => { const fakePath = '/rendered/path/gateway'; const expectedParameters = { project: 'projectValue', @@ -9393,7 +9393,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.gatewayPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9446,7 +9446,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('grpcRoute', () => { + describe('grpcRoute', async () => { const fakePath = '/rendered/path/grpcRoute'; const expectedParameters = { project: 'projectValue', @@ -9457,7 +9457,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.grpcRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9510,7 +9510,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('httpRoute', () => { + describe('httpRoute', async () => { const fakePath = '/rendered/path/httpRoute'; const expectedParameters = { project: 'projectValue', @@ -9521,7 +9521,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.httpRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9574,7 +9574,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('lbRouteExtension', () => { + describe('lbRouteExtension', async () => { const fakePath = '/rendered/path/lbRouteExtension'; const expectedParameters = { project: 'projectValue', @@ -9585,7 +9585,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbRouteExtensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9642,7 +9642,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('lbTrafficExtension', () => { + describe('lbTrafficExtension', async () => { const fakePath = '/rendered/path/lbTrafficExtension'; const expectedParameters = { project: 'projectValue', @@ -9653,7 +9653,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbTrafficExtensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9719,7 +9719,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('mesh', () => { + describe('mesh', async () => { const fakePath = '/rendered/path/mesh'; const expectedParameters = { project: 'projectValue', @@ -9730,7 +9730,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.meshPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9783,7 +9783,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('serviceBinding', () => { + describe('serviceBinding', async () => { const fakePath = '/rendered/path/serviceBinding'; const expectedParameters = { project: 'projectValue', @@ -9794,7 +9794,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceBindingPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9848,7 +9848,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('tcpRoute', () => { + describe('tcpRoute', async () => { const fakePath = '/rendered/path/tcpRoute'; const expectedParameters = { project: 'projectValue', @@ -9859,7 +9859,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tcpRoutePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9912,7 +9912,7 @@ describe('v1.NetworkServicesClient', () => { }); }); - describe('tlsRoute', () => { + describe('tlsRoute', async () => { const fakePath = '/rendered/path/tlsRoute'; const expectedParameters = { project: 'projectValue', @@ -9923,7 +9923,7 @@ describe('v1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.tlsRoutePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-networkservices/test/gapic_network_services_v1beta1.ts b/packages/google-cloud-networkservices/test/gapic_network_services_v1beta1.ts index cc67be8df15..10e421a119b 100644 --- a/packages/google-cloud-networkservices/test/gapic_network_services_v1beta1.ts +++ b/packages/google-cloud-networkservices/test/gapic_network_services_v1beta1.ts @@ -289,7 +289,9 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.networkServicesStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetEndpointPolicyRequest() ); @@ -379,7 +381,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetEndpointPolicyRequest() ); @@ -426,7 +428,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetEndpointPolicyRequest() ); @@ -457,7 +459,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.GetEndpointPolicyRequest() ); @@ -478,7 +480,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateEndpointPolicyRequest() ); @@ -511,7 +513,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateEndpointPolicyRequest() ); @@ -565,7 +567,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateEndpointPolicyRequest() ); @@ -596,7 +598,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.CreateEndpointPolicyRequest() ); @@ -629,7 +631,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -651,7 +653,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -672,7 +674,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateEndpointPolicyRequest() ); @@ -706,7 +708,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateEndpointPolicyRequest() ); @@ -761,7 +763,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateEndpointPolicyRequest() ); @@ -793,7 +795,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.UpdateEndpointPolicyRequest() ); @@ -827,7 +829,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -849,7 +851,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -870,7 +872,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteEndpointPolicyRequest() ); @@ -903,7 +905,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteEndpointPolicyRequest() ); @@ -957,7 +959,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteEndpointPolicyRequest() ); @@ -988,7 +990,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.DeleteEndpointPolicyRequest() ); @@ -1021,7 +1023,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1043,7 +1045,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1064,7 +1066,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListEndpointPoliciesRequest() ); @@ -1104,7 +1106,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListEndpointPoliciesRequest() ); @@ -1161,7 +1163,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListEndpointPoliciesRequest() ); @@ -1192,7 +1194,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListEndpointPoliciesRequest() ); @@ -1255,7 +1257,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListEndpointPoliciesRequest() ); @@ -1307,7 +1309,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListEndpointPoliciesRequest() ); @@ -1357,7 +1359,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.networkservices.v1beta1.ListEndpointPoliciesRequest() ); @@ -1395,7 +1397,7 @@ describe('v1beta1.NetworkServicesClient', () => { }); describe('Path templates', () => { - describe('endpointPolicy', () => { + describe('endpointPolicy', async () => { const fakePath = '/rendered/path/endpointPolicy'; const expectedParameters = { project: 'projectValue', @@ -1406,7 +1408,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.endpointPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1460,7 +1462,7 @@ describe('v1beta1.NetworkServicesClient', () => { }); }); - describe('lbRouteExtension', () => { + describe('lbRouteExtension', async () => { const fakePath = '/rendered/path/lbRouteExtension'; const expectedParameters = { project: 'projectValue', @@ -1471,7 +1473,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbRouteExtensionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1528,7 +1530,7 @@ describe('v1beta1.NetworkServicesClient', () => { }); }); - describe('lbTrafficExtension', () => { + describe('lbTrafficExtension', async () => { const fakePath = '/rendered/path/lbTrafficExtension'; const expectedParameters = { project: 'projectValue', @@ -1539,7 +1541,7 @@ describe('v1beta1.NetworkServicesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.lbTrafficExtensionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-notebooks/package.json b/packages/google-cloud-notebooks/package.json index d4259eb9c94..8aba78af778 100644 --- a/packages/google-cloud-notebooks/package.json +++ b/packages/google-cloud-notebooks/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata.google.cloud.notebooks.v1.json b/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata.google.cloud.notebooks.v1.json index c01b7fb681f..efb8c61ef0d 100644 --- a/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata.google.cloud.notebooks.v1.json +++ b/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata.google.cloud.notebooks.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-notebooks", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata_google.cloud.notebooks.v1.json b/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata_google.cloud.notebooks.v1.json index c01b7fb681f..efb8c61ef0d 100644 --- a/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata_google.cloud.notebooks.v1.json +++ b/packages/google-cloud-notebooks/samples/generated/v1/snippet_metadata_google.cloud.notebooks.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-notebooks", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata.google.cloud.notebooks.v1beta1.json b/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata.google.cloud.notebooks.v1beta1.json index 4ae6b610f03..8053ad72789 100644 --- a/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata.google.cloud.notebooks.v1beta1.json +++ b/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata.google.cloud.notebooks.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-notebooks", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata_google.cloud.notebooks.v1beta1.json b/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata_google.cloud.notebooks.v1beta1.json index 4ae6b610f03..8053ad72789 100644 --- a/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata_google.cloud.notebooks.v1beta1.json +++ b/packages/google-cloud-notebooks/samples/generated/v1beta1/snippet_metadata_google.cloud.notebooks.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-notebooks", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-notebooks/samples/generated/v2/snippet_metadata_google.cloud.notebooks.v2.json b/packages/google-cloud-notebooks/samples/generated/v2/snippet_metadata_google.cloud.notebooks.v2.json index 94f563334fa..76f11cd4649 100644 --- a/packages/google-cloud-notebooks/samples/generated/v2/snippet_metadata_google.cloud.notebooks.v2.json +++ b/packages/google-cloud-notebooks/samples/generated/v2/snippet_metadata_google.cloud.notebooks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-notebooks", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-notebooks/src/v1/managed_notebook_service_client.ts b/packages/google-cloud-notebooks/src/v1/managed_notebook_service_client.ts index 5967f83cc83..5786ea55eaa 100644 --- a/packages/google-cloud-notebooks/src/v1/managed_notebook_service_client.ts +++ b/packages/google-cloud-notebooks/src/v1/managed_notebook_service_client.ts @@ -702,7 +702,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRuntime request %j', request); const wrappedCallback: | Callback< @@ -829,7 +831,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('refreshRuntimeTokenInternal request %j', request); const wrappedCallback: | Callback< @@ -968,7 +972,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1161,7 +1167,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ 'runtime.name': request.runtime!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1331,7 +1339,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1505,7 +1515,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1679,7 +1691,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1853,7 +1867,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2023,7 +2039,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2193,7 +2211,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2366,7 +2386,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2536,7 +2558,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2694,7 +2718,9 @@ export class ManagedNotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v1.IListRuntimesRequest, @@ -2761,7 +2787,9 @@ export class ManagedNotebookServiceClient { }); const defaultCallSettings = this._defaults['listRuntimes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimes stream %j', request); return this.descriptors.page.listRuntimes.createStream( this.innerApiCalls.listRuntimes as GaxCall, @@ -2810,7 +2838,9 @@ export class ManagedNotebookServiceClient { }); const defaultCallSettings = this._defaults['listRuntimes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimes iterate %j', request); return this.descriptors.page.listRuntimes.asyncIterate( this.innerApiCalls['listRuntimes'] as GaxCall, @@ -3128,7 +3158,7 @@ export class ManagedNotebookServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-notebooks/src/v1/notebook_service_client.ts b/packages/google-cloud-notebooks/src/v1/notebook_service_client.ts index d39b71fac73..b9c06f1ffdd 100644 --- a/packages/google-cloud-notebooks/src/v1/notebook_service_client.ts +++ b/packages/google-cloud-notebooks/src/v1/notebook_service_client.ts @@ -888,7 +888,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -1013,7 +1015,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateInstanceMetadataItems request %j', request); const wrappedCallback: | Callback< @@ -1142,7 +1146,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ notebook_instance: request.notebookInstance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('isInstanceUpgradeable request %j', request); const wrappedCallback: | Callback< @@ -1262,7 +1268,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstanceHealth request %j', request); const wrappedCallback: | Callback< @@ -1382,7 +1390,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -1493,7 +1503,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSchedule request %j', request); const wrappedCallback: | Callback< @@ -1604,7 +1616,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExecution request %j', request); const wrappedCallback: | Callback< @@ -1738,7 +1752,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1914,7 +1930,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2089,7 +2107,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2260,7 +2280,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2430,7 +2452,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2600,7 +2624,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2777,7 +2803,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2945,7 +2973,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3113,7 +3143,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3281,7 +3313,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3449,7 +3483,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3626,7 +3662,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3797,7 +3835,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3968,7 +4008,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4138,7 +4180,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4313,7 +4357,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4487,7 +4533,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4655,7 +4703,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4823,7 +4873,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4995,7 +5047,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5163,7 +5217,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5331,7 +5387,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5503,7 +5561,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5667,7 +5727,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v1.IListInstancesRequest, @@ -5734,7 +5796,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -5783,7 +5847,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -5886,7 +5952,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v1.IListEnvironmentsRequest, @@ -5952,7 +6020,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -6000,7 +6070,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -6108,7 +6180,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v1.IListSchedulesRequest, @@ -6179,7 +6253,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listSchedules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchedules stream %j', request); return this.descriptors.page.listSchedules.createStream( this.innerApiCalls.listSchedules as GaxCall, @@ -6232,7 +6308,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listSchedules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchedules iterate %j', request); return this.descriptors.page.listSchedules.asyncIterate( this.innerApiCalls['listSchedules'] as GaxCall, @@ -6342,7 +6420,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v1.IListExecutionsRequest, @@ -6415,7 +6495,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExecutions stream %j', request); return this.descriptors.page.listExecutions.createStream( this.innerApiCalls.listExecutions as GaxCall, @@ -6470,7 +6552,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listExecutions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExecutions iterate %j', request); return this.descriptors.page.listExecutions.asyncIterate( this.innerApiCalls['listExecutions'] as GaxCall, @@ -6788,7 +6872,7 @@ export class NotebookServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-notebooks/src/v1beta1/notebook_service_client.ts b/packages/google-cloud-notebooks/src/v1beta1/notebook_service_client.ts index 9d770b7dadb..8e9a5a89802 100644 --- a/packages/google-cloud-notebooks/src/v1beta1/notebook_service_client.ts +++ b/packages/google-cloud-notebooks/src/v1beta1/notebook_service_client.ts @@ -740,7 +740,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -865,7 +867,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ notebook_instance: request.notebookInstance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$NotebookService-$IsInstanceUpgradeable', 'IsInstanceUpgradeable is deprecated and may be removed in a future version.', @@ -990,7 +994,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -1127,7 +1133,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1303,7 +1311,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1478,7 +1488,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1649,7 +1661,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1820,7 +1834,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1988,7 +2004,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2156,7 +2174,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2324,7 +2344,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2492,7 +2514,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2669,7 +2693,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2839,7 +2865,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$NotebookService-$UpgradeInstance', 'UpgradeInstance is deprecated and may be removed in a future version.', @@ -3024,7 +3052,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$NotebookService-$UpgradeInstanceInternal', 'UpgradeInstanceInternal is deprecated and may be removed in a future version.', @@ -3209,7 +3239,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3377,7 +3409,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3541,7 +3575,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v1beta1.IListInstancesRequest, @@ -3608,7 +3644,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -3657,7 +3695,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -3760,7 +3800,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v1beta1.IListEnvironmentsRequest, @@ -3826,7 +3868,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -3874,7 +3918,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -4192,7 +4238,7 @@ export class NotebookServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-notebooks/src/v2/notebook_service_client.ts b/packages/google-cloud-notebooks/src/v2/notebook_service_client.ts index a41ae7848f4..d861fcfcaac 100644 --- a/packages/google-cloud-notebooks/src/v2/notebook_service_client.ts +++ b/packages/google-cloud-notebooks/src/v2/notebook_service_client.ts @@ -658,7 +658,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -781,7 +783,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ notebook_instance: request.notebookInstance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkInstanceUpgradability request %j', request); const wrappedCallback: | Callback< @@ -920,7 +924,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1091,7 +1097,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1261,7 +1269,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1429,7 +1439,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1597,7 +1609,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1765,7 +1779,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1933,7 +1949,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2106,7 +2124,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2278,7 +2298,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2447,7 +2469,9 @@ export class NotebookServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.notebooks.v2.IListInstancesRequest, @@ -2519,7 +2543,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -2573,7 +2599,9 @@ export class NotebookServiceClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2891,7 +2919,7 @@ export class NotebookServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-notebooks/test/gapic_managed_notebook_service_v1.ts b/packages/google-cloud-notebooks/test/gapic_managed_notebook_service_v1.ts index 0e49afb35ea..932a126f31c 100644 --- a/packages/google-cloud-notebooks/test/gapic_managed_notebook_service_v1.ts +++ b/packages/google-cloud-notebooks/test/gapic_managed_notebook_service_v1.ts @@ -303,7 +303,9 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.managedNotebookServiceStub); client.close().then(() => { done(); @@ -366,7 +368,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetRuntimeRequest() ); @@ -398,7 +400,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetRuntimeRequest() ); @@ -446,7 +448,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetRuntimeRequest() ); @@ -478,7 +480,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetRuntimeRequest() ); @@ -500,7 +502,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest() ); @@ -533,7 +535,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest() ); @@ -581,7 +583,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest() ); @@ -616,7 +618,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest() ); @@ -641,7 +643,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateRuntimeRequest() ); @@ -675,7 +677,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateRuntimeRequest() ); @@ -730,7 +732,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateRuntimeRequest() ); @@ -762,7 +764,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateRuntimeRequest() ); @@ -796,7 +798,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -819,7 +821,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -841,7 +843,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateRuntimeRequest() ); @@ -876,7 +878,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateRuntimeRequest() ); @@ -932,7 +934,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateRuntimeRequest() ); @@ -965,7 +967,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateRuntimeRequest() ); @@ -1000,7 +1002,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1023,7 +1025,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1045,7 +1047,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteRuntimeRequest() ); @@ -1079,7 +1081,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteRuntimeRequest() ); @@ -1134,7 +1136,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteRuntimeRequest() ); @@ -1166,7 +1168,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteRuntimeRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1223,7 +1225,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1245,7 +1247,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartRuntimeRequest() ); @@ -1278,7 +1280,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartRuntimeRequest() ); @@ -1333,7 +1335,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartRuntimeRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartRuntimeRequest() ); @@ -1399,7 +1401,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1422,7 +1424,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1441,7 +1443,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopRuntimeRequest() ); @@ -1474,7 +1476,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopRuntimeRequest() ); @@ -1529,7 +1531,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopRuntimeRequest() ); @@ -1561,7 +1563,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopRuntimeRequest() ); @@ -1595,7 +1597,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1618,7 +1620,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1637,7 +1639,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SwitchRuntimeRequest() ); @@ -1671,7 +1673,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SwitchRuntimeRequest() ); @@ -1726,7 +1728,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SwitchRuntimeRequest() ); @@ -1758,7 +1760,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SwitchRuntimeRequest() ); @@ -1792,7 +1794,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1815,7 +1817,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1837,7 +1839,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetRuntimeRequest() ); @@ -1870,7 +1872,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetRuntimeRequest() ); @@ -1925,7 +1927,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetRuntimeRequest() ); @@ -1957,7 +1959,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetRuntimeRequest() ); @@ -1991,7 +1993,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2014,7 +2016,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2033,7 +2035,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeRuntimeRequest() ); @@ -2067,7 +2069,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeRuntimeRequest() ); @@ -2122,7 +2124,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeRuntimeRequest() ); @@ -2154,7 +2156,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeRuntimeRequest() ); @@ -2188,7 +2190,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2211,7 +2213,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2233,7 +2235,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportRuntimeEventRequest() ); @@ -2267,7 +2269,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportRuntimeEventRequest() ); @@ -2322,7 +2324,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportRuntimeEventRequest() ); @@ -2354,7 +2356,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportRuntimeEventRequest() ); @@ -2388,7 +2390,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2411,7 +2413,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2433,7 +2435,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseRuntimeRequest() ); @@ -2467,7 +2469,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseRuntimeRequest() ); @@ -2522,7 +2524,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseRuntimeRequest() ); @@ -2554,7 +2556,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseRuntimeRequest() ); @@ -2588,7 +2590,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2611,7 +2613,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2633,7 +2635,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListRuntimesRequest() ); @@ -2667,7 +2669,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListRuntimesRequest() ); @@ -2717,7 +2719,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListRuntimesRequest() ); @@ -2749,7 +2751,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListRuntimesRequest() ); @@ -2804,7 +2806,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListRuntimesRequest() ); @@ -2856,7 +2858,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListRuntimesRequest() ); @@ -2900,7 +2902,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListRuntimesRequest() ); @@ -2942,7 +2944,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2973,7 +2975,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3018,7 +3020,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -3051,7 +3053,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3082,7 +3084,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3127,7 +3129,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -3160,7 +3162,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3194,7 +3196,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3239,7 +3241,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -3275,7 +3277,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3306,7 +3308,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3351,7 +3353,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3387,7 +3389,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3436,7 +3438,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3478,7 +3480,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3560,7 +3562,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3643,7 +3645,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3742,8 +3744,7 @@ describe('v1.ManagedNotebookServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3763,7 +3764,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3772,8 +3773,7 @@ describe('v1.ManagedNotebookServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3789,7 +3789,7 @@ describe('v1.ManagedNotebookServiceClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3800,7 +3800,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3842,7 +3842,7 @@ describe('v1.ManagedNotebookServiceClient', () => { }); }); - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -3854,7 +3854,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3907,7 +3907,7 @@ describe('v1.ManagedNotebookServiceClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -3918,7 +3918,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3957,7 +3957,7 @@ describe('v1.ManagedNotebookServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3968,7 +3968,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4007,7 +4007,7 @@ describe('v1.ManagedNotebookServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4017,7 +4017,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4046,7 +4046,7 @@ describe('v1.ManagedNotebookServiceClient', () => { }); }); - describe('runtime', () => { + describe('runtime', async () => { const fakePath = '/rendered/path/runtime'; const expectedParameters = { project: 'projectValue', @@ -4058,7 +4058,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4111,7 +4111,7 @@ describe('v1.ManagedNotebookServiceClient', () => { }); }); - describe('schedule', () => { + describe('schedule', async () => { const fakePath = '/rendered/path/schedule'; const expectedParameters = { project: 'projectValue', @@ -4123,7 +4123,7 @@ describe('v1.ManagedNotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.schedulePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-notebooks/test/gapic_notebook_service_v1.ts b/packages/google-cloud-notebooks/test/gapic_notebook_service_v1.ts index eafab29d16c..0e8291f02de 100644 --- a/packages/google-cloud-notebooks/test/gapic_notebook_service_v1.ts +++ b/packages/google-cloud-notebooks/test/gapic_notebook_service_v1.ts @@ -290,7 +290,9 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.notebookServiceStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceRequest() ); @@ -380,7 +382,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceRequest() ); @@ -427,7 +429,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceRequest() ); @@ -458,7 +460,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceRequest() ); @@ -479,7 +481,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest() ); @@ -511,7 +513,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest() ); @@ -558,7 +560,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest() ); @@ -592,7 +594,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest() ); @@ -616,7 +618,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest() ); @@ -648,7 +650,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest() ); @@ -695,7 +697,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest() ); @@ -729,7 +731,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest() ); @@ -753,7 +755,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceHealthRequest() ); @@ -784,7 +786,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceHealthRequest() ); @@ -831,7 +833,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceHealthRequest() ); @@ -862,7 +864,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetInstanceHealthRequest() ); @@ -883,7 +885,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetEnvironmentRequest() ); @@ -914,7 +916,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetEnvironmentRequest() ); @@ -961,7 +963,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetEnvironmentRequest() ); @@ -992,7 +994,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetEnvironmentRequest() ); @@ -1013,7 +1015,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetScheduleRequest() ); @@ -1044,7 +1046,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetScheduleRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetScheduleRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetScheduleRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetExecutionRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetExecutionRequest() ); @@ -1221,7 +1223,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetExecutionRequest() ); @@ -1252,7 +1254,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.GetExecutionRequest() ); @@ -1273,7 +1275,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateInstanceRequest() ); @@ -1306,7 +1308,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateInstanceRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateInstanceRequest() ); @@ -1391,7 +1393,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateInstanceRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1446,7 +1448,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1467,7 +1469,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RegisterInstanceRequest() ); @@ -1500,7 +1502,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RegisterInstanceRequest() ); @@ -1554,7 +1556,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RegisterInstanceRequest() ); @@ -1585,7 +1587,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RegisterInstanceRequest() ); @@ -1618,7 +1620,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1640,7 +1642,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1661,7 +1663,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest() ); @@ -1748,7 +1750,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest() ); @@ -1782,7 +1784,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest() ); @@ -1815,7 +1817,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1837,7 +1839,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1858,7 +1860,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest() ); @@ -1891,7 +1893,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest() ); @@ -1945,7 +1947,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest() ); @@ -1979,7 +1981,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest() ); @@ -2012,7 +2014,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2034,7 +2036,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2055,7 +2057,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceConfigRequest() ); @@ -2088,7 +2090,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceConfigRequest() ); @@ -2142,7 +2144,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceConfigRequest() ); @@ -2173,7 +2175,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateInstanceConfigRequest() ); @@ -2206,7 +2208,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2228,7 +2230,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2249,7 +2251,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest() ); @@ -2282,7 +2284,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest() ); @@ -2336,7 +2338,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest() ); @@ -2370,7 +2372,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest() ); @@ -2403,7 +2405,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2426,7 +2428,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2447,7 +2449,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceLabelsRequest() ); @@ -2480,7 +2482,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceLabelsRequest() ); @@ -2534,7 +2536,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceLabelsRequest() ); @@ -2565,7 +2567,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.SetInstanceLabelsRequest() ); @@ -2598,7 +2600,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2620,7 +2622,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2641,7 +2643,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteInstanceRequest() ); @@ -2674,7 +2676,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteInstanceRequest() ); @@ -2728,7 +2730,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteInstanceRequest() ); @@ -2759,7 +2761,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteInstanceRequest() ); @@ -2792,7 +2794,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2814,7 +2816,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2835,7 +2837,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartInstanceRequest() ); @@ -2868,7 +2870,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartInstanceRequest() ); @@ -2922,7 +2924,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartInstanceRequest() ); @@ -2953,7 +2955,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StartInstanceRequest() ); @@ -2986,7 +2988,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3008,7 +3010,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3029,7 +3031,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopInstanceRequest() ); @@ -3061,7 +3063,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopInstanceRequest() ); @@ -3115,7 +3117,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopInstanceRequest() ); @@ -3146,7 +3148,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.StopInstanceRequest() ); @@ -3179,7 +3181,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3201,7 +3203,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3219,7 +3221,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetInstanceRequest() ); @@ -3252,7 +3254,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetInstanceRequest() ); @@ -3306,7 +3308,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetInstanceRequest() ); @@ -3337,7 +3339,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ResetInstanceRequest() ); @@ -3370,7 +3372,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3392,7 +3394,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3413,7 +3415,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportInstanceInfoRequest() ); @@ -3446,7 +3448,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportInstanceInfoRequest() ); @@ -3500,7 +3502,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportInstanceInfoRequest() ); @@ -3531,7 +3533,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ReportInstanceInfoRequest() ); @@ -3564,7 +3566,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3586,7 +3588,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3607,7 +3609,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceRequest() ); @@ -3640,7 +3642,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceRequest() ); @@ -3694,7 +3696,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceRequest() ); @@ -3725,7 +3727,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceRequest() ); @@ -3758,7 +3760,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3780,7 +3782,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3801,7 +3803,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RollbackInstanceRequest() ); @@ -3834,7 +3836,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RollbackInstanceRequest() ); @@ -3888,7 +3890,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RollbackInstanceRequest() ); @@ -3919,7 +3921,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.RollbackInstanceRequest() ); @@ -3952,7 +3954,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3974,7 +3976,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3995,7 +3997,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseInstanceRequest() ); @@ -4028,7 +4030,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseInstanceRequest() ); @@ -4082,7 +4084,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseInstanceRequest() ); @@ -4113,7 +4115,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DiagnoseInstanceRequest() ); @@ -4146,7 +4148,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4168,7 +4170,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4189,7 +4191,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest() ); @@ -4222,7 +4224,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest() ); @@ -4276,7 +4278,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest() ); @@ -4310,7 +4312,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest() ); @@ -4343,7 +4345,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4366,7 +4368,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4387,7 +4389,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateEnvironmentRequest() ); @@ -4420,7 +4422,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateEnvironmentRequest() ); @@ -4474,7 +4476,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateEnvironmentRequest() ); @@ -4505,7 +4507,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateEnvironmentRequest() ); @@ -4538,7 +4540,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4560,7 +4562,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4581,7 +4583,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteEnvironmentRequest() ); @@ -4614,7 +4616,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteEnvironmentRequest() ); @@ -4668,7 +4670,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteEnvironmentRequest() ); @@ -4699,7 +4701,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteEnvironmentRequest() ); @@ -4732,7 +4734,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4754,7 +4756,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4775,7 +4777,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteScheduleRequest() ); @@ -4808,7 +4810,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteScheduleRequest() ); @@ -4862,7 +4864,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteScheduleRequest() ); @@ -4893,7 +4895,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteScheduleRequest() ); @@ -4926,7 +4928,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4948,7 +4950,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4969,7 +4971,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateScheduleRequest() ); @@ -5002,7 +5004,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateScheduleRequest() ); @@ -5056,7 +5058,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateScheduleRequest() ); @@ -5087,7 +5089,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateScheduleRequest() ); @@ -5120,7 +5122,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5142,7 +5144,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5163,7 +5165,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.TriggerScheduleRequest() ); @@ -5196,7 +5198,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.TriggerScheduleRequest() ); @@ -5250,7 +5252,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.TriggerScheduleRequest() ); @@ -5281,7 +5283,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.TriggerScheduleRequest() ); @@ -5314,7 +5316,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5336,7 +5338,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5357,7 +5359,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteExecutionRequest() ); @@ -5390,7 +5392,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteExecutionRequest() ); @@ -5444,7 +5446,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteExecutionRequest() ); @@ -5475,7 +5477,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.DeleteExecutionRequest() ); @@ -5508,7 +5510,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5530,7 +5532,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5551,7 +5553,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateExecutionRequest() ); @@ -5584,7 +5586,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateExecutionRequest() ); @@ -5638,7 +5640,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateExecutionRequest() ); @@ -5669,7 +5671,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.CreateExecutionRequest() ); @@ -5702,7 +5704,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5724,7 +5726,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5745,7 +5747,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListInstancesRequest() ); @@ -5778,7 +5780,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListInstancesRequest() ); @@ -5827,7 +5829,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListInstancesRequest() ); @@ -5858,7 +5860,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListInstancesRequest() ); @@ -5912,7 +5914,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListInstancesRequest() ); @@ -5961,7 +5963,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListInstancesRequest() ); @@ -6004,7 +6006,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListInstancesRequest() ); @@ -6046,7 +6048,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListEnvironmentsRequest() ); @@ -6085,7 +6087,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListEnvironmentsRequest() ); @@ -6140,7 +6142,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListEnvironmentsRequest() ); @@ -6171,7 +6173,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListEnvironmentsRequest() ); @@ -6231,7 +6233,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListEnvironmentsRequest() ); @@ -6280,7 +6282,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListEnvironmentsRequest() ); @@ -6329,7 +6331,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListEnvironmentsRequest() ); @@ -6371,7 +6373,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListSchedulesRequest() ); @@ -6404,7 +6406,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListSchedulesRequest() ); @@ -6453,7 +6455,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListSchedulesRequest() ); @@ -6484,7 +6486,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListSchedulesRequest() ); @@ -6538,7 +6540,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListSchedulesRequest() ); @@ -6587,7 +6589,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListSchedulesRequest() ); @@ -6630,7 +6632,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListSchedulesRequest() ); @@ -6672,7 +6674,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListExecutionsRequest() ); @@ -6705,7 +6707,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListExecutionsRequest() ); @@ -6754,7 +6756,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListExecutionsRequest() ); @@ -6785,7 +6787,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListExecutionsRequest() ); @@ -6839,7 +6841,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListExecutionsRequest() ); @@ -6888,7 +6890,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListExecutionsRequest() ); @@ -6931,7 +6933,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1.ListExecutionsRequest() ); @@ -6972,7 +6974,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7002,7 +7004,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7046,7 +7048,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -7078,7 +7080,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7108,7 +7110,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7152,7 +7154,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -7184,7 +7186,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7217,7 +7219,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7261,7 +7263,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -7296,7 +7298,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7326,7 +7328,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7370,7 +7372,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7405,7 +7407,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7453,7 +7455,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -7494,7 +7496,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -7573,7 +7575,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -7653,7 +7655,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -7749,8 +7751,7 @@ describe('v1.NotebookServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -7769,7 +7770,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -7778,8 +7779,7 @@ describe('v1.NotebookServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -7795,7 +7795,7 @@ describe('v1.NotebookServiceClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -7805,7 +7805,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7847,7 +7847,7 @@ describe('v1.NotebookServiceClient', () => { }); }); - describe('execution', () => { + describe('execution', async () => { const fakePath = '/rendered/path/execution'; const expectedParameters = { project: 'projectValue', @@ -7858,7 +7858,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.executionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7911,7 +7911,7 @@ describe('v1.NotebookServiceClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -7921,7 +7921,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7960,7 +7960,7 @@ describe('v1.NotebookServiceClient', () => { }); }); - describe('runtime', () => { + describe('runtime', async () => { const fakePath = '/rendered/path/runtime'; const expectedParameters = { project: 'projectValue', @@ -7971,7 +7971,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.runtimePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8024,7 +8024,7 @@ describe('v1.NotebookServiceClient', () => { }); }); - describe('schedule', () => { + describe('schedule', async () => { const fakePath = '/rendered/path/schedule'; const expectedParameters = { project: 'projectValue', @@ -8035,7 +8035,7 @@ describe('v1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.schedulePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-notebooks/test/gapic_notebook_service_v1beta1.ts b/packages/google-cloud-notebooks/test/gapic_notebook_service_v1beta1.ts index 74d6540a7bf..8a9d616a1f0 100644 --- a/packages/google-cloud-notebooks/test/gapic_notebook_service_v1beta1.ts +++ b/packages/google-cloud-notebooks/test/gapic_notebook_service_v1beta1.ts @@ -292,7 +292,9 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.notebookServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetInstanceRequest() ); @@ -382,7 +384,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetInstanceRequest() ); @@ -429,7 +431,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetInstanceRequest() ); @@ -460,7 +462,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetInstanceRequest() ); @@ -482,7 +484,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.IsInstanceUpgradeableRequest() ); @@ -516,7 +518,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.IsInstanceUpgradeableRequest() ); @@ -565,7 +567,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.IsInstanceUpgradeableRequest() ); @@ -601,7 +603,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.IsInstanceUpgradeableRequest() ); @@ -626,7 +628,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetEnvironmentRequest() ); @@ -657,7 +659,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetEnvironmentRequest() ); @@ -704,7 +706,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetEnvironmentRequest() ); @@ -735,7 +737,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.GetEnvironmentRequest() ); @@ -756,7 +758,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateInstanceRequest() ); @@ -789,7 +791,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateInstanceRequest() ); @@ -843,7 +845,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateInstanceRequest() ); @@ -874,7 +876,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateInstanceRequest() ); @@ -907,7 +909,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -929,7 +931,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -950,7 +952,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.RegisterInstanceRequest() ); @@ -983,7 +985,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.RegisterInstanceRequest() ); @@ -1037,7 +1039,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.RegisterInstanceRequest() ); @@ -1068,7 +1070,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.RegisterInstanceRequest() ); @@ -1101,7 +1103,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1123,7 +1125,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1144,7 +1146,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest() ); @@ -1177,7 +1179,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest() ); @@ -1231,7 +1233,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest() ); @@ -1265,7 +1267,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest() ); @@ -1298,7 +1300,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1320,7 +1322,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1341,7 +1343,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceMachineTypeRequest() ); @@ -1374,7 +1376,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceMachineTypeRequest() ); @@ -1428,7 +1430,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceMachineTypeRequest() ); @@ -1462,7 +1464,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceMachineTypeRequest() ); @@ -1495,7 +1497,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1517,7 +1519,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1538,7 +1540,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest() ); @@ -1571,7 +1573,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest() ); @@ -1625,7 +1627,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest() ); @@ -1656,7 +1658,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.SetInstanceLabelsRequest() ); @@ -1689,7 +1691,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1711,7 +1713,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1732,7 +1734,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteInstanceRequest() ); @@ -1765,7 +1767,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteInstanceRequest() ); @@ -1819,7 +1821,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteInstanceRequest() ); @@ -1850,7 +1852,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteInstanceRequest() ); @@ -1883,7 +1885,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1905,7 +1907,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1926,7 +1928,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StartInstanceRequest() ); @@ -1959,7 +1961,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StartInstanceRequest() ); @@ -2013,7 +2015,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StartInstanceRequest() ); @@ -2044,7 +2046,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StartInstanceRequest() ); @@ -2077,7 +2079,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2099,7 +2101,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2120,7 +2122,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StopInstanceRequest() ); @@ -2152,7 +2154,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StopInstanceRequest() ); @@ -2206,7 +2208,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StopInstanceRequest() ); @@ -2237,7 +2239,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.StopInstanceRequest() ); @@ -2270,7 +2272,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2292,7 +2294,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2310,7 +2312,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ResetInstanceRequest() ); @@ -2343,7 +2345,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ResetInstanceRequest() ); @@ -2397,7 +2399,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ResetInstanceRequest() ); @@ -2428,7 +2430,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ResetInstanceRequest() ); @@ -2461,7 +2463,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2483,7 +2485,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2504,7 +2506,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ReportInstanceInfoRequest() ); @@ -2537,7 +2539,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ReportInstanceInfoRequest() ); @@ -2591,7 +2593,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ReportInstanceInfoRequest() ); @@ -2622,7 +2624,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ReportInstanceInfoRequest() ); @@ -2655,7 +2657,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2677,7 +2679,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2699,7 +2701,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceRequest() ); @@ -2734,7 +2736,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceRequest() ); @@ -2790,7 +2792,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceRequest() ); @@ -2823,7 +2825,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceRequest() ); @@ -2858,7 +2860,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2882,7 +2884,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2905,7 +2907,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceInternalRequest() ); @@ -2940,7 +2942,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceInternalRequest() ); @@ -2996,7 +2998,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceInternalRequest() ); @@ -3032,7 +3034,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.UpgradeInstanceInternalRequest() ); @@ -3067,7 +3069,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3092,7 +3094,7 @@ describe('v1beta1.NotebookServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3114,7 +3116,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateEnvironmentRequest() ); @@ -3147,7 +3149,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateEnvironmentRequest() ); @@ -3201,7 +3203,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateEnvironmentRequest() ); @@ -3232,7 +3234,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.CreateEnvironmentRequest() ); @@ -3265,7 +3267,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3287,7 +3289,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3308,7 +3310,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteEnvironmentRequest() ); @@ -3341,7 +3343,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteEnvironmentRequest() ); @@ -3395,7 +3397,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteEnvironmentRequest() ); @@ -3426,7 +3428,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.DeleteEnvironmentRequest() ); @@ -3459,7 +3461,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3481,7 +3483,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3502,7 +3504,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListInstancesRequest() ); @@ -3541,7 +3543,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListInstancesRequest() ); @@ -3596,7 +3598,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListInstancesRequest() ); @@ -3627,7 +3629,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListInstancesRequest() ); @@ -3687,7 +3689,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListInstancesRequest() ); @@ -3736,7 +3738,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListInstancesRequest() ); @@ -3785,7 +3787,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListInstancesRequest() ); @@ -3827,7 +3829,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest() ); @@ -3866,7 +3868,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest() ); @@ -3921,7 +3923,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest() ); @@ -3952,7 +3954,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest() ); @@ -4013,7 +4015,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest() ); @@ -4063,7 +4065,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest() ); @@ -4113,7 +4115,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v1beta1.ListEnvironmentsRequest() ); @@ -4155,7 +4157,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4185,7 +4187,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4229,7 +4231,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -4261,7 +4263,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4291,7 +4293,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4335,7 +4337,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -4367,7 +4369,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4400,7 +4402,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4444,7 +4446,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -4479,7 +4481,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4509,7 +4511,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4553,7 +4555,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4588,7 +4590,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4636,7 +4638,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4677,7 +4679,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4756,7 +4758,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4836,7 +4838,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4932,8 +4934,7 @@ describe('v1beta1.NotebookServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4952,7 +4953,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4961,8 +4962,7 @@ describe('v1beta1.NotebookServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4978,7 +4978,7 @@ describe('v1beta1.NotebookServiceClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -4988,7 +4988,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5030,7 +5030,7 @@ describe('v1beta1.NotebookServiceClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -5040,7 +5040,7 @@ describe('v1beta1.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-notebooks/test/gapic_notebook_service_v2.ts b/packages/google-cloud-notebooks/test/gapic_notebook_service_v2.ts index 9ce3ec617f6..d33e0e9fd6e 100644 --- a/packages/google-cloud-notebooks/test/gapic_notebook_service_v2.ts +++ b/packages/google-cloud-notebooks/test/gapic_notebook_service_v2.ts @@ -290,7 +290,9 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.notebookServiceStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.GetInstanceRequest() ); @@ -380,7 +382,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.GetInstanceRequest() ); @@ -427,7 +429,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.GetInstanceRequest() ); @@ -458,7 +460,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.GetInstanceRequest() ); @@ -479,7 +481,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest() ); @@ -511,7 +513,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest() ); @@ -558,7 +560,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest() ); @@ -592,7 +594,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest() ); @@ -616,7 +618,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CreateInstanceRequest() ); @@ -649,7 +651,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CreateInstanceRequest() ); @@ -703,7 +705,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CreateInstanceRequest() ); @@ -734,7 +736,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.CreateInstanceRequest() ); @@ -767,7 +769,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -789,7 +791,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -810,7 +812,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpdateInstanceRequest() ); @@ -844,7 +846,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpdateInstanceRequest() ); @@ -899,7 +901,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpdateInstanceRequest() ); @@ -931,7 +933,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpdateInstanceRequest() ); @@ -965,7 +967,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -987,7 +989,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1008,7 +1010,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DeleteInstanceRequest() ); @@ -1041,7 +1043,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DeleteInstanceRequest() ); @@ -1095,7 +1097,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DeleteInstanceRequest() ); @@ -1126,7 +1128,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DeleteInstanceRequest() ); @@ -1159,7 +1161,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1181,7 +1183,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1202,7 +1204,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StartInstanceRequest() ); @@ -1235,7 +1237,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StartInstanceRequest() ); @@ -1289,7 +1291,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StartInstanceRequest() ); @@ -1320,7 +1322,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StartInstanceRequest() ); @@ -1353,7 +1355,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1375,7 +1377,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1396,7 +1398,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StopInstanceRequest() ); @@ -1428,7 +1430,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StopInstanceRequest() ); @@ -1482,7 +1484,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StopInstanceRequest() ); @@ -1513,7 +1515,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.StopInstanceRequest() ); @@ -1546,7 +1548,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1568,7 +1570,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1586,7 +1588,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ResetInstanceRequest() ); @@ -1619,7 +1621,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ResetInstanceRequest() ); @@ -1673,7 +1675,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ResetInstanceRequest() ); @@ -1704,7 +1706,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ResetInstanceRequest() ); @@ -1737,7 +1739,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1759,7 +1761,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1780,7 +1782,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpgradeInstanceRequest() ); @@ -1813,7 +1815,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpgradeInstanceRequest() ); @@ -1867,7 +1869,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpgradeInstanceRequest() ); @@ -1898,7 +1900,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.UpgradeInstanceRequest() ); @@ -1931,7 +1933,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1953,7 +1955,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1974,7 +1976,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.RollbackInstanceRequest() ); @@ -2007,7 +2009,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.RollbackInstanceRequest() ); @@ -2061,7 +2063,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.RollbackInstanceRequest() ); @@ -2092,7 +2094,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.RollbackInstanceRequest() ); @@ -2125,7 +2127,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2147,7 +2149,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2168,7 +2170,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DiagnoseInstanceRequest() ); @@ -2201,7 +2203,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DiagnoseInstanceRequest() ); @@ -2255,7 +2257,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DiagnoseInstanceRequest() ); @@ -2286,7 +2288,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.DiagnoseInstanceRequest() ); @@ -2319,7 +2321,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2341,7 +2343,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2362,7 +2364,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ListInstancesRequest() ); @@ -2395,7 +2397,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ListInstancesRequest() ); @@ -2444,7 +2446,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ListInstancesRequest() ); @@ -2475,7 +2477,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ListInstancesRequest() ); @@ -2529,7 +2531,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ListInstancesRequest() ); @@ -2578,7 +2580,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ListInstancesRequest() ); @@ -2621,7 +2623,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.notebooks.v2.ListInstancesRequest() ); @@ -2662,7 +2664,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2692,7 +2694,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2736,7 +2738,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2768,7 +2770,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2798,7 +2800,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2842,7 +2844,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2874,7 +2876,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2907,7 +2909,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2951,7 +2953,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2986,7 +2988,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3016,7 +3018,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3060,7 +3062,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3095,7 +3097,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3143,7 +3145,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3184,7 +3186,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3263,7 +3265,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3343,7 +3345,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3439,8 +3441,7 @@ describe('v2.NotebookServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3459,7 +3460,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3468,8 +3469,7 @@ describe('v2.NotebookServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3485,7 +3485,7 @@ describe('v2.NotebookServiceClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -3496,7 +3496,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3549,7 +3549,7 @@ describe('v2.NotebookServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3559,7 +3559,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3598,7 +3598,7 @@ describe('v2.NotebookServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3607,7 +3607,7 @@ describe('v2.NotebookServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-oracledatabase/package.json b/packages/google-cloud-oracledatabase/package.json index 4bac17ea624..52b1834e11a 100644 --- a/packages/google-cloud-oracledatabase/package.json +++ b/packages/google-cloud-oracledatabase/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json b/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json index b3ab3c7525d..5d6a9b0aedc 100644 --- a/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json +++ b/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-oracledatabase", - "version": "0.2.1", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-oracledatabase/src/v1/oracle_database_client.ts b/packages/google-cloud-oracledatabase/src/v1/oracle_database_client.ts index 18ab10884b0..74fd58f418b 100644 --- a/packages/google-cloud-oracledatabase/src/v1/oracle_database_client.ts +++ b/packages/google-cloud-oracledatabase/src/v1/oracle_database_client.ts @@ -749,7 +749,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCloudExadataInfrastructure request %j', request); const wrappedCallback: | Callback< @@ -875,7 +877,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCloudVmCluster request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1005,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAutonomousDatabase request %j', request); const wrappedCallback: | Callback< @@ -1136,7 +1142,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAutonomousDatabaseWallet request %j', request); const wrappedCallback: | Callback< @@ -1291,7 +1299,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1479,7 +1489,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1669,7 +1681,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1850,7 +1864,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2034,7 +2050,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2211,7 +2229,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2381,7 +2401,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2546,7 +2568,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListCloudExadataInfrastructuresRequest, @@ -2615,7 +2639,9 @@ export class OracleDatabaseClient { const defaultCallSettings = this._defaults['listCloudExadataInfrastructures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCloudExadataInfrastructures stream %j', request); return this.descriptors.page.listCloudExadataInfrastructures.createStream( this.innerApiCalls.listCloudExadataInfrastructures as GaxCall, @@ -2666,7 +2692,9 @@ export class OracleDatabaseClient { const defaultCallSettings = this._defaults['listCloudExadataInfrastructures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCloudExadataInfrastructures iterate %j', request); return this.descriptors.page.listCloudExadataInfrastructures.asyncIterate( this.innerApiCalls['listCloudExadataInfrastructures'] as GaxCall, @@ -2773,7 +2801,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListCloudVmClustersRequest, @@ -2843,7 +2873,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listCloudVmClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCloudVmClusters stream %j', request); return this.descriptors.page.listCloudVmClusters.createStream( this.innerApiCalls.listCloudVmClusters as GaxCall, @@ -2895,7 +2927,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listCloudVmClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCloudVmClusters iterate %j', request); return this.descriptors.page.listCloudVmClusters.asyncIterate( this.innerApiCalls['listCloudVmClusters'] as GaxCall, @@ -3000,7 +3034,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListEntitlementsRequest, @@ -3068,7 +3104,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlements stream %j', request); return this.descriptors.page.listEntitlements.createStream( this.innerApiCalls.listEntitlements as GaxCall, @@ -3118,7 +3156,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlements iterate %j', request); return this.descriptors.page.listEntitlements.asyncIterate( this.innerApiCalls['listEntitlements'] as GaxCall, @@ -3223,7 +3263,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListDbServersRequest, @@ -3291,7 +3333,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listDbServers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDbServers stream %j', request); return this.descriptors.page.listDbServers.createStream( this.innerApiCalls.listDbServers as GaxCall, @@ -3341,7 +3385,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listDbServers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDbServers iterate %j', request); return this.descriptors.page.listDbServers.asyncIterate( this.innerApiCalls['listDbServers'] as GaxCall, @@ -3446,7 +3492,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListDbNodesRequest, @@ -3514,7 +3562,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listDbNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDbNodes stream %j', request); return this.descriptors.page.listDbNodes.createStream( this.innerApiCalls.listDbNodes as GaxCall, @@ -3564,7 +3614,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listDbNodes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDbNodes iterate %j', request); return this.descriptors.page.listDbNodes.asyncIterate( this.innerApiCalls['listDbNodes'] as GaxCall, @@ -3671,7 +3723,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListGiVersionsRequest, @@ -3740,7 +3794,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listGiVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGiVersions stream %j', request); return this.descriptors.page.listGiVersions.createStream( this.innerApiCalls.listGiVersions as GaxCall, @@ -3791,7 +3847,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listGiVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGiVersions iterate %j', request); return this.descriptors.page.listGiVersions.asyncIterate( this.innerApiCalls['listGiVersions'] as GaxCall, @@ -3896,7 +3954,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListDbSystemShapesRequest, @@ -3964,7 +4024,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listDbSystemShapes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDbSystemShapes stream %j', request); return this.descriptors.page.listDbSystemShapes.createStream( this.innerApiCalls.listDbSystemShapes as GaxCall, @@ -4014,7 +4076,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listDbSystemShapes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDbSystemShapes iterate %j', request); return this.descriptors.page.listDbSystemShapes.asyncIterate( this.innerApiCalls['listDbSystemShapes'] as GaxCall, @@ -4123,7 +4187,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListAutonomousDatabasesRequest, @@ -4195,7 +4261,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listAutonomousDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDatabases stream %j', request); return this.descriptors.page.listAutonomousDatabases.createStream( this.innerApiCalls.listAutonomousDatabases as GaxCall, @@ -4249,7 +4317,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listAutonomousDatabases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDatabases iterate %j', request); return this.descriptors.page.listAutonomousDatabases.asyncIterate( this.innerApiCalls['listAutonomousDatabases'] as GaxCall, @@ -4355,7 +4425,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListAutonomousDbVersionsRequest, @@ -4423,7 +4495,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listAutonomousDbVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDbVersions stream %j', request); return this.descriptors.page.listAutonomousDbVersions.createStream( this.innerApiCalls.listAutonomousDbVersions as GaxCall, @@ -4473,7 +4547,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listAutonomousDbVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDbVersions iterate %j', request); return this.descriptors.page.listAutonomousDbVersions.asyncIterate( this.innerApiCalls['listAutonomousDbVersions'] as GaxCall, @@ -4583,7 +4659,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListAutonomousDatabaseCharacterSetsRequest, @@ -4663,7 +4741,9 @@ export class OracleDatabaseClient { const defaultCallSettings = this._defaults['listAutonomousDatabaseCharacterSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDatabaseCharacterSets stream %j', request); return this.descriptors.page.listAutonomousDatabaseCharacterSets.createStream( this.innerApiCalls.listAutonomousDatabaseCharacterSets as GaxCall, @@ -4719,7 +4799,9 @@ export class OracleDatabaseClient { const defaultCallSettings = this._defaults['listAutonomousDatabaseCharacterSets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDatabaseCharacterSets iterate %j', request); return this.descriptors.page.listAutonomousDatabaseCharacterSets.asyncIterate( this.innerApiCalls['listAutonomousDatabaseCharacterSets'] as GaxCall, @@ -4832,7 +4914,9 @@ export class OracleDatabaseClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.oracledatabase.v1.IListAutonomousDatabaseBackupsRequest, @@ -4908,7 +4992,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listAutonomousDatabaseBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDatabaseBackups stream %j', request); return this.descriptors.page.listAutonomousDatabaseBackups.createStream( this.innerApiCalls.listAutonomousDatabaseBackups as GaxCall, @@ -4966,7 +5052,9 @@ export class OracleDatabaseClient { }); const defaultCallSettings = this._defaults['listAutonomousDatabaseBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutonomousDatabaseBackups iterate %j', request); return this.descriptors.page.listAutonomousDatabaseBackups.asyncIterate( this.innerApiCalls['listAutonomousDatabaseBackups'] as GaxCall, @@ -5146,7 +5234,7 @@ export class OracleDatabaseClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-oracledatabase/test/gapic_oracle_database_v1.ts b/packages/google-cloud-oracledatabase/test/gapic_oracle_database_v1.ts index 8cd693ac213..7d0b5d9d33d 100644 --- a/packages/google-cloud-oracledatabase/test/gapic_oracle_database_v1.ts +++ b/packages/google-cloud-oracledatabase/test/gapic_oracle_database_v1.ts @@ -306,7 +306,9 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.oracleDatabaseStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest() ); @@ -397,7 +399,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest() ); @@ -444,7 +446,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest() ); @@ -478,7 +480,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest() ); @@ -502,7 +504,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudVmClusterRequest() ); @@ -533,7 +535,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudVmClusterRequest() ); @@ -580,7 +582,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudVmClusterRequest() ); @@ -611,7 +613,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetCloudVmClusterRequest() ); @@ -632,7 +634,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest() ); @@ -664,7 +666,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest() ); @@ -711,7 +713,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest() ); @@ -745,7 +747,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest() ); @@ -769,7 +771,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest() ); @@ -801,7 +803,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest() ); @@ -848,7 +850,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest() ); @@ -882,7 +884,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest() ); @@ -906,7 +908,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest() ); @@ -940,7 +942,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest() ); @@ -994,7 +996,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest() ); @@ -1026,7 +1028,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest() ); @@ -1057,7 +1059,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1080,7 +1082,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1101,7 +1103,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest() ); @@ -1135,7 +1137,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest() ); @@ -1189,7 +1191,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest() ); @@ -1221,7 +1223,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest() ); @@ -1252,7 +1254,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1275,7 +1277,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1296,7 +1298,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest() ); @@ -1329,7 +1331,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest() ); @@ -1383,7 +1385,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest() ); @@ -1414,7 +1416,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest() ); @@ -1447,7 +1449,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1469,7 +1471,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1490,7 +1492,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest() ); @@ -1523,7 +1525,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest() ); @@ -1577,7 +1579,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest() ); @@ -1608,7 +1610,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest() ); @@ -1641,7 +1643,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1663,7 +1665,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1684,7 +1686,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest() ); @@ -1717,7 +1719,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest() ); @@ -1771,7 +1773,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest() ); @@ -1805,7 +1807,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest() ); @@ -1838,7 +1840,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1861,7 +1863,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1882,7 +1884,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest() ); @@ -1915,7 +1917,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest() ); @@ -1969,7 +1971,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest() ); @@ -2003,7 +2005,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest() ); @@ -2036,7 +2038,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2059,7 +2061,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2080,7 +2082,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest() ); @@ -2113,7 +2115,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest() ); @@ -2167,7 +2169,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest() ); @@ -2201,7 +2203,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest() ); @@ -2234,7 +2236,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2257,7 +2259,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2278,7 +2280,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest() ); @@ -2318,7 +2320,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest() ); @@ -2375,7 +2377,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest() ); @@ -2409,7 +2411,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest() ); @@ -2481,7 +2483,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest() ); @@ -2542,7 +2544,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest() ); @@ -2596,7 +2598,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest() ); @@ -2643,7 +2645,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest() ); @@ -2683,7 +2685,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest() ); @@ -2740,7 +2742,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest() ); @@ -2771,7 +2773,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest() ); @@ -2832,7 +2834,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest() ); @@ -2882,7 +2884,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest() ); @@ -2932,7 +2934,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest() ); @@ -2975,7 +2977,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListEntitlementsRequest() ); @@ -3014,7 +3016,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListEntitlementsRequest() ); @@ -3069,7 +3071,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListEntitlementsRequest() ); @@ -3100,7 +3102,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListEntitlementsRequest() ); @@ -3161,7 +3163,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListEntitlementsRequest() ); @@ -3211,7 +3213,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListEntitlementsRequest() ); @@ -3261,7 +3263,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListEntitlementsRequest() ); @@ -3304,7 +3306,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbServersRequest() ); @@ -3343,7 +3345,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbServersRequest() ); @@ -3398,7 +3400,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbServersRequest() ); @@ -3429,7 +3431,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbServersRequest() ); @@ -3489,7 +3491,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbServersRequest() ); @@ -3538,7 +3540,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbServersRequest() ); @@ -3587,7 +3589,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbServersRequest() ); @@ -3629,7 +3631,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbNodesRequest() ); @@ -3668,7 +3670,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbNodesRequest() ); @@ -3723,7 +3725,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbNodesRequest() ); @@ -3754,7 +3756,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbNodesRequest() ); @@ -3814,7 +3816,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbNodesRequest() ); @@ -3865,7 +3867,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbNodesRequest() ); @@ -3914,7 +3916,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbNodesRequest() ); @@ -3958,7 +3960,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListGiVersionsRequest() ); @@ -3997,7 +3999,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListGiVersionsRequest() ); @@ -4052,7 +4054,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListGiVersionsRequest() ); @@ -4083,7 +4085,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListGiVersionsRequest() ); @@ -4143,7 +4145,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListGiVersionsRequest() ); @@ -4192,7 +4194,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListGiVersionsRequest() ); @@ -4241,7 +4243,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListGiVersionsRequest() ); @@ -4284,7 +4286,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest() ); @@ -4324,7 +4326,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest() ); @@ -4381,7 +4383,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest() ); @@ -4412,7 +4414,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest() ); @@ -4473,7 +4475,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest() ); @@ -4523,7 +4525,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest() ); @@ -4573,7 +4575,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest() ); @@ -4616,7 +4618,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest() ); @@ -4656,7 +4658,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest() ); @@ -4713,7 +4715,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest() ); @@ -4747,7 +4749,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest() ); @@ -4816,7 +4818,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest() ); @@ -4874,7 +4876,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest() ); @@ -4928,7 +4930,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest() ); @@ -4975,7 +4977,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest() ); @@ -5015,7 +5017,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest() ); @@ -5072,7 +5074,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest() ); @@ -5106,7 +5108,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest() ); @@ -5175,7 +5177,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest() ); @@ -5233,7 +5235,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest() ); @@ -5287,7 +5289,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest() ); @@ -5334,7 +5336,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest() ); @@ -5375,7 +5377,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest() ); @@ -5432,7 +5434,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest() ); @@ -5466,7 +5468,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest() ); @@ -5538,7 +5540,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest() ); @@ -5599,7 +5601,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest() ); @@ -5653,7 +5655,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest() ); @@ -5700,7 +5702,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest() ); @@ -5740,7 +5742,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest() ); @@ -5797,7 +5799,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest() ); @@ -5831,7 +5833,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest() ); @@ -5903,7 +5905,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest() ); @@ -5964,7 +5966,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest() ); @@ -6018,7 +6020,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest() ); @@ -6064,7 +6066,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6094,7 +6096,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6138,7 +6140,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6173,7 +6175,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6221,7 +6223,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6262,7 +6264,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -6341,7 +6343,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -6421,7 +6423,7 @@ describe('v1.OracleDatabaseClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -6517,8 +6519,7 @@ describe('v1.OracleDatabaseClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -6537,7 +6538,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -6546,8 +6547,7 @@ describe('v1.OracleDatabaseClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -6563,7 +6563,7 @@ describe('v1.OracleDatabaseClient', () => { }); describe('Path templates', () => { - describe('autonomousDatabase', () => { + describe('autonomousDatabase', async () => { const fakePath = '/rendered/path/autonomousDatabase'; const expectedParameters = { project: 'projectValue', @@ -6574,7 +6574,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autonomousDatabasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6640,7 +6640,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('autonomousDatabaseBackup', () => { + describe('autonomousDatabaseBackup', async () => { const fakePath = '/rendered/path/autonomousDatabaseBackup'; const expectedParameters = { project: 'projectValue', @@ -6651,7 +6651,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autonomousDatabaseBackupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6721,7 +6721,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('autonomousDatabaseCharacterSet', () => { + describe('autonomousDatabaseCharacterSet', async () => { const fakePath = '/rendered/path/autonomousDatabaseCharacterSet'; const expectedParameters = { project: 'projectValue', @@ -6733,7 +6733,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autonomousDatabaseCharacterSetPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.autonomousDatabaseCharacterSetPathTemplate.match = @@ -6801,7 +6801,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('autonomousDbVersion', () => { + describe('autonomousDbVersion', async () => { const fakePath = '/rendered/path/autonomousDbVersion'; const expectedParameters = { project: 'projectValue', @@ -6812,7 +6812,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.autonomousDbVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6879,7 +6879,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('cloudExadataInfrastructure', () => { + describe('cloudExadataInfrastructure', async () => { const fakePath = '/rendered/path/cloudExadataInfrastructure'; const expectedParameters = { project: 'projectValue', @@ -6890,7 +6890,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cloudExadataInfrastructurePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6960,7 +6960,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('cloudVmCluster', () => { + describe('cloudVmCluster', async () => { const fakePath = '/rendered/path/cloudVmCluster'; const expectedParameters = { project: 'projectValue', @@ -6971,7 +6971,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cloudVmClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7025,7 +7025,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('dbNode', () => { + describe('dbNode', async () => { const fakePath = '/rendered/path/dbNode'; const expectedParameters = { project: 'projectValue', @@ -7037,7 +7037,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dbNodePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7101,7 +7101,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('dbServer', () => { + describe('dbServer', async () => { const fakePath = '/rendered/path/dbServer'; const expectedParameters = { project: 'projectValue', @@ -7113,7 +7113,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dbServerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7178,7 +7178,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('dbSystemShape', () => { + describe('dbSystemShape', async () => { const fakePath = '/rendered/path/dbSystemShape'; const expectedParameters = { project: 'projectValue', @@ -7189,7 +7189,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.dbSystemShapePathTemplate.render = sinon .stub() .returns(fakePath); @@ -7242,7 +7242,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('entitlement', () => { + describe('entitlement', async () => { const fakePath = '/rendered/path/entitlement'; const expectedParameters = { project: 'projectValue', @@ -7253,7 +7253,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entitlementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7306,7 +7306,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('giVersion', () => { + describe('giVersion', async () => { const fakePath = '/rendered/path/giVersion'; const expectedParameters = { project: 'projectValue', @@ -7317,7 +7317,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.giVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7370,7 +7370,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -7380,7 +7380,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7419,7 +7419,7 @@ describe('v1.OracleDatabaseClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -7428,7 +7428,7 @@ describe('v1.OracleDatabaseClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index 823764d6ac1..b04393a1c08 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts index 093365a72bf..24a130a1f36 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/environments_client.ts @@ -637,7 +637,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -772,7 +774,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executeAirflowCommand request %j', request); const wrappedCallback: | Callback< @@ -907,7 +911,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopAirflowCommand request %j', request); const wrappedCallback: | Callback< @@ -1041,7 +1047,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pollAirflowCommand request %j', request); const wrappedCallback: | Callback< @@ -1172,7 +1180,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1302,7 +1312,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1430,7 +1442,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ 'user_workloads_secret.name': request.userWorkloadsSecret!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1559,7 +1573,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1690,7 +1706,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -1819,7 +1837,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -1948,7 +1968,9 @@ export class EnvironmentsClient { 'user_workloads_config_map.name': request.userWorkloadsConfigMap!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -2077,7 +2099,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -2203,7 +2227,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDatabaseProperties request %j', request); const wrappedCallback: | Callback< @@ -2338,7 +2364,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2633,7 +2661,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2801,7 +2831,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2997,7 +3029,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3171,7 +3205,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3357,7 +3393,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3525,7 +3563,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3688,7 +3728,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, @@ -3754,7 +3796,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -3802,7 +3846,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -3917,7 +3963,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, @@ -3991,7 +4039,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads stream %j', request); return this.descriptors.page.listWorkloads.createStream( this.innerApiCalls.listWorkloads as GaxCall, @@ -4047,7 +4097,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads iterate %j', request); return this.descriptors.page.listWorkloads.asyncIterate( this.innerApiCalls['listWorkloads'] as GaxCall, @@ -4154,7 +4206,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, @@ -4221,7 +4275,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsSecrets stream %j', request); return this.descriptors.page.listUserWorkloadsSecrets.createStream( this.innerApiCalls.listUserWorkloadsSecrets as GaxCall, @@ -4270,7 +4326,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsSecrets iterate %j', request); return this.descriptors.page.listUserWorkloadsSecrets.asyncIterate( this.innerApiCalls['listUserWorkloadsSecrets'] as GaxCall, @@ -4377,7 +4435,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, @@ -4444,7 +4504,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsConfigMaps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsConfigMaps stream %j', request); return this.descriptors.page.listUserWorkloadsConfigMaps.createStream( this.innerApiCalls.listUserWorkloadsConfigMaps as GaxCall, @@ -4493,7 +4555,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsConfigMaps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsConfigMaps iterate %j', request); return this.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate( this.innerApiCalls['listUserWorkloadsConfigMaps'] as GaxCall, @@ -4595,7 +4659,7 @@ export class EnvironmentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts index b2d1b1cab72..4d05582be1a 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1/image_versions_client.ts @@ -486,7 +486,9 @@ export class ImageVersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, @@ -554,7 +556,9 @@ export class ImageVersionsClient { }); const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImageVersions stream %j', request); return this.descriptors.page.listImageVersions.createStream( this.innerApiCalls.listImageVersions as GaxCall, @@ -604,7 +608,9 @@ export class ImageVersionsClient { }); const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImageVersions iterate %j', request); return this.descriptors.page.listImageVersions.asyncIterate( this.innerApiCalls['listImageVersions'] as GaxCall, diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts index da91873f188..bec9f4d2e8b 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/environments_client.ts @@ -649,7 +649,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -784,7 +786,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executeAirflowCommand request %j', request); const wrappedCallback: | Callback< @@ -919,7 +923,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopAirflowCommand request %j', request); const wrappedCallback: | Callback< @@ -1053,7 +1059,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pollAirflowCommand request %j', request); const wrappedCallback: | Callback< @@ -1184,7 +1192,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1314,7 +1324,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1442,7 +1454,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ 'user_workloads_secret.name': request.userWorkloadsSecret!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1571,7 +1585,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUserWorkloadsSecret request %j', request); const wrappedCallback: | Callback< @@ -1702,7 +1718,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -1831,7 +1849,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -1960,7 +1980,9 @@ export class EnvironmentsClient { 'user_workloads_config_map.name': request.userWorkloadsConfigMap!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -2089,7 +2111,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteUserWorkloadsConfigMap request %j', request); const wrappedCallback: | Callback< @@ -2215,7 +2239,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDatabaseProperties request %j', request); const wrappedCallback: | Callback< @@ -2350,7 +2376,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2666,7 +2694,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2834,7 +2864,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3003,7 +3035,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3199,7 +3233,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3373,7 +3409,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3559,7 +3597,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3727,7 +3767,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3890,7 +3932,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, @@ -3956,7 +4000,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -4004,7 +4050,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -4119,7 +4167,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, @@ -4193,7 +4243,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads stream %j', request); return this.descriptors.page.listWorkloads.createStream( this.innerApiCalls.listWorkloads as GaxCall, @@ -4249,7 +4301,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listWorkloads']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWorkloads iterate %j', request); return this.descriptors.page.listWorkloads.asyncIterate( this.innerApiCalls['listWorkloads'] as GaxCall, @@ -4356,7 +4410,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, @@ -4423,7 +4479,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsSecrets stream %j', request); return this.descriptors.page.listUserWorkloadsSecrets.createStream( this.innerApiCalls.listUserWorkloadsSecrets as GaxCall, @@ -4472,7 +4530,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsSecrets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsSecrets iterate %j', request); return this.descriptors.page.listUserWorkloadsSecrets.asyncIterate( this.innerApiCalls['listUserWorkloadsSecrets'] as GaxCall, @@ -4579,7 +4639,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, @@ -4646,7 +4708,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsConfigMaps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsConfigMaps stream %j', request); return this.descriptors.page.listUserWorkloadsConfigMaps.createStream( this.innerApiCalls.listUserWorkloadsConfigMaps as GaxCall, @@ -4695,7 +4759,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listUserWorkloadsConfigMaps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listUserWorkloadsConfigMaps iterate %j', request); return this.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate( this.innerApiCalls['listUserWorkloadsConfigMaps'] as GaxCall, @@ -4797,7 +4863,7 @@ export class EnvironmentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts index 5efb3489b34..14b76a93b04 100644 --- a/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts +++ b/packages/google-cloud-orchestration-airflow-service/src/v1beta1/image_versions_client.ts @@ -486,7 +486,9 @@ export class ImageVersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, @@ -554,7 +556,9 @@ export class ImageVersionsClient { }); const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImageVersions stream %j', request); return this.descriptors.page.listImageVersions.createStream( this.innerApiCalls.listImageVersions as GaxCall, @@ -604,7 +608,9 @@ export class ImageVersionsClient { }); const defaultCallSettings = this._defaults['listImageVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listImageVersions iterate %j', request); return this.descriptors.page.listImageVersions.asyncIterate( this.innerApiCalls['listImageVersions'] as GaxCall, diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts index 05d88d1f4fd..e71ee399805 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1.ts @@ -284,7 +284,9 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.environmentsStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); @@ -374,7 +376,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); @@ -421,7 +423,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); @@ -452,7 +454,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() ); @@ -473,7 +475,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() ); @@ -505,7 +507,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() ); @@ -552,7 +554,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() ); @@ -586,7 +588,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() ); @@ -610,7 +612,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() ); @@ -642,7 +644,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() ); @@ -689,7 +691,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() ); @@ -720,7 +722,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() ); @@ -741,7 +743,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() ); @@ -773,7 +775,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() ); @@ -820,7 +822,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() ); @@ -851,7 +853,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() ); @@ -872,7 +874,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() ); @@ -904,7 +906,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() ); @@ -951,7 +953,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() ); @@ -985,7 +987,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() ); @@ -1041,7 +1043,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() ); @@ -1088,7 +1090,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() ); @@ -1122,7 +1124,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() ); @@ -1146,7 +1148,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() ); @@ -1179,7 +1181,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() ); @@ -1227,7 +1229,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() ); @@ -1262,7 +1264,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() ); @@ -1287,7 +1289,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() ); @@ -1319,7 +1321,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() ); @@ -1366,7 +1368,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() ); @@ -1400,7 +1402,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() ); @@ -1424,7 +1426,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() ); @@ -1456,7 +1458,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() ); @@ -1503,7 +1505,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() ); @@ -1561,7 +1563,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() ); @@ -1593,7 +1595,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() ); @@ -1640,7 +1642,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() ); @@ -1674,7 +1676,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() ); @@ -1698,7 +1700,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1731,7 +1733,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1779,7 +1781,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1814,7 +1816,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1839,7 +1841,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1871,7 +1873,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1918,7 +1920,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1952,7 +1954,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1976,7 +1978,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() ); @@ -2008,7 +2010,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() ); @@ -2055,7 +2057,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() ); @@ -2089,7 +2091,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() ); @@ -2113,7 +2115,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); @@ -2146,7 +2148,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); @@ -2200,7 +2202,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); @@ -2231,7 +2233,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() ); @@ -2264,7 +2266,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2286,7 +2288,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2307,7 +2309,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); @@ -2340,7 +2342,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); @@ -2394,7 +2396,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); @@ -2425,7 +2427,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() ); @@ -2458,7 +2460,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2480,7 +2482,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2501,7 +2503,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); @@ -2534,7 +2536,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); @@ -2588,7 +2590,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); @@ -2619,7 +2621,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() ); @@ -2652,7 +2654,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2674,7 +2676,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2695,7 +2697,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() ); @@ -2727,7 +2729,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() ); @@ -2781,7 +2783,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() ); @@ -2812,7 +2814,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() ); @@ -2845,7 +2847,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2867,7 +2869,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2885,7 +2887,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() ); @@ -2917,7 +2919,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() ); @@ -2971,7 +2973,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() ); @@ -3002,7 +3004,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() ); @@ -3035,7 +3037,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3057,7 +3059,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3075,7 +3077,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() ); @@ -3107,7 +3109,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() ); @@ -3161,7 +3163,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() ); @@ -3192,7 +3194,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() ); @@ -3225,7 +3227,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3247,7 +3249,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3265,7 +3267,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() ); @@ -3298,7 +3300,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() ); @@ -3352,7 +3354,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() ); @@ -3383,7 +3385,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() ); @@ -3416,7 +3418,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3438,7 +3440,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3459,7 +3461,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); @@ -3498,7 +3500,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); @@ -3555,7 +3557,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); @@ -3586,7 +3588,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); @@ -3649,7 +3651,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); @@ -3701,7 +3703,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); @@ -3751,7 +3753,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() ); @@ -3794,7 +3796,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() ); @@ -3833,7 +3835,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() ); @@ -3890,7 +3892,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() ); @@ -3921,7 +3923,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() ); @@ -3984,7 +3986,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() ); @@ -4036,7 +4038,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() ); @@ -4086,7 +4088,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() ); @@ -4129,7 +4131,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() ); @@ -4169,7 +4171,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() ); @@ -4226,7 +4228,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() ); @@ -4260,7 +4262,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() ); @@ -4329,7 +4331,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() ); @@ -4387,7 +4389,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() ); @@ -4441,7 +4443,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() ); @@ -4488,7 +4490,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() ); @@ -4528,7 +4530,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() ); @@ -4585,7 +4587,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() ); @@ -4619,7 +4621,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() ); @@ -4688,7 +4690,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() ); @@ -4746,7 +4748,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() ); @@ -4800,7 +4802,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() ); @@ -4846,7 +4848,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4925,7 +4927,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5005,7 +5007,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5101,8 +5103,7 @@ describe('v1.EnvironmentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5121,7 +5122,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5130,8 +5131,7 @@ describe('v1.EnvironmentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5147,7 +5147,7 @@ describe('v1.EnvironmentsClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -5158,7 +5158,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5211,7 +5211,7 @@ describe('v1.EnvironmentsClient', () => { }); }); - describe('userWorkloadsConfigMap', () => { + describe('userWorkloadsConfigMap', async () => { const fakePath = '/rendered/path/userWorkloadsConfigMap'; const expectedParameters = { project: 'projectValue', @@ -5223,7 +5223,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5308,7 +5308,7 @@ describe('v1.EnvironmentsClient', () => { }); }); - describe('userWorkloadsSecret', () => { + describe('userWorkloadsSecret', async () => { const fakePath = '/rendered/path/userWorkloadsSecret'; const expectedParameters = { project: 'projectValue', @@ -5320,7 +5320,7 @@ describe('v1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsSecretPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts index 95cf3a05501..8e5f0642a3a 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_environments_v1beta1.ts @@ -284,7 +284,9 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.environmentsStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); @@ -374,7 +376,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); @@ -421,7 +423,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); @@ -452,7 +454,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() ); @@ -473,7 +475,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() ); @@ -505,7 +507,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() ); @@ -552,7 +554,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() ); @@ -586,7 +588,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() ); @@ -610,7 +612,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() ); @@ -642,7 +644,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() ); @@ -689,7 +691,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() ); @@ -720,7 +722,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() ); @@ -741,7 +743,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() ); @@ -773,7 +775,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() ); @@ -820,7 +822,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() ); @@ -851,7 +853,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() ); @@ -872,7 +874,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() ); @@ -904,7 +906,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() ); @@ -951,7 +953,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() ); @@ -985,7 +987,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() ); @@ -1009,7 +1011,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() ); @@ -1041,7 +1043,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() ); @@ -1088,7 +1090,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() ); @@ -1122,7 +1124,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() ); @@ -1146,7 +1148,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() ); @@ -1179,7 +1181,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() ); @@ -1227,7 +1229,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() ); @@ -1262,7 +1264,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() ); @@ -1287,7 +1289,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() ); @@ -1319,7 +1321,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() ); @@ -1366,7 +1368,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() ); @@ -1400,7 +1402,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() ); @@ -1424,7 +1426,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() ); @@ -1456,7 +1458,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() ); @@ -1503,7 +1505,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() ); @@ -1537,7 +1539,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() ); @@ -1561,7 +1563,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() ); @@ -1593,7 +1595,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() ); @@ -1640,7 +1642,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() ); @@ -1674,7 +1676,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() ); @@ -1698,7 +1700,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1731,7 +1733,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1779,7 +1781,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1814,7 +1816,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() ); @@ -1839,7 +1841,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1871,7 +1873,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1918,7 +1920,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1952,7 +1954,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() ); @@ -1976,7 +1978,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() ); @@ -2008,7 +2010,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() ); @@ -2055,7 +2057,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() ); @@ -2089,7 +2091,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() ); @@ -2113,7 +2115,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); @@ -2146,7 +2148,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); @@ -2200,7 +2202,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); @@ -2231,7 +2233,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() ); @@ -2264,7 +2266,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2286,7 +2288,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2307,7 +2309,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); @@ -2340,7 +2342,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); @@ -2394,7 +2396,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); @@ -2425,7 +2427,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() ); @@ -2458,7 +2460,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2480,7 +2482,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2501,7 +2503,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); @@ -2534,7 +2536,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); @@ -2588,7 +2590,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); @@ -2619,7 +2621,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() ); @@ -2652,7 +2654,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2674,7 +2676,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2695,7 +2697,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); @@ -2728,7 +2730,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); @@ -2782,7 +2784,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); @@ -2813,7 +2815,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() ); @@ -2846,7 +2848,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2868,7 +2870,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2889,7 +2891,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); @@ -2921,7 +2923,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); @@ -2975,7 +2977,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); @@ -3006,7 +3008,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() ); @@ -3039,7 +3041,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3061,7 +3063,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3079,7 +3081,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() ); @@ -3111,7 +3113,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() ); @@ -3165,7 +3167,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() ); @@ -3196,7 +3198,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() ); @@ -3229,7 +3231,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3251,7 +3253,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3269,7 +3271,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() ); @@ -3301,7 +3303,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() ); @@ -3355,7 +3357,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() ); @@ -3386,7 +3388,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() ); @@ -3419,7 +3421,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3441,7 +3443,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3459,7 +3461,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() ); @@ -3492,7 +3494,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() ); @@ -3546,7 +3548,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() ); @@ -3577,7 +3579,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() ); @@ -3610,7 +3612,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3632,7 +3634,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3653,7 +3655,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); @@ -3692,7 +3694,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); @@ -3749,7 +3751,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); @@ -3780,7 +3782,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); @@ -3843,7 +3845,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); @@ -3895,7 +3897,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); @@ -3945,7 +3947,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() ); @@ -3988,7 +3990,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() ); @@ -4027,7 +4029,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() ); @@ -4084,7 +4086,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() ); @@ -4115,7 +4117,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() ); @@ -4178,7 +4180,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() ); @@ -4230,7 +4232,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() ); @@ -4280,7 +4282,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() ); @@ -4323,7 +4325,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() ); @@ -4363,7 +4365,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() ); @@ -4420,7 +4422,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() ); @@ -4454,7 +4456,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() ); @@ -4523,7 +4525,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() ); @@ -4581,7 +4583,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() ); @@ -4635,7 +4637,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() ); @@ -4682,7 +4684,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() ); @@ -4722,7 +4724,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() ); @@ -4779,7 +4781,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() ); @@ -4813,7 +4815,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() ); @@ -4882,7 +4884,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() ); @@ -4940,7 +4942,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() ); @@ -4994,7 +4996,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() ); @@ -5040,7 +5042,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5119,7 +5121,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5199,7 +5201,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5295,8 +5297,7 @@ describe('v1beta1.EnvironmentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5315,7 +5316,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5324,8 +5325,7 @@ describe('v1beta1.EnvironmentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5341,7 +5341,7 @@ describe('v1beta1.EnvironmentsClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -5352,7 +5352,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5405,7 +5405,7 @@ describe('v1beta1.EnvironmentsClient', () => { }); }); - describe('userWorkloadsConfigMap', () => { + describe('userWorkloadsConfigMap', async () => { const fakePath = '/rendered/path/userWorkloadsConfigMap'; const expectedParameters = { project: 'projectValue', @@ -5417,7 +5417,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5502,7 +5502,7 @@ describe('v1beta1.EnvironmentsClient', () => { }); }); - describe('userWorkloadsSecret', () => { + describe('userWorkloadsSecret', async () => { const fakePath = '/rendered/path/userWorkloadsSecret'; const expectedParameters = { project: 'projectValue', @@ -5514,7 +5514,7 @@ describe('v1beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsSecretPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts index 8ef197f8c6b..98705876100 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1.ts @@ -252,7 +252,9 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageVersionsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); @@ -350,7 +352,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); @@ -407,7 +409,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); @@ -438,7 +440,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); @@ -501,7 +503,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); @@ -553,7 +555,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); @@ -603,7 +605,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() ); @@ -641,7 +643,7 @@ describe('v1.ImageVersionsClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -652,7 +654,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -705,7 +707,7 @@ describe('v1.ImageVersionsClient', () => { }); }); - describe('userWorkloadsConfigMap', () => { + describe('userWorkloadsConfigMap', async () => { const fakePath = '/rendered/path/userWorkloadsConfigMap'; const expectedParameters = { project: 'projectValue', @@ -717,7 +719,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = sinon .stub() .returns(fakePath); @@ -802,7 +804,7 @@ describe('v1.ImageVersionsClient', () => { }); }); - describe('userWorkloadsSecret', () => { + describe('userWorkloadsSecret', async () => { const fakePath = '/rendered/path/userWorkloadsSecret'; const expectedParameters = { project: 'projectValue', @@ -814,7 +816,7 @@ describe('v1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsSecretPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts index 042e0d9e4de..8799115e080 100644 --- a/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts +++ b/packages/google-cloud-orchestration-airflow-service/test/gapic_image_versions_v1beta1.ts @@ -252,7 +252,9 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.imageVersionsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); @@ -350,7 +352,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); @@ -407,7 +409,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); @@ -438,7 +440,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); @@ -501,7 +503,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); @@ -553,7 +555,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); @@ -603,7 +605,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() ); @@ -641,7 +643,7 @@ describe('v1beta1.ImageVersionsClient', () => { }); describe('Path templates', () => { - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -652,7 +654,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -705,7 +707,7 @@ describe('v1beta1.ImageVersionsClient', () => { }); }); - describe('userWorkloadsConfigMap', () => { + describe('userWorkloadsConfigMap', async () => { const fakePath = '/rendered/path/userWorkloadsConfigMap'; const expectedParameters = { project: 'projectValue', @@ -717,7 +719,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = sinon .stub() .returns(fakePath); @@ -802,7 +804,7 @@ describe('v1beta1.ImageVersionsClient', () => { }); }); - describe('userWorkloadsSecret', () => { + describe('userWorkloadsSecret', async () => { const fakePath = '/rendered/path/userWorkloadsSecret'; const expectedParameters = { project: 'projectValue', @@ -814,7 +816,7 @@ describe('v1beta1.ImageVersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userWorkloadsSecretPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-orgpolicy/package.json b/packages/google-cloud-orgpolicy/package.json index d265feb9511..3bc054cf43a 100644 --- a/packages/google-cloud-orgpolicy/package.json +++ b/packages/google-cloud-orgpolicy/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata.google.cloud.orgpolicy.v2.json b/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata.google.cloud.orgpolicy.v2.json index 0e2cd9df947..d82c6dbc0fb 100644 --- a/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata.google.cloud.orgpolicy.v2.json +++ b/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata.google.cloud.orgpolicy.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-orgpolicy", - "version": "3.5.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata_google.cloud.orgpolicy.v2.json b/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata_google.cloud.orgpolicy.v2.json index c6de02cbb24..b377838f6ae 100644 --- a/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata_google.cloud.orgpolicy.v2.json +++ b/packages/google-cloud-orgpolicy/samples/generated/v2/snippet_metadata_google.cloud.orgpolicy.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-orgpolicy", - "version": "3.5.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orgpolicy/src/v2/org_policy_client.ts b/packages/google-cloud-orgpolicy/src/v2/org_policy_client.ts index 20b6cf598c3..696b4eba7bb 100644 --- a/packages/google-cloud-orgpolicy/src/v2/org_policy_client.ts +++ b/packages/google-cloud-orgpolicy/src/v2/org_policy_client.ts @@ -531,7 +531,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPolicy request %j', request); const wrappedCallback: | Callback< @@ -651,7 +653,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEffectivePolicy request %j', request); const wrappedCallback: | Callback< @@ -777,7 +781,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPolicy request %j', request); const wrappedCallback: | Callback< @@ -899,7 +905,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ 'policy.name': request.policy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePolicy request %j', request); const wrappedCallback: | Callback< @@ -1017,7 +1025,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePolicy request %j', request); const wrappedCallback: | Callback< @@ -1148,7 +1158,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createCustomConstraint request %j', request); const wrappedCallback: | Callback< @@ -1279,7 +1291,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ 'custom_constraint.name': request.customConstraint!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateCustomConstraint request %j', request); const wrappedCallback: | Callback< @@ -1402,7 +1416,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomConstraint request %j', request); const wrappedCallback: | Callback< @@ -1531,7 +1547,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteCustomConstraint request %j', request); const wrappedCallback: | Callback< @@ -1667,7 +1685,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orgpolicy.v2.IListConstraintsRequest, @@ -1741,7 +1761,9 @@ export class OrgPolicyClient { }); const defaultCallSettings = this._defaults['listConstraints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConstraints stream %j', request); return this.descriptors.page.listConstraints.createStream( this.innerApiCalls.listConstraints as GaxCall, @@ -1797,7 +1819,9 @@ export class OrgPolicyClient { }); const defaultCallSettings = this._defaults['listConstraints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConstraints iterate %j', request); return this.descriptors.page.listConstraints.asyncIterate( this.innerApiCalls['listConstraints'] as GaxCall, @@ -1903,7 +1927,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orgpolicy.v2.IListPoliciesRequest, @@ -1978,7 +2004,9 @@ export class OrgPolicyClient { }); const defaultCallSettings = this._defaults['listPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicies stream %j', request); return this.descriptors.page.listPolicies.createStream( this.innerApiCalls.listPolicies as GaxCall, @@ -2035,7 +2063,9 @@ export class OrgPolicyClient { }); const defaultCallSettings = this._defaults['listPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPolicies iterate %j', request); return this.descriptors.page.listPolicies.asyncIterate( this.innerApiCalls['listPolicies'] as GaxCall, @@ -2145,7 +2175,9 @@ export class OrgPolicyClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.orgpolicy.v2.IListCustomConstraintsRequest, @@ -2217,7 +2249,9 @@ export class OrgPolicyClient { }); const defaultCallSettings = this._defaults['listCustomConstraints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomConstraints stream %j', request); return this.descriptors.page.listCustomConstraints.createStream( this.innerApiCalls.listCustomConstraints as GaxCall, @@ -2271,7 +2305,9 @@ export class OrgPolicyClient { }); const defaultCallSettings = this._defaults['listCustomConstraints']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomConstraints iterate %j', request); return this.descriptors.page.listCustomConstraints.asyncIterate( this.innerApiCalls['listCustomConstraints'] as GaxCall, diff --git a/packages/google-cloud-orgpolicy/test/gapic_org_policy_v2.ts b/packages/google-cloud-orgpolicy/test/gapic_org_policy_v2.ts index d26c12a5b84..aa5ec1f8adb 100644 --- a/packages/google-cloud-orgpolicy/test/gapic_org_policy_v2.ts +++ b/packages/google-cloud-orgpolicy/test/gapic_org_policy_v2.ts @@ -250,7 +250,9 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.orgPolicyStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetPolicyRequest() ); @@ -340,7 +342,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetPolicyRequest() ); @@ -387,7 +389,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetPolicyRequest() ); @@ -415,7 +417,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetPolicyRequest() ); @@ -436,7 +438,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetEffectivePolicyRequest() ); @@ -468,7 +470,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetEffectivePolicyRequest() ); @@ -515,7 +517,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetEffectivePolicyRequest() ); @@ -546,7 +548,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetEffectivePolicyRequest() ); @@ -567,7 +569,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreatePolicyRequest() ); @@ -598,7 +600,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreatePolicyRequest() ); @@ -645,7 +647,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreatePolicyRequest() ); @@ -676,7 +678,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreatePolicyRequest() ); @@ -697,7 +699,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdatePolicyRequest() ); @@ -729,7 +731,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdatePolicyRequest() ); @@ -777,7 +779,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdatePolicyRequest() ); @@ -809,7 +811,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdatePolicyRequest() ); @@ -831,7 +833,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeletePolicyRequest() ); @@ -862,7 +864,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeletePolicyRequest() ); @@ -909,7 +911,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeletePolicyRequest() ); @@ -940,7 +942,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeletePolicyRequest() ); @@ -961,7 +963,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreateCustomConstraintRequest() ); @@ -993,7 +995,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreateCustomConstraintRequest() ); @@ -1040,7 +1042,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreateCustomConstraintRequest() ); @@ -1074,7 +1076,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.CreateCustomConstraintRequest() ); @@ -1098,7 +1100,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest() ); @@ -1131,7 +1133,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest() ); @@ -1179,7 +1181,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest() ); @@ -1214,7 +1216,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest() ); @@ -1239,7 +1241,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetCustomConstraintRequest() ); @@ -1271,7 +1273,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetCustomConstraintRequest() ); @@ -1318,7 +1320,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetCustomConstraintRequest() ); @@ -1349,7 +1351,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.GetCustomConstraintRequest() ); @@ -1370,7 +1372,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest() ); @@ -1402,7 +1404,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest() ); @@ -1449,7 +1451,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest() ); @@ -1483,7 +1485,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest() ); @@ -1507,7 +1509,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListConstraintsRequest() ); @@ -1546,7 +1548,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListConstraintsRequest() ); @@ -1601,7 +1603,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListConstraintsRequest() ); @@ -1632,7 +1634,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListConstraintsRequest() ); @@ -1692,7 +1694,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListConstraintsRequest() ); @@ -1741,7 +1743,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListConstraintsRequest() ); @@ -1790,7 +1792,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListConstraintsRequest() ); @@ -1832,7 +1834,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListPoliciesRequest() ); @@ -1865,7 +1867,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListPoliciesRequest() ); @@ -1914,7 +1916,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListPoliciesRequest() ); @@ -1945,7 +1947,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListPoliciesRequest() ); @@ -1999,7 +2001,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListPoliciesRequest() ); @@ -2050,7 +2052,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListPoliciesRequest() ); @@ -2093,7 +2095,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListPoliciesRequest() ); @@ -2135,7 +2137,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest() ); @@ -2175,7 +2177,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest() ); @@ -2230,7 +2232,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest() ); @@ -2264,7 +2266,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest() ); @@ -2331,7 +2333,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest() ); @@ -2387,7 +2389,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest() ); @@ -2441,7 +2443,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest() ); @@ -2483,7 +2485,7 @@ describe('v2.OrgPolicyClient', () => { }); describe('Path templates', () => { - describe('customConstraint', () => { + describe('customConstraint', async () => { const fakePath = '/rendered/path/customConstraint'; const expectedParameters = { organization: 'organizationValue', @@ -2493,7 +2495,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customConstraintPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2540,7 +2542,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('folderConstraint', () => { + describe('folderConstraint', async () => { const fakePath = '/rendered/path/folderConstraint'; const expectedParameters = { folder: 'folderValue', @@ -2550,7 +2552,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderConstraintPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2595,7 +2597,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('folderPolicy', () => { + describe('folderPolicy', async () => { const fakePath = '/rendered/path/folderPolicy'; const expectedParameters = { folder: 'folderValue', @@ -2605,7 +2607,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2644,7 +2646,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('organization', () => { + describe('organization', async () => { const fakePath = '/rendered/path/organization'; const expectedParameters = { organization: 'organizationValue', @@ -2653,7 +2655,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2682,7 +2684,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('organizationConstraint', () => { + describe('organizationConstraint', async () => { const fakePath = '/rendered/path/organizationConstraint'; const expectedParameters = { organization: 'organizationValue', @@ -2692,7 +2694,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationConstraintPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2745,7 +2747,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('organizationPolicy', () => { + describe('organizationPolicy', async () => { const fakePath = '/rendered/path/organizationPolicy'; const expectedParameters = { organization: 'organizationValue', @@ -2755,7 +2757,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2807,7 +2809,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2816,7 +2818,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2845,7 +2847,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('projectConstraint', () => { + describe('projectConstraint', async () => { const fakePath = '/rendered/path/projectConstraint'; const expectedParameters = { project: 'projectValue', @@ -2855,7 +2857,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConstraintPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2907,7 +2909,7 @@ describe('v2.OrgPolicyClient', () => { }); }); - describe('projectPolicy', () => { + describe('projectPolicy', async () => { const fakePath = '/rendered/path/projectPolicy'; const expectedParameters = { project: 'projectValue', @@ -2917,7 +2919,7 @@ describe('v2.OrgPolicyClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPolicyPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 0374df09628..4683f481071 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -32,7 +32,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json index af7fe385bdc..a912a060aff 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata.google.cloud.osconfig.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata_google.cloud.osconfig.v1.json b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata_google.cloud.osconfig.v1.json index af7fe385bdc..a912a060aff 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata_google.cloud.osconfig.v1.json +++ b/packages/google-cloud-osconfig/samples/generated/v1/snippet_metadata_google.cloud.osconfig.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json index e7dcdc60ac2..3de0f6298f8 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata.google.cloud.osconfig.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata_google.cloud.osconfig.v1alpha.json b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata_google.cloud.osconfig.v1alpha.json index e7dcdc60ac2..3de0f6298f8 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata_google.cloud.osconfig.v1alpha.json +++ b/packages/google-cloud-osconfig/samples/generated/v1alpha/snippet_metadata_google.cloud.osconfig.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata.google.cloud.osconfig.v1beta.json b/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata.google.cloud.osconfig.v1beta.json index 023dc8ea893..45dc0f1351f 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata.google.cloud.osconfig.v1beta.json +++ b/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata.google.cloud.osconfig.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata_google.cloud.osconfig.v1beta.json b/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata_google.cloud.osconfig.v1beta.json index 023dc8ea893..45dc0f1351f 100644 --- a/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata_google.cloud.osconfig.v1beta.json +++ b/packages/google-cloud-osconfig/samples/generated/v1beta/snippet_metadata_google.cloud.osconfig.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-osconfig", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts index db8e046d6a9..b916e506c06 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_service_client.ts @@ -528,7 +528,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executePatchJob request %j', request); const wrappedCallback: | Callback< @@ -639,7 +641,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPatchJob request %j', request); const wrappedCallback: | Callback< @@ -750,7 +754,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelPatchJob request %j', request); const wrappedCallback: | Callback< @@ -877,7 +883,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -997,7 +1005,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1117,7 +1127,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1239,7 +1251,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'patch_deployment.name': request.patchDeployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1360,7 +1374,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pausePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1481,7 +1497,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1607,7 +1625,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchJobsRequest, @@ -1677,7 +1697,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobs stream %j', request); return this.descriptors.page.listPatchJobs.createStream( this.innerApiCalls.listPatchJobs as GaxCall, @@ -1729,7 +1751,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobs iterate %j', request); return this.descriptors.page.listPatchJobs.asyncIterate( this.innerApiCalls['listPatchJobs'] as GaxCall, @@ -1837,7 +1861,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest, @@ -1908,7 +1934,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobInstanceDetails stream %j', request); return this.descriptors.page.listPatchJobInstanceDetails.createStream( this.innerApiCalls.listPatchJobInstanceDetails as GaxCall, @@ -1961,7 +1989,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobInstanceDetails iterate %j', request); return this.descriptors.page.listPatchJobInstanceDetails.asyncIterate( this.innerApiCalls['listPatchJobInstanceDetails'] as GaxCall, @@ -2066,7 +2096,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest, @@ -2134,7 +2166,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchDeployments stream %j', request); return this.descriptors.page.listPatchDeployments.createStream( this.innerApiCalls.listPatchDeployments as GaxCall, @@ -2184,7 +2218,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchDeployments iterate %j', request); return this.descriptors.page.listPatchDeployments.asyncIterate( this.innerApiCalls['listPatchDeployments'] as GaxCall, diff --git a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts index 01dab0f0142..f7a5ff25af8 100644 --- a/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1/os_config_zonal_service_client.ts @@ -606,7 +606,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOSPolicyAssignment request %j', request); const wrappedCallback: | Callback< @@ -740,7 +742,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOSPolicyAssignmentReport request %j', request); const wrappedCallback: | Callback< @@ -864,7 +868,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInventory request %j', request); const wrappedCallback: | Callback< @@ -994,7 +1000,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVulnerabilityReport request %j', request); const wrappedCallback: | Callback< @@ -1146,7 +1154,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1324,7 +1334,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ 'os_policy_assignment.name': request.osPolicyAssignment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1502,7 +1514,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1668,7 +1682,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentsRequest, @@ -1735,7 +1751,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignments stream %j', request); return this.descriptors.page.listOSPolicyAssignments.createStream( this.innerApiCalls.listOsPolicyAssignments as GaxCall, @@ -1784,7 +1802,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignments iterate %j', request); return this.descriptors.page.listOSPolicyAssignments.asyncIterate( this.innerApiCalls['listOsPolicyAssignments'] as GaxCall, @@ -1888,7 +1908,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentRevisionsRequest, @@ -1956,7 +1978,9 @@ export class OsConfigZonalServiceClient { const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentRevisions stream %j', request); return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( this.innerApiCalls.listOsPolicyAssignmentRevisions as GaxCall, @@ -2006,7 +2030,9 @@ export class OsConfigZonalServiceClient { const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentRevisions iterate %j', request); return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentRevisions'] as GaxCall, @@ -2134,7 +2160,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListOSPolicyAssignmentReportsRequest, @@ -2224,7 +2252,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentReports stream %j', request); return this.descriptors.page.listOSPolicyAssignmentReports.createStream( this.innerApiCalls.listOsPolicyAssignmentReports as GaxCall, @@ -2296,7 +2326,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentReports iterate %j', request); return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentReports'] as GaxCall, @@ -2410,7 +2442,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListInventoriesRequest, @@ -2487,7 +2521,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInventories stream %j', request); return this.descriptors.page.listInventories.createStream( this.innerApiCalls.listInventories as GaxCall, @@ -2546,7 +2582,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInventories iterate %j', request); return this.descriptors.page.listInventories.asyncIterate( this.innerApiCalls['listInventories'] as GaxCall, @@ -2657,7 +2695,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, @@ -2731,7 +2771,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVulnerabilityReports stream %j', request); return this.descriptors.page.listVulnerabilityReports.createStream( this.innerApiCalls.listVulnerabilityReports as GaxCall, @@ -2787,7 +2829,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVulnerabilityReports iterate %j', request); return this.descriptors.page.listVulnerabilityReports.asyncIterate( this.innerApiCalls['listVulnerabilityReports'] as GaxCall, diff --git a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts index 4216add0e79..24597342d54 100644 --- a/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1alpha/os_config_zonal_service_client.ts @@ -618,7 +618,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOSPolicyAssignment request %j', request); const wrappedCallback: | Callback< @@ -753,7 +755,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$OsConfigZonalService-$GetInstanceOSPoliciesCompliance', 'GetInstanceOSPoliciesCompliance is deprecated and may be removed in a future version.', @@ -898,7 +902,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOSPolicyAssignmentReport request %j', request); const wrappedCallback: | Callback< @@ -1028,7 +1034,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInventory request %j', request); const wrappedCallback: | Callback< @@ -1158,7 +1166,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVulnerabilityReport request %j', request); const wrappedCallback: | Callback< @@ -1310,7 +1320,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1487,7 +1499,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ 'os_policy_assignment.name': request.osPolicyAssignment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1665,7 +1679,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1831,7 +1847,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentsRequest, @@ -1898,7 +1916,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignments stream %j', request); return this.descriptors.page.listOSPolicyAssignments.createStream( this.innerApiCalls.listOsPolicyAssignments as GaxCall, @@ -1947,7 +1967,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignments iterate %j', request); return this.descriptors.page.listOSPolicyAssignments.asyncIterate( this.innerApiCalls['listOsPolicyAssignments'] as GaxCall, @@ -2051,7 +2073,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentRevisionsRequest, @@ -2119,7 +2143,9 @@ export class OsConfigZonalServiceClient { const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentRevisions stream %j', request); return this.descriptors.page.listOSPolicyAssignmentRevisions.createStream( this.innerApiCalls.listOsPolicyAssignmentRevisions as GaxCall, @@ -2169,7 +2195,9 @@ export class OsConfigZonalServiceClient { const defaultCallSettings = this._defaults['listOsPolicyAssignmentRevisions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentRevisions iterate %j', request); return this.descriptors.page.listOSPolicyAssignmentRevisions.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentRevisions'] as GaxCall, @@ -2283,7 +2311,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$OsConfigZonalService-$ListInstanceOSPoliciesCompliances', 'ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version.', @@ -2368,7 +2398,9 @@ export class OsConfigZonalServiceClient { const defaultCallSettings = this._defaults['listInstanceOsPoliciesCompliances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$OsConfigZonalService-$ListInstanceOSPoliciesCompliances', 'ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version.', @@ -2432,7 +2464,9 @@ export class OsConfigZonalServiceClient { const defaultCallSettings = this._defaults['listInstanceOsPoliciesCompliances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$OsConfigZonalService-$ListInstanceOSPoliciesCompliances', 'ListInstanceOSPoliciesCompliances is deprecated and may be removed in a future version.', @@ -2565,7 +2599,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1alpha.IListOSPolicyAssignmentReportsRequest, @@ -2655,7 +2691,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentReports stream %j', request); return this.descriptors.page.listOSPolicyAssignmentReports.createStream( this.innerApiCalls.listOsPolicyAssignmentReports as GaxCall, @@ -2727,7 +2765,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listOsPolicyAssignmentReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOSPolicyAssignmentReports iterate %j', request); return this.descriptors.page.listOSPolicyAssignmentReports.asyncIterate( this.innerApiCalls['listOsPolicyAssignmentReports'] as GaxCall, @@ -2841,7 +2881,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1alpha.IListInventoriesRequest, @@ -2918,7 +2960,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInventories stream %j', request); return this.descriptors.page.listInventories.createStream( this.innerApiCalls.listInventories as GaxCall, @@ -2977,7 +3021,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listInventories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInventories iterate %j', request); return this.descriptors.page.listInventories.asyncIterate( this.innerApiCalls['listInventories'] as GaxCall, @@ -3088,7 +3134,9 @@ export class OsConfigZonalServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1alpha.IListVulnerabilityReportsRequest, @@ -3162,7 +3210,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVulnerabilityReports stream %j', request); return this.descriptors.page.listVulnerabilityReports.createStream( this.innerApiCalls.listVulnerabilityReports as GaxCall, @@ -3218,7 +3268,9 @@ export class OsConfigZonalServiceClient { }); const defaultCallSettings = this._defaults['listVulnerabilityReports']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVulnerabilityReports iterate %j', request); return this.descriptors.page.listVulnerabilityReports.asyncIterate( this.innerApiCalls['listVulnerabilityReports'] as GaxCall, diff --git a/packages/google-cloud-osconfig/src/v1beta/os_config_service_client.ts b/packages/google-cloud-osconfig/src/v1beta/os_config_service_client.ts index 313b97912e9..df81f76c511 100644 --- a/packages/google-cloud-osconfig/src/v1beta/os_config_service_client.ts +++ b/packages/google-cloud-osconfig/src/v1beta/os_config_service_client.ts @@ -530,7 +530,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('executePatchJob request %j', request); const wrappedCallback: | Callback< @@ -650,7 +652,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPatchJob request %j', request); const wrappedCallback: | Callback< @@ -767,7 +771,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelPatchJob request %j', request); const wrappedCallback: | Callback< @@ -902,7 +908,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1028,7 +1036,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1154,7 +1164,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1282,7 +1294,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'patch_deployment.name': request.patchDeployment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1409,7 +1423,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pausePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1536,7 +1552,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumePatchDeployment request %j', request); const wrappedCallback: | Callback< @@ -1667,7 +1685,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGuestPolicy request %j', request); const wrappedCallback: | Callback< @@ -1787,7 +1807,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGuestPolicy request %j', request); const wrappedCallback: | Callback< @@ -1909,7 +1931,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'guest_policy.name': request.guestPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGuestPolicy request %j', request); const wrappedCallback: | Callback< @@ -2029,7 +2053,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGuestPolicy request %j', request); const wrappedCallback: | Callback< @@ -2167,7 +2193,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ instance: request.instance ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupEffectiveGuestPolicy request %j', request); const wrappedCallback: | Callback< @@ -2299,7 +2327,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, @@ -2369,7 +2399,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobs stream %j', request); return this.descriptors.page.listPatchJobs.createStream( this.innerApiCalls.listPatchJobs as GaxCall, @@ -2421,7 +2453,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobs iterate %j', request); return this.descriptors.page.listPatchJobs.asyncIterate( this.innerApiCalls['listPatchJobs'] as GaxCall, @@ -2528,7 +2562,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, @@ -2598,7 +2634,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobInstanceDetails stream %j', request); return this.descriptors.page.listPatchJobInstanceDetails.createStream( this.innerApiCalls.listPatchJobInstanceDetails as GaxCall, @@ -2650,7 +2688,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchJobInstanceDetails']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchJobInstanceDetails iterate %j', request); return this.descriptors.page.listPatchJobInstanceDetails.asyncIterate( this.innerApiCalls['listPatchJobInstanceDetails'] as GaxCall, @@ -2753,7 +2793,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, @@ -2819,7 +2861,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchDeployments stream %j', request); return this.descriptors.page.listPatchDeployments.createStream( this.innerApiCalls.listPatchDeployments as GaxCall, @@ -2867,7 +2911,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listPatchDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPatchDeployments iterate %j', request); return this.descriptors.page.listPatchDeployments.asyncIterate( this.innerApiCalls['listPatchDeployments'] as GaxCall, @@ -2971,7 +3017,9 @@ export class OsConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, @@ -3038,7 +3086,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listGuestPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGuestPolicies stream %j', request); return this.descriptors.page.listGuestPolicies.createStream( this.innerApiCalls.listGuestPolicies as GaxCall, @@ -3087,7 +3137,9 @@ export class OsConfigServiceClient { }); const defaultCallSettings = this._defaults['listGuestPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGuestPolicies iterate %j', request); return this.descriptors.page.listGuestPolicies.asyncIterate( this.innerApiCalls['listGuestPolicies'] as GaxCall, diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts index c3705cac5ce..56715f21314 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1.ts @@ -252,7 +252,9 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.osConfigServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); @@ -342,7 +344,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); @@ -389,7 +391,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); @@ -420,7 +422,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ExecutePatchJobRequest() ); @@ -441,7 +443,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); @@ -472,7 +474,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); @@ -519,7 +521,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); @@ -550,7 +552,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchJobRequest() ); @@ -571,7 +573,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); @@ -602,7 +604,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); @@ -649,7 +651,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); @@ -680,7 +682,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CancelPatchJobRequest() ); @@ -701,7 +703,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); @@ -733,7 +735,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); @@ -780,7 +782,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); @@ -814,7 +816,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreatePatchDeploymentRequest() ); @@ -838,7 +840,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); @@ -870,7 +872,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); @@ -917,7 +919,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); @@ -948,7 +950,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetPatchDeploymentRequest() ); @@ -969,7 +971,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); @@ -1048,7 +1050,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); @@ -1082,7 +1084,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeletePatchDeploymentRequest() ); @@ -1106,7 +1108,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); @@ -1139,7 +1141,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); @@ -1187,7 +1189,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); @@ -1222,7 +1224,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest() ); @@ -1247,7 +1249,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); @@ -1279,7 +1281,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); @@ -1326,7 +1328,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); @@ -1357,7 +1359,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.PausePatchDeploymentRequest() ); @@ -1378,7 +1380,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); @@ -1410,7 +1412,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); @@ -1457,7 +1459,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); @@ -1491,7 +1493,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ResumePatchDeploymentRequest() ); @@ -1515,7 +1517,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); @@ -1548,7 +1550,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); @@ -1597,7 +1599,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); @@ -1628,7 +1630,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); @@ -1731,7 +1733,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); @@ -1774,7 +1776,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobsRequest() ); @@ -1816,7 +1818,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); @@ -1856,7 +1858,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); @@ -1913,7 +1915,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); @@ -1947,7 +1949,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); @@ -2016,7 +2018,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); @@ -2074,7 +2076,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); @@ -2128,7 +2130,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest() ); @@ -2175,7 +2177,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); @@ -2215,7 +2217,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); @@ -2270,7 +2272,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); @@ -2301,7 +2303,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); @@ -2361,7 +2363,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); @@ -2410,7 +2412,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); @@ -2459,7 +2461,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListPatchDeploymentsRequest() ); @@ -2497,7 +2499,7 @@ describe('v1.OsConfigServiceClient', () => { }); describe('Path templates', () => { - describe('inventory', () => { + describe('inventory', async () => { const fakePath = '/rendered/path/inventory'; const expectedParameters = { project: 'projectValue', @@ -2508,7 +2510,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.inventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2561,7 +2563,7 @@ describe('v1.OsConfigServiceClient', () => { }); }); - describe('oSPolicyAssignment', () => { + describe('oSPolicyAssignment', async () => { const fakePath = '/rendered/path/oSPolicyAssignment'; const expectedParameters = { project: 'projectValue', @@ -2572,7 +2574,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.oSPolicyAssignmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2638,7 +2640,7 @@ describe('v1.OsConfigServiceClient', () => { }); }); - describe('oSPolicyAssignmentReport', () => { + describe('oSPolicyAssignmentReport', async () => { const fakePath = '/rendered/path/oSPolicyAssignmentReport'; const expectedParameters = { project: 'projectValue', @@ -2650,7 +2652,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.oSPolicyAssignmentReportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2733,7 +2735,7 @@ describe('v1.OsConfigServiceClient', () => { }); }); - describe('patchDeployment', () => { + describe('patchDeployment', async () => { const fakePath = '/rendered/path/patchDeployment'; const expectedParameters = { project: 'projectValue', @@ -2743,7 +2745,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.patchDeploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2786,7 +2788,7 @@ describe('v1.OsConfigServiceClient', () => { }); }); - describe('patchJob', () => { + describe('patchJob', async () => { const fakePath = '/rendered/path/patchJob'; const expectedParameters = { project: 'projectValue', @@ -2796,7 +2798,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.patchJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2835,7 +2837,7 @@ describe('v1.OsConfigServiceClient', () => { }); }); - describe('vulnerabilityReport', () => { + describe('vulnerabilityReport', async () => { const fakePath = '/rendered/path/vulnerabilityReport'; const expectedParameters = { project: 'projectValue', @@ -2846,7 +2848,7 @@ describe('v1.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vulnerabilityReportPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1beta.ts b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1beta.ts index 1855c64212e..c7c039af67b 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_service_v1beta.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_service_v1beta.ts @@ -253,7 +253,9 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.osConfigServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ExecutePatchJobRequest() ); @@ -343,7 +345,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ExecutePatchJobRequest() ); @@ -390,7 +392,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ExecutePatchJobRequest() ); @@ -421,7 +423,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ExecutePatchJobRequest() ); @@ -442,7 +444,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchJobRequest() ); @@ -473,7 +475,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchJobRequest() ); @@ -520,7 +522,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchJobRequest() ); @@ -551,7 +553,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchJobRequest() ); @@ -572,7 +574,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CancelPatchJobRequest() ); @@ -603,7 +605,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CancelPatchJobRequest() ); @@ -650,7 +652,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CancelPatchJobRequest() ); @@ -681,7 +683,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CancelPatchJobRequest() ); @@ -702,7 +704,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreatePatchDeploymentRequest() ); @@ -734,7 +736,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreatePatchDeploymentRequest() ); @@ -781,7 +783,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreatePatchDeploymentRequest() ); @@ -815,7 +817,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreatePatchDeploymentRequest() ); @@ -839,7 +841,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchDeploymentRequest() ); @@ -871,7 +873,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchDeploymentRequest() ); @@ -918,7 +920,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchDeploymentRequest() ); @@ -949,7 +951,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetPatchDeploymentRequest() ); @@ -970,7 +972,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeletePatchDeploymentRequest() ); @@ -1002,7 +1004,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeletePatchDeploymentRequest() ); @@ -1049,7 +1051,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeletePatchDeploymentRequest() ); @@ -1083,7 +1085,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeletePatchDeploymentRequest() ); @@ -1107,7 +1109,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest() ); @@ -1140,7 +1142,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest() ); @@ -1188,7 +1190,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest() ); @@ -1223,7 +1225,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdatePatchDeploymentRequest() ); @@ -1248,7 +1250,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.PausePatchDeploymentRequest() ); @@ -1280,7 +1282,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.PausePatchDeploymentRequest() ); @@ -1327,7 +1329,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.PausePatchDeploymentRequest() ); @@ -1358,7 +1360,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.PausePatchDeploymentRequest() ); @@ -1379,7 +1381,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest() ); @@ -1411,7 +1413,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest() ); @@ -1458,7 +1460,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest() ); @@ -1492,7 +1494,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ResumePatchDeploymentRequest() ); @@ -1516,7 +1518,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreateGuestPolicyRequest() ); @@ -1547,7 +1549,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreateGuestPolicyRequest() ); @@ -1594,7 +1596,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreateGuestPolicyRequest() ); @@ -1625,7 +1627,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.CreateGuestPolicyRequest() ); @@ -1646,7 +1648,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetGuestPolicyRequest() ); @@ -1677,7 +1679,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetGuestPolicyRequest() ); @@ -1724,7 +1726,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetGuestPolicyRequest() ); @@ -1755,7 +1757,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.GetGuestPolicyRequest() ); @@ -1776,7 +1778,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest() ); @@ -1808,7 +1810,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest() ); @@ -1856,7 +1858,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest() ); @@ -1888,7 +1890,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest() ); @@ -1910,7 +1912,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest() ); @@ -1941,7 +1943,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest() ); @@ -1988,7 +1990,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest() ); @@ -2019,7 +2021,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest() ); @@ -2040,7 +2042,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest() ); @@ -2072,7 +2074,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest() ); @@ -2119,7 +2121,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest() ); @@ -2153,7 +2155,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest() ); @@ -2177,7 +2179,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobsRequest() ); @@ -2216,7 +2218,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobsRequest() ); @@ -2271,7 +2273,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobsRequest() ); @@ -2302,7 +2304,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobsRequest() ); @@ -2362,7 +2364,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobsRequest() ); @@ -2411,7 +2413,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobsRequest() ); @@ -2460,7 +2462,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobsRequest() ); @@ -2502,7 +2504,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest() ); @@ -2542,7 +2544,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest() ); @@ -2599,7 +2601,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest() ); @@ -2633,7 +2635,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest() ); @@ -2702,7 +2704,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest() ); @@ -2760,7 +2762,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest() ); @@ -2814,7 +2816,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest() ); @@ -2861,7 +2863,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest() ); @@ -2901,7 +2903,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest() ); @@ -2958,7 +2960,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest() ); @@ -2989,7 +2991,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest() ); @@ -3050,7 +3052,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest() ); @@ -3100,7 +3102,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest() ); @@ -3150,7 +3152,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest() ); @@ -3193,7 +3195,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListGuestPoliciesRequest() ); @@ -3232,7 +3234,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListGuestPoliciesRequest() ); @@ -3287,7 +3289,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListGuestPoliciesRequest() ); @@ -3318,7 +3320,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListGuestPoliciesRequest() ); @@ -3378,7 +3380,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListGuestPoliciesRequest() ); @@ -3427,7 +3429,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListGuestPoliciesRequest() ); @@ -3476,7 +3478,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1beta.ListGuestPoliciesRequest() ); @@ -3514,7 +3516,7 @@ describe('v1beta.OsConfigServiceClient', () => { }); describe('Path templates', () => { - describe('guestPolicy', () => { + describe('guestPolicy', async () => { const fakePath = '/rendered/path/guestPolicy'; const expectedParameters = { project: 'projectValue', @@ -3524,7 +3526,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.guestPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3566,7 +3568,7 @@ describe('v1beta.OsConfigServiceClient', () => { }); }); - describe('patchDeployment', () => { + describe('patchDeployment', async () => { const fakePath = '/rendered/path/patchDeployment'; const expectedParameters = { project: 'projectValue', @@ -3576,7 +3578,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.patchDeploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3619,7 +3621,7 @@ describe('v1beta.OsConfigServiceClient', () => { }); }); - describe('patchJob', () => { + describe('patchJob', async () => { const fakePath = '/rendered/path/patchJob'; const expectedParameters = { project: 'projectValue', @@ -3629,7 +3631,7 @@ describe('v1beta.OsConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.patchJobPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts index 0c0f3655e04..6a41517eeb0 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1.ts @@ -295,7 +295,9 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.osConfigZonalServiceStub); client.close().then(() => { done(); @@ -358,7 +360,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); @@ -391,7 +393,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); @@ -439,7 +441,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); @@ -474,7 +476,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest() ); @@ -499,7 +501,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); @@ -532,7 +534,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); @@ -580,7 +582,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); @@ -615,7 +617,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest() ); @@ -640,7 +642,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); @@ -672,7 +674,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); @@ -720,7 +722,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); @@ -752,7 +754,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetInventoryRequest() ); @@ -774,7 +776,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); @@ -807,7 +809,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); @@ -855,7 +857,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); @@ -890,7 +892,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.GetVulnerabilityReportRequest() ); @@ -915,7 +917,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); @@ -949,7 +951,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); @@ -1004,7 +1006,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest() ); @@ -1073,7 +1075,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1097,7 +1099,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1119,7 +1121,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); @@ -1154,7 +1156,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); @@ -1210,7 +1212,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); @@ -1246,7 +1248,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest() ); @@ -1281,7 +1283,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1305,7 +1307,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1327,7 +1329,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); @@ -1361,7 +1363,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); @@ -1451,7 +1453,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest() ); @@ -1485,7 +1487,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1509,7 +1511,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1531,7 +1533,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); @@ -1572,7 +1574,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); @@ -1630,7 +1632,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); @@ -1665,7 +1667,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); @@ -1733,7 +1735,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); @@ -1790,7 +1792,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); @@ -1845,7 +1847,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest() ); @@ -1893,7 +1895,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); @@ -1934,7 +1936,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); @@ -1992,7 +1994,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2027,7 +2029,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2098,7 +2100,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2158,7 +2160,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2213,7 +2215,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2261,7 +2263,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); @@ -2302,7 +2304,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); @@ -2360,7 +2362,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); @@ -2395,7 +2397,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); @@ -2468,7 +2470,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); @@ -2530,7 +2532,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); @@ -2585,7 +2587,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest() ); @@ -2633,7 +2635,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); @@ -2667,7 +2669,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); @@ -2717,7 +2719,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); @@ -2749,7 +2751,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); @@ -2804,7 +2806,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); @@ -2854,7 +2856,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); @@ -2898,7 +2900,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListInventoriesRequest() ); @@ -2941,7 +2943,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); @@ -2982,7 +2984,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); @@ -3040,7 +3042,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); @@ -3075,7 +3077,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); @@ -3143,7 +3145,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); @@ -3200,7 +3202,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); @@ -3255,7 +3257,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest() ); @@ -3297,7 +3299,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }); describe('Path templates', () => { - describe('inventory', () => { + describe('inventory', async () => { const fakePath = '/rendered/path/inventory'; const expectedParameters = { project: 'projectValue', @@ -3309,7 +3311,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.inventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3362,7 +3364,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }); }); - describe('oSPolicyAssignment', () => { + describe('oSPolicyAssignment', async () => { const fakePath = '/rendered/path/oSPolicyAssignment'; const expectedParameters = { project: 'projectValue', @@ -3374,7 +3376,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.oSPolicyAssignmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3440,7 +3442,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }); }); - describe('oSPolicyAssignmentReport', () => { + describe('oSPolicyAssignmentReport', async () => { const fakePath = '/rendered/path/oSPolicyAssignmentReport'; const expectedParameters = { project: 'projectValue', @@ -3453,7 +3455,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.oSPolicyAssignmentReportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3536,7 +3538,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }); }); - describe('patchDeployment', () => { + describe('patchDeployment', async () => { const fakePath = '/rendered/path/patchDeployment'; const expectedParameters = { project: 'projectValue', @@ -3547,7 +3549,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.patchDeploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3590,7 +3592,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }); }); - describe('patchJob', () => { + describe('patchJob', async () => { const fakePath = '/rendered/path/patchJob'; const expectedParameters = { project: 'projectValue', @@ -3601,7 +3603,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.patchJobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3640,7 +3642,7 @@ describe('v1.OsConfigZonalServiceClient', () => { }); }); - describe('vulnerabilityReport', () => { + describe('vulnerabilityReport', async () => { const fakePath = '/rendered/path/vulnerabilityReport'; const expectedParameters = { project: 'projectValue', @@ -3652,7 +3654,7 @@ describe('v1.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vulnerabilityReportPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts index bbcd2a7ab46..b353befdabd 100644 --- a/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts +++ b/packages/google-cloud-osconfig/test/gapic_os_config_zonal_service_v1alpha.ts @@ -297,7 +297,9 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.osConfigZonalServiceStub); client.close().then(() => { done(); @@ -360,7 +362,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); @@ -393,7 +395,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); @@ -441,7 +443,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); @@ -476,7 +478,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest() ); @@ -502,7 +504,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); @@ -537,7 +539,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); @@ -587,7 +589,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); @@ -624,7 +626,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest() ); @@ -650,7 +652,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); @@ -683,7 +685,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); @@ -731,7 +733,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); @@ -766,7 +768,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest() ); @@ -791,7 +793,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); @@ -823,7 +825,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); @@ -871,7 +873,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); @@ -903,7 +905,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetInventoryRequest() ); @@ -925,7 +927,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); @@ -958,7 +960,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); @@ -1006,7 +1008,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); @@ -1041,7 +1043,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest() ); @@ -1066,7 +1068,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); @@ -1100,7 +1102,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); @@ -1155,7 +1157,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); @@ -1190,7 +1192,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest() ); @@ -1224,7 +1226,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1248,7 +1250,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1270,7 +1272,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); @@ -1305,7 +1307,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); @@ -1361,7 +1363,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); @@ -1397,7 +1399,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest() ); @@ -1432,7 +1434,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1456,7 +1458,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1478,7 +1480,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); @@ -1512,7 +1514,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); @@ -1567,7 +1569,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); @@ -1602,7 +1604,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest() ); @@ -1636,7 +1638,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1660,7 +1662,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1682,7 +1684,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); @@ -1723,7 +1725,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); @@ -1781,7 +1783,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); @@ -1816,7 +1818,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); @@ -1886,7 +1888,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); @@ -1945,7 +1947,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); @@ -2000,7 +2002,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest() ); @@ -2048,7 +2050,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2089,7 +2091,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2147,7 +2149,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2182,7 +2184,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2255,7 +2257,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2317,7 +2319,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2372,7 +2374,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest() ); @@ -2421,7 +2423,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); @@ -2465,7 +2467,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); @@ -2525,7 +2527,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); @@ -2562,7 +2564,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); @@ -2637,7 +2639,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); @@ -2701,7 +2703,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); @@ -2758,7 +2760,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest() ); @@ -2807,7 +2809,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); @@ -2848,7 +2850,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); @@ -2906,7 +2908,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); @@ -2941,7 +2943,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); @@ -3014,7 +3016,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); @@ -3076,7 +3078,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); @@ -3131,7 +3133,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest() ); @@ -3179,7 +3181,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); @@ -3219,7 +3221,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); @@ -3275,7 +3277,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); @@ -3307,7 +3309,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); @@ -3368,7 +3370,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); @@ -3418,7 +3420,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); @@ -3468,7 +3470,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListInventoriesRequest() ); @@ -3511,7 +3513,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); @@ -3552,7 +3554,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); @@ -3610,7 +3612,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); @@ -3645,7 +3647,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); @@ -3715,7 +3717,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); @@ -3774,7 +3776,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); @@ -3829,7 +3831,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest() ); @@ -3871,7 +3873,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); describe('Path templates', () => { - describe('instanceOSPoliciesCompliance', () => { + describe('instanceOSPoliciesCompliance', async () => { const fakePath = '/rendered/path/instanceOSPoliciesCompliance'; const expectedParameters = { project: 'projectValue', @@ -3883,7 +3885,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instanceOSPoliciesCompliancePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.instanceOSPoliciesCompliancePathTemplate.match = @@ -3949,7 +3951,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); - describe('inventory', () => { + describe('inventory', async () => { const fakePath = '/rendered/path/inventory'; const expectedParameters = { project: 'projectValue', @@ -3961,7 +3963,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.inventoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4014,7 +4016,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); - describe('oSPolicyAssignment', () => { + describe('oSPolicyAssignment', async () => { const fakePath = '/rendered/path/oSPolicyAssignment'; const expectedParameters = { project: 'projectValue', @@ -4026,7 +4028,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.oSPolicyAssignmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4092,7 +4094,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); - describe('oSPolicyAssignmentReport', () => { + describe('oSPolicyAssignmentReport', async () => { const fakePath = '/rendered/path/oSPolicyAssignmentReport'; const expectedParameters = { project: 'projectValue', @@ -4105,7 +4107,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.oSPolicyAssignmentReportPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4188,7 +4190,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { }); }); - describe('vulnerabilityReport', () => { + describe('vulnerabilityReport', async () => { const fakePath = '/rendered/path/vulnerabilityReport'; const expectedParameters = { project: 'projectValue', @@ -4200,7 +4202,7 @@ describe('v1alpha.OsConfigZonalServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vulnerabilityReportPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-oslogin/package.json b/packages/google-cloud-oslogin/package.json index 4edc3fe9145..287cd58f680 100644 --- a/packages/google-cloud-oslogin/package.json +++ b/packages/google-cloud-oslogin/package.json @@ -51,7 +51,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata.google.cloud.oslogin.v1.json b/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata.google.cloud.oslogin.v1.json index b2568b9c548..0bbe42b1e98 100644 --- a/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata.google.cloud.oslogin.v1.json +++ b/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata.google.cloud.oslogin.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-oslogin", - "version": "5.7.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata_google.cloud.oslogin.v1.json b/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata_google.cloud.oslogin.v1.json index 227c3d557df..c5d38036f27 100644 --- a/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata_google.cloud.oslogin.v1.json +++ b/packages/google-cloud-oslogin/samples/generated/v1/snippet_metadata_google.cloud.oslogin.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-oslogin", - "version": "5.7.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata.google.cloud.oslogin.v1beta.json b/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata.google.cloud.oslogin.v1beta.json index 3a4d98a3e1f..fac068826f6 100644 --- a/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata.google.cloud.oslogin.v1beta.json +++ b/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata.google.cloud.oslogin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-oslogin", - "version": "5.7.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata_google.cloud.oslogin.v1beta.json b/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata_google.cloud.oslogin.v1beta.json index 53853bf71a3..98412598ae3 100644 --- a/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata_google.cloud.oslogin.v1beta.json +++ b/packages/google-cloud-oslogin/samples/generated/v1beta/snippet_metadata_google.cloud.oslogin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-oslogin", - "version": "5.7.0", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-oslogin/src/v1/os_login_service_client.ts b/packages/google-cloud-oslogin/src/v1/os_login_service_client.ts index 690eea3e6c5..59b7a9268f3 100644 --- a/packages/google-cloud-oslogin/src/v1/os_login_service_client.ts +++ b/packages/google-cloud-oslogin/src/v1/os_login_service_client.ts @@ -477,7 +477,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -595,7 +597,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePosixAccount request %j', request); const wrappedCallback: | Callback< @@ -713,7 +717,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -828,7 +834,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLoginProfile request %j', request); const wrappedCallback: | Callback< @@ -940,7 +948,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -1066,7 +1076,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -1189,7 +1201,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSshPublicKey request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-oslogin/src/v1beta/os_login_service_client.ts b/packages/google-cloud-oslogin/src/v1beta/os_login_service_client.ts index 2676fe5f464..627f242a926 100644 --- a/packages/google-cloud-oslogin/src/v1beta/os_login_service_client.ts +++ b/packages/google-cloud-oslogin/src/v1beta/os_login_service_client.ts @@ -478,7 +478,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -599,7 +601,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePosixAccount request %j', request); const wrappedCallback: | Callback< @@ -720,7 +724,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -846,7 +852,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getLoginProfile request %j', request); const wrappedCallback: | Callback< @@ -967,7 +975,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -1098,7 +1108,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('importSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -1224,7 +1236,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSshPublicKey request %j', request); const wrappedCallback: | Callback< @@ -1345,7 +1359,9 @@ export class OsLoginServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('signSshPublicKey request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-oslogin/test/gapic_os_login_service_v1.ts b/packages/google-cloud-oslogin/test/gapic_os_login_service_v1.ts index 8c8ecf02620..50e4a2598a1 100644 --- a/packages/google-cloud-oslogin/test/gapic_os_login_service_v1.ts +++ b/packages/google-cloud-oslogin/test/gapic_os_login_service_v1.ts @@ -189,7 +189,9 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.osLoginServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.CreateSshPublicKeyRequest() ); @@ -280,7 +282,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.CreateSshPublicKeyRequest() ); @@ -327,7 +329,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.CreateSshPublicKeyRequest() ); @@ -358,7 +360,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.CreateSshPublicKeyRequest() ); @@ -379,7 +381,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeletePosixAccountRequest() ); @@ -411,7 +413,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeletePosixAccountRequest() ); @@ -458,7 +460,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeletePosixAccountRequest() ); @@ -489,7 +491,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeletePosixAccountRequest() ); @@ -510,7 +512,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest() ); @@ -542,7 +544,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest() ); @@ -589,7 +591,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest() ); @@ -620,7 +622,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest() ); @@ -641,7 +643,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetLoginProfileRequest() ); @@ -672,7 +674,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetLoginProfileRequest() ); @@ -719,7 +721,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetLoginProfileRequest() ); @@ -750,7 +752,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetLoginProfileRequest() ); @@ -771,7 +773,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetSshPublicKeyRequest() ); @@ -802,7 +804,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetSshPublicKeyRequest() ); @@ -849,7 +851,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetSshPublicKeyRequest() ); @@ -880,7 +882,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.GetSshPublicKeyRequest() ); @@ -901,7 +903,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.ImportSshPublicKeyRequest() ); @@ -933,7 +935,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.ImportSshPublicKeyRequest() ); @@ -980,7 +982,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.ImportSshPublicKeyRequest() ); @@ -1011,7 +1013,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.ImportSshPublicKeyRequest() ); @@ -1032,7 +1034,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest() ); @@ -1064,7 +1066,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest() ); @@ -1142,7 +1144,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.OsLoginServiceClient', () => { }); describe('Path templates', () => { - describe('posixAccount', () => { + describe('posixAccount', async () => { const fakePath = '/rendered/path/posixAccount'; const expectedParameters = { user: 'userValue', @@ -1168,7 +1170,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.posixAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1207,7 +1209,7 @@ describe('v1.OsLoginServiceClient', () => { }); }); - describe('sshPublicKey', () => { + describe('sshPublicKey', async () => { const fakePath = '/rendered/path/sshPublicKey'; const expectedParameters = { user: 'userValue', @@ -1217,7 +1219,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sshPublicKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1256,7 +1258,7 @@ describe('v1.OsLoginServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { user: 'userValue', @@ -1265,7 +1267,7 @@ describe('v1.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-oslogin/test/gapic_os_login_service_v1beta.ts b/packages/google-cloud-oslogin/test/gapic_os_login_service_v1beta.ts index 9fa2dc8b64a..a0a090a1f89 100644 --- a/packages/google-cloud-oslogin/test/gapic_os_login_service_v1beta.ts +++ b/packages/google-cloud-oslogin/test/gapic_os_login_service_v1beta.ts @@ -189,7 +189,9 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.osLoginServiceStub); client.close().then(() => { done(); @@ -248,7 +250,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.CreateSshPublicKeyRequest() ); @@ -280,7 +282,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.CreateSshPublicKeyRequest() ); @@ -327,7 +329,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.CreateSshPublicKeyRequest() ); @@ -358,7 +360,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.CreateSshPublicKeyRequest() ); @@ -379,7 +381,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeletePosixAccountRequest() ); @@ -411,7 +413,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeletePosixAccountRequest() ); @@ -458,7 +460,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeletePosixAccountRequest() ); @@ -489,7 +491,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeletePosixAccountRequest() ); @@ -510,7 +512,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeleteSshPublicKeyRequest() ); @@ -542,7 +544,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeleteSshPublicKeyRequest() ); @@ -589,7 +591,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeleteSshPublicKeyRequest() ); @@ -620,7 +622,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.DeleteSshPublicKeyRequest() ); @@ -641,7 +643,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetLoginProfileRequest() ); @@ -672,7 +674,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetLoginProfileRequest() ); @@ -719,7 +721,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetLoginProfileRequest() ); @@ -750,7 +752,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetLoginProfileRequest() ); @@ -771,7 +773,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetSshPublicKeyRequest() ); @@ -802,7 +804,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetSshPublicKeyRequest() ); @@ -849,7 +851,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetSshPublicKeyRequest() ); @@ -880,7 +882,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.GetSshPublicKeyRequest() ); @@ -901,7 +903,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.ImportSshPublicKeyRequest() ); @@ -933,7 +935,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.ImportSshPublicKeyRequest() ); @@ -980,7 +982,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.ImportSshPublicKeyRequest() ); @@ -1011,7 +1013,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.ImportSshPublicKeyRequest() ); @@ -1032,7 +1034,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest() ); @@ -1064,7 +1066,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest() ); @@ -1111,7 +1113,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest() ); @@ -1142,7 +1144,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest() ); @@ -1163,7 +1165,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.SignSshPublicKeyRequest() ); @@ -1194,7 +1196,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.SignSshPublicKeyRequest() ); @@ -1241,7 +1243,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.SignSshPublicKeyRequest() ); @@ -1272,7 +1274,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.oslogin.v1beta.SignSshPublicKeyRequest() ); @@ -1288,7 +1290,7 @@ describe('v1beta.OsLoginServiceClient', () => { }); describe('Path templates', () => { - describe('posixAccount', () => { + describe('posixAccount', async () => { const fakePath = '/rendered/path/posixAccount'; const expectedParameters = { user: 'userValue', @@ -1298,7 +1300,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.posixAccountPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1337,7 +1339,7 @@ describe('v1beta.OsLoginServiceClient', () => { }); }); - describe('sshPublicKey', () => { + describe('sshPublicKey', async () => { const fakePath = '/rendered/path/sshPublicKey'; const expectedParameters = { user: 'userValue', @@ -1347,7 +1349,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sshPublicKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1386,7 +1388,7 @@ describe('v1beta.OsLoginServiceClient', () => { }); }); - describe('user', () => { + describe('user', async () => { const fakePath = '/rendered/path/user'; const expectedParameters = { user: 'userValue', @@ -1395,7 +1397,7 @@ describe('v1beta.OsLoginServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.userPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-parallelstore/package.json b/packages/google-cloud-parallelstore/package.json index 7fc9331032d..26a38afbe78 100644 --- a/packages/google-cloud-parallelstore/package.json +++ b/packages/google-cloud-parallelstore/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-parallelstore/samples/generated/v1/snippet_metadata_google.cloud.parallelstore.v1.json b/packages/google-cloud-parallelstore/samples/generated/v1/snippet_metadata_google.cloud.parallelstore.v1.json index 006ad2575fe..e06046cb52a 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1/snippet_metadata_google.cloud.parallelstore.v1.json +++ b/packages/google-cloud-parallelstore/samples/generated/v1/snippet_metadata_google.cloud.parallelstore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-parallelstore", - "version": "0.7.1", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json b/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json index f475e75c5ca..4fc9d2e6b3b 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json +++ b/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-parallelstore", - "version": "0.7.1", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts b/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts index bfed81f0d13..18401d24cb8 100644 --- a/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts +++ b/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts @@ -619,7 +619,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -774,7 +776,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -960,7 +964,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1141,7 +1147,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1338,7 +1346,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1534,7 +1544,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1705,7 +1717,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.parallelstore.v1.IListInstancesRequest, @@ -1779,7 +1793,9 @@ export class ParallelstoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1835,7 +1851,9 @@ export class ParallelstoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2015,7 +2033,7 @@ export class ParallelstoreClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts b/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts index c0ed97528a2..da283a4eb3f 100644 --- a/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts +++ b/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts @@ -618,7 +618,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -776,7 +778,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -962,7 +966,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1143,7 +1149,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1340,7 +1348,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1536,7 +1546,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1707,7 +1719,9 @@ export class ParallelstoreClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.parallelstore.v1beta.IListInstancesRequest, @@ -1781,7 +1795,9 @@ export class ParallelstoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1837,7 +1853,9 @@ export class ParallelstoreClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2017,7 +2035,7 @@ export class ParallelstoreClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1.ts b/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1.ts index 2b3d8b65b9b..af5d500e87b 100644 --- a/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1.ts +++ b/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1.ts @@ -292,7 +292,9 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.parallelstoreStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.GetInstanceRequest() ); @@ -382,7 +384,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.GetInstanceRequest() ); @@ -429,7 +431,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.GetInstanceRequest() ); @@ -460,7 +462,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.GetInstanceRequest() ); @@ -481,7 +483,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.CreateInstanceRequest() ); @@ -514,7 +516,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.CreateInstanceRequest() ); @@ -568,7 +570,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.CreateInstanceRequest() ); @@ -599,7 +601,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.CreateInstanceRequest() ); @@ -632,7 +634,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -654,7 +656,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -675,7 +677,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.UpdateInstanceRequest() ); @@ -709,7 +711,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.UpdateInstanceRequest() ); @@ -764,7 +766,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.UpdateInstanceRequest() ); @@ -796,7 +798,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.UpdateInstanceRequest() ); @@ -830,7 +832,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -852,7 +854,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -873,7 +875,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.DeleteInstanceRequest() ); @@ -906,7 +908,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.DeleteInstanceRequest() ); @@ -960,7 +962,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.DeleteInstanceRequest() ); @@ -991,7 +993,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.DeleteInstanceRequest() ); @@ -1024,7 +1026,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1046,7 +1048,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1067,7 +1069,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ImportDataRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ImportDataRequest() ); @@ -1153,7 +1155,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ImportDataRequest() ); @@ -1184,7 +1186,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ImportDataRequest() ); @@ -1217,7 +1219,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1239,7 +1241,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1257,7 +1259,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ExportDataRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ExportDataRequest() ); @@ -1343,7 +1345,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ExportDataRequest() ); @@ -1374,7 +1376,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ExportDataRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1429,7 +1431,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1447,7 +1449,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ListInstancesRequest() ); @@ -1486,7 +1488,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ListInstancesRequest() ); @@ -1541,7 +1543,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ListInstancesRequest() ); @@ -1572,7 +1574,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ListInstancesRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ListInstancesRequest() ); @@ -1681,7 +1683,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ListInstancesRequest() ); @@ -1730,7 +1732,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1.ListInstancesRequest() ); @@ -1771,7 +1773,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1801,7 +1803,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1845,7 +1847,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1880,7 +1882,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1928,7 +1930,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1969,7 +1971,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2048,7 +2050,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2128,7 +2130,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2224,8 +2226,7 @@ describe('v1.ParallelstoreClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2244,7 +2245,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2253,8 +2254,7 @@ describe('v1.ParallelstoreClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2270,7 +2270,7 @@ describe('v1.ParallelstoreClient', () => { }); describe('Path templates', () => { - describe('address', () => { + describe('address', async () => { const fakePath = '/rendered/path/address'; const expectedParameters = { project: 'projectValue', @@ -2281,7 +2281,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.addressPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2334,7 +2334,7 @@ describe('v1.ParallelstoreClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2345,7 +2345,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2398,7 +2398,7 @@ describe('v1.ParallelstoreClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2408,7 +2408,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2447,7 +2447,7 @@ describe('v1.ParallelstoreClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -2457,7 +2457,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2496,7 +2496,7 @@ describe('v1.ParallelstoreClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2505,7 +2505,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2534,7 +2534,7 @@ describe('v1.ParallelstoreClient', () => { }); }); - describe('serviceAccount', () => { + describe('serviceAccount', async () => { const fakePath = '/rendered/path/serviceAccount'; const expectedParameters = { project: 'projectValue', @@ -2544,7 +2544,7 @@ describe('v1.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAccountPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts b/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts index 85aa84da73b..129643e9eeb 100644 --- a/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts +++ b/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts @@ -292,7 +292,9 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.parallelstoreStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.GetInstanceRequest() ); @@ -382,7 +384,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.GetInstanceRequest() ); @@ -429,7 +431,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.GetInstanceRequest() ); @@ -460,7 +462,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.GetInstanceRequest() ); @@ -481,7 +483,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.CreateInstanceRequest() ); @@ -514,7 +516,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.CreateInstanceRequest() ); @@ -568,7 +570,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.CreateInstanceRequest() ); @@ -599,7 +601,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.CreateInstanceRequest() ); @@ -632,7 +634,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -654,7 +656,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -675,7 +677,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.UpdateInstanceRequest() ); @@ -709,7 +711,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.UpdateInstanceRequest() ); @@ -764,7 +766,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.UpdateInstanceRequest() ); @@ -796,7 +798,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.UpdateInstanceRequest() ); @@ -830,7 +832,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -852,7 +854,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -873,7 +875,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.DeleteInstanceRequest() ); @@ -906,7 +908,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.DeleteInstanceRequest() ); @@ -960,7 +962,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.DeleteInstanceRequest() ); @@ -991,7 +993,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.DeleteInstanceRequest() ); @@ -1024,7 +1026,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1046,7 +1048,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1067,7 +1069,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ImportDataRequest() ); @@ -1099,7 +1101,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ImportDataRequest() ); @@ -1153,7 +1155,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ImportDataRequest() ); @@ -1184,7 +1186,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ImportDataRequest() ); @@ -1217,7 +1219,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1239,7 +1241,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1257,7 +1259,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ExportDataRequest() ); @@ -1289,7 +1291,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ExportDataRequest() ); @@ -1343,7 +1345,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ExportDataRequest() ); @@ -1374,7 +1376,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ExportDataRequest() ); @@ -1407,7 +1409,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1429,7 +1431,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1447,7 +1449,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ListInstancesRequest() ); @@ -1486,7 +1488,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ListInstancesRequest() ); @@ -1541,7 +1543,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ListInstancesRequest() ); @@ -1572,7 +1574,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ListInstancesRequest() ); @@ -1633,7 +1635,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ListInstancesRequest() ); @@ -1683,7 +1685,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ListInstancesRequest() ); @@ -1733,7 +1735,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parallelstore.v1beta.ListInstancesRequest() ); @@ -1775,7 +1777,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1805,7 +1807,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1849,7 +1851,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1884,7 +1886,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1932,7 +1934,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1973,7 +1975,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2052,7 +2054,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2132,7 +2134,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2228,8 +2230,7 @@ describe('v1beta.ParallelstoreClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2248,7 +2249,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2257,8 +2258,7 @@ describe('v1beta.ParallelstoreClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2274,7 +2274,7 @@ describe('v1beta.ParallelstoreClient', () => { }); describe('Path templates', () => { - describe('address', () => { + describe('address', async () => { const fakePath = '/rendered/path/address'; const expectedParameters = { project: 'projectValue', @@ -2285,7 +2285,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.addressPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2338,7 +2338,7 @@ describe('v1beta.ParallelstoreClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2349,7 +2349,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2402,7 +2402,7 @@ describe('v1beta.ParallelstoreClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2412,7 +2412,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2451,7 +2451,7 @@ describe('v1beta.ParallelstoreClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -2461,7 +2461,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2500,7 +2500,7 @@ describe('v1beta.ParallelstoreClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2509,7 +2509,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2538,7 +2538,7 @@ describe('v1beta.ParallelstoreClient', () => { }); }); - describe('serviceAccount', () => { + describe('serviceAccount', async () => { const fakePath = '/rendered/path/serviceAccount'; const expectedParameters = { project: 'projectValue', @@ -2548,7 +2548,7 @@ describe('v1beta.ParallelstoreClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAccountPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-parametermanager/package.json b/packages/google-cloud-parametermanager/package.json index 99e749e6794..97210b797ca 100644 --- a/packages/google-cloud-parametermanager/package.json +++ b/packages/google-cloud-parametermanager/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-parametermanager/samples/generated/v1/snippet_metadata_google.cloud.parametermanager.v1.json b/packages/google-cloud-parametermanager/samples/generated/v1/snippet_metadata_google.cloud.parametermanager.v1.json index c2db41e3b0d..d5e83c87111 100644 --- a/packages/google-cloud-parametermanager/samples/generated/v1/snippet_metadata_google.cloud.parametermanager.v1.json +++ b/packages/google-cloud-parametermanager/samples/generated/v1/snippet_metadata_google.cloud.parametermanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-parametermanager", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-parametermanager/src/v1/parameter_manager_client.ts b/packages/google-cloud-parametermanager/src/v1/parameter_manager_client.ts index 566899fc060..36d60eebc54 100644 --- a/packages/google-cloud-parametermanager/src/v1/parameter_manager_client.ts +++ b/packages/google-cloud-parametermanager/src/v1/parameter_manager_client.ts @@ -503,7 +503,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParameter request %j', request); const wrappedCallback: | Callback< @@ -647,7 +649,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createParameter request %j', request); const wrappedCallback: | Callback< @@ -793,7 +797,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ 'parameter.name': request.parameter!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateParameter request %j', request); const wrappedCallback: | Callback< @@ -933,7 +939,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteParameter request %j', request); const wrappedCallback: | Callback< @@ -1063,7 +1071,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParameterVersion request %j', request); const wrappedCallback: | Callback< @@ -1188,7 +1198,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('renderParameterVersion request %j', request); const wrappedCallback: | Callback< @@ -1332,7 +1344,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createParameterVersion request %j', request); const wrappedCallback: | Callback< @@ -1478,7 +1492,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ 'parameter_version.name': request.parameterVersion!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateParameterVersion request %j', request); const wrappedCallback: | Callback< @@ -1618,7 +1634,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteParameterVersion request %j', request); const wrappedCallback: | Callback< @@ -1751,7 +1769,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.parametermanager.v1.IListParametersRequest, @@ -1822,7 +1842,9 @@ export class ParameterManagerClient { }); const defaultCallSettings = this._defaults['listParameters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParameters stream %j', request); return this.descriptors.page.listParameters.createStream( this.innerApiCalls.listParameters as GaxCall, @@ -1875,7 +1897,9 @@ export class ParameterManagerClient { }); const defaultCallSettings = this._defaults['listParameters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParameters iterate %j', request); return this.descriptors.page.listParameters.asyncIterate( this.innerApiCalls['listParameters'] as GaxCall, @@ -1983,7 +2007,9 @@ export class ParameterManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.parametermanager.v1.IListParameterVersionsRequest, @@ -2054,7 +2080,9 @@ export class ParameterManagerClient { }); const defaultCallSettings = this._defaults['listParameterVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParameterVersions stream %j', request); return this.descriptors.page.listParameterVersions.createStream( this.innerApiCalls.listParameterVersions as GaxCall, @@ -2107,7 +2135,9 @@ export class ParameterManagerClient { }); const defaultCallSettings = this._defaults['listParameterVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParameterVersions iterate %j', request); return this.descriptors.page.listParameterVersions.asyncIterate( this.innerApiCalls['listParameterVersions'] as GaxCall, diff --git a/packages/google-cloud-parametermanager/test/gapic_parameter_manager_v1.ts b/packages/google-cloud-parametermanager/test/gapic_parameter_manager_v1.ts index a9c3066335f..3036dab24f4 100644 --- a/packages/google-cloud-parametermanager/test/gapic_parameter_manager_v1.ts +++ b/packages/google-cloud-parametermanager/test/gapic_parameter_manager_v1.ts @@ -255,7 +255,9 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.parameterManagerStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterRequest() ); @@ -345,7 +347,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterRequest() ); @@ -392,7 +394,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterRequest() ); @@ -423,7 +425,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterRequest() ); @@ -444,7 +446,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterRequest() ); @@ -475,7 +477,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterRequest() ); @@ -522,7 +524,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterRequest() ); @@ -553,7 +555,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterRequest() ); @@ -574,7 +576,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterRequest() ); @@ -606,7 +608,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterRequest() ); @@ -654,7 +656,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterRequest() ); @@ -686,7 +688,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterRequest() ); @@ -708,7 +710,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterRequest() ); @@ -739,7 +741,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterRequest() ); @@ -786,7 +788,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterRequest() ); @@ -817,7 +819,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterRequest() ); @@ -838,7 +840,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterVersionRequest() ); @@ -870,7 +872,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterVersionRequest() ); @@ -917,7 +919,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterVersionRequest() ); @@ -948,7 +950,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.GetParameterVersionRequest() ); @@ -969,7 +971,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.RenderParameterVersionRequest() ); @@ -1001,7 +1003,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.RenderParameterVersionRequest() ); @@ -1048,7 +1050,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.RenderParameterVersionRequest() ); @@ -1082,7 +1084,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.RenderParameterVersionRequest() ); @@ -1106,7 +1108,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterVersionRequest() ); @@ -1138,7 +1140,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterVersionRequest() ); @@ -1185,7 +1187,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterVersionRequest() ); @@ -1219,7 +1221,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.CreateParameterVersionRequest() ); @@ -1243,7 +1245,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterVersionRequest() ); @@ -1276,7 +1278,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterVersionRequest() ); @@ -1324,7 +1326,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterVersionRequest() ); @@ -1359,7 +1361,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.UpdateParameterVersionRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterVersionRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterVersionRequest() ); @@ -1463,7 +1465,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterVersionRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.DeleteParameterVersionRequest() ); @@ -1521,7 +1523,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParametersRequest() ); @@ -1560,7 +1562,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParametersRequest() ); @@ -1615,7 +1617,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParametersRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParametersRequest() ); @@ -1707,7 +1709,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParametersRequest() ); @@ -1757,7 +1759,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParametersRequest() ); @@ -1807,7 +1809,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParametersRequest() ); @@ -1850,7 +1852,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParameterVersionsRequest() ); @@ -1890,7 +1892,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParameterVersionsRequest() ); @@ -1947,7 +1949,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParameterVersionsRequest() ); @@ -1981,7 +1983,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParameterVersionsRequest() ); @@ -2050,7 +2052,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParameterVersionsRequest() ); @@ -2108,7 +2110,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParameterVersionsRequest() ); @@ -2162,7 +2164,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.parametermanager.v1.ListParameterVersionsRequest() ); @@ -2208,7 +2210,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2238,7 +2240,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2282,7 +2284,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2317,7 +2319,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2365,7 +2367,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2402,7 +2404,7 @@ describe('v1.ParameterManagerClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2412,7 +2414,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2451,7 +2453,7 @@ describe('v1.ParameterManagerClient', () => { }); }); - describe('parameter', () => { + describe('parameter', async () => { const fakePath = '/rendered/path/parameter'; const expectedParameters = { project: 'projectValue', @@ -2462,7 +2464,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.parameterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2515,7 +2517,7 @@ describe('v1.ParameterManagerClient', () => { }); }); - describe('parameterVersion', () => { + describe('parameterVersion', async () => { const fakePath = '/rendered/path/parameterVersion'; const expectedParameters = { project: 'projectValue', @@ -2527,7 +2529,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.parameterVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2595,7 +2597,7 @@ describe('v1.ParameterManagerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2604,7 +2606,7 @@ describe('v1.ParameterManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-phishingprotection/package.json b/packages/google-cloud-phishingprotection/package.json index 848e23590f5..e6ede92a577 100644 --- a/packages/google-cloud-phishingprotection/package.json +++ b/packages/google-cloud-phishingprotection/package.json @@ -29,7 +29,7 @@ "Phishing Protection API" ], "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata.google.cloud.phishingprotection.v1beta1.json b/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata.google.cloud.phishingprotection.v1beta1.json index 2f628bb3a01..7cf23b926ec 100644 --- a/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata.google.cloud.phishingprotection.v1beta1.json +++ b/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata.google.cloud.phishingprotection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-phishingprotection", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata_google.cloud.phishingprotection.v1beta1.json b/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata_google.cloud.phishingprotection.v1beta1.json index 2f628bb3a01..7cf23b926ec 100644 --- a/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata_google.cloud.phishingprotection.v1beta1.json +++ b/packages/google-cloud-phishingprotection/samples/generated/v1beta1/snippet_metadata_google.cloud.phishingprotection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-phishingprotection", - "version": "4.3.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-phishingprotection/src/v1beta1/phishing_protection_service_v1_beta1_client.ts b/packages/google-cloud-phishingprotection/src/v1beta1/phishing_protection_service_v1_beta1_client.ts index cecad67593f..40c894182fd 100644 --- a/packages/google-cloud-phishingprotection/src/v1beta1/phishing_protection_service_v1_beta1_client.ts +++ b/packages/google-cloud-phishingprotection/src/v1beta1/phishing_protection_service_v1_beta1_client.ts @@ -472,7 +472,9 @@ export class PhishingProtectionServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reportPhishing request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-phishingprotection/test/gapic_phishing_protection_service_v1_beta1_v1beta1.ts b/packages/google-cloud-phishingprotection/test/gapic_phishing_protection_service_v1_beta1_v1beta1.ts index 7713c88c64f..dfa87373c86 100644 --- a/packages/google-cloud-phishingprotection/test/gapic_phishing_protection_service_v1_beta1_v1beta1.ts +++ b/packages/google-cloud-phishingprotection/test/gapic_phishing_protection_service_v1_beta1_v1beta1.ts @@ -214,7 +214,9 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.phishingProtectionServiceV1Beta1Stub); client.close().then(() => { done(); @@ -288,7 +290,7 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingRequest() ); @@ -322,7 +324,7 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingRequest() ); @@ -372,7 +374,7 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingRequest() ); @@ -406,7 +408,7 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingRequest() ); @@ -422,7 +424,7 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => { }); describe('Path templates', () => { - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -434,7 +436,7 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-policysimulator/package.json b/packages/google-cloud-policysimulator/package.json index 780a011a7a0..19b71ec41e7 100644 --- a/packages/google-cloud-policysimulator/package.json +++ b/packages/google-cloud-policysimulator/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-policysimulator/samples/generated/v1/snippet_metadata_google.cloud.policysimulator.v1.json b/packages/google-cloud-policysimulator/samples/generated/v1/snippet_metadata_google.cloud.policysimulator.v1.json index a06430799ad..79dc9fbc63a 100644 --- a/packages/google-cloud-policysimulator/samples/generated/v1/snippet_metadata_google.cloud.policysimulator.v1.json +++ b/packages/google-cloud-policysimulator/samples/generated/v1/snippet_metadata_google.cloud.policysimulator.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policysimulator", - "version": "0.4.1", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policysimulator/src/v1/simulator_client.ts b/packages/google-cloud-policysimulator/src/v1/simulator_client.ts index e40fb7df5ba..cf1161ebb31 100644 --- a/packages/google-cloud-policysimulator/src/v1/simulator_client.ts +++ b/packages/google-cloud-policysimulator/src/v1/simulator_client.ts @@ -569,7 +569,9 @@ export class SimulatorClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getReplay request %j', request); const wrappedCallback: | Callback< @@ -706,7 +708,9 @@ export class SimulatorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -885,7 +889,9 @@ export class SimulatorClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.policysimulator.v1.IListReplayResultsRequest, @@ -966,7 +972,9 @@ export class SimulatorClient { }); const defaultCallSettings = this._defaults['listReplayResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReplayResults stream %j', request); return this.descriptors.page.listReplayResults.createStream( this.innerApiCalls.listReplayResults as GaxCall, @@ -1029,7 +1037,9 @@ export class SimulatorClient { }); const defaultCallSettings = this._defaults['listReplayResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReplayResults iterate %j', request); return this.descriptors.page.listReplayResults.asyncIterate( this.innerApiCalls['listReplayResults'] as GaxCall, @@ -1131,7 +1141,7 @@ export class SimulatorClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-policysimulator/test/gapic_simulator_v1.ts b/packages/google-cloud-policysimulator/test/gapic_simulator_v1.ts index 39aab028556..e07b2f0ebc9 100644 --- a/packages/google-cloud-policysimulator/test/gapic_simulator_v1.ts +++ b/packages/google-cloud-policysimulator/test/gapic_simulator_v1.ts @@ -285,7 +285,9 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.simulatorStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.GetReplayRequest() ); @@ -375,7 +377,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.GetReplayRequest() ); @@ -422,7 +424,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.GetReplayRequest() ); @@ -450,7 +452,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.GetReplayRequest() ); @@ -471,7 +473,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.CreateReplayRequest() ); @@ -503,7 +505,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.CreateReplayRequest() ); @@ -557,7 +559,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.CreateReplayRequest() ); @@ -588,7 +590,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.CreateReplayRequest() ); @@ -621,7 +623,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -643,7 +645,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -661,7 +663,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.ListReplayResultsRequest() ); @@ -700,7 +702,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.ListReplayResultsRequest() ); @@ -757,7 +759,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.ListReplayResultsRequest() ); @@ -788,7 +790,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.ListReplayResultsRequest() ); @@ -849,7 +851,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.ListReplayResultsRequest() ); @@ -899,7 +901,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.ListReplayResultsRequest() ); @@ -949,7 +951,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policysimulator.v1.ListReplayResultsRequest() ); @@ -991,7 +993,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1070,7 +1072,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1150,7 +1152,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1246,8 +1248,7 @@ describe('v1.SimulatorClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1266,7 +1267,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1275,8 +1276,7 @@ describe('v1.SimulatorClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1292,7 +1292,7 @@ describe('v1.SimulatorClient', () => { }); describe('Path templates', () => { - describe('folderLocationReplay', () => { + describe('folderLocationReplay', async () => { const fakePath = '/rendered/path/folderLocationReplay'; const expectedParameters = { folder: 'folderValue', @@ -1303,7 +1303,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationReplayPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1369,7 +1369,7 @@ describe('v1.SimulatorClient', () => { }); }); - describe('folderLocationReplayReplayResult', () => { + describe('folderLocationReplayReplayResult', async () => { const fakePath = '/rendered/path/folderLocationReplayReplayResult'; const expectedParameters = { folder: 'folderValue', @@ -1381,7 +1381,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationReplayReplayResultPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationReplayReplayResultPathTemplate.match = @@ -1466,7 +1466,7 @@ describe('v1.SimulatorClient', () => { }); }); - describe('organizationLocationReplay', () => { + describe('organizationLocationReplay', async () => { const fakePath = '/rendered/path/organizationLocationReplay'; const expectedParameters = { organization: 'organizationValue', @@ -1477,7 +1477,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationReplayPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1545,7 +1545,7 @@ describe('v1.SimulatorClient', () => { }); }); - describe('organizationLocationReplayReplayResult', () => { + describe('organizationLocationReplayReplayResult', async () => { const fakePath = '/rendered/path/organizationLocationReplayReplayResult'; const expectedParameters = { organization: 'organizationValue', @@ -1557,7 +1557,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationReplayReplayResultPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationReplayReplayResultPathTemplate.match = @@ -1651,7 +1651,7 @@ describe('v1.SimulatorClient', () => { }); }); - describe('projectLocationReplay', () => { + describe('projectLocationReplay', async () => { const fakePath = '/rendered/path/projectLocationReplay'; const expectedParameters = { project: 'projectValue', @@ -1662,7 +1662,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationReplayPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1730,7 +1730,7 @@ describe('v1.SimulatorClient', () => { }); }); - describe('projectLocationReplayReplayResult', () => { + describe('projectLocationReplayReplayResult', async () => { const fakePath = '/rendered/path/projectLocationReplayReplayResult'; const expectedParameters = { project: 'projectValue', @@ -1742,7 +1742,7 @@ describe('v1.SimulatorClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationReplayReplayResultPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationReplayReplayResultPathTemplate.match = diff --git a/packages/google-cloud-policytroubleshooter-iam/package.json b/packages/google-cloud-policytroubleshooter-iam/package.json index 332e9939fe0..ca5b2abd6de 100644 --- a/packages/google-cloud-policytroubleshooter-iam/package.json +++ b/packages/google-cloud-policytroubleshooter-iam/package.json @@ -43,7 +43,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3/snippet_metadata_google.cloud.policytroubleshooter.iam.v3.json b/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3/snippet_metadata_google.cloud.policytroubleshooter.iam.v3.json index e9aecdfb32b..03fbe947729 100644 --- a/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3/snippet_metadata_google.cloud.policytroubleshooter.iam.v3.json +++ b/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3/snippet_metadata_google.cloud.policytroubleshooter.iam.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3beta/snippet_metadata_google.cloud.policytroubleshooter.iam.v3beta.json b/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3beta/snippet_metadata_google.cloud.policytroubleshooter.iam.v3beta.json index e27b08d5a0b..71f13a00d92 100644 --- a/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3beta/snippet_metadata_google.cloud.policytroubleshooter.iam.v3beta.json +++ b/packages/google-cloud-policytroubleshooter-iam/samples/generated/v3beta/snippet_metadata_google.cloud.policytroubleshooter.iam.v3beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter-iam/src/v3/policy_troubleshooter_client.ts b/packages/google-cloud-policytroubleshooter-iam/src/v3/policy_troubleshooter_client.ts index 88258aafa3b..6a76aed608d 100644 --- a/packages/google-cloud-policytroubleshooter-iam/src/v3/policy_troubleshooter_client.ts +++ b/packages/google-cloud-policytroubleshooter-iam/src/v3/policy_troubleshooter_client.ts @@ -453,7 +453,9 @@ export class PolicyTroubleshooterClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('troubleshootIamPolicy request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-policytroubleshooter-iam/src/v3beta/policy_troubleshooter_client.ts b/packages/google-cloud-policytroubleshooter-iam/src/v3beta/policy_troubleshooter_client.ts index b1e8fc2640f..8699b5db88f 100644 --- a/packages/google-cloud-policytroubleshooter-iam/src/v3beta/policy_troubleshooter_client.ts +++ b/packages/google-cloud-policytroubleshooter-iam/src/v3beta/policy_troubleshooter_client.ts @@ -453,7 +453,9 @@ export class PolicyTroubleshooterClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('troubleshootIamPolicy request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3.ts b/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3.ts index 9c65d2a5a04..95fb15d75b0 100644 --- a/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3.ts +++ b/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3.ts @@ -203,7 +203,9 @@ describe('v3.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyTroubleshooterStub); client.close().then(() => { done(); @@ -266,7 +268,7 @@ describe('v3.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyRequest() ); @@ -285,7 +287,7 @@ describe('v3.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyRequest() ); @@ -319,7 +321,7 @@ describe('v3.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyRequest() ); @@ -340,7 +342,7 @@ describe('v3.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3.TroubleshootIamPolicyRequest() ); diff --git a/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3beta.ts b/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3beta.ts index bf53eceea93..eefca67720d 100644 --- a/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3beta.ts +++ b/packages/google-cloud-policytroubleshooter-iam/test/gapic_policy_troubleshooter_v3beta.ts @@ -205,7 +205,9 @@ describe('v3beta.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.policyTroubleshooterStub); client.close().then(() => { done(); @@ -268,7 +270,7 @@ describe('v3beta.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyRequest() ); @@ -287,7 +289,7 @@ describe('v3beta.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyRequest() ); @@ -321,7 +323,7 @@ describe('v3beta.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyRequest() ); @@ -342,7 +344,7 @@ describe('v3beta.PolicyTroubleshooterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.iam.v3beta.TroubleshootIamPolicyRequest() ); diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 707b7f0434d..f07a9b71a59 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index 7218cc0c467..218402f0ec1 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policytroubleshooter", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata_google.cloud.policytroubleshooter.v1.json b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata_google.cloud.policytroubleshooter.v1.json index 7218cc0c467..218402f0ec1 100644 --- a/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata_google.cloud.policytroubleshooter.v1.json +++ b/packages/google-cloud-policytroubleshooter/samples/generated/v1/snippet_metadata_google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-policytroubleshooter", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts index d3956186414..93e16ded120 100644 --- a/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts +++ b/packages/google-cloud-policytroubleshooter/src/v1/iam_checker_client.ts @@ -452,7 +452,9 @@ export class IamCheckerClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('troubleshootIamPolicy request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts index e2ff2504d73..e03b7dcd7e9 100644 --- a/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts +++ b/packages/google-cloud-policytroubleshooter/test/gapic_iam_checker_v1.ts @@ -190,7 +190,9 @@ describe('v1.IamCheckerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.iamCheckerStub); client.close().then(() => { done(); @@ -249,7 +251,7 @@ describe('v1.IamCheckerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); @@ -267,7 +269,7 @@ describe('v1.IamCheckerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); @@ -300,7 +302,7 @@ describe('v1.IamCheckerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); @@ -320,7 +322,7 @@ describe('v1.IamCheckerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest() ); diff --git a/packages/google-cloud-privatecatalog/package.json b/packages/google-cloud-privatecatalog/package.json index f8697aab9fb..74fae48b568 100644 --- a/packages/google-cloud-privatecatalog/package.json +++ b/packages/google-cloud-privatecatalog/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.privatecatalog.v1beta1.json b/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.privatecatalog.v1beta1.json index bfc8639cc03..30e58f57655 100644 --- a/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.privatecatalog.v1beta1.json +++ b/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.privatecatalog.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privatecatalog", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.privatecatalog.v1beta1.json b/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.privatecatalog.v1beta1.json index bfc8639cc03..30e58f57655 100644 --- a/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.privatecatalog.v1beta1.json +++ b/packages/google-cloud-privatecatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.privatecatalog.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privatecatalog", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-privatecatalog/src/v1beta1/private_catalog_client.ts b/packages/google-cloud-privatecatalog/src/v1beta1/private_catalog_client.ts index 63b1e3bff17..385e16f9fee 100644 --- a/packages/google-cloud-privatecatalog/src/v1beta1/private_catalog_client.ts +++ b/packages/google-cloud-privatecatalog/src/v1beta1/private_catalog_client.ts @@ -527,7 +527,9 @@ export class PrivateCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, @@ -601,7 +603,9 @@ export class PrivateCatalogClient { }); const defaultCallSettings = this._defaults['searchCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchCatalogs stream %j', request); return this.descriptors.page.searchCatalogs.createStream( this.innerApiCalls.searchCatalogs as GaxCall, @@ -657,7 +661,9 @@ export class PrivateCatalogClient { }); const defaultCallSettings = this._defaults['searchCatalogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchCatalogs iterate %j', request); return this.descriptors.page.searchCatalogs.asyncIterate( this.innerApiCalls['searchCatalogs'] as GaxCall, @@ -770,7 +776,9 @@ export class PrivateCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, @@ -845,7 +853,9 @@ export class PrivateCatalogClient { }); const defaultCallSettings = this._defaults['searchProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchProducts stream %j', request); return this.descriptors.page.searchProducts.createStream( this.innerApiCalls.searchProducts as GaxCall, @@ -902,7 +912,9 @@ export class PrivateCatalogClient { }); const defaultCallSettings = this._defaults['searchProducts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchProducts iterate %j', request); return this.descriptors.page.searchProducts.asyncIterate( this.innerApiCalls['searchProducts'] as GaxCall, @@ -1015,7 +1027,9 @@ export class PrivateCatalogClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, @@ -1090,7 +1104,9 @@ export class PrivateCatalogClient { }); const defaultCallSettings = this._defaults['searchVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchVersions stream %j', request); return this.descriptors.page.searchVersions.createStream( this.innerApiCalls.searchVersions as GaxCall, @@ -1147,7 +1163,9 @@ export class PrivateCatalogClient { }); const defaultCallSettings = this._defaults['searchVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchVersions iterate %j', request); return this.descriptors.page.searchVersions.asyncIterate( this.innerApiCalls['searchVersions'] as GaxCall, diff --git a/packages/google-cloud-privatecatalog/test/gapic_private_catalog_v1beta1.ts b/packages/google-cloud-privatecatalog/test/gapic_private_catalog_v1beta1.ts index df093d634f3..cab8b4f7cac 100644 --- a/packages/google-cloud-privatecatalog/test/gapic_private_catalog_v1beta1.ts +++ b/packages/google-cloud-privatecatalog/test/gapic_private_catalog_v1beta1.ts @@ -256,7 +256,9 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.privateCatalogStub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest() ); @@ -354,7 +356,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest() ); @@ -411,7 +413,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest() ); @@ -442,7 +444,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest() ); @@ -503,7 +505,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest() ); @@ -553,7 +555,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest() ); @@ -603,7 +605,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest() ); @@ -646,7 +648,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchProductsRequest() ); @@ -685,7 +687,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchProductsRequest() ); @@ -742,7 +744,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchProductsRequest() ); @@ -773,7 +775,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchProductsRequest() ); @@ -834,7 +836,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchProductsRequest() ); @@ -884,7 +886,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchProductsRequest() ); @@ -934,7 +936,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchProductsRequest() ); @@ -977,7 +979,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchVersionsRequest() ); @@ -1016,7 +1018,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchVersionsRequest() ); @@ -1073,7 +1075,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchVersionsRequest() ); @@ -1104,7 +1106,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchVersionsRequest() ); @@ -1165,7 +1167,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchVersionsRequest() ); @@ -1215,7 +1217,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchVersionsRequest() ); @@ -1265,7 +1267,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privatecatalog.v1beta1.SearchVersionsRequest() ); @@ -1303,7 +1305,7 @@ describe('v1beta1.PrivateCatalogClient', () => { }); describe('Path templates', () => { - describe('catalog', () => { + describe('catalog', async () => { const fakePath = '/rendered/path/catalog'; const expectedParameters = { catalog: 'catalogValue', @@ -1312,7 +1314,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.catalogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1341,7 +1343,7 @@ describe('v1beta1.PrivateCatalogClient', () => { }); }); - describe('product', () => { + describe('product', async () => { const fakePath = '/rendered/path/product'; const expectedParameters = { product: 'productValue', @@ -1350,7 +1352,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.productPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1379,7 +1381,7 @@ describe('v1beta1.PrivateCatalogClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { catalog: 'catalogValue', @@ -1390,7 +1392,7 @@ describe('v1beta1.PrivateCatalogClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-privilegedaccessmanager/package.json b/packages/google-cloud-privilegedaccessmanager/package.json index 3bc30e69424..9e8f97e4bc2 100644 --- a/packages/google-cloud-privilegedaccessmanager/package.json +++ b/packages/google-cloud-privilegedaccessmanager/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-privilegedaccessmanager/samples/generated/v1/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json b/packages/google-cloud-privilegedaccessmanager/samples/generated/v1/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json index c29316b911f..8457aad29ca 100644 --- a/packages/google-cloud-privilegedaccessmanager/samples/generated/v1/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json +++ b/packages/google-cloud-privilegedaccessmanager/samples/generated/v1/snippet_metadata_google.cloud.privilegedaccessmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privilegedaccessmanager", - "version": "0.2.1", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-privilegedaccessmanager/src/v1/privileged_access_manager_client.ts b/packages/google-cloud-privilegedaccessmanager/src/v1/privileged_access_manager_client.ts index 192b3c83dc9..bd19939d555 100644 --- a/packages/google-cloud-privilegedaccessmanager/src/v1/privileged_access_manager_client.ts +++ b/packages/google-cloud-privilegedaccessmanager/src/v1/privileged_access_manager_client.ts @@ -674,7 +674,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkOnboardingStatus request %j', request); const wrappedCallback: | Callback< @@ -799,7 +801,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntitlement request %j', request); const wrappedCallback: | Callback< @@ -924,7 +928,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGrant request %j', request); const wrappedCallback: | Callback< @@ -1067,7 +1073,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGrant request %j', request); const wrappedCallback: | Callback< @@ -1198,7 +1206,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('approveGrant request %j', request); const wrappedCallback: | Callback< @@ -1329,7 +1339,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('denyGrant request %j', request); const wrappedCallback: | Callback< @@ -1493,7 +1505,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1679,7 +1693,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1875,7 +1891,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ 'entitlement.name': request.entitlement!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2045,7 +2063,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2212,7 +2232,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.privilegedaccessmanager.v1.IListEntitlementsRequest, @@ -2282,7 +2304,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['listEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlements stream %j', request); return this.descriptors.page.listEntitlements.createStream( this.innerApiCalls.listEntitlements as GaxCall, @@ -2334,7 +2358,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['listEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntitlements iterate %j', request); return this.descriptors.page.listEntitlements.asyncIterate( this.innerApiCalls['listEntitlements'] as GaxCall, @@ -2444,7 +2470,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.privilegedaccessmanager.v1.ISearchEntitlementsRequest, @@ -2516,7 +2544,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['searchEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchEntitlements stream %j', request); return this.descriptors.page.searchEntitlements.createStream( this.innerApiCalls.searchEntitlements as GaxCall, @@ -2570,7 +2600,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['searchEntitlements']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchEntitlements iterate %j', request); return this.descriptors.page.searchEntitlements.asyncIterate( this.innerApiCalls['searchEntitlements'] as GaxCall, @@ -2677,7 +2709,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.privilegedaccessmanager.v1.IListGrantsRequest, @@ -2747,7 +2781,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['listGrants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGrants stream %j', request); return this.descriptors.page.listGrants.createStream( this.innerApiCalls.listGrants as GaxCall, @@ -2799,7 +2835,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['listGrants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGrants iterate %j', request); return this.descriptors.page.listGrants.asyncIterate( this.innerApiCalls['listGrants'] as GaxCall, @@ -2908,7 +2946,9 @@ export class PrivilegedAccessManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.privilegedaccessmanager.v1.ISearchGrantsRequest, @@ -2979,7 +3019,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['searchGrants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchGrants stream %j', request); return this.descriptors.page.searchGrants.createStream( this.innerApiCalls.searchGrants as GaxCall, @@ -3032,7 +3074,9 @@ export class PrivilegedAccessManagerClient { }); const defaultCallSettings = this._defaults['searchGrants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchGrants iterate %j', request); return this.descriptors.page.searchGrants.asyncIterate( this.innerApiCalls['searchGrants'] as GaxCall, @@ -3212,7 +3256,7 @@ export class PrivilegedAccessManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-privilegedaccessmanager/test/gapic_privileged_access_manager_v1.ts b/packages/google-cloud-privilegedaccessmanager/test/gapic_privileged_access_manager_v1.ts index 783a727d260..2ca59ede3b0 100644 --- a/packages/google-cloud-privilegedaccessmanager/test/gapic_privileged_access_manager_v1.ts +++ b/packages/google-cloud-privilegedaccessmanager/test/gapic_privileged_access_manager_v1.ts @@ -314,7 +314,9 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.privilegedAccessManagerStub); client.close().then(() => { done(); @@ -377,7 +379,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest() ); @@ -410,7 +412,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest() ); @@ -458,7 +460,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest() ); @@ -493,7 +495,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CheckOnboardingStatusRequest() ); @@ -518,7 +520,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest() ); @@ -550,7 +552,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest() ); @@ -598,7 +600,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest() ); @@ -630,7 +632,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetEntitlementRequest() ); @@ -652,7 +654,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetGrantRequest() ); @@ -684,7 +686,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetGrantRequest() ); @@ -732,7 +734,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetGrantRequest() ); @@ -761,7 +763,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.GetGrantRequest() ); @@ -783,7 +785,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest() ); @@ -815,7 +817,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest() ); @@ -863,7 +865,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest() ); @@ -895,7 +897,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateGrantRequest() ); @@ -917,7 +919,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest() ); @@ -949,7 +951,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest() ); @@ -997,7 +999,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ApproveGrantRequest() ); @@ -1051,7 +1053,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest() ); @@ -1083,7 +1085,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DenyGrantRequest() ); @@ -1182,7 +1184,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest() ); @@ -1216,7 +1218,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest() ); @@ -1271,7 +1273,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest() ); @@ -1303,7 +1305,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.CreateEntitlementRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1360,7 +1362,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1382,7 +1384,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest() ); @@ -1416,7 +1418,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest() ); @@ -1471,7 +1473,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest() ); @@ -1503,7 +1505,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.DeleteEntitlementRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1560,7 +1562,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1582,7 +1584,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest() ); @@ -1617,7 +1619,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest() ); @@ -1673,7 +1675,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest() ); @@ -1706,7 +1708,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.UpdateEntitlementRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1764,7 +1766,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1786,7 +1788,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest() ); @@ -1819,7 +1821,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest() ); @@ -1874,7 +1876,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest() ); @@ -1906,7 +1908,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.RevokeGrantRequest() ); @@ -1940,7 +1942,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1963,7 +1965,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1982,7 +1984,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest() ); @@ -2022,7 +2024,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest() ); @@ -2080,7 +2082,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest() ); @@ -2112,7 +2114,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest() ); @@ -2176,7 +2178,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest() ); @@ -2229,7 +2231,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest() ); @@ -2280,7 +2282,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListEntitlementsRequest() ); @@ -2324,7 +2326,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest() ); @@ -2365,7 +2367,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest() ); @@ -2423,7 +2425,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest() ); @@ -2455,7 +2457,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest() ); @@ -2519,7 +2521,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest() ); @@ -2572,7 +2574,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest() ); @@ -2623,7 +2625,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchEntitlementsRequest() ); @@ -2667,7 +2669,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest() ); @@ -2707,7 +2709,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest() ); @@ -2765,7 +2767,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest() ); @@ -2797,7 +2799,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest() ); @@ -2859,7 +2861,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest() ); @@ -2912,7 +2914,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest() ); @@ -2963,7 +2965,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.ListGrantsRequest() ); @@ -3009,7 +3011,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest() ); @@ -3049,7 +3051,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest() ); @@ -3107,7 +3109,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest() ); @@ -3139,7 +3141,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest() ); @@ -3201,7 +3203,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest() ); @@ -3254,7 +3256,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest() ); @@ -3305,7 +3307,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.privilegedaccessmanager.v1.SearchGrantsRequest() ); @@ -3348,7 +3350,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3379,7 +3381,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3424,7 +3426,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3460,7 +3462,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3509,7 +3511,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3551,7 +3553,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3633,7 +3635,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3716,7 +3718,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3815,8 +3817,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3836,7 +3837,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3845,8 +3846,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3862,7 +3862,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); describe('Path templates', () => { - describe('folderLocationEntitlement', () => { + describe('folderLocationEntitlement', async () => { const fakePath = '/rendered/path/folderLocationEntitlement'; const expectedParameters = { folder: 'folderValue', @@ -3874,7 +3874,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationEntitlementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3942,7 +3942,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); }); - describe('folderLocationEntitlementGrant', () => { + describe('folderLocationEntitlementGrant', async () => { const fakePath = '/rendered/path/folderLocationEntitlementGrant'; const expectedParameters = { folder: 'folderValue', @@ -3955,7 +3955,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationEntitlementGrantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationEntitlementGrantPathTemplate.match = @@ -4038,7 +4038,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4049,7 +4049,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4088,7 +4088,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); }); - describe('organizationLocationEntitlement', () => { + describe('organizationLocationEntitlement', async () => { const fakePath = '/rendered/path/organizationLocationEntitlement'; const expectedParameters = { organization: 'organizationValue', @@ -4100,7 +4100,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationEntitlementPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationEntitlementPathTemplate.match = @@ -4170,7 +4170,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); }); - describe('organizationLocationEntitlementGrant', () => { + describe('organizationLocationEntitlementGrant', async () => { const fakePath = '/rendered/path/organizationLocationEntitlementGrant'; const expectedParameters = { organization: 'organizationValue', @@ -4183,7 +4183,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationEntitlementGrantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationEntitlementGrantPathTemplate.match = @@ -4277,7 +4277,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4287,7 +4287,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4316,7 +4316,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); }); - describe('projectLocationEntitlement', () => { + describe('projectLocationEntitlement', async () => { const fakePath = '/rendered/path/projectLocationEntitlement'; const expectedParameters = { project: 'projectValue', @@ -4328,7 +4328,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationEntitlementPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4396,7 +4396,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { }); }); - describe('projectLocationEntitlementGrant', () => { + describe('projectLocationEntitlementGrant', async () => { const fakePath = '/rendered/path/projectLocationEntitlementGrant'; const expectedParameters = { project: 'projectValue', @@ -4409,7 +4409,7 @@ describe('v1.PrivilegedAccessManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationEntitlementGrantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationEntitlementGrantPathTemplate.match = diff --git a/packages/google-cloud-rapidmigrationassessment/package.json b/packages/google-cloud-rapidmigrationassessment/package.json index 4a7f3890972..1432f78364b 100644 --- a/packages/google-cloud-rapidmigrationassessment/package.json +++ b/packages/google-cloud-rapidmigrationassessment/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata.google.cloud.rapidmigrationassessment.v1.json b/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata.google.cloud.rapidmigrationassessment.v1.json index bd6e15aee37..73e3b76aee6 100644 --- a/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata.google.cloud.rapidmigrationassessment.v1.json +++ b/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata.google.cloud.rapidmigrationassessment.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-rapidmigrationassessment", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata_google.cloud.rapidmigrationassessment.v1.json b/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata_google.cloud.rapidmigrationassessment.v1.json index b21ee1c16d5..ecb12836e13 100644 --- a/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata_google.cloud.rapidmigrationassessment.v1.json +++ b/packages/google-cloud-rapidmigrationassessment/samples/generated/v1/snippet_metadata_google.cloud.rapidmigrationassessment.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-rapidmigrationassessment", - "version": "1.3.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-rapidmigrationassessment/src/v1/rapid_migration_assessment_client.ts b/packages/google-cloud-rapidmigrationassessment/src/v1/rapid_migration_assessment_client.ts index 3298f7d552c..7d11e419717 100644 --- a/packages/google-cloud-rapidmigrationassessment/src/v1/rapid_migration_assessment_client.ts +++ b/packages/google-cloud-rapidmigrationassessment/src/v1/rapid_migration_assessment_client.ts @@ -628,7 +628,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnnotation request %j', request); const wrappedCallback: | Callback< @@ -753,7 +755,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCollector request %j', request); const wrappedCallback: | Callback< @@ -892,7 +896,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1063,7 +1069,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1250,7 +1258,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ 'collector.name': request.collector!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1432,7 +1442,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1613,7 +1625,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1794,7 +1808,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1975,7 +1991,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2142,7 +2160,9 @@ export class RapidMigrationAssessmentClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.rapidmigrationassessment.v1.IListCollectorsRequest, @@ -2212,7 +2232,9 @@ export class RapidMigrationAssessmentClient { }); const defaultCallSettings = this._defaults['listCollectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCollectors stream %j', request); return this.descriptors.page.listCollectors.createStream( this.innerApiCalls.listCollectors as GaxCall, @@ -2264,7 +2286,9 @@ export class RapidMigrationAssessmentClient { }); const defaultCallSettings = this._defaults['listCollectors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCollectors iterate %j', request); return this.descriptors.page.listCollectors.asyncIterate( this.innerApiCalls['listCollectors'] as GaxCall, @@ -2444,7 +2468,7 @@ export class RapidMigrationAssessmentClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-rapidmigrationassessment/test/gapic_rapid_migration_assessment_v1.ts b/packages/google-cloud-rapidmigrationassessment/test/gapic_rapid_migration_assessment_v1.ts index 0ec39bb2206..c28e94ec99a 100644 --- a/packages/google-cloud-rapidmigrationassessment/test/gapic_rapid_migration_assessment_v1.ts +++ b/packages/google-cloud-rapidmigrationassessment/test/gapic_rapid_migration_assessment_v1.ts @@ -317,7 +317,9 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.rapidMigrationAssessmentStub); client.close().then(() => { done(); @@ -380,7 +382,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetAnnotationRequest() ); @@ -412,7 +414,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetAnnotationRequest() ); @@ -460,7 +462,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetAnnotationRequest() ); @@ -492,7 +494,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetAnnotationRequest() ); @@ -514,7 +516,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetCollectorRequest() ); @@ -546,7 +548,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetCollectorRequest() ); @@ -594,7 +596,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetCollectorRequest() ); @@ -626,7 +628,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.GetCollectorRequest() ); @@ -648,7 +650,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateCollectorRequest() ); @@ -682,7 +684,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateCollectorRequest() ); @@ -737,7 +739,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateCollectorRequest() ); @@ -769,7 +771,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateCollectorRequest() ); @@ -803,7 +805,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -826,7 +828,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -848,7 +850,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateAnnotationRequest() ); @@ -882,7 +884,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateAnnotationRequest() ); @@ -937,7 +939,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateAnnotationRequest() ); @@ -969,7 +971,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.CreateAnnotationRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1026,7 +1028,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1048,7 +1050,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.UpdateCollectorRequest() ); @@ -1083,7 +1085,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.UpdateCollectorRequest() ); @@ -1139,7 +1141,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.UpdateCollectorRequest() ); @@ -1172,7 +1174,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.UpdateCollectorRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1230,7 +1232,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1252,7 +1254,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.DeleteCollectorRequest() ); @@ -1286,7 +1288,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.DeleteCollectorRequest() ); @@ -1341,7 +1343,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.DeleteCollectorRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.DeleteCollectorRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1430,7 +1432,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1452,7 +1454,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ResumeCollectorRequest() ); @@ -1486,7 +1488,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ResumeCollectorRequest() ); @@ -1541,7 +1543,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ResumeCollectorRequest() ); @@ -1573,7 +1575,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ResumeCollectorRequest() ); @@ -1607,7 +1609,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1630,7 +1632,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1652,7 +1654,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.RegisterCollectorRequest() ); @@ -1686,7 +1688,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.RegisterCollectorRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.RegisterCollectorRequest() ); @@ -1773,7 +1775,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.RegisterCollectorRequest() ); @@ -1807,7 +1809,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1830,7 +1832,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1852,7 +1854,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.PauseCollectorRequest() ); @@ -1886,7 +1888,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.PauseCollectorRequest() ); @@ -1941,7 +1943,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.PauseCollectorRequest() ); @@ -1973,7 +1975,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.PauseCollectorRequest() ); @@ -2007,7 +2009,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2030,7 +2032,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2052,7 +2054,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ListCollectorsRequest() ); @@ -2092,7 +2094,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ListCollectorsRequest() ); @@ -2150,7 +2152,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ListCollectorsRequest() ); @@ -2182,7 +2184,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ListCollectorsRequest() ); @@ -2246,7 +2248,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ListCollectorsRequest() ); @@ -2299,7 +2301,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ListCollectorsRequest() ); @@ -2350,7 +2352,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.rapidmigrationassessment.v1.ListCollectorsRequest() ); @@ -2393,7 +2395,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2424,7 +2426,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2469,7 +2471,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2505,7 +2507,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2554,7 +2556,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2596,7 +2598,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2678,7 +2680,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2761,7 +2763,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2860,8 +2862,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2881,7 +2882,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2890,8 +2891,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2907,7 +2907,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { }); describe('Path templates', () => { - describe('annotation', () => { + describe('annotation', async () => { const fakePath = '/rendered/path/annotation'; const expectedParameters = { project: 'projectValue', @@ -2919,7 +2919,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.annotationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2972,7 +2972,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { }); }); - describe('collector', () => { + describe('collector', async () => { const fakePath = '/rendered/path/collector'; const expectedParameters = { project: 'projectValue', @@ -2984,7 +2984,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.collectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3037,7 +3037,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3048,7 +3048,7 @@ describe('v1.RapidMigrationAssessmentClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-recaptchaenterprise/package.json b/packages/google-cloud-recaptchaenterprise/package.json index a5b640acf31..ea3af9a9d7d 100644 --- a/packages/google-cloud-recaptchaenterprise/package.json +++ b/packages/google-cloud-recaptchaenterprise/package.json @@ -30,7 +30,7 @@ "reCAPTCHA Enterprise API" ], "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts b/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts index 29f4c855248..fa74692bc48 100644 --- a/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts +++ b/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts @@ -546,7 +546,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAssessment request %j', request); const wrappedCallback: | Callback< @@ -691,7 +693,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('annotateAssessment request %j', request); const wrappedCallback: | Callback< @@ -813,7 +817,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createKey request %j', request); const wrappedCallback: | Callback< @@ -941,7 +947,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ key: request.key ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveLegacySecretKey request %j', request); const wrappedCallback: | Callback< @@ -1061,7 +1069,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKey request %j', request); const wrappedCallback: | Callback< @@ -1180,7 +1190,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ 'key.name': request.key!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateKey request %j', request); const wrappedCallback: | Callback< @@ -1300,7 +1312,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteKey request %j', request); const wrappedCallback: | Callback< @@ -1434,7 +1448,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('migrateKey request %j', request); const wrappedCallback: | Callback< @@ -1565,7 +1581,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('addIpOverride request %j', request); const wrappedCallback: | Callback< @@ -1697,7 +1715,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('removeIpOverride request %j', request); const wrappedCallback: | Callback< @@ -1818,7 +1838,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMetrics request %j', request); const wrappedCallback: | Callback< @@ -1948,7 +1970,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFirewallPolicy request %j', request); const wrappedCallback: | Callback< @@ -2074,7 +2098,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFirewallPolicy request %j', request); const wrappedCallback: | Callback< @@ -2202,7 +2228,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ 'firewall_policy.name': request.firewallPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFirewallPolicy request %j', request); const wrappedCallback: | Callback< @@ -2328,7 +2356,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFirewallPolicy request %j', request); const wrappedCallback: | Callback< @@ -2457,7 +2487,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reorderFirewallPolicies request %j', request); const wrappedCallback: | Callback< @@ -2587,7 +2619,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, @@ -2655,7 +2689,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeys stream %j', request); return this.descriptors.page.listKeys.createStream( this.innerApiCalls.listKeys as GaxCall, @@ -2705,7 +2741,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listKeys']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKeys iterate %j', request); return this.descriptors.page.listKeys.asyncIterate( this.innerApiCalls['listKeys'] as GaxCall, @@ -2812,7 +2850,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.IListIpOverridesRequest, @@ -2882,7 +2922,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listIpOverrides']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIpOverrides stream %j', request); return this.descriptors.page.listIpOverrides.createStream( this.innerApiCalls.listIpOverrides as GaxCall, @@ -2934,7 +2976,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listIpOverrides']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIpOverrides iterate %j', request); return this.descriptors.page.listIpOverrides.asyncIterate( this.innerApiCalls['listIpOverrides'] as GaxCall, @@ -3039,7 +3083,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, @@ -3107,7 +3153,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listFirewallPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFirewallPolicies stream %j', request); return this.descriptors.page.listFirewallPolicies.createStream( this.innerApiCalls.listFirewallPolicies as GaxCall, @@ -3157,7 +3205,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listFirewallPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFirewallPolicies iterate %j', request); return this.descriptors.page.listFirewallPolicies.asyncIterate( this.innerApiCalls['listFirewallPolicies'] as GaxCall, @@ -3267,7 +3317,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, @@ -3340,7 +3392,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listRelatedAccountGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRelatedAccountGroups stream %j', request); return this.descriptors.page.listRelatedAccountGroups.createStream( this.innerApiCalls.listRelatedAccountGroups as GaxCall, @@ -3395,7 +3449,9 @@ export class RecaptchaEnterpriseServiceClient { }); const defaultCallSettings = this._defaults['listRelatedAccountGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRelatedAccountGroups iterate %j', request); return this.descriptors.page.listRelatedAccountGroups.asyncIterate( this.innerApiCalls['listRelatedAccountGroups'] as GaxCall, @@ -3505,7 +3561,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, @@ -3585,7 +3643,9 @@ export class RecaptchaEnterpriseServiceClient { const defaultCallSettings = this._defaults['listRelatedAccountGroupMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRelatedAccountGroupMemberships stream %j', request); return this.descriptors.page.listRelatedAccountGroupMemberships.createStream( this.innerApiCalls.listRelatedAccountGroupMemberships as GaxCall, @@ -3641,7 +3701,9 @@ export class RecaptchaEnterpriseServiceClient { const defaultCallSettings = this._defaults['listRelatedAccountGroupMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRelatedAccountGroupMemberships iterate %j', request); return this.descriptors.page.listRelatedAccountGroupMemberships.asyncIterate( this.innerApiCalls['listRelatedAccountGroupMemberships'] as GaxCall, @@ -3764,7 +3826,9 @@ export class RecaptchaEnterpriseServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, @@ -3857,7 +3921,9 @@ export class RecaptchaEnterpriseServiceClient { const defaultCallSettings = this._defaults['searchRelatedAccountGroupMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchRelatedAccountGroupMemberships stream %j', request); return this.descriptors.page.searchRelatedAccountGroupMemberships.createStream( this.innerApiCalls.searchRelatedAccountGroupMemberships as GaxCall, @@ -3926,7 +3992,9 @@ export class RecaptchaEnterpriseServiceClient { const defaultCallSettings = this._defaults['searchRelatedAccountGroupMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchRelatedAccountGroupMemberships iterate %j', request); return this.descriptors.page.searchRelatedAccountGroupMemberships.asyncIterate( this.innerApiCalls['searchRelatedAccountGroupMemberships'] as GaxCall, diff --git a/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts b/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts index 1708974a13e..f136b122a6e 100644 --- a/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts +++ b/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts @@ -472,7 +472,9 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAssessment request %j', request); const wrappedCallback: | Callback< @@ -614,7 +616,9 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('annotateAssessment request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1.ts b/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1.ts index 62e0733ff43..bca78b0433f 100644 --- a/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1.ts +++ b/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1.ts @@ -274,7 +274,9 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.recaptchaEnterpriseServiceStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest() ); @@ -379,7 +381,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest() ); @@ -429,7 +431,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest() ); @@ -463,7 +465,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest() ); @@ -487,7 +489,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest() ); @@ -522,7 +524,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest() ); @@ -572,7 +574,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest() ); @@ -606,7 +608,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest() ); @@ -630,7 +632,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateKeyRequest() ); @@ -664,7 +666,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateKeyRequest() ); @@ -714,7 +716,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateKeyRequest() ); @@ -745,7 +747,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateKeyRequest() ); @@ -769,7 +771,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest() ); @@ -804,7 +806,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest() ); @@ -854,7 +856,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest() ); @@ -891,7 +893,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyRequest() ); @@ -918,7 +920,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetKeyRequest() ); @@ -952,7 +954,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetKeyRequest() ); @@ -1002,7 +1004,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetKeyRequest() ); @@ -1033,7 +1035,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetKeyRequest() ); @@ -1057,7 +1059,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest() ); @@ -1175,7 +1177,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateKeyRequest() ); @@ -1200,7 +1202,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest() ); @@ -1234,7 +1236,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest() ); @@ -1284,7 +1286,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest() ); @@ -1315,7 +1317,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteKeyRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest() ); @@ -1423,7 +1425,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest() ); @@ -1457,7 +1459,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.MigrateKeyRequest() ); @@ -1481,7 +1483,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest() ); @@ -1515,7 +1517,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest() ); @@ -1565,7 +1567,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest() ); @@ -1599,7 +1601,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.AddIpOverrideRequest() ); @@ -1623,7 +1625,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest() ); @@ -1657,7 +1659,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest() ); @@ -1707,7 +1709,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.RemoveIpOverrideRequest() ); @@ -1765,7 +1767,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetMetricsRequest() ); @@ -1799,7 +1801,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetMetricsRequest() ); @@ -1849,7 +1851,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetMetricsRequest() ); @@ -1883,7 +1885,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetMetricsRequest() ); @@ -1907,7 +1909,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest() ); @@ -1942,7 +1944,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest() ); @@ -1992,7 +1994,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest() ); @@ -2026,7 +2028,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.CreateFirewallPolicyRequest() ); @@ -2050,7 +2052,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest() ); @@ -2084,7 +2086,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest() ); @@ -2134,7 +2136,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest() ); @@ -2168,7 +2170,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.GetFirewallPolicyRequest() ); @@ -2192,7 +2194,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest() ); @@ -2228,7 +2230,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest() ); @@ -2279,7 +2281,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest() ); @@ -2314,7 +2316,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.UpdateFirewallPolicyRequest() ); @@ -2339,7 +2341,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest() ); @@ -2374,7 +2376,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest() ); @@ -2424,7 +2426,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest() ); @@ -2458,7 +2460,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.DeleteFirewallPolicyRequest() ); @@ -2482,7 +2484,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest() ); @@ -2517,7 +2519,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest() ); @@ -2567,7 +2569,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest() ); @@ -2604,7 +2606,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesRequest() ); @@ -2631,7 +2633,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListKeysRequest() ); @@ -2673,7 +2675,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListKeysRequest() ); @@ -2731,7 +2733,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListKeysRequest() ); @@ -2762,7 +2764,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListKeysRequest() ); @@ -2825,7 +2827,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListKeysRequest() ); @@ -2879,7 +2881,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListKeysRequest() ); @@ -2930,7 +2932,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListKeysRequest() ); @@ -2976,7 +2978,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest() ); @@ -3018,7 +3020,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest() ); @@ -3078,7 +3080,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest() ); @@ -3112,7 +3114,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest() ); @@ -3178,7 +3180,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest() ); @@ -3233,7 +3235,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest() ); @@ -3286,7 +3288,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListIpOverridesRequest() ); @@ -3332,7 +3334,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest() ); @@ -3375,7 +3377,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest() ); @@ -3435,7 +3437,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest() ); @@ -3469,7 +3471,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest() ); @@ -3535,7 +3537,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest() ); @@ -3590,7 +3592,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest() ); @@ -3643,7 +3645,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesRequest() ); @@ -3689,7 +3691,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest() ); @@ -3732,7 +3734,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest() ); @@ -3792,7 +3794,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest() ); @@ -3829,7 +3831,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest() ); @@ -3901,7 +3903,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest() ); @@ -3962,7 +3964,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest() ); @@ -4019,7 +4021,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsRequest() ); @@ -4069,7 +4071,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest() ); @@ -4113,7 +4115,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest() ); @@ -4173,7 +4175,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest() ); @@ -4210,7 +4212,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest() ); @@ -4285,7 +4287,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest() ); @@ -4349,7 +4351,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest() ); @@ -4406,7 +4408,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsRequest() ); @@ -4456,7 +4458,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest() ); @@ -4500,7 +4502,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest() ); @@ -4560,7 +4562,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest() ); @@ -4595,7 +4597,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest() ); @@ -4670,7 +4672,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest() ); @@ -4734,7 +4736,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest() ); @@ -4792,7 +4794,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsRequest() ); @@ -4835,7 +4837,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }); describe('Path templates', () => { - describe('assessment', () => { + describe('assessment', async () => { const fakePath = '/rendered/path/assessment'; const expectedParameters = { project: 'projectValue', @@ -4848,7 +4850,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.assessmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4887,7 +4889,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }); }); - describe('firewallPolicy', () => { + describe('firewallPolicy', async () => { const fakePath = '/rendered/path/firewallPolicy'; const expectedParameters = { project: 'projectValue', @@ -4900,7 +4902,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.firewallPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4943,7 +4945,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }); }); - describe('key', () => { + describe('key', async () => { const fakePath = '/rendered/path/key'; const expectedParameters = { project: 'projectValue', @@ -4956,7 +4958,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.keyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4995,7 +4997,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }); }); - describe('metrics', () => { + describe('metrics', async () => { const fakePath = '/rendered/path/metrics'; const expectedParameters = { project: 'projectValue', @@ -5008,7 +5010,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.metricsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5047,7 +5049,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5059,7 +5061,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5088,7 +5090,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }); }); - describe('relatedAccountGroup', () => { + describe('relatedAccountGroup', async () => { const fakePath = '/rendered/path/relatedAccountGroup'; const expectedParameters = { project: 'projectValue', @@ -5101,7 +5103,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.relatedAccountGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5153,7 +5155,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }); }); - describe('relatedAccountGroupMembership', () => { + describe('relatedAccountGroupMembership', async () => { const fakePath = '/rendered/path/relatedAccountGroupMembership'; const expectedParameters = { project: 'projectValue', @@ -5167,7 +5169,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.relatedAccountGroupMembershipPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.relatedAccountGroupMembershipPathTemplate.match = diff --git a/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts b/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts index 3375d79b756..875d45df81f 100644 --- a/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts +++ b/packages/google-cloud-recaptchaenterprise/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts @@ -214,7 +214,9 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.recaptchaEnterpriseServiceV1Beta1Stub); client.close().then(() => { done(); @@ -288,7 +290,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest() ); @@ -322,7 +324,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest() ); @@ -372,7 +374,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest() ); @@ -406,7 +408,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.CreateAssessmentRequest() ); @@ -430,7 +432,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest() ); @@ -465,7 +467,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest() ); @@ -515,7 +517,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest() ); @@ -549,7 +551,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest() ); @@ -565,7 +567,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { }); describe('Path templates', () => { - describe('assessment', () => { + describe('assessment', async () => { const fakePath = '/rendered/path/assessment'; const expectedParameters = { project: 'projectValue', @@ -578,7 +580,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.assessmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -617,7 +619,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -629,7 +631,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-recommender/package.json b/packages/google-cloud-recommender/package.json index 12775a607dd..63a8776778a 100644 --- a/packages/google-cloud-recommender/package.json +++ b/packages/google-cloud-recommender/package.json @@ -33,7 +33,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata.google.cloud.recommender.v1.json b/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata.google.cloud.recommender.v1.json index c5f72cb3c0d..e923d0523a0 100644 --- a/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata.google.cloud.recommender.v1.json +++ b/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata.google.cloud.recommender.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recommender", - "version": "6.4.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata_google.cloud.recommender.v1.json b/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata_google.cloud.recommender.v1.json index 58dfcb41442..aa97d805294 100644 --- a/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata_google.cloud.recommender.v1.json +++ b/packages/google-cloud-recommender/samples/generated/v1/snippet_metadata_google.cloud.recommender.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recommender", - "version": "6.4.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata.google.cloud.recommender.v1beta1.json b/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata.google.cloud.recommender.v1beta1.json index 91dfa1c031b..dbb51266930 100644 --- a/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata.google.cloud.recommender.v1beta1.json +++ b/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata.google.cloud.recommender.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recommender", - "version": "6.4.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata_google.cloud.recommender.v1beta1.json b/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata_google.cloud.recommender.v1beta1.json index 0d908fb90fd..6c359547303 100644 --- a/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata_google.cloud.recommender.v1beta1.json +++ b/packages/google-cloud-recommender/samples/generated/v1beta1/snippet_metadata_google.cloud.recommender.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recommender", - "version": "6.4.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recommender/src/v1/recommender_client.ts b/packages/google-cloud-recommender/src/v1/recommender_client.ts index 2ad5a5e4ce1..2afd09419b6 100644 --- a/packages/google-cloud-recommender/src/v1/recommender_client.ts +++ b/packages/google-cloud-recommender/src/v1/recommender_client.ts @@ -566,7 +566,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInsight request %j', request); const wrappedCallback: | Callback< @@ -698,7 +700,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markInsightAccepted request %j', request); const wrappedCallback: | Callback< @@ -818,7 +822,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecommendation request %j', request); const wrappedCallback: | Callback< @@ -953,7 +959,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markRecommendationDismissed request %j', request); const wrappedCallback: | Callback< @@ -1094,7 +1102,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markRecommendationClaimed request %j', request); const wrappedCallback: | Callback< @@ -1236,7 +1246,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markRecommendationSucceeded request %j', request); const wrappedCallback: | Callback< @@ -1378,7 +1390,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markRecommendationFailed request %j', request); const wrappedCallback: | Callback< @@ -1514,7 +1528,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecommenderConfig request %j', request); const wrappedCallback: | Callback< @@ -1645,7 +1661,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ 'recommender_config.name': request.recommenderConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRecommenderConfig request %j', request); const wrappedCallback: | Callback< @@ -1781,7 +1799,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInsightTypeConfig request %j', request); const wrappedCallback: | Callback< @@ -1912,7 +1932,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ 'insight_type_config.name': request.insightTypeConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateInsightTypeConfig request %j', request); const wrappedCallback: | Callback< @@ -2090,7 +2112,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recommender.v1.IListInsightsRequest, @@ -2205,7 +2229,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listInsights']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInsights stream %j', request); return this.descriptors.page.listInsights.createStream( this.innerApiCalls.listInsights as GaxCall, @@ -2302,7 +2328,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listInsights']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInsights iterate %j', request); return this.descriptors.page.listInsights.asyncIterate( this.innerApiCalls['listInsights'] as GaxCall, @@ -2455,7 +2483,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recommender.v1.IListRecommendationsRequest, @@ -2570,7 +2600,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listRecommendations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecommendations stream %j', request); return this.descriptors.page.listRecommendations.createStream( this.innerApiCalls.listRecommendations as GaxCall, @@ -2667,7 +2699,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listRecommendations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecommendations iterate %j', request); return this.descriptors.page.listRecommendations.asyncIterate( this.innerApiCalls['listRecommendations'] as GaxCall, diff --git a/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts b/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts index bf59fe025bb..3cc3adfb7b5 100644 --- a/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts +++ b/packages/google-cloud-recommender/src/v1beta1/recommender_client.ts @@ -581,7 +581,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInsight request %j', request); const wrappedCallback: | Callback< @@ -716,7 +718,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markInsightAccepted request %j', request); const wrappedCallback: | Callback< @@ -842,7 +846,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecommendation request %j', request); const wrappedCallback: | Callback< @@ -983,7 +989,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markRecommendationClaimed request %j', request); const wrappedCallback: | Callback< @@ -1125,7 +1133,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markRecommendationSucceeded request %j', request); const wrappedCallback: | Callback< @@ -1267,7 +1277,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('markRecommendationFailed request %j', request); const wrappedCallback: | Callback< @@ -1401,7 +1413,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRecommenderConfig request %j', request); const wrappedCallback: | Callback< @@ -1532,7 +1546,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ 'recommender_config.name': request.recommenderConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateRecommenderConfig request %j', request); const wrappedCallback: | Callback< @@ -1666,7 +1682,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInsightTypeConfig request %j', request); const wrappedCallback: | Callback< @@ -1797,7 +1815,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ 'insight_type_config.name': request.insightTypeConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateInsightTypeConfig request %j', request); const wrappedCallback: | Callback< @@ -1968,7 +1988,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recommender.v1beta1.IListInsightsRequest, @@ -2076,7 +2098,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listInsights']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInsights stream %j', request); return this.descriptors.page.listInsights.createStream( this.innerApiCalls.listInsights as GaxCall, @@ -2166,7 +2190,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listInsights']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInsights iterate %j', request); return this.descriptors.page.listInsights.asyncIterate( this.innerApiCalls['listInsights'] as GaxCall, @@ -2312,7 +2338,9 @@ export class RecommenderClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recommender.v1beta1.IListRecommendationsRequest, @@ -2420,7 +2448,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listRecommendations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecommendations stream %j', request); return this.descriptors.page.listRecommendations.createStream( this.innerApiCalls.listRecommendations as GaxCall, @@ -2510,7 +2540,9 @@ export class RecommenderClient { }); const defaultCallSettings = this._defaults['listRecommendations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecommendations iterate %j', request); return this.descriptors.page.listRecommendations.asyncIterate( this.innerApiCalls['listRecommendations'] as GaxCall, @@ -2609,7 +2641,9 @@ export class RecommenderClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recommender.v1beta1.IListRecommendersRequest, @@ -2670,7 +2704,9 @@ export class RecommenderClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listRecommenders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecommenders stream %j', request); return this.descriptors.page.listRecommenders.createStream( this.innerApiCalls.listRecommenders as GaxCall, @@ -2713,7 +2749,9 @@ export class RecommenderClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listRecommenders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRecommenders iterate %j', request); return this.descriptors.page.listRecommenders.asyncIterate( this.innerApiCalls['listRecommenders'] as GaxCall, @@ -2812,7 +2850,9 @@ export class RecommenderClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.recommender.v1beta1.IListInsightTypesRequest, @@ -2873,7 +2913,9 @@ export class RecommenderClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listInsightTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInsightTypes stream %j', request); return this.descriptors.page.listInsightTypes.createStream( this.innerApiCalls.listInsightTypes as GaxCall, @@ -2916,7 +2958,9 @@ export class RecommenderClient { options.otherArgs.headers = options.otherArgs.headers || {}; const defaultCallSettings = this._defaults['listInsightTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInsightTypes iterate %j', request); return this.descriptors.page.listInsightTypes.asyncIterate( this.innerApiCalls['listInsightTypes'] as GaxCall, diff --git a/packages/google-cloud-recommender/test/gapic_recommender_v1.ts b/packages/google-cloud-recommender/test/gapic_recommender_v1.ts index 7e6308a5fae..25159eca12a 100644 --- a/packages/google-cloud-recommender/test/gapic_recommender_v1.ts +++ b/packages/google-cloud-recommender/test/gapic_recommender_v1.ts @@ -250,7 +250,9 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.recommenderStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightRequest() ); @@ -340,7 +342,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightRequest() ); @@ -387,7 +389,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightRequest() ); @@ -418,7 +420,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightRequest() ); @@ -439,7 +441,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkInsightAcceptedRequest() ); @@ -471,7 +473,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkInsightAcceptedRequest() ); @@ -518,7 +520,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkInsightAcceptedRequest() ); @@ -549,7 +551,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkInsightAcceptedRequest() ); @@ -570,7 +572,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommendationRequest() ); @@ -601,7 +603,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommendationRequest() ); @@ -648,7 +650,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommendationRequest() ); @@ -679,7 +681,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommendationRequest() ); @@ -700,7 +702,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationDismissedRequest() ); @@ -732,7 +734,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationDismissedRequest() ); @@ -779,7 +781,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationDismissedRequest() ); @@ -813,7 +815,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationDismissedRequest() ); @@ -837,7 +839,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationClaimedRequest() ); @@ -869,7 +871,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationClaimedRequest() ); @@ -916,7 +918,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationClaimedRequest() ); @@ -950,7 +952,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationClaimedRequest() ); @@ -974,7 +976,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationSucceededRequest() ); @@ -1006,7 +1008,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationSucceededRequest() ); @@ -1053,7 +1055,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationSucceededRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationSucceededRequest() ); @@ -1111,7 +1113,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationFailedRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationFailedRequest() ); @@ -1190,7 +1192,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationFailedRequest() ); @@ -1224,7 +1226,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.MarkRecommendationFailedRequest() ); @@ -1248,7 +1250,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommenderConfigRequest() ); @@ -1280,7 +1282,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommenderConfigRequest() ); @@ -1327,7 +1329,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommenderConfigRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetRecommenderConfigRequest() ); @@ -1379,7 +1381,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateRecommenderConfigRequest() ); @@ -1412,7 +1414,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateRecommenderConfigRequest() ); @@ -1460,7 +1462,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateRecommenderConfigRequest() ); @@ -1495,7 +1497,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateRecommenderConfigRequest() ); @@ -1520,7 +1522,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightTypeConfigRequest() ); @@ -1552,7 +1554,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightTypeConfigRequest() ); @@ -1599,7 +1601,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightTypeConfigRequest() ); @@ -1630,7 +1632,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.GetInsightTypeConfigRequest() ); @@ -1651,7 +1653,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateInsightTypeConfigRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateInsightTypeConfigRequest() ); @@ -1732,7 +1734,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateInsightTypeConfigRequest() ); @@ -1767,7 +1769,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.UpdateInsightTypeConfigRequest() ); @@ -1792,7 +1794,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListInsightsRequest() ); @@ -1825,7 +1827,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListInsightsRequest() ); @@ -1874,7 +1876,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListInsightsRequest() ); @@ -1905,7 +1907,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListInsightsRequest() ); @@ -1959,7 +1961,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListInsightsRequest() ); @@ -2010,7 +2012,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListInsightsRequest() ); @@ -2053,7 +2055,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListInsightsRequest() ); @@ -2095,7 +2097,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListRecommendationsRequest() ); @@ -2135,7 +2137,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListRecommendationsRequest() ); @@ -2190,7 +2192,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListRecommendationsRequest() ); @@ -2221,7 +2223,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListRecommendationsRequest() ); @@ -2282,7 +2284,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListRecommendationsRequest() ); @@ -2332,7 +2334,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListRecommendationsRequest() ); @@ -2382,7 +2384,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1.ListRecommendationsRequest() ); @@ -2420,7 +2422,7 @@ describe('v1.RecommenderClient', () => { }); describe('Path templates', () => { - describe('billingAccountLocationInsightType', () => { + describe('billingAccountLocationInsightType', async () => { const fakePath = '/rendered/path/billingAccountLocationInsightType'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -2431,7 +2433,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationInsightTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationInsightTypePathTemplate.match = @@ -2503,7 +2505,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('billingAccountLocationInsightTypeConfig', () => { + describe('billingAccountLocationInsightTypeConfig', async () => { const fakePath = '/rendered/path/billingAccountLocationInsightTypeConfig'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -2514,7 +2516,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationInsightTypeConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationInsightTypeConfigPathTemplate.match = @@ -2590,7 +2592,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('billingAccountLocationInsightTypeInsight', () => { + describe('billingAccountLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/billingAccountLocationInsightTypeInsight'; const expectedParameters = { @@ -2603,7 +2605,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationInsightTypeInsightPathTemplate.match = @@ -2697,7 +2699,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('billingAccountLocationRecommender', () => { + describe('billingAccountLocationRecommender', async () => { const fakePath = '/rendered/path/billingAccountLocationRecommender'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -2708,7 +2710,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationRecommenderPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationRecommenderPathTemplate.match = @@ -2780,7 +2782,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('billingAccountLocationRecommenderConfig', () => { + describe('billingAccountLocationRecommenderConfig', async () => { const fakePath = '/rendered/path/billingAccountLocationRecommenderConfig'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -2791,7 +2793,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationRecommenderConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationRecommenderConfigPathTemplate.match = @@ -2867,7 +2869,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('billingAccountLocationRecommenderRecommendation', () => { + describe('billingAccountLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/billingAccountLocationRecommenderRecommendation'; const expectedParameters = { @@ -2880,7 +2882,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationRecommenderRecommendationPathTemplate.match = @@ -2975,7 +2977,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('folderLocationInsightType', () => { + describe('folderLocationInsightType', async () => { const fakePath = '/rendered/path/folderLocationInsightType'; const expectedParameters = { folder: 'folderValue', @@ -2986,7 +2988,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationInsightTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3054,7 +3056,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('folderLocationInsightTypeInsight', () => { + describe('folderLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/folderLocationInsightTypeInsight'; const expectedParameters = { folder: 'folderValue', @@ -3066,7 +3068,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationInsightTypeInsightPathTemplate.match = @@ -3151,7 +3153,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('folderLocationRecommender', () => { + describe('folderLocationRecommender', async () => { const fakePath = '/rendered/path/folderLocationRecommender'; const expectedParameters = { folder: 'folderValue', @@ -3162,7 +3164,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationRecommenderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3230,7 +3232,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('folderLocationRecommenderRecommendation', () => { + describe('folderLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/folderLocationRecommenderRecommendation'; const expectedParameters = { folder: 'folderValue', @@ -3242,7 +3244,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationRecommenderRecommendationPathTemplate.match = @@ -3336,7 +3338,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('organizationLocationInsightType', () => { + describe('organizationLocationInsightType', async () => { const fakePath = '/rendered/path/organizationLocationInsightType'; const expectedParameters = { organization: 'organizationValue', @@ -3347,7 +3349,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInsightTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInsightTypePathTemplate.match = @@ -3417,7 +3419,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('organizationLocationInsightTypeConfig', () => { + describe('organizationLocationInsightTypeConfig', async () => { const fakePath = '/rendered/path/organizationLocationInsightTypeConfig'; const expectedParameters = { organization: 'organizationValue', @@ -3428,7 +3430,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInsightTypeConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInsightTypeConfigPathTemplate.match = @@ -3504,7 +3506,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('organizationLocationInsightTypeInsight', () => { + describe('organizationLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/organizationLocationInsightTypeInsight'; const expectedParameters = { organization: 'organizationValue', @@ -3516,7 +3518,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInsightTypeInsightPathTemplate.match = @@ -3610,7 +3612,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('organizationLocationRecommender', () => { + describe('organizationLocationRecommender', async () => { const fakePath = '/rendered/path/organizationLocationRecommender'; const expectedParameters = { organization: 'organizationValue', @@ -3621,7 +3623,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationRecommenderPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationRecommenderPathTemplate.match = @@ -3691,7 +3693,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('organizationLocationRecommenderConfig', () => { + describe('organizationLocationRecommenderConfig', async () => { const fakePath = '/rendered/path/organizationLocationRecommenderConfig'; const expectedParameters = { organization: 'organizationValue', @@ -3702,7 +3704,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationRecommenderConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationRecommenderConfigPathTemplate.match = @@ -3778,7 +3780,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('organizationLocationRecommenderRecommendation', () => { + describe('organizationLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/organizationLocationRecommenderRecommendation'; const expectedParameters = { @@ -3791,7 +3793,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationRecommenderRecommendationPathTemplate.match = @@ -3885,7 +3887,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('projectLocationInsightType', () => { + describe('projectLocationInsightType', async () => { const fakePath = '/rendered/path/projectLocationInsightType'; const expectedParameters = { project: 'projectValue', @@ -3896,7 +3898,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInsightTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3964,7 +3966,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('projectLocationInsightTypeConfig', () => { + describe('projectLocationInsightTypeConfig', async () => { const fakePath = '/rendered/path/projectLocationInsightTypeConfig'; const expectedParameters = { project: 'projectValue', @@ -3975,7 +3977,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInsightTypeConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationInsightTypeConfigPathTemplate.match = @@ -4045,7 +4047,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('projectLocationInsightTypeInsight', () => { + describe('projectLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/projectLocationInsightTypeInsight'; const expectedParameters = { project: 'projectValue', @@ -4057,7 +4059,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationInsightTypeInsightPathTemplate.match = @@ -4146,7 +4148,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('projectLocationRecommender', () => { + describe('projectLocationRecommender', async () => { const fakePath = '/rendered/path/projectLocationRecommender'; const expectedParameters = { project: 'projectValue', @@ -4157,7 +4159,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationRecommenderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4225,7 +4227,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('projectLocationRecommenderConfig', () => { + describe('projectLocationRecommenderConfig', async () => { const fakePath = '/rendered/path/projectLocationRecommenderConfig'; const expectedParameters = { project: 'projectValue', @@ -4236,7 +4238,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationRecommenderConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationRecommenderConfigPathTemplate.match = @@ -4306,7 +4308,7 @@ describe('v1.RecommenderClient', () => { }); }); - describe('projectLocationRecommenderRecommendation', () => { + describe('projectLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/projectLocationRecommenderRecommendation'; const expectedParameters = { @@ -4319,7 +4321,7 @@ describe('v1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationRecommenderRecommendationPathTemplate.match = diff --git a/packages/google-cloud-recommender/test/gapic_recommender_v1beta1.ts b/packages/google-cloud-recommender/test/gapic_recommender_v1beta1.ts index fc7d0acb212..d4f40ec5c1a 100644 --- a/packages/google-cloud-recommender/test/gapic_recommender_v1beta1.ts +++ b/packages/google-cloud-recommender/test/gapic_recommender_v1beta1.ts @@ -252,7 +252,9 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.recommenderStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightRequest() ); @@ -342,7 +344,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightRequest() ); @@ -389,7 +391,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightRequest() ); @@ -420,7 +422,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightRequest() ); @@ -441,7 +443,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkInsightAcceptedRequest() ); @@ -473,7 +475,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkInsightAcceptedRequest() ); @@ -520,7 +522,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkInsightAcceptedRequest() ); @@ -551,7 +553,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkInsightAcceptedRequest() ); @@ -572,7 +574,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommendationRequest() ); @@ -603,7 +605,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommendationRequest() ); @@ -650,7 +652,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommendationRequest() ); @@ -681,7 +683,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommendationRequest() ); @@ -702,7 +704,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationClaimedRequest() ); @@ -734,7 +736,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationClaimedRequest() ); @@ -781,7 +783,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationClaimedRequest() ); @@ -815,7 +817,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationClaimedRequest() ); @@ -839,7 +841,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationSucceededRequest() ); @@ -871,7 +873,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationSucceededRequest() ); @@ -918,7 +920,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationSucceededRequest() ); @@ -952,7 +954,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationSucceededRequest() ); @@ -976,7 +978,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationFailedRequest() ); @@ -1008,7 +1010,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationFailedRequest() ); @@ -1055,7 +1057,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationFailedRequest() ); @@ -1089,7 +1091,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.MarkRecommendationFailedRequest() ); @@ -1113,7 +1115,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommenderConfigRequest() ); @@ -1145,7 +1147,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommenderConfigRequest() ); @@ -1192,7 +1194,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommenderConfigRequest() ); @@ -1223,7 +1225,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetRecommenderConfigRequest() ); @@ -1244,7 +1246,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateRecommenderConfigRequest() ); @@ -1277,7 +1279,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateRecommenderConfigRequest() ); @@ -1325,7 +1327,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateRecommenderConfigRequest() ); @@ -1360,7 +1362,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateRecommenderConfigRequest() ); @@ -1385,7 +1387,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightTypeConfigRequest() ); @@ -1417,7 +1419,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightTypeConfigRequest() ); @@ -1464,7 +1466,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightTypeConfigRequest() ); @@ -1495,7 +1497,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.GetInsightTypeConfigRequest() ); @@ -1516,7 +1518,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateInsightTypeConfigRequest() ); @@ -1549,7 +1551,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateInsightTypeConfigRequest() ); @@ -1597,7 +1599,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateInsightTypeConfigRequest() ); @@ -1632,7 +1634,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.UpdateInsightTypeConfigRequest() ); @@ -1657,7 +1659,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightsRequest() ); @@ -1696,7 +1698,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightsRequest() ); @@ -1751,7 +1753,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightsRequest() ); @@ -1782,7 +1784,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightsRequest() ); @@ -1842,7 +1844,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightsRequest() ); @@ -1893,7 +1895,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightsRequest() ); @@ -1942,7 +1944,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightsRequest() ); @@ -1985,7 +1987,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendationsRequest() ); @@ -2025,7 +2027,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendationsRequest() ); @@ -2082,7 +2084,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendationsRequest() ); @@ -2113,7 +2115,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendationsRequest() ); @@ -2176,7 +2178,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendationsRequest() ); @@ -2228,7 +2230,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendationsRequest() ); @@ -2278,7 +2280,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendationsRequest() ); @@ -2321,7 +2323,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendersRequest() ); @@ -2346,7 +2348,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendersRequest() ); @@ -2389,7 +2391,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendersRequest() ); @@ -2406,7 +2408,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendersRequest() ); @@ -2456,7 +2458,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendersRequest() ); @@ -2495,7 +2497,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendersRequest() ); @@ -2532,7 +2534,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListRecommendersRequest() ); @@ -2562,7 +2564,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightTypesRequest() ); @@ -2587,7 +2589,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightTypesRequest() ); @@ -2630,7 +2632,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightTypesRequest() ); @@ -2647,7 +2649,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightTypesRequest() ); @@ -2695,7 +2697,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightTypesRequest() ); @@ -2732,7 +2734,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightTypesRequest() ); @@ -2769,7 +2771,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.recommender.v1beta1.ListInsightTypesRequest() ); @@ -2794,7 +2796,7 @@ describe('v1beta1.RecommenderClient', () => { }); describe('Path templates', () => { - describe('billingAccountLocationInsightType', () => { + describe('billingAccountLocationInsightType', async () => { const fakePath = '/rendered/path/billingAccountLocationInsightType'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -2805,7 +2807,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationInsightTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationInsightTypePathTemplate.match = @@ -2877,7 +2879,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('billingAccountLocationInsightTypeInsight', () => { + describe('billingAccountLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/billingAccountLocationInsightTypeInsight'; const expectedParameters = { @@ -2890,7 +2892,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationInsightTypeInsightPathTemplate.match = @@ -2984,7 +2986,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('billingAccountLocationRecommender', () => { + describe('billingAccountLocationRecommender', async () => { const fakePath = '/rendered/path/billingAccountLocationRecommender'; const expectedParameters = { billing_account: 'billingAccountValue', @@ -2995,7 +2997,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationRecommenderPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationRecommenderPathTemplate.match = @@ -3067,7 +3069,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('billingAccountLocationRecommenderRecommendation', () => { + describe('billingAccountLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/billingAccountLocationRecommenderRecommendation'; const expectedParameters = { @@ -3080,7 +3082,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.billingAccountLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.billingAccountLocationRecommenderRecommendationPathTemplate.match = @@ -3175,7 +3177,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('folderLocationInsightType', () => { + describe('folderLocationInsightType', async () => { const fakePath = '/rendered/path/folderLocationInsightType'; const expectedParameters = { folder: 'folderValue', @@ -3186,7 +3188,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationInsightTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3254,7 +3256,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('folderLocationInsightTypeInsight', () => { + describe('folderLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/folderLocationInsightTypeInsight'; const expectedParameters = { folder: 'folderValue', @@ -3266,7 +3268,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationInsightTypeInsightPathTemplate.match = @@ -3351,7 +3353,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('folderLocationRecommender', () => { + describe('folderLocationRecommender', async () => { const fakePath = '/rendered/path/folderLocationRecommender'; const expectedParameters = { folder: 'folderValue', @@ -3362,7 +3364,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationRecommenderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3430,7 +3432,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('folderLocationRecommenderRecommendation', () => { + describe('folderLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/folderLocationRecommenderRecommendation'; const expectedParameters = { folder: 'folderValue', @@ -3442,7 +3444,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.folderLocationRecommenderRecommendationPathTemplate.match = @@ -3536,7 +3538,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('insightType', () => { + describe('insightType', async () => { const fakePath = '/rendered/path/insightType'; const expectedParameters = { insight_type: 'insightTypeValue', @@ -3545,7 +3547,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.insightTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3574,7 +3576,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('organizationLocationInsightType', () => { + describe('organizationLocationInsightType', async () => { const fakePath = '/rendered/path/organizationLocationInsightType'; const expectedParameters = { organization: 'organizationValue', @@ -3585,7 +3587,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInsightTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInsightTypePathTemplate.match = @@ -3655,7 +3657,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('organizationLocationInsightTypeConfig', () => { + describe('organizationLocationInsightTypeConfig', async () => { const fakePath = '/rendered/path/organizationLocationInsightTypeConfig'; const expectedParameters = { organization: 'organizationValue', @@ -3666,7 +3668,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInsightTypeConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInsightTypeConfigPathTemplate.match = @@ -3742,7 +3744,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('organizationLocationInsightTypeInsight', () => { + describe('organizationLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/organizationLocationInsightTypeInsight'; const expectedParameters = { organization: 'organizationValue', @@ -3754,7 +3756,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInsightTypeInsightPathTemplate.match = @@ -3848,7 +3850,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('organizationLocationRecommender', () => { + describe('organizationLocationRecommender', async () => { const fakePath = '/rendered/path/organizationLocationRecommender'; const expectedParameters = { organization: 'organizationValue', @@ -3859,7 +3861,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationRecommenderPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationRecommenderPathTemplate.match = @@ -3929,7 +3931,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('organizationLocationRecommenderConfig', () => { + describe('organizationLocationRecommenderConfig', async () => { const fakePath = '/rendered/path/organizationLocationRecommenderConfig'; const expectedParameters = { organization: 'organizationValue', @@ -3940,7 +3942,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationRecommenderConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationRecommenderConfigPathTemplate.match = @@ -4016,7 +4018,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('organizationLocationRecommenderRecommendation', () => { + describe('organizationLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/organizationLocationRecommenderRecommendation'; const expectedParameters = { @@ -4029,7 +4031,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationRecommenderRecommendationPathTemplate.match = @@ -4123,7 +4125,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('projectLocationInsightType', () => { + describe('projectLocationInsightType', async () => { const fakePath = '/rendered/path/projectLocationInsightType'; const expectedParameters = { project: 'projectValue', @@ -4134,7 +4136,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInsightTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4202,7 +4204,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('projectLocationInsightTypeConfig', () => { + describe('projectLocationInsightTypeConfig', async () => { const fakePath = '/rendered/path/projectLocationInsightTypeConfig'; const expectedParameters = { project: 'projectValue', @@ -4213,7 +4215,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInsightTypeConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationInsightTypeConfigPathTemplate.match = @@ -4283,7 +4285,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('projectLocationInsightTypeInsight', () => { + describe('projectLocationInsightTypeInsight', async () => { const fakePath = '/rendered/path/projectLocationInsightTypeInsight'; const expectedParameters = { project: 'projectValue', @@ -4295,7 +4297,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInsightTypeInsightPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationInsightTypeInsightPathTemplate.match = @@ -4384,7 +4386,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('projectLocationRecommender', () => { + describe('projectLocationRecommender', async () => { const fakePath = '/rendered/path/projectLocationRecommender'; const expectedParameters = { project: 'projectValue', @@ -4395,7 +4397,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationRecommenderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4463,7 +4465,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('projectLocationRecommenderConfig', () => { + describe('projectLocationRecommenderConfig', async () => { const fakePath = '/rendered/path/projectLocationRecommenderConfig'; const expectedParameters = { project: 'projectValue', @@ -4474,7 +4476,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationRecommenderConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationRecommenderConfigPathTemplate.match = @@ -4544,7 +4546,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('projectLocationRecommenderRecommendation', () => { + describe('projectLocationRecommenderRecommendation', async () => { const fakePath = '/rendered/path/projectLocationRecommenderRecommendation'; const expectedParameters = { @@ -4557,7 +4559,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationRecommenderRecommendationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationRecommenderRecommendationPathTemplate.match = @@ -4651,7 +4653,7 @@ describe('v1beta1.RecommenderClient', () => { }); }); - describe('recommender', () => { + describe('recommender', async () => { const fakePath = '/rendered/path/recommender'; const expectedParameters = { recommender: 'recommenderValue', @@ -4660,7 +4662,7 @@ describe('v1beta1.RecommenderClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.recommenderPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-redis-cluster/package.json b/packages/google-cloud-redis-cluster/package.json index c47ad2a267d..ff672d0227e 100644 --- a/packages/google-cloud-redis-cluster/package.json +++ b/packages/google-cloud-redis-cluster/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-redis-cluster/samples/generated/v1/snippet_metadata_google.cloud.redis.cluster.v1.json b/packages/google-cloud-redis-cluster/samples/generated/v1/snippet_metadata_google.cloud.redis.cluster.v1.json index 6293dd12c1e..33725d2f105 100644 --- a/packages/google-cloud-redis-cluster/samples/generated/v1/snippet_metadata_google.cloud.redis.cluster.v1.json +++ b/packages/google-cloud-redis-cluster/samples/generated/v1/snippet_metadata_google.cloud.redis.cluster.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cluster", - "version": "0.6.1", + "version": "0.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-redis-cluster/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.cluster.v1beta1.json b/packages/google-cloud-redis-cluster/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.cluster.v1beta1.json index 0119e1f61cd..923fc9d0e97 100644 --- a/packages/google-cloud-redis-cluster/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.cluster.v1beta1.json +++ b/packages/google-cloud-redis-cluster/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.cluster.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cluster", - "version": "0.6.1", + "version": "0.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-redis-cluster/src/v1/cloud_redis_cluster_client.ts b/packages/google-cloud-redis-cluster/src/v1/cloud_redis_cluster_client.ts index 759f7297d0d..a5b3592458e 100644 --- a/packages/google-cloud-redis-cluster/src/v1/cloud_redis_cluster_client.ts +++ b/packages/google-cloud-redis-cluster/src/v1/cloud_redis_cluster_client.ts @@ -677,7 +677,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -801,7 +803,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getClusterCertificateAuthority request %j', request); const wrappedCallback: | Callback< @@ -934,7 +938,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupCollection request %j', request); const wrappedCallback: | Callback< @@ -1048,7 +1054,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1191,7 +1199,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1348,7 +1358,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1534,7 +1546,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1710,7 +1724,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1871,7 +1887,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2038,7 +2056,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2224,7 +2244,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2403,7 +2425,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.cluster.v1.IListClustersRequest, @@ -2477,7 +2501,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -2533,7 +2559,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -2649,7 +2677,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.cluster.v1.IListBackupCollectionsRequest, @@ -2724,7 +2754,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackupCollections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupCollections stream %j', request); return this.descriptors.page.listBackupCollections.createStream( this.innerApiCalls.listBackupCollections as GaxCall, @@ -2781,7 +2813,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackupCollections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupCollections iterate %j', request); return this.descriptors.page.listBackupCollections.asyncIterate( this.innerApiCalls['listBackupCollections'] as GaxCall, @@ -2891,7 +2925,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.cluster.v1.IListBackupsRequest, @@ -2964,7 +3000,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -3019,7 +3057,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -3199,7 +3239,7 @@ export class CloudRedisClusterClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-redis-cluster/src/v1beta1/cloud_redis_cluster_client.ts b/packages/google-cloud-redis-cluster/src/v1beta1/cloud_redis_cluster_client.ts index 0e01569a2b6..3d51916900b 100644 --- a/packages/google-cloud-redis-cluster/src/v1beta1/cloud_redis_cluster_client.ts +++ b/packages/google-cloud-redis-cluster/src/v1beta1/cloud_redis_cluster_client.ts @@ -678,7 +678,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -805,7 +807,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getClusterCertificateAuthority request %j', request); const wrappedCallback: | Callback< @@ -938,7 +942,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupCollection request %j', request); const wrappedCallback: | Callback< @@ -1058,7 +1064,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1204,7 +1212,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1361,7 +1371,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1547,7 +1559,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1723,7 +1737,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1884,7 +1900,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2051,7 +2069,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2237,7 +2257,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2416,7 +2438,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.cluster.v1beta1.IListClustersRequest, @@ -2490,7 +2514,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -2546,7 +2572,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -2662,7 +2690,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.cluster.v1beta1.IListBackupCollectionsRequest, @@ -2737,7 +2767,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackupCollections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupCollections stream %j', request); return this.descriptors.page.listBackupCollections.createStream( this.innerApiCalls.listBackupCollections as GaxCall, @@ -2794,7 +2826,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackupCollections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupCollections iterate %j', request); return this.descriptors.page.listBackupCollections.asyncIterate( this.innerApiCalls['listBackupCollections'] as GaxCall, @@ -2904,7 +2938,9 @@ export class CloudRedisClusterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.cluster.v1beta1.IListBackupsRequest, @@ -2977,7 +3013,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -3032,7 +3070,9 @@ export class CloudRedisClusterClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -3212,7 +3252,7 @@ export class CloudRedisClusterClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1.ts b/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1.ts index 303595f0475..638819fca55 100644 --- a/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1.ts +++ b/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1.ts @@ -290,7 +290,9 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudRedisClusterStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterRequest() ); @@ -380,7 +382,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterRequest() ); @@ -427,7 +429,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterRequest() ); @@ -458,7 +460,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterRequest() ); @@ -479,7 +481,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest() ); @@ -511,7 +513,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest() ); @@ -558,7 +560,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest() ); @@ -592,7 +594,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest() ); @@ -616,7 +618,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupCollectionRequest() ); @@ -648,7 +650,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupCollectionRequest() ); @@ -695,7 +697,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupCollectionRequest() ); @@ -726,7 +728,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupCollectionRequest() ); @@ -747,7 +749,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupRequest() ); @@ -778,7 +780,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupRequest() ); @@ -825,7 +827,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupRequest() ); @@ -853,7 +855,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.GetBackupRequest() ); @@ -874,7 +876,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.UpdateClusterRequest() ); @@ -908,7 +910,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.UpdateClusterRequest() ); @@ -963,7 +965,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.UpdateClusterRequest() ); @@ -995,7 +997,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.UpdateClusterRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1051,7 +1053,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1072,7 +1074,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteClusterRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteClusterRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteClusterRequest() ); @@ -1190,7 +1192,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteClusterRequest() ); @@ -1223,7 +1225,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1245,7 +1247,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1266,7 +1268,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.CreateClusterRequest() ); @@ -1299,7 +1301,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.CreateClusterRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.CreateClusterRequest() ); @@ -1384,7 +1386,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.CreateClusterRequest() ); @@ -1417,7 +1419,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1439,7 +1441,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1460,7 +1462,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest() ); @@ -1493,7 +1495,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest() ); @@ -1547,7 +1549,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest() ); @@ -1581,7 +1583,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest() ); @@ -1614,7 +1616,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1637,7 +1639,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1658,7 +1660,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteBackupRequest() ); @@ -1690,7 +1692,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteBackupRequest() ); @@ -1744,7 +1746,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteBackupRequest() ); @@ -1775,7 +1777,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.DeleteBackupRequest() ); @@ -1808,7 +1810,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1830,7 +1832,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1848,7 +1850,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ExportBackupRequest() ); @@ -1880,7 +1882,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ExportBackupRequest() ); @@ -1934,7 +1936,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ExportBackupRequest() ); @@ -1965,7 +1967,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ExportBackupRequest() ); @@ -1998,7 +2000,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2020,7 +2022,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2038,7 +2040,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.BackupClusterRequest() ); @@ -2071,7 +2073,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.BackupClusterRequest() ); @@ -2125,7 +2127,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.BackupClusterRequest() ); @@ -2156,7 +2158,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.BackupClusterRequest() ); @@ -2189,7 +2191,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2211,7 +2213,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2232,7 +2234,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListClustersRequest() ); @@ -2271,7 +2273,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListClustersRequest() ); @@ -2326,7 +2328,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListClustersRequest() ); @@ -2357,7 +2359,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListClustersRequest() ); @@ -2417,7 +2419,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListClustersRequest() ); @@ -2468,7 +2470,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListClustersRequest() ); @@ -2517,7 +2519,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListClustersRequest() ); @@ -2559,7 +2561,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest() ); @@ -2599,7 +2601,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest() ); @@ -2656,7 +2658,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest() ); @@ -2690,7 +2692,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest() ); @@ -2757,7 +2759,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest() ); @@ -2813,7 +2815,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest() ); @@ -2867,7 +2869,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest() ); @@ -2914,7 +2916,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupsRequest() ); @@ -2953,7 +2955,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupsRequest() ); @@ -3008,7 +3010,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupsRequest() ); @@ -3039,7 +3041,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupsRequest() ); @@ -3099,7 +3101,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupsRequest() ); @@ -3150,7 +3152,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupsRequest() ); @@ -3199,7 +3201,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1.ListBackupsRequest() ); @@ -3242,7 +3244,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3272,7 +3274,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3316,7 +3318,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3351,7 +3353,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3399,7 +3401,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3440,7 +3442,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3519,7 +3521,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3599,7 +3601,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3695,8 +3697,7 @@ describe('v1.CloudRedisClusterClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3715,7 +3716,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3724,8 +3725,7 @@ describe('v1.CloudRedisClusterClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3741,7 +3741,7 @@ describe('v1.CloudRedisClusterClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -3753,7 +3753,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3817,7 +3817,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('backupCollection', () => { + describe('backupCollection', async () => { const fakePath = '/rendered/path/backupCollection'; const expectedParameters = { project: 'projectValue', @@ -3828,7 +3828,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupCollectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3885,7 +3885,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('certificateAuthority', () => { + describe('certificateAuthority', async () => { const fakePath = '/rendered/path/certificateAuthority'; const expectedParameters = { project: 'projectValue', @@ -3896,7 +3896,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3964,7 +3964,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -3975,7 +3975,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4028,7 +4028,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -4040,7 +4040,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4104,7 +4104,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -4117,7 +4117,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4196,7 +4196,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('forwardingRule', () => { + describe('forwardingRule', async () => { const fakePath = '/rendered/path/forwardingRule'; const expectedParameters = { project: 'projectValue', @@ -4207,7 +4207,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.forwardingRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4261,7 +4261,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4271,7 +4271,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4310,7 +4310,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -4320,7 +4320,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4359,7 +4359,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4368,7 +4368,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4397,7 +4397,7 @@ describe('v1.CloudRedisClusterClient', () => { }); }); - describe('serviceAttachment', () => { + describe('serviceAttachment', async () => { const fakePath = '/rendered/path/serviceAttachment'; const expectedParameters = { project: 'projectValue', @@ -4408,7 +4408,7 @@ describe('v1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1beta1.ts b/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1beta1.ts index 00807247019..0c3f5f5d7dd 100644 --- a/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1beta1.ts +++ b/packages/google-cloud-redis-cluster/test/gapic_cloud_redis_cluster_v1beta1.ts @@ -299,7 +299,9 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudRedisClusterStub); client.close().then(() => { done(); @@ -362,7 +364,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterRequest() ); @@ -394,7 +396,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterRequest() ); @@ -442,7 +444,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterRequest() ); @@ -474,7 +476,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterRequest() ); @@ -496,7 +498,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest() ); @@ -529,7 +531,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest() ); @@ -577,7 +579,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest() ); @@ -612,7 +614,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetClusterCertificateAuthorityRequest() ); @@ -637,7 +639,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupCollectionRequest() ); @@ -670,7 +672,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupCollectionRequest() ); @@ -718,7 +720,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupCollectionRequest() ); @@ -750,7 +752,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupCollectionRequest() ); @@ -772,7 +774,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupRequest() ); @@ -804,7 +806,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupRequest() ); @@ -852,7 +854,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupRequest() ); @@ -881,7 +883,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.GetBackupRequest() ); @@ -903,7 +905,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest() ); @@ -938,7 +940,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest() ); @@ -994,7 +996,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest() ); @@ -1027,7 +1029,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest() ); @@ -1062,7 +1064,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1085,7 +1087,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1107,7 +1109,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest() ); @@ -1141,7 +1143,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest() ); @@ -1196,7 +1198,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest() ); @@ -1228,7 +1230,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest() ); @@ -1262,7 +1264,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1285,7 +1287,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1307,7 +1309,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.CreateClusterRequest() ); @@ -1341,7 +1343,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.CreateClusterRequest() ); @@ -1396,7 +1398,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.CreateClusterRequest() ); @@ -1428,7 +1430,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.CreateClusterRequest() ); @@ -1462,7 +1464,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1485,7 +1487,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1507,7 +1509,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.RescheduleClusterMaintenanceRequest() ); @@ -1541,7 +1543,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.RescheduleClusterMaintenanceRequest() ); @@ -1596,7 +1598,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.RescheduleClusterMaintenanceRequest() ); @@ -1631,7 +1633,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.RescheduleClusterMaintenanceRequest() ); @@ -1665,7 +1667,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1689,7 +1691,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1711,7 +1713,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteBackupRequest() ); @@ -1744,7 +1746,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteBackupRequest() ); @@ -1799,7 +1801,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteBackupRequest() ); @@ -1831,7 +1833,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.DeleteBackupRequest() ); @@ -1865,7 +1867,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1888,7 +1890,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1907,7 +1909,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ExportBackupRequest() ); @@ -1940,7 +1942,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ExportBackupRequest() ); @@ -1995,7 +1997,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ExportBackupRequest() ); @@ -2027,7 +2029,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ExportBackupRequest() ); @@ -2061,7 +2063,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2084,7 +2086,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2103,7 +2105,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.BackupClusterRequest() ); @@ -2137,7 +2139,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.BackupClusterRequest() ); @@ -2192,7 +2194,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.BackupClusterRequest() ); @@ -2224,7 +2226,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.BackupClusterRequest() ); @@ -2258,7 +2260,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2281,7 +2283,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2303,7 +2305,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListClustersRequest() ); @@ -2343,7 +2345,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListClustersRequest() ); @@ -2399,7 +2401,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListClustersRequest() ); @@ -2431,7 +2433,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListClustersRequest() ); @@ -2493,7 +2495,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListClustersRequest() ); @@ -2546,7 +2548,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListClustersRequest() ); @@ -2597,7 +2599,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListClustersRequest() ); @@ -2641,7 +2643,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupCollectionsRequest() ); @@ -2682,7 +2684,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupCollectionsRequest() ); @@ -2740,7 +2742,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupCollectionsRequest() ); @@ -2775,7 +2777,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupCollectionsRequest() ); @@ -2845,7 +2847,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupCollectionsRequest() ); @@ -2904,7 +2906,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupCollectionsRequest() ); @@ -2959,7 +2961,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupCollectionsRequest() ); @@ -3007,7 +3009,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupsRequest() ); @@ -3047,7 +3049,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupsRequest() ); @@ -3103,7 +3105,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupsRequest() ); @@ -3135,7 +3137,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupsRequest() ); @@ -3197,7 +3199,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupsRequest() ); @@ -3250,7 +3252,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupsRequest() ); @@ -3300,7 +3302,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.cluster.v1beta1.ListBackupsRequest() ); @@ -3345,7 +3347,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3376,7 +3378,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3421,7 +3423,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3457,7 +3459,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3506,7 +3508,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3548,7 +3550,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3630,7 +3632,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3713,7 +3715,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3812,8 +3814,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3833,7 +3834,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3842,8 +3843,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3859,7 +3859,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -3872,7 +3872,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3936,7 +3936,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('backupCollection', () => { + describe('backupCollection', async () => { const fakePath = '/rendered/path/backupCollection'; const expectedParameters = { project: 'projectValue', @@ -3948,7 +3948,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupCollectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4005,7 +4005,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('certificateAuthority', () => { + describe('certificateAuthority', async () => { const fakePath = '/rendered/path/certificateAuthority'; const expectedParameters = { project: 'projectValue', @@ -4017,7 +4017,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4085,7 +4085,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -4097,7 +4097,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4150,7 +4150,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -4163,7 +4163,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4227,7 +4227,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('cryptoKeyVersion', () => { + describe('cryptoKeyVersion', async () => { const fakePath = '/rendered/path/cryptoKeyVersion'; const expectedParameters = { project: 'projectValue', @@ -4241,7 +4241,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4320,7 +4320,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('forwardingRule', () => { + describe('forwardingRule', async () => { const fakePath = '/rendered/path/forwardingRule'; const expectedParameters = { project: 'projectValue', @@ -4332,7 +4332,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.forwardingRulePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4386,7 +4386,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4397,7 +4397,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4436,7 +4436,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -4447,7 +4447,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4486,7 +4486,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4496,7 +4496,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4525,7 +4525,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { }); }); - describe('serviceAttachment', () => { + describe('serviceAttachment', async () => { const fakePath = '/rendered/path/serviceAttachment'; const expectedParameters = { project: 'projectValue', @@ -4537,7 +4537,7 @@ describe('v1beta1.CloudRedisClusterClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.serviceAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-redis/package.json b/packages/google-cloud-redis/package.json index 121a1935fbe..94e9a358ce1 100644 --- a/packages/google-cloud-redis/package.json +++ b/packages/google-cloud-redis/package.json @@ -49,7 +49,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json b/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json index 96befca48b4..36dc27313e2 100644 --- a/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json +++ b/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-redis", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-redis/samples/generated/v1/snippet_metadata_google.cloud.redis.v1.json b/packages/google-cloud-redis/samples/generated/v1/snippet_metadata_google.cloud.redis.v1.json index 96befca48b4..36dc27313e2 100644 --- a/packages/google-cloud-redis/samples/generated/v1/snippet_metadata_google.cloud.redis.v1.json +++ b/packages/google-cloud-redis/samples/generated/v1/snippet_metadata_google.cloud.redis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-redis", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json b/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json index 0650575beb6..c23034ce661 100644 --- a/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json +++ b/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-redis", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.v1beta1.json b/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.v1beta1.json index 0650575beb6..c23034ce661 100644 --- a/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.v1beta1.json +++ b/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata_google.cloud.redis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-redis", - "version": "4.3.1", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-redis/src/v1/cloud_redis_client.ts b/packages/google-cloud-redis/src/v1/cloud_redis_client.ts index 215b059fa54..c8a43bdde51 100644 --- a/packages/google-cloud-redis/src/v1/cloud_redis_client.ts +++ b/packages/google-cloud-redis/src/v1/cloud_redis_client.ts @@ -638,7 +638,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -756,7 +758,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstanceAuthString request %j', request); const wrappedCallback: | Callback< @@ -912,7 +916,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1094,7 +1100,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1266,7 +1274,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1444,7 +1454,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1620,7 +1632,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1793,7 +1807,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1963,7 +1979,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2140,7 +2158,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2314,7 +2334,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.v1.IListInstancesRequest, @@ -2389,7 +2411,9 @@ export class CloudRedisClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -2446,7 +2470,9 @@ export class CloudRedisClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -2626,7 +2652,7 @@ export class CloudRedisClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts b/packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts index c9084f3efbb..6686e8538dc 100644 --- a/packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts +++ b/packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts @@ -633,7 +633,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -759,7 +761,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstanceAuthString request %j', request); const wrappedCallback: | Callback< @@ -915,7 +919,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1097,7 +1103,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1269,7 +1277,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1447,7 +1457,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1623,7 +1635,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1796,7 +1810,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1951,7 +1967,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2124,7 +2142,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2303,7 +2323,9 @@ export class CloudRedisClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.redis.v1beta1.IListInstancesRequest, @@ -2377,7 +2399,9 @@ export class CloudRedisClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -2433,7 +2457,9 @@ export class CloudRedisClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, diff --git a/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts b/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts index 5391df94da1..c60e395f8a2 100644 --- a/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts +++ b/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts @@ -287,7 +287,9 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudRedisStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceRequest() ); @@ -377,7 +379,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceRequest() ); @@ -424,7 +426,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceRequest() ); @@ -455,7 +457,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceRequest() ); @@ -476,7 +478,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceAuthStringRequest() ); @@ -508,7 +510,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceAuthStringRequest() ); @@ -555,7 +557,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceAuthStringRequest() ); @@ -589,7 +591,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.GetInstanceAuthStringRequest() ); @@ -613,7 +615,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.CreateInstanceRequest() ); @@ -646,7 +648,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.CreateInstanceRequest() ); @@ -700,7 +702,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.CreateInstanceRequest() ); @@ -731,7 +733,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.CreateInstanceRequest() ); @@ -764,7 +766,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -786,7 +788,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -807,7 +809,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpdateInstanceRequest() ); @@ -841,7 +843,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpdateInstanceRequest() ); @@ -896,7 +898,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpdateInstanceRequest() ); @@ -928,7 +930,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpdateInstanceRequest() ); @@ -962,7 +964,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -984,7 +986,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1005,7 +1007,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpgradeInstanceRequest() ); @@ -1038,7 +1040,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpgradeInstanceRequest() ); @@ -1092,7 +1094,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpgradeInstanceRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.UpgradeInstanceRequest() ); @@ -1156,7 +1158,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1178,7 +1180,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1199,7 +1201,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ImportInstanceRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ImportInstanceRequest() ); @@ -1286,7 +1288,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ImportInstanceRequest() ); @@ -1317,7 +1319,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ImportInstanceRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1372,7 +1374,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1393,7 +1395,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ExportInstanceRequest() ); @@ -1426,7 +1428,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ExportInstanceRequest() ); @@ -1480,7 +1482,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ExportInstanceRequest() ); @@ -1511,7 +1513,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ExportInstanceRequest() ); @@ -1544,7 +1546,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1566,7 +1568,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1587,7 +1589,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.FailoverInstanceRequest() ); @@ -1620,7 +1622,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.FailoverInstanceRequest() ); @@ -1674,7 +1676,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.FailoverInstanceRequest() ); @@ -1705,7 +1707,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.FailoverInstanceRequest() ); @@ -1738,7 +1740,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1760,7 +1762,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1781,7 +1783,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.DeleteInstanceRequest() ); @@ -1814,7 +1816,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.DeleteInstanceRequest() ); @@ -1868,7 +1870,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.DeleteInstanceRequest() ); @@ -1899,7 +1901,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.DeleteInstanceRequest() ); @@ -1932,7 +1934,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1954,7 +1956,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1975,7 +1977,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.RescheduleMaintenanceRequest() ); @@ -2008,7 +2010,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.RescheduleMaintenanceRequest() ); @@ -2062,7 +2064,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.RescheduleMaintenanceRequest() ); @@ -2096,7 +2098,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.RescheduleMaintenanceRequest() ); @@ -2129,7 +2131,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2151,7 +2153,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2172,7 +2174,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ListInstancesRequest() ); @@ -2205,7 +2207,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ListInstancesRequest() ); @@ -2254,7 +2256,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ListInstancesRequest() ); @@ -2285,7 +2287,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ListInstancesRequest() ); @@ -2336,7 +2338,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ListInstancesRequest() ); @@ -2382,7 +2384,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ListInstancesRequest() ); @@ -2425,7 +2427,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1.ListInstancesRequest() ); @@ -2466,7 +2468,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2496,7 +2498,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2540,7 +2542,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2575,7 +2577,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2623,7 +2625,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2664,7 +2666,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2743,7 +2745,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2823,7 +2825,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2919,8 +2921,7 @@ describe('v1.CloudRedisClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2939,7 +2940,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2948,8 +2949,7 @@ describe('v1.CloudRedisClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2965,7 +2965,7 @@ describe('v1.CloudRedisClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2976,7 +2976,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3029,7 +3029,7 @@ describe('v1.CloudRedisClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3039,7 +3039,7 @@ describe('v1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-redis/test/gapic_cloud_redis_v1beta1.ts b/packages/google-cloud-redis/test/gapic_cloud_redis_v1beta1.ts index 7565d552fe9..16bb40cde91 100644 --- a/packages/google-cloud-redis/test/gapic_cloud_redis_v1beta1.ts +++ b/packages/google-cloud-redis/test/gapic_cloud_redis_v1beta1.ts @@ -284,7 +284,9 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudRedisStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceRequest() ); @@ -374,7 +376,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceRequest() ); @@ -421,7 +423,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceRequest() ); @@ -452,7 +454,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceRequest() ); @@ -473,7 +475,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest() ); @@ -505,7 +507,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest() ); @@ -552,7 +554,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest() ); @@ -586,7 +588,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest() ); @@ -610,7 +612,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.CreateInstanceRequest() ); @@ -643,7 +645,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.CreateInstanceRequest() ); @@ -697,7 +699,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.CreateInstanceRequest() ); @@ -728,7 +730,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.CreateInstanceRequest() ); @@ -761,7 +763,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -783,7 +785,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -804,7 +806,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpdateInstanceRequest() ); @@ -838,7 +840,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpdateInstanceRequest() ); @@ -893,7 +895,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpdateInstanceRequest() ); @@ -925,7 +927,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpdateInstanceRequest() ); @@ -959,7 +961,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -981,7 +983,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1002,7 +1004,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpgradeInstanceRequest() ); @@ -1035,7 +1037,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpgradeInstanceRequest() ); @@ -1089,7 +1091,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpgradeInstanceRequest() ); @@ -1120,7 +1122,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.UpgradeInstanceRequest() ); @@ -1153,7 +1155,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1175,7 +1177,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1196,7 +1198,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ImportInstanceRequest() ); @@ -1229,7 +1231,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ImportInstanceRequest() ); @@ -1283,7 +1285,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ImportInstanceRequest() ); @@ -1314,7 +1316,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ImportInstanceRequest() ); @@ -1347,7 +1349,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1369,7 +1371,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1390,7 +1392,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ExportInstanceRequest() ); @@ -1423,7 +1425,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ExportInstanceRequest() ); @@ -1477,7 +1479,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ExportInstanceRequest() ); @@ -1508,7 +1510,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ExportInstanceRequest() ); @@ -1541,7 +1543,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1563,7 +1565,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1584,7 +1586,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.FailoverInstanceRequest() ); @@ -1617,7 +1619,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.FailoverInstanceRequest() ); @@ -1671,7 +1673,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.FailoverInstanceRequest() ); @@ -1702,7 +1704,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.FailoverInstanceRequest() ); @@ -1735,7 +1737,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1757,7 +1759,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1778,7 +1780,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.DeleteInstanceRequest() ); @@ -1811,7 +1813,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.DeleteInstanceRequest() ); @@ -1865,7 +1867,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.DeleteInstanceRequest() ); @@ -1896,7 +1898,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.DeleteInstanceRequest() ); @@ -1929,7 +1931,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1951,7 +1953,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1972,7 +1974,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest() ); @@ -2005,7 +2007,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest() ); @@ -2059,7 +2061,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest() ); @@ -2093,7 +2095,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest() ); @@ -2126,7 +2128,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2148,7 +2150,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2169,7 +2171,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ListInstancesRequest() ); @@ -2202,7 +2204,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ListInstancesRequest() ); @@ -2251,7 +2253,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ListInstancesRequest() ); @@ -2282,7 +2284,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ListInstancesRequest() ); @@ -2336,7 +2338,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ListInstancesRequest() ); @@ -2385,7 +2387,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ListInstancesRequest() ); @@ -2428,7 +2430,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.redis.v1beta1.ListInstancesRequest() ); @@ -2465,7 +2467,7 @@ describe('v1beta1.CloudRedisClient', () => { }); describe('Path templates', () => { - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -2476,7 +2478,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2529,7 +2531,7 @@ describe('v1beta1.CloudRedisClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2539,7 +2541,7 @@ describe('v1beta1.CloudRedisClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); From ab304122e3e825c9a76af7d6b0ef4ddc9aa6e906 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 15:38:27 +0000 Subject: [PATCH 33/34] fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6185) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 738212310 Source-Link: https://togithub.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRlcGxveS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRldmVsb3BlcmNvbm5lY3QvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvbWFpbnMvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2Vjb250YWluZXIvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2VuZXR3b3JrLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVzc2VudGlhbGNvbnRhY3RzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmcvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWZpbGVzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdkY2hhcmR3YXJlbWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZWJhY2t1cC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZWNvbm5lY3QtZ2F0ZXdheS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZWh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZW11bHRpY2xvdWQvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== --- packages/google-cloud-datastream/package.json | 2 +- ...t_metadata.google.cloud.datastream.v1.json | 2 +- ...t_metadata_google.cloud.datastream.v1.json | 2 +- ...data.google.cloud.datastream.v1alpha1.json | 2 +- ...data_google.cloud.datastream.v1alpha1.json | 2 +- .../src/v1/datastream_client.ts | 154 +++-- .../src/v1alpha1/datastream_client.ts | 124 +++- .../test/gapic_datastream_v1.ts | 362 +++++------ .../test/gapic_datastream_v1alpha1.ts | 270 ++++---- packages/google-cloud-deploy/package.json | 2 +- ...ippet_metadata.google.cloud.deploy.v1.json | 2 +- ...ippet_metadata_google.cloud.deploy.v1.json | 2 +- .../src/v1/cloud_deploy_client.ts | 254 ++++++-- .../test/gapic_cloud_deploy_v1.ts | 600 +++++++++--------- .../package.json | 2 +- ...data_google.cloud.developerconnect.v1.json | 2 +- .../src/v1/developer_connect_client.ts | 90 ++- .../test/gapic_developer_connect_v1.ts | 212 +++---- .../google-cloud-dialogflow-cx/package.json | 2 +- ...etadata.google.cloud.dialogflow.cx.v3.json | 2 +- ...etadata_google.cloud.dialogflow.cx.v3.json | 2 +- ...ta.google.cloud.dialogflow.cx.v3beta1.json | 2 +- ...ta_google.cloud.dialogflow.cx.v3beta1.json | 2 +- .../src/v3/agents_client.ts | 54 +- .../src/v3/changelogs_client.ts | 18 +- .../src/v3/deployments_client.ts | 18 +- .../src/v3/entity_types_client.ts | 38 +- .../src/v3/environments_client.ts | 62 +- .../src/v3/experiments_client.ts | 38 +- .../src/v3/flows_client.ts | 50 +- .../src/v3/generators_client.ts | 30 +- .../src/v3/intents_client.ts | 38 +- .../src/v3/pages_client.ts | 30 +- .../v3/security_settings_service_client.ts | 30 +- .../src/v3/session_entity_types_client.ts | 30 +- .../src/v3/sessions_client.ts | 26 +- .../src/v3/test_cases_client.ts | 66 +- .../src/v3/transition_route_groups_client.ts | 30 +- .../src/v3/versions_client.ts | 38 +- .../src/v3/webhooks_client.ts | 30 +- .../src/v3beta1/agents_client.ts | 54 +- .../src/v3beta1/changelogs_client.ts | 16 +- .../v3beta1/conversation_history_client.ts | 20 +- .../src/v3beta1/deployments_client.ts | 16 +- .../src/v3beta1/entity_types_client.ts | 38 +- .../src/v3beta1/environments_client.ts | 62 +- .../src/v3beta1/examples_client.ts | 28 +- .../src/v3beta1/experiments_client.ts | 36 +- .../src/v3beta1/flows_client.ts | 50 +- .../src/v3beta1/generators_client.ts | 28 +- .../src/v3beta1/intents_client.ts | 38 +- .../src/v3beta1/pages_client.ts | 28 +- .../src/v3beta1/playbooks_client.ts | 52 +- .../security_settings_service_client.ts | 28 +- .../v3beta1/session_entity_types_client.ts | 28 +- .../src/v3beta1/sessions_client.ts | 24 +- .../src/v3beta1/test_cases_client.ts | 66 +- .../src/v3beta1/tools_client.ts | 62 +- .../v3beta1/transition_route_groups_client.ts | 28 +- .../src/v3beta1/versions_client.ts | 38 +- .../src/v3beta1/webhooks_client.ts | 28 +- .../test/gapic_agents_v3.ts | 230 +++---- .../test/gapic_agents_v3beta1.ts | 254 ++++---- .../test/gapic_changelogs_v3.ts | 150 ++--- .../test/gapic_changelogs_v3beta1.ts | 160 ++--- .../gapic_conversation_history_v3beta1.ts | 168 ++--- .../test/gapic_deployments_v3.ts | 150 ++--- .../test/gapic_deployments_v3beta1.ts | 160 ++--- .../test/gapic_entity_types_v3.ts | 198 +++--- .../test/gapic_entity_types_v3beta1.ts | 222 +++---- .../test/gapic_environments_v3.ts | 234 +++---- .../test/gapic_environments_v3beta1.ts | 258 ++++---- .../test/gapic_examples_v3beta1.ts | 184 +++--- .../test/gapic_experiments_v3.ts | 190 +++--- .../test/gapic_experiments_v3beta1.ts | 200 +++--- .../test/gapic_flows_v3.ts | 226 +++---- .../test/gapic_flows_v3beta1.ts | 250 ++++---- .../test/gapic_generators_v3.ts | 174 ++--- .../test/gapic_generators_v3beta1.ts | 184 +++--- .../test/gapic_intents_v3.ts | 198 +++--- .../test/gapic_intents_v3beta1.ts | 222 +++---- .../test/gapic_pages_v3.ts | 174 ++--- .../test/gapic_pages_v3beta1.ts | 184 +++--- .../test/gapic_playbooks_v3beta1.ts | 222 +++---- .../gapic_security_settings_service_v3.ts | 190 +++--- ...gapic_security_settings_service_v3beta1.ts | 200 +++--- .../test/gapic_session_entity_types_v3.ts | 178 +++--- .../gapic_session_entity_types_v3beta1.ts | 188 +++--- .../test/gapic_sessions_v3.ts | 182 +++--- .../test/gapic_sessions_v3beta1.ts | 192 +++--- .../test/gapic_test_cases_v3.ts | 252 ++++---- .../test/gapic_test_cases_v3beta1.ts | 276 ++++---- .../test/gapic_tools_v3beta1.ts | 256 ++++---- .../test/gapic_transition_route_groups_v3.ts | 174 ++--- .../gapic_transition_route_groups_v3beta1.ts | 184 +++--- .../test/gapic_versions_v3.ts | 198 +++--- .../test/gapic_versions_v3beta1.ts | 222 +++---- .../test/gapic_webhooks_v3.ts | 182 +++--- .../test/gapic_webhooks_v3beta1.ts | 192 +++--- packages/google-cloud-dialogflow/package.json | 2 +- ...t_metadata.google.cloud.dialogflow.v2.json | 2 +- ...t_metadata_google.cloud.dialogflow.v2.json | 2 +- ...adata.google.cloud.dialogflow.v2beta1.json | 2 +- ...adata_google.cloud.dialogflow.v2beta1.json | 2 +- .../src/v2/agents_client.ts | 46 +- .../src/v2/answer_records_client.ts | 16 +- .../src/v2/contexts_client.ts | 32 +- .../src/v2/conversation_datasets_client.ts | 30 +- .../src/v2/conversation_models_client.ts | 54 +- .../src/v2/conversation_profiles_client.ts | 38 +- .../src/v2/conversations_client.ts | 60 +- .../src/v2/documents_client.ts | 42 +- .../src/v2/encryption_spec_service_client.ts | 10 +- .../src/v2/entity_types_client.ts | 50 +- .../src/v2/environments_client.ts | 40 +- .../src/v2/fulfillments_client.ts | 8 +- .../src/v2/generators_client.ts | 28 +- .../src/v2/intents_client.ts | 38 +- .../src/v2/knowledge_bases_client.ts | 28 +- .../src/v2/participants_client.ts | 48 +- .../src/v2/session_entity_types_client.ts | 28 +- .../src/v2/sessions_client.ts | 8 +- .../src/v2/versions_client.ts | 28 +- .../src/v2beta1/agents_client.ts | 46 +- .../src/v2beta1/answer_records_client.ts | 20 +- .../src/v2beta1/contexts_client.ts | 32 +- .../v2beta1/conversation_profiles_client.ts | 38 +- .../src/v2beta1/conversations_client.ts | 64 +- .../src/v2beta1/documents_client.ts | 38 +- .../v2beta1/encryption_spec_service_client.ts | 10 +- .../src/v2beta1/entity_types_client.ts | 50 +- .../src/v2beta1/environments_client.ts | 40 +- .../src/v2beta1/fulfillments_client.ts | 8 +- .../src/v2beta1/generators_client.ts | 28 +- .../src/v2beta1/intents_client.ts | 38 +- .../src/v2beta1/knowledge_bases_client.ts | 28 +- .../src/v2beta1/participants_client.ts | 64 +- .../src/v2beta1/phone_numbers_client.ts | 24 +- .../v2beta1/session_entity_types_client.ts | 28 +- .../src/v2beta1/sessions_client.ts | 8 +- .../src/v2beta1/sip_trunks_client.ts | 28 +- .../src/v2beta1/versions_client.ts | 28 +- .../test/gapic_agents_v2.ts | 290 ++++----- .../test/gapic_agents_v2beta1.ts | 282 ++++---- .../test/gapic_answer_records_v2.ts | 204 +++--- .../test/gapic_answer_records_v2beta1.ts | 204 +++--- .../test/gapic_contexts_v2.ts | 240 +++---- .../test/gapic_contexts_v2beta1.ts | 232 +++---- .../test/gapic_conversation_datasets_v2.ts | 258 ++++---- .../test/gapic_conversation_models_v2.ts | 300 ++++----- .../test/gapic_conversation_profiles_v2.ts | 270 ++++---- .../gapic_conversation_profiles_v2beta1.ts | 262 ++++---- .../test/gapic_conversations_v2.ts | 286 ++++----- .../test/gapic_conversations_v2beta1.ts | 286 ++++----- .../test/gapic_documents_v2.ts | 290 ++++----- .../test/gapic_documents_v2beta1.ts | 270 ++++---- .../test/gapic_encryption_spec_service_v2.ts | 212 +++---- .../gapic_encryption_spec_service_v2beta1.ts | 204 +++--- .../test/gapic_entity_types_v2.ts | 302 ++++----- .../test/gapic_entity_types_v2beta1.ts | 294 ++++----- .../test/gapic_environments_v2.ts | 242 +++---- .../test/gapic_environments_v2beta1.ts | 234 +++---- .../test/gapic_fulfillments_v2.ts | 194 +++--- .../test/gapic_fulfillments_v2beta1.ts | 186 +++--- .../test/gapic_generators_v2.ts | 228 +++---- .../test/gapic_generators_v2beta1.ts | 220 +++---- .../test/gapic_intents_v2.ts | 266 ++++---- .../test/gapic_intents_v2beta1.ts | 258 ++++---- .../test/gapic_knowledge_bases_v2.ts | 228 +++---- .../test/gapic_knowledge_bases_v2beta1.ts | 220 +++---- .../test/gapic_participants_v2.ts | 264 ++++---- .../test/gapic_participants_v2beta1.ts | 278 ++++---- .../test/gapic_phone_numbers_v2beta1.ts | 212 ++++--- .../test/gapic_session_entity_types_v2.ts | 232 +++---- .../gapic_session_entity_types_v2beta1.ts | 224 +++---- .../test/gapic_sessions_v2.ts | 206 +++--- .../test/gapic_sessions_v2beta1.ts | 198 +++--- .../test/gapic_sip_trunks_v2beta1.ts | 224 +++---- .../test/gapic_versions_v2.ts | 228 +++---- .../test/gapic_versions_v2beta1.ts | 220 +++---- .../google-cloud-discoveryengine/package.json | 2 +- ...adata.google.cloud.discoveryengine.v1.json | 2 +- ...adata_google.cloud.discoveryengine.v1.json | 2 +- ..._google.cloud.discoveryengine.v1alpha.json | 2 +- ...a.google.cloud.discoveryengine.v1beta.json | 2 +- ...a_google.cloud.discoveryengine.v1beta.json | 2 +- .../src/v1/completion_service_client.ts | 22 +- .../src/v1/control_service_client.ts | 28 +- .../conversational_search_service_client.ts | 68 +- .../src/v1/data_store_service_client.ts | 30 +- .../src/v1/document_service_client.ts | 42 +- .../src/v1/engine_service_client.ts | 30 +- .../v1/grounded_generation_service_client.ts | 12 +- .../src/v1/project_service_client.ts | 6 +- .../src/v1/rank_service_client.ts | 4 +- .../src/v1/recommendation_service_client.ts | 4 +- .../src/v1/schema_service_client.ts | 30 +- .../src/v1/search_service_client.ts | 24 +- .../src/v1/search_tuning_service_client.ts | 10 +- .../v1/site_search_engine_service_client.ts | 66 +- .../src/v1/user_event_service_client.ts | 18 +- .../src/v1alpha/acl_config_service_client.ts | 8 +- .../src/v1alpha/chunk_service_client.ts | 16 +- .../src/v1alpha/completion_service_client.ts | 22 +- .../src/v1alpha/control_service_client.ts | 28 +- .../conversational_search_service_client.ts | 68 +- .../src/v1alpha/data_store_service_client.ts | 38 +- .../src/v1alpha/document_service_client.ts | 46 +- .../src/v1alpha/engine_service_client.ts | 42 +- .../estimate_billing_service_client.ts | 6 +- .../src/v1alpha/evaluation_service_client.ts | 34 +- .../grounded_generation_service_client.ts | 4 +- .../src/v1alpha/project_service_client.ts | 14 +- .../src/v1alpha/rank_service_client.ts | 4 +- .../v1alpha/recommendation_service_client.ts | 4 +- .../v1alpha/sample_query_service_client.ts | 34 +- .../sample_query_set_service_client.ts | 28 +- .../src/v1alpha/schema_service_client.ts | 30 +- .../src/v1alpha/search_service_client.ts | 12 +- .../v1alpha/search_tuning_service_client.ts | 10 +- .../v1alpha/serving_config_service_client.ts | 20 +- .../site_search_engine_service_client.ts | 74 ++- .../src/v1alpha/user_event_service_client.ts | 18 +- .../src/v1beta/completion_service_client.ts | 26 +- .../src/v1beta/control_service_client.ts | 28 +- .../conversational_search_service_client.ts | 68 +- .../src/v1beta/data_store_service_client.ts | 30 +- .../src/v1beta/document_service_client.ts | 42 +- .../src/v1beta/engine_service_client.ts | 42 +- .../src/v1beta/evaluation_service_client.ts | 34 +- .../grounded_generation_service_client.ts | 12 +- .../src/v1beta/project_service_client.ts | 6 +- .../src/v1beta/rank_service_client.ts | 4 +- .../v1beta/recommendation_service_client.ts | 4 +- .../src/v1beta/sample_query_service_client.ts | 34 +- .../v1beta/sample_query_set_service_client.ts | 28 +- .../src/v1beta/schema_service_client.ts | 30 +- .../src/v1beta/search_service_client.ts | 24 +- .../v1beta/search_tuning_service_client.ts | 10 +- .../v1beta/serving_config_service_client.ts | 20 +- .../site_search_engine_service_client.ts | 78 ++- .../src/v1beta/user_event_service_client.ts | 18 +- .../test/gapic_acl_config_service_v1alpha.ts | 178 +++--- .../test/gapic_chunk_service_v1alpha.ts | 184 +++--- .../test/gapic_completion_service_v1.ts | 204 +++--- .../test/gapic_completion_service_v1alpha.ts | 232 +++---- .../test/gapic_completion_service_v1beta.ts | 260 ++++---- .../test/gapic_control_service_v1.ts | 184 +++--- .../test/gapic_control_service_v1alpha.ts | 212 ++++--- .../test/gapic_control_service_v1beta.ts | 220 +++---- .../gapic_conversational_search_service_v1.ts | 262 ++++---- ...c_conversational_search_service_v1alpha.ts | 278 ++++---- ...ic_conversational_search_service_v1beta.ts | 286 ++++----- .../test/gapic_data_store_service_v1.ts | 206 +++--- .../test/gapic_data_store_service_v1alpha.ts | 250 ++++---- .../test/gapic_data_store_service_v1beta.ts | 242 +++---- .../test/gapic_document_service_v1.ts | 234 +++---- .../test/gapic_document_service_v1alpha.ts | 270 ++++---- .../test/gapic_document_service_v1beta.ts | 270 ++++---- .../test/gapic_engine_service_v1.ts | 206 +++--- .../test/gapic_engine_service_v1alpha.ts | 262 ++++---- .../test/gapic_engine_service_v1beta.ts | 270 ++++---- .../gapic_estimate_billing_service_v1alpha.ts | 192 +++--- .../test/gapic_evaluation_service_v1alpha.ts | 228 +++---- .../test/gapic_evaluation_service_v1beta.ts | 236 +++---- .../gapic_grounded_generation_service_v1.ts | 162 ++--- ...pic_grounded_generation_service_v1alpha.ts | 174 ++--- ...apic_grounded_generation_service_v1beta.ts | 194 +++--- .../test/gapic_project_service_v1.ts | 160 ++--- .../test/gapic_project_service_v1alpha.ts | 204 +++--- .../test/gapic_project_service_v1beta.ts | 196 +++--- .../test/gapic_rank_service_v1.ts | 146 ++--- .../test/gapic_rank_service_v1alpha.ts | 174 ++--- .../test/gapic_rank_service_v1beta.ts | 182 +++--- .../test/gapic_recommendation_service_v1.ts | 154 ++--- .../gapic_recommendation_service_v1alpha.ts | 170 ++--- .../gapic_recommendation_service_v1beta.ts | 178 +++--- .../gapic_sample_query_service_v1alpha.ts | 234 +++---- .../test/gapic_sample_query_service_v1beta.ts | 242 +++---- .../gapic_sample_query_set_service_v1alpha.ts | 212 ++++--- .../gapic_sample_query_set_service_v1beta.ts | 220 +++---- .../test/gapic_schema_service_v1.ts | 206 +++--- .../test/gapic_schema_service_v1alpha.ts | 234 +++---- .../test/gapic_schema_service_v1beta.ts | 242 +++---- .../test/gapic_search_service_v1.ts | 182 +++--- .../test/gapic_search_service_v1alpha.ts | 184 +++--- .../test/gapic_search_service_v1beta.ts | 206 +++--- .../test/gapic_search_tuning_service_v1.ts | 168 ++--- .../gapic_search_tuning_service_v1alpha.ts | 196 +++--- .../gapic_search_tuning_service_v1beta.ts | 204 +++--- .../gapic_serving_config_service_v1alpha.ts | 196 +++--- .../gapic_serving_config_service_v1beta.ts | 204 +++--- .../gapic_site_search_engine_service_v1.ts | 288 ++++----- ...apic_site_search_engine_service_v1alpha.ts | 336 +++++----- ...gapic_site_search_engine_service_v1beta.ts | 356 +++++------ .../test/gapic_user_event_service_v1.ts | 188 +++--- .../test/gapic_user_event_service_v1alpha.ts | 216 +++---- .../test/gapic_user_event_service_v1beta.ts | 224 +++---- packages/google-cloud-documentai/package.json | 2 +- .../v1/document_processor_service_client.ts | 122 +++- .../document_understanding_service_client.ts | 2 +- .../document_processor_service_client.ts | 126 +++- .../src/v1beta3/document_service_client.ts | 38 +- .../gapic_document_processor_service_v1.ts | 300 ++++----- ...apic_document_processor_service_v1beta3.ts | 320 +++++----- .../test/gapic_document_service_v1beta3.ts | 126 ++-- ..._document_understanding_service_v1beta2.ts | 6 +- packages/google-cloud-domains/package.json | 2 +- ...ppet_metadata.google.cloud.domains.v1.json | 2 +- ...ppet_metadata_google.cloud.domains.v1.json | 2 +- ...etadata.google.cloud.domains.v1alpha2.json | 2 +- ...etadata_google.cloud.domains.v1alpha2.json | 2 +- ...metadata.google.cloud.domains.v1beta1.json | 2 +- ...metadata_google.cloud.domains.v1beta1.json | 2 +- .../src/v1/domains_client.ts | 68 +- .../src/v1alpha2/domains_client.ts | 68 +- .../src/v1beta1/domains_client.ts | 68 +- .../test/gapic_domains_v1.ts | 170 ++--- .../test/gapic_domains_v1alpha2.ts | 170 ++--- .../test/gapic_domains_v1beta1.ts | 170 ++--- .../google-cloud-edgecontainer/package.json | 2 +- ...etadata_google.cloud.edgecontainer.v1.json | 2 +- .../src/v1/edge_container_client.ts | 114 +++- .../test/gapic_edge_container_v1.ts | 272 ++++---- .../google-cloud-edgenetwork/package.json | 2 +- ..._metadata_google.cloud.edgenetwork.v1.json | 2 +- .../src/v1/edge_network_client.ts | 154 +++-- .../test/gapic_edge_network_v1.ts | 344 +++++----- .../package.json | 2 +- ...ata.google.cloud.essentialcontacts.v1.json | 2 +- ...ata_google.cloud.essentialcontacts.v1.json | 2 +- .../v1/essential_contacts_service_client.ts | 44 +- .../gapic_essential_contacts_service_v1.ts | 88 +-- .../package.json | 2 +- ...a.google.cloud.eventarc.publishing.v1.json | 2 +- ...a_google.cloud.eventarc.publishing.v1.json | 2 +- .../src/v1/publisher_client.ts | 12 +- .../test/gapic_publisher_v1.ts | 28 +- packages/google-cloud-eventarc/package.json | 2 +- ...pet_metadata.google.cloud.eventarc.v1.json | 2 +- ...pet_metadata_google.cloud.eventarc.v1.json | 2 +- .../src/v1/eventarc_client.ts | 230 +++++-- .../test/gapic_eventarc_v1.ts | 536 ++++++++-------- packages/google-cloud-filestore/package.json | 2 +- ...et_metadata.google.cloud.filestore.v1.json | 2 +- ...et_metadata_google.cloud.filestore.v1.json | 2 +- ...tadata.google.cloud.filestore.v1beta1.json | 2 +- ...tadata_google.cloud.filestore.v1beta1.json | 2 +- .../src/v1/cloud_filestore_manager_client.ts | 98 ++- .../v1beta1/cloud_filestore_manager_client.ts | 126 +++- .../test/gapic_cloud_filestore_manager_v1.ts | 254 ++++---- .../gapic_cloud_filestore_manager_v1beta1.ts | 320 +++++----- packages/google-cloud-functions/package.json | 2 +- ...et_metadata.google.cloud.functions.v1.json | 2 +- ...et_metadata_google.cloud.functions.v1.json | 2 +- ...et_metadata.google.cloud.functions.v2.json | 2 +- ...et_metadata_google.cloud.functions.v2.json | 2 +- ...tadata.google.cloud.functions.v2alpha.json | 2 +- ...tadata_google.cloud.functions.v2alpha.json | 2 +- ...etadata.google.cloud.functions.v2beta.json | 2 +- ...etadata_google.cloud.functions.v2beta.json | 2 +- .../src/v1/cloud_functions_service_client.ts | 54 +- .../src/v2/function_service_client.ts | 42 +- .../src/v2alpha/function_service_client.ts | 42 +- .../src/v2beta/function_service_client.ts | 42 +- .../test/gapic_cloud_functions_service_v1.ts | 150 ++--- .../test/gapic_function_service_v2.ts | 176 ++--- .../test/gapic_function_service_v2alpha.ts | 176 ++--- .../test/gapic_function_service_v2beta.ts | 176 ++--- .../package.json | 2 +- ...e.cloud.gdchardwaremanagement.v1alpha.json | 2 +- .../g_d_c_hardware_management_client.ts | 206 ++++-- ...gapic_g_d_c_hardware_management_v1alpha.ts | 468 +++++++------- packages/google-cloud-gkebackup/package.json | 2 +- ...et_metadata.google.cloud.gkebackup.v1.json | 2 +- ...et_metadata_google.cloud.gkebackup.v1.json | 2 +- .../src/v1/backup_for_g_k_e_client.ts | 150 +++-- .../test/gapic_backup_for_g_k_e_v1.ts | 358 +++++------ .../package.json | 2 +- ...ta_google.cloud.gkeconnect.gateway.v1.json | 2 +- ...ogle.cloud.gkeconnect.gateway.v1beta1.json | 2 +- ...ogle.cloud.gkeconnect.gateway.v1beta1.json | 2 +- .../src/v1/gateway_control_client.ts | 4 +- .../src/v1beta1/gateway_control_client.ts | 4 +- .../test/gapic_gateway_control_v1.ts | 12 +- .../test/gapic_gateway_control_v1beta1.ts | 12 +- packages/google-cloud-gkehub/package.json | 2 +- ...ippet_metadata.google.cloud.gkehub.v1.json | 2 +- ...ippet_metadata_google.cloud.gkehub.v1.json | 2 +- ..._metadata.google.cloud.gkehub.v1alpha.json | 2 +- ..._metadata_google.cloud.gkehub.v1alpha.json | 2 +- ...metadata.google.cloud.gkehub.v1alpha2.json | 2 +- ...metadata_google.cloud.gkehub.v1alpha2.json | 2 +- ...t_metadata.google.cloud.gkehub.v1beta.json | 2 +- ...t_metadata_google.cloud.gkehub.v1beta.json | 2 +- ..._metadata.google.cloud.gkehub.v1beta1.json | 2 +- ..._metadata_google.cloud.gkehub.v1beta1.json | 2 +- .../src/v1/gke_hub_client.ts | 60 +- .../src/v1alpha/gke_hub_client.ts | 28 +- .../src/v1beta/gke_hub_client.ts | 28 +- .../gke_hub_membership_service_client.ts | 42 +- ...apic_gke_hub_membership_service_v1beta1.ts | 140 ++-- .../test/gapic_gke_hub_v1.ts | 144 ++--- .../test/gapic_gke_hub_v1alpha.ts | 66 +- .../test/gapic_gke_hub_v1beta.ts | 66 +- .../google-cloud-gkemulticloud/package.json | 2 +- ...etadata.google.cloud.gkemulticloud.v1.json | 2 +- ...etadata_google.cloud.gkemulticloud.v1.json | 2 +- .../src/v1/attached_clusters_client.ts | 46 +- .../src/v1/aws_clusters_client.ts | 82 ++- .../src/v1/azure_clusters_client.ts | 102 ++- .../test/gapic_attached_clusters_v1.ts | 156 ++--- .../test/gapic_aws_clusters_v1.ts | 230 +++---- .../test/gapic_azure_clusters_v1.ts | 264 ++++---- 414 files changed, 23455 insertions(+), 19921 deletions(-) diff --git a/packages/google-cloud-datastream/package.json b/packages/google-cloud-datastream/package.json index 8e8c8432340..b9ab82797c7 100644 --- a/packages/google-cloud-datastream/package.json +++ b/packages/google-cloud-datastream/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json index 46c1e622d57..09f6ef9cf04 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json +++ b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datastream", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json index d659b370f59..f677ad6213b 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json +++ b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datastream", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json b/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json index 41edef79606..163518c2071 100644 --- a/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json +++ b/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datastream", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json b/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json index 41edef79606..163518c2071 100644 --- a/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json +++ b/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata_google.cloud.datastream.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datastream", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datastream/src/v1/datastream_client.ts b/packages/google-cloud-datastream/src/v1/datastream_client.ts index e7451738008..d72d9930377 100644 --- a/packages/google-cloud-datastream/src/v1/datastream_client.ts +++ b/packages/google-cloud-datastream/src/v1/datastream_client.ts @@ -748,7 +748,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectionProfile request %j', request); const wrappedCallback: | Callback< @@ -894,7 +896,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('discoverConnectionProfile request %j', request); const wrappedCallback: | Callback< @@ -1007,7 +1011,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStream request %j', request); const wrappedCallback: | Callback< @@ -1123,7 +1129,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStreamObject request %j', request); const wrappedCallback: | Callback< @@ -1241,7 +1249,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupStreamObject request %j', request); const wrappedCallback: | Callback< @@ -1361,7 +1371,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ object: request.object ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startBackfillJob request %j', request); const wrappedCallback: | Callback< @@ -1481,7 +1493,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ object: request.object ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopBackfillJob request %j', request); const wrappedCallback: | Callback< @@ -1603,7 +1617,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPrivateConnection request %j', request); const wrappedCallback: | Callback< @@ -1714,7 +1730,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRoute request %j', request); const wrappedCallback: | Callback< @@ -1864,7 +1882,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2056,7 +2076,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ 'connection_profile.name': request.connectionProfile!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2237,7 +2259,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2427,7 +2451,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2619,7 +2645,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ 'stream.name': request.stream!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2800,7 +2828,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2974,7 +3004,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3161,7 +3193,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3345,7 +3379,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3531,7 +3567,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3712,7 +3750,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3885,7 +3925,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1.IListConnectionProfilesRequest, @@ -3960,7 +4002,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listConnectionProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectionProfiles stream %j', request); return this.descriptors.page.listConnectionProfiles.createStream( this.innerApiCalls.listConnectionProfiles as GaxCall, @@ -4017,7 +4061,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listConnectionProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectionProfiles iterate %j', request); return this.descriptors.page.listConnectionProfiles.asyncIterate( this.innerApiCalls['listConnectionProfiles'] as GaxCall, @@ -4123,7 +4169,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1.IListStreamsRequest, @@ -4198,7 +4246,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStreams stream %j', request); return this.descriptors.page.listStreams.createStream( this.innerApiCalls.listStreams as GaxCall, @@ -4255,7 +4305,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStreams iterate %j', request); return this.descriptors.page.listStreams.asyncIterate( this.innerApiCalls['listStreams'] as GaxCall, @@ -4363,7 +4415,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1.IListStreamObjectsRequest, @@ -4434,7 +4488,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listStreamObjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStreamObjects stream %j', request); return this.descriptors.page.listStreamObjects.createStream( this.innerApiCalls.listStreamObjects as GaxCall, @@ -4487,7 +4543,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listStreamObjects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStreamObjects iterate %j', request); return this.descriptors.page.listStreamObjects.asyncIterate( this.innerApiCalls['listStreamObjects'] as GaxCall, @@ -4592,7 +4650,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1.IFetchStaticIpsRequest, @@ -4659,7 +4719,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchStaticIps stream %j', request); return this.descriptors.page.fetchStaticIps.createStream( this.innerApiCalls.fetchStaticIps as GaxCall, @@ -4708,7 +4770,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchStaticIps iterate %j', request); return this.descriptors.page.fetchStaticIps.asyncIterate( this.innerApiCalls['fetchStaticIps'] as GaxCall, @@ -4824,7 +4888,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1.IListPrivateConnectionsRequest, @@ -4902,7 +4968,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections stream %j', request); return this.descriptors.page.listPrivateConnections.createStream( this.innerApiCalls.listPrivateConnections as GaxCall, @@ -4962,7 +5030,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections iterate %j', request); return this.descriptors.page.listPrivateConnections.asyncIterate( this.innerApiCalls['listPrivateConnections'] as GaxCall, @@ -5071,7 +5141,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1.IListRoutesRequest, @@ -5148,7 +5220,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutes stream %j', request); return this.descriptors.page.listRoutes.createStream( this.innerApiCalls.listRoutes as GaxCall, @@ -5207,7 +5281,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutes iterate %j', request); return this.descriptors.page.listRoutes.asyncIterate( this.innerApiCalls['listRoutes'] as GaxCall, @@ -5525,7 +5601,7 @@ export class DatastreamClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-datastream/src/v1alpha1/datastream_client.ts b/packages/google-cloud-datastream/src/v1alpha1/datastream_client.ts index 232195487f2..99f5bf4dbba 100644 --- a/packages/google-cloud-datastream/src/v1alpha1/datastream_client.ts +++ b/packages/google-cloud-datastream/src/v1alpha1/datastream_client.ts @@ -723,7 +723,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnectionProfile request %j', request); const wrappedCallback: | Callback< @@ -865,7 +867,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('discoverConnectionProfile request %j', request); const wrappedCallback: | Callback< @@ -984,7 +988,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getStream request %j', request); const wrappedCallback: | Callback< @@ -1106,7 +1112,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPrivateConnection request %j', request); const wrappedCallback: | Callback< @@ -1225,7 +1233,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRoute request %j', request); const wrappedCallback: | Callback< @@ -1372,7 +1382,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1559,7 +1571,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ 'connection_profile.name': request.connectionProfile!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1740,7 +1754,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1930,7 +1946,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2122,7 +2140,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ 'stream.name': request.stream!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2303,7 +2323,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2470,7 +2492,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ stream: request.stream ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2655,7 +2679,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2839,7 +2865,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3025,7 +3053,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3206,7 +3236,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3379,7 +3411,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1alpha1.IListConnectionProfilesRequest, @@ -3454,7 +3488,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listConnectionProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectionProfiles stream %j', request); return this.descriptors.page.listConnectionProfiles.createStream( this.innerApiCalls.listConnectionProfiles as GaxCall, @@ -3511,7 +3547,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listConnectionProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnectionProfiles iterate %j', request); return this.descriptors.page.listConnectionProfiles.asyncIterate( this.innerApiCalls['listConnectionProfiles'] as GaxCall, @@ -3623,7 +3661,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1alpha1.IListStreamsRequest, @@ -3698,7 +3738,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStreams stream %j', request); return this.descriptors.page.listStreams.createStream( this.innerApiCalls.listStreams as GaxCall, @@ -3755,7 +3797,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listStreams']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listStreams iterate %j', request); return this.descriptors.page.listStreams.asyncIterate( this.innerApiCalls['listStreams'] as GaxCall, @@ -3861,7 +3905,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1alpha1.IFetchStaticIpsRequest, @@ -3928,7 +3974,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchStaticIps stream %j', request); return this.descriptors.page.fetchStaticIps.createStream( this.innerApiCalls.fetchStaticIps as GaxCall, @@ -3977,7 +4025,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchStaticIps iterate %j', request); return this.descriptors.page.fetchStaticIps.asyncIterate( this.innerApiCalls['fetchStaticIps'] as GaxCall, @@ -4092,7 +4142,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1alpha1.IListPrivateConnectionsRequest, @@ -4169,7 +4221,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections stream %j', request); return this.descriptors.page.listPrivateConnections.createStream( this.innerApiCalls.listPrivateConnections as GaxCall, @@ -4228,7 +4282,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listPrivateConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPrivateConnections iterate %j', request); return this.descriptors.page.listPrivateConnections.asyncIterate( this.innerApiCalls['listPrivateConnections'] as GaxCall, @@ -4343,7 +4399,9 @@ export class DatastreamClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.datastream.v1alpha1.IListRoutesRequest, @@ -4420,7 +4478,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutes stream %j', request); return this.descriptors.page.listRoutes.createStream( this.innerApiCalls.listRoutes as GaxCall, @@ -4479,7 +4539,9 @@ export class DatastreamClient { }); const defaultCallSettings = this._defaults['listRoutes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRoutes iterate %j', request); return this.descriptors.page.listRoutes.asyncIterate( this.innerApiCalls['listRoutes'] as GaxCall, diff --git a/packages/google-cloud-datastream/test/gapic_datastream_v1.ts b/packages/google-cloud-datastream/test/gapic_datastream_v1.ts index eaa09804aeb..db4ae123dea 100644 --- a/packages/google-cloud-datastream/test/gapic_datastream_v1.ts +++ b/packages/google-cloud-datastream/test/gapic_datastream_v1.ts @@ -288,7 +288,9 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.datastreamStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() ); @@ -379,7 +381,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() ); @@ -426,7 +428,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() ); @@ -457,7 +459,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetConnectionProfileRequest() ); @@ -478,7 +480,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() ); @@ -510,7 +512,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() ); @@ -557,7 +559,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() ); @@ -591,7 +593,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DiscoverConnectionProfileRequest() ); @@ -615,7 +617,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamRequest() ); @@ -646,7 +648,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamRequest() ); @@ -693,7 +695,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamRequest() ); @@ -721,7 +723,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamRequest() ); @@ -742,7 +744,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamObjectRequest() ); @@ -773,7 +775,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamObjectRequest() ); @@ -820,7 +822,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamObjectRequest() ); @@ -851,7 +853,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetStreamObjectRequest() ); @@ -872,7 +874,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() ); @@ -904,7 +906,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() ); @@ -951,7 +953,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() ); @@ -982,7 +984,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.LookupStreamObjectRequest() ); @@ -1003,7 +1005,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StartBackfillJobRequest() ); @@ -1034,7 +1036,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StartBackfillJobRequest() ); @@ -1081,7 +1083,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StartBackfillJobRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StartBackfillJobRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StopBackfillJobRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StopBackfillJobRequest() ); @@ -1211,7 +1213,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StopBackfillJobRequest() ); @@ -1242,7 +1244,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.StopBackfillJobRequest() ); @@ -1263,7 +1265,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() ); @@ -1295,7 +1297,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetPrivateConnectionRequest() ); @@ -1394,7 +1396,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetRouteRequest() ); @@ -1425,7 +1427,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetRouteRequest() ); @@ -1472,7 +1474,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetRouteRequest() ); @@ -1500,7 +1502,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.GetRouteRequest() ); @@ -1521,7 +1523,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() ); @@ -1554,7 +1556,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() ); @@ -1608,7 +1610,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() ); @@ -1642,7 +1644,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateConnectionProfileRequest() ); @@ -1675,7 +1677,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1698,7 +1700,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1719,7 +1721,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() ); @@ -1753,7 +1755,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() ); @@ -1808,7 +1810,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() ); @@ -1843,7 +1845,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateConnectionProfileRequest() ); @@ -1877,7 +1879,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1900,7 +1902,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1921,7 +1923,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() ); @@ -1954,7 +1956,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() ); @@ -2008,7 +2010,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() ); @@ -2042,7 +2044,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteConnectionProfileRequest() ); @@ -2075,7 +2077,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2098,7 +2100,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2119,7 +2121,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateStreamRequest() ); @@ -2151,7 +2153,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateStreamRequest() ); @@ -2205,7 +2207,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateStreamRequest() ); @@ -2236,7 +2238,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateStreamRequest() ); @@ -2269,7 +2271,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2291,7 +2293,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2309,7 +2311,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateStreamRequest() ); @@ -2342,7 +2344,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateStreamRequest() ); @@ -2397,7 +2399,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateStreamRequest() ); @@ -2429,7 +2431,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.UpdateStreamRequest() ); @@ -2463,7 +2465,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2485,7 +2487,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2503,7 +2505,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteStreamRequest() ); @@ -2535,7 +2537,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteStreamRequest() ); @@ -2589,7 +2591,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteStreamRequest() ); @@ -2620,7 +2622,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteStreamRequest() ); @@ -2653,7 +2655,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2675,7 +2677,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2693,7 +2695,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.RunStreamRequest() ); @@ -2725,7 +2727,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.RunStreamRequest() ); @@ -2779,7 +2781,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.RunStreamRequest() ); @@ -2810,7 +2812,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.RunStreamRequest() ); @@ -2843,7 +2845,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2865,7 +2867,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2883,7 +2885,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() ); @@ -2916,7 +2918,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() ); @@ -2970,7 +2972,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() ); @@ -3004,7 +3006,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreatePrivateConnectionRequest() ); @@ -3037,7 +3039,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3060,7 +3062,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3081,7 +3083,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() ); @@ -3114,7 +3116,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() ); @@ -3168,7 +3170,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() ); @@ -3202,7 +3204,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeletePrivateConnectionRequest() ); @@ -3235,7 +3237,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3258,7 +3260,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3279,7 +3281,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateRouteRequest() ); @@ -3311,7 +3313,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateRouteRequest() ); @@ -3365,7 +3367,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateRouteRequest() ); @@ -3396,7 +3398,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.CreateRouteRequest() ); @@ -3429,7 +3431,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3451,7 +3453,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3469,7 +3471,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteRouteRequest() ); @@ -3501,7 +3503,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteRouteRequest() ); @@ -3555,7 +3557,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteRouteRequest() ); @@ -3586,7 +3588,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.DeleteRouteRequest() ); @@ -3619,7 +3621,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3641,7 +3643,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3659,7 +3661,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() ); @@ -3699,7 +3701,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() ); @@ -3756,7 +3758,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() ); @@ -3790,7 +3792,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() ); @@ -3857,7 +3859,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() ); @@ -3913,7 +3915,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() ); @@ -3967,7 +3969,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListConnectionProfilesRequest() ); @@ -4014,7 +4016,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamsRequest() ); @@ -4047,7 +4049,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamsRequest() ); @@ -4096,7 +4098,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamsRequest() ); @@ -4127,7 +4129,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamsRequest() ); @@ -4181,7 +4183,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamsRequest() ); @@ -4232,7 +4234,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamsRequest() ); @@ -4275,7 +4277,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamsRequest() ); @@ -4319,7 +4321,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() ); @@ -4358,7 +4360,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() ); @@ -4413,7 +4415,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() ); @@ -4444,7 +4446,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() ); @@ -4504,7 +4506,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() ); @@ -4553,7 +4555,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() ); @@ -4602,7 +4604,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListStreamObjectsRequest() ); @@ -4644,7 +4646,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() ); @@ -4673,7 +4675,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() ); @@ -4715,7 +4717,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() ); @@ -4746,7 +4748,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() ); @@ -4793,7 +4795,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() ); @@ -4839,7 +4841,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() ); @@ -4878,7 +4880,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.FetchStaticIpsRequest() ); @@ -4920,7 +4922,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() ); @@ -4960,7 +4962,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() ); @@ -5017,7 +5019,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() ); @@ -5051,7 +5053,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() ); @@ -5118,7 +5120,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() ); @@ -5174,7 +5176,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() ); @@ -5228,7 +5230,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListPrivateConnectionsRequest() ); @@ -5275,7 +5277,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListRoutesRequest() ); @@ -5308,7 +5310,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListRoutesRequest() ); @@ -5357,7 +5359,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListRoutesRequest() ); @@ -5388,7 +5390,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListRoutesRequest() ); @@ -5442,7 +5444,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListRoutesRequest() ); @@ -5493,7 +5495,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListRoutesRequest() ); @@ -5536,7 +5538,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1.ListRoutesRequest() ); @@ -5579,7 +5581,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5609,7 +5611,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5653,7 +5655,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5685,7 +5687,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5715,7 +5717,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5759,7 +5761,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5791,7 +5793,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5824,7 +5826,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5868,7 +5870,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5903,7 +5905,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5933,7 +5935,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5977,7 +5979,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -6012,7 +6014,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6060,7 +6062,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6101,7 +6103,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -6180,7 +6182,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -6260,7 +6262,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -6356,8 +6358,7 @@ describe('v1.DatastreamClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -6376,7 +6377,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -6385,8 +6386,7 @@ describe('v1.DatastreamClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -6402,7 +6402,7 @@ describe('v1.DatastreamClient', () => { }); describe('Path templates', () => { - describe('connectionProfile', () => { + describe('connectionProfile', async () => { const fakePath = '/rendered/path/connectionProfile'; const expectedParameters = { project: 'projectValue', @@ -6413,7 +6413,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6479,7 +6479,7 @@ describe('v1.DatastreamClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -6489,7 +6489,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6528,7 +6528,7 @@ describe('v1.DatastreamClient', () => { }); }); - describe('privateConnection', () => { + describe('privateConnection', async () => { const fakePath = '/rendered/path/privateConnection'; const expectedParameters = { project: 'projectValue', @@ -6539,7 +6539,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.privateConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6605,7 +6605,7 @@ describe('v1.DatastreamClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -6614,7 +6614,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6643,7 +6643,7 @@ describe('v1.DatastreamClient', () => { }); }); - describe('route', () => { + describe('route', async () => { const fakePath = '/rendered/path/route'; const expectedParameters = { project: 'projectValue', @@ -6655,7 +6655,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.routePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6719,7 +6719,7 @@ describe('v1.DatastreamClient', () => { }); }); - describe('stream', () => { + describe('stream', async () => { const fakePath = '/rendered/path/stream'; const expectedParameters = { project: 'projectValue', @@ -6730,7 +6730,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.streamPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6783,7 +6783,7 @@ describe('v1.DatastreamClient', () => { }); }); - describe('streamObject', () => { + describe('streamObject', async () => { const fakePath = '/rendered/path/streamObject'; const expectedParameters = { project: 'projectValue', @@ -6795,7 +6795,7 @@ describe('v1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.streamObjectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-datastream/test/gapic_datastream_v1alpha1.ts b/packages/google-cloud-datastream/test/gapic_datastream_v1alpha1.ts index b63d713375c..c87dbdfebd0 100644 --- a/packages/google-cloud-datastream/test/gapic_datastream_v1alpha1.ts +++ b/packages/google-cloud-datastream/test/gapic_datastream_v1alpha1.ts @@ -284,7 +284,9 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.datastreamStub); client.close().then(() => { done(); @@ -343,7 +345,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() ); @@ -375,7 +377,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() ); @@ -422,7 +424,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() ); @@ -453,7 +455,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetConnectionProfileRequest() ); @@ -474,7 +476,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() ); @@ -506,7 +508,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() ); @@ -553,7 +555,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() ); @@ -587,7 +589,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest() ); @@ -611,7 +613,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() ); @@ -642,7 +644,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() ); @@ -689,7 +691,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() ); @@ -717,7 +719,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetStreamRequest() ); @@ -738,7 +740,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() ); @@ -770,7 +772,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() ); @@ -817,7 +819,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() ); @@ -848,7 +850,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest() ); @@ -869,7 +871,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() ); @@ -900,7 +902,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() ); @@ -947,7 +949,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() ); @@ -975,7 +977,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.GetRouteRequest() ); @@ -996,7 +998,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() ); @@ -1029,7 +1031,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() ); @@ -1083,7 +1085,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() ); @@ -1117,7 +1119,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest() ); @@ -1150,7 +1152,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1173,7 +1175,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1194,7 +1196,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() ); @@ -1228,7 +1230,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() ); @@ -1283,7 +1285,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() ); @@ -1318,7 +1320,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest() ); @@ -1352,7 +1354,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1375,7 +1377,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1396,7 +1398,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() ); @@ -1429,7 +1431,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() ); @@ -1483,7 +1485,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() ); @@ -1517,7 +1519,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest() ); @@ -1550,7 +1552,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1573,7 +1575,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1594,7 +1596,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() ); @@ -1626,7 +1628,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() ); @@ -1680,7 +1682,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() ); @@ -1711,7 +1713,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateStreamRequest() ); @@ -1744,7 +1746,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1766,7 +1768,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1784,7 +1786,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() ); @@ -1817,7 +1819,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() ); @@ -1872,7 +1874,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() ); @@ -1904,7 +1906,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.UpdateStreamRequest() ); @@ -1938,7 +1940,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1960,7 +1962,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1978,7 +1980,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() ); @@ -2010,7 +2012,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() ); @@ -2064,7 +2066,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() ); @@ -2095,7 +2097,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteStreamRequest() ); @@ -2128,7 +2130,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2150,7 +2152,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2168,7 +2170,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() ); @@ -2200,7 +2202,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() ); @@ -2254,7 +2256,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() ); @@ -2285,7 +2287,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchErrorsRequest() ); @@ -2318,7 +2320,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2340,7 +2342,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2358,7 +2360,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() ); @@ -2391,7 +2393,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() ); @@ -2445,7 +2447,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() ); @@ -2479,7 +2481,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest() ); @@ -2512,7 +2514,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2535,7 +2537,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2556,7 +2558,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() ); @@ -2589,7 +2591,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() ); @@ -2643,7 +2645,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() ); @@ -2677,7 +2679,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest() ); @@ -2710,7 +2712,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2733,7 +2735,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2754,7 +2756,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() ); @@ -2786,7 +2788,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() ); @@ -2840,7 +2842,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() ); @@ -2871,7 +2873,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.CreateRouteRequest() ); @@ -2904,7 +2906,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2926,7 +2928,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2944,7 +2946,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() ); @@ -2976,7 +2978,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() ); @@ -3030,7 +3032,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() ); @@ -3061,7 +3063,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.DeleteRouteRequest() ); @@ -3094,7 +3096,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3116,7 +3118,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3134,7 +3136,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() ); @@ -3174,7 +3176,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() ); @@ -3231,7 +3233,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() ); @@ -3265,7 +3267,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() ); @@ -3334,7 +3336,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() ); @@ -3392,7 +3394,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() ); @@ -3446,7 +3448,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest() ); @@ -3493,7 +3495,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() ); @@ -3532,7 +3534,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() ); @@ -3587,7 +3589,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() ); @@ -3618,7 +3620,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() ); @@ -3678,7 +3680,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() ); @@ -3729,7 +3731,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() ); @@ -3778,7 +3780,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListStreamsRequest() ); @@ -3822,7 +3824,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() ); @@ -3851,7 +3853,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() ); @@ -3893,7 +3895,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() ); @@ -3924,7 +3926,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() ); @@ -3971,7 +3973,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() ); @@ -4017,7 +4019,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() ); @@ -4056,7 +4058,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.FetchStaticIpsRequest() ); @@ -4098,7 +4100,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() ); @@ -4138,7 +4140,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() ); @@ -4195,7 +4197,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() ); @@ -4229,7 +4231,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() ); @@ -4298,7 +4300,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() ); @@ -4356,7 +4358,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() ); @@ -4410,7 +4412,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest() ); @@ -4457,7 +4459,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() ); @@ -4496,7 +4498,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() ); @@ -4551,7 +4553,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() ); @@ -4582,7 +4584,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() ); @@ -4642,7 +4644,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() ); @@ -4693,7 +4695,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() ); @@ -4742,7 +4744,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.datastream.v1alpha1.ListRoutesRequest() ); @@ -4781,7 +4783,7 @@ describe('v1alpha1.DatastreamClient', () => { }); describe('Path templates', () => { - describe('connectionProfile', () => { + describe('connectionProfile', async () => { const fakePath = '/rendered/path/connectionProfile'; const expectedParameters = { project: 'projectValue', @@ -4792,7 +4794,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4858,7 +4860,7 @@ describe('v1alpha1.DatastreamClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4868,7 +4870,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4907,7 +4909,7 @@ describe('v1alpha1.DatastreamClient', () => { }); }); - describe('privateConnection', () => { + describe('privateConnection', async () => { const fakePath = '/rendered/path/privateConnection'; const expectedParameters = { project: 'projectValue', @@ -4918,7 +4920,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.privateConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4984,7 +4986,7 @@ describe('v1alpha1.DatastreamClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4993,7 +4995,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5022,7 +5024,7 @@ describe('v1alpha1.DatastreamClient', () => { }); }); - describe('route', () => { + describe('route', async () => { const fakePath = '/rendered/path/route'; const expectedParameters = { project: 'projectValue', @@ -5034,7 +5036,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.routePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5098,7 +5100,7 @@ describe('v1alpha1.DatastreamClient', () => { }); }); - describe('stream', () => { + describe('stream', async () => { const fakePath = '/rendered/path/stream'; const expectedParameters = { project: 'projectValue', @@ -5109,7 +5111,7 @@ describe('v1alpha1.DatastreamClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.streamPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index 8da53f8d7b7..4d900119f47 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 539e41794f5..1bb490a0897 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "4.4.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json index 045e043db50..4b14fb1a106 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "4.4.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index ff83f3b4c80..ba124374a1b 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -926,7 +926,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeliveryPipeline request %j', request); const wrappedCallback: | Callback< @@ -1057,7 +1059,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rollbackTarget request %j', request); const wrappedCallback: | Callback< @@ -1166,7 +1170,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTarget request %j', request); const wrappedCallback: | Callback< @@ -1281,7 +1287,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCustomTargetType request %j', request); const wrappedCallback: | Callback< @@ -1390,7 +1398,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRelease request %j', request); const wrappedCallback: | Callback< @@ -1499,7 +1509,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('abandonRelease request %j', request); const wrappedCallback: | Callback< @@ -1610,7 +1622,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployPolicy request %j', request); const wrappedCallback: | Callback< @@ -1726,7 +1740,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('approveRollout request %j', request); const wrappedCallback: | Callback< @@ -1842,7 +1858,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('advanceRollout request %j', request); const wrappedCallback: | Callback< @@ -1956,7 +1974,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelRollout request %j', request); const wrappedCallback: | Callback< @@ -2065,7 +2085,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRollout request %j', request); const wrappedCallback: | Callback< @@ -2179,7 +2201,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ rollout: request.rollout ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('ignoreJob request %j', request); const wrappedCallback: | Callback< @@ -2293,7 +2317,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ rollout: request.rollout ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retryJob request %j', request); const wrappedCallback: | Callback< @@ -2400,7 +2426,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getJobRun request %j', request); const wrappedCallback: | Callback< @@ -2512,7 +2540,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('terminateJobRun request %j', request); const wrappedCallback: | Callback< @@ -2620,7 +2650,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConfig request %j', request); const wrappedCallback: | Callback< @@ -2729,7 +2761,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAutomation request %j', request); const wrappedCallback: | Callback< @@ -2840,7 +2874,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAutomationRun request %j', request); const wrappedCallback: | Callback< @@ -2960,7 +2996,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('cancelAutomationRun request %j', request); const wrappedCallback: | Callback< @@ -3111,7 +3149,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3304,7 +3344,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ 'delivery_pipeline.name': request.deliveryPipeline!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3500,7 +3542,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3690,7 +3734,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3883,7 +3929,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ 'target.name': request.target!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4075,7 +4123,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4264,7 +4314,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4457,7 +4509,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ 'custom_target_type.name': request.customTargetType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4649,7 +4703,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4842,7 +4898,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5031,7 +5089,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5224,7 +5284,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ 'deploy_policy.name': request.deployPolicy!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5416,7 +5478,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5612,7 +5676,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5802,7 +5868,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5995,7 +6063,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ 'automation.name': request.automation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6188,7 +6258,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -6363,7 +6435,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, @@ -6441,7 +6515,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listDeliveryPipelines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeliveryPipelines stream %j', request); return this.descriptors.page.listDeliveryPipelines.createStream( this.innerApiCalls.listDeliveryPipelines as GaxCall, @@ -6501,7 +6577,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listDeliveryPipelines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeliveryPipelines iterate %j', request); return this.descriptors.page.listDeliveryPipelines.asyncIterate( this.innerApiCalls['listDeliveryPipelines'] as GaxCall, @@ -6609,7 +6687,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListTargetsRequest, @@ -6686,7 +6766,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listTargets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargets stream %j', request); return this.descriptors.page.listTargets.createStream( this.innerApiCalls.listTargets as GaxCall, @@ -6747,7 +6829,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listTargets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargets iterate %j', request); return this.descriptors.page.listTargets.asyncIterate( this.innerApiCalls['listTargets'] as GaxCall, @@ -6863,7 +6947,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListCustomTargetTypesRequest, @@ -6942,7 +7028,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listCustomTargetTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomTargetTypes stream %j', request); return this.descriptors.page.listCustomTargetTypes.createStream( this.innerApiCalls.listCustomTargetTypes as GaxCall, @@ -7003,7 +7091,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listCustomTargetTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomTargetTypes iterate %j', request); return this.descriptors.page.listCustomTargetTypes.asyncIterate( this.innerApiCalls['listCustomTargetTypes'] as GaxCall, @@ -7113,7 +7203,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListReleasesRequest, @@ -7192,7 +7284,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listReleases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReleases stream %j', request); return this.descriptors.page.listReleases.createStream( this.innerApiCalls.listReleases as GaxCall, @@ -7253,7 +7347,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listReleases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listReleases iterate %j', request); return this.descriptors.page.listReleases.asyncIterate( this.innerApiCalls['listReleases'] as GaxCall, @@ -7368,7 +7464,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListDeployPoliciesRequest, @@ -7446,7 +7544,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listDeployPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployPolicies stream %j', request); return this.descriptors.page.listDeployPolicies.createStream( this.innerApiCalls.listDeployPolicies as GaxCall, @@ -7506,7 +7606,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listDeployPolicies']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployPolicies iterate %j', request); return this.descriptors.page.listDeployPolicies.asyncIterate( this.innerApiCalls['listDeployPolicies'] as GaxCall, @@ -7615,7 +7717,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListRolloutsRequest, @@ -7693,7 +7797,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listRollouts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRollouts stream %j', request); return this.descriptors.page.listRollouts.createStream( this.innerApiCalls.listRollouts as GaxCall, @@ -7753,7 +7859,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listRollouts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRollouts iterate %j', request); return this.descriptors.page.listRollouts.asyncIterate( this.innerApiCalls['listRollouts'] as GaxCall, @@ -7860,7 +7968,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListJobRunsRequest, @@ -7936,7 +8046,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listJobRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobRuns stream %j', request); return this.descriptors.page.listJobRuns.createStream( this.innerApiCalls.listJobRuns as GaxCall, @@ -7996,7 +8108,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listJobRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listJobRuns iterate %j', request); return this.descriptors.page.listJobRuns.asyncIterate( this.innerApiCalls['listJobRuns'] as GaxCall, @@ -8106,7 +8220,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListAutomationsRequest, @@ -8185,7 +8301,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listAutomations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutomations stream %j', request); return this.descriptors.page.listAutomations.createStream( this.innerApiCalls.listAutomations as GaxCall, @@ -8246,7 +8364,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listAutomations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutomations iterate %j', request); return this.descriptors.page.listAutomations.asyncIterate( this.innerApiCalls['listAutomations'] as GaxCall, @@ -8362,7 +8482,9 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.deploy.v1.IListAutomationRunsRequest, @@ -8441,7 +8563,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listAutomationRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutomationRuns stream %j', request); return this.descriptors.page.listAutomationRuns.createStream( this.innerApiCalls.listAutomationRuns as GaxCall, @@ -8502,7 +8626,9 @@ export class CloudDeployClient { }); const defaultCallSettings = this._defaults['listAutomationRuns']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAutomationRuns iterate %j', request); return this.descriptors.page.listAutomationRuns.asyncIterate( this.innerApiCalls['listAutomationRuns'] as GaxCall, @@ -8820,7 +8946,7 @@ export class CloudDeployClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index 0c2052e22c7..deef3c9996d 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -288,7 +288,9 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudDeployStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); @@ -379,7 +381,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); @@ -426,7 +428,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); @@ -457,7 +459,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() ); @@ -478,7 +480,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RollbackTargetRequest() ); @@ -509,7 +511,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RollbackTargetRequest() ); @@ -556,7 +558,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RollbackTargetRequest() ); @@ -587,7 +589,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RollbackTargetRequest() ); @@ -608,7 +610,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); @@ -639,7 +641,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); @@ -686,7 +688,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); @@ -714,7 +716,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetTargetRequest() ); @@ -735,7 +737,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetCustomTargetTypeRequest() ); @@ -767,7 +769,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetCustomTargetTypeRequest() ); @@ -814,7 +816,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetCustomTargetTypeRequest() ); @@ -845,7 +847,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetCustomTargetTypeRequest() ); @@ -866,7 +868,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); @@ -897,7 +899,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); @@ -944,7 +946,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); @@ -975,7 +977,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetReleaseRequest() ); @@ -996,7 +998,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AbandonReleaseRequest() ); @@ -1027,7 +1029,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AbandonReleaseRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AbandonReleaseRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AbandonReleaseRequest() ); @@ -1126,7 +1128,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeployPolicyRequest() ); @@ -1157,7 +1159,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeployPolicyRequest() ); @@ -1204,7 +1206,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeployPolicyRequest() ); @@ -1235,7 +1237,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetDeployPolicyRequest() ); @@ -1256,7 +1258,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); @@ -1287,7 +1289,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); @@ -1334,7 +1336,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ApproveRolloutRequest() ); @@ -1386,7 +1388,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() ); @@ -1417,7 +1419,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() ); @@ -1464,7 +1466,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() ); @@ -1495,7 +1497,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() ); @@ -1516,7 +1518,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelRolloutRequest() ); @@ -1547,7 +1549,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelRolloutRequest() ); @@ -1594,7 +1596,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelRolloutRequest() ); @@ -1625,7 +1627,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelRolloutRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); @@ -1677,7 +1679,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); @@ -1724,7 +1726,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); @@ -1755,7 +1757,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetRolloutRequest() ); @@ -1776,7 +1778,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.IgnoreJobRequest() ); @@ -1807,7 +1809,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.IgnoreJobRequest() ); @@ -1854,7 +1856,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.IgnoreJobRequest() ); @@ -1882,7 +1884,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.IgnoreJobRequest() ); @@ -1903,7 +1905,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RetryJobRequest() ); @@ -1934,7 +1936,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RetryJobRequest() ); @@ -1981,7 +1983,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RetryJobRequest() ); @@ -2009,7 +2011,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.RetryJobRequest() ); @@ -2030,7 +2032,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetJobRunRequest() ); @@ -2061,7 +2063,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetJobRunRequest() ); @@ -2108,7 +2110,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetJobRunRequest() ); @@ -2136,7 +2138,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetJobRunRequest() ); @@ -2157,7 +2159,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.TerminateJobRunRequest() ); @@ -2188,7 +2190,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.TerminateJobRunRequest() ); @@ -2235,7 +2237,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.TerminateJobRunRequest() ); @@ -2266,7 +2268,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.TerminateJobRunRequest() ); @@ -2287,7 +2289,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); @@ -2318,7 +2320,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); @@ -2365,7 +2367,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); @@ -2393,7 +2395,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetConfigRequest() ); @@ -2414,7 +2416,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRequest() ); @@ -2445,7 +2447,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRequest() ); @@ -2492,7 +2494,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRequest() ); @@ -2523,7 +2525,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRequest() ); @@ -2544,7 +2546,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); @@ -2575,7 +2577,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); @@ -2622,7 +2624,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); @@ -2653,7 +2655,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); @@ -2674,7 +2676,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() ); @@ -2706,7 +2708,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() ); @@ -2753,7 +2755,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() ); @@ -2784,7 +2786,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() ); @@ -2805,7 +2807,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); @@ -2838,7 +2840,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); @@ -2892,7 +2894,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); @@ -2926,7 +2928,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); @@ -2959,7 +2961,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2981,7 +2983,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3002,7 +3004,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); @@ -3036,7 +3038,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); @@ -3091,7 +3093,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); @@ -3126,7 +3128,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); @@ -3160,7 +3162,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3182,7 +3184,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3203,7 +3205,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); @@ -3236,7 +3238,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); @@ -3290,7 +3292,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); @@ -3324,7 +3326,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); @@ -3357,7 +3359,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3379,7 +3381,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3400,7 +3402,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); @@ -3432,7 +3434,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); @@ -3486,7 +3488,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); @@ -3517,7 +3519,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateTargetRequest() ); @@ -3550,7 +3552,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3572,7 +3574,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3590,7 +3592,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); @@ -3623,7 +3625,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); @@ -3678,7 +3680,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); @@ -3710,7 +3712,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); @@ -3744,7 +3746,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3766,7 +3768,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3784,7 +3786,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); @@ -3816,7 +3818,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); @@ -3870,7 +3872,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); @@ -3901,7 +3903,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); @@ -3934,7 +3936,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3956,7 +3958,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3974,7 +3976,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateCustomTargetTypeRequest() ); @@ -4007,7 +4009,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateCustomTargetTypeRequest() ); @@ -4061,7 +4063,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateCustomTargetTypeRequest() ); @@ -4095,7 +4097,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateCustomTargetTypeRequest() ); @@ -4128,7 +4130,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4150,7 +4152,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4171,7 +4173,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateCustomTargetTypeRequest() ); @@ -4205,7 +4207,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateCustomTargetTypeRequest() ); @@ -4260,7 +4262,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateCustomTargetTypeRequest() ); @@ -4295,7 +4297,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateCustomTargetTypeRequest() ); @@ -4329,7 +4331,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4351,7 +4353,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4372,7 +4374,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteCustomTargetTypeRequest() ); @@ -4405,7 +4407,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteCustomTargetTypeRequest() ); @@ -4459,7 +4461,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteCustomTargetTypeRequest() ); @@ -4493,7 +4495,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteCustomTargetTypeRequest() ); @@ -4526,7 +4528,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4548,7 +4550,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4569,7 +4571,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); @@ -4602,7 +4604,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); @@ -4656,7 +4658,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); @@ -4687,7 +4689,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); @@ -4720,7 +4722,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4742,7 +4744,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4763,7 +4765,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeployPolicyRequest() ); @@ -4796,7 +4798,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeployPolicyRequest() ); @@ -4850,7 +4852,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeployPolicyRequest() ); @@ -4881,7 +4883,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateDeployPolicyRequest() ); @@ -4914,7 +4916,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4936,7 +4938,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4957,7 +4959,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeployPolicyRequest() ); @@ -4991,7 +4993,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeployPolicyRequest() ); @@ -5046,7 +5048,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeployPolicyRequest() ); @@ -5078,7 +5080,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateDeployPolicyRequest() ); @@ -5112,7 +5114,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5134,7 +5136,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5155,7 +5157,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeployPolicyRequest() ); @@ -5188,7 +5190,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeployPolicyRequest() ); @@ -5242,7 +5244,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeployPolicyRequest() ); @@ -5273,7 +5275,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteDeployPolicyRequest() ); @@ -5306,7 +5308,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5328,7 +5330,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5349,7 +5351,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); @@ -5382,7 +5384,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); @@ -5436,7 +5438,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); @@ -5467,7 +5469,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateRolloutRequest() ); @@ -5500,7 +5502,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5522,7 +5524,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5543,7 +5545,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateAutomationRequest() ); @@ -5576,7 +5578,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateAutomationRequest() ); @@ -5630,7 +5632,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateAutomationRequest() ); @@ -5661,7 +5663,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.CreateAutomationRequest() ); @@ -5694,7 +5696,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5716,7 +5718,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5737,7 +5739,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateAutomationRequest() ); @@ -5771,7 +5773,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateAutomationRequest() ); @@ -5826,7 +5828,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateAutomationRequest() ); @@ -5858,7 +5860,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.UpdateAutomationRequest() ); @@ -5892,7 +5894,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5914,7 +5916,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5935,7 +5937,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteAutomationRequest() ); @@ -5968,7 +5970,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteAutomationRequest() ); @@ -6022,7 +6024,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteAutomationRequest() ); @@ -6053,7 +6055,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.DeleteAutomationRequest() ); @@ -6086,7 +6088,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -6108,7 +6110,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -6129,7 +6131,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); @@ -6169,7 +6171,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); @@ -6224,7 +6226,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); @@ -6258,7 +6260,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); @@ -6324,7 +6326,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); @@ -6379,7 +6381,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); @@ -6432,7 +6434,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() ); @@ -6478,7 +6480,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); @@ -6511,7 +6513,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); @@ -6560,7 +6562,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); @@ -6591,7 +6593,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); @@ -6642,7 +6644,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); @@ -6690,7 +6692,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); @@ -6733,7 +6735,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListTargetsRequest() ); @@ -6777,7 +6779,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListCustomTargetTypesRequest() ); @@ -6817,7 +6819,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListCustomTargetTypesRequest() ); @@ -6872,7 +6874,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListCustomTargetTypesRequest() ); @@ -6906,7 +6908,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListCustomTargetTypesRequest() ); @@ -6972,7 +6974,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListCustomTargetTypesRequest() ); @@ -7027,7 +7029,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListCustomTargetTypesRequest() ); @@ -7080,7 +7082,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListCustomTargetTypesRequest() ); @@ -7126,7 +7128,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); @@ -7159,7 +7161,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); @@ -7208,7 +7210,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); @@ -7239,7 +7241,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); @@ -7290,7 +7292,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); @@ -7338,7 +7340,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); @@ -7381,7 +7383,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListReleasesRequest() ); @@ -7423,7 +7425,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeployPoliciesRequest() ); @@ -7457,7 +7459,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeployPoliciesRequest() ); @@ -7506,7 +7508,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeployPoliciesRequest() ); @@ -7537,7 +7539,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeployPoliciesRequest() ); @@ -7591,7 +7593,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeployPoliciesRequest() ); @@ -7640,7 +7642,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeployPoliciesRequest() ); @@ -7683,7 +7685,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListDeployPoliciesRequest() ); @@ -7725,7 +7727,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); @@ -7758,7 +7760,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); @@ -7807,7 +7809,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); @@ -7838,7 +7840,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); @@ -7889,7 +7891,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); @@ -7937,7 +7939,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); @@ -7980,7 +7982,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); @@ -8022,7 +8024,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); @@ -8055,7 +8057,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); @@ -8104,7 +8106,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); @@ -8135,7 +8137,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); @@ -8186,7 +8188,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); @@ -8234,7 +8236,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); @@ -8277,7 +8279,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); @@ -8321,7 +8323,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); @@ -8354,7 +8356,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); @@ -8403,7 +8405,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); @@ -8434,7 +8436,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); @@ -8488,7 +8490,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); @@ -8537,7 +8539,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); @@ -8580,7 +8582,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); @@ -8622,7 +8624,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); @@ -8662,7 +8664,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); @@ -8717,7 +8719,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); @@ -8748,7 +8750,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); @@ -8808,7 +8810,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); @@ -8857,7 +8859,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); @@ -8906,7 +8908,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); @@ -8947,7 +8949,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8977,7 +8979,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9021,7 +9023,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -9053,7 +9055,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9083,7 +9085,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9127,7 +9129,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -9159,7 +9161,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9192,7 +9194,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9236,7 +9238,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -9271,7 +9273,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9301,7 +9303,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9345,7 +9347,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -9380,7 +9382,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9428,7 +9430,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -9469,7 +9471,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -9548,7 +9550,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -9628,7 +9630,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -9724,8 +9726,7 @@ describe('v1.CloudDeployClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -9744,7 +9745,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -9753,8 +9754,7 @@ describe('v1.CloudDeployClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -9770,7 +9770,7 @@ describe('v1.CloudDeployClient', () => { }); describe('Path templates', () => { - describe('automation', () => { + describe('automation', async () => { const fakePath = '/rendered/path/automation'; const expectedParameters = { project: 'projectValue', @@ -9782,7 +9782,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9846,7 +9846,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('automationRun', () => { + describe('automationRun', async () => { const fakePath = '/rendered/path/automationRun'; const expectedParameters = { project: 'projectValue', @@ -9858,7 +9858,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.automationRunPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9923,7 +9923,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('build', () => { + describe('build', async () => { const fakePath = '/rendered/path/build'; const expectedParameters = { project: 'projectValue', @@ -9934,7 +9934,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.buildPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9987,7 +9987,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -9998,7 +9998,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10051,7 +10051,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('config', () => { + describe('config', async () => { const fakePath = '/rendered/path/config'; const expectedParameters = { project: 'projectValue', @@ -10061,7 +10061,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.configPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10100,7 +10100,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('customTargetType', () => { + describe('customTargetType', async () => { const fakePath = '/rendered/path/customTargetType'; const expectedParameters = { project: 'projectValue', @@ -10111,7 +10111,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.customTargetTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10168,7 +10168,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('deliveryPipeline', () => { + describe('deliveryPipeline', async () => { const fakePath = '/rendered/path/deliveryPipeline'; const expectedParameters = { project: 'projectValue', @@ -10179,7 +10179,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deliveryPipelinePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10236,7 +10236,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('deployPolicy', () => { + describe('deployPolicy', async () => { const fakePath = '/rendered/path/deployPolicy'; const expectedParameters = { project: 'projectValue', @@ -10247,7 +10247,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deployPolicyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10300,7 +10300,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('job', () => { + describe('job', async () => { const fakePath = '/rendered/path/job'; const expectedParameters = { project: 'projectValue', @@ -10311,7 +10311,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10364,7 +10364,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('jobRun', () => { + describe('jobRun', async () => { const fakePath = '/rendered/path/jobRun'; const expectedParameters = { project: 'projectValue', @@ -10378,7 +10378,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.jobRunPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10464,7 +10464,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -10474,7 +10474,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10513,7 +10513,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('membership', () => { + describe('membership', async () => { const fakePath = '/rendered/path/membership'; const expectedParameters = { project: 'projectValue', @@ -10524,7 +10524,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.membershipPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10577,7 +10577,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -10586,7 +10586,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10615,7 +10615,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('release', () => { + describe('release', async () => { const fakePath = '/rendered/path/release'; const expectedParameters = { project: 'projectValue', @@ -10627,7 +10627,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.releasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10691,7 +10691,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('rollout', () => { + describe('rollout', async () => { const fakePath = '/rendered/path/rollout'; const expectedParameters = { project: 'projectValue', @@ -10704,7 +10704,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rolloutPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10779,7 +10779,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -10790,7 +10790,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -10843,7 +10843,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('target', () => { + describe('target', async () => { const fakePath = '/rendered/path/target'; const expectedParameters = { project: 'projectValue', @@ -10854,7 +10854,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.targetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -10907,7 +10907,7 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('workerPool', () => { + describe('workerPool', async () => { const fakePath = '/rendered/path/workerPool'; const expectedParameters = { project: 'projectValue', @@ -10918,7 +10918,7 @@ describe('v1.CloudDeployClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workerPoolPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-developerconnect/package.json b/packages/google-cloud-developerconnect/package.json index 718497fa99e..0a0a9bc8993 100644 --- a/packages/google-cloud-developerconnect/package.json +++ b/packages/google-cloud-developerconnect/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-developerconnect/samples/generated/v1/snippet_metadata_google.cloud.developerconnect.v1.json b/packages/google-cloud-developerconnect/samples/generated/v1/snippet_metadata_google.cloud.developerconnect.v1.json index 9178a7a3990..e823a9ef3da 100644 --- a/packages/google-cloud-developerconnect/samples/generated/v1/snippet_metadata_google.cloud.developerconnect.v1.json +++ b/packages/google-cloud-developerconnect/samples/generated/v1/snippet_metadata_google.cloud.developerconnect.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-developerconnect", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-developerconnect/src/v1/developer_connect_client.ts b/packages/google-cloud-developerconnect/src/v1/developer_connect_client.ts index f997c7b2357..5df2cd6b54c 100644 --- a/packages/google-cloud-developerconnect/src/v1/developer_connect_client.ts +++ b/packages/google-cloud-developerconnect/src/v1/developer_connect_client.ts @@ -638,7 +638,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConnection request %j', request); const wrappedCallback: | Callback< @@ -763,7 +765,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGitRepositoryLink request %j', request); const wrappedCallback: | Callback< @@ -889,7 +893,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ git_repository_link: request.gitRepositoryLink ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchReadWriteToken request %j', request); const wrappedCallback: | Callback< @@ -1015,7 +1021,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ git_repository_link: request.gitRepositoryLink ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchReadToken request %j', request); const wrappedCallback: | Callback< @@ -1144,7 +1152,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ connection: request.connection ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchGitHubInstallations request %j', request); const wrappedCallback: | Callback< @@ -1298,7 +1308,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1493,7 +1505,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ 'connection.name': request.connection!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1680,7 +1694,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1874,7 +1890,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2061,7 +2079,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2228,7 +2248,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.developerconnect.v1.IListConnectionsRequest, @@ -2298,7 +2320,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections stream %j', request); return this.descriptors.page.listConnections.createStream( this.innerApiCalls.listConnections as GaxCall, @@ -2350,7 +2374,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['listConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConnections iterate %j', request); return this.descriptors.page.listConnections.asyncIterate( this.innerApiCalls['listConnections'] as GaxCall, @@ -2457,7 +2483,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.developerconnect.v1.IListGitRepositoryLinksRequest, @@ -2527,7 +2555,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['listGitRepositoryLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGitRepositoryLinks stream %j', request); return this.descriptors.page.listGitRepositoryLinks.createStream( this.innerApiCalls.listGitRepositoryLinks as GaxCall, @@ -2579,7 +2609,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['listGitRepositoryLinks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGitRepositoryLinks iterate %j', request); return this.descriptors.page.listGitRepositoryLinks.asyncIterate( this.innerApiCalls['listGitRepositoryLinks'] as GaxCall, @@ -2683,7 +2715,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ connection: request.connection ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.developerconnect.v1.IFetchLinkableGitRepositoriesRequest, @@ -2749,7 +2783,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['fetchLinkableGitRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchLinkableGitRepositories stream %j', request); return this.descriptors.page.fetchLinkableGitRepositories.createStream( this.innerApiCalls.fetchLinkableGitRepositories as GaxCall, @@ -2797,7 +2833,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['fetchLinkableGitRepositories']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchLinkableGitRepositories iterate %j', request); return this.descriptors.page.fetchLinkableGitRepositories.asyncIterate( this.innerApiCalls['fetchLinkableGitRepositories'] as GaxCall, @@ -2902,7 +2940,9 @@ export class DeveloperConnectClient { this._gaxModule.routingHeader.fromParams({ git_repository_link: request.gitRepositoryLink ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.developerconnect.v1.IFetchGitRefsRequest, @@ -2970,7 +3010,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['fetchGitRefs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchGitRefs stream %j', request); return this.descriptors.page.fetchGitRefs.createStream( this.innerApiCalls.fetchGitRefs as GaxCall, @@ -3020,7 +3062,9 @@ export class DeveloperConnectClient { }); const defaultCallSettings = this._defaults['fetchGitRefs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchGitRefs iterate %j', request); return this.descriptors.page.fetchGitRefs.asyncIterate( this.innerApiCalls['fetchGitRefs'] as GaxCall, @@ -3200,7 +3244,7 @@ export class DeveloperConnectClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-developerconnect/test/gapic_developer_connect_v1.ts b/packages/google-cloud-developerconnect/test/gapic_developer_connect_v1.ts index 8adbe1cda0b..899a476b863 100644 --- a/packages/google-cloud-developerconnect/test/gapic_developer_connect_v1.ts +++ b/packages/google-cloud-developerconnect/test/gapic_developer_connect_v1.ts @@ -292,7 +292,9 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.developerConnectStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetConnectionRequest() ); @@ -382,7 +384,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetConnectionRequest() ); @@ -429,7 +431,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetConnectionRequest() ); @@ -460,7 +462,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetConnectionRequest() ); @@ -481,7 +483,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest() ); @@ -513,7 +515,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest() ); @@ -560,7 +562,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest() ); @@ -591,7 +593,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest() ); @@ -612,7 +614,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest() ); @@ -644,7 +646,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest() ); @@ -691,7 +693,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest() ); @@ -722,7 +724,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest() ); @@ -743,7 +745,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadTokenRequest() ); @@ -774,7 +776,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadTokenRequest() ); @@ -821,7 +823,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadTokenRequest() ); @@ -852,7 +854,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchReadTokenRequest() ); @@ -873,7 +875,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest() ); @@ -905,7 +907,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest() ); @@ -952,7 +954,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest() ); @@ -986,7 +988,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest() ); @@ -1010,7 +1012,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateConnectionRequest() ); @@ -1043,7 +1045,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateConnectionRequest() ); @@ -1097,7 +1099,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateConnectionRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateConnectionRequest() ); @@ -1161,7 +1163,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1183,7 +1185,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1204,7 +1206,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.UpdateConnectionRequest() ); @@ -1238,7 +1240,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.UpdateConnectionRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.UpdateConnectionRequest() ); @@ -1325,7 +1327,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.UpdateConnectionRequest() ); @@ -1359,7 +1361,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1381,7 +1383,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1402,7 +1404,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteConnectionRequest() ); @@ -1435,7 +1437,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteConnectionRequest() ); @@ -1489,7 +1491,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteConnectionRequest() ); @@ -1520,7 +1522,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteConnectionRequest() ); @@ -1553,7 +1555,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1575,7 +1577,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1596,7 +1598,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest() ); @@ -1629,7 +1631,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest() ); @@ -1683,7 +1685,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest() ); @@ -1717,7 +1719,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest() ); @@ -1750,7 +1752,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1773,7 +1775,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1794,7 +1796,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest() ); @@ -1827,7 +1829,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest() ); @@ -1881,7 +1883,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest() ); @@ -1915,7 +1917,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest() ); @@ -1948,7 +1950,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1971,7 +1973,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1992,7 +1994,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListConnectionsRequest() ); @@ -2031,7 +2033,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListConnectionsRequest() ); @@ -2088,7 +2090,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListConnectionsRequest() ); @@ -2119,7 +2121,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListConnectionsRequest() ); @@ -2180,7 +2182,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListConnectionsRequest() ); @@ -2230,7 +2232,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListConnectionsRequest() ); @@ -2280,7 +2282,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListConnectionsRequest() ); @@ -2323,7 +2325,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest() ); @@ -2363,7 +2365,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest() ); @@ -2420,7 +2422,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest() ); @@ -2454,7 +2456,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest() ); @@ -2523,7 +2525,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest() ); @@ -2581,7 +2583,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest() ); @@ -2635,7 +2637,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest() ); @@ -2682,7 +2684,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest() ); @@ -2722,7 +2724,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest() ); @@ -2779,7 +2781,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest() ); @@ -2813,7 +2815,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest() ); @@ -2885,7 +2887,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest() ); @@ -2946,7 +2948,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest() ); @@ -3000,7 +3002,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest() ); @@ -3047,7 +3049,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitRefsRequest() ); @@ -3076,7 +3078,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitRefsRequest() ); @@ -3118,7 +3120,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitRefsRequest() ); @@ -3149,7 +3151,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitRefsRequest() ); @@ -3196,7 +3198,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitRefsRequest() ); @@ -3244,7 +3246,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitRefsRequest() ); @@ -3283,7 +3285,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.developerconnect.v1.FetchGitRefsRequest() ); @@ -3324,7 +3326,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3354,7 +3356,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3398,7 +3400,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3433,7 +3435,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3481,7 +3483,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3522,7 +3524,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3601,7 +3603,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3681,7 +3683,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3777,8 +3779,7 @@ describe('v1.DeveloperConnectClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3797,7 +3798,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3806,8 +3807,7 @@ describe('v1.DeveloperConnectClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3823,7 +3823,7 @@ describe('v1.DeveloperConnectClient', () => { }); describe('Path templates', () => { - describe('connection', () => { + describe('connection', async () => { const fakePath = '/rendered/path/connection'; const expectedParameters = { project: 'projectValue', @@ -3834,7 +3834,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3887,7 +3887,7 @@ describe('v1.DeveloperConnectClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -3899,7 +3899,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3963,7 +3963,7 @@ describe('v1.DeveloperConnectClient', () => { }); }); - describe('gitRepositoryLink', () => { + describe('gitRepositoryLink', async () => { const fakePath = '/rendered/path/gitRepositoryLink'; const expectedParameters = { project: 'projectValue', @@ -3975,7 +3975,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.gitRepositoryLinkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4056,7 +4056,7 @@ describe('v1.DeveloperConnectClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4066,7 +4066,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4105,7 +4105,7 @@ describe('v1.DeveloperConnectClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4114,7 +4114,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4143,7 +4143,7 @@ describe('v1.DeveloperConnectClient', () => { }); }); - describe('secretVersion', () => { + describe('secretVersion', async () => { const fakePath = '/rendered/path/secretVersion'; const expectedParameters = { project: 'projectValue', @@ -4154,7 +4154,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.secretVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4207,7 +4207,7 @@ describe('v1.DeveloperConnectClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -4219,7 +4219,7 @@ describe('v1.DeveloperConnectClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json index 05db517fb4a..a91a7b2b7d3 100644 --- a/packages/google-cloud-dialogflow-cx/package.json +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -56,7 +56,7 @@ "test": "c8 node build/test/run.js" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 5d2c8e7394c..0a5a5b4b510 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "4.10.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json index 101a0290a1e..994449b97a4 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "4.10.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 31d826342d0..00a52c63b5a 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "4.10.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json index bb29cdbe4d0..395f8ceef02 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "4.10.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts index c8ba8f81ce3..6c8f008ccbe 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts @@ -638,7 +638,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAgent request %j', request); const wrappedCallback: | Callback< @@ -761,7 +763,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAgent request %j', request); const wrappedCallback: | Callback< @@ -884,7 +888,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ 'agent.name': request.agent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAgent request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1007,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAgent request %j', request); const wrappedCallback: | Callback< @@ -1122,7 +1130,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validateAgent request %j', request); const wrappedCallback: | Callback< @@ -1252,7 +1262,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAgentValidationResult request %j', request); const wrappedCallback: | Callback< @@ -1380,7 +1392,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerativeSettings request %j', request); const wrappedCallback: | Callback< @@ -1508,7 +1522,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ 'generative_settings.name': request.generativeSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerativeSettings request %j', request); const wrappedCallback: | Callback< @@ -1672,7 +1688,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1872,7 +1890,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2033,7 +2053,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListAgentsRequest, @@ -2100,7 +2122,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['listAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAgents stream %j', request); return this.descriptors.page.listAgents.createStream( this.innerApiCalls.listAgents as GaxCall, @@ -2149,7 +2173,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['listAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAgents iterate %j', request); return this.descriptors.page.listAgents.asyncIterate( this.innerApiCalls['listAgents'] as GaxCall, @@ -2329,7 +2355,7 @@ export class AgentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts index 227973a6272..04ce7a18992 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts @@ -606,7 +606,9 @@ export class ChangelogsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChangelog request %j', request); const wrappedCallback: | Callback< @@ -753,7 +755,9 @@ export class ChangelogsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListChangelogsRequest, @@ -841,7 +845,9 @@ export class ChangelogsClient { }); const defaultCallSettings = this._defaults['listChangelogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChangelogs stream %j', request); return this.descriptors.page.listChangelogs.createStream( this.innerApiCalls.listChangelogs as GaxCall, @@ -911,7 +917,9 @@ export class ChangelogsClient { }); const defaultCallSettings = this._defaults['listChangelogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChangelogs iterate %j', request); return this.descriptors.page.listChangelogs.asyncIterate( this.innerApiCalls['listChangelogs'] as GaxCall, @@ -1091,7 +1099,7 @@ export class ChangelogsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts index 5a2a1db899a..2cf7091e5fc 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts @@ -607,7 +607,9 @@ export class DeploymentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployment request %j', request); const wrappedCallback: | Callback< @@ -738,7 +740,9 @@ export class DeploymentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListDeploymentsRequest, @@ -806,7 +810,9 @@ export class DeploymentsClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments stream %j', request); return this.descriptors.page.listDeployments.createStream( this.innerApiCalls.listDeployments as GaxCall, @@ -856,7 +862,9 @@ export class DeploymentsClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments iterate %j', request); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, @@ -1036,7 +1044,7 @@ export class DeploymentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts index 47cb69da6d7..f653b44c8ac 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client.ts @@ -654,7 +654,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntityType request %j', request); const wrappedCallback: | Callback< @@ -792,7 +794,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEntityType request %j', request); const wrappedCallback: | Callback< @@ -929,7 +933,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'entity_type.name': request.entityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEntityType request %j', request); const wrappedCallback: | Callback< @@ -1067,7 +1073,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEntityType request %j', request); const wrappedCallback: | Callback< @@ -1233,7 +1241,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1424,7 +1434,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1601,7 +1613,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, @@ -1681,7 +1695,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes stream %j', request); return this.descriptors.page.listEntityTypes.createStream( this.innerApiCalls.listEntityTypes as GaxCall, @@ -1743,7 +1759,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes iterate %j', request); return this.descriptors.page.listEntityTypes.asyncIterate( this.innerApiCalls['listEntityTypes'] as GaxCall, @@ -1923,7 +1941,7 @@ export class EntityTypesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts index 1e953f6d102..69bd51f4440 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts @@ -677,7 +677,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -805,7 +807,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEnvironment request %j', request); const wrappedCallback: | Callback< @@ -950,7 +954,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1128,7 +1134,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ 'environment.name': request.environment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1306,7 +1314,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1489,7 +1499,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1655,7 +1667,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListEnvironmentsRequest, @@ -1723,7 +1737,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -1773,7 +1789,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -1879,7 +1897,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.ILookupEnvironmentHistoryRequest, @@ -1947,7 +1967,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['lookupEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupEnvironmentHistory stream %j', request); return this.descriptors.page.lookupEnvironmentHistory.createStream( this.innerApiCalls.lookupEnvironmentHistory as GaxCall, @@ -1997,7 +2019,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['lookupEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupEnvironmentHistory iterate %j', request); return this.descriptors.page.lookupEnvironmentHistory.asyncIterate( this.innerApiCalls['lookupEnvironmentHistory'] as GaxCall, @@ -2102,7 +2126,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListContinuousTestResultsRequest, @@ -2170,7 +2196,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listContinuousTestResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContinuousTestResults stream %j', request); return this.descriptors.page.listContinuousTestResults.createStream( this.innerApiCalls.listContinuousTestResults as GaxCall, @@ -2220,7 +2248,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listContinuousTestResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContinuousTestResults iterate %j', request); return this.descriptors.page.listContinuousTestResults.asyncIterate( this.innerApiCalls['listContinuousTestResults'] as GaxCall, @@ -2400,7 +2430,7 @@ export class EnvironmentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts index c6f9b05d83b..7dfb2551602 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts @@ -615,7 +615,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExperiment request %j', request); const wrappedCallback: | Callback< @@ -739,7 +741,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createExperiment request %j', request); const wrappedCallback: | Callback< @@ -861,7 +865,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ 'experiment.name': request.experiment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateExperiment request %j', request); const wrappedCallback: | Callback< @@ -983,7 +989,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteExperiment request %j', request); const wrappedCallback: | Callback< @@ -1106,7 +1114,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startExperiment request %j', request); const wrappedCallback: | Callback< @@ -1228,7 +1238,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopExperiment request %j', request); const wrappedCallback: | Callback< @@ -1359,7 +1371,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListExperimentsRequest, @@ -1427,7 +1441,9 @@ export class ExperimentsClient { }); const defaultCallSettings = this._defaults['listExperiments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExperiments stream %j', request); return this.descriptors.page.listExperiments.createStream( this.innerApiCalls.listExperiments as GaxCall, @@ -1477,7 +1493,9 @@ export class ExperimentsClient { }); const defaultCallSettings = this._defaults['listExperiments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExperiments iterate %j', request); return this.descriptors.page.listExperiments.asyncIterate( this.innerApiCalls['listExperiments'] as GaxCall, @@ -1657,7 +1675,7 @@ export class ExperimentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts index 31500edf14e..88180d7b3ed 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts @@ -673,7 +673,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFlow request %j', request); const wrappedCallback: | Callback< @@ -802,7 +804,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFlow request %j', request); const wrappedCallback: | Callback< @@ -928,7 +932,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFlow request %j', request); const wrappedCallback: | Callback< @@ -1064,7 +1070,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ 'flow.name': request.flow!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFlow request %j', request); const wrappedCallback: | Callback< @@ -1186,7 +1194,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validateFlow request %j', request); const wrappedCallback: | Callback< @@ -1313,7 +1323,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFlowValidationResult request %j', request); const wrappedCallback: | Callback< @@ -1461,7 +1473,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1656,7 +1670,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1850,7 +1866,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2028,7 +2046,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListFlowsRequest, @@ -2109,7 +2129,9 @@ export class FlowsClient { }); const defaultCallSettings = this._defaults['listFlows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFlows stream %j', request); return this.descriptors.page.listFlows.createStream( this.innerApiCalls.listFlows as GaxCall, @@ -2172,7 +2194,9 @@ export class FlowsClient { }); const defaultCallSettings = this._defaults['listFlows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFlows iterate %j', request); return this.descriptors.page.listFlows.asyncIterate( this.innerApiCalls['listFlows'] as GaxCall, @@ -2352,7 +2376,7 @@ export class FlowsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts index 0ee99aefeb9..b7b3933713d 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts @@ -614,7 +614,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerator request %j', request); const wrappedCallback: | Callback< @@ -737,7 +739,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGenerator request %j', request); const wrappedCallback: | Callback< @@ -861,7 +865,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ 'generator.name': request.generator!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerator request %j', request); const wrappedCallback: | Callback< @@ -991,7 +997,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGenerator request %j', request); const wrappedCallback: | Callback< @@ -1122,7 +1130,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, @@ -1191,7 +1201,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators stream %j', request); return this.descriptors.page.listGenerators.createStream( this.innerApiCalls.listGenerators as GaxCall, @@ -1242,7 +1254,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators iterate %j', request); return this.descriptors.page.listGenerators.asyncIterate( this.innerApiCalls['listGenerators'] as GaxCall, @@ -1422,7 +1436,7 @@ export class GeneratorsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts index a66bd695b4f..13f5e9198de 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts @@ -646,7 +646,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIntent request %j', request); const wrappedCallback: | Callback< @@ -779,7 +781,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createIntent request %j', request); const wrappedCallback: | Callback< @@ -912,7 +916,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ 'intent.name': request.intent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIntent request %j', request); const wrappedCallback: | Callback< @@ -1034,7 +1040,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteIntent request %j', request); const wrappedCallback: | Callback< @@ -1187,7 +1195,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1384,7 +1394,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1561,7 +1573,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListIntentsRequest, @@ -1641,7 +1655,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents stream %j', request); return this.descriptors.page.listIntents.createStream( this.innerApiCalls.listIntents as GaxCall, @@ -1703,7 +1719,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents iterate %j', request); return this.descriptors.page.listIntents.asyncIterate( this.innerApiCalls['listIntents'] as GaxCall, @@ -1883,7 +1901,7 @@ export class IntentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts index 3122abfe47f..82ee26c7235 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts @@ -628,7 +628,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPage request %j', request); const wrappedCallback: | Callback< @@ -773,7 +775,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPage request %j', request); const wrappedCallback: | Callback< @@ -917,7 +921,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ 'page.name': request.page!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePage request %j', request); const wrappedCallback: | Callback< @@ -1050,7 +1056,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePage request %j', request); const wrappedCallback: | Callback< @@ -1199,7 +1207,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListPagesRequest, @@ -1289,7 +1299,9 @@ export class PagesClient { }); const defaultCallSettings = this._defaults['listPages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPages stream %j', request); return this.descriptors.page.listPages.createStream( this.innerApiCalls.listPages as GaxCall, @@ -1361,7 +1373,9 @@ export class PagesClient { }); const defaultCallSettings = this._defaults['listPages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPages iterate %j', request); return this.descriptors.page.listPages.asyncIterate( this.innerApiCalls['listPages'] as GaxCall, @@ -1541,7 +1555,7 @@ export class PagesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts index 484aae066ef..038cd934ecc 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/security_settings_service_client.ts @@ -638,7 +638,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -767,7 +769,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -897,7 +901,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ 'security_settings.name': request.securitySettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1032,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -1155,7 +1163,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, @@ -1222,7 +1232,9 @@ export class SecuritySettingsServiceClient { }); const defaultCallSettings = this._defaults['listSecuritySettings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecuritySettings stream %j', request); return this.descriptors.page.listSecuritySettings.createStream( this.innerApiCalls.listSecuritySettings as GaxCall, @@ -1271,7 +1283,9 @@ export class SecuritySettingsServiceClient { }); const defaultCallSettings = this._defaults['listSecuritySettings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecuritySettings iterate %j', request); return this.descriptors.page.listSecuritySettings.asyncIterate( this.innerApiCalls['listSecuritySettings'] as GaxCall, @@ -1451,7 +1465,7 @@ export class SecuritySettingsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts index 35fbdef8ef3..6764659b53b 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/session_entity_types_client.ts @@ -627,7 +627,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -760,7 +762,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -893,7 +897,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'session_entity_type.name': request.sessionEntityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1030,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -1158,7 +1166,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListSessionEntityTypesRequest, @@ -1230,7 +1240,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes stream %j', request); return this.descriptors.page.listSessionEntityTypes.createStream( this.innerApiCalls.listSessionEntityTypes as GaxCall, @@ -1284,7 +1296,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes iterate %j', request); return this.descriptors.page.listSessionEntityTypes.asyncIterate( this.innerApiCalls['listSessionEntityTypes'] as GaxCall, @@ -1464,7 +1478,7 @@ export class SessionEntityTypesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts index 7e332a02034..04be3068b25 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts @@ -665,7 +665,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detectIntent request %j', request); const wrappedCallback: | Callback< @@ -800,7 +802,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('matchIntent request %j', request); const wrappedCallback: | Callback< @@ -928,7 +932,9 @@ export class SessionsClient { 'match_intent_request.session': request.matchIntentRequest!.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fulfillIntent request %j', request); const wrappedCallback: | Callback< @@ -1062,7 +1068,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('submitAnswerFeedback request %j', request); const wrappedCallback: | Callback< @@ -1149,7 +1157,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('serverStreamingDetectIntent stream %j', options); return this.innerApiCalls.serverStreamingDetectIntent(request, options); } @@ -1175,7 +1185,9 @@ export class SessionsClient { * region_tag:dialogflow_v3_generated_Sessions_StreamingDetectIntent_async */ streamingDetectIntent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingDetectIntent stream %j', options); return this.innerApiCalls.streamingDetectIntent(null, options); } @@ -1352,7 +1364,7 @@ export class SessionsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts index 4f133fd4484..37a53d01a99 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/test_cases_client.ts @@ -682,7 +682,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteTestCases request %j', request); const wrappedCallback: | Callback< @@ -803,7 +805,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTestCase request %j', request); const wrappedCallback: | Callback< @@ -922,7 +926,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTestCase request %j', request); const wrappedCallback: | Callback< @@ -1046,7 +1052,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ 'test_case.name': request.testCase!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTestCase request %j', request); const wrappedCallback: | Callback< @@ -1174,7 +1182,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ agent: request.agent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('calculateCoverage request %j', request); const wrappedCallback: | Callback< @@ -1301,7 +1311,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTestCaseResult request %j', request); const wrappedCallback: | Callback< @@ -1447,7 +1459,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1630,7 +1644,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1821,7 +1837,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2024,7 +2042,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2191,7 +2211,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListTestCasesRequest, @@ -2261,7 +2283,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCases stream %j', request); return this.descriptors.page.listTestCases.createStream( this.innerApiCalls.listTestCases as GaxCall, @@ -2313,7 +2337,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCases iterate %j', request); return this.descriptors.page.listTestCases.asyncIterate( this.innerApiCalls['listTestCases'] as GaxCall, @@ -2446,7 +2472,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListTestCaseResultsRequest, @@ -2541,7 +2569,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCaseResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCaseResults stream %j', request); return this.descriptors.page.listTestCaseResults.createStream( this.innerApiCalls.listTestCaseResults as GaxCall, @@ -2618,7 +2648,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCaseResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCaseResults iterate %j', request); return this.descriptors.page.listTestCaseResults.asyncIterate( this.innerApiCalls['listTestCaseResults'] as GaxCall, @@ -2798,7 +2830,7 @@ export class TestCasesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts index 7e22edb1d90..8babd19b2c5 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/transition_route_groups_client.ts @@ -638,7 +638,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -788,7 +790,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -932,7 +936,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ 'transition_route_group.name': request.transitionRouteGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -1075,7 +1081,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -1219,7 +1227,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListTransitionRouteGroupsRequest, @@ -1301,7 +1311,9 @@ export class TransitionRouteGroupsClient { }); const defaultCallSettings = this._defaults['listTransitionRouteGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransitionRouteGroups stream %j', request); return this.descriptors.page.listTransitionRouteGroups.createStream( this.innerApiCalls.listTransitionRouteGroups as GaxCall, @@ -1365,7 +1377,9 @@ export class TransitionRouteGroupsClient { }); const defaultCallSettings = this._defaults['listTransitionRouteGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransitionRouteGroups iterate %j', request); return this.descriptors.page.listTransitionRouteGroups.asyncIterate( this.innerApiCalls['listTransitionRouteGroups'] as GaxCall, @@ -1545,7 +1559,7 @@ export class TransitionRouteGroupsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts index fd056beb01b..6fd2d2c0168 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts @@ -641,7 +641,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -760,7 +762,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ 'version.name': request.version!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateVersion request %j', request); const wrappedCallback: | Callback< @@ -881,7 +885,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteVersion request %j', request); const wrappedCallback: | Callback< @@ -1017,7 +1023,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ base_version: request.baseVersion ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('compareVersions request %j', request); const wrappedCallback: | Callback< @@ -1162,7 +1170,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1345,7 +1355,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1508,7 +1520,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListVersionsRequest, @@ -1576,7 +1590,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -1626,7 +1642,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, @@ -1806,7 +1824,7 @@ export class VersionsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts index bdfb6b55d0d..b202243ced6 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts @@ -619,7 +619,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWebhook request %j', request); const wrappedCallback: | Callback< @@ -738,7 +740,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createWebhook request %j', request); const wrappedCallback: | Callback< @@ -860,7 +864,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ 'webhook.name': request.webhook!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateWebhook request %j', request); const wrappedCallback: | Callback< @@ -992,7 +998,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWebhook request %j', request); const wrappedCallback: | Callback< @@ -1121,7 +1129,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3.IListWebhooksRequest, @@ -1188,7 +1198,9 @@ export class WebhooksClient { }); const defaultCallSettings = this._defaults['listWebhooks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWebhooks stream %j', request); return this.descriptors.page.listWebhooks.createStream( this.innerApiCalls.listWebhooks as GaxCall, @@ -1237,7 +1249,9 @@ export class WebhooksClient { }); const defaultCallSettings = this._defaults['listWebhooks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWebhooks iterate %j', request); return this.descriptors.page.listWebhooks.asyncIterate( this.innerApiCalls['listWebhooks'] as GaxCall, @@ -1417,7 +1431,7 @@ export class WebhooksClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts index be0957ef44b..2a0c27e2ebd 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts @@ -664,7 +664,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAgent request %j', request); const wrappedCallback: | Callback< @@ -790,7 +792,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createAgent request %j', request); const wrappedCallback: | Callback< @@ -916,7 +920,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ 'agent.name': request.agent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAgent request %j', request); const wrappedCallback: | Callback< @@ -1036,7 +1042,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAgent request %j', request); const wrappedCallback: | Callback< @@ -1166,7 +1174,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validateAgent request %j', request); const wrappedCallback: | Callback< @@ -1296,7 +1306,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAgentValidationResult request %j', request); const wrappedCallback: | Callback< @@ -1424,7 +1436,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerativeSettings request %j', request); const wrappedCallback: | Callback< @@ -1552,7 +1566,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ 'generative_settings.name': request.generativeSettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerativeSettings request %j', request); const wrappedCallback: | Callback< @@ -1716,7 +1732,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1916,7 +1934,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2077,7 +2097,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, @@ -2144,7 +2166,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['listAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAgents stream %j', request); return this.descriptors.page.listAgents.createStream( this.innerApiCalls.listAgents as GaxCall, @@ -2193,7 +2217,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['listAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAgents iterate %j', request); return this.descriptors.page.listAgents.asyncIterate( this.innerApiCalls['listAgents'] as GaxCall, @@ -2373,7 +2399,7 @@ export class AgentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts index 685a8bb9194..618ed04d485 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts @@ -581,7 +581,9 @@ export class ChangelogsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChangelog request %j', request); const wrappedCallback: | Callback< @@ -731,7 +733,9 @@ export class ChangelogsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest, @@ -819,7 +823,9 @@ export class ChangelogsClient { }); const defaultCallSettings = this._defaults['listChangelogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChangelogs stream %j', request); return this.descriptors.page.listChangelogs.createStream( this.innerApiCalls.listChangelogs as GaxCall, @@ -889,7 +895,9 @@ export class ChangelogsClient { }); const defaultCallSettings = this._defaults['listChangelogs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChangelogs iterate %j', request); return this.descriptors.page.listChangelogs.asyncIterate( this.innerApiCalls['listChangelogs'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/conversation_history_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/conversation_history_client.ts index 9975d1f57fc..f918e70b1cd 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/conversation_history_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/conversation_history_client.ts @@ -585,7 +585,9 @@ export class ConversationHistoryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversation request %j', request); const wrappedCallback: | Callback< @@ -712,7 +714,9 @@ export class ConversationHistoryClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversation request %j', request); const wrappedCallback: | Callback< @@ -854,7 +858,9 @@ export class ConversationHistoryClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListConversationsRequest, @@ -934,7 +940,9 @@ export class ConversationHistoryClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations stream %j', request); return this.descriptors.page.listConversations.createStream( this.innerApiCalls.listConversations as GaxCall, @@ -996,7 +1004,9 @@ export class ConversationHistoryClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations iterate %j', request); return this.descriptors.page.listConversations.asyncIterate( this.innerApiCalls['listConversations'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts index 9f66a5c792f..c9408a3581f 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts @@ -582,7 +582,9 @@ export class DeploymentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDeployment request %j', request); const wrappedCallback: | Callback< @@ -713,7 +715,9 @@ export class DeploymentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest, @@ -781,7 +785,9 @@ export class DeploymentsClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments stream %j', request); return this.descriptors.page.listDeployments.createStream( this.innerApiCalls.listDeployments as GaxCall, @@ -831,7 +837,9 @@ export class DeploymentsClient { }); const defaultCallSettings = this._defaults['listDeployments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDeployments iterate %j', request); return this.descriptors.page.listDeployments.asyncIterate( this.innerApiCalls['listDeployments'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts index 9562ccdda90..491dc074487 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts @@ -681,7 +681,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntityType request %j', request); const wrappedCallback: | Callback< @@ -821,7 +823,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEntityType request %j', request); const wrappedCallback: | Callback< @@ -964,7 +968,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'entity_type.name': request.entityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEntityType request %j', request); const wrappedCallback: | Callback< @@ -1108,7 +1114,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEntityType request %j', request); const wrappedCallback: | Callback< @@ -1274,7 +1282,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1465,7 +1475,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1642,7 +1654,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, @@ -1722,7 +1736,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes stream %j', request); return this.descriptors.page.listEntityTypes.createStream( this.innerApiCalls.listEntityTypes as GaxCall, @@ -1784,7 +1800,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes iterate %j', request); return this.descriptors.page.listEntityTypes.asyncIterate( this.innerApiCalls['listEntityTypes'] as GaxCall, @@ -1964,7 +1982,7 @@ export class EntityTypesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts index 06ec106bc79..d8961a49363 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts @@ -703,7 +703,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -832,7 +834,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEnvironment request %j', request); const wrappedCallback: | Callback< @@ -977,7 +981,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1155,7 +1161,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ 'environment.name': request.environment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1333,7 +1341,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1516,7 +1526,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ environment: request.environment ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1682,7 +1694,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest, @@ -1750,7 +1764,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -1800,7 +1816,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -1906,7 +1924,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest, @@ -1974,7 +1994,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['lookupEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupEnvironmentHistory stream %j', request); return this.descriptors.page.lookupEnvironmentHistory.createStream( this.innerApiCalls.lookupEnvironmentHistory as GaxCall, @@ -2024,7 +2046,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['lookupEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('lookupEnvironmentHistory iterate %j', request); return this.descriptors.page.lookupEnvironmentHistory.asyncIterate( this.innerApiCalls['lookupEnvironmentHistory'] as GaxCall, @@ -2129,7 +2153,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest, @@ -2197,7 +2223,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listContinuousTestResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContinuousTestResults stream %j', request); return this.descriptors.page.listContinuousTestResults.createStream( this.innerApiCalls.listContinuousTestResults as GaxCall, @@ -2247,7 +2275,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listContinuousTestResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContinuousTestResults iterate %j', request); return this.descriptors.page.listContinuousTestResults.asyncIterate( this.innerApiCalls['listContinuousTestResults'] as GaxCall, @@ -2427,7 +2457,7 @@ export class EnvironmentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/examples_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/examples_client.ts index 5ca979d5e78..3d8f12fdc35 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/examples_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/examples_client.ts @@ -588,7 +588,9 @@ export class ExamplesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createExample request %j', request); const wrappedCallback: | Callback< @@ -715,7 +717,9 @@ export class ExamplesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteExample request %j', request); const wrappedCallback: | Callback< @@ -836,7 +840,9 @@ export class ExamplesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExample request %j', request); const wrappedCallback: | Callback< @@ -964,7 +970,9 @@ export class ExamplesClient { this._gaxModule.routingHeader.fromParams({ 'example.name': request.example!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateExample request %j', request); const wrappedCallback: | Callback< @@ -1099,7 +1107,9 @@ export class ExamplesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListExamplesRequest, @@ -1172,7 +1182,9 @@ export class ExamplesClient { }); const defaultCallSettings = this._defaults['listExamples']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExamples stream %j', request); return this.descriptors.page.listExamples.createStream( this.innerApiCalls.listExamples as GaxCall, @@ -1227,7 +1239,9 @@ export class ExamplesClient { }); const defaultCallSettings = this._defaults['listExamples']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExamples iterate %j', request); return this.descriptors.page.listExamples.asyncIterate( this.innerApiCalls['listExamples'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts index 1dcc567ed9e..158dafebe3e 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts @@ -590,7 +590,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getExperiment request %j', request); const wrappedCallback: | Callback< @@ -722,7 +724,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createExperiment request %j', request); const wrappedCallback: | Callback< @@ -850,7 +854,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ 'experiment.name': request.experiment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateExperiment request %j', request); const wrappedCallback: | Callback< @@ -979,7 +985,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteExperiment request %j', request); const wrappedCallback: | Callback< @@ -1108,7 +1116,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('startExperiment request %j', request); const wrappedCallback: | Callback< @@ -1237,7 +1247,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('stopExperiment request %j', request); const wrappedCallback: | Callback< @@ -1368,7 +1380,9 @@ export class ExperimentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest, @@ -1436,7 +1450,9 @@ export class ExperimentsClient { }); const defaultCallSettings = this._defaults['listExperiments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExperiments stream %j', request); return this.descriptors.page.listExperiments.createStream( this.innerApiCalls.listExperiments as GaxCall, @@ -1486,7 +1502,9 @@ export class ExperimentsClient { }); const defaultCallSettings = this._defaults['listExperiments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listExperiments iterate %j', request); return this.descriptors.page.listExperiments.asyncIterate( this.innerApiCalls['listExperiments'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts index 2036e5919a9..1cbcd9d5d69 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts @@ -693,7 +693,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createFlow request %j', request); const wrappedCallback: | Callback< @@ -825,7 +827,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteFlow request %j', request); const wrappedCallback: | Callback< @@ -960,7 +964,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFlow request %j', request); const wrappedCallback: | Callback< @@ -1096,7 +1102,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ 'flow.name': request.flow!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFlow request %j', request); const wrappedCallback: | Callback< @@ -1227,7 +1235,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validateFlow request %j', request); const wrappedCallback: | Callback< @@ -1357,7 +1367,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFlowValidationResult request %j', request); const wrappedCallback: | Callback< @@ -1505,7 +1517,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1700,7 +1714,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1894,7 +1910,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2072,7 +2090,9 @@ export class FlowsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, @@ -2153,7 +2173,9 @@ export class FlowsClient { }); const defaultCallSettings = this._defaults['listFlows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFlows stream %j', request); return this.descriptors.page.listFlows.createStream( this.innerApiCalls.listFlows as GaxCall, @@ -2216,7 +2238,9 @@ export class FlowsClient { }); const defaultCallSettings = this._defaults['listFlows']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFlows iterate %j', request); return this.descriptors.page.listFlows.asyncIterate( this.innerApiCalls['listFlows'] as GaxCall, @@ -2396,7 +2420,7 @@ export class FlowsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts index bc99f62b94f..cc137c827f4 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts @@ -589,7 +589,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerator request %j', request); const wrappedCallback: | Callback< @@ -721,7 +723,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGenerator request %j', request); const wrappedCallback: | Callback< @@ -851,7 +855,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ 'generator.name': request.generator!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerator request %j', request); const wrappedCallback: | Callback< @@ -987,7 +993,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGenerator request %j', request); const wrappedCallback: | Callback< @@ -1118,7 +1126,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, @@ -1187,7 +1197,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators stream %j', request); return this.descriptors.page.listGenerators.createStream( this.innerApiCalls.listGenerators as GaxCall, @@ -1238,7 +1250,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators iterate %j', request); return this.descriptors.page.listGenerators.asyncIterate( this.innerApiCalls['listGenerators'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts index e923655c463..ab4f55dff03 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts @@ -672,7 +672,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIntent request %j', request); const wrappedCallback: | Callback< @@ -814,7 +816,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createIntent request %j', request); const wrappedCallback: | Callback< @@ -956,7 +960,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ 'intent.name': request.intent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIntent request %j', request); const wrappedCallback: | Callback< @@ -1087,7 +1093,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteIntent request %j', request); const wrappedCallback: | Callback< @@ -1243,7 +1251,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1440,7 +1450,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1617,7 +1629,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListIntentsRequest, @@ -1697,7 +1711,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents stream %j', request); return this.descriptors.page.listIntents.createStream( this.innerApiCalls.listIntents as GaxCall, @@ -1759,7 +1775,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents iterate %j', request); return this.descriptors.page.listIntents.asyncIterate( this.innerApiCalls['listIntents'] as GaxCall, @@ -1939,7 +1957,7 @@ export class IntentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts index d97e92e94ac..e93ba4a3422 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts @@ -602,7 +602,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPage request %j', request); const wrappedCallback: | Callback< @@ -743,7 +745,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPage request %j', request); const wrappedCallback: | Callback< @@ -886,7 +890,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ 'page.name': request.page!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePage request %j', request); const wrappedCallback: | Callback< @@ -1018,7 +1024,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePage request %j', request); const wrappedCallback: | Callback< @@ -1170,7 +1178,9 @@ export class PagesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, @@ -1260,7 +1270,9 @@ export class PagesClient { }); const defaultCallSettings = this._defaults['listPages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPages stream %j', request); return this.descriptors.page.listPages.createStream( this.innerApiCalls.listPages as GaxCall, @@ -1332,7 +1344,9 @@ export class PagesClient { }); const defaultCallSettings = this._defaults['listPages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPages iterate %j', request); return this.descriptors.page.listPages.asyncIterate( this.innerApiCalls['listPages'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/playbooks_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/playbooks_client.ts index 673fe5057bf..f7c39d0533d 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/playbooks_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/playbooks_client.ts @@ -597,7 +597,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPlaybook request %j', request); const wrappedCallback: | Callback< @@ -724,7 +726,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePlaybook request %j', request); const wrappedCallback: | Callback< @@ -845,7 +849,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPlaybook request %j', request); const wrappedCallback: | Callback< @@ -973,7 +979,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ 'playbook.name': request.playbook!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePlaybook request %j', request); const wrappedCallback: | Callback< @@ -1102,7 +1110,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createPlaybookVersion request %j', request); const wrappedCallback: | Callback< @@ -1229,7 +1239,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPlaybookVersion request %j', request); const wrappedCallback: | Callback< @@ -1356,7 +1368,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePlaybookVersion request %j', request); const wrappedCallback: | Callback< @@ -1485,7 +1499,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListPlaybooksRequest, @@ -1552,7 +1568,9 @@ export class PlaybooksClient { }); const defaultCallSettings = this._defaults['listPlaybooks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPlaybooks stream %j', request); return this.descriptors.page.listPlaybooks.createStream( this.innerApiCalls.listPlaybooks as GaxCall, @@ -1601,7 +1619,9 @@ export class PlaybooksClient { }); const defaultCallSettings = this._defaults['listPlaybooks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPlaybooks iterate %j', request); return this.descriptors.page.listPlaybooks.asyncIterate( this.innerApiCalls['listPlaybooks'] as GaxCall, @@ -1706,7 +1726,9 @@ export class PlaybooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListPlaybookVersionsRequest, @@ -1774,7 +1796,9 @@ export class PlaybooksClient { }); const defaultCallSettings = this._defaults['listPlaybookVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPlaybookVersions stream %j', request); return this.descriptors.page.listPlaybookVersions.createStream( this.innerApiCalls.listPlaybookVersions as GaxCall, @@ -1824,7 +1848,9 @@ export class PlaybooksClient { }); const defaultCallSettings = this._defaults['listPlaybookVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPlaybookVersions iterate %j', request); return this.descriptors.page.listPlaybookVersions.asyncIterate( this.innerApiCalls['listPlaybookVersions'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts index 33c34e67b2a..32f529a1c42 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts @@ -606,7 +606,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -735,7 +737,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -865,7 +869,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ 'security_settings.name': request.securitySettings!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -994,7 +1000,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSecuritySettings request %j', request); const wrappedCallback: | Callback< @@ -1123,7 +1131,9 @@ export class SecuritySettingsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListSecuritySettingsRequest, @@ -1190,7 +1200,9 @@ export class SecuritySettingsServiceClient { }); const defaultCallSettings = this._defaults['listSecuritySettings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecuritySettings stream %j', request); return this.descriptors.page.listSecuritySettings.createStream( this.innerApiCalls.listSecuritySettings as GaxCall, @@ -1239,7 +1251,9 @@ export class SecuritySettingsServiceClient { }); const defaultCallSettings = this._defaults['listSecuritySettings']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSecuritySettings iterate %j', request); return this.descriptors.page.listSecuritySettings.asyncIterate( this.innerApiCalls['listSecuritySettings'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts index 23bd7568780..0e1b1b2573d 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts @@ -595,7 +595,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -728,7 +730,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -861,7 +865,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'session_entity_type.name': request.sessionEntityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -992,7 +998,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -1126,7 +1134,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListSessionEntityTypesRequest, @@ -1198,7 +1208,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes stream %j', request); return this.descriptors.page.listSessionEntityTypes.createStream( this.innerApiCalls.listSessionEntityTypes as GaxCall, @@ -1252,7 +1264,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes iterate %j', request); return this.descriptors.page.listSessionEntityTypes.asyncIterate( this.innerApiCalls['listSessionEntityTypes'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts index dcd0a24eb0e..70283882ad4 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts @@ -639,7 +639,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detectIntent request %j', request); const wrappedCallback: | Callback< @@ -777,7 +779,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('matchIntent request %j', request); const wrappedCallback: | Callback< @@ -914,7 +918,9 @@ export class SessionsClient { 'match_intent_request.session': request.matchIntentRequest!.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fulfillIntent request %j', request); const wrappedCallback: | Callback< @@ -1048,7 +1054,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('submitAnswerFeedback request %j', request); const wrappedCallback: | Callback< @@ -1135,7 +1143,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('serverStreamingDetectIntent stream %j', options); return this.innerApiCalls.serverStreamingDetectIntent(request, options); } @@ -1161,7 +1171,9 @@ export class SessionsClient { * region_tag:dialogflow_v3beta1_generated_Sessions_StreamingDetectIntent_async */ streamingDetectIntent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingDetectIntent stream %j', options); return this.innerApiCalls.streamingDetectIntent(null, options); } diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts index 33a11a8c3df..ce1f1904263 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts @@ -703,7 +703,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchDeleteTestCases request %j', request); const wrappedCallback: | Callback< @@ -824,7 +826,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTestCase request %j', request); const wrappedCallback: | Callback< @@ -952,7 +956,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTestCase request %j', request); const wrappedCallback: | Callback< @@ -1083,7 +1089,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ 'test_case.name': request.testCase!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTestCase request %j', request); const wrappedCallback: | Callback< @@ -1211,7 +1219,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ agent: request.agent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('calculateCoverage request %j', request); const wrappedCallback: | Callback< @@ -1338,7 +1348,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTestCaseResult request %j', request); const wrappedCallback: | Callback< @@ -1484,7 +1496,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1667,7 +1681,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1858,7 +1874,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2061,7 +2079,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2228,7 +2248,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest, @@ -2298,7 +2320,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCases stream %j', request); return this.descriptors.page.listTestCases.createStream( this.innerApiCalls.listTestCases as GaxCall, @@ -2350,7 +2374,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCases iterate %j', request); return this.descriptors.page.listTestCases.asyncIterate( this.innerApiCalls['listTestCases'] as GaxCall, @@ -2483,7 +2509,9 @@ export class TestCasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest, @@ -2578,7 +2606,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCaseResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCaseResults stream %j', request); return this.descriptors.page.listTestCaseResults.createStream( this.innerApiCalls.listTestCaseResults as GaxCall, @@ -2655,7 +2685,9 @@ export class TestCasesClient { }); const defaultCallSettings = this._defaults['listTestCaseResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTestCaseResults iterate %j', request); return this.descriptors.page.listTestCaseResults.asyncIterate( this.innerApiCalls['listTestCaseResults'] as GaxCall, @@ -2835,7 +2867,7 @@ export class TestCasesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/tools_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/tools_client.ts index b5b9191d952..30fc071ec96 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/tools_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/tools_client.ts @@ -661,7 +661,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTool request %j', request); const wrappedCallback: | Callback< @@ -782,7 +784,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTool request %j', request); const wrappedCallback: | Callback< @@ -901,7 +905,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ 'tool.name': request.tool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTool request %j', request); const wrappedCallback: | Callback< @@ -1030,7 +1036,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTool request %j', request); const wrappedCallback: | Callback< @@ -1160,7 +1168,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createToolVersion request %j', request); const wrappedCallback: | Callback< @@ -1288,7 +1298,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getToolVersion request %j', request); const wrappedCallback: | Callback< @@ -1424,7 +1436,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteToolVersion request %j', request); const wrappedCallback: | Callback< @@ -1552,7 +1566,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('restoreToolVersion request %j', request); const wrappedCallback: | Callback< @@ -1704,7 +1720,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1869,7 +1887,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListToolsRequest, @@ -1936,7 +1956,9 @@ export class ToolsClient { }); const defaultCallSettings = this._defaults['listTools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTools stream %j', request); return this.descriptors.page.listTools.createStream( this.innerApiCalls.listTools as GaxCall, @@ -1985,7 +2007,9 @@ export class ToolsClient { }); const defaultCallSettings = this._defaults['listTools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTools iterate %j', request); return this.descriptors.page.listTools.asyncIterate( this.innerApiCalls['listTools'] as GaxCall, @@ -2091,7 +2115,9 @@ export class ToolsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListToolVersionsRequest, @@ -2159,7 +2185,9 @@ export class ToolsClient { }); const defaultCallSettings = this._defaults['listToolVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listToolVersions stream %j', request); return this.descriptors.page.listToolVersions.createStream( this.innerApiCalls.listToolVersions as GaxCall, @@ -2209,7 +2237,9 @@ export class ToolsClient { }); const defaultCallSettings = this._defaults['listToolVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listToolVersions iterate %j', request); return this.descriptors.page.listToolVersions.asyncIterate( this.innerApiCalls['listToolVersions'] as GaxCall, @@ -2389,7 +2419,7 @@ export class ToolsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts index 1af96d1b4e6..fbe129a881f 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts @@ -606,7 +606,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -756,7 +758,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -900,7 +904,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ 'transition_route_group.name': request.transitionRouteGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -1043,7 +1049,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteTransitionRouteGroup request %j', request); const wrappedCallback: | Callback< @@ -1187,7 +1195,9 @@ export class TransitionRouteGroupsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListTransitionRouteGroupsRequest, @@ -1269,7 +1279,9 @@ export class TransitionRouteGroupsClient { }); const defaultCallSettings = this._defaults['listTransitionRouteGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransitionRouteGroups stream %j', request); return this.descriptors.page.listTransitionRouteGroups.createStream( this.innerApiCalls.listTransitionRouteGroups as GaxCall, @@ -1333,7 +1345,9 @@ export class TransitionRouteGroupsClient { }); const defaultCallSettings = this._defaults['listTransitionRouteGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTransitionRouteGroups iterate %j', request); return this.descriptors.page.listTransitionRouteGroups.asyncIterate( this.innerApiCalls['listTransitionRouteGroups'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts index 27b30842229..74abf5db9f0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts @@ -662,7 +662,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -791,7 +793,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ 'version.name': request.version!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateVersion request %j', request); const wrappedCallback: | Callback< @@ -919,7 +923,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteVersion request %j', request); const wrappedCallback: | Callback< @@ -1061,7 +1067,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ base_version: request.baseVersion ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('compareVersions request %j', request); const wrappedCallback: | Callback< @@ -1206,7 +1214,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1389,7 +1399,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1552,7 +1564,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListVersionsRequest, @@ -1620,7 +1634,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -1670,7 +1686,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, @@ -1850,7 +1868,7 @@ export class VersionsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts index 56052323b52..63a74322e23 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts @@ -587,7 +587,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getWebhook request %j', request); const wrappedCallback: | Callback< @@ -715,7 +717,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createWebhook request %j', request); const wrappedCallback: | Callback< @@ -843,7 +847,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ 'webhook.name': request.webhook!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateWebhook request %j', request); const wrappedCallback: | Callback< @@ -981,7 +987,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteWebhook request %j', request); const wrappedCallback: | Callback< @@ -1110,7 +1118,9 @@ export class WebhooksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.cx.v3beta1.IListWebhooksRequest, @@ -1177,7 +1187,9 @@ export class WebhooksClient { }); const defaultCallSettings = this._defaults['listWebhooks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWebhooks stream %j', request); return this.descriptors.page.listWebhooks.createStream( this.innerApiCalls.listWebhooks as GaxCall, @@ -1226,7 +1238,9 @@ export class WebhooksClient { }); const defaultCallSettings = this._defaults['listWebhooks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listWebhooks iterate %j', request); return this.descriptors.page.listWebhooks.asyncIterate( this.innerApiCalls['listWebhooks'] as GaxCall, diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts index 5f84a3ad53e..947258da6fd 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts @@ -287,7 +287,9 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.agentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentRequest() ); @@ -377,7 +379,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentRequest() ); @@ -424,7 +426,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentRequest() ); @@ -452,7 +454,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentRequest() ); @@ -473,7 +475,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateAgentRequest() ); @@ -504,7 +506,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateAgentRequest() ); @@ -551,7 +553,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateAgentRequest() ); @@ -582,7 +584,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateAgentRequest() ); @@ -603,7 +605,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateAgentRequest() ); @@ -635,7 +637,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateAgentRequest() ); @@ -683,7 +685,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateAgentRequest() ); @@ -715,7 +717,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateAgentRequest() ); @@ -737,7 +739,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteAgentRequest() ); @@ -768,7 +770,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteAgentRequest() ); @@ -815,7 +817,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteAgentRequest() ); @@ -846,7 +848,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteAgentRequest() ); @@ -867,7 +869,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateAgentRequest() ); @@ -898,7 +900,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateAgentRequest() ); @@ -945,7 +947,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateAgentRequest() ); @@ -976,7 +978,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateAgentRequest() ); @@ -997,7 +999,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest() ); @@ -1029,7 +1031,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest() ); @@ -1076,7 +1078,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest() ); @@ -1110,7 +1112,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest() ); @@ -1134,7 +1136,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest() ); @@ -1166,7 +1168,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest() ); @@ -1213,7 +1215,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest() ); @@ -1247,7 +1249,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGenerativeSettingsRequest() ); @@ -1271,7 +1273,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest() ); @@ -1304,7 +1306,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest() ); @@ -1352,7 +1354,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest() ); @@ -1387,7 +1389,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGenerativeSettingsRequest() ); @@ -1412,7 +1414,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportAgentRequest() ); @@ -1444,7 +1446,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportAgentRequest() ); @@ -1498,7 +1500,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportAgentRequest() ); @@ -1529,7 +1531,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportAgentRequest() ); @@ -1562,7 +1564,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1584,7 +1586,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1602,7 +1604,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RestoreAgentRequest() ); @@ -1634,7 +1636,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RestoreAgentRequest() ); @@ -1688,7 +1690,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RestoreAgentRequest() ); @@ -1719,7 +1721,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RestoreAgentRequest() ); @@ -1752,7 +1754,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1774,7 +1776,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1792,7 +1794,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListAgentsRequest() ); @@ -1825,7 +1827,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListAgentsRequest() ); @@ -1874,7 +1876,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListAgentsRequest() ); @@ -1905,7 +1907,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListAgentsRequest() ); @@ -1959,7 +1961,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListAgentsRequest() ); @@ -2010,7 +2012,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListAgentsRequest() ); @@ -2053,7 +2055,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListAgentsRequest() ); @@ -2096,7 +2098,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2126,7 +2128,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2170,7 +2172,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2205,7 +2207,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2253,7 +2255,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2294,7 +2296,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2373,7 +2375,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2453,7 +2455,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2549,8 +2551,7 @@ describe('v3.AgentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2569,7 +2570,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2578,8 +2579,7 @@ describe('v3.AgentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2595,7 +2595,7 @@ describe('v3.AgentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2606,7 +2606,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2659,7 +2659,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2670,7 +2670,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2738,7 +2738,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2749,7 +2749,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2816,7 +2816,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2828,7 +2828,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2892,7 +2892,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2905,7 +2905,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3004,7 +3004,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3017,7 +3017,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3092,7 +3092,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3104,7 +3104,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3168,7 +3168,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3180,7 +3180,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3244,7 +3244,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3257,7 +3257,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3332,7 +3332,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3344,7 +3344,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3408,7 +3408,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3420,7 +3420,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3501,7 +3501,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3513,7 +3513,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3577,7 +3577,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3589,7 +3589,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3653,7 +3653,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3663,7 +3663,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3702,7 +3702,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3715,7 +3715,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3790,7 +3790,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3799,7 +3799,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3828,7 +3828,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3843,7 +3843,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3974,7 +3974,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3988,7 +3988,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4100,7 +4100,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4113,7 +4113,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4225,7 +4225,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4238,7 +4238,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4332,7 +4332,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4343,7 +4343,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4400,7 +4400,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4412,7 +4412,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4476,7 +4476,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4489,7 +4489,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4564,7 +4564,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4577,7 +4577,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4652,7 +4652,7 @@ describe('v3.AgentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4664,7 +4664,7 @@ describe('v3.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts index bd8418e6194..412d213b310 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts @@ -287,7 +287,9 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.agentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest() ); @@ -377,7 +379,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest() ); @@ -424,7 +426,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest() ); @@ -452,7 +454,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest() ); @@ -473,7 +475,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest() ); @@ -504,7 +506,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest() ); @@ -551,7 +553,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest() ); @@ -582,7 +584,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest() ); @@ -603,7 +605,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest() ); @@ -635,7 +637,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest() ); @@ -683,7 +685,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest() ); @@ -715,7 +717,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest() ); @@ -737,7 +739,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest() ); @@ -768,7 +770,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest() ); @@ -815,7 +817,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest() ); @@ -846,7 +848,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest() ); @@ -867,7 +869,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest() ); @@ -898,7 +900,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest() ); @@ -945,7 +947,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest() ); @@ -976,7 +978,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest() ); @@ -997,7 +999,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest() ); @@ -1029,7 +1031,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest() ); @@ -1076,7 +1078,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest() ); @@ -1110,7 +1112,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest() ); @@ -1134,7 +1136,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest() ); @@ -1166,7 +1168,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest() ); @@ -1213,7 +1215,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest() ); @@ -1247,7 +1249,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest() ); @@ -1271,7 +1273,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest() ); @@ -1304,7 +1306,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest() ); @@ -1352,7 +1354,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest() ); @@ -1387,7 +1389,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest() ); @@ -1412,7 +1414,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest() ); @@ -1444,7 +1446,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest() ); @@ -1498,7 +1500,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest() ); @@ -1529,7 +1531,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest() ); @@ -1562,7 +1564,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1584,7 +1586,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1602,7 +1604,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest() ); @@ -1634,7 +1636,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest() ); @@ -1688,7 +1690,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest() ); @@ -1719,7 +1721,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest() ); @@ -1752,7 +1754,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1774,7 +1776,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1792,7 +1794,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest() ); @@ -1831,7 +1833,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest() ); @@ -1886,7 +1888,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest() ); @@ -1917,7 +1919,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest() ); @@ -1977,7 +1979,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest() ); @@ -2028,7 +2030,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest() ); @@ -2077,7 +2079,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest() ); @@ -2121,7 +2123,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2151,7 +2153,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2195,7 +2197,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2230,7 +2232,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2278,7 +2280,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2319,7 +2321,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2398,7 +2400,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2478,7 +2480,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2574,8 +2576,7 @@ describe('v3beta1.AgentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2594,7 +2595,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2603,8 +2604,7 @@ describe('v3beta1.AgentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2620,7 +2620,7 @@ describe('v3beta1.AgentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2631,7 +2631,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2684,7 +2684,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2695,7 +2695,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2763,7 +2763,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2774,7 +2774,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2841,7 +2841,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2853,7 +2853,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2917,7 +2917,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2930,7 +2930,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3029,7 +3029,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -3041,7 +3041,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3105,7 +3105,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3118,7 +3118,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3193,7 +3193,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3205,7 +3205,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3269,7 +3269,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3281,7 +3281,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3345,7 +3345,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -3358,7 +3358,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3433,7 +3433,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3446,7 +3446,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3521,7 +3521,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3533,7 +3533,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3597,7 +3597,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3609,7 +3609,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3690,7 +3690,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3702,7 +3702,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3766,7 +3766,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3778,7 +3778,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3842,7 +3842,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3852,7 +3852,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3891,7 +3891,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3904,7 +3904,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3979,7 +3979,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -3991,7 +3991,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4055,7 +4055,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -4068,7 +4068,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4143,7 +4143,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4152,7 +4152,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4181,7 +4181,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -4196,7 +4196,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -4327,7 +4327,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -4341,7 +4341,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4453,7 +4453,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4466,7 +4466,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4578,7 +4578,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4591,7 +4591,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4685,7 +4685,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4696,7 +4696,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4753,7 +4753,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4765,7 +4765,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4829,7 +4829,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4842,7 +4842,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4917,7 +4917,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -4929,7 +4929,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4993,7 +4993,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -5006,7 +5006,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5081,7 +5081,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -5094,7 +5094,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5169,7 +5169,7 @@ describe('v3beta1.AgentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -5181,7 +5181,7 @@ describe('v3beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts index 2d26437e942..2d1b3e61d20 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts @@ -250,7 +250,9 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.changelogsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetChangelogRequest() ); @@ -340,7 +342,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetChangelogRequest() ); @@ -387,7 +389,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetChangelogRequest() ); @@ -418,7 +420,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetChangelogRequest() ); @@ -439,7 +441,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListChangelogsRequest() ); @@ -478,7 +480,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListChangelogsRequest() ); @@ -533,7 +535,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListChangelogsRequest() ); @@ -564,7 +566,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListChangelogsRequest() ); @@ -624,7 +626,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListChangelogsRequest() ); @@ -673,7 +675,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListChangelogsRequest() ); @@ -722,7 +724,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListChangelogsRequest() ); @@ -763,7 +765,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -793,7 +795,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -837,7 +839,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -872,7 +874,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -920,7 +922,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -961,7 +963,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1040,7 +1042,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1120,7 +1122,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1216,8 +1218,7 @@ describe('v3.ChangelogsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1236,7 +1237,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1245,8 +1246,7 @@ describe('v3.ChangelogsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1262,7 +1262,7 @@ describe('v3.ChangelogsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1273,7 +1273,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1326,7 +1326,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1337,7 +1337,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1405,7 +1405,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1416,7 +1416,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1483,7 +1483,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1495,7 +1495,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1559,7 +1559,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1572,7 +1572,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1671,7 +1671,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1684,7 +1684,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1759,7 +1759,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1771,7 +1771,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1835,7 +1835,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -1847,7 +1847,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1911,7 +1911,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1924,7 +1924,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1999,7 +1999,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2011,7 +2011,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2075,7 +2075,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2087,7 +2087,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2168,7 +2168,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2180,7 +2180,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2244,7 +2244,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2256,7 +2256,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2320,7 +2320,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2330,7 +2330,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2369,7 +2369,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2382,7 +2382,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2457,7 +2457,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2466,7 +2466,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2495,7 +2495,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2510,7 +2510,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -2641,7 +2641,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -2655,7 +2655,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -2767,7 +2767,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2780,7 +2780,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -2892,7 +2892,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -2905,7 +2905,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -2999,7 +2999,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3010,7 +3010,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3067,7 +3067,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3079,7 +3079,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3143,7 +3143,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3156,7 +3156,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3231,7 +3231,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3244,7 +3244,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3319,7 +3319,7 @@ describe('v3.ChangelogsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3331,7 +3331,7 @@ describe('v3.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts index 67c203e87e4..2d08ba8f012 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts @@ -252,7 +252,9 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.changelogsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest() ); @@ -342,7 +344,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest() ); @@ -389,7 +391,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest() ); @@ -420,7 +422,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest() ); @@ -441,7 +443,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest() ); @@ -480,7 +482,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest() ); @@ -537,7 +539,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest() ); @@ -568,7 +570,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest() ); @@ -629,7 +631,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest() ); @@ -679,7 +681,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest() ); @@ -729,7 +731,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest() ); @@ -771,7 +773,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -801,7 +803,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -845,7 +847,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -880,7 +882,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -928,7 +930,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -965,7 +967,7 @@ describe('v3beta1.ChangelogsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -976,7 +978,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1029,7 +1031,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1040,7 +1042,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1108,7 +1110,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1119,7 +1121,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1186,7 +1188,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1198,7 +1200,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1262,7 +1264,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1275,7 +1277,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1374,7 +1376,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1386,7 +1388,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1450,7 +1452,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1463,7 +1465,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1538,7 +1540,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1550,7 +1552,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1614,7 +1616,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -1626,7 +1628,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1690,7 +1692,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -1703,7 +1705,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1778,7 +1780,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1791,7 +1793,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1866,7 +1868,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -1878,7 +1880,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1942,7 +1944,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1954,7 +1956,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2035,7 +2037,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2047,7 +2049,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2111,7 +2113,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2123,7 +2125,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2187,7 +2189,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2197,7 +2199,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2236,7 +2238,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2249,7 +2251,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2324,7 +2326,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2336,7 +2338,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2400,7 +2402,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2413,7 +2415,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2488,7 +2490,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2497,7 +2499,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2526,7 +2528,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2541,7 +2543,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -2672,7 +2674,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -2686,7 +2688,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -2798,7 +2800,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2811,7 +2813,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -2923,7 +2925,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -2936,7 +2938,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3030,7 +3032,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3041,7 +3043,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3098,7 +3100,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3110,7 +3112,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3174,7 +3176,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3187,7 +3189,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3262,7 +3264,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3274,7 +3276,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3338,7 +3340,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3351,7 +3353,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3426,7 +3428,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3439,7 +3441,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3514,7 +3516,7 @@ describe('v3beta1.ChangelogsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3526,7 +3528,7 @@ describe('v3beta1.ChangelogsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_conversation_history_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_conversation_history_v3beta1.ts index 1f8e06c8d9a..5141140ca34 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_conversation_history_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_conversation_history_v3beta1.ts @@ -265,7 +265,9 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationHistoryStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetConversationRequest() ); @@ -360,7 +362,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetConversationRequest() ); @@ -408,7 +410,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetConversationRequest() ); @@ -440,7 +442,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetConversationRequest() ); @@ -462,7 +464,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteConversationRequest() ); @@ -495,7 +497,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteConversationRequest() ); @@ -543,7 +545,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteConversationRequest() ); @@ -575,7 +577,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteConversationRequest() ); @@ -597,7 +599,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListConversationsRequest() ); @@ -637,7 +639,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListConversationsRequest() ); @@ -695,7 +697,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListConversationsRequest() ); @@ -727,7 +729,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListConversationsRequest() ); @@ -791,7 +793,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListConversationsRequest() ); @@ -844,7 +846,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListConversationsRequest() ); @@ -895,7 +897,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListConversationsRequest() ); @@ -938,7 +940,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -969,7 +971,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1014,7 +1016,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1050,7 +1052,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1099,7 +1101,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1136,7 +1138,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1148,7 +1150,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1201,7 +1203,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1213,7 +1215,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1281,7 +1283,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1293,7 +1295,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1360,7 +1362,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1373,7 +1375,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1437,7 +1439,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1451,7 +1453,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1550,7 +1552,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1563,7 +1565,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1627,7 +1629,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1641,7 +1643,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1716,7 +1718,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1729,7 +1731,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1793,7 +1795,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -1806,7 +1808,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1870,7 +1872,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -1884,7 +1886,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1959,7 +1961,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1973,7 +1975,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2048,7 +2050,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2061,7 +2063,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2125,7 +2127,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2138,7 +2140,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2219,7 +2221,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2232,7 +2234,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2296,7 +2298,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2309,7 +2311,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2373,7 +2375,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2384,7 +2386,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2423,7 +2425,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2437,7 +2439,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2512,7 +2514,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2525,7 +2527,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2589,7 +2591,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2603,7 +2605,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2678,7 +2680,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2688,7 +2690,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2717,7 +2719,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2733,7 +2735,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -2864,7 +2866,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -2879,7 +2881,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -2991,7 +2993,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3005,7 +3007,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3117,7 +3119,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3131,7 +3133,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3225,7 +3227,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3237,7 +3239,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3294,7 +3296,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3307,7 +3309,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3371,7 +3373,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3385,7 +3387,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3460,7 +3462,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3473,7 +3475,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3537,7 +3539,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3551,7 +3553,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3626,7 +3628,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3640,7 +3642,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3715,7 +3717,7 @@ describe('v3beta1.ConversationHistoryClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3728,7 +3730,7 @@ describe('v3beta1.ConversationHistoryClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts index a84c66486c6..79f55684463 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts @@ -250,7 +250,9 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.deploymentsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetDeploymentRequest() ); @@ -340,7 +342,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetDeploymentRequest() ); @@ -387,7 +389,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetDeploymentRequest() ); @@ -418,7 +420,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetDeploymentRequest() ); @@ -439,7 +441,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest() ); @@ -478,7 +480,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest() ); @@ -533,7 +535,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest() ); @@ -564,7 +566,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest() ); @@ -624,7 +626,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest() ); @@ -673,7 +675,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest() ); @@ -722,7 +724,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListDeploymentsRequest() ); @@ -764,7 +766,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -794,7 +796,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -838,7 +840,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -873,7 +875,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -921,7 +923,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -962,7 +964,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1041,7 +1043,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1121,7 +1123,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1217,8 +1219,7 @@ describe('v3.DeploymentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1237,7 +1238,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1246,8 +1247,7 @@ describe('v3.DeploymentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1263,7 +1263,7 @@ describe('v3.DeploymentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1274,7 +1274,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1327,7 +1327,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1338,7 +1338,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1406,7 +1406,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1417,7 +1417,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1484,7 +1484,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1496,7 +1496,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1560,7 +1560,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1573,7 +1573,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1672,7 +1672,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1685,7 +1685,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1760,7 +1760,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1772,7 +1772,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1836,7 +1836,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -1848,7 +1848,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1912,7 +1912,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1925,7 +1925,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2000,7 +2000,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2012,7 +2012,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2076,7 +2076,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2088,7 +2088,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2169,7 +2169,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2181,7 +2181,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2245,7 +2245,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2257,7 +2257,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2321,7 +2321,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2331,7 +2331,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2370,7 +2370,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2383,7 +2383,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2458,7 +2458,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2467,7 +2467,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2496,7 +2496,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2511,7 +2511,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -2642,7 +2642,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -2656,7 +2656,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -2768,7 +2768,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2781,7 +2781,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -2893,7 +2893,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -2906,7 +2906,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3000,7 +3000,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3011,7 +3011,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3068,7 +3068,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3080,7 +3080,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3144,7 +3144,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3157,7 +3157,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3232,7 +3232,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3245,7 +3245,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3320,7 +3320,7 @@ describe('v3.DeploymentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3332,7 +3332,7 @@ describe('v3.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts index c61e328fabb..aa7099a7fad 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts @@ -252,7 +252,9 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.deploymentsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest() ); @@ -342,7 +344,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest() ); @@ -389,7 +391,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest() ); @@ -420,7 +422,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest() ); @@ -441,7 +443,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest() ); @@ -480,7 +482,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest() ); @@ -537,7 +539,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest() ); @@ -568,7 +570,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest() ); @@ -629,7 +631,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest() ); @@ -679,7 +681,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest() ); @@ -729,7 +731,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest() ); @@ -771,7 +773,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -801,7 +803,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -845,7 +847,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -880,7 +882,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -928,7 +930,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -965,7 +967,7 @@ describe('v3beta1.DeploymentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -976,7 +978,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1029,7 +1031,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1040,7 +1042,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1108,7 +1110,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1119,7 +1121,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1186,7 +1188,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1198,7 +1200,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1262,7 +1264,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1275,7 +1277,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1374,7 +1376,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1386,7 +1388,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1450,7 +1452,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1463,7 +1465,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1538,7 +1540,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1550,7 +1552,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1614,7 +1616,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -1626,7 +1628,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1690,7 +1692,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -1703,7 +1705,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1778,7 +1780,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -1791,7 +1793,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1866,7 +1868,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -1878,7 +1880,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1942,7 +1944,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1954,7 +1956,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2035,7 +2037,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2047,7 +2049,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2111,7 +2113,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2123,7 +2125,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2187,7 +2189,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2197,7 +2199,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2236,7 +2238,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2249,7 +2251,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2324,7 +2326,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2336,7 +2338,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2400,7 +2402,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2413,7 +2415,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2488,7 +2490,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2497,7 +2499,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2526,7 +2528,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2541,7 +2543,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -2672,7 +2674,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -2686,7 +2688,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -2798,7 +2800,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2811,7 +2813,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -2923,7 +2925,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -2936,7 +2938,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3030,7 +3032,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3041,7 +3043,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3098,7 +3100,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3110,7 +3112,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3174,7 +3176,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3187,7 +3189,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3262,7 +3264,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3274,7 +3276,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3338,7 +3340,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3351,7 +3353,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3426,7 +3428,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3439,7 +3441,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3514,7 +3516,7 @@ describe('v3beta1.DeploymentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3526,7 +3528,7 @@ describe('v3beta1.DeploymentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts index f954db6e3df..7887831288a 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3.ts @@ -287,7 +287,9 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.entityTypesStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest() ); @@ -377,7 +379,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest() ); @@ -424,7 +426,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest() ); @@ -455,7 +457,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest() ); @@ -476,7 +478,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest() ); @@ -507,7 +509,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest() ); @@ -554,7 +556,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest() ); @@ -585,7 +587,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest() ); @@ -606,7 +608,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest() ); @@ -638,7 +640,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest() ); @@ -686,7 +688,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest() ); @@ -718,7 +720,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest() ); @@ -740,7 +742,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest() ); @@ -771,7 +773,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest() ); @@ -818,7 +820,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest() ); @@ -849,7 +851,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest() ); @@ -870,7 +872,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest() ); @@ -903,7 +905,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest() ); @@ -957,7 +959,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest() ); @@ -988,7 +990,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest() ); @@ -1021,7 +1023,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1043,7 +1045,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1064,7 +1066,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest() ); @@ -1097,7 +1099,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest() ); @@ -1151,7 +1153,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest() ); @@ -1182,7 +1184,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest() ); @@ -1215,7 +1217,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1237,7 +1239,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1258,7 +1260,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest() ); @@ -1297,7 +1299,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest() ); @@ -1352,7 +1354,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest() ); @@ -1383,7 +1385,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest() ); @@ -1443,7 +1445,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest() ); @@ -1492,7 +1494,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest() ); @@ -1541,7 +1543,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest() ); @@ -1583,7 +1585,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1613,7 +1615,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1657,7 +1659,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1692,7 +1694,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1740,7 +1742,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1781,7 +1783,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1860,7 +1862,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1940,7 +1942,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2036,8 +2038,7 @@ describe('v3.EntityTypesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2056,7 +2057,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2065,8 +2066,7 @@ describe('v3.EntityTypesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2082,7 +2082,7 @@ describe('v3.EntityTypesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2093,7 +2093,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2146,7 +2146,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2157,7 +2157,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2225,7 +2225,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2236,7 +2236,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2303,7 +2303,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2315,7 +2315,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2379,7 +2379,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2392,7 +2392,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2491,7 +2491,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2504,7 +2504,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2579,7 +2579,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2591,7 +2591,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2655,7 +2655,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2667,7 +2667,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2731,7 +2731,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2744,7 +2744,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2819,7 +2819,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2831,7 +2831,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2895,7 +2895,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2907,7 +2907,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2988,7 +2988,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3000,7 +3000,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3064,7 +3064,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3076,7 +3076,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3140,7 +3140,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3150,7 +3150,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3189,7 +3189,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3202,7 +3202,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3277,7 +3277,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3286,7 +3286,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3315,7 +3315,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3330,7 +3330,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3461,7 +3461,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3475,7 +3475,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3587,7 +3587,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3600,7 +3600,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3712,7 +3712,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3725,7 +3725,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3819,7 +3819,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3830,7 +3830,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3887,7 +3887,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3899,7 +3899,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3963,7 +3963,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3976,7 +3976,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4051,7 +4051,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4064,7 +4064,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4139,7 +4139,7 @@ describe('v3.EntityTypesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4151,7 +4151,7 @@ describe('v3.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts index ec58387f229..21c74be5b67 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts @@ -289,7 +289,9 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.entityTypesStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest() ); @@ -379,7 +381,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest() ); @@ -426,7 +428,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest() ); @@ -457,7 +459,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest() ); @@ -478,7 +480,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest() ); @@ -509,7 +511,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest() ); @@ -556,7 +558,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest() ); @@ -587,7 +589,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest() ); @@ -608,7 +610,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest() ); @@ -640,7 +642,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest() ); @@ -688,7 +690,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest() ); @@ -720,7 +722,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest() ); @@ -742,7 +744,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest() ); @@ -773,7 +775,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest() ); @@ -820,7 +822,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest() ); @@ -851,7 +853,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest() ); @@ -872,7 +874,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest() ); @@ -905,7 +907,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest() ); @@ -959,7 +961,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest() ); @@ -990,7 +992,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest() ); @@ -1023,7 +1025,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1045,7 +1047,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1066,7 +1068,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest() ); @@ -1099,7 +1101,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest() ); @@ -1153,7 +1155,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest() ); @@ -1184,7 +1186,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest() ); @@ -1217,7 +1219,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1239,7 +1241,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1260,7 +1262,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest() ); @@ -1299,7 +1301,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest() ); @@ -1356,7 +1358,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest() ); @@ -1387,7 +1389,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest() ); @@ -1448,7 +1450,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest() ); @@ -1498,7 +1500,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest() ); @@ -1548,7 +1550,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest() ); @@ -1590,7 +1592,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1620,7 +1622,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1664,7 +1666,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1699,7 +1701,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1747,7 +1749,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1788,7 +1790,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1867,7 +1869,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1947,7 +1949,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2043,8 +2045,7 @@ describe('v3beta1.EntityTypesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2063,7 +2064,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2072,8 +2073,7 @@ describe('v3beta1.EntityTypesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2089,7 +2089,7 @@ describe('v3beta1.EntityTypesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2100,7 +2100,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2153,7 +2153,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2164,7 +2164,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2232,7 +2232,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2243,7 +2243,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2310,7 +2310,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2322,7 +2322,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2386,7 +2386,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2399,7 +2399,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2498,7 +2498,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -2510,7 +2510,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2574,7 +2574,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2587,7 +2587,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2662,7 +2662,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2674,7 +2674,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2738,7 +2738,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2750,7 +2750,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2814,7 +2814,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2827,7 +2827,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2902,7 +2902,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2915,7 +2915,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2990,7 +2990,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3002,7 +3002,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3066,7 +3066,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3078,7 +3078,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3159,7 +3159,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3171,7 +3171,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3235,7 +3235,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3247,7 +3247,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3311,7 +3311,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3321,7 +3321,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3360,7 +3360,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3373,7 +3373,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3448,7 +3448,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -3460,7 +3460,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3524,7 +3524,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -3537,7 +3537,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3612,7 +3612,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3621,7 +3621,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3650,7 +3650,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3665,7 +3665,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3796,7 +3796,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3810,7 +3810,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3922,7 +3922,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3935,7 +3935,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4047,7 +4047,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4060,7 +4060,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4154,7 +4154,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4165,7 +4165,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4222,7 +4222,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4234,7 +4234,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4298,7 +4298,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4311,7 +4311,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4386,7 +4386,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -4398,7 +4398,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4462,7 +4462,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -4475,7 +4475,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4550,7 +4550,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4563,7 +4563,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4638,7 +4638,7 @@ describe('v3beta1.EntityTypesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4650,7 +4650,7 @@ describe('v3beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts index b1b60a7026e..1f0ef2fbb1b 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts @@ -289,7 +289,9 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.environmentsStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest() ); @@ -379,7 +381,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest() ); @@ -426,7 +428,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest() ); @@ -457,7 +459,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetEnvironmentRequest() ); @@ -478,7 +480,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest() ); @@ -509,7 +511,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest() ); @@ -556,7 +558,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest() ); @@ -587,7 +589,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest() ); @@ -608,7 +610,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest() ); @@ -641,7 +643,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest() ); @@ -695,7 +697,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest() ); @@ -726,7 +728,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest() ); @@ -759,7 +761,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -781,7 +783,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -802,7 +804,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest() ); @@ -836,7 +838,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest() ); @@ -891,7 +893,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest() ); @@ -923,7 +925,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest() ); @@ -957,7 +959,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -979,7 +981,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1000,7 +1002,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest() ); @@ -1033,7 +1035,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest() ); @@ -1087,7 +1089,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest() ); @@ -1118,7 +1120,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunContinuousTestRequest() ); @@ -1151,7 +1153,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1173,7 +1175,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1194,7 +1196,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeployFlowRequest() ); @@ -1226,7 +1228,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeployFlowRequest() ); @@ -1280,7 +1282,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeployFlowRequest() ); @@ -1311,7 +1313,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeployFlowRequest() ); @@ -1344,7 +1346,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1366,7 +1368,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1384,7 +1386,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest() ); @@ -1423,7 +1425,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest() ); @@ -1478,7 +1480,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest() ); @@ -1509,7 +1511,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest() ); @@ -1570,7 +1572,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest() ); @@ -1620,7 +1622,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest() ); @@ -1669,7 +1671,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest() ); @@ -1712,7 +1714,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest() ); @@ -1752,7 +1754,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest() ); @@ -1807,7 +1809,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest() ); @@ -1841,7 +1843,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest() ); @@ -1908,7 +1910,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest() ); @@ -1964,7 +1966,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest() ); @@ -2017,7 +2019,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest() ); @@ -2064,7 +2066,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest() ); @@ -2104,7 +2106,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest() ); @@ -2161,7 +2163,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest() ); @@ -2195,7 +2197,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest() ); @@ -2264,7 +2266,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest() ); @@ -2322,7 +2324,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest() ); @@ -2376,7 +2378,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest() ); @@ -2422,7 +2424,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2452,7 +2454,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2496,7 +2498,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2531,7 +2533,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2579,7 +2581,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2620,7 +2622,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2699,7 +2701,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2779,7 +2781,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2875,8 +2877,7 @@ describe('v3.EnvironmentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2895,7 +2896,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2904,8 +2905,7 @@ describe('v3.EnvironmentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2921,7 +2921,7 @@ describe('v3.EnvironmentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2932,7 +2932,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2985,7 +2985,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2996,7 +2996,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3064,7 +3064,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3075,7 +3075,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3142,7 +3142,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -3154,7 +3154,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3218,7 +3218,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -3231,7 +3231,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3330,7 +3330,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3343,7 +3343,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3418,7 +3418,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3430,7 +3430,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3494,7 +3494,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3506,7 +3506,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3570,7 +3570,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3583,7 +3583,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3658,7 +3658,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3670,7 +3670,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3734,7 +3734,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3746,7 +3746,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3827,7 +3827,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3839,7 +3839,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3903,7 +3903,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3915,7 +3915,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3979,7 +3979,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3989,7 +3989,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4028,7 +4028,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -4041,7 +4041,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4116,7 +4116,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4125,7 +4125,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4154,7 +4154,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -4169,7 +4169,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -4300,7 +4300,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -4314,7 +4314,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4426,7 +4426,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4439,7 +4439,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4551,7 +4551,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4564,7 +4564,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4658,7 +4658,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4669,7 +4669,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4726,7 +4726,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4738,7 +4738,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4802,7 +4802,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4815,7 +4815,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4890,7 +4890,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4903,7 +4903,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4978,7 +4978,7 @@ describe('v3.EnvironmentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4990,7 +4990,7 @@ describe('v3.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts index e6b0f0018e2..cb8c1008566 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts @@ -289,7 +289,9 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.environmentsStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest() ); @@ -379,7 +381,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest() ); @@ -426,7 +428,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest() ); @@ -457,7 +459,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest() ); @@ -478,7 +480,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest() ); @@ -509,7 +511,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest() ); @@ -556,7 +558,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest() ); @@ -587,7 +589,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest() ); @@ -608,7 +610,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest() ); @@ -641,7 +643,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest() ); @@ -695,7 +697,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest() ); @@ -726,7 +728,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest() ); @@ -759,7 +761,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -781,7 +783,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -802,7 +804,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest() ); @@ -836,7 +838,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest() ); @@ -891,7 +893,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest() ); @@ -923,7 +925,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest() ); @@ -957,7 +959,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -979,7 +981,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1000,7 +1002,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest() ); @@ -1033,7 +1035,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest() ); @@ -1087,7 +1089,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest() ); @@ -1118,7 +1120,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest() ); @@ -1151,7 +1153,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1173,7 +1175,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1194,7 +1196,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest() ); @@ -1226,7 +1228,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest() ); @@ -1280,7 +1282,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest() ); @@ -1311,7 +1313,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest() ); @@ -1344,7 +1346,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1366,7 +1368,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1384,7 +1386,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest() ); @@ -1423,7 +1425,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest() ); @@ -1480,7 +1482,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest() ); @@ -1511,7 +1513,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest() ); @@ -1572,7 +1574,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest() ); @@ -1622,7 +1624,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest() ); @@ -1672,7 +1674,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest() ); @@ -1715,7 +1717,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest() ); @@ -1755,7 +1757,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest() ); @@ -1812,7 +1814,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest() ); @@ -1846,7 +1848,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest() ); @@ -1913,7 +1915,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest() ); @@ -1969,7 +1971,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest() ); @@ -2023,7 +2025,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest() ); @@ -2070,7 +2072,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest() ); @@ -2110,7 +2112,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest() ); @@ -2167,7 +2169,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest() ); @@ -2201,7 +2203,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest() ); @@ -2270,7 +2272,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest() ); @@ -2328,7 +2330,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest() ); @@ -2382,7 +2384,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest() ); @@ -2428,7 +2430,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2458,7 +2460,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2502,7 +2504,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2537,7 +2539,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2585,7 +2587,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2626,7 +2628,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2705,7 +2707,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2785,7 +2787,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2881,8 +2883,7 @@ describe('v3beta1.EnvironmentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2901,7 +2902,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2910,8 +2911,7 @@ describe('v3beta1.EnvironmentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2927,7 +2927,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2938,7 +2938,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2991,7 +2991,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -3002,7 +3002,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3070,7 +3070,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3081,7 +3081,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3148,7 +3148,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -3160,7 +3160,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3224,7 +3224,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -3237,7 +3237,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3336,7 +3336,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -3348,7 +3348,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3412,7 +3412,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3425,7 +3425,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3500,7 +3500,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3512,7 +3512,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3576,7 +3576,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3588,7 +3588,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3652,7 +3652,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -3665,7 +3665,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3740,7 +3740,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3753,7 +3753,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3828,7 +3828,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3840,7 +3840,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3904,7 +3904,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3916,7 +3916,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3997,7 +3997,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -4009,7 +4009,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4073,7 +4073,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -4085,7 +4085,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4149,7 +4149,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4159,7 +4159,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4198,7 +4198,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -4211,7 +4211,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4286,7 +4286,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -4298,7 +4298,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4362,7 +4362,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -4375,7 +4375,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4450,7 +4450,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4459,7 +4459,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4488,7 +4488,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -4503,7 +4503,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -4634,7 +4634,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -4648,7 +4648,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4760,7 +4760,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4773,7 +4773,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4885,7 +4885,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4898,7 +4898,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4992,7 +4992,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -5003,7 +5003,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5060,7 +5060,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -5072,7 +5072,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5136,7 +5136,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -5149,7 +5149,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5224,7 +5224,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -5236,7 +5236,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5300,7 +5300,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -5313,7 +5313,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5388,7 +5388,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -5401,7 +5401,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5476,7 +5476,7 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -5488,7 +5488,7 @@ describe('v3beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_examples_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_examples_v3beta1.ts index 6141b8a650c..21a023370f7 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_examples_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_examples_v3beta1.ts @@ -250,7 +250,9 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.examplesStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest() ); @@ -340,7 +342,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest() ); @@ -387,7 +389,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest() ); @@ -418,7 +420,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest() ); @@ -439,7 +441,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest() ); @@ -470,7 +472,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest() ); @@ -517,7 +519,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest() ); @@ -548,7 +550,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest() ); @@ -569,7 +571,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest() ); @@ -600,7 +602,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest() ); @@ -647,7 +649,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest() ); @@ -678,7 +680,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest() ); @@ -699,7 +701,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest() ); @@ -731,7 +733,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest() ); @@ -779,7 +781,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest() ); @@ -811,7 +813,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest() ); @@ -833,7 +835,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest() ); @@ -872,7 +874,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest() ); @@ -927,7 +929,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest() ); @@ -958,7 +960,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest() ); @@ -1019,7 +1021,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest() ); @@ -1071,7 +1073,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest() ); @@ -1121,7 +1123,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest() ); @@ -1163,7 +1165,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1193,7 +1195,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1237,7 +1239,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1272,7 +1274,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1320,7 +1322,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1357,7 +1359,7 @@ describe('v3beta1.ExamplesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1368,7 +1370,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1421,7 +1423,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1432,7 +1434,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1500,7 +1502,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1511,7 +1513,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1578,7 +1580,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1590,7 +1592,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1654,7 +1656,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1667,7 +1669,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1766,7 +1768,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1778,7 +1780,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1842,7 +1844,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1855,7 +1857,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1930,7 +1932,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1942,7 +1944,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2006,7 +2008,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2018,7 +2020,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2082,7 +2084,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2095,7 +2097,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2170,7 +2172,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2183,7 +2185,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2258,7 +2260,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2270,7 +2272,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2334,7 +2336,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2346,7 +2348,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2427,7 +2429,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2439,7 +2441,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2503,7 +2505,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2515,7 +2517,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2579,7 +2581,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2589,7 +2591,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2628,7 +2630,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2641,7 +2643,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2716,7 +2718,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2728,7 +2730,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2792,7 +2794,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2805,7 +2807,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2880,7 +2882,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2889,7 +2891,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2918,7 +2920,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2933,7 +2935,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3064,7 +3066,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3078,7 +3080,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3190,7 +3192,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3203,7 +3205,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3315,7 +3317,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3328,7 +3330,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3422,7 +3424,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3433,7 +3435,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3490,7 +3492,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3502,7 +3504,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3566,7 +3568,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3579,7 +3581,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3654,7 +3656,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3666,7 +3668,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3730,7 +3732,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3743,7 +3745,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3818,7 +3820,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3831,7 +3833,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3906,7 +3908,7 @@ describe('v3beta1.ExamplesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3918,7 +3920,7 @@ describe('v3beta1.ExamplesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts index 4e30114ae50..f327ec7ecb2 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts @@ -250,7 +250,9 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.experimentsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetExperimentRequest() ); @@ -340,7 +342,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetExperimentRequest() ); @@ -387,7 +389,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetExperimentRequest() ); @@ -418,7 +420,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetExperimentRequest() ); @@ -439,7 +441,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateExperimentRequest() ); @@ -470,7 +472,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateExperimentRequest() ); @@ -517,7 +519,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateExperimentRequest() ); @@ -548,7 +550,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateExperimentRequest() ); @@ -569,7 +571,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest() ); @@ -601,7 +603,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest() ); @@ -649,7 +651,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest() ); @@ -681,7 +683,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateExperimentRequest() ); @@ -703,7 +705,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest() ); @@ -734,7 +736,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest() ); @@ -781,7 +783,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest() ); @@ -812,7 +814,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteExperimentRequest() ); @@ -833,7 +835,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StartExperimentRequest() ); @@ -864,7 +866,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StartExperimentRequest() ); @@ -911,7 +913,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StartExperimentRequest() ); @@ -942,7 +944,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StartExperimentRequest() ); @@ -963,7 +965,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StopExperimentRequest() ); @@ -994,7 +996,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StopExperimentRequest() ); @@ -1041,7 +1043,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StopExperimentRequest() ); @@ -1072,7 +1074,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StopExperimentRequest() ); @@ -1093,7 +1095,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() ); @@ -1132,7 +1134,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() ); @@ -1187,7 +1189,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() ); @@ -1218,7 +1220,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() ); @@ -1278,7 +1280,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() ); @@ -1327,7 +1329,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() ); @@ -1376,7 +1378,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListExperimentsRequest() ); @@ -1418,7 +1420,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1448,7 +1450,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1492,7 +1494,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1527,7 +1529,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1575,7 +1577,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1616,7 +1618,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1695,7 +1697,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1775,7 +1777,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1871,8 +1873,7 @@ describe('v3.ExperimentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1891,7 +1892,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1900,8 +1901,7 @@ describe('v3.ExperimentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1917,7 +1917,7 @@ describe('v3.ExperimentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1928,7 +1928,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1981,7 +1981,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1992,7 +1992,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2060,7 +2060,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2071,7 +2071,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2138,7 +2138,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2150,7 +2150,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2214,7 +2214,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2227,7 +2227,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2326,7 +2326,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2339,7 +2339,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2414,7 +2414,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2426,7 +2426,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2490,7 +2490,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2502,7 +2502,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2566,7 +2566,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2579,7 +2579,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2654,7 +2654,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2666,7 +2666,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2730,7 +2730,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2742,7 +2742,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2823,7 +2823,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2835,7 +2835,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2899,7 +2899,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2911,7 +2911,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2975,7 +2975,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2985,7 +2985,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3024,7 +3024,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3037,7 +3037,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3112,7 +3112,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3121,7 +3121,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3150,7 +3150,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3165,7 +3165,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3296,7 +3296,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3310,7 +3310,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3422,7 +3422,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3435,7 +3435,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3547,7 +3547,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3560,7 +3560,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3654,7 +3654,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3665,7 +3665,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3722,7 +3722,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3734,7 +3734,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3798,7 +3798,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3811,7 +3811,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3886,7 +3886,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3899,7 +3899,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3974,7 +3974,7 @@ describe('v3.ExperimentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3986,7 +3986,7 @@ describe('v3.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts index baa22c63561..8313b3f4e01 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts @@ -252,7 +252,9 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.experimentsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest() ); @@ -342,7 +344,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest() ); @@ -389,7 +391,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest() ); @@ -420,7 +422,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest() ); @@ -441,7 +443,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest() ); @@ -472,7 +474,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest() ); @@ -519,7 +521,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest() ); @@ -550,7 +552,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest() ); @@ -571,7 +573,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest() ); @@ -603,7 +605,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest() ); @@ -651,7 +653,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest() ); @@ -683,7 +685,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest() ); @@ -705,7 +707,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest() ); @@ -736,7 +738,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest() ); @@ -783,7 +785,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest() ); @@ -814,7 +816,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest() ); @@ -835,7 +837,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest() ); @@ -866,7 +868,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest() ); @@ -913,7 +915,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest() ); @@ -944,7 +946,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest() ); @@ -965,7 +967,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest() ); @@ -996,7 +998,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest() ); @@ -1043,7 +1045,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest() ); @@ -1074,7 +1076,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest() ); @@ -1095,7 +1097,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() ); @@ -1134,7 +1136,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() ); @@ -1191,7 +1193,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() ); @@ -1222,7 +1224,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() ); @@ -1283,7 +1285,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() ); @@ -1333,7 +1335,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() ); @@ -1383,7 +1385,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest() ); @@ -1425,7 +1427,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1455,7 +1457,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1499,7 +1501,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1534,7 +1536,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1582,7 +1584,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1619,7 +1621,7 @@ describe('v3beta1.ExperimentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1630,7 +1632,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1683,7 +1685,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1694,7 +1696,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1762,7 +1764,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1773,7 +1775,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1840,7 +1842,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1852,7 +1854,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1916,7 +1918,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1929,7 +1931,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2028,7 +2030,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -2040,7 +2042,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2104,7 +2106,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2117,7 +2119,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2192,7 +2194,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2204,7 +2206,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2268,7 +2270,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2280,7 +2282,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2344,7 +2346,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2357,7 +2359,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2432,7 +2434,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2445,7 +2447,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2520,7 +2522,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2532,7 +2534,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2596,7 +2598,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2608,7 +2610,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2689,7 +2691,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2701,7 +2703,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2765,7 +2767,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2777,7 +2779,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2841,7 +2843,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2851,7 +2853,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2890,7 +2892,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2903,7 +2905,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2978,7 +2980,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2990,7 +2992,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3054,7 +3056,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -3067,7 +3069,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3142,7 +3144,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3151,7 +3153,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3180,7 +3182,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3195,7 +3197,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3326,7 +3328,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3340,7 +3342,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3452,7 +3454,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3465,7 +3467,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3577,7 +3579,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3590,7 +3592,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3684,7 +3686,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3695,7 +3697,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3752,7 +3754,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3764,7 +3766,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3828,7 +3830,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3841,7 +3843,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3916,7 +3918,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3928,7 +3930,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3992,7 +3994,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -4005,7 +4007,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4080,7 +4082,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4093,7 +4095,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4168,7 +4170,7 @@ describe('v3beta1.ExperimentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4180,7 +4182,7 @@ describe('v3beta1.ExperimentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts index d56ed09948f..5a9a3e4cba1 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts @@ -287,7 +287,9 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.flowsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateFlowRequest() ); @@ -377,7 +379,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateFlowRequest() ); @@ -424,7 +426,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateFlowRequest() ); @@ -455,7 +457,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateFlowRequest() ); @@ -476,7 +478,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteFlowRequest() ); @@ -507,7 +509,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteFlowRequest() ); @@ -554,7 +556,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteFlowRequest() ); @@ -585,7 +587,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteFlowRequest() ); @@ -606,7 +608,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowRequest() ); @@ -637,7 +639,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowRequest() ); @@ -684,7 +686,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowRequest() ); @@ -712,7 +714,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowRequest() ); @@ -733,7 +735,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateFlowRequest() ); @@ -765,7 +767,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateFlowRequest() ); @@ -813,7 +815,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateFlowRequest() ); @@ -845,7 +847,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateFlowRequest() ); @@ -867,7 +869,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateFlowRequest() ); @@ -898,7 +900,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateFlowRequest() ); @@ -945,7 +947,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateFlowRequest() ); @@ -976,7 +978,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ValidateFlowRequest() ); @@ -997,7 +999,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest() ); @@ -1029,7 +1031,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest() ); @@ -1076,7 +1078,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest() ); @@ -1110,7 +1112,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetFlowValidationResultRequest() ); @@ -1134,7 +1136,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.TrainFlowRequest() ); @@ -1166,7 +1168,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.TrainFlowRequest() ); @@ -1220,7 +1222,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.TrainFlowRequest() ); @@ -1251,7 +1253,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.TrainFlowRequest() ); @@ -1284,7 +1286,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1306,7 +1308,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1324,7 +1326,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportFlowRequest() ); @@ -1356,7 +1358,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportFlowRequest() ); @@ -1410,7 +1412,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportFlowRequest() ); @@ -1441,7 +1443,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportFlowRequest() ); @@ -1474,7 +1476,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1496,7 +1498,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1514,7 +1516,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportFlowRequest() ); @@ -1546,7 +1548,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportFlowRequest() ); @@ -1600,7 +1602,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportFlowRequest() ); @@ -1631,7 +1633,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportFlowRequest() ); @@ -1664,7 +1666,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1686,7 +1688,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1704,7 +1706,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListFlowsRequest() ); @@ -1737,7 +1739,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListFlowsRequest() ); @@ -1786,7 +1788,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListFlowsRequest() ); @@ -1814,7 +1816,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListFlowsRequest() ); @@ -1868,7 +1870,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListFlowsRequest() ); @@ -1919,7 +1921,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListFlowsRequest() ); @@ -1961,7 +1963,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListFlowsRequest() ); @@ -2003,7 +2005,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2033,7 +2035,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2077,7 +2079,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2112,7 +2114,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2160,7 +2162,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2201,7 +2203,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2280,7 +2282,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2360,7 +2362,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2456,8 +2458,7 @@ describe('v3.FlowsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2476,7 +2477,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2485,8 +2486,7 @@ describe('v3.FlowsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2502,7 +2502,7 @@ describe('v3.FlowsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2513,7 +2513,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2566,7 +2566,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2577,7 +2577,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2645,7 +2645,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2656,7 +2656,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2723,7 +2723,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2735,7 +2735,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2799,7 +2799,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2812,7 +2812,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2911,7 +2911,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2924,7 +2924,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2999,7 +2999,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3011,7 +3011,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3075,7 +3075,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3087,7 +3087,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3151,7 +3151,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3164,7 +3164,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3239,7 +3239,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3251,7 +3251,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3315,7 +3315,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3327,7 +3327,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3408,7 +3408,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3420,7 +3420,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3484,7 +3484,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3496,7 +3496,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3560,7 +3560,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3570,7 +3570,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3609,7 +3609,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3622,7 +3622,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3697,7 +3697,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3706,7 +3706,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3735,7 +3735,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3750,7 +3750,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3881,7 +3881,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3895,7 +3895,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4007,7 +4007,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4020,7 +4020,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4132,7 +4132,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4145,7 +4145,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4239,7 +4239,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4250,7 +4250,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4307,7 +4307,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4319,7 +4319,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4383,7 +4383,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4396,7 +4396,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4471,7 +4471,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4484,7 +4484,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4559,7 +4559,7 @@ describe('v3.FlowsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4571,7 +4571,7 @@ describe('v3.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts index 5f3008233c8..3bb1c9d13ce 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts @@ -287,7 +287,9 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.flowsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest() ); @@ -377,7 +379,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest() ); @@ -424,7 +426,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest() ); @@ -455,7 +457,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest() ); @@ -476,7 +478,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest() ); @@ -507,7 +509,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest() ); @@ -554,7 +556,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest() ); @@ -585,7 +587,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest() ); @@ -606,7 +608,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest() ); @@ -637,7 +639,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest() ); @@ -684,7 +686,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest() ); @@ -712,7 +714,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest() ); @@ -733,7 +735,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest() ); @@ -765,7 +767,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest() ); @@ -813,7 +815,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest() ); @@ -845,7 +847,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest() ); @@ -867,7 +869,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest() ); @@ -898,7 +900,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest() ); @@ -945,7 +947,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest() ); @@ -976,7 +978,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest() ); @@ -997,7 +999,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest() ); @@ -1029,7 +1031,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest() ); @@ -1076,7 +1078,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest() ); @@ -1110,7 +1112,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest() ); @@ -1134,7 +1136,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest() ); @@ -1166,7 +1168,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest() ); @@ -1220,7 +1222,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest() ); @@ -1251,7 +1253,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest() ); @@ -1284,7 +1286,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1306,7 +1308,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1324,7 +1326,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest() ); @@ -1356,7 +1358,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest() ); @@ -1410,7 +1412,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest() ); @@ -1441,7 +1443,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest() ); @@ -1474,7 +1476,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1496,7 +1498,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1514,7 +1516,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest() ); @@ -1546,7 +1548,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest() ); @@ -1600,7 +1602,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest() ); @@ -1631,7 +1633,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest() ); @@ -1664,7 +1666,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1686,7 +1688,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1704,7 +1706,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest() ); @@ -1743,7 +1745,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest() ); @@ -1798,7 +1800,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest() ); @@ -1826,7 +1828,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest() ); @@ -1886,7 +1888,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest() ); @@ -1937,7 +1939,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest() ); @@ -1985,7 +1987,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest() ); @@ -2027,7 +2029,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2057,7 +2059,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2101,7 +2103,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2136,7 +2138,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2184,7 +2186,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2225,7 +2227,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2304,7 +2306,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2384,7 +2386,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2480,8 +2482,7 @@ describe('v3beta1.FlowsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2500,7 +2501,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2509,8 +2510,7 @@ describe('v3beta1.FlowsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2526,7 +2526,7 @@ describe('v3beta1.FlowsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2537,7 +2537,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2590,7 +2590,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2601,7 +2601,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2669,7 +2669,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2680,7 +2680,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2747,7 +2747,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2759,7 +2759,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2823,7 +2823,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2836,7 +2836,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2935,7 +2935,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -2947,7 +2947,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3011,7 +3011,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3024,7 +3024,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3099,7 +3099,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3111,7 +3111,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3175,7 +3175,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3187,7 +3187,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3251,7 +3251,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -3264,7 +3264,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3339,7 +3339,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3352,7 +3352,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3427,7 +3427,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3439,7 +3439,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3503,7 +3503,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3515,7 +3515,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3596,7 +3596,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3608,7 +3608,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3672,7 +3672,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3684,7 +3684,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3748,7 +3748,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3758,7 +3758,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3797,7 +3797,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3810,7 +3810,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3885,7 +3885,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -3897,7 +3897,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3961,7 +3961,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -3974,7 +3974,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4049,7 +4049,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4058,7 +4058,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4087,7 +4087,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -4102,7 +4102,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -4233,7 +4233,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -4247,7 +4247,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4359,7 +4359,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4372,7 +4372,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4484,7 +4484,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4497,7 +4497,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4591,7 +4591,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4602,7 +4602,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4659,7 +4659,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4671,7 +4671,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4735,7 +4735,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4748,7 +4748,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4823,7 +4823,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -4835,7 +4835,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4899,7 +4899,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -4912,7 +4912,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4987,7 +4987,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -5000,7 +5000,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5075,7 +5075,7 @@ describe('v3beta1.FlowsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -5087,7 +5087,7 @@ describe('v3beta1.FlowsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts index 21d31d3ce57..cedfa55250c 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts @@ -250,7 +250,9 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generatorsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() ); @@ -340,7 +342,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() ); @@ -387,7 +389,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() ); @@ -418,7 +420,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() ); @@ -439,7 +441,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() ); @@ -470,7 +472,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() ); @@ -517,7 +519,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() ); @@ -548,7 +550,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() ); @@ -569,7 +571,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() ); @@ -601,7 +603,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() ); @@ -649,7 +651,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() ); @@ -681,7 +683,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() ); @@ -703,7 +705,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() ); @@ -734,7 +736,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() ); @@ -781,7 +783,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() ); @@ -812,7 +814,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() ); @@ -833,7 +835,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() ); @@ -872,7 +874,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() ); @@ -927,7 +929,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() ); @@ -958,7 +960,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() ); @@ -1018,7 +1020,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() ); @@ -1067,7 +1069,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() ); @@ -1116,7 +1118,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() ); @@ -1157,7 +1159,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1187,7 +1189,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1231,7 +1233,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1266,7 +1268,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1314,7 +1316,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1355,7 +1357,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1434,7 +1436,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1514,7 +1516,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1610,8 +1612,7 @@ describe('v3.GeneratorsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1630,7 +1631,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1639,8 +1640,7 @@ describe('v3.GeneratorsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1656,7 +1656,7 @@ describe('v3.GeneratorsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1667,7 +1667,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1720,7 +1720,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1731,7 +1731,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1799,7 +1799,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1810,7 +1810,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1877,7 +1877,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1889,7 +1889,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1953,7 +1953,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1966,7 +1966,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2065,7 +2065,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2078,7 +2078,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2153,7 +2153,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2165,7 +2165,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2229,7 +2229,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2241,7 +2241,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2305,7 +2305,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2318,7 +2318,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2393,7 +2393,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2405,7 +2405,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2469,7 +2469,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2481,7 +2481,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2562,7 +2562,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2574,7 +2574,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2638,7 +2638,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2650,7 +2650,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2714,7 +2714,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2724,7 +2724,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2763,7 +2763,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2776,7 +2776,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2851,7 +2851,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2860,7 +2860,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2889,7 +2889,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2904,7 +2904,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3035,7 +3035,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3049,7 +3049,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3161,7 +3161,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3174,7 +3174,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3286,7 +3286,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3299,7 +3299,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3393,7 +3393,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3404,7 +3404,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3461,7 +3461,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3473,7 +3473,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3537,7 +3537,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3550,7 +3550,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3625,7 +3625,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3638,7 +3638,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3713,7 +3713,7 @@ describe('v3.GeneratorsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3725,7 +3725,7 @@ describe('v3.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3beta1.ts index 9cd5850dd3e..b9f3ea54953 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3beta1.ts @@ -252,7 +252,9 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generatorsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() ); @@ -342,7 +344,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() ); @@ -389,7 +391,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() ); @@ -420,7 +422,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() ); @@ -441,7 +443,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() ); @@ -472,7 +474,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() ); @@ -519,7 +521,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() ); @@ -550,7 +552,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() ); @@ -571,7 +573,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() ); @@ -603,7 +605,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() ); @@ -651,7 +653,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() ); @@ -683,7 +685,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() ); @@ -705,7 +707,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() ); @@ -736,7 +738,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() ); @@ -783,7 +785,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() ); @@ -814,7 +816,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() ); @@ -835,7 +837,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() ); @@ -874,7 +876,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() ); @@ -931,7 +933,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() ); @@ -962,7 +964,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() ); @@ -1023,7 +1025,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() ); @@ -1073,7 +1075,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() ); @@ -1123,7 +1125,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() ); @@ -1165,7 +1167,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1195,7 +1197,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1239,7 +1241,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1274,7 +1276,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1322,7 +1324,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1359,7 +1361,7 @@ describe('v3beta1.GeneratorsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1370,7 +1372,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1423,7 +1425,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1434,7 +1436,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1502,7 +1504,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1513,7 +1515,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1580,7 +1582,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1592,7 +1594,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1656,7 +1658,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1669,7 +1671,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1768,7 +1770,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1780,7 +1782,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1844,7 +1846,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1857,7 +1859,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1932,7 +1934,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1944,7 +1946,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2008,7 +2010,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2020,7 +2022,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2084,7 +2086,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2097,7 +2099,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2172,7 +2174,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2185,7 +2187,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2260,7 +2262,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2272,7 +2274,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2336,7 +2338,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2348,7 +2350,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2429,7 +2431,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2441,7 +2443,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2505,7 +2507,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2517,7 +2519,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2581,7 +2583,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2591,7 +2593,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2630,7 +2632,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2643,7 +2645,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2718,7 +2720,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2730,7 +2732,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2794,7 +2796,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2807,7 +2809,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2882,7 +2884,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2891,7 +2893,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2920,7 +2922,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2935,7 +2937,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3066,7 +3068,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3080,7 +3082,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3192,7 +3194,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3205,7 +3207,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3317,7 +3319,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3330,7 +3332,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3424,7 +3426,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3435,7 +3437,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3492,7 +3494,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3504,7 +3506,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3568,7 +3570,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3581,7 +3583,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3656,7 +3658,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3668,7 +3670,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3732,7 +3734,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3745,7 +3747,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3820,7 +3822,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3833,7 +3835,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3908,7 +3910,7 @@ describe('v3beta1.GeneratorsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3920,7 +3922,7 @@ describe('v3beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts index 3ae723b32c5..1f6877c6da2 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts @@ -287,7 +287,9 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.intentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetIntentRequest() ); @@ -377,7 +379,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetIntentRequest() ); @@ -424,7 +426,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetIntentRequest() ); @@ -452,7 +454,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetIntentRequest() ); @@ -473,7 +475,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateIntentRequest() ); @@ -504,7 +506,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateIntentRequest() ); @@ -551,7 +553,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateIntentRequest() ); @@ -582,7 +584,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateIntentRequest() ); @@ -603,7 +605,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateIntentRequest() ); @@ -635,7 +637,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateIntentRequest() ); @@ -683,7 +685,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateIntentRequest() ); @@ -715,7 +717,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateIntentRequest() ); @@ -737,7 +739,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteIntentRequest() ); @@ -768,7 +770,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteIntentRequest() ); @@ -815,7 +817,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteIntentRequest() ); @@ -846,7 +848,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteIntentRequest() ); @@ -867,7 +869,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportIntentsRequest() ); @@ -900,7 +902,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportIntentsRequest() ); @@ -954,7 +956,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportIntentsRequest() ); @@ -985,7 +987,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportIntentsRequest() ); @@ -1018,7 +1020,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1040,7 +1042,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1061,7 +1063,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportIntentsRequest() ); @@ -1094,7 +1096,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportIntentsRequest() ); @@ -1148,7 +1150,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportIntentsRequest() ); @@ -1179,7 +1181,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportIntentsRequest() ); @@ -1212,7 +1214,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1234,7 +1236,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1255,7 +1257,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListIntentsRequest() ); @@ -1294,7 +1296,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListIntentsRequest() ); @@ -1349,7 +1351,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListIntentsRequest() ); @@ -1380,7 +1382,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListIntentsRequest() ); @@ -1440,7 +1442,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListIntentsRequest() ); @@ -1491,7 +1493,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListIntentsRequest() ); @@ -1540,7 +1542,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListIntentsRequest() ); @@ -1583,7 +1585,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1613,7 +1615,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1657,7 +1659,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1692,7 +1694,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1740,7 +1742,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1781,7 +1783,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1860,7 +1862,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1940,7 +1942,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2036,8 +2038,7 @@ describe('v3.IntentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2056,7 +2057,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2065,8 +2066,7 @@ describe('v3.IntentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2082,7 +2082,7 @@ describe('v3.IntentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2093,7 +2093,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2146,7 +2146,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2157,7 +2157,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2225,7 +2225,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2236,7 +2236,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2303,7 +2303,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2315,7 +2315,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2379,7 +2379,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2392,7 +2392,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2491,7 +2491,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2504,7 +2504,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2579,7 +2579,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2591,7 +2591,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2655,7 +2655,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2667,7 +2667,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2731,7 +2731,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2744,7 +2744,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2819,7 +2819,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2831,7 +2831,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2895,7 +2895,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2907,7 +2907,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2988,7 +2988,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3000,7 +3000,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3064,7 +3064,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3076,7 +3076,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3140,7 +3140,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3150,7 +3150,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3189,7 +3189,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3202,7 +3202,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3277,7 +3277,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3286,7 +3286,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3315,7 +3315,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3330,7 +3330,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3461,7 +3461,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3475,7 +3475,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3587,7 +3587,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3600,7 +3600,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3712,7 +3712,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3725,7 +3725,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3819,7 +3819,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3830,7 +3830,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3887,7 +3887,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3899,7 +3899,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3963,7 +3963,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3976,7 +3976,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4051,7 +4051,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4064,7 +4064,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4139,7 +4139,7 @@ describe('v3.IntentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4151,7 +4151,7 @@ describe('v3.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts index 7215c781e16..26feba0cc09 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts @@ -287,7 +287,9 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.intentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest() ); @@ -377,7 +379,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest() ); @@ -424,7 +426,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest() ); @@ -452,7 +454,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetIntentRequest() ); @@ -473,7 +475,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest() ); @@ -504,7 +506,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest() ); @@ -551,7 +553,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest() ); @@ -582,7 +584,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest() ); @@ -603,7 +605,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest() ); @@ -635,7 +637,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest() ); @@ -683,7 +685,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest() ); @@ -715,7 +717,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest() ); @@ -737,7 +739,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest() ); @@ -768,7 +770,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest() ); @@ -815,7 +817,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest() ); @@ -846,7 +848,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest() ); @@ -867,7 +869,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest() ); @@ -900,7 +902,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest() ); @@ -954,7 +956,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest() ); @@ -985,7 +987,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest() ); @@ -1018,7 +1020,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1040,7 +1042,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1061,7 +1063,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest() ); @@ -1094,7 +1096,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest() ); @@ -1148,7 +1150,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest() ); @@ -1179,7 +1181,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest() ); @@ -1212,7 +1214,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1234,7 +1236,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1255,7 +1257,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest() ); @@ -1294,7 +1296,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest() ); @@ -1349,7 +1351,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest() ); @@ -1380,7 +1382,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest() ); @@ -1441,7 +1443,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest() ); @@ -1493,7 +1495,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest() ); @@ -1542,7 +1544,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest() ); @@ -1586,7 +1588,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1616,7 +1618,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1660,7 +1662,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1695,7 +1697,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1743,7 +1745,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1784,7 +1786,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1863,7 +1865,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1943,7 +1945,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2039,8 +2041,7 @@ describe('v3beta1.IntentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2059,7 +2060,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2068,8 +2069,7 @@ describe('v3beta1.IntentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2085,7 +2085,7 @@ describe('v3beta1.IntentsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2096,7 +2096,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2149,7 +2149,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2160,7 +2160,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2228,7 +2228,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2239,7 +2239,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2306,7 +2306,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2318,7 +2318,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2382,7 +2382,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2395,7 +2395,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2494,7 +2494,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -2506,7 +2506,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2570,7 +2570,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2583,7 +2583,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2658,7 +2658,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2670,7 +2670,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2734,7 +2734,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2746,7 +2746,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2810,7 +2810,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2823,7 +2823,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2898,7 +2898,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2911,7 +2911,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2986,7 +2986,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2998,7 +2998,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3062,7 +3062,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3074,7 +3074,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3155,7 +3155,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3167,7 +3167,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3231,7 +3231,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3243,7 +3243,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3307,7 +3307,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3317,7 +3317,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3356,7 +3356,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3369,7 +3369,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3444,7 +3444,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -3456,7 +3456,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3520,7 +3520,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -3533,7 +3533,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3608,7 +3608,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3617,7 +3617,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3646,7 +3646,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3661,7 +3661,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3792,7 +3792,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3806,7 +3806,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3918,7 +3918,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3931,7 +3931,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4043,7 +4043,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4056,7 +4056,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4150,7 +4150,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4161,7 +4161,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4218,7 +4218,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4230,7 +4230,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4294,7 +4294,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4307,7 +4307,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4382,7 +4382,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -4394,7 +4394,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4458,7 +4458,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -4471,7 +4471,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4546,7 +4546,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4559,7 +4559,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4634,7 +4634,7 @@ describe('v3beta1.IntentsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4646,7 +4646,7 @@ describe('v3beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts index 98f9ac6d8af..418ab708500 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts @@ -250,7 +250,9 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.pagesStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetPageRequest() ); @@ -340,7 +342,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetPageRequest() ); @@ -387,7 +389,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetPageRequest() ); @@ -415,7 +417,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetPageRequest() ); @@ -436,7 +438,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreatePageRequest() ); @@ -467,7 +469,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreatePageRequest() ); @@ -514,7 +516,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreatePageRequest() ); @@ -545,7 +547,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreatePageRequest() ); @@ -566,7 +568,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdatePageRequest() ); @@ -598,7 +600,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdatePageRequest() ); @@ -646,7 +648,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdatePageRequest() ); @@ -678,7 +680,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdatePageRequest() ); @@ -700,7 +702,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeletePageRequest() ); @@ -731,7 +733,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeletePageRequest() ); @@ -778,7 +780,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeletePageRequest() ); @@ -809,7 +811,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeletePageRequest() ); @@ -830,7 +832,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListPagesRequest() ); @@ -863,7 +865,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListPagesRequest() ); @@ -912,7 +914,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListPagesRequest() ); @@ -940,7 +942,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListPagesRequest() ); @@ -994,7 +996,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListPagesRequest() ); @@ -1045,7 +1047,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListPagesRequest() ); @@ -1087,7 +1089,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListPagesRequest() ); @@ -1129,7 +1131,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1159,7 +1161,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1203,7 +1205,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1238,7 +1240,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1286,7 +1288,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1327,7 +1329,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1406,7 +1408,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1486,7 +1488,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1582,8 +1584,7 @@ describe('v3.PagesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1602,7 +1603,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1611,8 +1612,7 @@ describe('v3.PagesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1628,7 +1628,7 @@ describe('v3.PagesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1639,7 +1639,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1692,7 +1692,7 @@ describe('v3.PagesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1703,7 +1703,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1771,7 +1771,7 @@ describe('v3.PagesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1782,7 +1782,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1849,7 +1849,7 @@ describe('v3.PagesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1861,7 +1861,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1925,7 +1925,7 @@ describe('v3.PagesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1938,7 +1938,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2037,7 +2037,7 @@ describe('v3.PagesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2050,7 +2050,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2125,7 +2125,7 @@ describe('v3.PagesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2137,7 +2137,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2201,7 +2201,7 @@ describe('v3.PagesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2213,7 +2213,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2277,7 +2277,7 @@ describe('v3.PagesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2290,7 +2290,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2365,7 +2365,7 @@ describe('v3.PagesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2377,7 +2377,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2441,7 +2441,7 @@ describe('v3.PagesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2453,7 +2453,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2534,7 +2534,7 @@ describe('v3.PagesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2546,7 +2546,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2610,7 +2610,7 @@ describe('v3.PagesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2622,7 +2622,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2686,7 +2686,7 @@ describe('v3.PagesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2696,7 +2696,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2735,7 +2735,7 @@ describe('v3.PagesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2748,7 +2748,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2823,7 +2823,7 @@ describe('v3.PagesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2832,7 +2832,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2861,7 +2861,7 @@ describe('v3.PagesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2876,7 +2876,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3007,7 +3007,7 @@ describe('v3.PagesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3021,7 +3021,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3133,7 +3133,7 @@ describe('v3.PagesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3146,7 +3146,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3258,7 +3258,7 @@ describe('v3.PagesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3271,7 +3271,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3365,7 +3365,7 @@ describe('v3.PagesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3376,7 +3376,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3433,7 +3433,7 @@ describe('v3.PagesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3445,7 +3445,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3509,7 +3509,7 @@ describe('v3.PagesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3522,7 +3522,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3597,7 +3597,7 @@ describe('v3.PagesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3610,7 +3610,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3685,7 +3685,7 @@ describe('v3.PagesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3697,7 +3697,7 @@ describe('v3.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts index 944df42ae09..9f7e6cffd61 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts @@ -250,7 +250,9 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.pagesStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPageRequest() ); @@ -340,7 +342,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPageRequest() ); @@ -387,7 +389,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPageRequest() ); @@ -415,7 +417,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPageRequest() ); @@ -436,7 +438,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest() ); @@ -467,7 +469,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest() ); @@ -514,7 +516,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest() ); @@ -545,7 +547,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest() ); @@ -566,7 +568,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest() ); @@ -598,7 +600,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest() ); @@ -646,7 +648,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest() ); @@ -678,7 +680,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest() ); @@ -700,7 +702,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest() ); @@ -731,7 +733,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest() ); @@ -778,7 +780,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest() ); @@ -809,7 +811,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest() ); @@ -830,7 +832,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest() ); @@ -869,7 +871,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest() ); @@ -924,7 +926,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest() ); @@ -952,7 +954,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest() ); @@ -1012,7 +1014,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest() ); @@ -1063,7 +1065,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest() ); @@ -1111,7 +1113,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest() ); @@ -1153,7 +1155,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1183,7 +1185,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1227,7 +1229,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1262,7 +1264,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1310,7 +1312,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1347,7 +1349,7 @@ describe('v3beta1.PagesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1358,7 +1360,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1411,7 +1413,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1422,7 +1424,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1490,7 +1492,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1501,7 +1503,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1568,7 +1570,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1580,7 +1582,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1644,7 +1646,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1657,7 +1659,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1756,7 +1758,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1768,7 +1770,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1832,7 +1834,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1845,7 +1847,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1920,7 +1922,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1932,7 +1934,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1996,7 +1998,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2008,7 +2010,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2072,7 +2074,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2085,7 +2087,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2160,7 +2162,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2173,7 +2175,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2248,7 +2250,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2260,7 +2262,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2324,7 +2326,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2336,7 +2338,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2417,7 +2419,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2429,7 +2431,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2493,7 +2495,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2505,7 +2507,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2569,7 +2571,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2579,7 +2581,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2618,7 +2620,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2631,7 +2633,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2706,7 +2708,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2718,7 +2720,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2782,7 +2784,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2795,7 +2797,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2870,7 +2872,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2879,7 +2881,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2908,7 +2910,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2923,7 +2925,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3054,7 +3056,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3068,7 +3070,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3180,7 +3182,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3193,7 +3195,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3305,7 +3307,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3318,7 +3320,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3412,7 +3414,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3423,7 +3425,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3480,7 +3482,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3492,7 +3494,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3556,7 +3558,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3569,7 +3571,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3644,7 +3646,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3656,7 +3658,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3720,7 +3722,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3733,7 +3735,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3808,7 +3810,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3821,7 +3823,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3896,7 +3898,7 @@ describe('v3beta1.PagesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3908,7 +3910,7 @@ describe('v3beta1.PagesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_playbooks_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_playbooks_v3beta1.ts index 49a9ba53fc3..657bebffb8d 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_playbooks_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_playbooks_v3beta1.ts @@ -250,7 +250,9 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.playbooksStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest() ); @@ -340,7 +342,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest() ); @@ -387,7 +389,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest() ); @@ -418,7 +420,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest() ); @@ -439,7 +441,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest() ); @@ -470,7 +472,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest() ); @@ -517,7 +519,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest() ); @@ -548,7 +550,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest() ); @@ -569,7 +571,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest() ); @@ -600,7 +602,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest() ); @@ -647,7 +649,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest() ); @@ -678,7 +680,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest() ); @@ -699,7 +701,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest() ); @@ -731,7 +733,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest() ); @@ -779,7 +781,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest() ); @@ -811,7 +813,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest() ); @@ -833,7 +835,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest() ); @@ -865,7 +867,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest() ); @@ -912,7 +914,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest() ); @@ -946,7 +948,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest() ); @@ -970,7 +972,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest() ); @@ -1002,7 +1004,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest() ); @@ -1049,7 +1051,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest() ); @@ -1080,7 +1082,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest() ); @@ -1101,7 +1103,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest() ); @@ -1133,7 +1135,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest() ); @@ -1180,7 +1182,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest() ); @@ -1214,7 +1216,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest() ); @@ -1238,7 +1240,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest() ); @@ -1277,7 +1279,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest() ); @@ -1334,7 +1336,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest() ); @@ -1365,7 +1367,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest() ); @@ -1426,7 +1428,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest() ); @@ -1476,7 +1478,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest() ); @@ -1526,7 +1528,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest() ); @@ -1569,7 +1571,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest() ); @@ -1609,7 +1611,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest() ); @@ -1666,7 +1668,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest() ); @@ -1697,7 +1699,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest() ); @@ -1760,7 +1762,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest() ); @@ -1812,7 +1814,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest() ); @@ -1862,7 +1864,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest() ); @@ -1904,7 +1906,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1934,7 +1936,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1978,7 +1980,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2013,7 +2015,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2061,7 +2063,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2098,7 +2100,7 @@ describe('v3beta1.PlaybooksClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2109,7 +2111,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2162,7 +2164,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2173,7 +2175,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2241,7 +2243,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2252,7 +2254,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2319,7 +2321,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2331,7 +2333,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2395,7 +2397,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2408,7 +2410,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2507,7 +2509,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -2519,7 +2521,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2583,7 +2585,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2596,7 +2598,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2671,7 +2673,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2683,7 +2685,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2747,7 +2749,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2759,7 +2761,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2823,7 +2825,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2836,7 +2838,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2911,7 +2913,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2924,7 +2926,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2999,7 +3001,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3011,7 +3013,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3075,7 +3077,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3087,7 +3089,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3168,7 +3170,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3180,7 +3182,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3244,7 +3246,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3256,7 +3258,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3320,7 +3322,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3330,7 +3332,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3369,7 +3371,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3382,7 +3384,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3457,7 +3459,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -3469,7 +3471,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3533,7 +3535,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -3546,7 +3548,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3621,7 +3623,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3630,7 +3632,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3659,7 +3661,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3674,7 +3676,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3805,7 +3807,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3819,7 +3821,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3931,7 +3933,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3944,7 +3946,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4056,7 +4058,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4069,7 +4071,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4163,7 +4165,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4174,7 +4176,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4231,7 +4233,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4243,7 +4245,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4307,7 +4309,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4320,7 +4322,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4395,7 +4397,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -4407,7 +4409,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4471,7 +4473,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -4484,7 +4486,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4559,7 +4561,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4572,7 +4574,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4647,7 +4649,7 @@ describe('v3beta1.PlaybooksClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4659,7 +4661,7 @@ describe('v3beta1.PlaybooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts index ebbe298d69e..89e26b0acba 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3.ts @@ -265,7 +265,9 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securitySettingsServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest() ); @@ -361,7 +363,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest() ); @@ -409,7 +411,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest() ); @@ -444,7 +446,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest() ); @@ -469,7 +471,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest() ); @@ -502,7 +504,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest() ); @@ -550,7 +552,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest() ); @@ -582,7 +584,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest() ); @@ -604,7 +606,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest() ); @@ -638,7 +640,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest() ); @@ -687,7 +689,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest() ); @@ -723,7 +725,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest() ); @@ -749,7 +751,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest() ); @@ -782,7 +784,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest() ); @@ -830,7 +832,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest() ); @@ -865,7 +867,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest() ); @@ -890,7 +892,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest() ); @@ -931,7 +933,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest() ); @@ -989,7 +991,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest() ); @@ -1021,7 +1023,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest() ); @@ -1083,7 +1085,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest() ); @@ -1134,7 +1136,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest() ); @@ -1185,7 +1187,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest() ); @@ -1228,7 +1230,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1259,7 +1261,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1304,7 +1306,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1340,7 +1342,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1389,7 +1391,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1431,7 +1433,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1513,7 +1515,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1596,7 +1598,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1695,8 +1697,7 @@ describe('v3.SecuritySettingsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1716,7 +1717,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1725,8 +1726,7 @@ describe('v3.SecuritySettingsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1742,7 +1742,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1754,7 +1754,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1807,7 +1807,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1819,7 +1819,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1887,7 +1887,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1899,7 +1899,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1966,7 +1966,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1979,7 +1979,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2043,7 +2043,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2057,7 +2057,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2156,7 +2156,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2170,7 +2170,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2245,7 +2245,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2258,7 +2258,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2322,7 +2322,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2335,7 +2335,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2399,7 +2399,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2413,7 +2413,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2488,7 +2488,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2501,7 +2501,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2565,7 +2565,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2578,7 +2578,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2659,7 +2659,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2672,7 +2672,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2736,7 +2736,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2749,7 +2749,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2813,7 +2813,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2824,7 +2824,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2863,7 +2863,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('organizationLocationDeidentifyTemplate', () => { + describe('organizationLocationDeidentifyTemplate', async () => { const fakePath = '/rendered/path/organizationLocationDeidentifyTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -2875,7 +2875,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match = @@ -2951,7 +2951,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('organizationLocationInspectTemplate', () => { + describe('organizationLocationInspectTemplate', async () => { const fakePath = '/rendered/path/organizationLocationInspectTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -2963,7 +2963,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInspectTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInspectTemplatePathTemplate.match = @@ -3035,7 +3035,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3049,7 +3049,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3124,7 +3124,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3134,7 +3134,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3163,7 +3163,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3179,7 +3179,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3310,7 +3310,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3325,7 +3325,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3437,7 +3437,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3451,7 +3451,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3563,7 +3563,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3577,7 +3577,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3671,7 +3671,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationDeidentifyTemplate', () => { + describe('projectLocationDeidentifyTemplate', async () => { const fakePath = '/rendered/path/projectLocationDeidentifyTemplate'; const expectedParameters = { project: 'projectValue', @@ -3683,7 +3683,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match = @@ -3755,7 +3755,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationInspectTemplate', () => { + describe('projectLocationInspectTemplate', async () => { const fakePath = '/rendered/path/projectLocationInspectTemplate'; const expectedParameters = { project: 'projectValue', @@ -3767,7 +3767,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInspectTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationInspectTemplatePathTemplate.match = @@ -3835,7 +3835,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3847,7 +3847,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3904,7 +3904,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3917,7 +3917,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3981,7 +3981,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3995,7 +3995,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4070,7 +4070,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4084,7 +4084,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4159,7 +4159,7 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4172,7 +4172,7 @@ describe('v3.SecuritySettingsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts index e1b9ed35e20..4c7033ec127 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts @@ -271,7 +271,9 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.securitySettingsServiceStub); client.close().then(() => { done(); @@ -342,7 +344,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest() ); @@ -377,7 +379,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest() ); @@ -427,7 +429,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest() ); @@ -464,7 +466,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest() ); @@ -491,7 +493,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest() ); @@ -526,7 +528,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest() ); @@ -576,7 +578,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest() ); @@ -610,7 +612,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest() ); @@ -634,7 +636,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest() ); @@ -670,7 +672,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest() ); @@ -721,7 +723,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest() ); @@ -759,7 +761,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest() ); @@ -787,7 +789,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest() ); @@ -822,7 +824,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest() ); @@ -872,7 +874,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest() ); @@ -909,7 +911,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest() ); @@ -936,7 +938,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest() ); @@ -979,7 +981,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest() ); @@ -1039,7 +1041,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest() ); @@ -1073,7 +1075,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest() ); @@ -1139,7 +1141,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest() ); @@ -1194,7 +1196,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest() ); @@ -1247,7 +1249,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest() ); @@ -1292,7 +1294,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1325,7 +1327,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1372,7 +1374,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1410,7 +1412,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1461,7 +1463,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1498,7 +1500,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1512,7 +1514,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1565,7 +1567,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1579,7 +1581,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1647,7 +1649,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1661,7 +1663,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1728,7 +1730,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1743,7 +1745,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1807,7 +1809,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1823,7 +1825,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1922,7 +1924,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1937,7 +1939,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2001,7 +2003,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2017,7 +2019,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2092,7 +2094,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2107,7 +2109,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2171,7 +2173,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2186,7 +2188,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2250,7 +2252,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2266,7 +2268,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2341,7 +2343,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2357,7 +2359,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2432,7 +2434,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2447,7 +2449,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2511,7 +2513,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2526,7 +2528,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2607,7 +2609,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2622,7 +2624,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2686,7 +2688,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2701,7 +2703,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2765,7 +2767,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2778,7 +2780,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2817,7 +2819,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('organizationLocationDeidentifyTemplate', () => { + describe('organizationLocationDeidentifyTemplate', async () => { const fakePath = '/rendered/path/organizationLocationDeidentifyTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -2831,7 +2833,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match = @@ -2907,7 +2909,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('organizationLocationInspectTemplate', () => { + describe('organizationLocationInspectTemplate', async () => { const fakePath = '/rendered/path/organizationLocationInspectTemplate'; const expectedParameters = { organization: 'organizationValue', @@ -2921,7 +2923,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationLocationInspectTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.organizationLocationInspectTemplatePathTemplate.match = @@ -2993,7 +2995,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3009,7 +3011,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3084,7 +3086,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -3099,7 +3101,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3163,7 +3165,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -3179,7 +3181,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3254,7 +3256,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3266,7 +3268,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3295,7 +3297,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3313,7 +3315,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3444,7 +3446,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3461,7 +3463,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3573,7 +3575,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3589,7 +3591,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3701,7 +3703,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3717,7 +3719,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3811,7 +3813,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationDeidentifyTemplate', () => { + describe('projectLocationDeidentifyTemplate', async () => { const fakePath = '/rendered/path/projectLocationDeidentifyTemplate'; const expectedParameters = { project: 'projectValue', @@ -3825,7 +3827,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match = @@ -3897,7 +3899,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('projectLocationInspectTemplate', () => { + describe('projectLocationInspectTemplate', async () => { const fakePath = '/rendered/path/projectLocationInspectTemplate'; const expectedParameters = { project: 'projectValue', @@ -3911,7 +3913,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationInspectTemplatePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationInspectTemplatePathTemplate.match = @@ -3979,7 +3981,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3993,7 +3995,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4050,7 +4052,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4065,7 +4067,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4129,7 +4131,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4145,7 +4147,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4220,7 +4222,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -4235,7 +4237,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4299,7 +4301,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -4315,7 +4317,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4390,7 +4392,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4406,7 +4408,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4481,7 +4483,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4496,7 +4498,7 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts index 8f747bcc37a..4584d0cb714 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3.ts @@ -254,7 +254,9 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionEntityTypesStub); client.close().then(() => { done(); @@ -313,7 +315,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest() ); @@ -345,7 +347,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest() ); @@ -392,7 +394,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest() ); @@ -423,7 +425,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetSessionEntityTypeRequest() ); @@ -444,7 +446,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest() ); @@ -476,7 +478,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest() ); @@ -523,7 +525,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest() ); @@ -557,7 +559,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateSessionEntityTypeRequest() ); @@ -581,7 +583,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest() ); @@ -614,7 +616,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest() ); @@ -662,7 +664,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest() ); @@ -697,7 +699,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateSessionEntityTypeRequest() ); @@ -722,7 +724,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest() ); @@ -754,7 +756,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest() ); @@ -801,7 +803,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest() ); @@ -835,7 +837,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteSessionEntityTypeRequest() ); @@ -859,7 +861,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest() ); @@ -899,7 +901,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest() ); @@ -956,7 +958,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest() ); @@ -990,7 +992,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest() ); @@ -1059,7 +1061,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest() ); @@ -1117,7 +1119,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest() ); @@ -1171,7 +1173,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListSessionEntityTypesRequest() ); @@ -1217,7 +1219,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1247,7 +1249,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1291,7 +1293,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1326,7 +1328,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1374,7 +1376,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1415,7 +1417,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1494,7 +1496,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1574,7 +1576,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1670,8 +1672,7 @@ describe('v3.SessionEntityTypesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1690,7 +1691,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1699,8 +1700,7 @@ describe('v3.SessionEntityTypesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1716,7 +1716,7 @@ describe('v3.SessionEntityTypesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1727,7 +1727,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1780,7 +1780,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1791,7 +1791,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1859,7 +1859,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1870,7 +1870,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1937,7 +1937,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1949,7 +1949,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2013,7 +2013,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2026,7 +2026,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2125,7 +2125,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2138,7 +2138,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2213,7 +2213,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2225,7 +2225,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2289,7 +2289,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2301,7 +2301,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2365,7 +2365,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2378,7 +2378,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2453,7 +2453,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2465,7 +2465,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2529,7 +2529,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2541,7 +2541,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2622,7 +2622,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2634,7 +2634,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2698,7 +2698,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2710,7 +2710,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2774,7 +2774,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2784,7 +2784,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2823,7 +2823,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2836,7 +2836,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2911,7 +2911,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2920,7 +2920,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2949,7 +2949,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2964,7 +2964,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3095,7 +3095,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3109,7 +3109,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3221,7 +3221,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -3233,7 +3233,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3315,7 +3315,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3328,7 +3328,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3440,7 +3440,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3453,7 +3453,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3547,7 +3547,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3558,7 +3558,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3615,7 +3615,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3627,7 +3627,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3691,7 +3691,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3704,7 +3704,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3779,7 +3779,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3792,7 +3792,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3867,7 +3867,7 @@ describe('v3.SessionEntityTypesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3879,7 +3879,7 @@ describe('v3.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts index 7b5d8ee77eb..d83cfbaa4b5 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts @@ -263,7 +263,9 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionEntityTypesStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSessionEntityTypeRequest() ); @@ -359,7 +361,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSessionEntityTypeRequest() ); @@ -407,7 +409,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSessionEntityTypeRequest() ); @@ -439,7 +441,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetSessionEntityTypeRequest() ); @@ -461,7 +463,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSessionEntityTypeRequest() ); @@ -494,7 +496,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSessionEntityTypeRequest() ); @@ -542,7 +544,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSessionEntityTypeRequest() ); @@ -577,7 +579,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateSessionEntityTypeRequest() ); @@ -602,7 +604,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSessionEntityTypeRequest() ); @@ -636,7 +638,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSessionEntityTypeRequest() ); @@ -685,7 +687,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSessionEntityTypeRequest() ); @@ -721,7 +723,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateSessionEntityTypeRequest() ); @@ -747,7 +749,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSessionEntityTypeRequest() ); @@ -780,7 +782,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSessionEntityTypeRequest() ); @@ -828,7 +830,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSessionEntityTypeRequest() ); @@ -863,7 +865,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteSessionEntityTypeRequest() ); @@ -888,7 +890,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest() ); @@ -929,7 +931,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest() ); @@ -987,7 +989,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest() ); @@ -1022,7 +1024,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest() ); @@ -1092,7 +1094,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest() ); @@ -1151,7 +1153,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest() ); @@ -1206,7 +1208,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest() ); @@ -1253,7 +1255,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1284,7 +1286,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1329,7 +1331,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1365,7 +1367,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1414,7 +1416,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1451,7 +1453,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1463,7 +1465,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1516,7 +1518,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1528,7 +1530,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1596,7 +1598,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1608,7 +1610,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1675,7 +1677,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1688,7 +1690,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1752,7 +1754,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1766,7 +1768,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1865,7 +1867,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1878,7 +1880,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1942,7 +1944,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1956,7 +1958,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2031,7 +2033,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2044,7 +2046,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2108,7 +2110,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2121,7 +2123,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2185,7 +2187,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2199,7 +2201,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2274,7 +2276,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2288,7 +2290,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2363,7 +2365,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2376,7 +2378,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2440,7 +2442,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2453,7 +2455,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2534,7 +2536,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2547,7 +2549,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2611,7 +2613,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2624,7 +2626,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2688,7 +2690,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2699,7 +2701,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2738,7 +2740,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2752,7 +2754,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2827,7 +2829,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2840,7 +2842,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2904,7 +2906,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2918,7 +2920,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2993,7 +2995,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3003,7 +3005,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3032,7 +3034,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3048,7 +3050,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3179,7 +3181,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3194,7 +3196,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3306,7 +3308,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -3319,7 +3321,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3401,7 +3403,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3415,7 +3417,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3527,7 +3529,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3541,7 +3543,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3635,7 +3637,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3647,7 +3649,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3704,7 +3706,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3717,7 +3719,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3781,7 +3783,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3795,7 +3797,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3870,7 +3872,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3883,7 +3885,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3947,7 +3949,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3961,7 +3963,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4036,7 +4038,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4050,7 +4052,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4125,7 +4127,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4138,7 +4140,7 @@ describe('v3beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts index 1652d6e245e..f2548b4d6c8 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts @@ -247,7 +247,9 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionsStub); client.close().then(() => { done(); @@ -306,7 +308,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -337,7 +339,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -384,7 +386,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -415,7 +417,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -436,7 +438,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.MatchIntentRequest() ); @@ -467,7 +469,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.MatchIntentRequest() ); @@ -514,7 +516,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.MatchIntentRequest() ); @@ -545,7 +547,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.MatchIntentRequest() ); @@ -566,7 +568,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.FulfillIntentRequest() ); @@ -598,7 +600,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.FulfillIntentRequest() ); @@ -646,7 +648,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.FulfillIntentRequest() ); @@ -678,7 +680,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.FulfillIntentRequest() ); @@ -700,7 +702,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() ); @@ -732,7 +734,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() ); @@ -779,7 +781,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() ); @@ -810,7 +812,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() ); @@ -831,7 +833,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -874,9 +876,11 @@ describe('v3.SessionsClient', () => { it('invokes serverStreamingDetectIntent without error and gaxServerStreamingRetries enabled', async () => { const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', gaxServerStreamingRetries: true, }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -922,7 +926,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -965,7 +969,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DetectIntentRequest() ); @@ -1008,7 +1012,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest() ); @@ -1053,7 +1057,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest() ); @@ -1097,7 +1101,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1127,7 +1131,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1171,7 +1175,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1206,7 +1210,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1254,7 +1258,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1295,7 +1299,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1374,7 +1378,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1454,7 +1458,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1550,8 +1554,7 @@ describe('v3.SessionsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1570,7 +1573,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1579,8 +1582,7 @@ describe('v3.SessionsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1596,7 +1598,7 @@ describe('v3.SessionsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1607,7 +1609,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1660,7 +1662,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1671,7 +1673,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1739,7 +1741,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1750,7 +1752,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1817,7 +1819,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1829,7 +1831,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1893,7 +1895,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1906,7 +1908,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2005,7 +2007,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2018,7 +2020,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2093,7 +2095,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2105,7 +2107,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2169,7 +2171,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2181,7 +2183,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2245,7 +2247,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2258,7 +2260,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2333,7 +2335,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2345,7 +2347,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2409,7 +2411,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2421,7 +2423,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2502,7 +2504,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2514,7 +2516,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2578,7 +2580,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2590,7 +2592,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2654,7 +2656,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2667,7 +2669,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2742,7 +2744,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSession', () => { + describe('projectLocationAgentEnvironmentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSession'; const expectedParameters = { project: 'projectValue', @@ -2755,7 +2757,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.match = @@ -2867,7 +2869,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2882,7 +2884,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3013,7 +3015,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3027,7 +3029,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3139,7 +3141,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -3151,7 +3153,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3233,7 +3235,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3246,7 +3248,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3358,7 +3360,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3371,7 +3373,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3465,7 +3467,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -3477,7 +3479,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -3566,7 +3568,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3577,7 +3579,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3645,7 +3647,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3656,7 +3658,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3713,7 +3715,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3725,7 +3727,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3789,7 +3791,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3802,7 +3804,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3877,7 +3879,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3890,7 +3892,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3965,7 +3967,7 @@ describe('v3.SessionsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3977,7 +3979,7 @@ describe('v3.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts index 81571e059b9..f5f41667d8e 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts @@ -247,7 +247,9 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionsStub); client.close().then(() => { done(); @@ -306,7 +308,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -337,7 +339,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -384,7 +386,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -415,7 +417,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -436,7 +438,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest() ); @@ -467,7 +469,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest() ); @@ -514,7 +516,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest() ); @@ -545,7 +547,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest() ); @@ -566,7 +568,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest() ); @@ -598,7 +600,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest() ); @@ -646,7 +648,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest() ); @@ -678,7 +680,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest() ); @@ -700,7 +702,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() ); @@ -732,7 +734,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() ); @@ -779,7 +781,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() ); @@ -810,7 +812,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() ); @@ -831,7 +833,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -874,9 +876,11 @@ describe('v3beta1.SessionsClient', () => { it('invokes serverStreamingDetectIntent without error and gaxServerStreamingRetries enabled', async () => { const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', gaxServerStreamingRetries: true, }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -922,7 +926,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -965,7 +969,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest() ); @@ -1008,7 +1012,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest() ); @@ -1053,7 +1057,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest() ); @@ -1097,7 +1101,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1127,7 +1131,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1171,7 +1175,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1206,7 +1210,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1254,7 +1258,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1291,7 +1295,7 @@ describe('v3beta1.SessionsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1302,7 +1306,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1355,7 +1359,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1366,7 +1370,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1434,7 +1438,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1445,7 +1449,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1512,7 +1516,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1524,7 +1528,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1588,7 +1592,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1601,7 +1605,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1700,7 +1704,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1712,7 +1716,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1776,7 +1780,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1789,7 +1793,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1864,7 +1868,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1876,7 +1880,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1940,7 +1944,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -1952,7 +1956,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2016,7 +2020,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2029,7 +2033,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2104,7 +2108,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2117,7 +2121,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2192,7 +2196,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2204,7 +2208,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2268,7 +2272,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2280,7 +2284,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2361,7 +2365,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2373,7 +2377,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2437,7 +2441,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2449,7 +2453,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2513,7 +2517,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2526,7 +2530,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2601,7 +2605,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2613,7 +2617,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2677,7 +2681,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2690,7 +2694,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2765,7 +2769,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSession', () => { + describe('projectLocationAgentEnvironmentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSession'; const expectedParameters = { project: 'projectValue', @@ -2778,7 +2782,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.match = @@ -2890,7 +2894,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -2905,7 +2909,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3036,7 +3040,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3050,7 +3054,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3162,7 +3166,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -3174,7 +3178,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3256,7 +3260,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3269,7 +3273,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3381,7 +3385,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3394,7 +3398,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3488,7 +3492,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -3500,7 +3504,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -3589,7 +3593,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3600,7 +3604,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3668,7 +3672,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3679,7 +3683,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3736,7 +3740,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3748,7 +3752,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3812,7 +3816,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3825,7 +3829,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3900,7 +3904,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3912,7 +3916,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3976,7 +3980,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3989,7 +3993,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4064,7 +4068,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4077,7 +4081,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4152,7 +4156,7 @@ describe('v3beta1.SessionsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4164,7 +4168,7 @@ describe('v3beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts index b3d68e7376e..e4a03bc4641 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3.ts @@ -287,7 +287,9 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.testCasesStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest() ); @@ -378,7 +380,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest() ); @@ -425,7 +427,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest() ); @@ -456,7 +458,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchDeleteTestCasesRequest() ); @@ -477,7 +479,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseRequest() ); @@ -508,7 +510,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseRequest() ); @@ -555,7 +557,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseRequest() ); @@ -586,7 +588,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseRequest() ); @@ -607,7 +609,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest() ); @@ -638,7 +640,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest() ); @@ -685,7 +687,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest() ); @@ -716,7 +718,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTestCaseRequest() ); @@ -737,7 +739,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest() ); @@ -769,7 +771,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest() ); @@ -817,7 +819,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest() ); @@ -849,7 +851,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTestCaseRequest() ); @@ -871,7 +873,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest() ); @@ -902,7 +904,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest() ); @@ -949,7 +951,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest() ); @@ -980,7 +982,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest() ); @@ -1001,7 +1003,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest() ); @@ -1032,7 +1034,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest() ); @@ -1079,7 +1081,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest() ); @@ -1110,7 +1112,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTestCaseResultRequest() ); @@ -1131,7 +1133,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); @@ -1163,7 +1165,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); @@ -1217,7 +1219,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); @@ -1248,7 +1250,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.RunTestCaseRequest() ); @@ -1281,7 +1283,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1303,7 +1305,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1321,7 +1323,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest() ); @@ -1354,7 +1356,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest() ); @@ -1408,7 +1410,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest() ); @@ -1439,7 +1441,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.BatchRunTestCasesRequest() ); @@ -1472,7 +1474,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1494,7 +1496,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1515,7 +1517,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest() ); @@ -1548,7 +1550,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest() ); @@ -1602,7 +1604,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest() ); @@ -1633,7 +1635,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ImportTestCasesRequest() ); @@ -1666,7 +1668,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1688,7 +1690,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1709,7 +1711,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest() ); @@ -1742,7 +1744,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest() ); @@ -1796,7 +1798,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest() ); @@ -1827,7 +1829,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest() ); @@ -1860,7 +1862,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1882,7 +1884,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1903,7 +1905,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCasesRequest() ); @@ -1942,7 +1944,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCasesRequest() ); @@ -1997,7 +1999,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCasesRequest() ); @@ -2028,7 +2030,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCasesRequest() ); @@ -2088,7 +2090,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCasesRequest() ); @@ -2137,7 +2139,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCasesRequest() ); @@ -2186,7 +2188,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCasesRequest() ); @@ -2228,7 +2230,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest() ); @@ -2268,7 +2270,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest() ); @@ -2325,7 +2327,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest() ); @@ -2356,7 +2358,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest() ); @@ -2417,7 +2419,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest() ); @@ -2467,7 +2469,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest() ); @@ -2517,7 +2519,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest() ); @@ -2559,7 +2561,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2589,7 +2591,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2633,7 +2635,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2668,7 +2670,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2716,7 +2718,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2757,7 +2759,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2836,7 +2838,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2916,7 +2918,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3012,8 +3014,7 @@ describe('v3.TestCasesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3032,7 +3033,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3041,8 +3042,7 @@ describe('v3.TestCasesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3058,7 +3058,7 @@ describe('v3.TestCasesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -3069,7 +3069,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3122,7 +3122,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -3133,7 +3133,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3201,7 +3201,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3212,7 +3212,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3279,7 +3279,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -3291,7 +3291,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3355,7 +3355,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -3368,7 +3368,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3467,7 +3467,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3480,7 +3480,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3555,7 +3555,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3567,7 +3567,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3631,7 +3631,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3643,7 +3643,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3707,7 +3707,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3720,7 +3720,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3795,7 +3795,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3807,7 +3807,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3871,7 +3871,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3883,7 +3883,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3964,7 +3964,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3976,7 +3976,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4040,7 +4040,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -4052,7 +4052,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4116,7 +4116,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4126,7 +4126,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4165,7 +4165,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -4178,7 +4178,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4253,7 +4253,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4262,7 +4262,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4291,7 +4291,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -4306,7 +4306,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -4437,7 +4437,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -4451,7 +4451,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4563,7 +4563,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4576,7 +4576,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4688,7 +4688,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4701,7 +4701,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4795,7 +4795,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4806,7 +4806,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4863,7 +4863,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4875,7 +4875,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4939,7 +4939,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4952,7 +4952,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5027,7 +5027,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -5040,7 +5040,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5115,7 +5115,7 @@ describe('v3.TestCasesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -5127,7 +5127,7 @@ describe('v3.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts index ca2d7059739..72ea9a1e5d3 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts @@ -287,7 +287,9 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.testCasesStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest() ); @@ -378,7 +380,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest() ); @@ -425,7 +427,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest() ); @@ -456,7 +458,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest() ); @@ -477,7 +479,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest() ); @@ -508,7 +510,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest() ); @@ -555,7 +557,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest() ); @@ -586,7 +588,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest() ); @@ -607,7 +609,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest() ); @@ -638,7 +640,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest() ); @@ -685,7 +687,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest() ); @@ -716,7 +718,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest() ); @@ -737,7 +739,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest() ); @@ -769,7 +771,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest() ); @@ -817,7 +819,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest() ); @@ -849,7 +851,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest() ); @@ -871,7 +873,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest() ); @@ -902,7 +904,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest() ); @@ -949,7 +951,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest() ); @@ -980,7 +982,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest() ); @@ -1001,7 +1003,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseResultRequest() ); @@ -1032,7 +1034,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseResultRequest() ); @@ -1079,7 +1081,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseResultRequest() ); @@ -1110,7 +1112,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTestCaseResultRequest() ); @@ -1131,7 +1133,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); @@ -1163,7 +1165,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); @@ -1217,7 +1219,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); @@ -1248,7 +1250,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest() ); @@ -1281,7 +1283,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1303,7 +1305,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1321,7 +1323,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest() ); @@ -1354,7 +1356,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest() ); @@ -1408,7 +1410,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest() ); @@ -1439,7 +1441,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.BatchRunTestCasesRequest() ); @@ -1472,7 +1474,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1494,7 +1496,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1515,7 +1517,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest() ); @@ -1548,7 +1550,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest() ); @@ -1602,7 +1604,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest() ); @@ -1633,7 +1635,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest() ); @@ -1666,7 +1668,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1688,7 +1690,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1709,7 +1711,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest() ); @@ -1742,7 +1744,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest() ); @@ -1796,7 +1798,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest() ); @@ -1827,7 +1829,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest() ); @@ -1860,7 +1862,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1882,7 +1884,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1903,7 +1905,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest() ); @@ -1942,7 +1944,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest() ); @@ -1999,7 +2001,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest() ); @@ -2030,7 +2032,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest() ); @@ -2091,7 +2093,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest() ); @@ -2141,7 +2143,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest() ); @@ -2191,7 +2193,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest() ); @@ -2234,7 +2236,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest() ); @@ -2274,7 +2276,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest() ); @@ -2331,7 +2333,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest() ); @@ -2362,7 +2364,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest() ); @@ -2425,7 +2427,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest() ); @@ -2477,7 +2479,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest() ); @@ -2527,7 +2529,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest() ); @@ -2569,7 +2571,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2599,7 +2601,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2643,7 +2645,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2678,7 +2680,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2726,7 +2728,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2767,7 +2769,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2846,7 +2848,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2926,7 +2928,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3022,8 +3024,7 @@ describe('v3beta1.TestCasesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3042,7 +3043,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3051,8 +3052,7 @@ describe('v3beta1.TestCasesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3068,7 +3068,7 @@ describe('v3beta1.TestCasesClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -3079,7 +3079,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3132,7 +3132,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -3143,7 +3143,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3211,7 +3211,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3222,7 +3222,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3289,7 +3289,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -3301,7 +3301,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3365,7 +3365,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -3378,7 +3378,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3477,7 +3477,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -3489,7 +3489,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3553,7 +3553,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3566,7 +3566,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3641,7 +3641,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3653,7 +3653,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3717,7 +3717,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3729,7 +3729,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3793,7 +3793,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -3806,7 +3806,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3881,7 +3881,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3894,7 +3894,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3969,7 +3969,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3981,7 +3981,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4045,7 +4045,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -4057,7 +4057,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4138,7 +4138,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -4150,7 +4150,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4214,7 +4214,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -4226,7 +4226,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4290,7 +4290,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4300,7 +4300,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4339,7 +4339,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -4352,7 +4352,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4427,7 +4427,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -4439,7 +4439,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4503,7 +4503,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -4516,7 +4516,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4591,7 +4591,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4600,7 +4600,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4629,7 +4629,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -4644,7 +4644,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -4775,7 +4775,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -4789,7 +4789,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4901,7 +4901,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4914,7 +4914,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -5026,7 +5026,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -5039,7 +5039,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -5133,7 +5133,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -5144,7 +5144,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5201,7 +5201,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -5213,7 +5213,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5277,7 +5277,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -5290,7 +5290,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5365,7 +5365,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -5377,7 +5377,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5441,7 +5441,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -5454,7 +5454,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5529,7 +5529,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -5542,7 +5542,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5617,7 +5617,7 @@ describe('v3beta1.TestCasesClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -5629,7 +5629,7 @@ describe('v3beta1.TestCasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_tools_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_tools_v3beta1.ts index 3f7ba040e3e..29166fb1f7a 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_tools_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_tools_v3beta1.ts @@ -287,7 +287,9 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.toolsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest() ); @@ -377,7 +379,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest() ); @@ -424,7 +426,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest() ); @@ -455,7 +457,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest() ); @@ -476,7 +478,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolRequest() ); @@ -507,7 +509,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolRequest() ); @@ -554,7 +556,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolRequest() ); @@ -582,7 +584,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolRequest() ); @@ -603,7 +605,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest() ); @@ -635,7 +637,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest() ); @@ -683,7 +685,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest() ); @@ -715,7 +717,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest() ); @@ -737,7 +739,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest() ); @@ -768,7 +770,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest() ); @@ -815,7 +817,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest() ); @@ -846,7 +848,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest() ); @@ -867,7 +869,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolVersionRequest() ); @@ -898,7 +900,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolVersionRequest() ); @@ -945,7 +947,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolVersionRequest() ); @@ -976,7 +978,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateToolVersionRequest() ); @@ -997,7 +999,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolVersionRequest() ); @@ -1028,7 +1030,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolVersionRequest() ); @@ -1075,7 +1077,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolVersionRequest() ); @@ -1106,7 +1108,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetToolVersionRequest() ); @@ -1127,7 +1129,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolVersionRequest() ); @@ -1158,7 +1160,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolVersionRequest() ); @@ -1205,7 +1207,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolVersionRequest() ); @@ -1236,7 +1238,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteToolVersionRequest() ); @@ -1257,7 +1259,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreToolVersionRequest() ); @@ -1289,7 +1291,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreToolVersionRequest() ); @@ -1336,7 +1338,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreToolVersionRequest() ); @@ -1367,7 +1369,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.RestoreToolVersionRequest() ); @@ -1388,7 +1390,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest() ); @@ -1420,7 +1422,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest() ); @@ -1474,7 +1476,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest() ); @@ -1505,7 +1507,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest() ); @@ -1538,7 +1540,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1560,7 +1562,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1578,7 +1580,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest() ); @@ -1617,7 +1619,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest() ); @@ -1672,7 +1674,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest() ); @@ -1700,7 +1702,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest() ); @@ -1760,7 +1762,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest() ); @@ -1811,7 +1813,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest() ); @@ -1859,7 +1861,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest() ); @@ -1902,7 +1904,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolVersionsRequest() ); @@ -1941,7 +1943,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolVersionsRequest() ); @@ -1998,7 +2000,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolVersionsRequest() ); @@ -2029,7 +2031,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolVersionsRequest() ); @@ -2090,7 +2092,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolVersionsRequest() ); @@ -2140,7 +2142,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolVersionsRequest() ); @@ -2190,7 +2192,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListToolVersionsRequest() ); @@ -2232,7 +2234,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2262,7 +2264,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2306,7 +2308,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2341,7 +2343,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2389,7 +2391,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2430,7 +2432,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2509,7 +2511,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2589,7 +2591,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2685,8 +2687,7 @@ describe('v3beta1.ToolsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2705,7 +2706,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2714,8 +2715,7 @@ describe('v3beta1.ToolsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2731,7 +2731,7 @@ describe('v3beta1.ToolsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2742,7 +2742,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2795,7 +2795,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2806,7 +2806,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2874,7 +2874,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2885,7 +2885,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2952,7 +2952,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2964,7 +2964,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3028,7 +3028,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -3041,7 +3041,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3140,7 +3140,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -3152,7 +3152,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3216,7 +3216,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -3229,7 +3229,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3304,7 +3304,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -3316,7 +3316,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3380,7 +3380,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -3392,7 +3392,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3456,7 +3456,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -3469,7 +3469,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3544,7 +3544,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -3557,7 +3557,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3632,7 +3632,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -3644,7 +3644,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3708,7 +3708,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3720,7 +3720,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3801,7 +3801,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3813,7 +3813,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3877,7 +3877,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3889,7 +3889,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3953,7 +3953,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3963,7 +3963,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4002,7 +4002,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -4015,7 +4015,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4090,7 +4090,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -4102,7 +4102,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4166,7 +4166,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -4179,7 +4179,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4254,7 +4254,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4263,7 +4263,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4292,7 +4292,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -4307,7 +4307,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -4438,7 +4438,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -4452,7 +4452,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -4564,7 +4564,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4577,7 +4577,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4689,7 +4689,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4702,7 +4702,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4796,7 +4796,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4807,7 +4807,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4864,7 +4864,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4876,7 +4876,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4940,7 +4940,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4953,7 +4953,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5028,7 +5028,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -5040,7 +5040,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5104,7 +5104,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -5117,7 +5117,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5192,7 +5192,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -5205,7 +5205,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5280,7 +5280,7 @@ describe('v3beta1.ToolsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -5292,7 +5292,7 @@ describe('v3beta1.ToolsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts index 4227a4a6ada..1e11c7c0f90 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3.ts @@ -265,7 +265,9 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.transitionRouteGroupsStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest() ); @@ -361,7 +363,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest() ); @@ -409,7 +411,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest() ); @@ -444,7 +446,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetTransitionRouteGroupRequest() ); @@ -469,7 +471,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest() ); @@ -502,7 +504,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest() ); @@ -550,7 +552,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest() ); @@ -585,7 +587,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateTransitionRouteGroupRequest() ); @@ -610,7 +612,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest() ); @@ -644,7 +646,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest() ); @@ -693,7 +695,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest() ); @@ -729,7 +731,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateTransitionRouteGroupRequest() ); @@ -755,7 +757,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest() ); @@ -788,7 +790,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest() ); @@ -836,7 +838,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest() ); @@ -871,7 +873,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteTransitionRouteGroupRequest() ); @@ -896,7 +898,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest() ); @@ -937,7 +939,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest() ); @@ -995,7 +997,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest() ); @@ -1030,7 +1032,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest() ); @@ -1100,7 +1102,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest() ); @@ -1159,7 +1161,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest() ); @@ -1214,7 +1216,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListTransitionRouteGroupsRequest() ); @@ -1261,7 +1263,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1292,7 +1294,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1337,7 +1339,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1373,7 +1375,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1422,7 +1424,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1464,7 +1466,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1546,7 +1548,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1629,7 +1631,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1728,8 +1730,7 @@ describe('v3.TransitionRouteGroupsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1749,7 +1750,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1758,8 +1759,7 @@ describe('v3.TransitionRouteGroupsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1775,7 +1775,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1787,7 +1787,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1840,7 +1840,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1852,7 +1852,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1920,7 +1920,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1932,7 +1932,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1999,7 +1999,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2012,7 +2012,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2076,7 +2076,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2090,7 +2090,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2189,7 +2189,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2203,7 +2203,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2278,7 +2278,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2291,7 +2291,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2355,7 +2355,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2368,7 +2368,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2432,7 +2432,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2446,7 +2446,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2521,7 +2521,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2534,7 +2534,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2598,7 +2598,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2611,7 +2611,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2692,7 +2692,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2705,7 +2705,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2769,7 +2769,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2782,7 +2782,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2846,7 +2846,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2857,7 +2857,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2896,7 +2896,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2910,7 +2910,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2985,7 +2985,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2995,7 +2995,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3024,7 +3024,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3040,7 +3040,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3171,7 +3171,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3186,7 +3186,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3298,7 +3298,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3312,7 +3312,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3424,7 +3424,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3438,7 +3438,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3532,7 +3532,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3544,7 +3544,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3601,7 +3601,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3614,7 +3614,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3678,7 +3678,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3692,7 +3692,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3767,7 +3767,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3781,7 +3781,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3856,7 +3856,7 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3869,7 +3869,7 @@ describe('v3.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts index f1be970d1cb..8aebd9eaf89 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts @@ -265,7 +265,9 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.transitionRouteGroupsStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTransitionRouteGroupRequest() ); @@ -361,7 +363,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTransitionRouteGroupRequest() ); @@ -409,7 +411,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTransitionRouteGroupRequest() ); @@ -444,7 +446,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetTransitionRouteGroupRequest() ); @@ -469,7 +471,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTransitionRouteGroupRequest() ); @@ -502,7 +504,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTransitionRouteGroupRequest() ); @@ -550,7 +552,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTransitionRouteGroupRequest() ); @@ -585,7 +587,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateTransitionRouteGroupRequest() ); @@ -610,7 +612,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTransitionRouteGroupRequest() ); @@ -644,7 +646,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTransitionRouteGroupRequest() ); @@ -693,7 +695,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTransitionRouteGroupRequest() ); @@ -729,7 +731,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateTransitionRouteGroupRequest() ); @@ -755,7 +757,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteTransitionRouteGroupRequest() ); @@ -788,7 +790,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteTransitionRouteGroupRequest() ); @@ -836,7 +838,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteTransitionRouteGroupRequest() ); @@ -871,7 +873,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteTransitionRouteGroupRequest() ); @@ -896,7 +898,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest() ); @@ -937,7 +939,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest() ); @@ -995,7 +997,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest() ); @@ -1030,7 +1032,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest() ); @@ -1100,7 +1102,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest() ); @@ -1159,7 +1161,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest() ); @@ -1214,7 +1216,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest() ); @@ -1261,7 +1263,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1292,7 +1294,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1337,7 +1339,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1373,7 +1375,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1422,7 +1424,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1459,7 +1461,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1471,7 +1473,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1524,7 +1526,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1536,7 +1538,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1604,7 +1606,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1616,7 +1618,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1683,7 +1685,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1696,7 +1698,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1760,7 +1762,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1774,7 +1776,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1873,7 +1875,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1886,7 +1888,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1950,7 +1952,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1964,7 +1966,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2039,7 +2041,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2052,7 +2054,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2116,7 +2118,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2129,7 +2131,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2193,7 +2195,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2207,7 +2209,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2282,7 +2284,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2296,7 +2298,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2371,7 +2373,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2384,7 +2386,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2448,7 +2450,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2461,7 +2463,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2542,7 +2544,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2555,7 +2557,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2619,7 +2621,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2632,7 +2634,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2696,7 +2698,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2707,7 +2709,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2746,7 +2748,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2760,7 +2762,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2835,7 +2837,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2848,7 +2850,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2912,7 +2914,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2926,7 +2928,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3001,7 +3003,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3011,7 +3013,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3040,7 +3042,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3056,7 +3058,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3187,7 +3189,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3202,7 +3204,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3314,7 +3316,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3328,7 +3330,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3440,7 +3442,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3454,7 +3456,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3548,7 +3550,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3560,7 +3562,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3617,7 +3619,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3630,7 +3632,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3694,7 +3696,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3708,7 +3710,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3783,7 +3785,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3796,7 +3798,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3860,7 +3862,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3874,7 +3876,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3949,7 +3951,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3963,7 +3965,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4038,7 +4040,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4051,7 +4053,7 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts index bfdee6f424e..415ad7e5be3 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts @@ -287,7 +287,9 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.versionsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetVersionRequest() ); @@ -377,7 +379,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetVersionRequest() ); @@ -424,7 +426,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetVersionRequest() ); @@ -455,7 +457,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetVersionRequest() ); @@ -476,7 +478,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateVersionRequest() ); @@ -508,7 +510,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateVersionRequest() ); @@ -556,7 +558,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateVersionRequest() ); @@ -588,7 +590,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateVersionRequest() ); @@ -610,7 +612,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteVersionRequest() ); @@ -641,7 +643,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteVersionRequest() ); @@ -688,7 +690,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteVersionRequest() ); @@ -719,7 +721,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteVersionRequest() ); @@ -740,7 +742,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CompareVersionsRequest() ); @@ -771,7 +773,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CompareVersionsRequest() ); @@ -818,7 +820,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CompareVersionsRequest() ); @@ -849,7 +851,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CompareVersionsRequest() ); @@ -870,7 +872,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateVersionRequest() ); @@ -903,7 +905,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateVersionRequest() ); @@ -957,7 +959,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateVersionRequest() ); @@ -988,7 +990,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateVersionRequest() ); @@ -1021,7 +1023,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1043,7 +1045,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1064,7 +1066,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LoadVersionRequest() ); @@ -1096,7 +1098,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LoadVersionRequest() ); @@ -1150,7 +1152,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LoadVersionRequest() ); @@ -1181,7 +1183,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.LoadVersionRequest() ); @@ -1214,7 +1216,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1236,7 +1238,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1254,7 +1256,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListVersionsRequest() ); @@ -1293,7 +1295,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListVersionsRequest() ); @@ -1348,7 +1350,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListVersionsRequest() ); @@ -1379,7 +1381,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListVersionsRequest() ); @@ -1439,7 +1441,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListVersionsRequest() ); @@ -1490,7 +1492,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListVersionsRequest() ); @@ -1539,7 +1541,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListVersionsRequest() ); @@ -1580,7 +1582,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1610,7 +1612,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1654,7 +1656,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1689,7 +1691,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1737,7 +1739,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1778,7 +1780,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1857,7 +1859,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1937,7 +1939,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2033,8 +2035,7 @@ describe('v3.VersionsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2053,7 +2054,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2062,8 +2063,7 @@ describe('v3.VersionsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2079,7 +2079,7 @@ describe('v3.VersionsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2090,7 +2090,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2143,7 +2143,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2154,7 +2154,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2222,7 +2222,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2233,7 +2233,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2300,7 +2300,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2312,7 +2312,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2376,7 +2376,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2389,7 +2389,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2488,7 +2488,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2501,7 +2501,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2576,7 +2576,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2588,7 +2588,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2652,7 +2652,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2664,7 +2664,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2728,7 +2728,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2741,7 +2741,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2816,7 +2816,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2828,7 +2828,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2892,7 +2892,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2904,7 +2904,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2985,7 +2985,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2997,7 +2997,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3061,7 +3061,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3073,7 +3073,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3137,7 +3137,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3147,7 +3147,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3186,7 +3186,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3199,7 +3199,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3274,7 +3274,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3283,7 +3283,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3312,7 +3312,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3327,7 +3327,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3458,7 +3458,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3472,7 +3472,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3584,7 +3584,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3597,7 +3597,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3709,7 +3709,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3722,7 +3722,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3816,7 +3816,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3827,7 +3827,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3884,7 +3884,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3896,7 +3896,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3960,7 +3960,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3973,7 +3973,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4048,7 +4048,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4061,7 +4061,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4136,7 +4136,7 @@ describe('v3.VersionsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4148,7 +4148,7 @@ describe('v3.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts index 2debc30c395..abb1aefc668 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts @@ -287,7 +287,9 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.versionsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetVersionRequest() ); @@ -377,7 +379,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetVersionRequest() ); @@ -424,7 +426,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetVersionRequest() ); @@ -455,7 +457,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetVersionRequest() ); @@ -476,7 +478,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateVersionRequest() ); @@ -508,7 +510,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateVersionRequest() ); @@ -556,7 +558,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateVersionRequest() ); @@ -588,7 +590,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateVersionRequest() ); @@ -610,7 +612,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteVersionRequest() ); @@ -641,7 +643,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteVersionRequest() ); @@ -688,7 +690,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteVersionRequest() ); @@ -719,7 +721,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteVersionRequest() ); @@ -740,7 +742,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CompareVersionsRequest() ); @@ -771,7 +773,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CompareVersionsRequest() ); @@ -818,7 +820,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CompareVersionsRequest() ); @@ -849,7 +851,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CompareVersionsRequest() ); @@ -870,7 +872,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateVersionRequest() ); @@ -903,7 +905,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateVersionRequest() ); @@ -957,7 +959,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateVersionRequest() ); @@ -988,7 +990,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateVersionRequest() ); @@ -1021,7 +1023,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1043,7 +1045,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1064,7 +1066,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest() ); @@ -1096,7 +1098,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest() ); @@ -1150,7 +1152,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest() ); @@ -1181,7 +1183,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest() ); @@ -1214,7 +1216,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1236,7 +1238,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1254,7 +1256,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest() ); @@ -1293,7 +1295,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest() ); @@ -1348,7 +1350,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest() ); @@ -1379,7 +1381,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest() ); @@ -1440,7 +1442,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest() ); @@ -1492,7 +1494,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest() ); @@ -1542,7 +1544,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest() ); @@ -1584,7 +1586,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1614,7 +1616,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1658,7 +1660,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1693,7 +1695,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1741,7 +1743,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1782,7 +1784,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1861,7 +1863,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1941,7 +1943,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2037,8 +2039,7 @@ describe('v3beta1.VersionsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2057,7 +2058,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2066,8 +2067,7 @@ describe('v3beta1.VersionsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2083,7 +2083,7 @@ describe('v3beta1.VersionsClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -2094,7 +2094,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2147,7 +2147,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -2158,7 +2158,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2226,7 +2226,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2237,7 +2237,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2304,7 +2304,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -2316,7 +2316,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2380,7 +2380,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -2393,7 +2393,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2492,7 +2492,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -2504,7 +2504,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2568,7 +2568,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2581,7 +2581,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2656,7 +2656,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2668,7 +2668,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2732,7 +2732,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2744,7 +2744,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2808,7 +2808,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2821,7 +2821,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2896,7 +2896,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2909,7 +2909,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2984,7 +2984,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2996,7 +2996,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3060,7 +3060,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -3072,7 +3072,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3153,7 +3153,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -3165,7 +3165,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3229,7 +3229,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -3241,7 +3241,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3305,7 +3305,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3315,7 +3315,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3354,7 +3354,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -3367,7 +3367,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3442,7 +3442,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -3454,7 +3454,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3518,7 +3518,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -3531,7 +3531,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3606,7 +3606,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3615,7 +3615,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3644,7 +3644,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3659,7 +3659,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3790,7 +3790,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3804,7 +3804,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3916,7 +3916,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3929,7 +3929,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4041,7 +4041,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -4054,7 +4054,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -4148,7 +4148,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -4159,7 +4159,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4216,7 +4216,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -4228,7 +4228,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4292,7 +4292,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -4305,7 +4305,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4380,7 +4380,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -4392,7 +4392,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4456,7 +4456,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -4469,7 +4469,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4544,7 +4544,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4557,7 +4557,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4632,7 +4632,7 @@ describe('v3beta1.VersionsClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4644,7 +4644,7 @@ describe('v3beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts index 70d8a014a76..153997d96a9 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts @@ -250,7 +250,9 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.webhooksStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetWebhookRequest() ); @@ -340,7 +342,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetWebhookRequest() ); @@ -387,7 +389,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetWebhookRequest() ); @@ -418,7 +420,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.GetWebhookRequest() ); @@ -439,7 +441,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateWebhookRequest() ); @@ -470,7 +472,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateWebhookRequest() ); @@ -517,7 +519,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateWebhookRequest() ); @@ -548,7 +550,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.CreateWebhookRequest() ); @@ -569,7 +571,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest() ); @@ -601,7 +603,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest() ); @@ -649,7 +651,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest() ); @@ -681,7 +683,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.UpdateWebhookRequest() ); @@ -703,7 +705,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest() ); @@ -734,7 +736,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest() ); @@ -781,7 +783,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest() ); @@ -812,7 +814,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.DeleteWebhookRequest() ); @@ -833,7 +835,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListWebhooksRequest() ); @@ -872,7 +874,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListWebhooksRequest() ); @@ -927,7 +929,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListWebhooksRequest() ); @@ -958,7 +960,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListWebhooksRequest() ); @@ -1018,7 +1020,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListWebhooksRequest() ); @@ -1069,7 +1071,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListWebhooksRequest() ); @@ -1118,7 +1120,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3.ListWebhooksRequest() ); @@ -1159,7 +1161,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1189,7 +1191,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1233,7 +1235,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1268,7 +1270,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1316,7 +1318,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1357,7 +1359,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1436,7 +1438,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1516,7 +1518,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1612,8 +1614,7 @@ describe('v3.WebhooksClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1632,7 +1633,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1641,8 +1642,7 @@ describe('v3.WebhooksClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1658,7 +1658,7 @@ describe('v3.WebhooksClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1669,7 +1669,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1722,7 +1722,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1733,7 +1733,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1801,7 +1801,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1812,7 +1812,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1879,7 +1879,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1891,7 +1891,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1955,7 +1955,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1968,7 +1968,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2067,7 +2067,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -2080,7 +2080,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2155,7 +2155,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -2167,7 +2167,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2231,7 +2231,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2243,7 +2243,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2307,7 +2307,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2320,7 +2320,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2395,7 +2395,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2407,7 +2407,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2471,7 +2471,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2483,7 +2483,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2564,7 +2564,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2576,7 +2576,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2640,7 +2640,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2652,7 +2652,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2716,7 +2716,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2726,7 +2726,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2765,7 +2765,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2778,7 +2778,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2853,7 +2853,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2862,7 +2862,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2891,7 +2891,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('projectLocationAgentEnvironmentSession', () => { + describe('projectLocationAgentEnvironmentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSession'; const expectedParameters = { project: 'projectValue', @@ -2904,7 +2904,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.match = @@ -3016,7 +3016,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3031,7 +3031,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3162,7 +3162,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3176,7 +3176,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3288,7 +3288,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -3300,7 +3300,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3382,7 +3382,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3395,7 +3395,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3507,7 +3507,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3520,7 +3520,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3614,7 +3614,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3625,7 +3625,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3682,7 +3682,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3694,7 +3694,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3758,7 +3758,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3771,7 +3771,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3846,7 +3846,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -3859,7 +3859,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3934,7 +3934,7 @@ describe('v3.WebhooksClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -3946,7 +3946,7 @@ describe('v3.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts index caca0145ccd..1adb542f3d2 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts @@ -250,7 +250,9 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.webhooksStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetWebhookRequest() ); @@ -340,7 +342,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetWebhookRequest() ); @@ -387,7 +389,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetWebhookRequest() ); @@ -418,7 +420,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.GetWebhookRequest() ); @@ -439,7 +441,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateWebhookRequest() ); @@ -470,7 +472,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateWebhookRequest() ); @@ -517,7 +519,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateWebhookRequest() ); @@ -548,7 +550,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.CreateWebhookRequest() ); @@ -569,7 +571,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateWebhookRequest() ); @@ -601,7 +603,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateWebhookRequest() ); @@ -649,7 +651,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateWebhookRequest() ); @@ -681,7 +683,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.UpdateWebhookRequest() ); @@ -703,7 +705,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteWebhookRequest() ); @@ -734,7 +736,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteWebhookRequest() ); @@ -781,7 +783,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteWebhookRequest() ); @@ -812,7 +814,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.DeleteWebhookRequest() ); @@ -833,7 +835,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest() ); @@ -872,7 +874,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest() ); @@ -927,7 +929,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest() ); @@ -958,7 +960,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest() ); @@ -1019,7 +1021,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest() ); @@ -1071,7 +1073,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest() ); @@ -1121,7 +1123,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest() ); @@ -1163,7 +1165,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1193,7 +1195,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1237,7 +1239,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1272,7 +1274,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1320,7 +1322,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1357,7 +1359,7 @@ describe('v3beta1.WebhooksClient', () => { }); describe('Path templates', () => { - describe('agent', () => { + describe('agent', async () => { const fakePath = '/rendered/path/agent'; const expectedParameters = { project: 'projectValue', @@ -1368,7 +1370,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1421,7 +1423,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('agentGenerativeSettings', () => { + describe('agentGenerativeSettings', async () => { const fakePath = '/rendered/path/agentGenerativeSettings'; const expectedParameters = { project: 'projectValue', @@ -1432,7 +1434,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentGenerativeSettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1500,7 +1502,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('agentValidationResult', () => { + describe('agentValidationResult', async () => { const fakePath = '/rendered/path/agentValidationResult'; const expectedParameters = { project: 'projectValue', @@ -1511,7 +1513,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.agentValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1578,7 +1580,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('changelog', () => { + describe('changelog', async () => { const fakePath = '/rendered/path/changelog'; const expectedParameters = { project: 'projectValue', @@ -1590,7 +1592,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changelogPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1654,7 +1656,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('continuousTestResult', () => { + describe('continuousTestResult', async () => { const fakePath = '/rendered/path/continuousTestResult'; const expectedParameters = { project: 'projectValue', @@ -1667,7 +1669,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.continuousTestResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1766,7 +1768,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('conversation', () => { + describe('conversation', async () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { project: 'projectValue', @@ -1778,7 +1780,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1842,7 +1844,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('deployment', () => { + describe('deployment', async () => { const fakePath = '/rendered/path/deployment'; const expectedParameters = { project: 'projectValue', @@ -1855,7 +1857,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.deploymentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1930,7 +1932,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('entityType', () => { + describe('entityType', async () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { project: 'projectValue', @@ -1942,7 +1944,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.entityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2006,7 +2008,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('environment', () => { + describe('environment', async () => { const fakePath = '/rendered/path/environment'; const expectedParameters = { project: 'projectValue', @@ -2018,7 +2020,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.environmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2082,7 +2084,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('example', () => { + describe('example', async () => { const fakePath = '/rendered/path/example'; const expectedParameters = { project: 'projectValue', @@ -2095,7 +2097,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.examplePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2170,7 +2172,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('experiment', () => { + describe('experiment', async () => { const fakePath = '/rendered/path/experiment'; const expectedParameters = { project: 'projectValue', @@ -2183,7 +2185,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.experimentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2258,7 +2260,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('flow', () => { + describe('flow', async () => { const fakePath = '/rendered/path/flow'; const expectedParameters = { project: 'projectValue', @@ -2270,7 +2272,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2334,7 +2336,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('flowValidationResult', () => { + describe('flowValidationResult', async () => { const fakePath = '/rendered/path/flowValidationResult'; const expectedParameters = { project: 'projectValue', @@ -2346,7 +2348,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.flowValidationResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2427,7 +2429,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2439,7 +2441,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2503,7 +2505,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('intent', () => { + describe('intent', async () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { project: 'projectValue', @@ -2515,7 +2517,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.intentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2579,7 +2581,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2589,7 +2591,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2628,7 +2630,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('page', () => { + describe('page', async () => { const fakePath = '/rendered/path/page'; const expectedParameters = { project: 'projectValue', @@ -2641,7 +2643,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2716,7 +2718,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('playbook', () => { + describe('playbook', async () => { const fakePath = '/rendered/path/playbook'; const expectedParameters = { project: 'projectValue', @@ -2728,7 +2730,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2792,7 +2794,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('playbookVersion', () => { + describe('playbookVersion', async () => { const fakePath = '/rendered/path/playbookVersion'; const expectedParameters = { project: 'projectValue', @@ -2805,7 +2807,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.playbookVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2880,7 +2882,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2889,7 +2891,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2918,7 +2920,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('projectLocationAgentEnvironmentSession', () => { + describe('projectLocationAgentEnvironmentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSession'; const expectedParameters = { project: 'projectValue', @@ -2931,7 +2933,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionPathTemplate.match = @@ -3043,7 +3045,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('projectLocationAgentEnvironmentSessionEntityType', () => { + describe('projectLocationAgentEnvironmentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; const expectedParameters = { @@ -3058,7 +3060,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentSessionEntityTypePathTemplate.match = @@ -3189,7 +3191,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('projectLocationAgentFlowTransitionRouteGroup', () => { + describe('projectLocationAgentFlowTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; const expectedParameters = { @@ -3203,7 +3205,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = @@ -3315,7 +3317,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -3327,7 +3329,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3409,7 +3411,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3422,7 +3424,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3534,7 +3536,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('projectLocationAgentTransitionRouteGroup', () => { + describe('projectLocationAgentTransitionRouteGroup', async () => { const fakePath = '/rendered/path/projectLocationAgentTransitionRouteGroup'; const expectedParameters = { @@ -3547,7 +3549,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = @@ -3641,7 +3643,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('securitySettings', () => { + describe('securitySettings', async () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { project: 'projectValue', @@ -3652,7 +3654,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.securitySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3709,7 +3711,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('testCase', () => { + describe('testCase', async () => { const fakePath = '/rendered/path/testCase'; const expectedParameters = { project: 'projectValue', @@ -3721,7 +3723,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3785,7 +3787,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('testCaseResult', () => { + describe('testCaseResult', async () => { const fakePath = '/rendered/path/testCaseResult'; const expectedParameters = { project: 'projectValue', @@ -3798,7 +3800,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.testCaseResultPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3873,7 +3875,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('tool', () => { + describe('tool', async () => { const fakePath = '/rendered/path/tool'; const expectedParameters = { project: 'projectValue', @@ -3885,7 +3887,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3949,7 +3951,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('toolVersion', () => { + describe('toolVersion', async () => { const fakePath = '/rendered/path/toolVersion'; const expectedParameters = { project: 'projectValue', @@ -3962,7 +3964,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.toolVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4037,7 +4039,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('version', () => { + describe('version', async () => { const fakePath = '/rendered/path/version'; const expectedParameters = { project: 'projectValue', @@ -4050,7 +4052,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.versionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4125,7 +4127,7 @@ describe('v3beta1.WebhooksClient', () => { }); }); - describe('webhook', () => { + describe('webhook', async () => { const fakePath = '/rendered/path/webhook'; const expectedParameters = { project: 'projectValue', @@ -4137,7 +4139,7 @@ describe('v3beta1.WebhooksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.webhookPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/package.json b/packages/google-cloud-dialogflow/package.json index b8a5c8d143b..eb938048b59 100644 --- a/packages/google-cloud-dialogflow/package.json +++ b/packages/google-cloud-dialogflow/package.json @@ -48,7 +48,7 @@ "test": "c8 mocha build/test/*_v2.js && c8 mocha build/test/*_v2beta1.js" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json index 7e4f66b089f..76e070e160c 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.14.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json index 10fce639991..a7b54841de0 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.14.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index ad4d44ed0a2..5cb11a00af1 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.14.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json index 0edf99a68cd..26b8f108a1b 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.14.0", + "version": "7.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/src/v2/agents_client.ts b/packages/google-cloud-dialogflow/src/v2/agents_client.ts index eeb87cdce80..12db71a9089 100644 --- a/packages/google-cloud-dialogflow/src/v2/agents_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/agents_client.ts @@ -723,7 +723,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAgent request %j', request); const wrappedCallback: | Callback< @@ -835,7 +837,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ 'agent.parent': request.agent!.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setAgent request %j', request); const wrappedCallback: | Callback< @@ -944,7 +948,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAgent request %j', request); const wrappedCallback: | Callback< @@ -1068,7 +1074,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getValidationResult request %j', request); const wrappedCallback: | Callback< @@ -1214,7 +1222,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1399,7 +1409,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1604,7 +1616,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1804,7 +1818,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1971,7 +1987,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.ISearchAgentsRequest, @@ -2038,7 +2056,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['searchAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAgents stream %j', request); return this.descriptors.page.searchAgents.createStream( this.innerApiCalls.searchAgents as GaxCall, @@ -2087,7 +2107,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['searchAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAgents iterate %j', request); return this.descriptors.page.searchAgents.asyncIterate( this.innerApiCalls['searchAgents'] as GaxCall, @@ -2267,7 +2289,7 @@ export class AgentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/answer_records_client.ts b/packages/google-cloud-dialogflow/src/v2/answer_records_client.ts index 470060fa0a3..ed8b56e9b2f 100644 --- a/packages/google-cloud-dialogflow/src/v2/answer_records_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/answer_records_client.ts @@ -627,7 +627,9 @@ export class AnswerRecordsClient { this._gaxModule.routingHeader.fromParams({ 'answer_record.name': request.answerRecord!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAnswerRecord request %j', request); const wrappedCallback: | Callback< @@ -779,7 +781,9 @@ export class AnswerRecordsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListAnswerRecordsRequest, @@ -868,7 +872,9 @@ export class AnswerRecordsClient { }); const defaultCallSettings = this._defaults['listAnswerRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnswerRecords stream %j', request); return this.descriptors.page.listAnswerRecords.createStream( this.innerApiCalls.listAnswerRecords as GaxCall, @@ -939,7 +945,9 @@ export class AnswerRecordsClient { }); const defaultCallSettings = this._defaults['listAnswerRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnswerRecords iterate %j', request); return this.descriptors.page.listAnswerRecords.asyncIterate( this.innerApiCalls['listAnswerRecords'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/contexts_client.ts b/packages/google-cloud-dialogflow/src/v2/contexts_client.ts index 3a05c0a50c0..930631b1f4b 100644 --- a/packages/google-cloud-dialogflow/src/v2/contexts_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/contexts_client.ts @@ -630,7 +630,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getContext request %j', request); const wrappedCallback: | Callback< @@ -755,7 +757,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createContext request %j', request); const wrappedCallback: | Callback< @@ -873,7 +877,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ 'context.name': request.context!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateContext request %j', request); const wrappedCallback: | Callback< @@ -994,7 +1000,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteContext request %j', request); const wrappedCallback: | Callback< @@ -1115,7 +1123,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAllContexts request %j', request); const wrappedCallback: | Callback< @@ -1248,7 +1258,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListContextsRequest, @@ -1319,7 +1331,9 @@ export class ContextsClient { }); const defaultCallSettings = this._defaults['listContexts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContexts stream %j', request); return this.descriptors.page.listContexts.createStream( this.innerApiCalls.listContexts as GaxCall, @@ -1372,7 +1386,9 @@ export class ContextsClient { }); const defaultCallSettings = this._defaults['listContexts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContexts iterate %j', request); return this.descriptors.page.listContexts.asyncIterate( this.innerApiCalls['listContexts'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/conversation_datasets_client.ts b/packages/google-cloud-dialogflow/src/v2/conversation_datasets_client.ts index ab168f14114..93b95e84f72 100644 --- a/packages/google-cloud-dialogflow/src/v2/conversation_datasets_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/conversation_datasets_client.ts @@ -741,7 +741,9 @@ export class ConversationDatasetsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversationDataset request %j', request); const wrappedCallback: | Callback< @@ -885,7 +887,9 @@ export class ConversationDatasetsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1063,7 +1067,9 @@ export class ConversationDatasetsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1245,7 +1251,9 @@ export class ConversationDatasetsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1410,7 +1418,9 @@ export class ConversationDatasetsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListConversationDatasetsRequest, @@ -1477,7 +1487,9 @@ export class ConversationDatasetsClient { }); const defaultCallSettings = this._defaults['listConversationDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationDatasets stream %j', request); return this.descriptors.page.listConversationDatasets.createStream( this.innerApiCalls.listConversationDatasets as GaxCall, @@ -1526,7 +1538,9 @@ export class ConversationDatasetsClient { }); const defaultCallSettings = this._defaults['listConversationDatasets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationDatasets iterate %j', request); return this.descriptors.page.listConversationDatasets.asyncIterate( this.innerApiCalls['listConversationDatasets'] as GaxCall, @@ -1706,7 +1720,7 @@ export class ConversationDatasetsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/conversation_models_client.ts b/packages/google-cloud-dialogflow/src/v2/conversation_models_client.ts index 41c0de9f00b..527f093fd5d 100644 --- a/packages/google-cloud-dialogflow/src/v2/conversation_models_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/conversation_models_client.ts @@ -774,7 +774,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversationModel request %j', request); const wrappedCallback: | Callback< @@ -901,7 +903,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversationModelEvaluation request %j', request); const wrappedCallback: | Callback< @@ -1051,7 +1055,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1228,7 +1234,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1408,7 +1416,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1588,7 +1598,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1759,7 +1771,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1929,7 +1943,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListConversationModelsRequest, @@ -1996,7 +2012,9 @@ export class ConversationModelsClient { }); const defaultCallSettings = this._defaults['listConversationModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationModels stream %j', request); return this.descriptors.page.listConversationModels.createStream( this.innerApiCalls.listConversationModels as GaxCall, @@ -2045,7 +2063,9 @@ export class ConversationModelsClient { }); const defaultCallSettings = this._defaults['listConversationModels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationModels iterate %j', request); return this.descriptors.page.listConversationModels.asyncIterate( this.innerApiCalls['listConversationModels'] as GaxCall, @@ -2149,7 +2169,9 @@ export class ConversationModelsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest, @@ -2220,7 +2242,9 @@ export class ConversationModelsClient { const defaultCallSettings = this._defaults['listConversationModelEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationModelEvaluations stream %j', request); return this.descriptors.page.listConversationModelEvaluations.createStream( this.innerApiCalls.listConversationModelEvaluations as GaxCall, @@ -2270,7 +2294,9 @@ export class ConversationModelsClient { const defaultCallSettings = this._defaults['listConversationModelEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationModelEvaluations iterate %j', request); return this.descriptors.page.listConversationModelEvaluations.asyncIterate( this.innerApiCalls['listConversationModelEvaluations'] as GaxCall, @@ -2450,7 +2476,7 @@ export class ConversationModelsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/conversation_profiles_client.ts b/packages/google-cloud-dialogflow/src/v2/conversation_profiles_client.ts index 56f9cadfb30..9c1b044839d 100644 --- a/packages/google-cloud-dialogflow/src/v2/conversation_profiles_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/conversation_profiles_client.ts @@ -726,7 +726,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -861,7 +863,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -995,7 +999,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ 'conversation_profile.name': request.conversationProfile!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -1122,7 +1128,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -1278,7 +1286,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ conversation_profile: request.conversationProfile ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1462,7 +1472,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ conversation_profile: request.conversationProfile ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1632,7 +1644,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListConversationProfilesRequest, @@ -1699,7 +1713,9 @@ export class ConversationProfilesClient { }); const defaultCallSettings = this._defaults['listConversationProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationProfiles stream %j', request); return this.descriptors.page.listConversationProfiles.createStream( this.innerApiCalls.listConversationProfiles as GaxCall, @@ -1748,7 +1764,9 @@ export class ConversationProfilesClient { }); const defaultCallSettings = this._defaults['listConversationProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationProfiles iterate %j', request); return this.descriptors.page.listConversationProfiles.asyncIterate( this.innerApiCalls['listConversationProfiles'] as GaxCall, @@ -1928,7 +1946,7 @@ export class ConversationProfilesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/conversations_client.ts b/packages/google-cloud-dialogflow/src/v2/conversations_client.ts index 454eb724e40..a375fea2775 100644 --- a/packages/google-cloud-dialogflow/src/v2/conversations_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/conversations_client.ts @@ -676,7 +676,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversation request %j', request); const wrappedCallback: | Callback< @@ -797,7 +799,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversation request %j', request); const wrappedCallback: | Callback< @@ -922,7 +926,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeConversation request %j', request); const wrappedCallback: | Callback< @@ -1055,7 +1061,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('ingestContextReferences request %j', request); const wrappedCallback: | Callback< @@ -1198,7 +1206,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestConversationSummary request %j', request); const wrappedCallback: | Callback< @@ -1339,7 +1349,9 @@ export class ConversationsClient { 'stateless_conversation.parent': request.statelessConversation!.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateStatelessSummary request %j', request); const wrappedCallback: | Callback< @@ -1482,7 +1494,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateStatelessSuggestion request %j', request); const wrappedCallback: | Callback< @@ -1651,7 +1665,9 @@ export class ConversationsClient { parent: request.parent ?? '', conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchKnowledge request %j', request); const wrappedCallback: | Callback< @@ -1781,7 +1797,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateSuggestions request %j', request); const wrappedCallback: | Callback< @@ -1919,7 +1937,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListConversationsRequest, @@ -1995,7 +2015,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations stream %j', request); return this.descriptors.page.listConversations.createStream( this.innerApiCalls.listConversations as GaxCall, @@ -2053,7 +2075,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations iterate %j', request); return this.descriptors.page.listConversations.asyncIterate( this.innerApiCalls['listConversations'] as GaxCall, @@ -2171,7 +2195,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListMessagesRequest, @@ -2248,7 +2274,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessages stream %j', request); return this.descriptors.page.listMessages.createStream( this.innerApiCalls.listMessages as GaxCall, @@ -2307,7 +2335,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessages iterate %j', request); return this.descriptors.page.listMessages.asyncIterate( this.innerApiCalls['listMessages'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/documents_client.ts b/packages/google-cloud-dialogflow/src/v2/documents_client.ts index 7ddf9578072..c6d406ad7c7 100644 --- a/packages/google-cloud-dialogflow/src/v2/documents_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/documents_client.ts @@ -748,7 +748,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -889,7 +891,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1081,7 +1085,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1259,7 +1265,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1438,7 +1446,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ 'document.name': request.document!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1633,7 +1643,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1819,7 +1831,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2006,7 +2020,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListDocumentsRequest, @@ -2096,7 +2112,9 @@ export class DocumentsClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -2168,7 +2186,9 @@ export class DocumentsClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -2348,7 +2368,7 @@ export class DocumentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/encryption_spec_service_client.ts b/packages/google-cloud-dialogflow/src/v2/encryption_spec_service_client.ts index 3546070d542..ab893eec260 100644 --- a/packages/google-cloud-dialogflow/src/v2/encryption_spec_service_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/encryption_spec_service_client.ts @@ -677,7 +677,9 @@ export class EncryptionSpecServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEncryptionSpec request %j', request); const wrappedCallback: | Callback< @@ -816,7 +818,9 @@ export class EncryptionSpecServiceClient { this._gaxModule.routingHeader.fromParams({ 'encryption_spec.name': request.encryptionSpec!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1056,7 +1060,7 @@ export class EncryptionSpecServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/entity_types_client.ts b/packages/google-cloud-dialogflow/src/v2/entity_types_client.ts index ce580b43634..befe72d6d35 100644 --- a/packages/google-cloud-dialogflow/src/v2/entity_types_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/entity_types_client.ts @@ -757,7 +757,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntityType request %j', request); const wrappedCallback: | Callback< @@ -886,7 +888,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEntityType request %j', request); const wrappedCallback: | Callback< @@ -1017,7 +1021,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'entity_type.name': request.entityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEntityType request %j', request); const wrappedCallback: | Callback< @@ -1141,7 +1147,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEntityType request %j', request); const wrappedCallback: | Callback< @@ -1302,7 +1310,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1486,7 +1496,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1672,7 +1684,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1863,7 +1877,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2051,7 +2067,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2218,7 +2236,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListEntityTypesRequest, @@ -2291,7 +2311,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes stream %j', request); return this.descriptors.page.listEntityTypes.createStream( this.innerApiCalls.listEntityTypes as GaxCall, @@ -2346,7 +2368,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes iterate %j', request); return this.descriptors.page.listEntityTypes.asyncIterate( this.innerApiCalls['listEntityTypes'] as GaxCall, @@ -2526,7 +2550,7 @@ export class EntityTypesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/environments_client.ts b/packages/google-cloud-dialogflow/src/v2/environments_client.ts index 042e6136109..cff07bdd579 100644 --- a/packages/google-cloud-dialogflow/src/v2/environments_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/environments_client.ts @@ -640,7 +640,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -764,7 +766,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEnvironment request %j', request); const wrappedCallback: | Callback< @@ -901,7 +905,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ 'environment.name': request.environment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEnvironment request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1033,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEnvironment request %j', request); const wrappedCallback: | Callback< @@ -1159,7 +1167,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListEnvironmentsRequest, @@ -1229,7 +1239,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -1281,7 +1293,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -1385,7 +1399,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IGetEnvironmentHistoryRequest, @@ -1458,7 +1474,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['getEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironmentHistory stream %j', request); return this.descriptors.page.getEnvironmentHistory.createStream( this.innerApiCalls.getEnvironmentHistory as GaxCall, @@ -1513,7 +1531,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['getEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironmentHistory iterate %j', request); return this.descriptors.page.getEnvironmentHistory.asyncIterate( this.innerApiCalls['getEnvironmentHistory'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/fulfillments_client.ts b/packages/google-cloud-dialogflow/src/v2/fulfillments_client.ts index c83e48a615b..674b26d3b08 100644 --- a/packages/google-cloud-dialogflow/src/v2/fulfillments_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/fulfillments_client.ts @@ -606,7 +606,9 @@ export class FulfillmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFulfillment request %j', request); const wrappedCallback: | Callback< @@ -725,7 +727,9 @@ export class FulfillmentsClient { this._gaxModule.routingHeader.fromParams({ 'fulfillment.name': request.fulfillment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFulfillment request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-dialogflow/src/v2/generators_client.ts b/packages/google-cloud-dialogflow/src/v2/generators_client.ts index 7a902c64292..27ad98ab516 100644 --- a/packages/google-cloud-dialogflow/src/v2/generators_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/generators_client.ts @@ -645,7 +645,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGenerator request %j', request); const wrappedCallback: | Callback< @@ -756,7 +758,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerator request %j', request); const wrappedCallback: | Callback< @@ -873,7 +877,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGenerator request %j', request); const wrappedCallback: | Callback< @@ -992,7 +998,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ 'generator.name': request.generator!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerator request %j', request); const wrappedCallback: | Callback< @@ -1118,7 +1126,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListGeneratorsRequest, @@ -1185,7 +1195,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators stream %j', request); return this.descriptors.page.listGenerators.createStream( this.innerApiCalls.listGenerators as GaxCall, @@ -1234,7 +1246,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators iterate %j', request); return this.descriptors.page.listGenerators.asyncIterate( this.innerApiCalls['listGenerators'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/intents_client.ts b/packages/google-cloud-dialogflow/src/v2/intents_client.ts index 878b43a7977..c43e6c5a344 100644 --- a/packages/google-cloud-dialogflow/src/v2/intents_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/intents_client.ts @@ -709,7 +709,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIntent request %j', request); const wrappedCallback: | Callback< @@ -834,7 +836,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createIntent request %j', request); const wrappedCallback: | Callback< @@ -958,7 +962,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ 'intent.name': request.intent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIntent request %j', request); const wrappedCallback: | Callback< @@ -1074,7 +1080,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteIntent request %j', request); const wrappedCallback: | Callback< @@ -1233,7 +1241,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1417,7 +1427,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1588,7 +1600,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListIntentsRequest, @@ -1671,7 +1685,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents stream %j', request); return this.descriptors.page.listIntents.createStream( this.innerApiCalls.listIntents as GaxCall, @@ -1736,7 +1752,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents iterate %j', request); return this.descriptors.page.listIntents.asyncIterate( this.innerApiCalls['listIntents'] as GaxCall, @@ -1916,7 +1934,7 @@ export class IntentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2/knowledge_bases_client.ts b/packages/google-cloud-dialogflow/src/v2/knowledge_bases_client.ts index 305feb11fac..c14c2b4f58c 100644 --- a/packages/google-cloud-dialogflow/src/v2/knowledge_bases_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/knowledge_bases_client.ts @@ -630,7 +630,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -752,7 +754,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -876,7 +880,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -999,7 +1005,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ 'knowledge_base.name': request.knowledgeBase!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -1155,7 +1163,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListKnowledgeBasesRequest, @@ -1249,7 +1259,9 @@ export class KnowledgeBasesClient { }); const defaultCallSettings = this._defaults['listKnowledgeBases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKnowledgeBases stream %j', request); return this.descriptors.page.listKnowledgeBases.createStream( this.innerApiCalls.listKnowledgeBases as GaxCall, @@ -1325,7 +1337,9 @@ export class KnowledgeBasesClient { }); const defaultCallSettings = this._defaults['listKnowledgeBases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKnowledgeBases iterate %j', request); return this.descriptors.page.listKnowledgeBases.asyncIterate( this.innerApiCalls['listKnowledgeBases'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/participants_client.ts b/packages/google-cloud-dialogflow/src/v2/participants_client.ts index 5deae43032e..bb27ac8dd74 100644 --- a/packages/google-cloud-dialogflow/src/v2/participants_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/participants_client.ts @@ -661,7 +661,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createParticipant request %j', request); const wrappedCallback: | Callback< @@ -782,7 +784,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParticipant request %j', request); const wrappedCallback: | Callback< @@ -900,7 +904,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ 'participant.name': request.participant!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateParticipant request %j', request); const wrappedCallback: | Callback< @@ -1055,7 +1061,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ participant: request.participant ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeContent request %j', request); const wrappedCallback: | Callback< @@ -1187,7 +1195,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestArticles request %j', request); const wrappedCallback: | Callback< @@ -1318,7 +1328,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestFaqAnswers request %j', request); const wrappedCallback: | Callback< @@ -1454,7 +1466,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestSmartReplies request %j', request); const wrappedCallback: | Callback< @@ -1596,7 +1610,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestKnowledgeAssist request %j', request); const wrappedCallback: | Callback< @@ -1658,7 +1674,9 @@ export class ParticipantsClient { * region_tag:dialogflow_v2_generated_Participants_StreamingAnalyzeContent_async */ streamingAnalyzeContent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingAnalyzeContent stream %j', options); return this.innerApiCalls.streamingAnalyzeContent(null, options); } @@ -1760,7 +1778,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListParticipantsRequest, @@ -1828,7 +1848,9 @@ export class ParticipantsClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants stream %j', request); return this.descriptors.page.listParticipants.createStream( this.innerApiCalls.listParticipants as GaxCall, @@ -1878,7 +1900,9 @@ export class ParticipantsClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants iterate %j', request); return this.descriptors.page.listParticipants.asyncIterate( this.innerApiCalls['listParticipants'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.ts b/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.ts index 019fccc025e..734aead8f5b 100644 --- a/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/session_entity_types_client.ts @@ -647,7 +647,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -786,7 +788,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -917,7 +921,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'session_entity_type.name': request.sessionEntityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -1052,7 +1058,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -1189,7 +1197,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListSessionEntityTypesRequest, @@ -1260,7 +1270,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes stream %j', request); return this.descriptors.page.listSessionEntityTypes.createStream( this.innerApiCalls.listSessionEntityTypes as GaxCall, @@ -1313,7 +1325,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes iterate %j', request); return this.descriptors.page.listSessionEntityTypes.asyncIterate( this.innerApiCalls['listSessionEntityTypes'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2/sessions_client.ts b/packages/google-cloud-dialogflow/src/v2/sessions_client.ts index c22e4ea0618..ece7b86f577 100644 --- a/packages/google-cloud-dialogflow/src/v2/sessions_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/sessions_client.ts @@ -696,7 +696,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detectIntent request %j', request); const wrappedCallback: | Callback< @@ -754,7 +756,9 @@ export class SessionsClient { * region_tag:dialogflow_v2_generated_Sessions_StreamingDetectIntent_async */ streamingDetectIntent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingDetectIntent stream %j', options); return this.innerApiCalls.streamingDetectIntent(null, options); } diff --git a/packages/google-cloud-dialogflow/src/v2/versions_client.ts b/packages/google-cloud-dialogflow/src/v2/versions_client.ts index 29f0f48a469..549d0d0c5e7 100644 --- a/packages/google-cloud-dialogflow/src/v2/versions_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/versions_client.ts @@ -626,7 +626,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -750,7 +752,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createVersion request %j', request); const wrappedCallback: | Callback< @@ -877,7 +881,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ 'version.name': request.version!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateVersion request %j', request); const wrappedCallback: | Callback< @@ -998,7 +1004,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteVersion request %j', request); const wrappedCallback: | Callback< @@ -1127,7 +1135,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2.IListVersionsRequest, @@ -1197,7 +1207,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -1249,7 +1261,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts index 8f7e9818448..08387f9d558 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts @@ -725,7 +725,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAgent request %j', request); const wrappedCallback: | Callback< @@ -847,7 +849,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ 'agent.parent': request.agent!.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setAgent request %j', request); const wrappedCallback: | Callback< @@ -965,7 +969,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAgent request %j', request); const wrappedCallback: | Callback< @@ -1099,7 +1105,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getValidationResult request %j', request); const wrappedCallback: | Callback< @@ -1246,7 +1254,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1433,7 +1443,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1639,7 +1651,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1840,7 +1854,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2007,7 +2023,9 @@ export class AgentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.ISearchAgentsRequest, @@ -2075,7 +2093,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['searchAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAgents stream %j', request); return this.descriptors.page.searchAgents.createStream( this.innerApiCalls.searchAgents as GaxCall, @@ -2125,7 +2145,9 @@ export class AgentsClient { }); const defaultCallSettings = this._defaults['searchAgents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchAgents iterate %j', request); return this.descriptors.page.searchAgents.asyncIterate( this.innerApiCalls['searchAgents'] as GaxCall, @@ -2305,7 +2327,7 @@ export class AgentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2beta1/answer_records_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/answer_records_client.ts index 4ed32d6b129..fdba02bef55 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/answer_records_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/answer_records_client.ts @@ -627,7 +627,9 @@ export class AnswerRecordsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$AnswerRecords-$GetAnswerRecord', 'GetAnswerRecord is deprecated and may be removed in a future version.', @@ -759,7 +761,9 @@ export class AnswerRecordsClient { this._gaxModule.routingHeader.fromParams({ 'answer_record.name': request.answerRecord!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAnswerRecord request %j', request); const wrappedCallback: | Callback< @@ -911,7 +915,9 @@ export class AnswerRecordsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest, @@ -1000,7 +1006,9 @@ export class AnswerRecordsClient { }); const defaultCallSettings = this._defaults['listAnswerRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnswerRecords stream %j', request); return this.descriptors.page.listAnswerRecords.createStream( this.innerApiCalls.listAnswerRecords as GaxCall, @@ -1071,7 +1079,9 @@ export class AnswerRecordsClient { }); const defaultCallSettings = this._defaults['listAnswerRecords']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAnswerRecords iterate %j', request); return this.descriptors.page.listAnswerRecords.asyncIterate( this.innerApiCalls['listAnswerRecords'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.ts index 963102e404f..fea9e29d14a 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/contexts_client.ts @@ -635,7 +635,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getContext request %j', request); const wrappedCallback: | Callback< @@ -767,7 +769,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createContext request %j', request); const wrappedCallback: | Callback< @@ -888,7 +892,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ 'context.name': request.context!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateContext request %j', request); const wrappedCallback: | Callback< @@ -1020,7 +1026,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteContext request %j', request); const wrappedCallback: | Callback< @@ -1158,7 +1166,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteAllContexts request %j', request); const wrappedCallback: | Callback< @@ -1298,7 +1308,9 @@ export class ContextsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListContextsRequest, @@ -1376,7 +1388,9 @@ export class ContextsClient { }); const defaultCallSettings = this._defaults['listContexts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContexts stream %j', request); return this.descriptors.page.listContexts.createStream( this.innerApiCalls.listContexts as GaxCall, @@ -1436,7 +1450,9 @@ export class ContextsClient { }); const defaultCallSettings = this._defaults['listContexts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContexts iterate %j', request); return this.descriptors.page.listContexts.asyncIterate( this.innerApiCalls['listContexts'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts index c1b8ad5840d..40b40bd9605 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts @@ -720,7 +720,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -853,7 +855,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -985,7 +989,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ 'conversation_profile.name': request.conversationProfile!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -1112,7 +1118,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversationProfile request %j', request); const wrappedCallback: | Callback< @@ -1268,7 +1276,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ conversation_profile: request.conversationProfile ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1452,7 +1462,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ conversation_profile: request.conversationProfile ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1622,7 +1634,9 @@ export class ConversationProfilesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest, @@ -1689,7 +1703,9 @@ export class ConversationProfilesClient { }); const defaultCallSettings = this._defaults['listConversationProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationProfiles stream %j', request); return this.descriptors.page.listConversationProfiles.createStream( this.innerApiCalls.listConversationProfiles as GaxCall, @@ -1738,7 +1754,9 @@ export class ConversationProfilesClient { }); const defaultCallSettings = this._defaults['listConversationProfiles']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversationProfiles iterate %j', request); return this.descriptors.page.listConversationProfiles.asyncIterate( this.innerApiCalls['listConversationProfiles'] as GaxCall, @@ -1918,7 +1936,7 @@ export class ConversationProfilesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts index b43a7b6953d..e85d158eb01 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts @@ -674,7 +674,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversation request %j', request); const wrappedCallback: | Callback< @@ -801,7 +803,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversation request %j', request); const wrappedCallback: | Callback< @@ -929,7 +933,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeConversation request %j', request); const wrappedCallback: | Callback< @@ -1062,7 +1068,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('ingestContextReferences request %j', request); const wrappedCallback: | Callback< @@ -1195,7 +1203,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchCreateMessages request %j', request); const wrappedCallback: | Callback< @@ -1338,7 +1348,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestConversationSummary request %j', request); const wrappedCallback: | Callback< @@ -1479,7 +1491,9 @@ export class ConversationsClient { 'stateless_conversation.parent': request.statelessConversation!.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateStatelessSummary request %j', request); const wrappedCallback: | Callback< @@ -1622,7 +1636,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateStatelessSuggestion request %j', request); const wrappedCallback: | Callback< @@ -1797,7 +1813,9 @@ export class ConversationsClient { parent: request.parent ?? '', conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchKnowledge request %j', request); const wrappedCallback: | Callback< @@ -1936,7 +1954,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ conversation: request.conversation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateSuggestions request %j', request); const wrappedCallback: | Callback< @@ -2074,7 +2094,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListConversationsRequest, @@ -2150,7 +2172,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations stream %j', request); return this.descriptors.page.listConversations.createStream( this.innerApiCalls.listConversations as GaxCall, @@ -2208,7 +2232,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations iterate %j', request); return this.descriptors.page.listConversations.asyncIterate( this.innerApiCalls['listConversations'] as GaxCall, @@ -2326,7 +2352,9 @@ export class ConversationsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListMessagesRequest, @@ -2403,7 +2431,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessages stream %j', request); return this.descriptors.page.listMessages.createStream( this.innerApiCalls.listMessages as GaxCall, @@ -2462,7 +2492,9 @@ export class ConversationsClient { }); const defaultCallSettings = this._defaults['listMessages']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessages iterate %j', request); return this.descriptors.page.listMessages.asyncIterate( this.innerApiCalls['listMessages'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/documents_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/documents_client.ts index 2243570a7b3..0073df5fd4c 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/documents_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/documents_client.ts @@ -738,7 +738,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -888,7 +890,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1080,7 +1084,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1261,7 +1267,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1443,7 +1451,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ 'document.name': request.document!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1635,7 +1645,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1825,7 +1837,9 @@ export class DocumentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListDocumentsRequest, @@ -1915,7 +1929,9 @@ export class DocumentsClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -1987,7 +2003,9 @@ export class DocumentsClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -2167,7 +2185,7 @@ export class DocumentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2beta1/encryption_spec_service_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/encryption_spec_service_client.ts index ba086277a24..d755353fa7a 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/encryption_spec_service_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/encryption_spec_service_client.ts @@ -676,7 +676,9 @@ export class EncryptionSpecServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEncryptionSpec request %j', request); const wrappedCallback: | Callback< @@ -815,7 +817,9 @@ export class EncryptionSpecServiceClient { this._gaxModule.routingHeader.fromParams({ 'encryption_spec.name': request.encryptionSpec!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1055,7 +1059,7 @@ export class EncryptionSpecServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.ts index 7f770535d01..803a6c7c3c3 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/entity_types_client.ts @@ -754,7 +754,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEntityType request %j', request); const wrappedCallback: | Callback< @@ -894,7 +896,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEntityType request %j', request); const wrappedCallback: | Callback< @@ -1031,7 +1035,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'entity_type.name': request.entityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEntityType request %j', request); const wrappedCallback: | Callback< @@ -1164,7 +1170,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEntityType request %j', request); const wrappedCallback: | Callback< @@ -1327,7 +1335,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1513,7 +1523,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1702,7 +1714,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1895,7 +1909,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2086,7 +2102,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2255,7 +2273,9 @@ export class EntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListEntityTypesRequest, @@ -2330,7 +2350,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes stream %j', request); return this.descriptors.page.listEntityTypes.createStream( this.innerApiCalls.listEntityTypes as GaxCall, @@ -2387,7 +2409,9 @@ export class EntityTypesClient { }); const defaultCallSettings = this._defaults['listEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEntityTypes iterate %j', request); return this.descriptors.page.listEntityTypes.asyncIterate( this.innerApiCalls['listEntityTypes'] as GaxCall, @@ -2567,7 +2591,7 @@ export class EntityTypesClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2beta1/environments_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/environments_client.ts index 33ac7229afe..ae20c5ed8e9 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/environments_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/environments_client.ts @@ -629,7 +629,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironment request %j', request); const wrappedCallback: | Callback< @@ -761,7 +763,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createEnvironment request %j', request); const wrappedCallback: | Callback< @@ -904,7 +908,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ 'environment.name': request.environment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEnvironment request %j', request); const wrappedCallback: | Callback< @@ -1033,7 +1039,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteEnvironment request %j', request); const wrappedCallback: | Callback< @@ -1164,7 +1172,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest, @@ -1233,7 +1243,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments stream %j', request); return this.descriptors.page.listEnvironments.createStream( this.innerApiCalls.listEnvironments as GaxCall, @@ -1284,7 +1296,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['listEnvironments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnvironments iterate %j', request); return this.descriptors.page.listEnvironments.asyncIterate( this.innerApiCalls['listEnvironments'] as GaxCall, @@ -1391,7 +1405,9 @@ export class EnvironmentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest, @@ -1461,7 +1477,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['getEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironmentHistory stream %j', request); return this.descriptors.page.getEnvironmentHistory.createStream( this.innerApiCalls.getEnvironmentHistory as GaxCall, @@ -1513,7 +1531,9 @@ export class EnvironmentsClient { }); const defaultCallSettings = this._defaults['getEnvironmentHistory']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnvironmentHistory iterate %j', request); return this.descriptors.page.getEnvironmentHistory.asyncIterate( this.innerApiCalls['getEnvironmentHistory'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/fulfillments_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/fulfillments_client.ts index 1dfa4ac9ba9..c8360367fee 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/fulfillments_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/fulfillments_client.ts @@ -601,7 +601,9 @@ export class FulfillmentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFulfillment request %j', request); const wrappedCallback: | Callback< @@ -729,7 +731,9 @@ export class FulfillmentsClient { this._gaxModule.routingHeader.fromParams({ 'fulfillment.name': request.fulfillment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateFulfillment request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-dialogflow/src/v2beta1/generators_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/generators_client.ts index bfa603ac7d2..003fa63b0ef 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/generators_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/generators_client.ts @@ -642,7 +642,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createGenerator request %j', request); const wrappedCallback: | Callback< @@ -762,7 +764,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGenerator request %j', request); const wrappedCallback: | Callback< @@ -888,7 +892,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteGenerator request %j', request); const wrappedCallback: | Callback< @@ -1016,7 +1022,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ 'generator.name': request.generator!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGenerator request %j', request); const wrappedCallback: | Callback< @@ -1145,7 +1153,9 @@ export class GeneratorsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListGeneratorsRequest, @@ -1212,7 +1222,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators stream %j', request); return this.descriptors.page.listGenerators.createStream( this.innerApiCalls.listGenerators as GaxCall, @@ -1261,7 +1273,9 @@ export class GeneratorsClient { }); const defaultCallSettings = this._defaults['listGenerators']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGenerators iterate %j', request); return this.descriptors.page.listGenerators.asyncIterate( this.innerApiCalls['listGenerators'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/intents_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/intents_client.ts index 1a39588865c..321e5b14ba0 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/intents_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/intents_client.ts @@ -711,7 +711,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIntent request %j', request); const wrappedCallback: | Callback< @@ -845,7 +847,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createIntent request %j', request); const wrappedCallback: | Callback< @@ -978,7 +982,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ 'intent.name': request.intent!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateIntent request %j', request); const wrappedCallback: | Callback< @@ -1107,7 +1113,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteIntent request %j', request); const wrappedCallback: | Callback< @@ -1272,7 +1280,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1459,7 +1469,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1636,7 +1648,9 @@ export class IntentsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListIntentsRequest, @@ -1719,7 +1733,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents stream %j', request); return this.descriptors.page.listIntents.createStream( this.innerApiCalls.listIntents as GaxCall, @@ -1784,7 +1800,9 @@ export class IntentsClient { }); const defaultCallSettings = this._defaults['listIntents']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listIntents iterate %j', request); return this.descriptors.page.listIntents.asyncIterate( this.innerApiCalls['listIntents'] as GaxCall, @@ -1964,7 +1982,7 @@ export class IntentsClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.ts index e8254c4a889..d69993c9d26 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/knowledge_bases_client.ts @@ -630,7 +630,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -761,7 +763,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -894,7 +898,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -1026,7 +1032,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ 'knowledge_base.name': request.knowledgeBase!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateKnowledgeBase request %j', request); const wrappedCallback: | Callback< @@ -1185,7 +1193,9 @@ export class KnowledgeBasesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListKnowledgeBasesRequest, @@ -1279,7 +1289,9 @@ export class KnowledgeBasesClient { }); const defaultCallSettings = this._defaults['listKnowledgeBases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKnowledgeBases stream %j', request); return this.descriptors.page.listKnowledgeBases.createStream( this.innerApiCalls.listKnowledgeBases as GaxCall, @@ -1355,7 +1367,9 @@ export class KnowledgeBasesClient { }); const defaultCallSettings = this._defaults['listKnowledgeBases']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listKnowledgeBases iterate %j', request); return this.descriptors.page.listKnowledgeBases.asyncIterate( this.innerApiCalls['listKnowledgeBases'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/participants_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/participants_client.ts index 382b61f5ce4..6ba0018ebdb 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/participants_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/participants_client.ts @@ -666,7 +666,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createParticipant request %j', request); const wrappedCallback: | Callback< @@ -787,7 +789,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getParticipant request %j', request); const wrappedCallback: | Callback< @@ -914,7 +918,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ 'participant.name': request.participant!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateParticipant request %j', request); const wrappedCallback: | Callback< @@ -1102,7 +1108,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ participant: request.participant ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('analyzeContent request %j', request); const wrappedCallback: | Callback< @@ -1250,7 +1258,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestArticles request %j', request); const wrappedCallback: | Callback< @@ -1390,7 +1400,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestFaqAnswers request %j', request); const wrappedCallback: | Callback< @@ -1532,7 +1544,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestSmartReplies request %j', request); const wrappedCallback: | Callback< @@ -1674,7 +1688,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('suggestKnowledgeAssist request %j', request); const wrappedCallback: | Callback< @@ -1826,7 +1842,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$Participants-$CompileSuggestion', 'CompileSuggestion is deprecated and may be removed in a future version.', @@ -1893,7 +1911,9 @@ export class ParticipantsClient { * region_tag:dialogflow_v2beta1_generated_Participants_StreamingAnalyzeContent_async */ streamingAnalyzeContent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingAnalyzeContent stream %j', options); return this.innerApiCalls.streamingAnalyzeContent(null, options); } @@ -1995,7 +2015,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListParticipantsRequest, @@ -2063,7 +2085,9 @@ export class ParticipantsClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants stream %j', request); return this.descriptors.page.listParticipants.createStream( this.innerApiCalls.listParticipants as GaxCall, @@ -2113,7 +2137,9 @@ export class ParticipantsClient { }); const defaultCallSettings = this._defaults['listParticipants']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listParticipants iterate %j', request); return this.descriptors.page.listParticipants.asyncIterate( this.innerApiCalls['listParticipants'] as GaxCall, @@ -2247,7 +2273,9 @@ export class ParticipantsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$Participants-$ListSuggestions', 'ListSuggestions is deprecated and may be removed in a future version.', @@ -2330,7 +2358,9 @@ export class ParticipantsClient { }); const defaultCallSettings = this._defaults['listSuggestions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$Participants-$ListSuggestions', 'ListSuggestions is deprecated and may be removed in a future version.', @@ -2395,7 +2425,9 @@ export class ParticipantsClient { }); const defaultCallSettings = this._defaults['listSuggestions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$Participants-$ListSuggestions', 'ListSuggestions is deprecated and may be removed in a future version.', diff --git a/packages/google-cloud-dialogflow/src/v2beta1/phone_numbers_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/phone_numbers_client.ts index 86735c9e2f3..ddab65916d1 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/phone_numbers_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/phone_numbers_client.ts @@ -626,7 +626,9 @@ export class PhoneNumbersClient { this._gaxModule.routingHeader.fromParams({ 'phone_number.name': request.phoneNumber!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updatePhoneNumber request %j', request); const wrappedCallback: | Callback< @@ -759,7 +761,9 @@ export class PhoneNumbersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deletePhoneNumber request %j', request); const wrappedCallback: | Callback< @@ -890,7 +894,9 @@ export class PhoneNumbersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('undeletePhoneNumber request %j', request); const wrappedCallback: | Callback< @@ -1024,7 +1030,9 @@ export class PhoneNumbersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListPhoneNumbersRequest, @@ -1096,7 +1104,9 @@ export class PhoneNumbersClient { }); const defaultCallSettings = this._defaults['listPhoneNumbers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhoneNumbers stream %j', request); return this.descriptors.page.listPhoneNumbers.createStream( this.innerApiCalls.listPhoneNumbers as GaxCall, @@ -1150,7 +1160,9 @@ export class PhoneNumbersClient { }); const defaultCallSettings = this._defaults['listPhoneNumbers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPhoneNumbers iterate %j', request); return this.descriptors.page.listPhoneNumbers.asyncIterate( this.innerApiCalls['listPhoneNumbers'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.ts index cd443873e6c..3aec8b9088a 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/session_entity_types_client.ts @@ -646,7 +646,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -793,7 +795,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -924,7 +928,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ 'session_entity_type.name': request.sessionEntityType!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -1067,7 +1073,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSessionEntityType request %j', request); const wrappedCallback: | Callback< @@ -1212,7 +1220,9 @@ export class SessionEntityTypesClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest, @@ -1291,7 +1301,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes stream %j', request); return this.descriptors.page.listSessionEntityTypes.createStream( this.innerApiCalls.listSessionEntityTypes as GaxCall, @@ -1352,7 +1364,9 @@ export class SessionEntityTypesClient { }); const defaultCallSettings = this._defaults['listSessionEntityTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessionEntityTypes iterate %j', request); return this.descriptors.page.listSessionEntityTypes.asyncIterate( this.innerApiCalls['listSessionEntityTypes'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.ts index 36785e51b69..1573ac09690 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/sessions_client.ts @@ -699,7 +699,9 @@ export class SessionsClient { this._gaxModule.routingHeader.fromParams({ session: request.session ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('detectIntent request %j', request); const wrappedCallback: | Callback< @@ -760,7 +762,9 @@ export class SessionsClient { * region_tag:dialogflow_v2beta1_generated_Sessions_StreamingDetectIntent_async */ streamingDetectIntent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamingDetectIntent stream %j', options); return this.innerApiCalls.streamingDetectIntent(null, options); } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/sip_trunks_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/sip_trunks_client.ts index 3b3d2886596..c336151a495 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/sip_trunks_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/sip_trunks_client.ts @@ -624,7 +624,9 @@ export class SipTrunksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSipTrunk request %j', request); const wrappedCallback: | Callback< @@ -745,7 +747,9 @@ export class SipTrunksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSipTrunk request %j', request); const wrappedCallback: | Callback< @@ -866,7 +870,9 @@ export class SipTrunksClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSipTrunk request %j', request); const wrappedCallback: | Callback< @@ -988,7 +994,9 @@ export class SipTrunksClient { this._gaxModule.routingHeader.fromParams({ 'sip_trunk.name': request.sipTrunk!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSipTrunk request %j', request); const wrappedCallback: | Callback< @@ -1117,7 +1125,9 @@ export class SipTrunksClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListSipTrunksRequest, @@ -1184,7 +1194,9 @@ export class SipTrunksClient { }); const defaultCallSettings = this._defaults['listSipTrunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSipTrunks stream %j', request); return this.descriptors.page.listSipTrunks.createStream( this.innerApiCalls.listSipTrunks as GaxCall, @@ -1233,7 +1245,9 @@ export class SipTrunksClient { }); const defaultCallSettings = this._defaults['listSipTrunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSipTrunks iterate %j', request); return this.descriptors.page.listSipTrunks.asyncIterate( this.innerApiCalls['listSipTrunks'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/src/v2beta1/versions_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/versions_client.ts index 7fe4b079163..f5be195b9d6 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/versions_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/versions_client.ts @@ -622,7 +622,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVersion request %j', request); const wrappedCallback: | Callback< @@ -745,7 +747,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createVersion request %j', request); const wrappedCallback: | Callback< @@ -874,7 +878,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ 'version.name': request.version!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateVersion request %j', request); const wrappedCallback: | Callback< @@ -997,7 +1003,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteVersion request %j', request); const wrappedCallback: | Callback< @@ -1128,7 +1136,9 @@ export class VersionsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.dialogflow.v2beta1.IListVersionsRequest, @@ -1197,7 +1207,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions stream %j', request); return this.descriptors.page.listVersions.createStream( this.innerApiCalls.listVersions as GaxCall, @@ -1248,7 +1260,9 @@ export class VersionsClient { }); const defaultCallSettings = this._defaults['listVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVersions iterate %j', request); return this.descriptors.page.listVersions.asyncIterate( this.innerApiCalls['listVersions'] as GaxCall, diff --git a/packages/google-cloud-dialogflow/test/gapic_agents_v2.ts b/packages/google-cloud-dialogflow/test/gapic_agents_v2.ts index b4d893e8fda..f132e23b685 100644 --- a/packages/google-cloud-dialogflow/test/gapic_agents_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_agents_v2.ts @@ -287,7 +287,9 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.agentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetAgentRequest() ); @@ -377,7 +379,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetAgentRequest() ); @@ -424,7 +426,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetAgentRequest() ); @@ -452,7 +454,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetAgentRequest() ); @@ -473,7 +475,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetAgentRequest() ); @@ -505,7 +507,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetAgentRequest() ); @@ -553,7 +555,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetAgentRequest() ); @@ -582,7 +584,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetAgentRequest() ); @@ -604,7 +606,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAgentRequest() ); @@ -635,7 +637,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAgentRequest() ); @@ -682,7 +684,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAgentRequest() ); @@ -713,7 +715,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAgentRequest() ); @@ -734,7 +736,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetValidationResultRequest() ); @@ -766,7 +768,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetValidationResultRequest() ); @@ -813,7 +815,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetValidationResultRequest() ); @@ -844,7 +846,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetValidationResultRequest() ); @@ -865,7 +867,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.TrainAgentRequest() ); @@ -897,7 +899,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.TrainAgentRequest() ); @@ -951,7 +953,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.TrainAgentRequest() ); @@ -982,7 +984,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.TrainAgentRequest() ); @@ -1015,7 +1017,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1037,7 +1039,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1055,7 +1057,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportAgentRequest() ); @@ -1087,7 +1089,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportAgentRequest() ); @@ -1141,7 +1143,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportAgentRequest() ); @@ -1172,7 +1174,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportAgentRequest() ); @@ -1205,7 +1207,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1227,7 +1229,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1245,7 +1247,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportAgentRequest() ); @@ -1277,7 +1279,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportAgentRequest() ); @@ -1331,7 +1333,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportAgentRequest() ); @@ -1362,7 +1364,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportAgentRequest() ); @@ -1395,7 +1397,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1417,7 +1419,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1435,7 +1437,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.RestoreAgentRequest() ); @@ -1467,7 +1469,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.RestoreAgentRequest() ); @@ -1521,7 +1523,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.RestoreAgentRequest() ); @@ -1552,7 +1554,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.RestoreAgentRequest() ); @@ -1585,7 +1587,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1607,7 +1609,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1625,7 +1627,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchAgentsRequest() ); @@ -1658,7 +1660,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchAgentsRequest() ); @@ -1707,7 +1709,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchAgentsRequest() ); @@ -1738,7 +1740,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchAgentsRequest() ); @@ -1792,7 +1794,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchAgentsRequest() ); @@ -1843,7 +1845,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchAgentsRequest() ); @@ -1886,7 +1888,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchAgentsRequest() ); @@ -1927,7 +1929,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1957,7 +1959,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2001,7 +2003,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2036,7 +2038,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2084,7 +2086,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2125,7 +2127,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2204,7 +2206,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2284,7 +2286,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2380,8 +2382,7 @@ describe('v2.AgentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2400,7 +2401,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2409,8 +2410,7 @@ describe('v2.AgentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2426,7 +2426,7 @@ describe('v2.AgentsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2437,7 +2437,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2504,7 +2504,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2514,7 +2514,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2556,7 +2556,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2567,7 +2567,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2620,7 +2620,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2629,7 +2629,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2658,7 +2658,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2667,7 +2667,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2696,7 +2696,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2706,7 +2706,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2759,7 +2759,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2769,7 +2769,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2822,7 +2822,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2836,7 +2836,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2948,7 +2948,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2962,7 +2962,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3074,7 +3074,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3083,7 +3083,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3119,7 +3119,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3129,7 +3129,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3180,7 +3180,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3191,7 +3191,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3259,7 +3259,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3270,7 +3270,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3336,7 +3336,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3346,7 +3346,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3397,7 +3397,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3407,7 +3407,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3459,7 +3459,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3469,7 +3469,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3521,7 +3521,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3532,7 +3532,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3600,7 +3600,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3610,7 +3610,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3665,7 +3665,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3676,7 +3676,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3748,7 +3748,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3759,7 +3759,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3829,7 +3829,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3839,7 +3839,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3894,7 +3894,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3904,7 +3904,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3957,7 +3957,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3968,7 +3968,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -4036,7 +4036,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -4046,7 +4046,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4099,7 +4099,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4110,7 +4110,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4178,7 +4178,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4189,7 +4189,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4257,7 +4257,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4272,7 +4272,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4403,7 +4403,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4418,7 +4418,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4549,7 +4549,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4559,7 +4559,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4610,7 +4610,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4621,7 +4621,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4689,7 +4689,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4701,7 +4701,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4790,7 +4790,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4802,7 +4802,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4896,7 +4896,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4907,7 +4907,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4974,7 +4974,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4985,7 +4985,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -5052,7 +5052,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -5063,7 +5063,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5130,7 +5130,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5142,7 +5142,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5231,7 +5231,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -5242,7 +5242,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -5312,7 +5312,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -5325,7 +5325,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5419,7 +5419,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5431,7 +5431,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5525,7 +5525,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5536,7 +5536,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5608,7 +5608,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5619,7 +5619,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5687,7 +5687,7 @@ describe('v2.AgentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5699,7 +5699,7 @@ describe('v2.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_agents_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_agents_v2beta1.ts index ed67ecc0550..e42385cc18b 100644 --- a/packages/google-cloud-dialogflow/test/gapic_agents_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_agents_v2beta1.ts @@ -287,7 +287,9 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.agentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAgentRequest() ); @@ -377,7 +379,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAgentRequest() ); @@ -424,7 +426,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAgentRequest() ); @@ -452,7 +454,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAgentRequest() ); @@ -473,7 +475,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetAgentRequest() ); @@ -505,7 +507,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetAgentRequest() ); @@ -553,7 +555,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetAgentRequest() ); @@ -582,7 +584,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetAgentRequest() ); @@ -604,7 +606,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAgentRequest() ); @@ -635,7 +637,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAgentRequest() ); @@ -682,7 +684,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAgentRequest() ); @@ -713,7 +715,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAgentRequest() ); @@ -734,7 +736,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetValidationResultRequest() ); @@ -766,7 +768,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetValidationResultRequest() ); @@ -813,7 +815,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetValidationResultRequest() ); @@ -844,7 +846,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetValidationResultRequest() ); @@ -865,7 +867,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.TrainAgentRequest() ); @@ -897,7 +899,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.TrainAgentRequest() ); @@ -951,7 +953,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.TrainAgentRequest() ); @@ -982,7 +984,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.TrainAgentRequest() ); @@ -1015,7 +1017,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1037,7 +1039,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1055,7 +1057,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ExportAgentRequest() ); @@ -1087,7 +1089,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ExportAgentRequest() ); @@ -1141,7 +1143,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ExportAgentRequest() ); @@ -1172,7 +1174,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ExportAgentRequest() ); @@ -1205,7 +1207,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1227,7 +1229,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1245,7 +1247,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportAgentRequest() ); @@ -1277,7 +1279,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportAgentRequest() ); @@ -1331,7 +1333,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportAgentRequest() ); @@ -1362,7 +1364,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportAgentRequest() ); @@ -1395,7 +1397,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1417,7 +1419,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1435,7 +1437,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.RestoreAgentRequest() ); @@ -1467,7 +1469,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.RestoreAgentRequest() ); @@ -1521,7 +1523,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.RestoreAgentRequest() ); @@ -1552,7 +1554,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.RestoreAgentRequest() ); @@ -1585,7 +1587,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1607,7 +1609,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1625,7 +1627,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchAgentsRequest() ); @@ -1664,7 +1666,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchAgentsRequest() ); @@ -1719,7 +1721,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchAgentsRequest() ); @@ -1750,7 +1752,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchAgentsRequest() ); @@ -1810,7 +1812,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchAgentsRequest() ); @@ -1861,7 +1863,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchAgentsRequest() ); @@ -1910,7 +1912,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchAgentsRequest() ); @@ -1951,7 +1953,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1981,7 +1983,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2025,7 +2027,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2060,7 +2062,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2108,7 +2110,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2149,7 +2151,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2228,7 +2230,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2308,7 +2310,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2404,8 +2406,7 @@ describe('v2beta1.AgentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2424,7 +2425,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2433,8 +2434,7 @@ describe('v2beta1.AgentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2450,7 +2450,7 @@ describe('v2beta1.AgentsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2460,7 +2460,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2502,7 +2502,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2513,7 +2513,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2566,7 +2566,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2575,7 +2575,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2604,7 +2604,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2613,7 +2613,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2642,7 +2642,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2652,7 +2652,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2705,7 +2705,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2715,7 +2715,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2768,7 +2768,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2782,7 +2782,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2894,7 +2894,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2908,7 +2908,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3020,7 +3020,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3029,7 +3029,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3065,7 +3065,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3075,7 +3075,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3126,7 +3126,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3137,7 +3137,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3205,7 +3205,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3216,7 +3216,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3282,7 +3282,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3292,7 +3292,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3343,7 +3343,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3353,7 +3353,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3405,7 +3405,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3415,7 +3415,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3467,7 +3467,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3478,7 +3478,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3546,7 +3546,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3557,7 +3557,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3627,7 +3627,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3637,7 +3637,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3692,7 +3692,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3702,7 +3702,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3755,7 +3755,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3766,7 +3766,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3834,7 +3834,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3844,7 +3844,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3897,7 +3897,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3908,7 +3908,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3976,7 +3976,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3987,7 +3987,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4055,7 +4055,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4070,7 +4070,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4201,7 +4201,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4216,7 +4216,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4347,7 +4347,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4357,7 +4357,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4408,7 +4408,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4419,7 +4419,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4487,7 +4487,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4499,7 +4499,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4588,7 +4588,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4600,7 +4600,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4694,7 +4694,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4705,7 +4705,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4772,7 +4772,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4783,7 +4783,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4850,7 +4850,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4861,7 +4861,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4928,7 +4928,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4940,7 +4940,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5029,7 +5029,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5041,7 +5041,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5135,7 +5135,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5146,7 +5146,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5218,7 +5218,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5229,7 +5229,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5297,7 +5297,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5309,7 +5309,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -5403,7 +5403,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5414,7 +5414,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5482,7 +5482,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5492,7 +5492,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5544,7 +5544,7 @@ describe('v2beta1.AgentsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -5555,7 +5555,7 @@ describe('v2beta1.AgentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_answer_records_v2.ts b/packages/google-cloud-dialogflow/test/gapic_answer_records_v2.ts index e1675804d27..65bbc29346d 100644 --- a/packages/google-cloud-dialogflow/test/gapic_answer_records_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_answer_records_v2.ts @@ -252,7 +252,9 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.answerRecordsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateAnswerRecordRequest() ); @@ -344,7 +346,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateAnswerRecordRequest() ); @@ -392,7 +394,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateAnswerRecordRequest() ); @@ -424,7 +426,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateAnswerRecordRequest() ); @@ -446,7 +448,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListAnswerRecordsRequest() ); @@ -485,7 +487,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListAnswerRecordsRequest() ); @@ -540,7 +542,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListAnswerRecordsRequest() ); @@ -571,7 +573,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListAnswerRecordsRequest() ); @@ -631,7 +633,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListAnswerRecordsRequest() ); @@ -680,7 +682,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListAnswerRecordsRequest() ); @@ -729,7 +731,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListAnswerRecordsRequest() ); @@ -770,7 +772,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -800,7 +802,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -844,7 +846,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -879,7 +881,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -927,7 +929,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -964,7 +966,7 @@ describe('v2.AnswerRecordsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -975,7 +977,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1042,7 +1044,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1052,7 +1054,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1094,7 +1096,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1105,7 +1107,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1158,7 +1160,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1167,7 +1169,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1196,7 +1198,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1205,7 +1207,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1234,7 +1236,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1244,7 +1246,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1297,7 +1299,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1307,7 +1309,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1360,7 +1362,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1374,7 +1376,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1486,7 +1488,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1500,7 +1502,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1612,7 +1614,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1621,7 +1623,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1657,7 +1659,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1667,7 +1669,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1718,7 +1720,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1729,7 +1731,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1797,7 +1799,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1808,7 +1810,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -1874,7 +1876,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -1884,7 +1886,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1935,7 +1937,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -1945,7 +1947,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1997,7 +1999,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2007,7 +2009,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2059,7 +2061,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2070,7 +2072,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2138,7 +2140,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2148,7 +2150,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2203,7 +2205,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2214,7 +2216,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2286,7 +2288,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2297,7 +2299,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2367,7 +2369,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2377,7 +2379,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2432,7 +2434,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2442,7 +2444,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2495,7 +2497,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2506,7 +2508,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2574,7 +2576,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2584,7 +2586,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2637,7 +2639,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2648,7 +2650,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2716,7 +2718,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2727,7 +2729,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2795,7 +2797,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2810,7 +2812,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2941,7 +2943,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2956,7 +2958,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3087,7 +3089,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3097,7 +3099,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3148,7 +3150,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3159,7 +3161,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3227,7 +3229,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3239,7 +3241,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3328,7 +3330,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3340,7 +3342,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3434,7 +3436,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3445,7 +3447,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3512,7 +3514,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3523,7 +3525,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3590,7 +3592,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3601,7 +3603,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3668,7 +3670,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3680,7 +3682,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3769,7 +3771,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3780,7 +3782,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -3850,7 +3852,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -3863,7 +3865,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -3957,7 +3959,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3969,7 +3971,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4063,7 +4065,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4074,7 +4076,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4146,7 +4148,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4157,7 +4159,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4225,7 +4227,7 @@ describe('v2.AnswerRecordsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4237,7 +4239,7 @@ describe('v2.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_answer_records_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_answer_records_v2beta1.ts index 9da365c3cbb..e9886fa4958 100644 --- a/packages/google-cloud-dialogflow/test/gapic_answer_records_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_answer_records_v2beta1.ts @@ -252,7 +252,9 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.answerRecordsStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v2beta1.AnswerRecordsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest() ); @@ -345,7 +347,7 @@ describe('v2beta1.AnswerRecordsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest() ); @@ -394,7 +396,7 @@ describe('v2beta1.AnswerRecordsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest() ); @@ -427,7 +429,7 @@ describe('v2beta1.AnswerRecordsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest() ); @@ -449,7 +451,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest() ); @@ -482,7 +484,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest() ); @@ -530,7 +532,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest() ); @@ -562,7 +564,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest() ); @@ -584,7 +586,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest() ); @@ -623,7 +625,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest() ); @@ -680,7 +682,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest() ); @@ -711,7 +713,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest() ); @@ -772,7 +774,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest() ); @@ -822,7 +824,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest() ); @@ -872,7 +874,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest() ); @@ -914,7 +916,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -944,7 +946,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -988,7 +990,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1023,7 +1025,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1071,7 +1073,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1108,7 +1110,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1118,7 +1120,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1160,7 +1162,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1171,7 +1173,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1224,7 +1226,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1233,7 +1235,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1262,7 +1264,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1271,7 +1273,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1300,7 +1302,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1310,7 +1312,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1363,7 +1365,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1373,7 +1375,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1426,7 +1428,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1440,7 +1442,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1552,7 +1554,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1566,7 +1568,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1678,7 +1680,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1687,7 +1689,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1723,7 +1725,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1733,7 +1735,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1784,7 +1786,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1795,7 +1797,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1863,7 +1865,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1874,7 +1876,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -1940,7 +1942,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -1950,7 +1952,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2001,7 +2003,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2011,7 +2013,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2063,7 +2065,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2073,7 +2075,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2125,7 +2127,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2136,7 +2138,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2204,7 +2206,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2215,7 +2217,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2285,7 +2287,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2295,7 +2297,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2350,7 +2352,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2360,7 +2362,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2413,7 +2415,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2424,7 +2426,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2492,7 +2494,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2502,7 +2504,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2555,7 +2557,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2566,7 +2568,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2634,7 +2636,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2645,7 +2647,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2713,7 +2715,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2728,7 +2730,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2859,7 +2861,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2874,7 +2876,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3005,7 +3007,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3015,7 +3017,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3066,7 +3068,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3077,7 +3079,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3145,7 +3147,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3157,7 +3159,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3246,7 +3248,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3258,7 +3260,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3352,7 +3354,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3363,7 +3365,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3430,7 +3432,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3441,7 +3443,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3508,7 +3510,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3519,7 +3521,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3586,7 +3588,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3598,7 +3600,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3687,7 +3689,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3699,7 +3701,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -3793,7 +3795,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3804,7 +3806,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -3876,7 +3878,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3887,7 +3889,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -3955,7 +3957,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3967,7 +3969,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4061,7 +4063,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4072,7 +4074,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4140,7 +4142,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4150,7 +4152,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4202,7 +4204,7 @@ describe('v2beta1.AnswerRecordsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4213,7 +4215,7 @@ describe('v2beta1.AnswerRecordsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_contexts_v2.ts b/packages/google-cloud-dialogflow/test/gapic_contexts_v2.ts index f5bd364e5f1..52c4e27272d 100644 --- a/packages/google-cloud-dialogflow/test/gapic_contexts_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_contexts_v2.ts @@ -250,7 +250,9 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.contextsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetContextRequest() ); @@ -340,7 +342,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetContextRequest() ); @@ -387,7 +389,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetContextRequest() ); @@ -418,7 +420,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetContextRequest() ); @@ -439,7 +441,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateContextRequest() ); @@ -470,7 +472,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateContextRequest() ); @@ -517,7 +519,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateContextRequest() ); @@ -548,7 +550,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateContextRequest() ); @@ -569,7 +571,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateContextRequest() ); @@ -601,7 +603,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateContextRequest() ); @@ -649,7 +651,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateContextRequest() ); @@ -681,7 +683,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateContextRequest() ); @@ -703,7 +705,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteContextRequest() ); @@ -734,7 +736,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteContextRequest() ); @@ -781,7 +783,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteContextRequest() ); @@ -812,7 +814,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteContextRequest() ); @@ -833,7 +835,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAllContextsRequest() ); @@ -864,7 +866,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAllContextsRequest() ); @@ -911,7 +913,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAllContextsRequest() ); @@ -942,7 +944,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteAllContextsRequest() ); @@ -963,7 +965,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListContextsRequest() ); @@ -996,7 +998,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListContextsRequest() ); @@ -1045,7 +1047,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListContextsRequest() ); @@ -1076,7 +1078,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListContextsRequest() ); @@ -1130,7 +1132,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListContextsRequest() ); @@ -1181,7 +1183,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListContextsRequest() ); @@ -1224,7 +1226,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListContextsRequest() ); @@ -1265,7 +1267,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1295,7 +1297,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1339,7 +1341,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1374,7 +1376,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1422,7 +1424,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1459,7 +1461,7 @@ describe('v2.ContextsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1470,7 +1472,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1537,7 +1539,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1547,7 +1549,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1589,7 +1591,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1600,7 +1602,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1653,7 +1655,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1662,7 +1664,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1691,7 +1693,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1700,7 +1702,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1729,7 +1731,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1739,7 +1741,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1792,7 +1794,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1802,7 +1804,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1855,7 +1857,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1869,7 +1871,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1981,7 +1983,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1995,7 +1997,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2107,7 +2109,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2116,7 +2118,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2152,7 +2154,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2162,7 +2164,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2213,7 +2215,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentSession', () => { + describe('projectAgentSession', async () => { const fakePath = '/rendered/path/projectAgentSession'; const expectedParameters = { project: 'projectValue', @@ -2223,7 +2225,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2274,7 +2276,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2285,7 +2287,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2353,7 +2355,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2364,7 +2366,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2430,7 +2432,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2440,7 +2442,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2491,7 +2493,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2501,7 +2503,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2553,7 +2555,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2563,7 +2565,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2615,7 +2617,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2626,7 +2628,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2694,7 +2696,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2704,7 +2706,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2759,7 +2761,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2770,7 +2772,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2842,7 +2844,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2853,7 +2855,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2923,7 +2925,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2933,7 +2935,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2988,7 +2990,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2998,7 +3000,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3051,7 +3053,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3062,7 +3064,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3130,7 +3132,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3140,7 +3142,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3193,7 +3195,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3204,7 +3206,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3272,7 +3274,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3283,7 +3285,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3351,7 +3353,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3366,7 +3368,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3497,7 +3499,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3512,7 +3514,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3643,7 +3645,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3653,7 +3655,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3704,7 +3706,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3715,7 +3717,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3783,7 +3785,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3795,7 +3797,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3884,7 +3886,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3896,7 +3898,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3990,7 +3992,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4001,7 +4003,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4068,7 +4070,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4079,7 +4081,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4146,7 +4148,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4157,7 +4159,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4224,7 +4226,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4236,7 +4238,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4325,7 +4327,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4336,7 +4338,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4406,7 +4408,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4419,7 +4421,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4513,7 +4515,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4525,7 +4527,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4619,7 +4621,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4630,7 +4632,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4702,7 +4704,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4713,7 +4715,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4781,7 +4783,7 @@ describe('v2.ContextsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4793,7 +4795,7 @@ describe('v2.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_contexts_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_contexts_v2beta1.ts index dab382db7fa..7cdf534a42c 100644 --- a/packages/google-cloud-dialogflow/test/gapic_contexts_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_contexts_v2beta1.ts @@ -250,7 +250,9 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.contextsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetContextRequest() ); @@ -340,7 +342,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetContextRequest() ); @@ -387,7 +389,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetContextRequest() ); @@ -418,7 +420,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetContextRequest() ); @@ -439,7 +441,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateContextRequest() ); @@ -470,7 +472,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateContextRequest() ); @@ -517,7 +519,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateContextRequest() ); @@ -548,7 +550,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateContextRequest() ); @@ -569,7 +571,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateContextRequest() ); @@ -601,7 +603,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateContextRequest() ); @@ -649,7 +651,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateContextRequest() ); @@ -681,7 +683,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateContextRequest() ); @@ -703,7 +705,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteContextRequest() ); @@ -734,7 +736,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteContextRequest() ); @@ -781,7 +783,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteContextRequest() ); @@ -812,7 +814,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteContextRequest() ); @@ -833,7 +835,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest() ); @@ -864,7 +866,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest() ); @@ -911,7 +913,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest() ); @@ -942,7 +944,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest() ); @@ -963,7 +965,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListContextsRequest() ); @@ -1002,7 +1004,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListContextsRequest() ); @@ -1057,7 +1059,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListContextsRequest() ); @@ -1088,7 +1090,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListContextsRequest() ); @@ -1148,7 +1150,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListContextsRequest() ); @@ -1199,7 +1201,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListContextsRequest() ); @@ -1248,7 +1250,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListContextsRequest() ); @@ -1289,7 +1291,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1319,7 +1321,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1363,7 +1365,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1398,7 +1400,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1446,7 +1448,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1483,7 +1485,7 @@ describe('v2beta1.ContextsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1493,7 +1495,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1535,7 +1537,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1546,7 +1548,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1599,7 +1601,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1608,7 +1610,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1637,7 +1639,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1646,7 +1648,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1675,7 +1677,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1685,7 +1687,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1738,7 +1740,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1748,7 +1750,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1801,7 +1803,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1815,7 +1817,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1927,7 +1929,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1941,7 +1943,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2053,7 +2055,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2062,7 +2064,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2098,7 +2100,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2108,7 +2110,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2159,7 +2161,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentSession', () => { + describe('projectAgentSession', async () => { const fakePath = '/rendered/path/projectAgentSession'; const expectedParameters = { project: 'projectValue', @@ -2169,7 +2171,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2220,7 +2222,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2231,7 +2233,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2299,7 +2301,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2310,7 +2312,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2376,7 +2378,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2386,7 +2388,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2437,7 +2439,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2447,7 +2449,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2499,7 +2501,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2509,7 +2511,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2561,7 +2563,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2572,7 +2574,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2640,7 +2642,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2651,7 +2653,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2721,7 +2723,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2731,7 +2733,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2786,7 +2788,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2796,7 +2798,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2849,7 +2851,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2860,7 +2862,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2928,7 +2930,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2938,7 +2940,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2991,7 +2993,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3002,7 +3004,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3070,7 +3072,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3081,7 +3083,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3149,7 +3151,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3164,7 +3166,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3295,7 +3297,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3310,7 +3312,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3441,7 +3443,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3451,7 +3453,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3502,7 +3504,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3513,7 +3515,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3581,7 +3583,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3593,7 +3595,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3682,7 +3684,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3694,7 +3696,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3788,7 +3790,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3799,7 +3801,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3866,7 +3868,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3877,7 +3879,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3944,7 +3946,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3955,7 +3957,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4022,7 +4024,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4034,7 +4036,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4123,7 +4125,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4135,7 +4137,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4229,7 +4231,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4240,7 +4242,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4312,7 +4314,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4323,7 +4325,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4391,7 +4393,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4403,7 +4405,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4497,7 +4499,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4508,7 +4510,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4576,7 +4578,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4586,7 +4588,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4638,7 +4640,7 @@ describe('v2beta1.ContextsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4649,7 +4651,7 @@ describe('v2beta1.ContextsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_conversation_datasets_v2.ts b/packages/google-cloud-dialogflow/test/gapic_conversation_datasets_v2.ts index 620a3c639d0..bbb8f1b4d70 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversation_datasets_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversation_datasets_v2.ts @@ -300,7 +300,9 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationDatasetsStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationDatasetRequest() ); @@ -396,7 +398,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationDatasetRequest() ); @@ -444,7 +446,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationDatasetRequest() ); @@ -479,7 +481,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationDatasetRequest() ); @@ -504,7 +506,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationDatasetRequest() ); @@ -538,7 +540,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationDatasetRequest() ); @@ -593,7 +595,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationDatasetRequest() ); @@ -628,7 +630,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationDatasetRequest() ); @@ -662,7 +664,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -686,7 +688,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -708,7 +710,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest() ); @@ -742,7 +744,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest() ); @@ -797,7 +799,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest() ); @@ -832,7 +834,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest() ); @@ -866,7 +868,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -890,7 +892,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -912,7 +914,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportConversationDataRequest() ); @@ -946,7 +948,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportConversationDataRequest() ); @@ -1001,7 +1003,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportConversationDataRequest() ); @@ -1036,7 +1038,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportConversationDataRequest() ); @@ -1070,7 +1072,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1093,7 +1095,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1115,7 +1117,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationDatasetsRequest() ); @@ -1156,7 +1158,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationDatasetsRequest() ); @@ -1214,7 +1216,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationDatasetsRequest() ); @@ -1249,7 +1251,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationDatasetsRequest() ); @@ -1317,7 +1319,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationDatasetsRequest() ); @@ -1374,7 +1376,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationDatasetsRequest() ); @@ -1429,7 +1431,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationDatasetsRequest() ); @@ -1476,7 +1478,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1507,7 +1509,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1552,7 +1554,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1588,7 +1590,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1637,7 +1639,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1679,7 +1681,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1761,7 +1763,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1844,7 +1846,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1943,8 +1945,7 @@ describe('v2.ConversationDatasetsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1964,7 +1965,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1973,8 +1974,7 @@ describe('v2.ConversationDatasetsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1990,7 +1990,7 @@ describe('v2.ConversationDatasetsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2002,7 +2002,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2069,7 +2069,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2080,7 +2080,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2122,7 +2122,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2134,7 +2134,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2187,7 +2187,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2198,7 +2198,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2237,7 +2237,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2247,7 +2247,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2276,7 +2276,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2286,7 +2286,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2315,7 +2315,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2326,7 +2326,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2379,7 +2379,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2390,7 +2390,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2443,7 +2443,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2458,7 +2458,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2570,7 +2570,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2585,7 +2585,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2697,7 +2697,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2707,7 +2707,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2743,7 +2743,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2754,7 +2754,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2805,7 +2805,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2817,7 +2817,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2885,7 +2885,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2897,7 +2897,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2963,7 +2963,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2974,7 +2974,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3025,7 +3025,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3036,7 +3036,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3088,7 +3088,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3099,7 +3099,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3151,7 +3151,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3163,7 +3163,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3231,7 +3231,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3242,7 +3242,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3297,7 +3297,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3309,7 +3309,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3381,7 +3381,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3393,7 +3393,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3463,7 +3463,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3474,7 +3474,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3529,7 +3529,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3540,7 +3540,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3593,7 +3593,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3605,7 +3605,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3673,7 +3673,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3684,7 +3684,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3737,7 +3737,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3749,7 +3749,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3817,7 +3817,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3829,7 +3829,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3897,7 +3897,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3913,7 +3913,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4044,7 +4044,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4060,7 +4060,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4191,7 +4191,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4202,7 +4202,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4253,7 +4253,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4265,7 +4265,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4333,7 +4333,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4346,7 +4346,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4435,7 +4435,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4448,7 +4448,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4542,7 +4542,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4554,7 +4554,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4621,7 +4621,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4633,7 +4633,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4700,7 +4700,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4712,7 +4712,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4779,7 +4779,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4792,7 +4792,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4881,7 +4881,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4893,7 +4893,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4963,7 +4963,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4977,7 +4977,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5071,7 +5071,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5084,7 +5084,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5178,7 +5178,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5190,7 +5190,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5262,7 +5262,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5274,7 +5274,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5342,7 +5342,7 @@ describe('v2.ConversationDatasetsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5355,7 +5355,7 @@ describe('v2.ConversationDatasetsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_conversation_models_v2.ts b/packages/google-cloud-dialogflow/test/gapic_conversation_models_v2.ts index fdce1913da1..6c1443f0154 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversation_models_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversation_models_v2.ts @@ -291,7 +291,9 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationModelsStub); client.close().then(() => { done(); @@ -350,7 +352,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelRequest() ); @@ -382,7 +384,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelRequest() ); @@ -429,7 +431,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelRequest() ); @@ -460,7 +462,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelRequest() ); @@ -481,7 +483,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest() ); @@ -513,7 +515,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest() ); @@ -560,7 +562,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest() ); @@ -594,7 +596,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest() ); @@ -618,7 +620,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelRequest() ); @@ -651,7 +653,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelRequest() ); @@ -705,7 +707,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelRequest() ); @@ -739,7 +741,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelRequest() ); @@ -772,7 +774,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -795,7 +797,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -816,7 +818,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationModelRequest() ); @@ -849,7 +851,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationModelRequest() ); @@ -903,7 +905,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationModelRequest() ); @@ -937,7 +939,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationModelRequest() ); @@ -970,7 +972,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -993,7 +995,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1014,7 +1016,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeployConversationModelRequest() ); @@ -1047,7 +1049,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeployConversationModelRequest() ); @@ -1101,7 +1103,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeployConversationModelRequest() ); @@ -1135,7 +1137,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeployConversationModelRequest() ); @@ -1168,7 +1170,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1191,7 +1193,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1212,7 +1214,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UndeployConversationModelRequest() ); @@ -1245,7 +1247,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UndeployConversationModelRequest() ); @@ -1299,7 +1301,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UndeployConversationModelRequest() ); @@ -1333,7 +1335,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UndeployConversationModelRequest() ); @@ -1366,7 +1368,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1389,7 +1391,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1410,7 +1412,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest() ); @@ -1444,7 +1446,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest() ); @@ -1498,7 +1500,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest() ); @@ -1530,7 +1532,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest() ); @@ -1561,7 +1563,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1584,7 +1586,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1605,7 +1607,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelsRequest() ); @@ -1645,7 +1647,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelsRequest() ); @@ -1702,7 +1704,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelsRequest() ); @@ -1736,7 +1738,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelsRequest() ); @@ -1803,7 +1805,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelsRequest() ); @@ -1859,7 +1861,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelsRequest() ); @@ -1913,7 +1915,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelsRequest() ); @@ -1960,7 +1962,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest() ); @@ -2000,7 +2002,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest() ); @@ -2057,7 +2059,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest() ); @@ -2091,7 +2093,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest() ); @@ -2163,7 +2165,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest() ); @@ -2224,7 +2226,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest() ); @@ -2278,7 +2280,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest() ); @@ -2324,7 +2326,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2354,7 +2356,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2398,7 +2400,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2433,7 +2435,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2481,7 +2483,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2522,7 +2524,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2601,7 +2603,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2681,7 +2683,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2777,8 +2779,7 @@ describe('v2.ConversationModelsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2797,7 +2798,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2806,8 +2807,7 @@ describe('v2.ConversationModelsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2823,7 +2823,7 @@ describe('v2.ConversationModelsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2834,7 +2834,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2901,7 +2901,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2911,7 +2911,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2953,7 +2953,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2964,7 +2964,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3017,7 +3017,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3026,7 +3026,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3055,7 +3055,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -3064,7 +3064,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3093,7 +3093,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3103,7 +3103,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3156,7 +3156,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3166,7 +3166,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3219,7 +3219,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3233,7 +3233,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3345,7 +3345,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3359,7 +3359,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3471,7 +3471,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3480,7 +3480,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3516,7 +3516,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3526,7 +3526,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3577,7 +3577,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3588,7 +3588,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3656,7 +3656,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3667,7 +3667,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3733,7 +3733,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3743,7 +3743,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3794,7 +3794,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3804,7 +3804,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3856,7 +3856,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3866,7 +3866,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3918,7 +3918,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3929,7 +3929,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3997,7 +3997,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4007,7 +4007,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4062,7 +4062,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -4073,7 +4073,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -4145,7 +4145,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4156,7 +4156,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -4226,7 +4226,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4236,7 +4236,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4291,7 +4291,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4301,7 +4301,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4354,7 +4354,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4365,7 +4365,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -4433,7 +4433,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -4443,7 +4443,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4496,7 +4496,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4507,7 +4507,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4575,7 +4575,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4586,7 +4586,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4654,7 +4654,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4669,7 +4669,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4800,7 +4800,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4815,7 +4815,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4946,7 +4946,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4956,7 +4956,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -5007,7 +5007,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -5018,7 +5018,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5086,7 +5086,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -5098,7 +5098,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -5187,7 +5187,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -5199,7 +5199,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -5293,7 +5293,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -5304,7 +5304,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -5371,7 +5371,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -5382,7 +5382,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -5449,7 +5449,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -5460,7 +5460,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5527,7 +5527,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5539,7 +5539,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5628,7 +5628,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -5639,7 +5639,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -5709,7 +5709,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -5722,7 +5722,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5816,7 +5816,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5828,7 +5828,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5922,7 +5922,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5933,7 +5933,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -6005,7 +6005,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -6016,7 +6016,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -6084,7 +6084,7 @@ describe('v2.ConversationModelsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -6096,7 +6096,7 @@ describe('v2.ConversationModelsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2.ts b/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2.ts index 7c19bb2a327..ddf3f332c25 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2.ts @@ -300,7 +300,9 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationProfilesStub); client.close().then(() => { done(); @@ -363,7 +365,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationProfileRequest() ); @@ -396,7 +398,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationProfileRequest() ); @@ -444,7 +446,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationProfileRequest() ); @@ -479,7 +481,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationProfileRequest() ); @@ -504,7 +506,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationProfileRequest() ); @@ -537,7 +539,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationProfileRequest() ); @@ -585,7 +587,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationProfileRequest() ); @@ -620,7 +622,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationProfileRequest() ); @@ -645,7 +647,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateConversationProfileRequest() ); @@ -679,7 +681,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateConversationProfileRequest() ); @@ -728,7 +730,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateConversationProfileRequest() ); @@ -764,7 +766,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateConversationProfileRequest() ); @@ -790,7 +792,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationProfileRequest() ); @@ -823,7 +825,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationProfileRequest() ); @@ -871,7 +873,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationProfileRequest() ); @@ -906,7 +908,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteConversationProfileRequest() ); @@ -931,7 +933,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest() ); @@ -965,7 +967,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest() ); @@ -1020,7 +1022,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest() ); @@ -1055,7 +1057,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest() ); @@ -1089,7 +1091,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1113,7 +1115,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1135,7 +1137,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest() ); @@ -1169,7 +1171,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest() ); @@ -1224,7 +1226,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest() ); @@ -1259,7 +1261,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest() ); @@ -1293,7 +1295,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1317,7 +1319,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1339,7 +1341,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationProfilesRequest() ); @@ -1380,7 +1382,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationProfilesRequest() ); @@ -1438,7 +1440,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationProfilesRequest() ); @@ -1473,7 +1475,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationProfilesRequest() ); @@ -1541,7 +1543,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationProfilesRequest() ); @@ -1598,7 +1600,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationProfilesRequest() ); @@ -1653,7 +1655,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationProfilesRequest() ); @@ -1700,7 +1702,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1731,7 +1733,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1776,7 +1778,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1812,7 +1814,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1861,7 +1863,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1903,7 +1905,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1985,7 +1987,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2068,7 +2070,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2167,8 +2169,7 @@ describe('v2.ConversationProfilesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2188,7 +2189,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2197,8 +2198,7 @@ describe('v2.ConversationProfilesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2214,7 +2214,7 @@ describe('v2.ConversationProfilesClient', () => { }); describe('Path templates', () => { - describe('cXSecuritySettings', () => { + describe('cXSecuritySettings', async () => { const fakePath = '/rendered/path/cXSecuritySettings'; const expectedParameters = { project: 'projectValue', @@ -2226,7 +2226,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cXSecuritySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2292,7 +2292,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2304,7 +2304,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2371,7 +2371,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2382,7 +2382,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2424,7 +2424,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2436,7 +2436,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2489,7 +2489,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2499,7 +2499,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2528,7 +2528,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2538,7 +2538,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2567,7 +2567,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2578,7 +2578,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2631,7 +2631,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2642,7 +2642,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2695,7 +2695,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2710,7 +2710,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2822,7 +2822,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2837,7 +2837,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2949,7 +2949,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2959,7 +2959,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2995,7 +2995,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3006,7 +3006,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3057,7 +3057,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3069,7 +3069,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3137,7 +3137,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3149,7 +3149,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3215,7 +3215,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3226,7 +3226,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3277,7 +3277,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3288,7 +3288,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3340,7 +3340,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3351,7 +3351,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3403,7 +3403,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3415,7 +3415,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3483,7 +3483,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3494,7 +3494,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3549,7 +3549,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3561,7 +3561,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3633,7 +3633,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3645,7 +3645,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3715,7 +3715,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3726,7 +3726,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3781,7 +3781,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3792,7 +3792,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3845,7 +3845,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3857,7 +3857,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3925,7 +3925,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3936,7 +3936,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3989,7 +3989,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4001,7 +4001,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4069,7 +4069,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4081,7 +4081,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4149,7 +4149,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4165,7 +4165,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4296,7 +4296,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4312,7 +4312,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4443,7 +4443,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4454,7 +4454,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4505,7 +4505,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4517,7 +4517,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4585,7 +4585,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4598,7 +4598,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4687,7 +4687,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4700,7 +4700,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4794,7 +4794,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4806,7 +4806,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4873,7 +4873,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4885,7 +4885,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4952,7 +4952,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4964,7 +4964,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5031,7 +5031,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5044,7 +5044,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5133,7 +5133,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -5145,7 +5145,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -5215,7 +5215,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -5229,7 +5229,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5323,7 +5323,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5336,7 +5336,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5430,7 +5430,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5442,7 +5442,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5514,7 +5514,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5526,7 +5526,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5594,7 +5594,7 @@ describe('v2.ConversationProfilesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5607,7 +5607,7 @@ describe('v2.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts index 96577cb7f3d..dfe9b0df399 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts @@ -302,7 +302,9 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationProfilesStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest() ); @@ -398,7 +400,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest() ); @@ -446,7 +448,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest() ); @@ -481,7 +483,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest() ); @@ -506,7 +508,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest() ); @@ -539,7 +541,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest() ); @@ -587,7 +589,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest() ); @@ -622,7 +624,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest() ); @@ -647,7 +649,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest() ); @@ -681,7 +683,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest() ); @@ -730,7 +732,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest() ); @@ -766,7 +768,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest() ); @@ -792,7 +794,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest() ); @@ -825,7 +827,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest() ); @@ -873,7 +875,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest() ); @@ -908,7 +910,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest() ); @@ -933,7 +935,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() ); @@ -967,7 +969,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() ); @@ -1022,7 +1024,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() ); @@ -1057,7 +1059,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() ); @@ -1091,7 +1093,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1115,7 +1117,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1137,7 +1139,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() ); @@ -1171,7 +1173,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() ); @@ -1226,7 +1228,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() ); @@ -1261,7 +1263,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() ); @@ -1295,7 +1297,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1319,7 +1321,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1341,7 +1343,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest() ); @@ -1382,7 +1384,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest() ); @@ -1440,7 +1442,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest() ); @@ -1475,7 +1477,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest() ); @@ -1545,7 +1547,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest() ); @@ -1604,7 +1606,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest() ); @@ -1659,7 +1661,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest() ); @@ -1706,7 +1708,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1737,7 +1739,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1782,7 +1784,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1818,7 +1820,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1867,7 +1869,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1909,7 +1911,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1991,7 +1993,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2074,7 +2076,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2173,8 +2175,7 @@ describe('v2beta1.ConversationProfilesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2194,7 +2195,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2203,8 +2204,7 @@ describe('v2beta1.ConversationProfilesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2220,7 +2220,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); describe('Path templates', () => { - describe('cXSecuritySettings', () => { + describe('cXSecuritySettings', async () => { const fakePath = '/rendered/path/cXSecuritySettings'; const expectedParameters = { project: 'projectValue', @@ -2232,7 +2232,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cXSecuritySettingsPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2298,7 +2298,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2309,7 +2309,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2351,7 +2351,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2363,7 +2363,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2416,7 +2416,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2426,7 +2426,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2455,7 +2455,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2465,7 +2465,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2494,7 +2494,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2505,7 +2505,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2558,7 +2558,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2569,7 +2569,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2622,7 +2622,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2637,7 +2637,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2749,7 +2749,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2764,7 +2764,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2876,7 +2876,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2886,7 +2886,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2922,7 +2922,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2933,7 +2933,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2984,7 +2984,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2996,7 +2996,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3064,7 +3064,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3076,7 +3076,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3142,7 +3142,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3153,7 +3153,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3204,7 +3204,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3215,7 +3215,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3267,7 +3267,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3278,7 +3278,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3330,7 +3330,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3342,7 +3342,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3410,7 +3410,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3422,7 +3422,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3492,7 +3492,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3503,7 +3503,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3558,7 +3558,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3569,7 +3569,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3622,7 +3622,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3634,7 +3634,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3702,7 +3702,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3713,7 +3713,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3766,7 +3766,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3778,7 +3778,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3846,7 +3846,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3858,7 +3858,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3926,7 +3926,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3942,7 +3942,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4073,7 +4073,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4089,7 +4089,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4220,7 +4220,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4231,7 +4231,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4282,7 +4282,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4294,7 +4294,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4362,7 +4362,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4375,7 +4375,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4464,7 +4464,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4477,7 +4477,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4571,7 +4571,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4583,7 +4583,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4650,7 +4650,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4662,7 +4662,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4729,7 +4729,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4741,7 +4741,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4808,7 +4808,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4821,7 +4821,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4910,7 +4910,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4923,7 +4923,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5017,7 +5017,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5029,7 +5029,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5101,7 +5101,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5113,7 +5113,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5181,7 +5181,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5194,7 +5194,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -5288,7 +5288,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5300,7 +5300,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5368,7 +5368,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5379,7 +5379,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5431,7 +5431,7 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -5443,7 +5443,7 @@ describe('v2beta1.ConversationProfilesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts b/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts index d7d2234aeec..4c173c9122f 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts @@ -252,7 +252,9 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationRequest() ); @@ -343,7 +345,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationRequest() ); @@ -390,7 +392,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationRequest() ); @@ -421,7 +423,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateConversationRequest() ); @@ -442,7 +444,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationRequest() ); @@ -473,7 +475,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationRequest() ); @@ -520,7 +522,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationRequest() ); @@ -551,7 +553,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetConversationRequest() ); @@ -572,7 +574,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CompleteConversationRequest() ); @@ -604,7 +606,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CompleteConversationRequest() ); @@ -651,7 +653,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CompleteConversationRequest() ); @@ -682,7 +684,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CompleteConversationRequest() ); @@ -703,7 +705,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.IngestContextReferencesRequest() ); @@ -735,7 +737,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.IngestContextReferencesRequest() ); @@ -782,7 +784,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.IngestContextReferencesRequest() ); @@ -816,7 +818,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.IngestContextReferencesRequest() ); @@ -840,7 +842,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest() ); @@ -872,7 +874,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest() ); @@ -919,7 +921,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest() ); @@ -953,7 +955,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestConversationSummaryRequest() ); @@ -977,7 +979,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() ); @@ -1010,7 +1012,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() ); @@ -1058,7 +1060,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() ); @@ -1093,7 +1095,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() ); @@ -1118,7 +1120,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSuggestionRequest() ); @@ -1150,7 +1152,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSuggestionRequest() ); @@ -1197,7 +1199,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSuggestionRequest() ); @@ -1231,7 +1233,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateStatelessSuggestionRequest() ); @@ -1255,7 +1257,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchKnowledgeRequest() ); @@ -1291,7 +1293,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchKnowledgeRequest() ); @@ -1343,7 +1345,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchKnowledgeRequest() ); @@ -1379,7 +1381,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SearchKnowledgeRequest() ); @@ -1405,7 +1407,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateSuggestionsRequest() ); @@ -1437,7 +1439,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateSuggestionsRequest() ); @@ -1484,7 +1486,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateSuggestionsRequest() ); @@ -1515,7 +1517,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GenerateSuggestionsRequest() ); @@ -1536,7 +1538,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationsRequest() ); @@ -1575,7 +1577,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationsRequest() ); @@ -1630,7 +1632,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationsRequest() ); @@ -1661,7 +1663,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationsRequest() ); @@ -1721,7 +1723,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationsRequest() ); @@ -1770,7 +1772,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationsRequest() ); @@ -1819,7 +1821,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListConversationsRequest() ); @@ -1861,7 +1863,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListMessagesRequest() ); @@ -1894,7 +1896,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListMessagesRequest() ); @@ -1943,7 +1945,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListMessagesRequest() ); @@ -1974,7 +1976,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListMessagesRequest() ); @@ -2028,7 +2030,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListMessagesRequest() ); @@ -2079,7 +2081,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListMessagesRequest() ); @@ -2122,7 +2124,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListMessagesRequest() ); @@ -2163,7 +2165,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2193,7 +2195,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2237,7 +2239,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2272,7 +2274,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2320,7 +2322,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2357,7 +2359,7 @@ describe('v2.ConversationsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2368,7 +2370,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2435,7 +2437,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2445,7 +2447,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2487,7 +2489,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2498,7 +2500,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2551,7 +2553,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2561,7 +2563,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2600,7 +2602,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2609,7 +2611,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2638,7 +2640,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2647,7 +2649,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2676,7 +2678,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2686,7 +2688,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2739,7 +2741,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2749,7 +2751,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2802,7 +2804,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2816,7 +2818,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2928,7 +2930,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2942,7 +2944,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3054,7 +3056,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3063,7 +3065,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3099,7 +3101,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3109,7 +3111,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3160,7 +3162,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3171,7 +3173,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3239,7 +3241,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3250,7 +3252,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3316,7 +3318,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3326,7 +3328,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3377,7 +3379,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3387,7 +3389,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3439,7 +3441,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3449,7 +3451,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3501,7 +3503,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3512,7 +3514,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3580,7 +3582,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3590,7 +3592,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3645,7 +3647,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3656,7 +3658,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3728,7 +3730,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3739,7 +3741,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3809,7 +3811,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3819,7 +3821,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3874,7 +3876,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3884,7 +3886,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3937,7 +3939,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3948,7 +3950,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -4016,7 +4018,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -4026,7 +4028,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4079,7 +4081,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4090,7 +4092,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4158,7 +4160,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4169,7 +4171,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4237,7 +4239,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4252,7 +4254,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4383,7 +4385,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4398,7 +4400,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4529,7 +4531,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4539,7 +4541,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4590,7 +4592,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4601,7 +4603,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4669,7 +4671,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4681,7 +4683,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4770,7 +4772,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4782,7 +4784,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4876,7 +4878,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4887,7 +4889,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4954,7 +4956,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4965,7 +4967,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -5032,7 +5034,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -5043,7 +5045,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5110,7 +5112,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5122,7 +5124,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5211,7 +5213,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -5222,7 +5224,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -5292,7 +5294,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -5305,7 +5307,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5399,7 +5401,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5411,7 +5413,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5505,7 +5507,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5516,7 +5518,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5588,7 +5590,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5599,7 +5601,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5667,7 +5669,7 @@ describe('v2.ConversationsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5679,7 +5681,7 @@ describe('v2.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts index 84ed4b795cb..73318f42e11 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts @@ -252,7 +252,9 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationRequest() ); @@ -343,7 +345,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationRequest() ); @@ -390,7 +392,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationRequest() ); @@ -421,7 +423,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateConversationRequest() ); @@ -442,7 +444,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationRequest() ); @@ -473,7 +475,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationRequest() ); @@ -520,7 +522,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationRequest() ); @@ -551,7 +553,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetConversationRequest() ); @@ -572,7 +574,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompleteConversationRequest() ); @@ -604,7 +606,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompleteConversationRequest() ); @@ -651,7 +653,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompleteConversationRequest() ); @@ -682,7 +684,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompleteConversationRequest() ); @@ -703,7 +705,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.IngestContextReferencesRequest() ); @@ -735,7 +737,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.IngestContextReferencesRequest() ); @@ -782,7 +784,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.IngestContextReferencesRequest() ); @@ -816,7 +818,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.IngestContextReferencesRequest() ); @@ -840,7 +842,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest() ); @@ -872,7 +874,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest() ); @@ -919,7 +921,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest() ); @@ -950,7 +952,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest() ); @@ -971,7 +973,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest() ); @@ -1003,7 +1005,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest() ); @@ -1050,7 +1052,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest() ); @@ -1084,7 +1086,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest() ); @@ -1108,7 +1110,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() ); @@ -1141,7 +1143,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() ); @@ -1189,7 +1191,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() ); @@ -1224,7 +1226,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() ); @@ -1249,7 +1251,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSuggestionRequest() ); @@ -1281,7 +1283,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSuggestionRequest() ); @@ -1328,7 +1330,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSuggestionRequest() ); @@ -1362,7 +1364,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSuggestionRequest() ); @@ -1386,7 +1388,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest() ); @@ -1422,7 +1424,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest() ); @@ -1474,7 +1476,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest() ); @@ -1510,7 +1512,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SearchKnowledgeRequest() ); @@ -1536,7 +1538,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateSuggestionsRequest() ); @@ -1568,7 +1570,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateSuggestionsRequest() ); @@ -1615,7 +1617,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateSuggestionsRequest() ); @@ -1646,7 +1648,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GenerateSuggestionsRequest() ); @@ -1667,7 +1669,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationsRequest() ); @@ -1706,7 +1708,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationsRequest() ); @@ -1763,7 +1765,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationsRequest() ); @@ -1794,7 +1796,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationsRequest() ); @@ -1855,7 +1857,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationsRequest() ); @@ -1905,7 +1907,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationsRequest() ); @@ -1955,7 +1957,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListConversationsRequest() ); @@ -1998,7 +2000,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListMessagesRequest() ); @@ -2037,7 +2039,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListMessagesRequest() ); @@ -2092,7 +2094,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListMessagesRequest() ); @@ -2123,7 +2125,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListMessagesRequest() ); @@ -2183,7 +2185,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListMessagesRequest() ); @@ -2234,7 +2236,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListMessagesRequest() ); @@ -2283,7 +2285,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListMessagesRequest() ); @@ -2324,7 +2326,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2354,7 +2356,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2398,7 +2400,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2433,7 +2435,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2481,7 +2483,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2518,7 +2520,7 @@ describe('v2beta1.ConversationsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2528,7 +2530,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2570,7 +2572,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2581,7 +2583,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2634,7 +2636,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2644,7 +2646,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2683,7 +2685,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2692,7 +2694,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2721,7 +2723,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2730,7 +2732,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2759,7 +2761,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2769,7 +2771,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2822,7 +2824,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2832,7 +2834,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2885,7 +2887,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2899,7 +2901,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3011,7 +3013,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3025,7 +3027,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3137,7 +3139,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3146,7 +3148,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3182,7 +3184,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3192,7 +3194,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3243,7 +3245,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3254,7 +3256,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3322,7 +3324,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3333,7 +3335,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3399,7 +3401,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3409,7 +3411,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3460,7 +3462,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3470,7 +3472,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3522,7 +3524,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3532,7 +3534,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3584,7 +3586,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3595,7 +3597,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3663,7 +3665,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3674,7 +3676,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3744,7 +3746,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3754,7 +3756,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3809,7 +3811,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3819,7 +3821,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3872,7 +3874,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3883,7 +3885,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3951,7 +3953,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3961,7 +3963,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4014,7 +4016,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4025,7 +4027,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4093,7 +4095,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4104,7 +4106,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4172,7 +4174,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4187,7 +4189,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4318,7 +4320,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4333,7 +4335,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4464,7 +4466,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4474,7 +4476,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4525,7 +4527,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4536,7 +4538,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4604,7 +4606,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4616,7 +4618,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4705,7 +4707,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4717,7 +4719,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4811,7 +4813,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4822,7 +4824,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4889,7 +4891,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4900,7 +4902,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4967,7 +4969,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4978,7 +4980,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5045,7 +5047,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5057,7 +5059,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5146,7 +5148,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5158,7 +5160,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5252,7 +5254,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5263,7 +5265,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5335,7 +5337,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5346,7 +5348,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5414,7 +5416,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5426,7 +5428,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -5520,7 +5522,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5531,7 +5533,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5599,7 +5601,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5609,7 +5611,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5661,7 +5663,7 @@ describe('v2beta1.ConversationsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -5672,7 +5674,7 @@ describe('v2beta1.ConversationsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_documents_v2.ts b/packages/google-cloud-dialogflow/test/gapic_documents_v2.ts index 1e29ea721a5..dbf1522b9bb 100644 --- a/packages/google-cloud-dialogflow/test/gapic_documents_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_documents_v2.ts @@ -287,7 +287,9 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetDocumentRequest() ); @@ -377,7 +379,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetDocumentRequest() ); @@ -424,7 +426,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetDocumentRequest() ); @@ -455,7 +457,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetDocumentRequest() ); @@ -476,7 +478,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateDocumentRequest() ); @@ -509,7 +511,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateDocumentRequest() ); @@ -563,7 +565,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateDocumentRequest() ); @@ -594,7 +596,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateDocumentRequest() ); @@ -627,7 +629,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -649,7 +651,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -670,7 +672,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportDocumentsRequest() ); @@ -703,7 +705,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportDocumentsRequest() ); @@ -757,7 +759,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportDocumentsRequest() ); @@ -788,7 +790,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ImportDocumentsRequest() ); @@ -821,7 +823,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -843,7 +845,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -864,7 +866,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteDocumentRequest() ); @@ -897,7 +899,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteDocumentRequest() ); @@ -951,7 +953,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteDocumentRequest() ); @@ -982,7 +984,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteDocumentRequest() ); @@ -1015,7 +1017,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1037,7 +1039,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1058,7 +1060,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateDocumentRequest() ); @@ -1092,7 +1094,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateDocumentRequest() ); @@ -1147,7 +1149,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateDocumentRequest() ); @@ -1179,7 +1181,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateDocumentRequest() ); @@ -1213,7 +1215,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1235,7 +1237,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1256,7 +1258,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ReloadDocumentRequest() ); @@ -1289,7 +1291,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ReloadDocumentRequest() ); @@ -1343,7 +1345,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ReloadDocumentRequest() ); @@ -1374,7 +1376,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ReloadDocumentRequest() ); @@ -1407,7 +1409,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1429,7 +1431,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1450,7 +1452,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportDocumentRequest() ); @@ -1483,7 +1485,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportDocumentRequest() ); @@ -1537,7 +1539,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportDocumentRequest() ); @@ -1568,7 +1570,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ExportDocumentRequest() ); @@ -1601,7 +1603,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1623,7 +1625,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1644,7 +1646,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListDocumentsRequest() ); @@ -1677,7 +1679,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListDocumentsRequest() ); @@ -1726,7 +1728,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListDocumentsRequest() ); @@ -1757,7 +1759,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListDocumentsRequest() ); @@ -1811,7 +1813,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListDocumentsRequest() ); @@ -1860,7 +1862,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListDocumentsRequest() ); @@ -1903,7 +1905,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListDocumentsRequest() ); @@ -1944,7 +1946,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1974,7 +1976,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2018,7 +2020,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2053,7 +2055,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2101,7 +2103,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2142,7 +2144,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2221,7 +2223,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2301,7 +2303,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2397,8 +2399,7 @@ describe('v2.DocumentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2417,7 +2418,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2426,8 +2427,7 @@ describe('v2.DocumentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2443,7 +2443,7 @@ describe('v2.DocumentsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2454,7 +2454,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2521,7 +2521,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2531,7 +2531,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2573,7 +2573,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2584,7 +2584,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2637,7 +2637,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2646,7 +2646,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2675,7 +2675,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2684,7 +2684,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2713,7 +2713,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2723,7 +2723,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2776,7 +2776,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2786,7 +2786,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2839,7 +2839,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2853,7 +2853,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2965,7 +2965,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2979,7 +2979,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3091,7 +3091,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3100,7 +3100,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3136,7 +3136,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3146,7 +3146,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3197,7 +3197,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3208,7 +3208,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3276,7 +3276,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3287,7 +3287,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3353,7 +3353,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3363,7 +3363,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3414,7 +3414,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3424,7 +3424,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3476,7 +3476,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3486,7 +3486,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3538,7 +3538,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3549,7 +3549,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3617,7 +3617,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3627,7 +3627,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3682,7 +3682,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3693,7 +3693,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3765,7 +3765,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3776,7 +3776,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3846,7 +3846,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3856,7 +3856,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3911,7 +3911,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3921,7 +3921,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3974,7 +3974,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3985,7 +3985,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -4053,7 +4053,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -4063,7 +4063,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4116,7 +4116,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4127,7 +4127,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4195,7 +4195,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4206,7 +4206,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4274,7 +4274,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4289,7 +4289,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4420,7 +4420,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4435,7 +4435,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4566,7 +4566,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4576,7 +4576,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4627,7 +4627,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4638,7 +4638,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4706,7 +4706,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4718,7 +4718,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4807,7 +4807,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4819,7 +4819,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4913,7 +4913,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4924,7 +4924,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4991,7 +4991,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -5002,7 +5002,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -5069,7 +5069,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -5080,7 +5080,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5147,7 +5147,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5159,7 +5159,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5248,7 +5248,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -5259,7 +5259,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -5329,7 +5329,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -5342,7 +5342,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5436,7 +5436,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5448,7 +5448,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5542,7 +5542,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5553,7 +5553,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5625,7 +5625,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5636,7 +5636,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5704,7 +5704,7 @@ describe('v2.DocumentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5716,7 +5716,7 @@ describe('v2.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_documents_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_documents_v2beta1.ts index 4de7bfedfbb..df87042ecdf 100644 --- a/packages/google-cloud-dialogflow/test/gapic_documents_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_documents_v2beta1.ts @@ -287,7 +287,9 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetDocumentRequest() ); @@ -377,7 +379,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetDocumentRequest() ); @@ -424,7 +426,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetDocumentRequest() ); @@ -455,7 +457,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetDocumentRequest() ); @@ -476,7 +478,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateDocumentRequest() ); @@ -509,7 +511,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateDocumentRequest() ); @@ -563,7 +565,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateDocumentRequest() ); @@ -594,7 +596,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateDocumentRequest() ); @@ -627,7 +629,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -649,7 +651,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -670,7 +672,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest() ); @@ -703,7 +705,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest() ); @@ -757,7 +759,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest() ); @@ -788,7 +790,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest() ); @@ -821,7 +823,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -843,7 +845,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -864,7 +866,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest() ); @@ -897,7 +899,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest() ); @@ -951,7 +953,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest() ); @@ -982,7 +984,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest() ); @@ -1015,7 +1017,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1037,7 +1039,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1058,7 +1060,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest() ); @@ -1092,7 +1094,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest() ); @@ -1147,7 +1149,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest() ); @@ -1179,7 +1181,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest() ); @@ -1213,7 +1215,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1235,7 +1237,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1256,7 +1258,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest() ); @@ -1289,7 +1291,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest() ); @@ -1343,7 +1345,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest() ); @@ -1374,7 +1376,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest() ); @@ -1407,7 +1409,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1429,7 +1431,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1450,7 +1452,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListDocumentsRequest() ); @@ -1489,7 +1491,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListDocumentsRequest() ); @@ -1544,7 +1546,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListDocumentsRequest() ); @@ -1575,7 +1577,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListDocumentsRequest() ); @@ -1635,7 +1637,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListDocumentsRequest() ); @@ -1684,7 +1686,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListDocumentsRequest() ); @@ -1733,7 +1735,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListDocumentsRequest() ); @@ -1775,7 +1777,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1805,7 +1807,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1849,7 +1851,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1884,7 +1886,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1932,7 +1934,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1973,7 +1975,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2052,7 +2054,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2132,7 +2134,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2228,8 +2230,7 @@ describe('v2beta1.DocumentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2248,7 +2249,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2257,8 +2258,7 @@ describe('v2beta1.DocumentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2274,7 +2274,7 @@ describe('v2beta1.DocumentsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2284,7 +2284,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2326,7 +2326,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2337,7 +2337,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2390,7 +2390,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2399,7 +2399,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2428,7 +2428,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2437,7 +2437,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2466,7 +2466,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2476,7 +2476,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2529,7 +2529,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2539,7 +2539,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2592,7 +2592,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2606,7 +2606,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2718,7 +2718,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2732,7 +2732,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2844,7 +2844,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2853,7 +2853,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2889,7 +2889,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2899,7 +2899,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2950,7 +2950,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2961,7 +2961,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3029,7 +3029,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3040,7 +3040,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3106,7 +3106,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3116,7 +3116,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3167,7 +3167,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3177,7 +3177,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3229,7 +3229,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3239,7 +3239,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3291,7 +3291,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3302,7 +3302,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3370,7 +3370,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3381,7 +3381,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3451,7 +3451,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3461,7 +3461,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3516,7 +3516,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3526,7 +3526,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3579,7 +3579,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3590,7 +3590,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3658,7 +3658,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3668,7 +3668,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3721,7 +3721,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3732,7 +3732,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3800,7 +3800,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3811,7 +3811,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3879,7 +3879,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3894,7 +3894,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4025,7 +4025,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4040,7 +4040,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4171,7 +4171,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4181,7 +4181,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4232,7 +4232,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4243,7 +4243,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4311,7 +4311,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4323,7 +4323,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4412,7 +4412,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4424,7 +4424,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4518,7 +4518,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4529,7 +4529,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4596,7 +4596,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4607,7 +4607,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4674,7 +4674,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4685,7 +4685,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4752,7 +4752,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4764,7 +4764,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4853,7 +4853,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4865,7 +4865,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4959,7 +4959,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4970,7 +4970,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5042,7 +5042,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5053,7 +5053,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5121,7 +5121,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5133,7 +5133,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -5227,7 +5227,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5238,7 +5238,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5306,7 +5306,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5316,7 +5316,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5368,7 +5368,7 @@ describe('v2beta1.DocumentsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -5379,7 +5379,7 @@ describe('v2beta1.DocumentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2.ts b/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2.ts index 3ebce49f4b7..317806b64d5 100644 --- a/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2.ts @@ -262,7 +262,9 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.encryptionSpecServiceStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEncryptionSpecRequest() ); @@ -357,7 +359,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEncryptionSpecRequest() ); @@ -405,7 +407,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEncryptionSpecRequest() ); @@ -437,7 +439,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEncryptionSpecRequest() ); @@ -459,7 +461,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.InitializeEncryptionSpecRequest() ); @@ -494,7 +496,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.InitializeEncryptionSpecRequest() ); @@ -550,7 +552,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.InitializeEncryptionSpecRequest() ); @@ -586,7 +588,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.InitializeEncryptionSpecRequest() ); @@ -621,7 +623,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -645,7 +647,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -666,7 +668,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -697,7 +699,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -742,7 +744,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -778,7 +780,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -827,7 +829,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -869,7 +871,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -951,7 +953,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1034,7 +1036,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1133,8 +1135,7 @@ describe('v2.EncryptionSpecServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1154,7 +1155,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1163,8 +1164,7 @@ describe('v2.EncryptionSpecServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1180,7 +1180,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1192,7 +1192,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1259,7 +1259,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1270,7 +1270,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1312,7 +1312,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1324,7 +1324,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1377,7 +1377,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1387,7 +1387,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1416,7 +1416,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1427,7 +1427,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1480,7 +1480,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1491,7 +1491,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1544,7 +1544,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1559,7 +1559,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1671,7 +1671,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1686,7 +1686,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1798,7 +1798,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1808,7 +1808,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1844,7 +1844,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1855,7 +1855,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1906,7 +1906,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1918,7 +1918,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1986,7 +1986,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1998,7 +1998,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2064,7 +2064,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2075,7 +2075,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2126,7 +2126,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2137,7 +2137,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2189,7 +2189,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2200,7 +2200,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2252,7 +2252,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2264,7 +2264,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2332,7 +2332,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2343,7 +2343,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2398,7 +2398,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2410,7 +2410,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2482,7 +2482,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2494,7 +2494,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2564,7 +2564,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2575,7 +2575,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2630,7 +2630,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2641,7 +2641,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2694,7 +2694,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2706,7 +2706,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2774,7 +2774,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2785,7 +2785,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2838,7 +2838,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2850,7 +2850,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2918,7 +2918,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2930,7 +2930,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2998,7 +2998,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3014,7 +3014,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3145,7 +3145,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3161,7 +3161,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3292,7 +3292,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3303,7 +3303,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3354,7 +3354,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3366,7 +3366,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3434,7 +3434,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3447,7 +3447,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3536,7 +3536,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3549,7 +3549,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3643,7 +3643,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3655,7 +3655,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3722,7 +3722,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3734,7 +3734,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3801,7 +3801,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3813,7 +3813,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3880,7 +3880,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3893,7 +3893,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3982,7 +3982,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3994,7 +3994,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4064,7 +4064,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4078,7 +4078,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4172,7 +4172,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4185,7 +4185,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4279,7 +4279,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4291,7 +4291,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4363,7 +4363,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4375,7 +4375,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4443,7 +4443,7 @@ describe('v2.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4456,7 +4456,7 @@ describe('v2.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2beta1.ts index 0aa386d1e5e..38f8271a20c 100644 --- a/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_encryption_spec_service_v2beta1.ts @@ -262,7 +262,9 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.encryptionSpecServiceStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEncryptionSpecRequest() ); @@ -357,7 +359,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEncryptionSpecRequest() ); @@ -405,7 +407,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEncryptionSpecRequest() ); @@ -437,7 +439,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEncryptionSpecRequest() ); @@ -459,7 +461,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.InitializeEncryptionSpecRequest() ); @@ -494,7 +496,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.InitializeEncryptionSpecRequest() ); @@ -550,7 +552,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.InitializeEncryptionSpecRequest() ); @@ -586,7 +588,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.InitializeEncryptionSpecRequest() ); @@ -621,7 +623,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -645,7 +647,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -666,7 +668,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -697,7 +699,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -742,7 +744,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -778,7 +780,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -827,7 +829,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -869,7 +871,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -951,7 +953,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1034,7 +1036,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1133,8 +1135,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1154,7 +1155,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1163,8 +1164,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1180,7 +1180,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1191,7 +1191,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1233,7 +1233,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1245,7 +1245,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1298,7 +1298,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1308,7 +1308,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1337,7 +1337,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1348,7 +1348,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1401,7 +1401,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1412,7 +1412,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1465,7 +1465,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1480,7 +1480,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1592,7 +1592,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1607,7 +1607,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1719,7 +1719,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1729,7 +1729,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1765,7 +1765,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1776,7 +1776,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1827,7 +1827,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1839,7 +1839,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1907,7 +1907,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1919,7 +1919,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -1985,7 +1985,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -1996,7 +1996,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2047,7 +2047,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2058,7 +2058,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2110,7 +2110,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2121,7 +2121,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2173,7 +2173,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2185,7 +2185,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2253,7 +2253,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2265,7 +2265,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2335,7 +2335,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2346,7 +2346,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2401,7 +2401,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2412,7 +2412,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2465,7 +2465,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2477,7 +2477,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2545,7 +2545,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2556,7 +2556,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2609,7 +2609,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2621,7 +2621,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2689,7 +2689,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2701,7 +2701,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2769,7 +2769,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2785,7 +2785,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2916,7 +2916,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2932,7 +2932,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3063,7 +3063,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3074,7 +3074,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3125,7 +3125,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3137,7 +3137,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3205,7 +3205,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3218,7 +3218,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3307,7 +3307,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3320,7 +3320,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3414,7 +3414,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3426,7 +3426,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3493,7 +3493,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3505,7 +3505,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3572,7 +3572,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3584,7 +3584,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3651,7 +3651,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3664,7 +3664,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3753,7 +3753,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3766,7 +3766,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -3860,7 +3860,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3872,7 +3872,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -3944,7 +3944,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3956,7 +3956,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4024,7 +4024,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4037,7 +4037,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4131,7 +4131,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4143,7 +4143,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4211,7 +4211,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4222,7 +4222,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4274,7 +4274,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4286,7 +4286,7 @@ describe('v2beta1.EncryptionSpecServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_entity_types_v2.ts b/packages/google-cloud-dialogflow/test/gapic_entity_types_v2.ts index b0bc2898edc..978f2af8ffd 100644 --- a/packages/google-cloud-dialogflow/test/gapic_entity_types_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_entity_types_v2.ts @@ -287,7 +287,9 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.entityTypesStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEntityTypeRequest() ); @@ -377,7 +379,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEntityTypeRequest() ); @@ -424,7 +426,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEntityTypeRequest() ); @@ -455,7 +457,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEntityTypeRequest() ); @@ -476,7 +478,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEntityTypeRequest() ); @@ -507,7 +509,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEntityTypeRequest() ); @@ -554,7 +556,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEntityTypeRequest() ); @@ -585,7 +587,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEntityTypeRequest() ); @@ -606,7 +608,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEntityTypeRequest() ); @@ -638,7 +640,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEntityTypeRequest() ); @@ -686,7 +688,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEntityTypeRequest() ); @@ -718,7 +720,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEntityTypeRequest() ); @@ -740,7 +742,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEntityTypeRequest() ); @@ -771,7 +773,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEntityTypeRequest() ); @@ -818,7 +820,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEntityTypeRequest() ); @@ -849,7 +851,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEntityTypeRequest() ); @@ -870,7 +872,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest() ); @@ -903,7 +905,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest() ); @@ -957,7 +959,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest() ); @@ -991,7 +993,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest() ); @@ -1024,7 +1026,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1046,7 +1048,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1067,7 +1069,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest() ); @@ -1100,7 +1102,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest() ); @@ -1154,7 +1156,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest() ); @@ -1188,7 +1190,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest() ); @@ -1221,7 +1223,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1243,7 +1245,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1264,7 +1266,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest() ); @@ -1297,7 +1299,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest() ); @@ -1351,7 +1353,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest() ); @@ -1382,7 +1384,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest() ); @@ -1415,7 +1417,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1437,7 +1439,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1458,7 +1460,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest() ); @@ -1491,7 +1493,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest() ); @@ -1545,7 +1547,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest() ); @@ -1576,7 +1578,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest() ); @@ -1609,7 +1611,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1631,7 +1633,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1652,7 +1654,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest() ); @@ -1685,7 +1687,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest() ); @@ -1739,7 +1741,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest() ); @@ -1770,7 +1772,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest() ); @@ -1803,7 +1805,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1825,7 +1827,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1846,7 +1848,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEntityTypesRequest() ); @@ -1885,7 +1887,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEntityTypesRequest() ); @@ -1940,7 +1942,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEntityTypesRequest() ); @@ -1971,7 +1973,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEntityTypesRequest() ); @@ -2031,7 +2033,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEntityTypesRequest() ); @@ -2080,7 +2082,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEntityTypesRequest() ); @@ -2129,7 +2131,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEntityTypesRequest() ); @@ -2170,7 +2172,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2200,7 +2202,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2244,7 +2246,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2279,7 +2281,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2327,7 +2329,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2368,7 +2370,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2447,7 +2449,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2527,7 +2529,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2623,8 +2625,7 @@ describe('v2.EntityTypesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2643,7 +2644,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2652,8 +2653,7 @@ describe('v2.EntityTypesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2669,7 +2669,7 @@ describe('v2.EntityTypesClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2680,7 +2680,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2747,7 +2747,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2757,7 +2757,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2799,7 +2799,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2810,7 +2810,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2863,7 +2863,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2872,7 +2872,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2901,7 +2901,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2910,7 +2910,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2939,7 +2939,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2949,7 +2949,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3002,7 +3002,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3012,7 +3012,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3065,7 +3065,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3079,7 +3079,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3191,7 +3191,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3205,7 +3205,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3317,7 +3317,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3326,7 +3326,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3362,7 +3362,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3372,7 +3372,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3423,7 +3423,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3434,7 +3434,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3502,7 +3502,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3513,7 +3513,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3579,7 +3579,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3589,7 +3589,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3640,7 +3640,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3650,7 +3650,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3702,7 +3702,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3712,7 +3712,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3764,7 +3764,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3775,7 +3775,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3843,7 +3843,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3853,7 +3853,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3908,7 +3908,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3919,7 +3919,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3991,7 +3991,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4002,7 +4002,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -4072,7 +4072,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4082,7 +4082,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4137,7 +4137,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4147,7 +4147,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4200,7 +4200,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4211,7 +4211,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -4279,7 +4279,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -4289,7 +4289,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4342,7 +4342,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4353,7 +4353,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4421,7 +4421,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4432,7 +4432,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4500,7 +4500,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4515,7 +4515,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4646,7 +4646,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4661,7 +4661,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4792,7 +4792,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4802,7 +4802,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4853,7 +4853,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4864,7 +4864,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4932,7 +4932,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4944,7 +4944,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -5033,7 +5033,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -5045,7 +5045,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -5139,7 +5139,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -5150,7 +5150,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -5217,7 +5217,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -5228,7 +5228,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -5295,7 +5295,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -5306,7 +5306,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5373,7 +5373,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5385,7 +5385,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5474,7 +5474,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -5485,7 +5485,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -5555,7 +5555,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -5568,7 +5568,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5662,7 +5662,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5674,7 +5674,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5768,7 +5768,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5779,7 +5779,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5851,7 +5851,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5862,7 +5862,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5930,7 +5930,7 @@ describe('v2.EntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5942,7 +5942,7 @@ describe('v2.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_entity_types_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_entity_types_v2beta1.ts index b13ecbf21e9..a1801e412e6 100644 --- a/packages/google-cloud-dialogflow/test/gapic_entity_types_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_entity_types_v2beta1.ts @@ -289,7 +289,9 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.entityTypesStub); client.close().then(() => { done(); @@ -348,7 +350,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest() ); @@ -379,7 +381,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest() ); @@ -426,7 +428,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest() ); @@ -457,7 +459,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest() ); @@ -478,7 +480,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest() ); @@ -509,7 +511,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest() ); @@ -556,7 +558,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest() ); @@ -587,7 +589,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest() ); @@ -608,7 +610,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest() ); @@ -640,7 +642,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest() ); @@ -688,7 +690,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest() ); @@ -720,7 +722,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest() ); @@ -742,7 +744,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest() ); @@ -773,7 +775,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest() ); @@ -820,7 +822,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest() ); @@ -851,7 +853,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest() ); @@ -872,7 +874,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest() ); @@ -905,7 +907,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest() ); @@ -959,7 +961,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest() ); @@ -993,7 +995,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest() ); @@ -1026,7 +1028,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1048,7 +1050,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1069,7 +1071,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest() ); @@ -1102,7 +1104,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest() ); @@ -1156,7 +1158,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest() ); @@ -1190,7 +1192,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest() ); @@ -1223,7 +1225,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1245,7 +1247,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1266,7 +1268,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest() ); @@ -1299,7 +1301,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest() ); @@ -1353,7 +1355,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest() ); @@ -1384,7 +1386,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest() ); @@ -1417,7 +1419,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1439,7 +1441,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1460,7 +1462,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest() ); @@ -1493,7 +1495,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest() ); @@ -1547,7 +1549,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest() ); @@ -1578,7 +1580,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest() ); @@ -1611,7 +1613,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1633,7 +1635,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1654,7 +1656,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest() ); @@ -1687,7 +1689,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest() ); @@ -1741,7 +1743,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest() ); @@ -1772,7 +1774,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest() ); @@ -1805,7 +1807,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1827,7 +1829,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1848,7 +1850,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest() ); @@ -1887,7 +1889,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest() ); @@ -1942,7 +1944,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest() ); @@ -1973,7 +1975,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest() ); @@ -2034,7 +2036,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest() ); @@ -2084,7 +2086,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest() ); @@ -2134,7 +2136,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest() ); @@ -2176,7 +2178,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2206,7 +2208,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2250,7 +2252,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2285,7 +2287,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2333,7 +2335,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2374,7 +2376,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2453,7 +2455,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2533,7 +2535,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2629,8 +2631,7 @@ describe('v2beta1.EntityTypesClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2649,7 +2650,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2658,8 +2659,7 @@ describe('v2beta1.EntityTypesClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2675,7 +2675,7 @@ describe('v2beta1.EntityTypesClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2685,7 +2685,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2727,7 +2727,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2738,7 +2738,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2791,7 +2791,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2800,7 +2800,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2829,7 +2829,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2838,7 +2838,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2867,7 +2867,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2877,7 +2877,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2930,7 +2930,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2940,7 +2940,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2993,7 +2993,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3007,7 +3007,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3119,7 +3119,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3133,7 +3133,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3245,7 +3245,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3254,7 +3254,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3290,7 +3290,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3300,7 +3300,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3351,7 +3351,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3362,7 +3362,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3430,7 +3430,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3441,7 +3441,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3507,7 +3507,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3517,7 +3517,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3568,7 +3568,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3578,7 +3578,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3630,7 +3630,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3640,7 +3640,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3692,7 +3692,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3703,7 +3703,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3771,7 +3771,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3782,7 +3782,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3852,7 +3852,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3862,7 +3862,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3917,7 +3917,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3927,7 +3927,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3980,7 +3980,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3991,7 +3991,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -4059,7 +4059,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -4069,7 +4069,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4122,7 +4122,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -4133,7 +4133,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -4201,7 +4201,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4212,7 +4212,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4280,7 +4280,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4295,7 +4295,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4426,7 +4426,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4441,7 +4441,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4572,7 +4572,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4582,7 +4582,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4633,7 +4633,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4644,7 +4644,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4712,7 +4712,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4724,7 +4724,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4813,7 +4813,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4825,7 +4825,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4919,7 +4919,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4930,7 +4930,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4997,7 +4997,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -5008,7 +5008,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -5075,7 +5075,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -5086,7 +5086,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -5153,7 +5153,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -5165,7 +5165,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5254,7 +5254,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5266,7 +5266,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5360,7 +5360,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5371,7 +5371,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5443,7 +5443,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5454,7 +5454,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5522,7 +5522,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5534,7 +5534,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -5628,7 +5628,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5639,7 +5639,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5707,7 +5707,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5717,7 +5717,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5769,7 +5769,7 @@ describe('v2beta1.EntityTypesClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -5780,7 +5780,7 @@ describe('v2beta1.EntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_environments_v2.ts b/packages/google-cloud-dialogflow/test/gapic_environments_v2.ts index a33e1bf5303..c65f1ba155e 100644 --- a/packages/google-cloud-dialogflow/test/gapic_environments_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_environments_v2.ts @@ -252,7 +252,9 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.environmentsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentRequest() ); @@ -342,7 +344,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentRequest() ); @@ -389,7 +391,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentRequest() ); @@ -420,7 +422,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentRequest() ); @@ -441,7 +443,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEnvironmentRequest() ); @@ -472,7 +474,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEnvironmentRequest() ); @@ -519,7 +521,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEnvironmentRequest() ); @@ -550,7 +552,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateEnvironmentRequest() ); @@ -571,7 +573,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEnvironmentRequest() ); @@ -603,7 +605,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEnvironmentRequest() ); @@ -651,7 +653,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEnvironmentRequest() ); @@ -683,7 +685,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateEnvironmentRequest() ); @@ -705,7 +707,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEnvironmentRequest() ); @@ -736,7 +738,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEnvironmentRequest() ); @@ -783,7 +785,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEnvironmentRequest() ); @@ -814,7 +816,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteEnvironmentRequest() ); @@ -835,7 +837,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEnvironmentsRequest() ); @@ -874,7 +876,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEnvironmentsRequest() ); @@ -929,7 +931,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEnvironmentsRequest() ); @@ -960,7 +962,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEnvironmentsRequest() ); @@ -1020,7 +1022,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEnvironmentsRequest() ); @@ -1069,7 +1071,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEnvironmentsRequest() ); @@ -1118,7 +1120,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListEnvironmentsRequest() ); @@ -1160,7 +1162,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest() ); @@ -1200,7 +1202,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest() ); @@ -1257,7 +1259,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest() ); @@ -1291,7 +1293,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest() ); @@ -1360,7 +1362,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest() ); @@ -1418,7 +1420,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest() ); @@ -1472,7 +1474,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest() ); @@ -1518,7 +1520,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1548,7 +1550,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1592,7 +1594,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1627,7 +1629,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1675,7 +1677,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1712,7 +1714,7 @@ describe('v2.EnvironmentsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1723,7 +1725,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1790,7 +1792,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1800,7 +1802,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1842,7 +1844,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1853,7 +1855,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1906,7 +1908,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1915,7 +1917,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1944,7 +1946,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1953,7 +1955,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1982,7 +1984,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1992,7 +1994,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2045,7 +2047,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2055,7 +2057,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2108,7 +2110,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2122,7 +2124,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2234,7 +2236,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2248,7 +2250,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2360,7 +2362,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2369,7 +2371,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2405,7 +2407,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2415,7 +2417,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2466,7 +2468,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2477,7 +2479,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2545,7 +2547,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2556,7 +2558,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2622,7 +2624,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2632,7 +2634,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2683,7 +2685,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2693,7 +2695,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2745,7 +2747,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2755,7 +2757,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2807,7 +2809,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2818,7 +2820,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2886,7 +2888,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2896,7 +2898,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2951,7 +2953,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2962,7 +2964,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3034,7 +3036,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3045,7 +3047,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3115,7 +3117,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3125,7 +3127,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3180,7 +3182,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3190,7 +3192,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3243,7 +3245,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3254,7 +3256,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3322,7 +3324,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3332,7 +3334,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3385,7 +3387,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3396,7 +3398,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3464,7 +3466,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3475,7 +3477,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3543,7 +3545,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3558,7 +3560,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3689,7 +3691,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3704,7 +3706,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3835,7 +3837,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3845,7 +3847,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3896,7 +3898,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3907,7 +3909,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3975,7 +3977,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3987,7 +3989,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4076,7 +4078,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4088,7 +4090,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4182,7 +4184,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4193,7 +4195,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4260,7 +4262,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4271,7 +4273,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4338,7 +4340,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4349,7 +4351,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4416,7 +4418,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4428,7 +4430,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4517,7 +4519,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4528,7 +4530,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4598,7 +4600,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4611,7 +4613,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4705,7 +4707,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4717,7 +4719,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4811,7 +4813,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4822,7 +4824,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4894,7 +4896,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4905,7 +4907,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4973,7 +4975,7 @@ describe('v2.EnvironmentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4985,7 +4987,7 @@ describe('v2.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_environments_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_environments_v2beta1.ts index 0f6d6d3b766..3820853bd53 100644 --- a/packages/google-cloud-dialogflow/test/gapic_environments_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_environments_v2beta1.ts @@ -252,7 +252,9 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.environmentsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest() ); @@ -342,7 +344,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest() ); @@ -389,7 +391,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest() ); @@ -420,7 +422,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest() ); @@ -441,7 +443,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest() ); @@ -472,7 +474,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest() ); @@ -519,7 +521,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest() ); @@ -550,7 +552,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest() ); @@ -571,7 +573,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest() ); @@ -603,7 +605,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest() ); @@ -651,7 +653,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest() ); @@ -683,7 +685,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest() ); @@ -705,7 +707,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest() ); @@ -736,7 +738,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest() ); @@ -783,7 +785,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest() ); @@ -814,7 +816,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest() ); @@ -835,7 +837,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest() ); @@ -874,7 +876,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest() ); @@ -931,7 +933,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest() ); @@ -962,7 +964,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest() ); @@ -1023,7 +1025,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest() ); @@ -1073,7 +1075,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest() ); @@ -1123,7 +1125,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest() ); @@ -1166,7 +1168,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest() ); @@ -1206,7 +1208,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest() ); @@ -1263,7 +1265,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest() ); @@ -1297,7 +1299,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest() ); @@ -1366,7 +1368,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest() ); @@ -1424,7 +1426,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest() ); @@ -1478,7 +1480,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest() ); @@ -1524,7 +1526,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1554,7 +1556,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1598,7 +1600,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1633,7 +1635,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1681,7 +1683,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1718,7 +1720,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1728,7 +1730,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1770,7 +1772,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1781,7 +1783,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1834,7 +1836,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1843,7 +1845,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1872,7 +1874,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1881,7 +1883,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1910,7 +1912,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1920,7 +1922,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1973,7 +1975,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1983,7 +1985,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2036,7 +2038,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2050,7 +2052,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2162,7 +2164,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2176,7 +2178,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2288,7 +2290,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2297,7 +2299,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2333,7 +2335,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2343,7 +2345,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2394,7 +2396,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2405,7 +2407,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2473,7 +2475,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2484,7 +2486,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2550,7 +2552,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2560,7 +2562,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2611,7 +2613,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2621,7 +2623,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2673,7 +2675,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2683,7 +2685,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2735,7 +2737,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2746,7 +2748,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2814,7 +2816,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2825,7 +2827,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2895,7 +2897,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2905,7 +2907,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2960,7 +2962,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2970,7 +2972,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3023,7 +3025,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3034,7 +3036,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3102,7 +3104,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3112,7 +3114,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3165,7 +3167,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3176,7 +3178,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3244,7 +3246,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3255,7 +3257,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3323,7 +3325,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3338,7 +3340,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3469,7 +3471,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3484,7 +3486,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3615,7 +3617,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3625,7 +3627,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3676,7 +3678,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3687,7 +3689,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3755,7 +3757,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3767,7 +3769,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3856,7 +3858,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3868,7 +3870,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3962,7 +3964,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3973,7 +3975,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4040,7 +4042,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4051,7 +4053,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4118,7 +4120,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4129,7 +4131,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4196,7 +4198,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4208,7 +4210,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4297,7 +4299,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4309,7 +4311,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4403,7 +4405,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4414,7 +4416,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4486,7 +4488,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4497,7 +4499,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4565,7 +4567,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4577,7 +4579,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4671,7 +4673,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4682,7 +4684,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4750,7 +4752,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4760,7 +4762,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4812,7 +4814,7 @@ describe('v2beta1.EnvironmentsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4823,7 +4825,7 @@ describe('v2beta1.EnvironmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2.ts b/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2.ts index 7f1d65b36a0..86404eeac88 100644 --- a/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2.ts @@ -212,7 +212,9 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.fulfillmentsStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetFulfillmentRequest() ); @@ -302,7 +304,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetFulfillmentRequest() ); @@ -349,7 +351,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetFulfillmentRequest() ); @@ -380,7 +382,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetFulfillmentRequest() ); @@ -401,7 +403,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateFulfillmentRequest() ); @@ -433,7 +435,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateFulfillmentRequest() ); @@ -481,7 +483,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateFulfillmentRequest() ); @@ -513,7 +515,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateFulfillmentRequest() ); @@ -534,7 +536,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -564,7 +566,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -608,7 +610,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -643,7 +645,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -691,7 +693,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -728,7 +730,7 @@ describe('v2.FulfillmentsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -739,7 +741,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -806,7 +808,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -816,7 +818,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -858,7 +860,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -869,7 +871,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -922,7 +924,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -931,7 +933,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -960,7 +962,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -970,7 +972,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1023,7 +1025,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1033,7 +1035,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1086,7 +1088,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1100,7 +1102,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1212,7 +1214,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1226,7 +1228,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1338,7 +1340,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1347,7 +1349,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1383,7 +1385,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1393,7 +1395,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1444,7 +1446,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1455,7 +1457,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1523,7 +1525,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1534,7 +1536,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -1600,7 +1602,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -1610,7 +1612,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1661,7 +1663,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -1671,7 +1673,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1723,7 +1725,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -1733,7 +1735,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1785,7 +1787,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -1796,7 +1798,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1864,7 +1866,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -1874,7 +1876,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1929,7 +1931,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -1940,7 +1942,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2012,7 +2014,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2023,7 +2025,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2093,7 +2095,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2103,7 +2105,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2158,7 +2160,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2168,7 +2170,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2221,7 +2223,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2232,7 +2234,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2300,7 +2302,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2310,7 +2312,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2363,7 +2365,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2374,7 +2376,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2442,7 +2444,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2453,7 +2455,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2521,7 +2523,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2536,7 +2538,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2667,7 +2669,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2682,7 +2684,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2813,7 +2815,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2823,7 +2825,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -2874,7 +2876,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2885,7 +2887,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2953,7 +2955,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2965,7 +2967,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3054,7 +3056,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3066,7 +3068,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3160,7 +3162,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3171,7 +3173,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3238,7 +3240,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3249,7 +3251,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3316,7 +3318,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3327,7 +3329,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3394,7 +3396,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3406,7 +3408,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3495,7 +3497,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3506,7 +3508,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -3576,7 +3578,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -3589,7 +3591,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -3683,7 +3685,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3695,7 +3697,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -3789,7 +3791,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3800,7 +3802,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -3872,7 +3874,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3883,7 +3885,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -3951,7 +3953,7 @@ describe('v2.FulfillmentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3963,7 +3965,7 @@ describe('v2.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2beta1.ts index e4a0690c340..4647e77ad66 100644 --- a/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_fulfillments_v2beta1.ts @@ -212,7 +212,9 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.fulfillmentsStub); client.close().then(() => { done(); @@ -271,7 +273,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest() ); @@ -302,7 +304,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest() ); @@ -349,7 +351,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest() ); @@ -380,7 +382,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest() ); @@ -401,7 +403,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest() ); @@ -433,7 +435,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest() ); @@ -481,7 +483,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest() ); @@ -513,7 +515,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest() ); @@ -534,7 +536,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -564,7 +566,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -608,7 +610,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -643,7 +645,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -691,7 +693,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -728,7 +730,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -738,7 +740,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -780,7 +782,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -791,7 +793,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -844,7 +846,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -853,7 +855,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -882,7 +884,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -892,7 +894,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -945,7 +947,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -955,7 +957,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1008,7 +1010,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1022,7 +1024,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1134,7 +1136,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1148,7 +1150,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1260,7 +1262,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1269,7 +1271,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1305,7 +1307,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1315,7 +1317,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1366,7 +1368,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1377,7 +1379,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1445,7 +1447,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1456,7 +1458,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -1522,7 +1524,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -1532,7 +1534,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1583,7 +1585,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -1593,7 +1595,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1645,7 +1647,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -1655,7 +1657,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1707,7 +1709,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -1718,7 +1720,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1786,7 +1788,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -1797,7 +1799,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -1867,7 +1869,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -1877,7 +1879,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1932,7 +1934,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -1942,7 +1944,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1995,7 +1997,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2006,7 +2008,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2074,7 +2076,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2084,7 +2086,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2137,7 +2139,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2148,7 +2150,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2216,7 +2218,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2227,7 +2229,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2295,7 +2297,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2310,7 +2312,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2441,7 +2443,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2456,7 +2458,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2587,7 +2589,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2597,7 +2599,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -2648,7 +2650,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2659,7 +2661,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2727,7 +2729,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2739,7 +2741,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -2828,7 +2830,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2840,7 +2842,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -2934,7 +2936,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2945,7 +2947,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3012,7 +3014,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3023,7 +3025,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3090,7 +3092,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3101,7 +3103,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3168,7 +3170,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3180,7 +3182,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3269,7 +3271,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3281,7 +3283,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -3375,7 +3377,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3386,7 +3388,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -3458,7 +3460,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3469,7 +3471,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -3537,7 +3539,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3549,7 +3551,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -3643,7 +3645,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -3654,7 +3656,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3722,7 +3724,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -3732,7 +3734,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3784,7 +3786,7 @@ describe('v2beta1.FulfillmentsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -3795,7 +3797,7 @@ describe('v2beta1.FulfillmentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_generators_v2.ts b/packages/google-cloud-dialogflow/test/gapic_generators_v2.ts index fae18225e53..3cfb6c3004e 100644 --- a/packages/google-cloud-dialogflow/test/gapic_generators_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_generators_v2.ts @@ -250,7 +250,9 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generatorsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateGeneratorRequest() ); @@ -340,7 +342,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateGeneratorRequest() ); @@ -387,7 +389,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateGeneratorRequest() ); @@ -418,7 +420,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateGeneratorRequest() ); @@ -439,7 +441,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetGeneratorRequest() ); @@ -470,7 +472,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetGeneratorRequest() ); @@ -517,7 +519,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetGeneratorRequest() ); @@ -548,7 +550,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetGeneratorRequest() ); @@ -569,7 +571,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteGeneratorRequest() ); @@ -600,7 +602,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteGeneratorRequest() ); @@ -647,7 +649,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteGeneratorRequest() ); @@ -678,7 +680,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteGeneratorRequest() ); @@ -699,7 +701,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateGeneratorRequest() ); @@ -731,7 +733,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateGeneratorRequest() ); @@ -779,7 +781,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateGeneratorRequest() ); @@ -811,7 +813,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateGeneratorRequest() ); @@ -833,7 +835,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListGeneratorsRequest() ); @@ -872,7 +874,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListGeneratorsRequest() ); @@ -927,7 +929,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListGeneratorsRequest() ); @@ -958,7 +960,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListGeneratorsRequest() ); @@ -1018,7 +1020,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListGeneratorsRequest() ); @@ -1067,7 +1069,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListGeneratorsRequest() ); @@ -1116,7 +1118,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListGeneratorsRequest() ); @@ -1157,7 +1159,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1187,7 +1189,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1231,7 +1233,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1266,7 +1268,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1314,7 +1316,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1351,7 +1353,7 @@ describe('v2.GeneratorsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1362,7 +1364,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1429,7 +1431,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1439,7 +1441,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1481,7 +1483,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1492,7 +1494,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1545,7 +1547,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1554,7 +1556,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1583,7 +1585,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1592,7 +1594,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1621,7 +1623,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1631,7 +1633,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1684,7 +1686,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1694,7 +1696,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1747,7 +1749,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1761,7 +1763,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1873,7 +1875,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1887,7 +1889,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1999,7 +2001,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2008,7 +2010,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2044,7 +2046,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2054,7 +2056,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2105,7 +2107,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2116,7 +2118,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2184,7 +2186,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2195,7 +2197,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2261,7 +2263,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2271,7 +2273,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2322,7 +2324,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2332,7 +2334,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2384,7 +2386,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2394,7 +2396,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2446,7 +2448,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2457,7 +2459,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2525,7 +2527,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2535,7 +2537,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2590,7 +2592,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2601,7 +2603,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2673,7 +2675,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2684,7 +2686,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2754,7 +2756,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2764,7 +2766,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2819,7 +2821,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2829,7 +2831,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2882,7 +2884,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2893,7 +2895,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2961,7 +2963,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2971,7 +2973,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3024,7 +3026,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3035,7 +3037,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3103,7 +3105,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3114,7 +3116,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3182,7 +3184,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3197,7 +3199,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3328,7 +3330,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3343,7 +3345,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3474,7 +3476,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3484,7 +3486,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3535,7 +3537,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3546,7 +3548,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3614,7 +3616,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3626,7 +3628,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3715,7 +3717,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3727,7 +3729,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3821,7 +3823,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3832,7 +3834,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3899,7 +3901,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3910,7 +3912,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3977,7 +3979,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3988,7 +3990,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4055,7 +4057,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4067,7 +4069,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4156,7 +4158,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4167,7 +4169,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4237,7 +4239,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4250,7 +4252,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4344,7 +4346,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4356,7 +4358,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4450,7 +4452,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4461,7 +4463,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4533,7 +4535,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4544,7 +4546,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4612,7 +4614,7 @@ describe('v2.GeneratorsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4624,7 +4626,7 @@ describe('v2.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_generators_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_generators_v2beta1.ts index 04391401b92..71c92f3c2b0 100644 --- a/packages/google-cloud-dialogflow/test/gapic_generators_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_generators_v2beta1.ts @@ -252,7 +252,9 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.generatorsStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateGeneratorRequest() ); @@ -342,7 +344,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateGeneratorRequest() ); @@ -389,7 +391,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateGeneratorRequest() ); @@ -420,7 +422,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateGeneratorRequest() ); @@ -441,7 +443,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetGeneratorRequest() ); @@ -472,7 +474,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetGeneratorRequest() ); @@ -519,7 +521,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetGeneratorRequest() ); @@ -550,7 +552,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetGeneratorRequest() ); @@ -571,7 +573,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteGeneratorRequest() ); @@ -602,7 +604,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteGeneratorRequest() ); @@ -649,7 +651,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteGeneratorRequest() ); @@ -680,7 +682,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteGeneratorRequest() ); @@ -701,7 +703,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateGeneratorRequest() ); @@ -733,7 +735,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateGeneratorRequest() ); @@ -781,7 +783,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateGeneratorRequest() ); @@ -813,7 +815,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateGeneratorRequest() ); @@ -835,7 +837,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListGeneratorsRequest() ); @@ -874,7 +876,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListGeneratorsRequest() ); @@ -929,7 +931,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListGeneratorsRequest() ); @@ -960,7 +962,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListGeneratorsRequest() ); @@ -1021,7 +1023,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListGeneratorsRequest() ); @@ -1071,7 +1073,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListGeneratorsRequest() ); @@ -1120,7 +1122,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListGeneratorsRequest() ); @@ -1162,7 +1164,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1192,7 +1194,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1236,7 +1238,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1271,7 +1273,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1319,7 +1321,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1356,7 +1358,7 @@ describe('v2beta1.GeneratorsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1366,7 +1368,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1408,7 +1410,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1419,7 +1421,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1472,7 +1474,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1481,7 +1483,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1510,7 +1512,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1519,7 +1521,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1548,7 +1550,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1558,7 +1560,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1611,7 +1613,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1621,7 +1623,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1674,7 +1676,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1688,7 +1690,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1800,7 +1802,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1814,7 +1816,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1926,7 +1928,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1935,7 +1937,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1971,7 +1973,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1981,7 +1983,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2032,7 +2034,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2043,7 +2045,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2111,7 +2113,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2122,7 +2124,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2188,7 +2190,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2198,7 +2200,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2249,7 +2251,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2259,7 +2261,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2311,7 +2313,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2321,7 +2323,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2373,7 +2375,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2384,7 +2386,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2452,7 +2454,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2463,7 +2465,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2533,7 +2535,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2543,7 +2545,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2598,7 +2600,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2608,7 +2610,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2661,7 +2663,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2672,7 +2674,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2740,7 +2742,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2750,7 +2752,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2803,7 +2805,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2814,7 +2816,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2882,7 +2884,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2893,7 +2895,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2961,7 +2963,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2976,7 +2978,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3107,7 +3109,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3122,7 +3124,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3253,7 +3255,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3263,7 +3265,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3314,7 +3316,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3325,7 +3327,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3393,7 +3395,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3405,7 +3407,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3494,7 +3496,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3506,7 +3508,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3600,7 +3602,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3611,7 +3613,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3678,7 +3680,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3689,7 +3691,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3756,7 +3758,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3767,7 +3769,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3834,7 +3836,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3846,7 +3848,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3935,7 +3937,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3947,7 +3949,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4041,7 +4043,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4052,7 +4054,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4124,7 +4126,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4135,7 +4137,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4203,7 +4205,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4215,7 +4217,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4309,7 +4311,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4320,7 +4322,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4388,7 +4390,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4398,7 +4400,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4450,7 +4452,7 @@ describe('v2beta1.GeneratorsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4461,7 +4463,7 @@ describe('v2beta1.GeneratorsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_intents_v2.ts b/packages/google-cloud-dialogflow/test/gapic_intents_v2.ts index 2db1d459059..7ed20748b36 100644 --- a/packages/google-cloud-dialogflow/test/gapic_intents_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_intents_v2.ts @@ -287,7 +287,9 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.intentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetIntentRequest() ); @@ -377,7 +379,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetIntentRequest() ); @@ -424,7 +426,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetIntentRequest() ); @@ -452,7 +454,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetIntentRequest() ); @@ -473,7 +475,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateIntentRequest() ); @@ -504,7 +506,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateIntentRequest() ); @@ -551,7 +553,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateIntentRequest() ); @@ -582,7 +584,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateIntentRequest() ); @@ -603,7 +605,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateIntentRequest() ); @@ -635,7 +637,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateIntentRequest() ); @@ -683,7 +685,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateIntentRequest() ); @@ -715,7 +717,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateIntentRequest() ); @@ -737,7 +739,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteIntentRequest() ); @@ -768,7 +770,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteIntentRequest() ); @@ -815,7 +817,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteIntentRequest() ); @@ -846,7 +848,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteIntentRequest() ); @@ -867,7 +869,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest() ); @@ -900,7 +902,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest() ); @@ -954,7 +956,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest() ); @@ -985,7 +987,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest() ); @@ -1018,7 +1020,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1040,7 +1042,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1061,7 +1063,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest() ); @@ -1094,7 +1096,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest() ); @@ -1148,7 +1150,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest() ); @@ -1179,7 +1181,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest() ); @@ -1212,7 +1214,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1234,7 +1236,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1255,7 +1257,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListIntentsRequest() ); @@ -1288,7 +1290,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListIntentsRequest() ); @@ -1337,7 +1339,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListIntentsRequest() ); @@ -1368,7 +1370,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListIntentsRequest() ); @@ -1422,7 +1424,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListIntentsRequest() ); @@ -1473,7 +1475,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListIntentsRequest() ); @@ -1516,7 +1518,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListIntentsRequest() ); @@ -1559,7 +1561,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1589,7 +1591,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1633,7 +1635,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1668,7 +1670,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1716,7 +1718,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1757,7 +1759,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1836,7 +1838,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1916,7 +1918,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2012,8 +2014,7 @@ describe('v2.IntentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2032,7 +2033,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2041,8 +2042,7 @@ describe('v2.IntentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2058,7 +2058,7 @@ describe('v2.IntentsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -2069,7 +2069,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2136,7 +2136,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2146,7 +2146,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2188,7 +2188,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2199,7 +2199,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2252,7 +2252,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2261,7 +2261,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2290,7 +2290,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2299,7 +2299,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2328,7 +2328,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2338,7 +2338,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2391,7 +2391,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2401,7 +2401,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2454,7 +2454,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2468,7 +2468,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2580,7 +2580,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2594,7 +2594,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2706,7 +2706,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2715,7 +2715,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2751,7 +2751,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2761,7 +2761,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2812,7 +2812,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2823,7 +2823,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2891,7 +2891,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2902,7 +2902,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2968,7 +2968,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2978,7 +2978,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3029,7 +3029,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3039,7 +3039,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3091,7 +3091,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3101,7 +3101,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3153,7 +3153,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3164,7 +3164,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3232,7 +3232,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3242,7 +3242,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3297,7 +3297,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3308,7 +3308,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3380,7 +3380,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3391,7 +3391,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3461,7 +3461,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3471,7 +3471,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3526,7 +3526,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3536,7 +3536,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3589,7 +3589,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3600,7 +3600,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3668,7 +3668,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3678,7 +3678,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3731,7 +3731,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3742,7 +3742,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3810,7 +3810,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3821,7 +3821,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3889,7 +3889,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3904,7 +3904,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4035,7 +4035,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4050,7 +4050,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4181,7 +4181,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4191,7 +4191,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4242,7 +4242,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4253,7 +4253,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4321,7 +4321,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4333,7 +4333,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4422,7 +4422,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4434,7 +4434,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4528,7 +4528,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4539,7 +4539,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4606,7 +4606,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4617,7 +4617,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4684,7 +4684,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4695,7 +4695,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4762,7 +4762,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4774,7 +4774,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4863,7 +4863,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4874,7 +4874,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4944,7 +4944,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4957,7 +4957,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -5051,7 +5051,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5063,7 +5063,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5157,7 +5157,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5168,7 +5168,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5240,7 +5240,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5251,7 +5251,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5319,7 +5319,7 @@ describe('v2.IntentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5331,7 +5331,7 @@ describe('v2.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_intents_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_intents_v2beta1.ts index 55d0e9b1582..929afa61697 100644 --- a/packages/google-cloud-dialogflow/test/gapic_intents_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_intents_v2beta1.ts @@ -287,7 +287,9 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.intentsStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetIntentRequest() ); @@ -377,7 +379,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetIntentRequest() ); @@ -424,7 +426,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetIntentRequest() ); @@ -452,7 +454,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetIntentRequest() ); @@ -473,7 +475,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateIntentRequest() ); @@ -504,7 +506,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateIntentRequest() ); @@ -551,7 +553,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateIntentRequest() ); @@ -582,7 +584,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateIntentRequest() ); @@ -603,7 +605,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateIntentRequest() ); @@ -635,7 +637,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateIntentRequest() ); @@ -683,7 +685,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateIntentRequest() ); @@ -715,7 +717,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateIntentRequest() ); @@ -737,7 +739,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteIntentRequest() ); @@ -768,7 +770,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteIntentRequest() ); @@ -815,7 +817,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteIntentRequest() ); @@ -846,7 +848,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteIntentRequest() ); @@ -867,7 +869,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest() ); @@ -900,7 +902,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest() ); @@ -954,7 +956,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest() ); @@ -985,7 +987,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest() ); @@ -1018,7 +1020,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1040,7 +1042,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1061,7 +1063,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest() ); @@ -1094,7 +1096,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest() ); @@ -1148,7 +1150,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest() ); @@ -1179,7 +1181,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest() ); @@ -1212,7 +1214,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1234,7 +1236,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1255,7 +1257,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListIntentsRequest() ); @@ -1294,7 +1296,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListIntentsRequest() ); @@ -1349,7 +1351,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListIntentsRequest() ); @@ -1380,7 +1382,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListIntentsRequest() ); @@ -1440,7 +1442,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListIntentsRequest() ); @@ -1491,7 +1493,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListIntentsRequest() ); @@ -1540,7 +1542,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListIntentsRequest() ); @@ -1583,7 +1585,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1613,7 +1615,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1657,7 +1659,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1692,7 +1694,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1740,7 +1742,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1781,7 +1783,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1860,7 +1862,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1940,7 +1942,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2036,8 +2038,7 @@ describe('v2beta1.IntentsClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2056,7 +2057,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2065,8 +2066,7 @@ describe('v2beta1.IntentsClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2082,7 +2082,7 @@ describe('v2beta1.IntentsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2092,7 +2092,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2134,7 +2134,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2145,7 +2145,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2198,7 +2198,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2207,7 +2207,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2236,7 +2236,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2245,7 +2245,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2274,7 +2274,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2284,7 +2284,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2337,7 +2337,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2347,7 +2347,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2400,7 +2400,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2414,7 +2414,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2526,7 +2526,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2540,7 +2540,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2652,7 +2652,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2661,7 +2661,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2697,7 +2697,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2707,7 +2707,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2758,7 +2758,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2769,7 +2769,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2837,7 +2837,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2848,7 +2848,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2914,7 +2914,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2924,7 +2924,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2975,7 +2975,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2985,7 +2985,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3037,7 +3037,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3047,7 +3047,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3099,7 +3099,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3110,7 +3110,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3178,7 +3178,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3189,7 +3189,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3259,7 +3259,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3269,7 +3269,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3324,7 +3324,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3334,7 +3334,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3387,7 +3387,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3398,7 +3398,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3466,7 +3466,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3476,7 +3476,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3529,7 +3529,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3540,7 +3540,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3608,7 +3608,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3619,7 +3619,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3687,7 +3687,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3702,7 +3702,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3833,7 +3833,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3848,7 +3848,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3979,7 +3979,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3989,7 +3989,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4040,7 +4040,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4051,7 +4051,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4119,7 +4119,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4131,7 +4131,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4220,7 +4220,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4232,7 +4232,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4326,7 +4326,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4337,7 +4337,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4404,7 +4404,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4415,7 +4415,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4482,7 +4482,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4493,7 +4493,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4560,7 +4560,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4572,7 +4572,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4661,7 +4661,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4673,7 +4673,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4767,7 +4767,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4778,7 +4778,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4850,7 +4850,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4861,7 +4861,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4929,7 +4929,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4941,7 +4941,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -5035,7 +5035,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5046,7 +5046,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5114,7 +5114,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5124,7 +5124,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5176,7 +5176,7 @@ describe('v2beta1.IntentsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -5187,7 +5187,7 @@ describe('v2beta1.IntentsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2.ts b/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2.ts index ffaffa5bbba..fab028b384f 100644 --- a/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2.ts @@ -252,7 +252,9 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.knowledgeBasesStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetKnowledgeBaseRequest() ); @@ -342,7 +344,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetKnowledgeBaseRequest() ); @@ -389,7 +391,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetKnowledgeBaseRequest() ); @@ -420,7 +422,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetKnowledgeBaseRequest() ); @@ -441,7 +443,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest() ); @@ -473,7 +475,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest() ); @@ -520,7 +522,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest() ); @@ -551,7 +553,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateKnowledgeBaseRequest() ); @@ -572,7 +574,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest() ); @@ -604,7 +606,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest() ); @@ -651,7 +653,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest() ); @@ -682,7 +684,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteKnowledgeBaseRequest() ); @@ -703,7 +705,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest() ); @@ -736,7 +738,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest() ); @@ -784,7 +786,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest() ); @@ -816,7 +818,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateKnowledgeBaseRequest() ); @@ -838,7 +840,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest() ); @@ -878,7 +880,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest() ); @@ -933,7 +935,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest() ); @@ -964,7 +966,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest() ); @@ -1024,7 +1026,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest() ); @@ -1073,7 +1075,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest() ); @@ -1122,7 +1124,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListKnowledgeBasesRequest() ); @@ -1164,7 +1166,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1194,7 +1196,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1238,7 +1240,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1273,7 +1275,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1321,7 +1323,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1358,7 +1360,7 @@ describe('v2.KnowledgeBasesClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1369,7 +1371,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1436,7 +1438,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1446,7 +1448,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1488,7 +1490,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1499,7 +1501,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1552,7 +1554,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1561,7 +1563,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1590,7 +1592,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1599,7 +1601,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1628,7 +1630,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1638,7 +1640,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1691,7 +1693,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1701,7 +1703,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1754,7 +1756,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1768,7 +1770,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1880,7 +1882,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1894,7 +1896,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2006,7 +2008,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2015,7 +2017,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2051,7 +2053,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2061,7 +2063,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2112,7 +2114,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2123,7 +2125,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2191,7 +2193,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2202,7 +2204,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2268,7 +2270,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2278,7 +2280,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2329,7 +2331,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2339,7 +2341,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2391,7 +2393,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2401,7 +2403,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2453,7 +2455,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2464,7 +2466,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2532,7 +2534,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2542,7 +2544,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2597,7 +2599,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2608,7 +2610,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2680,7 +2682,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2691,7 +2693,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2761,7 +2763,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2771,7 +2773,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2826,7 +2828,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2836,7 +2838,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2889,7 +2891,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2900,7 +2902,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2968,7 +2970,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2978,7 +2980,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3031,7 +3033,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3042,7 +3044,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3110,7 +3112,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3121,7 +3123,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3189,7 +3191,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3204,7 +3206,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3335,7 +3337,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3350,7 +3352,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3481,7 +3483,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3491,7 +3493,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3542,7 +3544,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3553,7 +3555,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3621,7 +3623,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3633,7 +3635,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3722,7 +3724,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3734,7 +3736,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3828,7 +3830,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3839,7 +3841,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3906,7 +3908,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3917,7 +3919,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3984,7 +3986,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3995,7 +3997,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4062,7 +4064,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4074,7 +4076,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4163,7 +4165,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4174,7 +4176,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4244,7 +4246,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4257,7 +4259,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4351,7 +4353,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4363,7 +4365,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4457,7 +4459,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4468,7 +4470,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4540,7 +4542,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4551,7 +4553,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4619,7 +4621,7 @@ describe('v2.KnowledgeBasesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4631,7 +4633,7 @@ describe('v2.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2beta1.ts index 30e842c6487..fafbdeb70aa 100644 --- a/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_knowledge_bases_v2beta1.ts @@ -253,7 +253,9 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.knowledgeBasesStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest() ); @@ -343,7 +345,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest() ); @@ -390,7 +392,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest() ); @@ -421,7 +423,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest() ); @@ -442,7 +444,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest() ); @@ -474,7 +476,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest() ); @@ -521,7 +523,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest() ); @@ -552,7 +554,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest() ); @@ -573,7 +575,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest() ); @@ -605,7 +607,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest() ); @@ -652,7 +654,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest() ); @@ -683,7 +685,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest() ); @@ -704,7 +706,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateKnowledgeBaseRequest() ); @@ -737,7 +739,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateKnowledgeBaseRequest() ); @@ -785,7 +787,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateKnowledgeBaseRequest() ); @@ -817,7 +819,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateKnowledgeBaseRequest() ); @@ -839,7 +841,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest() ); @@ -879,7 +881,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest() ); @@ -936,7 +938,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest() ); @@ -967,7 +969,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest() ); @@ -1028,7 +1030,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest() ); @@ -1078,7 +1080,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest() ); @@ -1128,7 +1130,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest() ); @@ -1170,7 +1172,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1200,7 +1202,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1244,7 +1246,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1279,7 +1281,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1327,7 +1329,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1364,7 +1366,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1374,7 +1376,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1416,7 +1418,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1427,7 +1429,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1480,7 +1482,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1489,7 +1491,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1518,7 +1520,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1527,7 +1529,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1556,7 +1558,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1566,7 +1568,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1619,7 +1621,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1629,7 +1631,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1682,7 +1684,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1696,7 +1698,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1808,7 +1810,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1822,7 +1824,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1934,7 +1936,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1943,7 +1945,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1979,7 +1981,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1989,7 +1991,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2040,7 +2042,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2051,7 +2053,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2119,7 +2121,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2130,7 +2132,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2196,7 +2198,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2206,7 +2208,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2257,7 +2259,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2267,7 +2269,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2319,7 +2321,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2329,7 +2331,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2381,7 +2383,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2392,7 +2394,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2460,7 +2462,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2471,7 +2473,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2541,7 +2543,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2551,7 +2553,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2606,7 +2608,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2616,7 +2618,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2669,7 +2671,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2680,7 +2682,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2748,7 +2750,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2758,7 +2760,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2811,7 +2813,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2822,7 +2824,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2890,7 +2892,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2901,7 +2903,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2969,7 +2971,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2984,7 +2986,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3115,7 +3117,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3130,7 +3132,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3261,7 +3263,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3271,7 +3273,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3322,7 +3324,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3333,7 +3335,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3401,7 +3403,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3413,7 +3415,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3502,7 +3504,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3514,7 +3516,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3608,7 +3610,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3619,7 +3621,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3686,7 +3688,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3697,7 +3699,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3764,7 +3766,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3775,7 +3777,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3842,7 +3844,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3854,7 +3856,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3943,7 +3945,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3955,7 +3957,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4049,7 +4051,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4060,7 +4062,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4132,7 +4134,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4143,7 +4145,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4211,7 +4213,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4223,7 +4225,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4317,7 +4319,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4328,7 +4330,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4396,7 +4398,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4406,7 +4408,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4458,7 +4460,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4469,7 +4471,7 @@ describe('v2beta1.KnowledgeBasesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_participants_v2.ts b/packages/google-cloud-dialogflow/test/gapic_participants_v2.ts index f3c5b72ce6f..b314b8202c0 100644 --- a/packages/google-cloud-dialogflow/test/gapic_participants_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_participants_v2.ts @@ -266,7 +266,9 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.participantsStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateParticipantRequest() ); @@ -356,7 +358,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateParticipantRequest() ); @@ -403,7 +405,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateParticipantRequest() ); @@ -434,7 +436,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateParticipantRequest() ); @@ -455,7 +457,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetParticipantRequest() ); @@ -486,7 +488,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetParticipantRequest() ); @@ -533,7 +535,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetParticipantRequest() ); @@ -564,7 +566,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetParticipantRequest() ); @@ -585,7 +587,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateParticipantRequest() ); @@ -617,7 +619,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateParticipantRequest() ); @@ -665,7 +667,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateParticipantRequest() ); @@ -697,7 +699,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateParticipantRequest() ); @@ -719,7 +721,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.AnalyzeContentRequest() ); @@ -750,7 +752,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.AnalyzeContentRequest() ); @@ -797,7 +799,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.AnalyzeContentRequest() ); @@ -828,7 +830,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.AnalyzeContentRequest() ); @@ -849,7 +851,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestArticlesRequest() ); @@ -880,7 +882,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestArticlesRequest() ); @@ -927,7 +929,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestArticlesRequest() ); @@ -958,7 +960,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestArticlesRequest() ); @@ -979,7 +981,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestFaqAnswersRequest() ); @@ -1010,7 +1012,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestFaqAnswersRequest() ); @@ -1057,7 +1059,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestFaqAnswersRequest() ); @@ -1088,7 +1090,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestFaqAnswersRequest() ); @@ -1109,7 +1111,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestSmartRepliesRequest() ); @@ -1141,7 +1143,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestSmartRepliesRequest() ); @@ -1188,7 +1190,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestSmartRepliesRequest() ); @@ -1219,7 +1221,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestSmartRepliesRequest() ); @@ -1240,7 +1242,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestKnowledgeAssistRequest() ); @@ -1272,7 +1274,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestKnowledgeAssistRequest() ); @@ -1319,7 +1321,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestKnowledgeAssistRequest() ); @@ -1353,7 +1355,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.SuggestKnowledgeAssistRequest() ); @@ -1377,7 +1379,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest() ); @@ -1422,7 +1424,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest() ); @@ -1467,7 +1469,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListParticipantsRequest() ); @@ -1506,7 +1508,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListParticipantsRequest() ); @@ -1561,7 +1563,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListParticipantsRequest() ); @@ -1592,7 +1594,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListParticipantsRequest() ); @@ -1652,7 +1654,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListParticipantsRequest() ); @@ -1701,7 +1703,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListParticipantsRequest() ); @@ -1750,7 +1752,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListParticipantsRequest() ); @@ -1791,7 +1793,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1821,7 +1823,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1865,7 +1867,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1900,7 +1902,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1948,7 +1950,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1985,7 +1987,7 @@ describe('v2.ParticipantsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1996,7 +1998,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2063,7 +2065,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2073,7 +2075,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2115,7 +2117,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2126,7 +2128,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2179,7 +2181,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2188,7 +2190,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2217,7 +2219,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2226,7 +2228,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2255,7 +2257,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2265,7 +2267,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2318,7 +2320,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2328,7 +2330,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2381,7 +2383,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2395,7 +2397,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2507,7 +2509,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2521,7 +2523,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2633,7 +2635,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2642,7 +2644,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2678,7 +2680,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2688,7 +2690,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2739,7 +2741,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2750,7 +2752,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2818,7 +2820,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2829,7 +2831,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2895,7 +2897,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2905,7 +2907,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2956,7 +2958,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2966,7 +2968,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3018,7 +3020,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3028,7 +3030,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3080,7 +3082,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3091,7 +3093,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3159,7 +3161,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3169,7 +3171,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3224,7 +3226,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -3235,7 +3237,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -3307,7 +3309,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3318,7 +3320,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3388,7 +3390,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3398,7 +3400,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3453,7 +3455,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3463,7 +3465,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3516,7 +3518,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3527,7 +3529,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3595,7 +3597,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3605,7 +3607,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3658,7 +3660,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3669,7 +3671,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3737,7 +3739,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3748,7 +3750,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3816,7 +3818,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3831,7 +3833,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3962,7 +3964,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3977,7 +3979,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4108,7 +4110,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4118,7 +4120,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4169,7 +4171,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4180,7 +4182,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4248,7 +4250,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4260,7 +4262,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4349,7 +4351,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4361,7 +4363,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4455,7 +4457,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4466,7 +4468,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4533,7 +4535,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4544,7 +4546,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4611,7 +4613,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4622,7 +4624,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4689,7 +4691,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4701,7 +4703,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4790,7 +4792,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4801,7 +4803,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4871,7 +4873,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4884,7 +4886,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4978,7 +4980,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4990,7 +4992,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5084,7 +5086,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5095,7 +5097,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5167,7 +5169,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5178,7 +5180,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5246,7 +5248,7 @@ describe('v2.ParticipantsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5258,7 +5260,7 @@ describe('v2.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_participants_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_participants_v2beta1.ts index 9c1aae1ac4b..c55094ddcb8 100644 --- a/packages/google-cloud-dialogflow/test/gapic_participants_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_participants_v2beta1.ts @@ -266,7 +266,9 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.participantsStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateParticipantRequest() ); @@ -356,7 +358,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateParticipantRequest() ); @@ -403,7 +405,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateParticipantRequest() ); @@ -434,7 +436,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateParticipantRequest() ); @@ -455,7 +457,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetParticipantRequest() ); @@ -486,7 +488,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetParticipantRequest() ); @@ -533,7 +535,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetParticipantRequest() ); @@ -564,7 +566,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetParticipantRequest() ); @@ -585,7 +587,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest() ); @@ -617,7 +619,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest() ); @@ -665,7 +667,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest() ); @@ -697,7 +699,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest() ); @@ -719,7 +721,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest() ); @@ -750,7 +752,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest() ); @@ -797,7 +799,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest() ); @@ -828,7 +830,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest() ); @@ -849,7 +851,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest() ); @@ -880,7 +882,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest() ); @@ -927,7 +929,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest() ); @@ -958,7 +960,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest() ); @@ -979,7 +981,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest() ); @@ -1010,7 +1012,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest() ); @@ -1057,7 +1059,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest() ); @@ -1088,7 +1090,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest() ); @@ -1109,7 +1111,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest() ); @@ -1141,7 +1143,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest() ); @@ -1188,7 +1190,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest() ); @@ -1219,7 +1221,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest() ); @@ -1240,7 +1242,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestKnowledgeAssistRequest() ); @@ -1272,7 +1274,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestKnowledgeAssistRequest() ); @@ -1319,7 +1321,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestKnowledgeAssistRequest() ); @@ -1353,7 +1355,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.SuggestKnowledgeAssistRequest() ); @@ -1378,7 +1380,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest() ); @@ -1411,7 +1413,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest() ); @@ -1460,7 +1462,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest() ); @@ -1493,7 +1495,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest() ); @@ -1515,7 +1517,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest() ); @@ -1560,7 +1562,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest() ); @@ -1605,7 +1607,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListParticipantsRequest() ); @@ -1644,7 +1646,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListParticipantsRequest() ); @@ -1701,7 +1703,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListParticipantsRequest() ); @@ -1732,7 +1734,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListParticipantsRequest() ); @@ -1793,7 +1795,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListParticipantsRequest() ); @@ -1843,7 +1845,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListParticipantsRequest() ); @@ -1893,7 +1895,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListParticipantsRequest() ); @@ -1937,7 +1939,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest() ); @@ -1978,7 +1980,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest() ); @@ -2035,7 +2037,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest() ); @@ -2068,7 +2070,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest() ); @@ -2131,7 +2133,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest() ); @@ -2183,7 +2185,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest() ); @@ -2235,7 +2237,7 @@ describe('v2beta1.ParticipantsClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest() ); @@ -2278,7 +2280,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2308,7 +2310,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2352,7 +2354,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2387,7 +2389,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2435,7 +2437,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2472,7 +2474,7 @@ describe('v2beta1.ParticipantsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -2482,7 +2484,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2524,7 +2526,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -2535,7 +2537,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2588,7 +2590,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2597,7 +2599,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2626,7 +2628,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -2635,7 +2637,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2664,7 +2666,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2674,7 +2676,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2727,7 +2729,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2737,7 +2739,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2790,7 +2792,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2804,7 +2806,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2916,7 +2918,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2930,7 +2932,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3042,7 +3044,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3051,7 +3053,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3087,7 +3089,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3097,7 +3099,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3148,7 +3150,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3159,7 +3161,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3227,7 +3229,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3238,7 +3240,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -3304,7 +3306,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3314,7 +3316,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3365,7 +3367,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3375,7 +3377,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3427,7 +3429,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -3437,7 +3439,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3489,7 +3491,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3500,7 +3502,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3568,7 +3570,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3579,7 +3581,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -3649,7 +3651,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3659,7 +3661,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3714,7 +3716,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3724,7 +3726,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3777,7 +3779,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3788,7 +3790,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3856,7 +3858,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3866,7 +3868,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3919,7 +3921,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3930,7 +3932,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3998,7 +4000,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -4009,7 +4011,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -4077,7 +4079,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -4092,7 +4094,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -4223,7 +4225,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -4238,7 +4240,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -4369,7 +4371,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -4379,7 +4381,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -4430,7 +4432,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -4441,7 +4443,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4509,7 +4511,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -4521,7 +4523,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -4610,7 +4612,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -4622,7 +4624,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -4716,7 +4718,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -4727,7 +4729,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4794,7 +4796,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4805,7 +4807,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4872,7 +4874,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4883,7 +4885,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4950,7 +4952,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4962,7 +4964,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -5051,7 +5053,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -5063,7 +5065,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -5157,7 +5159,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -5168,7 +5170,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -5240,7 +5242,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -5251,7 +5253,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -5319,7 +5321,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -5331,7 +5333,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -5425,7 +5427,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5436,7 +5438,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5504,7 +5506,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -5514,7 +5516,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5566,7 +5568,7 @@ describe('v2beta1.ParticipantsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -5577,7 +5579,7 @@ describe('v2beta1.ParticipantsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_phone_numbers_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_phone_numbers_v2beta1.ts index 6a1c1fb489f..29b2e233e3c 100644 --- a/packages/google-cloud-dialogflow/test/gapic_phone_numbers_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_phone_numbers_v2beta1.ts @@ -252,7 +252,9 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.phoneNumbersStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdatePhoneNumberRequest() ); @@ -343,7 +345,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdatePhoneNumberRequest() ); @@ -391,7 +393,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdatePhoneNumberRequest() ); @@ -423,7 +425,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdatePhoneNumberRequest() ); @@ -445,7 +447,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeletePhoneNumberRequest() ); @@ -476,7 +478,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeletePhoneNumberRequest() ); @@ -523,7 +525,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeletePhoneNumberRequest() ); @@ -554,7 +556,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeletePhoneNumberRequest() ); @@ -575,7 +577,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UndeletePhoneNumberRequest() ); @@ -607,7 +609,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UndeletePhoneNumberRequest() ); @@ -654,7 +656,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UndeletePhoneNumberRequest() ); @@ -685,7 +687,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UndeletePhoneNumberRequest() ); @@ -706,7 +708,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListPhoneNumbersRequest() ); @@ -745,7 +747,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListPhoneNumbersRequest() ); @@ -802,7 +804,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListPhoneNumbersRequest() ); @@ -833,7 +835,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListPhoneNumbersRequest() ); @@ -894,7 +896,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListPhoneNumbersRequest() ); @@ -944,7 +946,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListPhoneNumbersRequest() ); @@ -994,7 +996,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListPhoneNumbersRequest() ); @@ -1036,7 +1038,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1066,7 +1068,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1110,7 +1112,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1145,7 +1147,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1193,7 +1195,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1230,7 +1232,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1240,7 +1242,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1282,7 +1284,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1293,7 +1295,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1346,7 +1348,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1355,7 +1357,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1384,7 +1386,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1393,7 +1395,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1422,7 +1424,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1432,7 +1434,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1485,7 +1487,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1495,7 +1497,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1548,7 +1550,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1562,7 +1564,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1674,7 +1676,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1688,7 +1690,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1800,7 +1802,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1809,7 +1811,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1845,7 +1847,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1855,7 +1857,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1906,7 +1908,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1917,7 +1919,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1985,7 +1987,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1996,7 +1998,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2062,7 +2064,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2072,7 +2074,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2123,7 +2125,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2133,7 +2135,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2185,7 +2187,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2195,7 +2197,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2247,7 +2249,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2258,7 +2260,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2326,7 +2328,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2337,7 +2339,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2407,7 +2409,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2417,7 +2419,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2472,7 +2474,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2482,7 +2484,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2535,7 +2537,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2546,7 +2548,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2614,7 +2616,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2624,7 +2626,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2677,7 +2679,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2688,7 +2690,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2756,7 +2758,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2767,7 +2769,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2835,7 +2837,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2850,7 +2852,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2981,7 +2983,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2996,7 +2998,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3127,7 +3129,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3137,7 +3139,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3188,7 +3190,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3199,7 +3201,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3267,7 +3269,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3279,7 +3281,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3368,7 +3370,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3380,7 +3382,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3474,7 +3476,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3485,7 +3487,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3552,7 +3554,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3563,7 +3565,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3630,7 +3632,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3641,7 +3643,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3708,7 +3710,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3720,7 +3722,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3809,7 +3811,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3821,7 +3823,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -3915,7 +3917,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3926,7 +3928,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -3998,7 +4000,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4009,7 +4011,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4077,7 +4079,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4089,7 +4091,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4183,7 +4185,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4194,7 +4196,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4262,7 +4264,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4272,7 +4274,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4324,7 +4326,7 @@ describe('v2beta1.PhoneNumbersClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4335,7 +4337,7 @@ describe('v2beta1.PhoneNumbersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2.ts b/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2.ts index 7374f6ecf88..f9366f5086d 100644 --- a/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2.ts @@ -254,7 +254,9 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionEntityTypesStub); client.close().then(() => { done(); @@ -313,7 +315,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest() ); @@ -345,7 +347,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest() ); @@ -392,7 +394,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest() ); @@ -423,7 +425,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest() ); @@ -444,7 +446,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest() ); @@ -476,7 +478,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest() ); @@ -523,7 +525,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest() ); @@ -557,7 +559,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest() ); @@ -581,7 +583,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest() ); @@ -614,7 +616,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest() ); @@ -662,7 +664,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest() ); @@ -697,7 +699,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest() ); @@ -722,7 +724,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest() ); @@ -754,7 +756,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest() ); @@ -801,7 +803,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest() ); @@ -835,7 +837,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest() ); @@ -859,7 +861,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest() ); @@ -899,7 +901,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest() ); @@ -956,7 +958,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest() ); @@ -990,7 +992,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest() ); @@ -1057,7 +1059,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest() ); @@ -1113,7 +1115,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest() ); @@ -1167,7 +1169,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest() ); @@ -1213,7 +1215,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1243,7 +1245,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1287,7 +1289,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1322,7 +1324,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1370,7 +1372,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1407,7 +1409,7 @@ describe('v2.SessionEntityTypesClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1418,7 +1420,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1485,7 +1487,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1495,7 +1497,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1537,7 +1539,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1548,7 +1550,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1601,7 +1603,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1610,7 +1612,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1639,7 +1641,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1648,7 +1650,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1677,7 +1679,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1687,7 +1689,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1740,7 +1742,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1750,7 +1752,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1803,7 +1805,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1817,7 +1819,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1929,7 +1931,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1943,7 +1945,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2055,7 +2057,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2064,7 +2066,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2100,7 +2102,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2110,7 +2112,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2161,7 +2163,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentSession', () => { + describe('projectAgentSession', async () => { const fakePath = '/rendered/path/projectAgentSession'; const expectedParameters = { project: 'projectValue', @@ -2171,7 +2173,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2222,7 +2224,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2233,7 +2235,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2301,7 +2303,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2312,7 +2314,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2378,7 +2380,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2388,7 +2390,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2439,7 +2441,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2449,7 +2451,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2501,7 +2503,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2511,7 +2513,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2563,7 +2565,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2574,7 +2576,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2642,7 +2644,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2652,7 +2654,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2707,7 +2709,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2718,7 +2720,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2790,7 +2792,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2801,7 +2803,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2871,7 +2873,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2881,7 +2883,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2936,7 +2938,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2946,7 +2948,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2999,7 +3001,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3010,7 +3012,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -3078,7 +3080,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -3088,7 +3090,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3141,7 +3143,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3152,7 +3154,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3220,7 +3222,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3231,7 +3233,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3299,7 +3301,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3314,7 +3316,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3445,7 +3447,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3460,7 +3462,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3591,7 +3593,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3601,7 +3603,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3652,7 +3654,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3663,7 +3665,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3731,7 +3733,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3743,7 +3745,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3832,7 +3834,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3844,7 +3846,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3938,7 +3940,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3949,7 +3951,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -4016,7 +4018,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -4027,7 +4029,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -4094,7 +4096,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -4105,7 +4107,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4172,7 +4174,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4184,7 +4186,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4273,7 +4275,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4284,7 +4286,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4354,7 +4356,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4367,7 +4369,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4461,7 +4463,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4473,7 +4475,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4567,7 +4569,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4578,7 +4580,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4650,7 +4652,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4661,7 +4663,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4729,7 +4731,7 @@ describe('v2.SessionEntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4741,7 +4743,7 @@ describe('v2.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2beta1.ts index 7e0773d23fa..7cb474de402 100644 --- a/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_session_entity_types_v2beta1.ts @@ -263,7 +263,9 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionEntityTypesStub); client.close().then(() => { done(); @@ -326,7 +328,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest() ); @@ -359,7 +361,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest() ); @@ -407,7 +409,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest() ); @@ -439,7 +441,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest() ); @@ -461,7 +463,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest() ); @@ -494,7 +496,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest() ); @@ -542,7 +544,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest() ); @@ -577,7 +579,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest() ); @@ -602,7 +604,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest() ); @@ -636,7 +638,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest() ); @@ -685,7 +687,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest() ); @@ -721,7 +723,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest() ); @@ -747,7 +749,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest() ); @@ -780,7 +782,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest() ); @@ -828,7 +830,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest() ); @@ -863,7 +865,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest() ); @@ -888,7 +890,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest() ); @@ -929,7 +931,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest() ); @@ -987,7 +989,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest() ); @@ -1022,7 +1024,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest() ); @@ -1092,7 +1094,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest() ); @@ -1151,7 +1153,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest() ); @@ -1206,7 +1208,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest() ); @@ -1253,7 +1255,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1284,7 +1286,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1329,7 +1331,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1365,7 +1367,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1414,7 +1416,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1451,7 +1453,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1462,7 +1464,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1504,7 +1506,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1516,7 +1518,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1569,7 +1571,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1579,7 +1581,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1608,7 +1610,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1618,7 +1620,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1647,7 +1649,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1658,7 +1660,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1711,7 +1713,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1722,7 +1724,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1775,7 +1777,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1790,7 +1792,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1902,7 +1904,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1917,7 +1919,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2029,7 +2031,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2039,7 +2041,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2075,7 +2077,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2086,7 +2088,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2137,7 +2139,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentSession', () => { + describe('projectAgentSession', async () => { const fakePath = '/rendered/path/projectAgentSession'; const expectedParameters = { project: 'projectValue', @@ -2148,7 +2150,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2199,7 +2201,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2211,7 +2213,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2279,7 +2281,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2291,7 +2293,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2357,7 +2359,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2368,7 +2370,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2419,7 +2421,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2430,7 +2432,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2482,7 +2484,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2493,7 +2495,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2545,7 +2547,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2557,7 +2559,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2625,7 +2627,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2637,7 +2639,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2707,7 +2709,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2718,7 +2720,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2773,7 +2775,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2784,7 +2786,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2837,7 +2839,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2849,7 +2851,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2917,7 +2919,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2928,7 +2930,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2981,7 +2983,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2993,7 +2995,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3061,7 +3063,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3073,7 +3075,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3141,7 +3143,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3157,7 +3159,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3288,7 +3290,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3304,7 +3306,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3435,7 +3437,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3446,7 +3448,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3497,7 +3499,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3509,7 +3511,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3577,7 +3579,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3590,7 +3592,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3679,7 +3681,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3692,7 +3694,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3786,7 +3788,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3798,7 +3800,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3865,7 +3867,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3877,7 +3879,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3944,7 +3946,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3956,7 +3958,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4023,7 +4025,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4036,7 +4038,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4125,7 +4127,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4138,7 +4140,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4232,7 +4234,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4244,7 +4246,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4316,7 +4318,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4328,7 +4330,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4396,7 +4398,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4409,7 +4411,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4503,7 +4505,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4515,7 +4517,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4583,7 +4585,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4594,7 +4596,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4646,7 +4648,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4658,7 +4660,7 @@ describe('v2beta1.SessionEntityTypesClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_sessions_v2.ts b/packages/google-cloud-dialogflow/test/gapic_sessions_v2.ts index b52f94b3330..83fbc6d336f 100644 --- a/packages/google-cloud-dialogflow/test/gapic_sessions_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_sessions_v2.ts @@ -226,7 +226,9 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionsStub); client.close().then(() => { done(); @@ -285,7 +287,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DetectIntentRequest() ); @@ -316,7 +318,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DetectIntentRequest() ); @@ -363,7 +365,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DetectIntentRequest() ); @@ -394,7 +396,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DetectIntentRequest() ); @@ -415,7 +417,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.StreamingDetectIntentRequest() ); @@ -460,7 +462,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.StreamingDetectIntentRequest() ); @@ -504,7 +506,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -534,7 +536,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -578,7 +580,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -613,7 +615,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -661,7 +663,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -698,7 +700,7 @@ describe('v2.SessionsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -709,7 +711,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -776,7 +778,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -786,7 +788,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -828,7 +830,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -839,7 +841,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -892,7 +894,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -901,7 +903,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -930,7 +932,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -940,7 +942,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -993,7 +995,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1003,7 +1005,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1056,7 +1058,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSession', () => { + describe('projectAgentEnvironmentUserSession', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSession'; const expectedParameters = { project: 'projectValue', @@ -1068,7 +1070,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionPathTemplate.match = @@ -1155,7 +1157,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1169,7 +1171,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1281,7 +1283,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1295,7 +1297,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1407,7 +1409,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1416,7 +1418,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1452,7 +1454,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1462,7 +1464,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1513,7 +1515,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentSession', () => { + describe('projectAgentSession', async () => { const fakePath = '/rendered/path/projectAgentSession'; const expectedParameters = { project: 'projectValue', @@ -1523,7 +1525,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1574,7 +1576,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1585,7 +1587,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1653,7 +1655,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1664,7 +1666,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -1730,7 +1732,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -1740,7 +1742,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1791,7 +1793,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -1801,7 +1803,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1853,7 +1855,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -1863,7 +1865,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1915,7 +1917,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -1926,7 +1928,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1994,7 +1996,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2004,7 +2006,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2059,7 +2061,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2070,7 +2072,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2142,7 +2144,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2153,7 +2155,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2223,7 +2225,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2233,7 +2235,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2288,7 +2290,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2298,7 +2300,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2351,7 +2353,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2362,7 +2364,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2430,7 +2432,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2440,7 +2442,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2493,7 +2495,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2504,7 +2506,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2572,7 +2574,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2583,7 +2585,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2651,7 +2653,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSession', () => { + describe('projectLocationAgentEnvironmentUserSession', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSession'; const expectedParameters = { @@ -2665,7 +2667,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionPathTemplate.match = @@ -2777,7 +2779,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2792,7 +2794,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2923,7 +2925,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2938,7 +2940,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3069,7 +3071,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3079,7 +3081,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3130,7 +3132,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3141,7 +3143,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3209,7 +3211,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -3220,7 +3222,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3287,7 +3289,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3299,7 +3301,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3388,7 +3390,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3400,7 +3402,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3494,7 +3496,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3505,7 +3507,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3572,7 +3574,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3583,7 +3585,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3650,7 +3652,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3661,7 +3663,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3728,7 +3730,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3740,7 +3742,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3829,7 +3831,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -3840,7 +3842,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -3910,7 +3912,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -3923,7 +3925,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4017,7 +4019,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4029,7 +4031,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4123,7 +4125,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4134,7 +4136,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4206,7 +4208,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4217,7 +4219,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4285,7 +4287,7 @@ describe('v2.SessionsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4297,7 +4299,7 @@ describe('v2.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_sessions_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_sessions_v2beta1.ts index b455344c1bf..208371697fd 100644 --- a/packages/google-cloud-dialogflow/test/gapic_sessions_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_sessions_v2beta1.ts @@ -226,7 +226,9 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sessionsStub); client.close().then(() => { done(); @@ -285,7 +287,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DetectIntentRequest() ); @@ -316,7 +318,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DetectIntentRequest() ); @@ -363,7 +365,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DetectIntentRequest() ); @@ -394,7 +396,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DetectIntentRequest() ); @@ -415,7 +417,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest() ); @@ -460,7 +462,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest() ); @@ -504,7 +506,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -534,7 +536,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -578,7 +580,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -613,7 +615,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -661,7 +663,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -698,7 +700,7 @@ describe('v2beta1.SessionsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -708,7 +710,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -750,7 +752,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -761,7 +763,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -814,7 +816,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -823,7 +825,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -852,7 +854,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -862,7 +864,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -915,7 +917,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -925,7 +927,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -978,7 +980,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSession', () => { + describe('projectAgentEnvironmentUserSession', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSession'; const expectedParameters = { project: 'projectValue', @@ -990,7 +992,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionPathTemplate.match = @@ -1077,7 +1079,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1091,7 +1093,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1203,7 +1205,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1217,7 +1219,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1329,7 +1331,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1338,7 +1340,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1374,7 +1376,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1384,7 +1386,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1435,7 +1437,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentSession', () => { + describe('projectAgentSession', async () => { const fakePath = '/rendered/path/projectAgentSession'; const expectedParameters = { project: 'projectValue', @@ -1445,7 +1447,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1496,7 +1498,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -1507,7 +1509,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1575,7 +1577,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -1586,7 +1588,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -1652,7 +1654,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -1662,7 +1664,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1713,7 +1715,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -1723,7 +1725,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1775,7 +1777,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -1785,7 +1787,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1837,7 +1839,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -1848,7 +1850,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1916,7 +1918,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -1927,7 +1929,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -1997,7 +1999,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2007,7 +2009,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2062,7 +2064,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2072,7 +2074,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2125,7 +2127,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2136,7 +2138,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2204,7 +2206,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2214,7 +2216,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2267,7 +2269,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2278,7 +2280,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2346,7 +2348,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2357,7 +2359,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2425,7 +2427,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSession', () => { + describe('projectLocationAgentEnvironmentUserSession', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSession'; const expectedParameters = { @@ -2439,7 +2441,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionPathTemplate.match = @@ -2551,7 +2553,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2566,7 +2568,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -2697,7 +2699,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -2712,7 +2714,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -2843,7 +2845,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -2853,7 +2855,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -2904,7 +2906,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2915,7 +2917,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2983,7 +2985,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentSession', () => { + describe('projectLocationAgentSession', async () => { const fakePath = '/rendered/path/projectLocationAgentSession'; const expectedParameters = { project: 'projectValue', @@ -2994,7 +2996,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionPathTemplate.match = sinon @@ -3061,7 +3063,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3073,7 +3075,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3162,7 +3164,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3174,7 +3176,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3268,7 +3270,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3279,7 +3281,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3346,7 +3348,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3357,7 +3359,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3424,7 +3426,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3435,7 +3437,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3502,7 +3504,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3514,7 +3516,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3603,7 +3605,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3615,7 +3617,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -3709,7 +3711,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -3720,7 +3722,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -3792,7 +3794,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -3803,7 +3805,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -3871,7 +3873,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -3883,7 +3885,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -3977,7 +3979,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -3988,7 +3990,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4056,7 +4058,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4066,7 +4068,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4118,7 +4120,7 @@ describe('v2beta1.SessionsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4129,7 +4131,7 @@ describe('v2beta1.SessionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_sip_trunks_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_sip_trunks_v2beta1.ts index 07cb3b87be2..556bca5d253 100644 --- a/packages/google-cloud-dialogflow/test/gapic_sip_trunks_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_sip_trunks_v2beta1.ts @@ -250,7 +250,9 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sipTrunksStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSipTrunkRequest() ); @@ -340,7 +342,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSipTrunkRequest() ); @@ -387,7 +389,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSipTrunkRequest() ); @@ -418,7 +420,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateSipTrunkRequest() ); @@ -439,7 +441,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSipTrunkRequest() ); @@ -470,7 +472,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSipTrunkRequest() ); @@ -517,7 +519,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSipTrunkRequest() ); @@ -548,7 +550,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteSipTrunkRequest() ); @@ -569,7 +571,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSipTrunkRequest() ); @@ -600,7 +602,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSipTrunkRequest() ); @@ -647,7 +649,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSipTrunkRequest() ); @@ -678,7 +680,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetSipTrunkRequest() ); @@ -699,7 +701,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSipTrunkRequest() ); @@ -731,7 +733,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSipTrunkRequest() ); @@ -779,7 +781,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSipTrunkRequest() ); @@ -811,7 +813,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateSipTrunkRequest() ); @@ -833,7 +835,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSipTrunksRequest() ); @@ -872,7 +874,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSipTrunksRequest() ); @@ -927,7 +929,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSipTrunksRequest() ); @@ -958,7 +960,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSipTrunksRequest() ); @@ -1018,7 +1020,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSipTrunksRequest() ); @@ -1067,7 +1069,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSipTrunksRequest() ); @@ -1116,7 +1118,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListSipTrunksRequest() ); @@ -1158,7 +1160,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1188,7 +1190,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1232,7 +1234,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1267,7 +1269,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1315,7 +1317,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1352,7 +1354,7 @@ describe('v2beta1.SipTrunksClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1362,7 +1364,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1404,7 +1406,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1415,7 +1417,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1468,7 +1470,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1478,7 +1480,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1517,7 +1519,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1526,7 +1528,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1555,7 +1557,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1564,7 +1566,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1593,7 +1595,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1603,7 +1605,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1656,7 +1658,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1666,7 +1668,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1719,7 +1721,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1733,7 +1735,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1845,7 +1847,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1859,7 +1861,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1971,7 +1973,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1980,7 +1982,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2016,7 +2018,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2026,7 +2028,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2077,7 +2079,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2088,7 +2090,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2156,7 +2158,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2167,7 +2169,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2233,7 +2235,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2243,7 +2245,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2294,7 +2296,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2304,7 +2306,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2356,7 +2358,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2366,7 +2368,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2418,7 +2420,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2429,7 +2431,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2497,7 +2499,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2508,7 +2510,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2578,7 +2580,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2588,7 +2590,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2643,7 +2645,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2653,7 +2655,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2706,7 +2708,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2717,7 +2719,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2785,7 +2787,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2795,7 +2797,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2848,7 +2850,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2859,7 +2861,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2927,7 +2929,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2938,7 +2940,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3006,7 +3008,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3021,7 +3023,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3152,7 +3154,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3167,7 +3169,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3298,7 +3300,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3308,7 +3310,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3359,7 +3361,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3370,7 +3372,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3438,7 +3440,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3450,7 +3452,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3539,7 +3541,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3551,7 +3553,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3645,7 +3647,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3656,7 +3658,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3723,7 +3725,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3734,7 +3736,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3801,7 +3803,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3812,7 +3814,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3879,7 +3881,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3891,7 +3893,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3980,7 +3982,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3992,7 +3994,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4086,7 +4088,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4097,7 +4099,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4169,7 +4171,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4180,7 +4182,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4248,7 +4250,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4260,7 +4262,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4354,7 +4356,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4365,7 +4367,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4433,7 +4435,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4443,7 +4445,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4495,7 +4497,7 @@ describe('v2beta1.SipTrunksClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4506,7 +4508,7 @@ describe('v2beta1.SipTrunksClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-dialogflow/test/gapic_versions_v2.ts b/packages/google-cloud-dialogflow/test/gapic_versions_v2.ts index ab7d6e0a7d9..5ded363d6ae 100644 --- a/packages/google-cloud-dialogflow/test/gapic_versions_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_versions_v2.ts @@ -250,7 +250,9 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.versionsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetVersionRequest() ); @@ -340,7 +342,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetVersionRequest() ); @@ -387,7 +389,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetVersionRequest() ); @@ -418,7 +420,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.GetVersionRequest() ); @@ -439,7 +441,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateVersionRequest() ); @@ -470,7 +472,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateVersionRequest() ); @@ -517,7 +519,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateVersionRequest() ); @@ -548,7 +550,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.CreateVersionRequest() ); @@ -569,7 +571,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateVersionRequest() ); @@ -601,7 +603,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateVersionRequest() ); @@ -649,7 +651,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateVersionRequest() ); @@ -681,7 +683,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.UpdateVersionRequest() ); @@ -703,7 +705,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteVersionRequest() ); @@ -734,7 +736,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteVersionRequest() ); @@ -781,7 +783,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteVersionRequest() ); @@ -812,7 +814,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.DeleteVersionRequest() ); @@ -833,7 +835,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListVersionsRequest() ); @@ -866,7 +868,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListVersionsRequest() ); @@ -915,7 +917,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListVersionsRequest() ); @@ -946,7 +948,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListVersionsRequest() ); @@ -1000,7 +1002,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListVersionsRequest() ); @@ -1051,7 +1053,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListVersionsRequest() ); @@ -1094,7 +1096,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2.ListVersionsRequest() ); @@ -1135,7 +1137,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1165,7 +1167,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1209,7 +1211,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1244,7 +1246,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1292,7 +1294,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1329,7 +1331,7 @@ describe('v2.VersionsClient', () => { }); describe('Path templates', () => { - describe('conversationDataset', () => { + describe('conversationDataset', async () => { const fakePath = '/rendered/path/conversationDataset'; const expectedParameters = { project: 'projectValue', @@ -1340,7 +1342,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.conversationDatasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1407,7 +1409,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1417,7 +1419,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1459,7 +1461,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1470,7 +1472,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1523,7 +1525,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1532,7 +1534,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1561,7 +1563,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1570,7 +1572,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1599,7 +1601,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1609,7 +1611,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1662,7 +1664,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1672,7 +1674,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1725,7 +1727,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1739,7 +1741,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1851,7 +1853,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1865,7 +1867,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1977,7 +1979,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1986,7 +1988,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2022,7 +2024,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -2032,7 +2034,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2083,7 +2085,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2094,7 +2096,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2162,7 +2164,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2173,7 +2175,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2239,7 +2241,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2249,7 +2251,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2300,7 +2302,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2310,7 +2312,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2362,7 +2364,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2372,7 +2374,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2424,7 +2426,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2435,7 +2437,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2503,7 +2505,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectConversationModel', () => { + describe('projectConversationModel', async () => { const fakePath = '/rendered/path/projectConversationModel'; const expectedParameters = { project: 'projectValue', @@ -2513,7 +2515,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2568,7 +2570,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectConversationModelEvaluation', () => { + describe('projectConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectConversationModelEvaluation'; const expectedParameters = { project: 'projectValue', @@ -2579,7 +2581,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationModelEvaluationPathTemplate.match = @@ -2651,7 +2653,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2662,7 +2664,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2732,7 +2734,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2742,7 +2744,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2797,7 +2799,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2807,7 +2809,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2860,7 +2862,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2871,7 +2873,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2939,7 +2941,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2949,7 +2951,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3002,7 +3004,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -3013,7 +3015,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -3081,7 +3083,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -3092,7 +3094,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -3160,7 +3162,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -3175,7 +3177,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3306,7 +3308,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3321,7 +3323,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3452,7 +3454,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3462,7 +3464,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3513,7 +3515,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3524,7 +3526,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3592,7 +3594,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3604,7 +3606,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3693,7 +3695,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3705,7 +3707,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3799,7 +3801,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3810,7 +3812,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3877,7 +3879,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3888,7 +3890,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3955,7 +3957,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3966,7 +3968,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -4033,7 +4035,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -4045,7 +4047,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -4134,7 +4136,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationConversationModel', () => { + describe('projectLocationConversationModel', async () => { const fakePath = '/rendered/path/projectLocationConversationModel'; const expectedParameters = { project: 'projectValue', @@ -4145,7 +4147,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelPathTemplate.match = @@ -4215,7 +4217,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationConversationModelEvaluation', () => { + describe('projectLocationConversationModelEvaluation', async () => { const fakePath = '/rendered/path/projectLocationConversationModelEvaluation'; const expectedParameters = { @@ -4228,7 +4230,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationModelEvaluationPathTemplate.match = @@ -4322,7 +4324,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -4334,7 +4336,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4428,7 +4430,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4439,7 +4441,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4511,7 +4513,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4522,7 +4524,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4590,7 +4592,7 @@ describe('v2.VersionsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4602,7 +4604,7 @@ describe('v2.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = diff --git a/packages/google-cloud-dialogflow/test/gapic_versions_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_versions_v2beta1.ts index 9688063a10c..263fc33da36 100644 --- a/packages/google-cloud-dialogflow/test/gapic_versions_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_versions_v2beta1.ts @@ -250,7 +250,9 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.versionsStub); client.close().then(() => { done(); @@ -309,7 +311,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetVersionRequest() ); @@ -340,7 +342,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetVersionRequest() ); @@ -387,7 +389,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetVersionRequest() ); @@ -418,7 +420,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.GetVersionRequest() ); @@ -439,7 +441,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateVersionRequest() ); @@ -470,7 +472,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateVersionRequest() ); @@ -517,7 +519,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateVersionRequest() ); @@ -548,7 +550,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.CreateVersionRequest() ); @@ -569,7 +571,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateVersionRequest() ); @@ -601,7 +603,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateVersionRequest() ); @@ -649,7 +651,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateVersionRequest() ); @@ -681,7 +683,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.UpdateVersionRequest() ); @@ -703,7 +705,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteVersionRequest() ); @@ -734,7 +736,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteVersionRequest() ); @@ -781,7 +783,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteVersionRequest() ); @@ -812,7 +814,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.DeleteVersionRequest() ); @@ -833,7 +835,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListVersionsRequest() ); @@ -872,7 +874,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListVersionsRequest() ); @@ -927,7 +929,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListVersionsRequest() ); @@ -958,7 +960,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListVersionsRequest() ); @@ -1018,7 +1020,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListVersionsRequest() ); @@ -1069,7 +1071,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListVersionsRequest() ); @@ -1118,7 +1120,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.dialogflow.v2beta1.ListVersionsRequest() ); @@ -1159,7 +1161,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1189,7 +1191,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1233,7 +1235,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1268,7 +1270,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1316,7 +1318,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1353,7 +1355,7 @@ describe('v2beta1.VersionsClient', () => { }); describe('Path templates', () => { - describe('encryptionSpec', () => { + describe('encryptionSpec', async () => { const fakePath = '/rendered/path/encryptionSpec'; const expectedParameters = { project: 'projectValue', @@ -1363,7 +1365,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.encryptionSpecPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1405,7 +1407,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('generator', () => { + describe('generator', async () => { const fakePath = '/rendered/path/generator'; const expectedParameters = { project: 'projectValue', @@ -1416,7 +1418,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.generatorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1469,7 +1471,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1478,7 +1480,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1507,7 +1509,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgent', () => { + describe('projectAgent', async () => { const fakePath = '/rendered/path/projectAgent'; const expectedParameters = { project: 'projectValue', @@ -1516,7 +1518,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1545,7 +1547,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentEntityType', () => { + describe('projectAgentEntityType', async () => { const fakePath = '/rendered/path/projectAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -1555,7 +1557,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEntityTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1608,7 +1610,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentEnvironment', () => { + describe('projectAgentEnvironment', async () => { const fakePath = '/rendered/path/projectAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -1618,7 +1620,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1671,7 +1673,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionContext', () => { + describe('projectAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -1685,7 +1687,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionContextPathTemplate.match = @@ -1797,7 +1799,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentEnvironmentUserSessionEntityType', () => { + describe('projectAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -1811,7 +1813,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -1923,7 +1925,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentFulfillment', () => { + describe('projectAgentFulfillment', async () => { const fakePath = '/rendered/path/projectAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -1932,7 +1934,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentFulfillmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1968,7 +1970,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentIntent', () => { + describe('projectAgentIntent', async () => { const fakePath = '/rendered/path/projectAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -1978,7 +1980,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2029,7 +2031,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentSessionContext', () => { + describe('projectAgentSessionContext', async () => { const fakePath = '/rendered/path/projectAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -2040,7 +2042,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionContextPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2108,7 +2110,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentSessionEntityType', () => { + describe('projectAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -2119,7 +2121,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectAgentSessionEntityTypePathTemplate.match = @@ -2185,7 +2187,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAgentVersion', () => { + describe('projectAgentVersion', async () => { const fakePath = '/rendered/path/projectAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -2195,7 +2197,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAgentVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2246,7 +2248,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectAnswerRecord', () => { + describe('projectAnswerRecord', async () => { const fakePath = '/rendered/path/projectAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -2256,7 +2258,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectAnswerRecordPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2308,7 +2310,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectConversation', () => { + describe('projectConversation', async () => { const fakePath = '/rendered/path/projectConversation'; const expectedParameters = { project: 'projectValue', @@ -2318,7 +2320,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2370,7 +2372,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectConversationMessage', () => { + describe('projectConversationMessage', async () => { const fakePath = '/rendered/path/projectConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -2381,7 +2383,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationMessagePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2449,7 +2451,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectConversationParticipant', () => { + describe('projectConversationParticipant', async () => { const fakePath = '/rendered/path/projectConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -2460,7 +2462,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectConversationParticipantPathTemplate.match = @@ -2530,7 +2532,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectConversationProfile', () => { + describe('projectConversationProfile', async () => { const fakePath = '/rendered/path/projectConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -2540,7 +2542,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectConversationProfilePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2595,7 +2597,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectKnowledgeBase', () => { + describe('projectKnowledgeBase', async () => { const fakePath = '/rendered/path/projectKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -2605,7 +2607,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBasePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2658,7 +2660,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectKnowledgeBaseDocument', () => { + describe('projectKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -2669,7 +2671,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectKnowledgeBaseDocumentPathTemplate.match = @@ -2737,7 +2739,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgent', () => { + describe('projectLocationAgent', async () => { const fakePath = '/rendered/path/projectLocationAgent'; const expectedParameters = { project: 'projectValue', @@ -2747,7 +2749,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2800,7 +2802,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentEntityType', () => { + describe('projectLocationAgentEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEntityType'; const expectedParameters = { project: 'projectValue', @@ -2811,7 +2813,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEntityTypePathTemplate.match = @@ -2879,7 +2881,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironment', () => { + describe('projectLocationAgentEnvironment', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironment'; const expectedParameters = { project: 'projectValue', @@ -2890,7 +2892,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentPathTemplate.match = @@ -2958,7 +2960,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionContext', () => { + describe('projectLocationAgentEnvironmentUserSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionContext'; const expectedParameters = { @@ -2973,7 +2975,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionContextPathTemplate.match = @@ -3104,7 +3106,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentEnvironmentUserSessionEntityType', () => { + describe('projectLocationAgentEnvironmentUserSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentEnvironmentUserSessionEntityType'; const expectedParameters = { @@ -3119,7 +3121,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentEnvironmentUserSessionEntityTypePathTemplate.match = @@ -3250,7 +3252,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentFulfillment', () => { + describe('projectLocationAgentFulfillment', async () => { const fakePath = '/rendered/path/projectLocationAgentFulfillment'; const expectedParameters = { project: 'projectValue', @@ -3260,7 +3262,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentFulfillmentPathTemplate.match = @@ -3311,7 +3313,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentIntent', () => { + describe('projectLocationAgentIntent', async () => { const fakePath = '/rendered/path/projectLocationAgentIntent'; const expectedParameters = { project: 'projectValue', @@ -3322,7 +3324,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentIntentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3390,7 +3392,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentSessionContext', () => { + describe('projectLocationAgentSessionContext', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionContext'; const expectedParameters = { project: 'projectValue', @@ -3402,7 +3404,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionContextPathTemplate.match = @@ -3491,7 +3493,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentSessionEntityType', () => { + describe('projectLocationAgentSessionEntityType', async () => { const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; const expectedParameters = { project: 'projectValue', @@ -3503,7 +3505,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentSessionEntityTypePathTemplate.match = @@ -3597,7 +3599,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAgentVersion', () => { + describe('projectLocationAgentVersion', async () => { const fakePath = '/rendered/path/projectLocationAgentVersion'; const expectedParameters = { project: 'projectValue', @@ -3608,7 +3610,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAgentVersionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAgentVersionPathTemplate.match = sinon @@ -3675,7 +3677,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationAnswerRecord', () => { + describe('projectLocationAnswerRecord', async () => { const fakePath = '/rendered/path/projectLocationAnswerRecord'; const expectedParameters = { project: 'projectValue', @@ -3686,7 +3688,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationAnswerRecordPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationAnswerRecordPathTemplate.match = sinon @@ -3753,7 +3755,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationConversation', () => { + describe('projectLocationConversation', async () => { const fakePath = '/rendered/path/projectLocationConversation'; const expectedParameters = { project: 'projectValue', @@ -3764,7 +3766,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationPathTemplate.match = sinon @@ -3831,7 +3833,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationConversationMessage', () => { + describe('projectLocationConversationMessage', async () => { const fakePath = '/rendered/path/projectLocationConversationMessage'; const expectedParameters = { project: 'projectValue', @@ -3843,7 +3845,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationMessagePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationMessagePathTemplate.match = @@ -3932,7 +3934,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationConversationParticipant', () => { + describe('projectLocationConversationParticipant', async () => { const fakePath = '/rendered/path/projectLocationConversationParticipant'; const expectedParameters = { project: 'projectValue', @@ -3944,7 +3946,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationParticipantPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationParticipantPathTemplate.match = @@ -4038,7 +4040,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationConversationProfile', () => { + describe('projectLocationConversationProfile', async () => { const fakePath = '/rendered/path/projectLocationConversationProfile'; const expectedParameters = { project: 'projectValue', @@ -4049,7 +4051,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationConversationProfilePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationConversationProfilePathTemplate.match = @@ -4121,7 +4123,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationKnowledgeBase', () => { + describe('projectLocationKnowledgeBase', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBase'; const expectedParameters = { project: 'projectValue', @@ -4132,7 +4134,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBasePathTemplate.match = @@ -4200,7 +4202,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationKnowledgeBaseDocument', () => { + describe('projectLocationKnowledgeBaseDocument', async () => { const fakePath = '/rendered/path/projectLocationKnowledgeBaseDocument'; const expectedParameters = { project: 'projectValue', @@ -4212,7 +4214,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationKnowledgeBaseDocumentPathTemplate.match = @@ -4306,7 +4308,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectLocationPhoneNumber', () => { + describe('projectLocationPhoneNumber', async () => { const fakePath = '/rendered/path/projectLocationPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4317,7 +4319,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4385,7 +4387,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('projectPhoneNumber', () => { + describe('projectPhoneNumber', async () => { const fakePath = '/rendered/path/projectPhoneNumber'; const expectedParameters = { project: 'projectValue', @@ -4395,7 +4397,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPhoneNumberPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4447,7 +4449,7 @@ describe('v2beta1.VersionsClient', () => { }); }); - describe('sipTrunk', () => { + describe('sipTrunk', async () => { const fakePath = '/rendered/path/sipTrunk'; const expectedParameters = { project: 'projectValue', @@ -4458,7 +4460,7 @@ describe('v2beta1.VersionsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sipTrunkPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/package.json b/packages/google-cloud-discoveryengine/package.json index 6921ea1cbe6..de03bda4334 100644 --- a/packages/google-cloud-discoveryengine/package.json +++ b/packages/google-cloud-discoveryengine/package.json @@ -46,7 +46,7 @@ "test": "NODE_OPTIONS=--max-old-space-size=8192 c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json index f12c168ee79..ee32c6bc8ad 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.14.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json index fadee7a764d..d64dfea08eb 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.14.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json b/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json index c9fd091a878..3027ecfc182 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.14.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json index 839c1918650..cff15a81ebe 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.14.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json index 2f990084d03..410b41df62d 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.14.0", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts index eeb7b357a22..676e208a4e3 100644 --- a/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts @@ -815,7 +815,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< @@ -961,7 +963,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1137,7 +1141,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1323,7 +1329,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1500,7 +1508,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1740,7 +1750,7 @@ export class CompletionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts index 154a7119141..e09ab536b9a 100644 --- a/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts @@ -617,7 +617,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createControl request %j', request); const wrappedCallback: | Callback< @@ -740,7 +742,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteControl request %j', request); const wrappedCallback: | Callback< @@ -872,7 +876,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ 'control.name': request.control!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateControl request %j', request); const wrappedCallback: | Callback< @@ -992,7 +998,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getControl request %j', request); const wrappedCallback: | Callback< @@ -1128,7 +1136,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListControlsRequest, @@ -1204,7 +1214,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls stream %j', request); return this.descriptors.page.listControls.createStream( this.innerApiCalls.listControls as GaxCall, @@ -1262,7 +1274,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls iterate %j', request); return this.descriptors.page.listControls.asyncIterate( this.innerApiCalls['listControls'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts index 9d4f8b75bb5..d22a2fb6b62 100644 --- a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts @@ -686,7 +686,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('converseConversation request %j', request); const wrappedCallback: | Callback< @@ -817,7 +819,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversation request %j', request); const wrappedCallback: | Callback< @@ -946,7 +950,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversation request %j', request); const wrappedCallback: | Callback< @@ -1084,7 +1090,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ 'conversation.name': request.conversation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConversation request %j', request); const wrappedCallback: | Callback< @@ -1210,7 +1218,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversation request %j', request); const wrappedCallback: | Callback< @@ -1394,7 +1404,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('answerQuery request %j', request); const wrappedCallback: | Callback< @@ -1514,7 +1526,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnswer request %j', request); const wrappedCallback: | Callback< @@ -1636,7 +1650,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSession request %j', request); const wrappedCallback: | Callback< @@ -1759,7 +1775,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSession request %j', request); const wrappedCallback: | Callback< @@ -1890,7 +1908,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ 'session.name': request.session!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSession request %j', request); const wrappedCallback: | Callback< @@ -2010,7 +2030,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSession request %j', request); const wrappedCallback: | Callback< @@ -2155,7 +2177,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListConversationsRequest, @@ -2240,7 +2264,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations stream %j', request); return this.descriptors.page.listConversations.createStream( this.innerApiCalls.listConversations as GaxCall, @@ -2307,7 +2333,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations iterate %j', request); return this.descriptors.page.listConversations.asyncIterate( this.innerApiCalls['listConversations'] as GaxCall, @@ -2430,7 +2458,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListSessionsRequest, @@ -2515,7 +2545,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions stream %j', request); return this.descriptors.page.listSessions.createStream( this.innerApiCalls.listSessions as GaxCall, @@ -2582,7 +2614,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions iterate %j', request); return this.descriptors.page.listSessions.asyncIterate( this.innerApiCalls['listSessions'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts index d4970c9ee68..1e43e116877 100644 --- a/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts @@ -762,7 +762,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataStore request %j', request); const wrappedCallback: | Callback< @@ -901,7 +903,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_store.name': request.dataStore!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataStore request %j', request); const wrappedCallback: | Callback< @@ -1067,7 +1071,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1243,7 +1249,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1428,7 +1436,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListDataStoresRequest, @@ -1515,7 +1525,9 @@ export class DataStoreServiceClient { }); const defaultCallSettings = this._defaults['listDataStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStores stream %j', request); return this.descriptors.page.listDataStores.createStream( this.innerApiCalls.listDataStores as GaxCall, @@ -1584,7 +1596,9 @@ export class DataStoreServiceClient { }); const defaultCallSettings = this._defaults['listDataStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStores iterate %j', request); return this.descriptors.page.listDataStores.asyncIterate( this.innerApiCalls['listDataStores'] as GaxCall, @@ -1764,7 +1778,7 @@ export class DataStoreServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts index 499ac07b1b2..328fb34edc3 100644 --- a/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts @@ -769,7 +769,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -910,7 +912,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocument request %j', request); const wrappedCallback: | Callback< @@ -1045,7 +1049,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ 'document.name': request.document!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocument request %j', request); const wrappedCallback: | Callback< @@ -1173,7 +1179,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocument request %j', request); const wrappedCallback: | Callback< @@ -1304,7 +1312,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetDocumentsMetadata request %j', request); const wrappedCallback: | Callback< @@ -1532,7 +1542,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1731,7 +1743,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1914,7 +1928,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListDocumentsRequest, @@ -2000,7 +2016,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -2068,7 +2086,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -2248,7 +2268,7 @@ export class DocumentServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts index 00ac20dcc69..9efc0324251 100644 --- a/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts @@ -765,7 +765,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ 'engine.name': request.engine!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEngine request %j', request); const wrappedCallback: | Callback< @@ -886,7 +888,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEngine request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1031,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1203,7 +1209,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1370,7 +1378,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListEnginesRequest, @@ -1439,7 +1449,9 @@ export class EngineServiceClient { }); const defaultCallSettings = this._defaults['listEngines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEngines stream %j', request); return this.descriptors.page.listEngines.createStream( this.innerApiCalls.listEngines as GaxCall, @@ -1490,7 +1502,9 @@ export class EngineServiceClient { }); const defaultCallSettings = this._defaults['listEngines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEngines iterate %j', request); return this.descriptors.page.listEngines.asyncIterate( this.innerApiCalls['listEngines'] as GaxCall, @@ -1670,7 +1684,7 @@ export class EngineServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts index a0d2a22add8..b4d8ff51eb2 100644 --- a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts @@ -653,7 +653,9 @@ export class GroundedGenerationServiceClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateGroundedContent request %j', request); const wrappedCallback: | Callback< @@ -798,7 +800,9 @@ export class GroundedGenerationServiceClient { this._gaxModule.routingHeader.fromParams({ grounding_config: request.groundingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkGrounding request %j', request); const wrappedCallback: | Callback< @@ -846,7 +850,9 @@ export class GroundedGenerationServiceClient { * region_tag:discoveryengine_v1_generated_GroundedGenerationService_StreamGenerateGroundedContent_async */ streamGenerateGroundedContent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamGenerateGroundedContent stream %j', options); return this.innerApiCalls.streamGenerateGroundedContent(null, options); } diff --git a/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts index 9eef157a417..bcdc7572e88 100644 --- a/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts @@ -746,7 +746,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -986,7 +988,7 @@ export class ProjectServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts index 6e954a2db0f..7fcdb02ca99 100644 --- a/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts @@ -609,7 +609,9 @@ export class RankServiceClient { this._gaxModule.routingHeader.fromParams({ ranking_config: request.rankingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rank request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts index a5fc31ef30b..edb53fc2c10 100644 --- a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts @@ -704,7 +704,9 @@ export class RecommendationServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recommend request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts index 1e354f5bd99..889c011081e 100644 --- a/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts @@ -760,7 +760,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSchema request %j', request); const wrappedCallback: | Callback< @@ -901,7 +903,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1072,7 +1076,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ 'schema.name': request.schema!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1240,7 +1246,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1415,7 +1423,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListSchemasRequest, @@ -1493,7 +1503,9 @@ export class SchemaServiceClient { }); const defaultCallSettings = this._defaults['listSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchemas stream %j', request); return this.descriptors.page.listSchemas.createStream( this.innerApiCalls.listSchemas as GaxCall, @@ -1553,7 +1565,9 @@ export class SchemaServiceClient { }); const defaultCallSettings = this._defaults['listSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchemas iterate %j', request); return this.descriptors.page.listSchemas.asyncIterate( this.innerApiCalls['listSchemas'] as GaxCall, @@ -1733,7 +1747,7 @@ export class SchemaServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts index 473bbb4dd12..99b22ad8ddd 100644 --- a/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts @@ -821,7 +821,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.ISearchRequest, @@ -1091,7 +1093,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search stream %j', request); return this.descriptors.page.search.createStream( this.innerApiCalls.search as GaxCall, @@ -1343,7 +1347,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search iterate %j', request); return this.descriptors.page.search.asyncIterate( this.innerApiCalls['search'] as GaxCall, @@ -1656,7 +1662,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.ISearchRequest, @@ -1926,7 +1934,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['searchLite']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchLite stream %j', request); return this.descriptors.page.searchLite.createStream( this.innerApiCalls.searchLite as GaxCall, @@ -2178,7 +2188,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['searchLite']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchLite iterate %j', request); return this.descriptors.page.searchLite.asyncIterate( this.innerApiCalls['searchLite'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1/search_tuning_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/search_tuning_service_client.ts index b7f40374e5b..c4655a744bb 100644 --- a/packages/google-cloud-discoveryengine/src/v1/search_tuning_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/search_tuning_service_client.ts @@ -728,7 +728,9 @@ export class SearchTuningServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomModels request %j', request); const wrappedCallback: | Callback< @@ -873,7 +875,9 @@ export class SearchTuningServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1113,7 +1117,7 @@ export class SearchTuningServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts index de1b6b542b8..0e13d1a8250 100644 --- a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts @@ -858,7 +858,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSiteSearchEngine request %j', request); const wrappedCallback: | Callback< @@ -986,7 +988,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTargetSite request %j', request); const wrappedCallback: | Callback< @@ -1123,7 +1127,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1297,7 +1303,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1470,7 +1478,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ 'target_site.name': request.targetSite!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1646,7 +1656,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1816,7 +1828,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1986,7 +2000,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2164,7 +2180,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2334,7 +2352,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2510,7 +2530,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IListTargetSitesRequest, @@ -2589,7 +2611,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['listTargetSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetSites stream %j', request); return this.descriptors.page.listTargetSites.createStream( this.innerApiCalls.listTargetSites as GaxCall, @@ -2650,7 +2674,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['listTargetSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetSites iterate %j', request); return this.descriptors.page.listTargetSites.asyncIterate( this.innerApiCalls['listTargetSites'] as GaxCall, @@ -2765,7 +2791,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1.IFetchDomainVerificationStatusRequest, @@ -2841,7 +2869,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['fetchDomainVerificationStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDomainVerificationStatus stream %j', request); return this.descriptors.page.fetchDomainVerificationStatus.createStream( this.innerApiCalls.fetchDomainVerificationStatus as GaxCall, @@ -2899,7 +2929,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['fetchDomainVerificationStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDomainVerificationStatus iterate %j', request); return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate( this.innerApiCalls['fetchDomainVerificationStatus'] as GaxCall, @@ -3079,7 +3111,7 @@ export class SiteSearchEngineServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts index 28d488dc478..f8209440211 100644 --- a/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts @@ -746,7 +746,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('writeUserEvent request %j', request); const wrappedCallback: | Callback< @@ -888,7 +890,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('collectUserEvent request %j', request); const wrappedCallback: | Callback< @@ -1058,7 +1062,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1241,7 +1247,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1481,7 +1489,7 @@ export class UserEventServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/acl_config_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/acl_config_service_client.ts index 8e74aa52911..e96504fe093 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/acl_config_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/acl_config_service_client.ts @@ -608,7 +608,9 @@ export class AclConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'acl_config.name': request.aclConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateAclConfig request %j', request); const wrappedCallback: | Callback< @@ -739,7 +741,9 @@ export class AclConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAclConfig request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/chunk_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/chunk_service_client.ts index 20860519a97..6b02cd7e1cc 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/chunk_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/chunk_service_client.ts @@ -625,7 +625,9 @@ export class ChunkServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChunk request %j', request); const wrappedCallback: | Callback< @@ -771,7 +773,9 @@ export class ChunkServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListChunksRequest, @@ -855,7 +859,9 @@ export class ChunkServiceClient { }); const defaultCallSettings = this._defaults['listChunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChunks stream %j', request); return this.descriptors.page.listChunks.createStream( this.innerApiCalls.listChunks as GaxCall, @@ -921,7 +927,9 @@ export class ChunkServiceClient { }); const defaultCallSettings = this._defaults['listChunks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChunks iterate %j', request); return this.descriptors.page.listChunks.asyncIterate( this.innerApiCalls['listChunks'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/completion_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/completion_service_client.ts index c5977a13e81..51095715366 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/completion_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/completion_service_client.ts @@ -845,7 +845,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< @@ -991,7 +993,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1167,7 +1171,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1353,7 +1359,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1530,7 +1538,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1770,7 +1780,7 @@ export class CompletionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/control_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/control_service_client.ts index f39fed057aa..ce001a9e9f3 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/control_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/control_service_client.ts @@ -648,7 +648,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createControl request %j', request); const wrappedCallback: | Callback< @@ -777,7 +779,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteControl request %j', request); const wrappedCallback: | Callback< @@ -915,7 +919,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ 'control.name': request.control!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateControl request %j', request); const wrappedCallback: | Callback< @@ -1041,7 +1047,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getControl request %j', request); const wrappedCallback: | Callback< @@ -1180,7 +1188,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListControlsRequest, @@ -1256,7 +1266,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls stream %j', request); return this.descriptors.page.listControls.createStream( this.innerApiCalls.listControls as GaxCall, @@ -1314,7 +1326,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls iterate %j', request); return this.descriptors.page.listControls.asyncIterate( this.innerApiCalls['listControls'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/conversational_search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/conversational_search_service_client.ts index 9b4000d858c..fb3962679e3 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/conversational_search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/conversational_search_service_client.ts @@ -698,7 +698,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('converseConversation request %j', request); const wrappedCallback: | Callback< @@ -829,7 +831,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversation request %j', request); const wrappedCallback: | Callback< @@ -958,7 +962,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversation request %j', request); const wrappedCallback: | Callback< @@ -1096,7 +1102,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ 'conversation.name': request.conversation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConversation request %j', request); const wrappedCallback: | Callback< @@ -1222,7 +1230,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversation request %j', request); const wrappedCallback: | Callback< @@ -1409,7 +1419,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('answerQuery request %j', request); const wrappedCallback: | Callback< @@ -1529,7 +1541,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnswer request %j', request); const wrappedCallback: | Callback< @@ -1660,7 +1674,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSession request %j', request); const wrappedCallback: | Callback< @@ -1789,7 +1805,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSession request %j', request); const wrappedCallback: | Callback< @@ -1926,7 +1944,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ 'session.name': request.session!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSession request %j', request); const wrappedCallback: | Callback< @@ -2052,7 +2072,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSession request %j', request); const wrappedCallback: | Callback< @@ -2200,7 +2222,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListConversationsRequest, @@ -2285,7 +2309,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations stream %j', request); return this.descriptors.page.listConversations.createStream( this.innerApiCalls.listConversations as GaxCall, @@ -2352,7 +2378,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations iterate %j', request); return this.descriptors.page.listConversations.asyncIterate( this.innerApiCalls['listConversations'] as GaxCall, @@ -2475,7 +2503,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListSessionsRequest, @@ -2560,7 +2590,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions stream %j', request); return this.descriptors.page.listSessions.createStream( this.innerApiCalls.listSessions as GaxCall, @@ -2627,7 +2659,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions iterate %j', request); return this.descriptors.page.listSessions.asyncIterate( this.innerApiCalls['listSessions'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/data_store_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/data_store_service_client.ts index fe969b28d39..15f467f92e7 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/data_store_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/data_store_service_client.ts @@ -795,7 +795,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataStore request %j', request); const wrappedCallback: | Callback< @@ -934,7 +936,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_store.name': request.dataStore!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataStore request %j', request); const wrappedCallback: | Callback< @@ -1061,7 +1065,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocumentProcessingConfig request %j', request); const wrappedCallback: | Callback< @@ -1212,7 +1218,9 @@ export class DataStoreServiceClient { 'document_processing_config.name': request.documentProcessingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocumentProcessingConfig request %j', request); const wrappedCallback: | Callback< @@ -1385,7 +1393,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1561,7 +1571,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1747,7 +1759,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListDataStoresRequest, @@ -1835,7 +1849,9 @@ export class DataStoreServiceClient { }); const defaultCallSettings = this._defaults['listDataStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStores stream %j', request); return this.descriptors.page.listDataStores.createStream( this.innerApiCalls.listDataStores as GaxCall, @@ -1905,7 +1921,9 @@ export class DataStoreServiceClient { }); const defaultCallSettings = this._defaults['listDataStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStores iterate %j', request); return this.descriptors.page.listDataStores.asyncIterate( this.innerApiCalls['listDataStores'] as GaxCall, @@ -2085,7 +2103,7 @@ export class DataStoreServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/document_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/document_service_client.ts index cc2375afc20..a9351a26949 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/document_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/document_service_client.ts @@ -802,7 +802,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -949,7 +951,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocument request %j', request); const wrappedCallback: | Callback< @@ -1091,7 +1095,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ 'document.name': request.document!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocument request %j', request); const wrappedCallback: | Callback< @@ -1225,7 +1231,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocument request %j', request); const wrappedCallback: | Callback< @@ -1364,7 +1372,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcessedDocument request %j', request); const wrappedCallback: | Callback< @@ -1495,7 +1505,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetDocumentsMetadata request %j', request); const wrappedCallback: | Callback< @@ -1723,7 +1735,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1923,7 +1937,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2107,7 +2123,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListDocumentsRequest, @@ -2194,7 +2212,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -2263,7 +2283,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -2443,7 +2465,7 @@ export class DocumentServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/engine_service_client.ts index 9b098509f2b..8d50b305334 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/engine_service_client.ts @@ -811,7 +811,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ 'engine.name': request.engine!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEngine request %j', request); const wrappedCallback: | Callback< @@ -932,7 +934,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEngine request %j', request); const wrappedCallback: | Callback< @@ -1061,7 +1065,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseEngine request %j', request); const wrappedCallback: | Callback< @@ -1190,7 +1196,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeEngine request %j', request); const wrappedCallback: | Callback< @@ -1335,7 +1343,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1511,7 +1521,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1682,7 +1694,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1849,7 +1863,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListEnginesRequest, @@ -1918,7 +1934,9 @@ export class EngineServiceClient { }); const defaultCallSettings = this._defaults['listEngines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEngines stream %j', request); return this.descriptors.page.listEngines.createStream( this.innerApiCalls.listEngines as GaxCall, @@ -1969,7 +1987,9 @@ export class EngineServiceClient { }); const defaultCallSettings = this._defaults['listEngines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEngines iterate %j', request); return this.descriptors.page.listEngines.asyncIterate( this.innerApiCalls['listEngines'] as GaxCall, @@ -2149,7 +2169,7 @@ export class EngineServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/estimate_billing_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/estimate_billing_service_client.ts index 1d25402f3bd..09637cd4489 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/estimate_billing_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/estimate_billing_service_client.ts @@ -762,7 +762,9 @@ export class EstimateBillingServiceClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1002,7 +1004,7 @@ export class EstimateBillingServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/evaluation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/evaluation_service_client.ts index 1a0ff591dd4..fe626fe68e0 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/evaluation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/evaluation_service_client.ts @@ -786,7 +786,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvaluation request %j', request); const wrappedCallback: | Callback< @@ -925,7 +927,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1108,7 +1112,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListEvaluationsRequest, @@ -1193,7 +1199,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations stream %j', request); return this.descriptors.page.listEvaluations.createStream( this.innerApiCalls.listEvaluations as GaxCall, @@ -1260,7 +1268,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations iterate %j', request); return this.descriptors.page.listEvaluations.asyncIterate( this.innerApiCalls['listEvaluations'] as GaxCall, @@ -1381,7 +1391,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ evaluation: request.evaluation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListEvaluationResultsRequest, @@ -1464,7 +1476,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluationResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluationResults stream %j', request); return this.descriptors.page.listEvaluationResults.createStream( this.innerApiCalls.listEvaluationResults as GaxCall, @@ -1529,7 +1543,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluationResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluationResults iterate %j', request); return this.descriptors.page.listEvaluationResults.asyncIterate( this.innerApiCalls['listEvaluationResults'] as GaxCall, @@ -1709,7 +1725,7 @@ export class EvaluationServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/grounded_generation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/grounded_generation_service_client.ts index 6e486b38856..a37b072a315 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/grounded_generation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/grounded_generation_service_client.ts @@ -637,7 +637,9 @@ export class GroundedGenerationServiceClient { this._gaxModule.routingHeader.fromParams({ grounding_config: request.groundingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkGrounding request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/project_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/project_service_client.ts index 61e34cef737..842385423a8 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/project_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/project_service_client.ts @@ -754,7 +754,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProject request %j', request); const wrappedCallback: | Callback< @@ -902,7 +904,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ project: request.project ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('reportConsentChange request %j', request); const wrappedCallback: | Callback< @@ -1051,7 +1055,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1291,7 +1297,7 @@ export class ProjectServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/rank_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/rank_service_client.ts index 644e1e1afd5..329bb401e54 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/rank_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/rank_service_client.ts @@ -640,7 +640,9 @@ export class RankServiceClient { this._gaxModule.routingHeader.fromParams({ ranking_config: request.rankingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rank request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/recommendation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/recommendation_service_client.ts index 6ff2bb77152..b20c4ab9b1f 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/recommendation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/recommendation_service_client.ts @@ -716,7 +716,9 @@ export class RecommendationServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recommend request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_service_client.ts index 4c20dafc375..b8d43adde19 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_service_client.ts @@ -780,7 +780,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -928,7 +930,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -1063,7 +1067,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ 'sample_query.name': request.sampleQuery!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -1197,7 +1203,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -1349,7 +1357,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1532,7 +1542,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListSampleQueriesRequest, @@ -1617,7 +1629,9 @@ export class SampleQueryServiceClient { }); const defaultCallSettings = this._defaults['listSampleQueries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQueries stream %j', request); return this.descriptors.page.listSampleQueries.createStream( this.innerApiCalls.listSampleQueries as GaxCall, @@ -1684,7 +1698,9 @@ export class SampleQueryServiceClient { }); const defaultCallSettings = this._defaults['listSampleQueries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQueries iterate %j', request); return this.descriptors.page.listSampleQueries.asyncIterate( this.innerApiCalls['listSampleQueries'] as GaxCall, @@ -1864,7 +1880,7 @@ export class SampleQueryServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_set_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_set_service_client.ts index 95fa1d97aa8..7735e6d7c40 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_set_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/sample_query_set_service_client.ts @@ -644,7 +644,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -795,7 +797,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -933,7 +937,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ 'sample_query_set.name': request.sampleQuerySet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -1071,7 +1077,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -1219,7 +1227,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListSampleQuerySetsRequest, @@ -1304,7 +1314,9 @@ export class SampleQuerySetServiceClient { }); const defaultCallSettings = this._defaults['listSampleQuerySets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQuerySets stream %j', request); return this.descriptors.page.listSampleQuerySets.createStream( this.innerApiCalls.listSampleQuerySets as GaxCall, @@ -1371,7 +1383,9 @@ export class SampleQuerySetServiceClient { }); const defaultCallSettings = this._defaults['listSampleQuerySets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQuerySets iterate %j', request); return this.descriptors.page.listSampleQuerySets.asyncIterate( this.innerApiCalls['listSampleQuerySets'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/schema_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/schema_service_client.ts index 65b63ff2a4a..f9aa71e6f34 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/schema_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/schema_service_client.ts @@ -785,7 +785,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSchema request %j', request); const wrappedCallback: | Callback< @@ -930,7 +932,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1103,7 +1107,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ 'schema.name': request.schema!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1271,7 +1277,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1447,7 +1455,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListSchemasRequest, @@ -1526,7 +1536,9 @@ export class SchemaServiceClient { }); const defaultCallSettings = this._defaults['listSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchemas stream %j', request); return this.descriptors.page.listSchemas.createStream( this.innerApiCalls.listSchemas as GaxCall, @@ -1587,7 +1599,9 @@ export class SchemaServiceClient { }); const defaultCallSettings = this._defaults['listSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchemas iterate %j', request); return this.descriptors.page.listSchemas.asyncIterate( this.innerApiCalls['listSchemas'] as GaxCall, @@ -1767,7 +1781,7 @@ export class SchemaServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/search_service_client.ts index 677a93ee2ff..e26c5eb6417 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/search_service_client.ts @@ -888,7 +888,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.ISearchRequest, @@ -1211,7 +1213,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search stream %j', request); return this.descriptors.page.search.createStream( this.innerApiCalls.search as GaxCall, @@ -1516,7 +1520,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search iterate %j', request); return this.descriptors.page.search.asyncIterate( this.innerApiCalls['search'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/search_tuning_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/search_tuning_service_client.ts index cdf5025861d..a87572a0b45 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/search_tuning_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/search_tuning_service_client.ts @@ -752,7 +752,9 @@ export class SearchTuningServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomModels request %j', request); const wrappedCallback: | Callback< @@ -897,7 +899,9 @@ export class SearchTuningServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1137,7 +1141,7 @@ export class SearchTuningServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/serving_config_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/serving_config_service_client.ts index 4c286c9c48c..2f429efe730 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/serving_config_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/serving_config_service_client.ts @@ -638,7 +638,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'serving_config.name': request.servingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateServingConfig request %j', request); const wrappedCallback: | Callback< @@ -766,7 +768,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServingConfig request %j', request); const wrappedCallback: | Callback< @@ -897,7 +901,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListServingConfigsRequest, @@ -966,7 +972,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs stream %j', request); return this.descriptors.page.listServingConfigs.createStream( this.innerApiCalls.listServingConfigs as GaxCall, @@ -1017,7 +1025,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs iterate %j', request); return this.descriptors.page.listServingConfigs.asyncIterate( this.innerApiCalls['listServingConfigs'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/site_search_engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/site_search_engine_service_client.ts index f0d50e30b16..732d649fc9f 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/site_search_engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/site_search_engine_service_client.ts @@ -899,7 +899,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSiteSearchEngine request %j', request); const wrappedCallback: | Callback< @@ -1034,7 +1036,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTargetSite request %j', request); const wrappedCallback: | Callback< @@ -1163,7 +1167,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getUriPatternDocumentData request %j', request); const wrappedCallback: | Callback< @@ -1300,7 +1306,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1474,7 +1482,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1647,7 +1657,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ 'target_site.name': request.targetSite!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1824,7 +1836,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1994,7 +2008,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2164,7 +2180,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2339,7 +2357,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2509,7 +2529,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2713,7 +2735,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2890,7 +2914,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IListTargetSitesRequest, @@ -2969,7 +2995,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['listTargetSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetSites stream %j', request); return this.descriptors.page.listTargetSites.createStream( this.innerApiCalls.listTargetSites as GaxCall, @@ -3030,7 +3058,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['listTargetSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetSites iterate %j', request); return this.descriptors.page.listTargetSites.asyncIterate( this.innerApiCalls['listTargetSites'] as GaxCall, @@ -3145,7 +3175,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1alpha.IFetchDomainVerificationStatusRequest, @@ -3221,7 +3253,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['fetchDomainVerificationStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDomainVerificationStatus stream %j', request); return this.descriptors.page.fetchDomainVerificationStatus.createStream( this.innerApiCalls.fetchDomainVerificationStatus as GaxCall, @@ -3279,7 +3313,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['fetchDomainVerificationStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDomainVerificationStatus iterate %j', request); return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate( this.innerApiCalls['fetchDomainVerificationStatus'] as GaxCall, @@ -3459,7 +3495,7 @@ export class SiteSearchEngineServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1alpha/user_event_service_client.ts b/packages/google-cloud-discoveryengine/src/v1alpha/user_event_service_client.ts index 617b895b8dc..a05b2787bc4 100644 --- a/packages/google-cloud-discoveryengine/src/v1alpha/user_event_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1alpha/user_event_service_client.ts @@ -776,7 +776,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('writeUserEvent request %j', request); const wrappedCallback: | Callback< @@ -918,7 +920,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('collectUserEvent request %j', request); const wrappedCallback: | Callback< @@ -1088,7 +1092,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1271,7 +1277,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1511,7 +1519,7 @@ export class UserEventServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client.ts index a0768067e5b..b10126a5ea9 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client.ts @@ -860,7 +860,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('completeQuery request %j', request); const wrappedCallback: | Callback< @@ -1047,7 +1049,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ completion_config: request.completionConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('advancedCompleteQuery request %j', request); const wrappedCallback: | Callback< @@ -1193,7 +1197,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1369,7 +1375,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1555,7 +1563,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1732,7 +1742,9 @@ export class CompletionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1972,7 +1984,7 @@ export class CompletionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/control_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/control_service_client.ts index 1119bd01ebf..ccf71542254 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/control_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/control_service_client.ts @@ -656,7 +656,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createControl request %j', request); const wrappedCallback: | Callback< @@ -785,7 +787,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteControl request %j', request); const wrappedCallback: | Callback< @@ -923,7 +927,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ 'control.name': request.control!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateControl request %j', request); const wrappedCallback: | Callback< @@ -1043,7 +1049,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getControl request %j', request); const wrappedCallback: | Callback< @@ -1182,7 +1190,9 @@ export class ControlServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListControlsRequest, @@ -1258,7 +1268,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls stream %j', request); return this.descriptors.page.listControls.createStream( this.innerApiCalls.listControls as GaxCall, @@ -1316,7 +1328,9 @@ export class ControlServiceClient { }); const defaultCallSettings = this._defaults['listControls']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listControls iterate %j', request); return this.descriptors.page.listControls.asyncIterate( this.innerApiCalls['listControls'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1beta/conversational_search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/conversational_search_service_client.ts index 44a88748ba4..1e897e6f05d 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/conversational_search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/conversational_search_service_client.ts @@ -706,7 +706,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('converseConversation request %j', request); const wrappedCallback: | Callback< @@ -837,7 +839,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createConversation request %j', request); const wrappedCallback: | Callback< @@ -966,7 +970,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteConversation request %j', request); const wrappedCallback: | Callback< @@ -1104,7 +1110,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ 'conversation.name': request.conversation!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateConversation request %j', request); const wrappedCallback: | Callback< @@ -1230,7 +1238,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getConversation request %j', request); const wrappedCallback: | Callback< @@ -1422,7 +1432,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('answerQuery request %j', request); const wrappedCallback: | Callback< @@ -1542,7 +1554,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAnswer request %j', request); const wrappedCallback: | Callback< @@ -1673,7 +1687,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSession request %j', request); const wrappedCallback: | Callback< @@ -1802,7 +1818,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSession request %j', request); const wrappedCallback: | Callback< @@ -1939,7 +1957,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ 'session.name': request.session!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSession request %j', request); const wrappedCallback: | Callback< @@ -2059,7 +2079,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSession request %j', request); const wrappedCallback: | Callback< @@ -2207,7 +2229,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListConversationsRequest, @@ -2292,7 +2316,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations stream %j', request); return this.descriptors.page.listConversations.createStream( this.innerApiCalls.listConversations as GaxCall, @@ -2359,7 +2385,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listConversations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listConversations iterate %j', request); return this.descriptors.page.listConversations.asyncIterate( this.innerApiCalls['listConversations'] as GaxCall, @@ -2482,7 +2510,9 @@ export class ConversationalSearchServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListSessionsRequest, @@ -2567,7 +2597,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions stream %j', request); return this.descriptors.page.listSessions.createStream( this.innerApiCalls.listSessions as GaxCall, @@ -2634,7 +2666,9 @@ export class ConversationalSearchServiceClient { }); const defaultCallSettings = this._defaults['listSessions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSessions iterate %j', request); return this.descriptors.page.listSessions.asyncIterate( this.innerApiCalls['listSessions'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1beta/data_store_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/data_store_service_client.ts index 500cf83597a..8a971aed551 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/data_store_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/data_store_service_client.ts @@ -794,7 +794,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDataStore request %j', request); const wrappedCallback: | Callback< @@ -933,7 +935,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ 'data_store.name': request.dataStore!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDataStore request %j', request); const wrappedCallback: | Callback< @@ -1099,7 +1103,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1275,7 +1281,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1461,7 +1469,9 @@ export class DataStoreServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListDataStoresRequest, @@ -1549,7 +1559,9 @@ export class DataStoreServiceClient { }); const defaultCallSettings = this._defaults['listDataStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStores stream %j', request); return this.descriptors.page.listDataStores.createStream( this.innerApiCalls.listDataStores as GaxCall, @@ -1619,7 +1631,9 @@ export class DataStoreServiceClient { }); const defaultCallSettings = this._defaults['listDataStores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDataStores iterate %j', request); return this.descriptors.page.listDataStores.asyncIterate( this.innerApiCalls['listDataStores'] as GaxCall, @@ -1799,7 +1813,7 @@ export class DataStoreServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts index f254d07c163..3128286f0ca 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts @@ -803,7 +803,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -950,7 +952,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createDocument request %j', request); const wrappedCallback: | Callback< @@ -1091,7 +1095,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ 'document.name': request.document!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDocument request %j', request); const wrappedCallback: | Callback< @@ -1225,7 +1231,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteDocument request %j', request); const wrappedCallback: | Callback< @@ -1356,7 +1364,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('batchGetDocumentsMetadata request %j', request); const wrappedCallback: | Callback< @@ -1584,7 +1594,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1784,7 +1796,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1967,7 +1981,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListDocumentsRequest, @@ -2053,7 +2069,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -2121,7 +2139,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -2301,7 +2321,7 @@ export class DocumentServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/engine_service_client.ts index 83dda716bb8..e55063ab0ca 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/engine_service_client.ts @@ -813,7 +813,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ 'engine.name': request.engine!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateEngine request %j', request); const wrappedCallback: | Callback< @@ -934,7 +936,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEngine request %j', request); const wrappedCallback: | Callback< @@ -1063,7 +1067,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('pauseEngine request %j', request); const wrappedCallback: | Callback< @@ -1192,7 +1198,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resumeEngine request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1345,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1513,7 +1523,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1684,7 +1696,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1851,7 +1865,9 @@ export class EngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListEnginesRequest, @@ -1920,7 +1936,9 @@ export class EngineServiceClient { }); const defaultCallSettings = this._defaults['listEngines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEngines stream %j', request); return this.descriptors.page.listEngines.createStream( this.innerApiCalls.listEngines as GaxCall, @@ -1971,7 +1989,9 @@ export class EngineServiceClient { }); const defaultCallSettings = this._defaults['listEngines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEngines iterate %j', request); return this.descriptors.page.listEngines.asyncIterate( this.innerApiCalls['listEngines'] as GaxCall, @@ -2151,7 +2171,7 @@ export class EngineServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/evaluation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/evaluation_service_client.ts index fa9021b5644..66ad722a664 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/evaluation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/evaluation_service_client.ts @@ -788,7 +788,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvaluation request %j', request); const wrappedCallback: | Callback< @@ -927,7 +929,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1110,7 +1114,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListEvaluationsRequest, @@ -1195,7 +1201,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations stream %j', request); return this.descriptors.page.listEvaluations.createStream( this.innerApiCalls.listEvaluations as GaxCall, @@ -1262,7 +1270,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations iterate %j', request); return this.descriptors.page.listEvaluations.asyncIterate( this.innerApiCalls['listEvaluations'] as GaxCall, @@ -1383,7 +1393,9 @@ export class EvaluationServiceClient { this._gaxModule.routingHeader.fromParams({ evaluation: request.evaluation ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListEvaluationResultsRequest, @@ -1466,7 +1478,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluationResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluationResults stream %j', request); return this.descriptors.page.listEvaluationResults.createStream( this.innerApiCalls.listEvaluationResults as GaxCall, @@ -1531,7 +1545,9 @@ export class EvaluationServiceClient { }); const defaultCallSettings = this._defaults['listEvaluationResults']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluationResults iterate %j', request); return this.descriptors.page.listEvaluationResults.asyncIterate( this.innerApiCalls['listEvaluationResults'] as GaxCall, @@ -1711,7 +1727,7 @@ export class EvaluationServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/grounded_generation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/grounded_generation_service_client.ts index 237e0e8a2f6..49673ee6333 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/grounded_generation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/grounded_generation_service_client.ts @@ -680,7 +680,9 @@ export class GroundedGenerationServiceClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateGroundedContent request %j', request); const wrappedCallback: | Callback< @@ -831,7 +833,9 @@ export class GroundedGenerationServiceClient { this._gaxModule.routingHeader.fromParams({ grounding_config: request.groundingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('checkGrounding request %j', request); const wrappedCallback: | Callback< @@ -879,7 +883,9 @@ export class GroundedGenerationServiceClient { * region_tag:discoveryengine_v1beta_generated_GroundedGenerationService_StreamGenerateGroundedContent_async */ streamGenerateGroundedContent(options?: CallOptions): gax.CancellableStream { - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('streamGenerateGroundedContent stream %j', options); return this.innerApiCalls.streamGenerateGroundedContent(null, options); } diff --git a/packages/google-cloud-discoveryengine/src/v1beta/project_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/project_service_client.ts index 5dbc1f52c2e..82f2c1d4fa8 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/project_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/project_service_client.ts @@ -773,7 +773,9 @@ export class ProjectServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1013,7 +1015,7 @@ export class ProjectServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/rank_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/rank_service_client.ts index 02077a12625..aed91a4230d 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/rank_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/rank_service_client.ts @@ -647,7 +647,9 @@ export class RankServiceClient { this._gaxModule.routingHeader.fromParams({ ranking_config: request.rankingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('rank request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts index e2979b3eb40..cf2437de974 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts @@ -724,7 +724,9 @@ export class RecommendationServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recommend request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-discoveryengine/src/v1beta/sample_query_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/sample_query_service_client.ts index 492cb98d05c..cb358b35303 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/sample_query_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/sample_query_service_client.ts @@ -782,7 +782,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -930,7 +932,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -1065,7 +1069,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ 'sample_query.name': request.sampleQuery!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -1199,7 +1205,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSampleQuery request %j', request); const wrappedCallback: | Callback< @@ -1351,7 +1359,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1534,7 +1544,9 @@ export class SampleQueryServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListSampleQueriesRequest, @@ -1619,7 +1631,9 @@ export class SampleQueryServiceClient { }); const defaultCallSettings = this._defaults['listSampleQueries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQueries stream %j', request); return this.descriptors.page.listSampleQueries.createStream( this.innerApiCalls.listSampleQueries as GaxCall, @@ -1686,7 +1700,9 @@ export class SampleQueryServiceClient { }); const defaultCallSettings = this._defaults['listSampleQueries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQueries iterate %j', request); return this.descriptors.page.listSampleQueries.asyncIterate( this.innerApiCalls['listSampleQueries'] as GaxCall, @@ -1866,7 +1882,7 @@ export class SampleQueryServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/sample_query_set_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/sample_query_set_service_client.ts index 6e8cc9131f6..d81eaded8d9 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/sample_query_set_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/sample_query_set_service_client.ts @@ -652,7 +652,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -803,7 +805,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -940,7 +944,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ 'sample_query_set.name': request.sampleQuerySet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -1077,7 +1083,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteSampleQuerySet request %j', request); const wrappedCallback: | Callback< @@ -1225,7 +1233,9 @@ export class SampleQuerySetServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListSampleQuerySetsRequest, @@ -1310,7 +1320,9 @@ export class SampleQuerySetServiceClient { }); const defaultCallSettings = this._defaults['listSampleQuerySets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQuerySets stream %j', request); return this.descriptors.page.listSampleQuerySets.createStream( this.innerApiCalls.listSampleQuerySets as GaxCall, @@ -1377,7 +1389,9 @@ export class SampleQuerySetServiceClient { }); const defaultCallSettings = this._defaults['listSampleQuerySets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSampleQuerySets iterate %j', request); return this.descriptors.page.listSampleQuerySets.asyncIterate( this.innerApiCalls['listSampleQuerySets'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client.ts index 5053004d333..67b8084bdbf 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client.ts @@ -787,7 +787,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSchema request %j', request); const wrappedCallback: | Callback< @@ -932,7 +934,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1105,7 +1109,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ 'schema.name': request.schema!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1273,7 +1279,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1448,7 +1456,9 @@ export class SchemaServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, @@ -1526,7 +1536,9 @@ export class SchemaServiceClient { }); const defaultCallSettings = this._defaults['listSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchemas stream %j', request); return this.descriptors.page.listSchemas.createStream( this.innerApiCalls.listSchemas as GaxCall, @@ -1586,7 +1598,9 @@ export class SchemaServiceClient { }); const defaultCallSettings = this._defaults['listSchemas']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSchemas iterate %j', request); return this.descriptors.page.listSchemas.asyncIterate( this.innerApiCalls['listSchemas'] as GaxCall, @@ -1766,7 +1780,7 @@ export class SchemaServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/search_service_client.ts index e8100707be8..ccbabf6a6e1 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/search_service_client.ts @@ -911,7 +911,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.ISearchRequest, @@ -1244,7 +1246,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search stream %j', request); return this.descriptors.page.search.createStream( this.innerApiCalls.search as GaxCall, @@ -1559,7 +1563,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['search']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('search iterate %j', request); return this.descriptors.page.search.asyncIterate( this.innerApiCalls['search'] as GaxCall, @@ -1941,7 +1947,9 @@ export class SearchServiceClient { this._gaxModule.routingHeader.fromParams({ serving_config: request.servingConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.ISearchRequest, @@ -2274,7 +2282,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['searchLite']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchLite stream %j', request); return this.descriptors.page.searchLite.createStream( this.innerApiCalls.searchLite as GaxCall, @@ -2589,7 +2599,9 @@ export class SearchServiceClient { }); const defaultCallSettings = this._defaults['searchLite']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchLite iterate %j', request); return this.descriptors.page.searchLite.asyncIterate( this.innerApiCalls['searchLite'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1beta/search_tuning_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/search_tuning_service_client.ts index 9c0df4cb365..1e26ece35b7 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/search_tuning_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/search_tuning_service_client.ts @@ -754,7 +754,9 @@ export class SearchTuningServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listCustomModels request %j', request); const wrappedCallback: | Callback< @@ -899,7 +901,9 @@ export class SearchTuningServiceClient { this._gaxModule.routingHeader.fromParams({ data_store: request.dataStore ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1139,7 +1143,7 @@ export class SearchTuningServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/serving_config_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/serving_config_service_client.ts index 5f8a588ef7a..0e0aca05941 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/serving_config_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/serving_config_service_client.ts @@ -646,7 +646,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ 'serving_config.name': request.servingConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateServingConfig request %j', request); const wrappedCallback: | Callback< @@ -774,7 +776,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServingConfig request %j', request); const wrappedCallback: | Callback< @@ -905,7 +909,9 @@ export class ServingConfigServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListServingConfigsRequest, @@ -974,7 +980,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs stream %j', request); return this.descriptors.page.listServingConfigs.createStream( this.innerApiCalls.listServingConfigs as GaxCall, @@ -1025,7 +1033,9 @@ export class ServingConfigServiceClient { }); const defaultCallSettings = this._defaults['listServingConfigs']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listServingConfigs iterate %j', request); return this.descriptors.page.listServingConfigs.asyncIterate( this.innerApiCalls['listServingConfigs'] as GaxCall, diff --git a/packages/google-cloud-discoveryengine/src/v1beta/site_search_engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/site_search_engine_service_client.ts index 78b93bcb8c2..d2fc0349ef7 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/site_search_engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/site_search_engine_service_client.ts @@ -909,7 +909,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSiteSearchEngine request %j', request); const wrappedCallback: | Callback< @@ -1044,7 +1046,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTargetSite request %j', request); const wrappedCallback: | Callback< @@ -1178,7 +1182,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchSitemaps request %j', request); const wrappedCallback: | Callback< @@ -1315,7 +1321,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1489,7 +1497,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1662,7 +1672,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ 'target_site.name': request.targetSite!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1839,7 +1851,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2012,7 +2026,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2188,7 +2204,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2358,7 +2376,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2528,7 +2548,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2707,7 +2729,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2877,7 +2901,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3054,7 +3080,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IListTargetSitesRequest, @@ -3133,7 +3161,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['listTargetSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetSites stream %j', request); return this.descriptors.page.listTargetSites.createStream( this.innerApiCalls.listTargetSites as GaxCall, @@ -3194,7 +3224,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['listTargetSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTargetSites iterate %j', request); return this.descriptors.page.listTargetSites.asyncIterate( this.innerApiCalls['listTargetSites'] as GaxCall, @@ -3309,7 +3341,9 @@ export class SiteSearchEngineServiceClient { this._gaxModule.routingHeader.fromParams({ site_search_engine: request.siteSearchEngine ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.discoveryengine.v1beta.IFetchDomainVerificationStatusRequest, @@ -3385,7 +3419,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['fetchDomainVerificationStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDomainVerificationStatus stream %j', request); return this.descriptors.page.fetchDomainVerificationStatus.createStream( this.innerApiCalls.fetchDomainVerificationStatus as GaxCall, @@ -3443,7 +3479,9 @@ export class SiteSearchEngineServiceClient { }); const defaultCallSettings = this._defaults['fetchDomainVerificationStatus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchDomainVerificationStatus iterate %j', request); return this.descriptors.page.fetchDomainVerificationStatus.asyncIterate( this.innerApiCalls['fetchDomainVerificationStatus'] as GaxCall, @@ -3623,7 +3661,7 @@ export class SiteSearchEngineServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts index 19307633b4e..85e6d2a5be9 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts @@ -778,7 +778,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('writeUserEvent request %j', request); const wrappedCallback: | Callback< @@ -920,7 +922,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('collectUserEvent request %j', request); const wrappedCallback: | Callback< @@ -1090,7 +1094,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1273,7 +1279,9 @@ export class UserEventServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1513,7 +1521,7 @@ export class UserEventServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-discoveryengine/test/gapic_acl_config_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_acl_config_service_v1alpha.ts index 7127361aa43..bd93701ce5d 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_acl_config_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_acl_config_service_v1alpha.ts @@ -220,7 +220,9 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.aclConfigServiceStub); client.close().then(() => { done(); @@ -279,7 +281,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateAclConfigRequest() ); @@ -311,7 +313,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateAclConfigRequest() ); @@ -359,7 +361,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateAclConfigRequest() ); @@ -391,7 +393,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateAclConfigRequest() ); @@ -413,7 +415,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAclConfigRequest() ); @@ -444,7 +446,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAclConfigRequest() ); @@ -491,7 +493,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAclConfigRequest() ); @@ -522,7 +524,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAclConfigRequest() ); @@ -542,7 +544,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -572,7 +574,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -616,7 +618,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -651,7 +653,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -699,7 +701,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -736,7 +738,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -746,7 +748,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -785,7 +787,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -797,7 +799,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -861,7 +863,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -872,7 +874,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -925,7 +927,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -934,7 +936,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -963,7 +965,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -975,7 +977,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1064,7 +1066,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1079,7 +1081,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1210,7 +1212,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1226,7 +1228,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1375,7 +1377,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1389,7 +1391,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1501,7 +1503,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1515,7 +1517,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1628,7 +1630,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1642,7 +1644,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1755,7 +1757,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1768,7 +1770,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1863,7 +1865,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1877,7 +1879,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -1989,7 +1991,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2003,7 +2005,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2116,7 +2118,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2130,7 +2132,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2242,7 +2244,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2257,7 +2259,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2388,7 +2390,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2401,7 +2403,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2496,7 +2498,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2510,7 +2512,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2623,7 +2625,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2636,7 +2638,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2748,7 +2750,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2762,7 +2764,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2874,7 +2876,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -2888,7 +2890,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3000,7 +3002,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3013,7 +3015,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3125,7 +3127,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3140,7 +3142,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3270,7 +3272,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3281,7 +3283,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3349,7 +3351,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3362,7 +3364,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3474,7 +3476,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3489,7 +3491,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3619,7 +3621,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3631,7 +3633,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3714,7 +3716,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3726,7 +3728,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3820,7 +3822,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3833,7 +3835,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3927,7 +3929,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3939,7 +3941,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4016,7 +4018,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4028,7 +4030,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4109,7 +4111,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4121,7 +4123,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4215,7 +4217,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4227,7 +4229,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4310,7 +4312,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4323,7 +4325,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4435,7 +4437,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4447,7 +4449,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4523,7 +4525,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4536,7 +4538,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4631,7 +4633,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4643,7 +4645,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4707,7 +4709,7 @@ describe('v1alpha.AclConfigServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -4718,7 +4720,7 @@ describe('v1alpha.AclConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_chunk_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_chunk_service_v1alpha.ts index b23625c2923..b0ad66a4437 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_chunk_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_chunk_service_v1alpha.ts @@ -255,7 +255,9 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.chunkServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetChunkRequest() ); @@ -345,7 +347,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetChunkRequest() ); @@ -392,7 +394,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetChunkRequest() ); @@ -420,7 +422,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetChunkRequest() ); @@ -441,7 +443,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListChunksRequest() ); @@ -480,7 +482,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListChunksRequest() ); @@ -535,7 +537,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListChunksRequest() ); @@ -566,7 +568,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListChunksRequest() ); @@ -627,7 +629,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListChunksRequest() ); @@ -679,7 +681,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListChunksRequest() ); @@ -729,7 +731,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListChunksRequest() ); @@ -773,7 +775,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -803,7 +805,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -847,7 +849,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -882,7 +884,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -930,7 +932,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -967,7 +969,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -977,7 +979,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1016,7 +1018,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1028,7 +1030,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1092,7 +1094,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1103,7 +1105,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1156,7 +1158,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1165,7 +1167,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1194,7 +1196,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1206,7 +1208,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1295,7 +1297,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1310,7 +1312,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1441,7 +1443,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1457,7 +1459,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1606,7 +1608,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1620,7 +1622,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1732,7 +1734,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1746,7 +1748,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1859,7 +1861,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1873,7 +1875,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1986,7 +1988,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1999,7 +2001,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2094,7 +2096,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2108,7 +2110,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2220,7 +2222,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2234,7 +2236,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2347,7 +2349,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2361,7 +2363,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2473,7 +2475,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2488,7 +2490,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2619,7 +2621,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2632,7 +2634,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2727,7 +2729,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2741,7 +2743,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2854,7 +2856,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2867,7 +2869,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2979,7 +2981,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2993,7 +2995,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3105,7 +3107,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3119,7 +3121,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3231,7 +3233,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3244,7 +3246,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3356,7 +3358,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3371,7 +3373,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3501,7 +3503,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3512,7 +3514,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3580,7 +3582,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3593,7 +3595,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3705,7 +3707,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3720,7 +3722,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3850,7 +3852,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3862,7 +3864,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3945,7 +3947,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3957,7 +3959,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4051,7 +4053,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4064,7 +4066,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4158,7 +4160,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4170,7 +4172,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4247,7 +4249,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4259,7 +4261,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4340,7 +4342,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4352,7 +4354,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4446,7 +4448,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4458,7 +4460,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4541,7 +4543,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4554,7 +4556,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4666,7 +4668,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4678,7 +4680,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4754,7 +4756,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4767,7 +4769,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4862,7 +4864,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4874,7 +4876,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4938,7 +4940,7 @@ describe('v1alpha.ChunkServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -4949,7 +4951,7 @@ describe('v1alpha.ChunkServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts index d4d8d2b7d65..32e04ec2cd5 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts @@ -253,7 +253,9 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CompleteQueryRequest() ); @@ -343,7 +345,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CompleteQueryRequest() ); @@ -390,7 +392,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CompleteQueryRequest() ); @@ -421,7 +423,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CompleteQueryRequest() ); @@ -442,7 +444,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest() ); @@ -475,7 +477,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest() ); @@ -529,7 +531,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest() ); @@ -561,7 +563,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest() ); @@ -591,7 +593,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -614,7 +616,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -635,7 +637,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest() ); @@ -668,7 +670,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest() ); @@ -722,7 +724,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest() ); @@ -756,7 +758,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest() ); @@ -789,7 +791,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -812,7 +814,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -833,7 +835,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() ); @@ -866,7 +868,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() ); @@ -920,7 +922,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() ); @@ -954,7 +956,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() ); @@ -987,7 +989,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1010,7 +1012,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1031,7 +1033,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() ); @@ -1064,7 +1066,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() ); @@ -1152,7 +1154,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() ); @@ -1185,7 +1187,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1208,7 +1210,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1228,7 +1230,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1258,7 +1260,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1385,7 +1387,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1426,7 +1428,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1505,7 +1507,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1585,7 +1587,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1681,8 +1683,7 @@ describe('v1.CompletionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1701,7 +1702,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1710,8 +1711,7 @@ describe('v1.CompletionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1727,7 +1727,7 @@ describe('v1.CompletionServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1739,7 +1739,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1803,7 +1803,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1812,7 +1812,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1841,7 +1841,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1853,7 +1853,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1942,7 +1942,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1957,7 +1957,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2088,7 +2088,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2104,7 +2104,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2253,7 +2253,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2267,7 +2267,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2379,7 +2379,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2393,7 +2393,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2506,7 +2506,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2520,7 +2520,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2633,7 +2633,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2646,7 +2646,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2741,7 +2741,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2755,7 +2755,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2867,7 +2867,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2881,7 +2881,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2993,7 +2993,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3008,7 +3008,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3139,7 +3139,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3152,7 +3152,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3247,7 +3247,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3261,7 +3261,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3374,7 +3374,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3387,7 +3387,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3499,7 +3499,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3513,7 +3513,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3625,7 +3625,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3638,7 +3638,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3750,7 +3750,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3765,7 +3765,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3895,7 +3895,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3906,7 +3906,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3974,7 +3974,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3987,7 +3987,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4099,7 +4099,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4114,7 +4114,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4244,7 +4244,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4256,7 +4256,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4339,7 +4339,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4351,7 +4351,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4445,7 +4445,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4458,7 +4458,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4552,7 +4552,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4564,7 +4564,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4641,7 +4641,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4653,7 +4653,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4734,7 +4734,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4746,7 +4746,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4829,7 +4829,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4842,7 +4842,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4954,7 +4954,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4966,7 +4966,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5042,7 +5042,7 @@ describe('v1.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5055,7 +5055,7 @@ describe('v1.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1alpha.ts index 7f00f305a6e..35806001dae 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1alpha.ts @@ -262,7 +262,9 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionServiceStub); client.close().then(() => { done(); @@ -325,7 +327,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest() ); @@ -357,7 +359,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest() ); @@ -405,7 +407,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest() ); @@ -437,7 +439,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest() ); @@ -459,7 +461,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesRequest() ); @@ -493,7 +495,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesRequest() ); @@ -548,7 +550,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesRequest() ); @@ -581,7 +583,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesRequest() ); @@ -612,7 +614,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -636,7 +638,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -658,7 +660,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeSuggestionDenyListEntriesRequest() ); @@ -692,7 +694,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeSuggestionDenyListEntriesRequest() ); @@ -747,7 +749,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeSuggestionDenyListEntriesRequest() ); @@ -782,7 +784,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeSuggestionDenyListEntriesRequest() ); @@ -816,7 +818,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -840,7 +842,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -862,7 +864,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsRequest() ); @@ -896,7 +898,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsRequest() ); @@ -951,7 +953,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsRequest() ); @@ -986,7 +988,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportCompletionSuggestionsRequest() ); @@ -1020,7 +1022,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1044,7 +1046,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1066,7 +1068,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeCompletionSuggestionsRequest() ); @@ -1100,7 +1102,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeCompletionSuggestionsRequest() ); @@ -1155,7 +1157,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeCompletionSuggestionsRequest() ); @@ -1190,7 +1192,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeCompletionSuggestionsRequest() ); @@ -1224,7 +1226,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1248,7 +1250,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1269,7 +1271,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1300,7 +1302,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1345,7 +1347,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1381,7 +1383,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1430,7 +1432,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1472,7 +1474,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1554,7 +1556,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1637,7 +1639,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1736,8 +1738,7 @@ describe('v1alpha.CompletionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1757,7 +1758,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1766,8 +1767,7 @@ describe('v1alpha.CompletionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1783,7 +1783,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1794,7 +1794,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1833,7 +1833,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1846,7 +1846,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1910,7 +1910,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1922,7 +1922,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1975,7 +1975,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1985,7 +1985,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2014,7 +2014,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2027,7 +2027,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2116,7 +2116,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2132,7 +2132,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2263,7 +2263,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2280,7 +2280,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2429,7 +2429,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2444,7 +2444,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2556,7 +2556,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2571,7 +2571,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2684,7 +2684,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2699,7 +2699,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2812,7 +2812,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2826,7 +2826,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2921,7 +2921,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2936,7 +2936,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3048,7 +3048,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3063,7 +3063,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3176,7 +3176,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3191,7 +3191,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3303,7 +3303,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3319,7 +3319,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3450,7 +3450,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3464,7 +3464,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3559,7 +3559,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3574,7 +3574,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3687,7 +3687,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3701,7 +3701,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3813,7 +3813,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3828,7 +3828,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3940,7 +3940,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3955,7 +3955,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4067,7 +4067,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4081,7 +4081,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4193,7 +4193,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4209,7 +4209,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4339,7 +4339,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4351,7 +4351,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4419,7 +4419,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4433,7 +4433,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4545,7 +4545,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4561,7 +4561,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4691,7 +4691,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4704,7 +4704,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4787,7 +4787,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4800,7 +4800,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4894,7 +4894,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4908,7 +4908,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5002,7 +5002,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5015,7 +5015,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5092,7 +5092,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5105,7 +5105,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5186,7 +5186,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5199,7 +5199,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5293,7 +5293,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5306,7 +5306,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5389,7 +5389,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5403,7 +5403,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5515,7 +5515,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5528,7 +5528,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5604,7 +5604,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5618,7 +5618,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5713,7 +5713,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5726,7 +5726,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5790,7 +5790,7 @@ describe('v1alpha.CompletionServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5802,7 +5802,7 @@ describe('v1alpha.CompletionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1beta.ts index 891e78a957a..c11bdcab954 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1beta.ts @@ -263,7 +263,9 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.completionServiceStub); client.close().then(() => { done(); @@ -330,7 +332,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() ); @@ -363,7 +365,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() ); @@ -412,7 +414,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() ); @@ -445,7 +447,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() ); @@ -468,7 +470,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest() ); @@ -502,7 +504,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest() ); @@ -551,7 +553,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest() ); @@ -587,7 +589,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest() ); @@ -613,7 +615,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest() ); @@ -648,7 +650,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest() ); @@ -704,7 +706,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest() ); @@ -738,7 +740,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest() ); @@ -770,7 +772,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -795,7 +797,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -818,7 +820,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest() ); @@ -853,7 +855,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest() ); @@ -909,7 +911,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest() ); @@ -945,7 +947,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest() ); @@ -980,7 +982,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1005,7 +1007,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1028,7 +1030,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest() ); @@ -1063,7 +1065,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest() ); @@ -1119,7 +1121,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest() ); @@ -1155,7 +1157,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest() ); @@ -1190,7 +1192,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1215,7 +1217,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1238,7 +1240,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest() ); @@ -1273,7 +1275,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest() ); @@ -1329,7 +1331,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest() ); @@ -1365,7 +1367,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest() ); @@ -1400,7 +1402,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1425,7 +1427,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1447,7 +1449,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1479,7 +1481,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1525,7 +1527,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1562,7 +1564,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1612,7 +1614,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1655,7 +1657,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1740,7 +1742,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1826,7 +1828,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1928,8 +1930,7 @@ describe('v1beta.CompletionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1950,7 +1951,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1959,8 +1960,7 @@ describe('v1beta.CompletionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1976,7 +1976,7 @@ describe('v1beta.CompletionServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1990,7 +1990,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2054,7 +2054,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2067,7 +2067,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2120,7 +2120,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2133,7 +2133,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2187,7 +2187,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2198,7 +2198,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2227,7 +2227,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2241,7 +2241,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2330,7 +2330,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2347,7 +2347,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2478,7 +2478,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2496,7 +2496,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2645,7 +2645,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCompletionConfig', () => { + describe('projectLocationCollectionDataStoreCompletionConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCompletionConfig'; const expectedParameters = { @@ -2660,7 +2660,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCompletionConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCompletionConfigPathTemplate.match = @@ -2755,7 +2755,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2771,7 +2771,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2883,7 +2883,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2899,7 +2899,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3012,7 +3012,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3028,7 +3028,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3141,7 +3141,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3156,7 +3156,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3251,7 +3251,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3267,7 +3267,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3379,7 +3379,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3395,7 +3395,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3508,7 +3508,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3524,7 +3524,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3636,7 +3636,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3653,7 +3653,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3784,7 +3784,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3799,7 +3799,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3894,7 +3894,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3910,7 +3910,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -4023,7 +4023,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4039,7 +4039,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4152,7 +4152,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineCompletionConfig', () => { + describe('projectLocationCollectionEngineCompletionConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineCompletionConfig'; const expectedParameters = { @@ -4167,7 +4167,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineCompletionConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineCompletionConfigPathTemplate.match = @@ -4262,7 +4262,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4277,7 +4277,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4389,7 +4389,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4405,7 +4405,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4517,7 +4517,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4533,7 +4533,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4645,7 +4645,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4660,7 +4660,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4772,7 +4772,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4789,7 +4789,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4919,7 +4919,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4932,7 +4932,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5000,7 +5000,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5015,7 +5015,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5127,7 +5127,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5144,7 +5144,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5274,7 +5274,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreCompletionConfig', () => { + describe('projectLocationDataStoreCompletionConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCompletionConfig'; const expectedParameters = { @@ -5288,7 +5288,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCompletionConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCompletionConfigPathTemplate.match = @@ -5364,7 +5364,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5378,7 +5378,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5461,7 +5461,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5475,7 +5475,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5569,7 +5569,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5584,7 +5584,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5678,7 +5678,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5692,7 +5692,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5769,7 +5769,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5783,7 +5783,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5864,7 +5864,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5878,7 +5878,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5972,7 +5972,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5986,7 +5986,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6069,7 +6069,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6084,7 +6084,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6196,7 +6196,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6210,7 +6210,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6286,7 +6286,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -6301,7 +6301,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -6396,7 +6396,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6411,7 +6411,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6506,7 +6506,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6520,7 +6520,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6584,7 +6584,7 @@ describe('v1beta.CompletionServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6597,7 +6597,7 @@ describe('v1beta.CompletionServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts index 97bd8c47667..948a75fd655 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts @@ -255,7 +255,9 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.controlServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateControlRequest() ); @@ -345,7 +347,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateControlRequest() ); @@ -392,7 +394,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateControlRequest() ); @@ -423,7 +425,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateControlRequest() ); @@ -444,7 +446,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteControlRequest() ); @@ -475,7 +477,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteControlRequest() ); @@ -522,7 +524,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteControlRequest() ); @@ -553,7 +555,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteControlRequest() ); @@ -574,7 +576,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateControlRequest() ); @@ -606,7 +608,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateControlRequest() ); @@ -654,7 +656,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateControlRequest() ); @@ -686,7 +688,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateControlRequest() ); @@ -708,7 +710,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetControlRequest() ); @@ -739,7 +741,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetControlRequest() ); @@ -786,7 +788,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetControlRequest() ); @@ -817,7 +819,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetControlRequest() ); @@ -838,7 +840,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListControlsRequest() ); @@ -877,7 +879,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListControlsRequest() ); @@ -932,7 +934,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListControlsRequest() ); @@ -963,7 +965,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListControlsRequest() ); @@ -1023,7 +1025,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListControlsRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListControlsRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListControlsRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1194,7 +1196,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1238,7 +1240,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1273,7 +1275,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1321,7 +1323,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1358,7 +1360,7 @@ describe('v1.ControlServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1370,7 +1372,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1434,7 +1436,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1444,7 +1446,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1483,7 +1485,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1492,7 +1494,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1521,7 +1523,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1533,7 +1535,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1622,7 +1624,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1637,7 +1639,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1768,7 +1770,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1784,7 +1786,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1933,7 +1935,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1947,7 +1949,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2059,7 +2061,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2073,7 +2075,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2186,7 +2188,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2200,7 +2202,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2313,7 +2315,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2326,7 +2328,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2421,7 +2423,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2435,7 +2437,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2547,7 +2549,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2561,7 +2563,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2673,7 +2675,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2688,7 +2690,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2819,7 +2821,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2832,7 +2834,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2927,7 +2929,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2941,7 +2943,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3054,7 +3056,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3067,7 +3069,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3179,7 +3181,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3193,7 +3195,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3305,7 +3307,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3318,7 +3320,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3430,7 +3432,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3445,7 +3447,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3575,7 +3577,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3586,7 +3588,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3654,7 +3656,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3667,7 +3669,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3779,7 +3781,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3794,7 +3796,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3924,7 +3926,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3936,7 +3938,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4019,7 +4021,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4031,7 +4033,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4125,7 +4127,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4138,7 +4140,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4232,7 +4234,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4244,7 +4246,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4321,7 +4323,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4333,7 +4335,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4414,7 +4416,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4426,7 +4428,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4509,7 +4511,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4522,7 +4524,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4634,7 +4636,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4646,7 +4648,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4722,7 +4724,7 @@ describe('v1.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4735,7 +4737,7 @@ describe('v1.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1alpha.ts index 6f2381c34f3..7e86863bebb 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1alpha.ts @@ -256,7 +256,9 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.controlServiceStub); client.close().then(() => { done(); @@ -315,7 +317,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateControlRequest() ); @@ -346,7 +348,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateControlRequest() ); @@ -393,7 +395,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateControlRequest() ); @@ -424,7 +426,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateControlRequest() ); @@ -445,7 +447,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteControlRequest() ); @@ -476,7 +478,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteControlRequest() ); @@ -523,7 +525,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteControlRequest() ); @@ -554,7 +556,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteControlRequest() ); @@ -575,7 +577,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateControlRequest() ); @@ -607,7 +609,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateControlRequest() ); @@ -655,7 +657,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateControlRequest() ); @@ -687,7 +689,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateControlRequest() ); @@ -709,7 +711,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetControlRequest() ); @@ -740,7 +742,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetControlRequest() ); @@ -787,7 +789,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetControlRequest() ); @@ -818,7 +820,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetControlRequest() ); @@ -839,7 +841,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListControlsRequest() ); @@ -878,7 +880,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListControlsRequest() ); @@ -935,7 +937,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListControlsRequest() ); @@ -966,7 +968,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListControlsRequest() ); @@ -1027,7 +1029,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListControlsRequest() ); @@ -1079,7 +1081,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListControlsRequest() ); @@ -1129,7 +1131,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListControlsRequest() ); @@ -1171,7 +1173,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1201,7 +1203,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1245,7 +1247,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1280,7 +1282,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1328,7 +1330,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1365,7 +1367,7 @@ describe('v1alpha.ControlServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1375,7 +1377,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1414,7 +1416,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1426,7 +1428,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1490,7 +1492,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1501,7 +1503,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1554,7 +1556,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1564,7 +1566,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1603,7 +1605,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1612,7 +1614,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1641,7 +1643,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1653,7 +1655,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1742,7 +1744,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1757,7 +1759,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1888,7 +1890,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1904,7 +1906,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2053,7 +2055,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2067,7 +2069,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2179,7 +2181,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2193,7 +2195,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2306,7 +2308,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2320,7 +2322,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2433,7 +2435,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2446,7 +2448,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2541,7 +2543,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2555,7 +2557,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2667,7 +2669,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2681,7 +2683,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2794,7 +2796,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2808,7 +2810,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2920,7 +2922,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2935,7 +2937,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3066,7 +3068,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3079,7 +3081,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3174,7 +3176,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3188,7 +3190,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3301,7 +3303,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3314,7 +3316,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3426,7 +3428,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3440,7 +3442,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3552,7 +3554,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3566,7 +3568,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3678,7 +3680,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3691,7 +3693,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3803,7 +3805,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3818,7 +3820,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3948,7 +3950,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3959,7 +3961,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4027,7 +4029,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4040,7 +4042,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4152,7 +4154,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4167,7 +4169,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4297,7 +4299,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4309,7 +4311,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4392,7 +4394,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4404,7 +4406,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4498,7 +4500,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4511,7 +4513,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4605,7 +4607,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4617,7 +4619,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4694,7 +4696,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4706,7 +4708,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4787,7 +4789,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4799,7 +4801,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4893,7 +4895,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4905,7 +4907,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4988,7 +4990,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5001,7 +5003,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5113,7 +5115,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5125,7 +5127,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5201,7 +5203,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5214,7 +5216,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5309,7 +5311,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5321,7 +5323,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5385,7 +5387,7 @@ describe('v1alpha.ControlServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5396,7 +5398,7 @@ describe('v1alpha.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1beta.ts index ee32edf5c6a..2949b152413 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1beta.ts @@ -255,7 +255,9 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.controlServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateControlRequest() ); @@ -345,7 +347,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateControlRequest() ); @@ -392,7 +394,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateControlRequest() ); @@ -423,7 +425,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateControlRequest() ); @@ -444,7 +446,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteControlRequest() ); @@ -475,7 +477,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteControlRequest() ); @@ -522,7 +524,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteControlRequest() ); @@ -553,7 +555,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteControlRequest() ); @@ -574,7 +576,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateControlRequest() ); @@ -606,7 +608,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateControlRequest() ); @@ -654,7 +656,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateControlRequest() ); @@ -686,7 +688,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateControlRequest() ); @@ -708,7 +710,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetControlRequest() ); @@ -739,7 +741,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetControlRequest() ); @@ -786,7 +788,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetControlRequest() ); @@ -817,7 +819,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetControlRequest() ); @@ -838,7 +840,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListControlsRequest() ); @@ -877,7 +879,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListControlsRequest() ); @@ -934,7 +936,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListControlsRequest() ); @@ -965,7 +967,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListControlsRequest() ); @@ -1026,7 +1028,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListControlsRequest() ); @@ -1078,7 +1080,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListControlsRequest() ); @@ -1128,7 +1130,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListControlsRequest() ); @@ -1170,7 +1172,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1200,7 +1202,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1244,7 +1246,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1279,7 +1281,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1327,7 +1329,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1364,7 +1366,7 @@ describe('v1beta.ControlServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1376,7 +1378,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1440,7 +1442,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1451,7 +1453,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1504,7 +1506,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1515,7 +1517,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1569,7 +1571,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1579,7 +1581,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1618,7 +1620,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1627,7 +1629,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1656,7 +1658,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1668,7 +1670,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1757,7 +1759,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1772,7 +1774,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1903,7 +1905,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1919,7 +1921,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2068,7 +2070,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2082,7 +2084,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2194,7 +2196,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2208,7 +2210,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2321,7 +2323,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2335,7 +2337,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2448,7 +2450,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2461,7 +2463,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2556,7 +2558,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2570,7 +2572,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2682,7 +2684,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2696,7 +2698,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2809,7 +2811,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2823,7 +2825,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2935,7 +2937,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2950,7 +2952,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3081,7 +3083,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3094,7 +3096,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3189,7 +3191,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3203,7 +3205,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3316,7 +3318,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3330,7 +3332,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3443,7 +3445,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3456,7 +3458,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3568,7 +3570,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3582,7 +3584,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3694,7 +3696,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3708,7 +3710,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3820,7 +3822,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3833,7 +3835,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3945,7 +3947,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3960,7 +3962,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4090,7 +4092,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4101,7 +4103,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4169,7 +4171,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4182,7 +4184,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4294,7 +4296,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4309,7 +4311,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4439,7 +4441,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4451,7 +4453,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4534,7 +4536,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4546,7 +4548,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4640,7 +4642,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4653,7 +4655,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4747,7 +4749,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4759,7 +4761,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4836,7 +4838,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4848,7 +4850,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4929,7 +4931,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4941,7 +4943,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5035,7 +5037,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5047,7 +5049,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5130,7 +5132,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5143,7 +5145,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5255,7 +5257,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5267,7 +5269,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5343,7 +5345,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5356,7 +5358,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5451,7 +5453,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5464,7 +5466,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5559,7 +5561,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5571,7 +5573,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5635,7 +5637,7 @@ describe('v1beta.ControlServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5646,7 +5648,7 @@ describe('v1beta.ControlServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts index 866a012f519..db87b85d76a 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts @@ -274,7 +274,9 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationalSearchServiceStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ConverseConversationRequest() ); @@ -380,7 +382,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ConverseConversationRequest() ); @@ -430,7 +432,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ConverseConversationRequest() ); @@ -464,7 +466,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ConverseConversationRequest() ); @@ -488,7 +490,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateConversationRequest() ); @@ -523,7 +525,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateConversationRequest() ); @@ -573,7 +575,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateConversationRequest() ); @@ -607,7 +609,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateConversationRequest() ); @@ -631,7 +633,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteConversationRequest() ); @@ -666,7 +668,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteConversationRequest() ); @@ -716,7 +718,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteConversationRequest() ); @@ -750,7 +752,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteConversationRequest() ); @@ -774,7 +776,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateConversationRequest() ); @@ -810,7 +812,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateConversationRequest() ); @@ -861,7 +863,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateConversationRequest() ); @@ -896,7 +898,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateConversationRequest() ); @@ -921,7 +923,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetConversationRequest() ); @@ -955,7 +957,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetConversationRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetConversationRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetConversationRequest() ); @@ -1063,7 +1065,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.AnswerQueryRequest() ); @@ -1097,7 +1099,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.AnswerQueryRequest() ); @@ -1147,7 +1149,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.AnswerQueryRequest() ); @@ -1181,7 +1183,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.AnswerQueryRequest() ); @@ -1205,7 +1207,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetAnswerRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetAnswerRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetAnswerRequest() ); @@ -1320,7 +1322,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetAnswerRequest() ); @@ -1344,7 +1346,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSessionRequest() ); @@ -1378,7 +1380,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSessionRequest() ); @@ -1428,7 +1430,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSessionRequest() ); @@ -1462,7 +1464,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSessionRequest() ); @@ -1486,7 +1488,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSessionRequest() ); @@ -1520,7 +1522,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSessionRequest() ); @@ -1570,7 +1572,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSessionRequest() ); @@ -1604,7 +1606,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSessionRequest() ); @@ -1628,7 +1630,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSessionRequest() ); @@ -1663,7 +1665,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSessionRequest() ); @@ -1714,7 +1716,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSessionRequest() ); @@ -1749,7 +1751,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSessionRequest() ); @@ -1774,7 +1776,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSessionRequest() ); @@ -1808,7 +1810,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSessionRequest() ); @@ -1858,7 +1860,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSessionRequest() ); @@ -1892,7 +1894,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSessionRequest() ); @@ -1916,7 +1918,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListConversationsRequest() ); @@ -1958,7 +1960,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListConversationsRequest() ); @@ -2018,7 +2020,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListConversationsRequest() ); @@ -2052,7 +2054,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListConversationsRequest() ); @@ -2116,7 +2118,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListConversationsRequest() ); @@ -2169,7 +2171,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListConversationsRequest() ); @@ -2222,7 +2224,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListConversationsRequest() ); @@ -2268,7 +2270,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSessionsRequest() ); @@ -2310,7 +2312,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSessionsRequest() ); @@ -2368,7 +2370,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSessionsRequest() ); @@ -2402,7 +2404,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSessionsRequest() ); @@ -2465,7 +2467,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSessionsRequest() ); @@ -2519,7 +2521,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSessionsRequest() ); @@ -2571,7 +2573,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSessionsRequest() ); @@ -2615,7 +2617,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2648,7 +2650,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2695,7 +2697,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2733,7 +2735,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2784,7 +2786,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2821,7 +2823,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2836,7 +2838,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2900,7 +2902,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2912,7 +2914,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2941,7 +2943,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2956,7 +2958,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -3045,7 +3047,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -3063,7 +3065,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -3194,7 +3196,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3213,7 +3215,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -3362,7 +3364,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -3379,7 +3381,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3491,7 +3493,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3508,7 +3510,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3621,7 +3623,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3638,7 +3640,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3751,7 +3753,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3767,7 +3769,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3862,7 +3864,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3879,7 +3881,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3991,7 +3993,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -4008,7 +4010,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -4121,7 +4123,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -4138,7 +4140,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -4250,7 +4252,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -4268,7 +4270,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -4399,7 +4401,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4415,7 +4417,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4510,7 +4512,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4527,7 +4529,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4640,7 +4642,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4656,7 +4658,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4768,7 +4770,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4785,7 +4787,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4897,7 +4899,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4914,7 +4916,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -5026,7 +5028,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -5042,7 +5044,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -5154,7 +5156,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -5172,7 +5174,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -5302,7 +5304,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -5316,7 +5318,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5384,7 +5386,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5400,7 +5402,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5512,7 +5514,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5530,7 +5532,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5660,7 +5662,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5675,7 +5677,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5758,7 +5760,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5773,7 +5775,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5867,7 +5869,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5883,7 +5885,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5977,7 +5979,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5992,7 +5994,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -6069,7 +6071,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -6084,7 +6086,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -6165,7 +6167,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -6180,7 +6182,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -6274,7 +6276,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -6289,7 +6291,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6372,7 +6374,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6388,7 +6390,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6500,7 +6502,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6515,7 +6517,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6591,7 +6593,7 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6607,7 +6609,7 @@ describe('v1.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1alpha.ts index 0dac23c7488..20710998594 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1alpha.ts @@ -274,7 +274,9 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationalSearchServiceStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest() ); @@ -380,7 +382,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest() ); @@ -430,7 +432,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest() ); @@ -464,7 +466,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest() ); @@ -488,7 +490,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateConversationRequest() ); @@ -523,7 +525,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateConversationRequest() ); @@ -573,7 +575,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateConversationRequest() ); @@ -607,7 +609,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateConversationRequest() ); @@ -631,7 +633,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest() ); @@ -666,7 +668,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest() ); @@ -716,7 +718,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest() ); @@ -750,7 +752,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest() ); @@ -774,7 +776,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest() ); @@ -810,7 +812,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest() ); @@ -861,7 +863,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest() ); @@ -896,7 +898,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest() ); @@ -921,7 +923,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetConversationRequest() ); @@ -955,7 +957,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetConversationRequest() ); @@ -1005,7 +1007,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetConversationRequest() ); @@ -1039,7 +1041,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetConversationRequest() ); @@ -1063,7 +1065,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.AnswerQueryRequest() ); @@ -1097,7 +1099,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.AnswerQueryRequest() ); @@ -1147,7 +1149,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.AnswerQueryRequest() ); @@ -1181,7 +1183,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.AnswerQueryRequest() ); @@ -1205,7 +1207,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAnswerRequest() ); @@ -1239,7 +1241,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAnswerRequest() ); @@ -1289,7 +1291,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAnswerRequest() ); @@ -1320,7 +1322,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetAnswerRequest() ); @@ -1344,7 +1346,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSessionRequest() ); @@ -1378,7 +1380,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSessionRequest() ); @@ -1428,7 +1430,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSessionRequest() ); @@ -1462,7 +1464,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSessionRequest() ); @@ -1486,7 +1488,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSessionRequest() ); @@ -1520,7 +1522,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSessionRequest() ); @@ -1570,7 +1572,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSessionRequest() ); @@ -1604,7 +1606,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSessionRequest() ); @@ -1628,7 +1630,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSessionRequest() ); @@ -1663,7 +1665,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSessionRequest() ); @@ -1714,7 +1716,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSessionRequest() ); @@ -1749,7 +1751,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSessionRequest() ); @@ -1774,7 +1776,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSessionRequest() ); @@ -1808,7 +1810,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSessionRequest() ); @@ -1858,7 +1860,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSessionRequest() ); @@ -1892,7 +1894,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSessionRequest() ); @@ -1916,7 +1918,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListConversationsRequest() ); @@ -1958,7 +1960,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListConversationsRequest() ); @@ -2018,7 +2020,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListConversationsRequest() ); @@ -2052,7 +2054,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListConversationsRequest() ); @@ -2118,7 +2120,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListConversationsRequest() ); @@ -2173,7 +2175,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListConversationsRequest() ); @@ -2226,7 +2228,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListConversationsRequest() ); @@ -2272,7 +2274,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSessionsRequest() ); @@ -2314,7 +2316,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSessionsRequest() ); @@ -2374,7 +2376,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSessionsRequest() ); @@ -2408,7 +2410,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSessionsRequest() ); @@ -2472,7 +2474,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSessionsRequest() ); @@ -2527,7 +2529,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSessionsRequest() ); @@ -2580,7 +2582,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSessionsRequest() ); @@ -2625,7 +2627,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2658,7 +2660,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2705,7 +2707,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2743,7 +2745,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2794,7 +2796,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2831,7 +2833,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -2844,7 +2846,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2883,7 +2885,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2898,7 +2900,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2962,7 +2964,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2976,7 +2978,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3029,7 +3031,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3041,7 +3043,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3070,7 +3072,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -3085,7 +3087,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -3174,7 +3176,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -3192,7 +3194,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -3323,7 +3325,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3342,7 +3344,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -3491,7 +3493,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -3508,7 +3510,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3620,7 +3622,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3637,7 +3639,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3750,7 +3752,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3767,7 +3769,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3880,7 +3882,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3896,7 +3898,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3991,7 +3993,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -4008,7 +4010,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -4120,7 +4122,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -4137,7 +4139,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -4250,7 +4252,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -4267,7 +4269,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -4379,7 +4381,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -4397,7 +4399,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -4528,7 +4530,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4544,7 +4546,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4639,7 +4641,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4656,7 +4658,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4769,7 +4771,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4785,7 +4787,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4897,7 +4899,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4914,7 +4916,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -5026,7 +5028,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -5043,7 +5045,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -5155,7 +5157,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -5171,7 +5173,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -5283,7 +5285,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -5301,7 +5303,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -5431,7 +5433,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -5445,7 +5447,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5513,7 +5515,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5529,7 +5531,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5641,7 +5643,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5659,7 +5661,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5789,7 +5791,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5804,7 +5806,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5887,7 +5889,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5902,7 +5904,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5996,7 +5998,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -6012,7 +6014,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -6106,7 +6108,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -6121,7 +6123,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -6198,7 +6200,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -6213,7 +6215,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -6294,7 +6296,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -6309,7 +6311,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -6403,7 +6405,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -6418,7 +6420,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6501,7 +6503,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6517,7 +6519,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6629,7 +6631,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6644,7 +6646,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6720,7 +6722,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6736,7 +6738,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6831,7 +6833,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6846,7 +6848,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6910,7 +6912,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6924,7 +6926,7 @@ describe('v1alpha.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1beta.ts index 6a957a687a7..13c6b8eb091 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1beta.ts @@ -274,7 +274,9 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.conversationalSearchServiceStub); client.close().then(() => { done(); @@ -345,7 +347,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ConverseConversationRequest() ); @@ -380,7 +382,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ConverseConversationRequest() ); @@ -430,7 +432,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ConverseConversationRequest() ); @@ -464,7 +466,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ConverseConversationRequest() ); @@ -488,7 +490,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateConversationRequest() ); @@ -523,7 +525,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateConversationRequest() ); @@ -573,7 +575,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateConversationRequest() ); @@ -607,7 +609,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateConversationRequest() ); @@ -631,7 +633,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteConversationRequest() ); @@ -666,7 +668,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteConversationRequest() ); @@ -716,7 +718,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteConversationRequest() ); @@ -750,7 +752,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteConversationRequest() ); @@ -774,7 +776,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateConversationRequest() ); @@ -810,7 +812,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateConversationRequest() ); @@ -861,7 +863,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateConversationRequest() ); @@ -896,7 +898,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateConversationRequest() ); @@ -921,7 +923,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetConversationRequest() ); @@ -955,7 +957,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetConversationRequest() ); @@ -1005,7 +1007,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetConversationRequest() ); @@ -1039,7 +1041,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetConversationRequest() ); @@ -1063,7 +1065,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AnswerQueryRequest() ); @@ -1097,7 +1099,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AnswerQueryRequest() ); @@ -1147,7 +1149,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AnswerQueryRequest() ); @@ -1181,7 +1183,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.AnswerQueryRequest() ); @@ -1205,7 +1207,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetAnswerRequest() ); @@ -1239,7 +1241,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetAnswerRequest() ); @@ -1289,7 +1291,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetAnswerRequest() ); @@ -1320,7 +1322,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetAnswerRequest() ); @@ -1344,7 +1346,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSessionRequest() ); @@ -1378,7 +1380,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSessionRequest() ); @@ -1428,7 +1430,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSessionRequest() ); @@ -1462,7 +1464,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSessionRequest() ); @@ -1486,7 +1488,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSessionRequest() ); @@ -1520,7 +1522,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSessionRequest() ); @@ -1570,7 +1572,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSessionRequest() ); @@ -1604,7 +1606,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSessionRequest() ); @@ -1628,7 +1630,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSessionRequest() ); @@ -1663,7 +1665,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSessionRequest() ); @@ -1714,7 +1716,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSessionRequest() ); @@ -1749,7 +1751,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSessionRequest() ); @@ -1774,7 +1776,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSessionRequest() ); @@ -1808,7 +1810,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSessionRequest() ); @@ -1858,7 +1860,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSessionRequest() ); @@ -1892,7 +1894,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSessionRequest() ); @@ -1916,7 +1918,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListConversationsRequest() ); @@ -1958,7 +1960,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListConversationsRequest() ); @@ -2018,7 +2020,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListConversationsRequest() ); @@ -2052,7 +2054,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListConversationsRequest() ); @@ -2118,7 +2120,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListConversationsRequest() ); @@ -2173,7 +2175,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListConversationsRequest() ); @@ -2226,7 +2228,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListConversationsRequest() ); @@ -2272,7 +2274,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSessionsRequest() ); @@ -2314,7 +2316,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSessionsRequest() ); @@ -2374,7 +2376,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSessionsRequest() ); @@ -2408,7 +2410,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSessionsRequest() ); @@ -2472,7 +2474,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSessionsRequest() ); @@ -2527,7 +2529,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSessionsRequest() ); @@ -2580,7 +2582,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSessionsRequest() ); @@ -2625,7 +2627,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2658,7 +2660,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2705,7 +2707,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2743,7 +2745,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2794,7 +2796,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2831,7 +2833,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2846,7 +2848,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2910,7 +2912,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2924,7 +2926,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2977,7 +2979,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2991,7 +2993,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3045,7 +3047,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3057,7 +3059,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3086,7 +3088,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -3101,7 +3103,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -3190,7 +3192,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -3208,7 +3210,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -3339,7 +3341,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3358,7 +3360,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -3507,7 +3509,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -3524,7 +3526,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3636,7 +3638,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3653,7 +3655,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3766,7 +3768,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3783,7 +3785,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3896,7 +3898,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3912,7 +3914,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4007,7 +4009,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -4024,7 +4026,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -4136,7 +4138,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -4153,7 +4155,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -4266,7 +4268,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -4283,7 +4285,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -4395,7 +4397,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -4413,7 +4415,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -4544,7 +4546,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4560,7 +4562,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4655,7 +4657,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -4672,7 +4674,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -4785,7 +4787,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4802,7 +4804,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4915,7 +4917,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4931,7 +4933,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -5043,7 +5045,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -5060,7 +5062,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -5172,7 +5174,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -5189,7 +5191,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -5301,7 +5303,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -5317,7 +5319,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -5429,7 +5431,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -5447,7 +5449,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -5577,7 +5579,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -5591,7 +5593,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5659,7 +5661,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5675,7 +5677,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5787,7 +5789,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5805,7 +5807,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5935,7 +5937,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5950,7 +5952,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -6033,7 +6035,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -6048,7 +6050,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -6142,7 +6144,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -6158,7 +6160,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -6252,7 +6254,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -6267,7 +6269,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -6344,7 +6346,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -6359,7 +6361,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -6440,7 +6442,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -6455,7 +6457,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -6549,7 +6551,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -6564,7 +6566,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6647,7 +6649,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6663,7 +6665,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6775,7 +6777,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6790,7 +6792,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6866,7 +6868,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -6882,7 +6884,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -6977,7 +6979,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6993,7 +6995,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -7088,7 +7090,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -7103,7 +7105,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -7167,7 +7169,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -7181,7 +7183,7 @@ describe('v1beta.ConversationalSearchServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts index 61b82ff1f2d..a25e02baac0 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts @@ -292,7 +292,9 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataStoreServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDataStoreRequest() ); @@ -382,7 +384,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDataStoreRequest() ); @@ -429,7 +431,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDataStoreRequest() ); @@ -460,7 +462,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDataStoreRequest() ); @@ -481,7 +483,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDataStoreRequest() ); @@ -513,7 +515,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDataStoreRequest() ); @@ -561,7 +563,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDataStoreRequest() ); @@ -593,7 +595,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDataStoreRequest() ); @@ -615,7 +617,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDataStoreRequest() ); @@ -648,7 +650,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDataStoreRequest() ); @@ -702,7 +704,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDataStoreRequest() ); @@ -733,7 +735,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDataStoreRequest() ); @@ -766,7 +768,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -788,7 +790,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -809,7 +811,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDataStoreRequest() ); @@ -842,7 +844,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDataStoreRequest() ); @@ -896,7 +898,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDataStoreRequest() ); @@ -927,7 +929,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDataStoreRequest() ); @@ -960,7 +962,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -982,7 +984,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1003,7 +1005,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDataStoresRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDataStoresRequest() ); @@ -1097,7 +1099,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDataStoresRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDataStoresRequest() ); @@ -1189,7 +1191,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDataStoresRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDataStoresRequest() ); @@ -1288,7 +1290,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDataStoresRequest() ); @@ -1330,7 +1332,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1360,7 +1362,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1404,7 +1406,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1439,7 +1441,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1487,7 +1489,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1528,7 +1530,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1607,7 +1609,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1687,7 +1689,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1783,8 +1785,7 @@ describe('v1.DataStoreServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1803,7 +1804,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1812,8 +1813,7 @@ describe('v1.DataStoreServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1829,7 +1829,7 @@ describe('v1.DataStoreServiceClient', () => { }); describe('Path templates', () => { - describe('collection', () => { + describe('collection', async () => { const fakePath = '/rendered/path/collection'; const expectedParameters = { project: 'projectValue', @@ -1840,7 +1840,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.collectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1893,7 +1893,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1905,7 +1905,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1969,7 +1969,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1978,7 +1978,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2007,7 +2007,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2019,7 +2019,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2108,7 +2108,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2123,7 +2123,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2254,7 +2254,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2270,7 +2270,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2419,7 +2419,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2433,7 +2433,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2545,7 +2545,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2559,7 +2559,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2672,7 +2672,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2686,7 +2686,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2799,7 +2799,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2812,7 +2812,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2907,7 +2907,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2921,7 +2921,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3033,7 +3033,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3047,7 +3047,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3159,7 +3159,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3174,7 +3174,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3305,7 +3305,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3318,7 +3318,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3413,7 +3413,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3427,7 +3427,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3540,7 +3540,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3553,7 +3553,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3665,7 +3665,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3679,7 +3679,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3791,7 +3791,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3804,7 +3804,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3916,7 +3916,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3931,7 +3931,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4061,7 +4061,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4072,7 +4072,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4140,7 +4140,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4153,7 +4153,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4265,7 +4265,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4280,7 +4280,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4410,7 +4410,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4422,7 +4422,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4505,7 +4505,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4517,7 +4517,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4611,7 +4611,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4624,7 +4624,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4718,7 +4718,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4730,7 +4730,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4807,7 +4807,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4819,7 +4819,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4900,7 +4900,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4912,7 +4912,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4995,7 +4995,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5008,7 +5008,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5120,7 +5120,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5132,7 +5132,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5208,7 +5208,7 @@ describe('v1.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5221,7 +5221,7 @@ describe('v1.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1alpha.ts index 76770668f7e..551cf9b7ac3 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1alpha.ts @@ -297,7 +297,9 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataStoreServiceStub); client.close().then(() => { done(); @@ -356,7 +358,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDataStoreRequest() ); @@ -387,7 +389,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDataStoreRequest() ); @@ -434,7 +436,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDataStoreRequest() ); @@ -465,7 +467,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDataStoreRequest() ); @@ -486,7 +488,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDataStoreRequest() ); @@ -518,7 +520,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDataStoreRequest() ); @@ -566,7 +568,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDataStoreRequest() ); @@ -598,7 +600,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDataStoreRequest() ); @@ -620,7 +622,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentProcessingConfigRequest() ); @@ -652,7 +654,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentProcessingConfigRequest() ); @@ -699,7 +701,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentProcessingConfigRequest() ); @@ -733,7 +735,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentProcessingConfigRequest() ); @@ -757,7 +759,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentProcessingConfigRequest() ); @@ -790,7 +792,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentProcessingConfigRequest() ); @@ -838,7 +840,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentProcessingConfigRequest() ); @@ -873,7 +875,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentProcessingConfigRequest() ); @@ -898,7 +900,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDataStoreRequest() ); @@ -931,7 +933,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDataStoreRequest() ); @@ -985,7 +987,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDataStoreRequest() ); @@ -1016,7 +1018,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDataStoreRequest() ); @@ -1049,7 +1051,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1071,7 +1073,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1092,7 +1094,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDataStoreRequest() ); @@ -1125,7 +1127,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDataStoreRequest() ); @@ -1179,7 +1181,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDataStoreRequest() ); @@ -1210,7 +1212,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDataStoreRequest() ); @@ -1243,7 +1245,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1265,7 +1267,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1286,7 +1288,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest() ); @@ -1325,7 +1327,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest() ); @@ -1382,7 +1384,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest() ); @@ -1413,7 +1415,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest() ); @@ -1474,7 +1476,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest() ); @@ -1524,7 +1526,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest() ); @@ -1574,7 +1576,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest() ); @@ -1616,7 +1618,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1646,7 +1648,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1690,7 +1692,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1725,7 +1727,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1773,7 +1775,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1814,7 +1816,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1893,7 +1895,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1973,7 +1975,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2069,8 +2071,7 @@ describe('v1alpha.DataStoreServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2089,7 +2090,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2098,8 +2099,7 @@ describe('v1alpha.DataStoreServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2115,7 +2115,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -2125,7 +2125,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2164,7 +2164,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('collection', () => { + describe('collection', async () => { const fakePath = '/rendered/path/collection'; const expectedParameters = { project: 'projectValue', @@ -2175,7 +2175,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.collectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2228,7 +2228,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2240,7 +2240,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2304,7 +2304,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2315,7 +2315,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2368,7 +2368,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2377,7 +2377,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2406,7 +2406,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2418,7 +2418,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2507,7 +2507,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2522,7 +2522,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2653,7 +2653,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2669,7 +2669,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2818,7 +2818,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2832,7 +2832,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2944,7 +2944,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2958,7 +2958,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3071,7 +3071,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3085,7 +3085,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3198,7 +3198,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3211,7 +3211,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3306,7 +3306,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3320,7 +3320,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3432,7 +3432,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3446,7 +3446,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3559,7 +3559,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3573,7 +3573,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3685,7 +3685,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3700,7 +3700,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3831,7 +3831,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3844,7 +3844,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3939,7 +3939,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3953,7 +3953,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4066,7 +4066,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4079,7 +4079,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4191,7 +4191,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4205,7 +4205,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4317,7 +4317,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4331,7 +4331,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4443,7 +4443,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4456,7 +4456,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4568,7 +4568,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4583,7 +4583,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4713,7 +4713,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4724,7 +4724,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4792,7 +4792,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4805,7 +4805,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4917,7 +4917,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4932,7 +4932,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5062,7 +5062,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5074,7 +5074,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5157,7 +5157,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5169,7 +5169,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5263,7 +5263,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5276,7 +5276,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5370,7 +5370,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5382,7 +5382,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5459,7 +5459,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5471,7 +5471,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5552,7 +5552,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5564,7 +5564,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5658,7 +5658,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5670,7 +5670,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5753,7 +5753,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5766,7 +5766,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5878,7 +5878,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5890,7 +5890,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5966,7 +5966,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5979,7 +5979,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6074,7 +6074,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6086,7 +6086,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6150,7 +6150,7 @@ describe('v1alpha.DataStoreServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6161,7 +6161,7 @@ describe('v1alpha.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1beta.ts index 6adccb9f8e4..a8501736b5f 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1beta.ts @@ -294,7 +294,9 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.dataStoreServiceStub); client.close().then(() => { done(); @@ -353,7 +355,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDataStoreRequest() ); @@ -384,7 +386,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDataStoreRequest() ); @@ -431,7 +433,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDataStoreRequest() ); @@ -462,7 +464,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDataStoreRequest() ); @@ -483,7 +485,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest() ); @@ -515,7 +517,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest() ); @@ -563,7 +565,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest() ); @@ -595,7 +597,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest() ); @@ -617,7 +619,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest() ); @@ -650,7 +652,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest() ); @@ -704,7 +706,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest() ); @@ -735,7 +737,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest() ); @@ -768,7 +770,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -790,7 +792,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -811,7 +813,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest() ); @@ -844,7 +846,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest() ); @@ -898,7 +900,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest() ); @@ -929,7 +931,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest() ); @@ -962,7 +964,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -984,7 +986,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1005,7 +1007,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDataStoresRequest() ); @@ -1044,7 +1046,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDataStoresRequest() ); @@ -1101,7 +1103,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDataStoresRequest() ); @@ -1132,7 +1134,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDataStoresRequest() ); @@ -1193,7 +1195,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDataStoresRequest() ); @@ -1243,7 +1245,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDataStoresRequest() ); @@ -1293,7 +1295,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDataStoresRequest() ); @@ -1335,7 +1337,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1365,7 +1367,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1409,7 +1411,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1444,7 +1446,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1492,7 +1494,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1533,7 +1535,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1612,7 +1614,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1692,7 +1694,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1788,8 +1790,7 @@ describe('v1beta.DataStoreServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1808,7 +1809,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1817,8 +1818,7 @@ describe('v1beta.DataStoreServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1834,7 +1834,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); describe('Path templates', () => { - describe('collection', () => { + describe('collection', async () => { const fakePath = '/rendered/path/collection'; const expectedParameters = { project: 'projectValue', @@ -1845,7 +1845,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.collectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1898,7 +1898,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1910,7 +1910,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1974,7 +1974,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1985,7 +1985,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2038,7 +2038,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2049,7 +2049,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2103,7 +2103,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2112,7 +2112,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2141,7 +2141,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2153,7 +2153,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2242,7 +2242,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2257,7 +2257,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2388,7 +2388,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2404,7 +2404,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2553,7 +2553,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2567,7 +2567,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2679,7 +2679,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2693,7 +2693,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2806,7 +2806,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2820,7 +2820,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2933,7 +2933,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2946,7 +2946,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3041,7 +3041,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3055,7 +3055,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3167,7 +3167,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3181,7 +3181,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3294,7 +3294,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3308,7 +3308,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3420,7 +3420,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3435,7 +3435,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3566,7 +3566,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3579,7 +3579,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3674,7 +3674,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3688,7 +3688,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3801,7 +3801,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3815,7 +3815,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3928,7 +3928,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3941,7 +3941,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4053,7 +4053,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4067,7 +4067,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4179,7 +4179,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4193,7 +4193,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4305,7 +4305,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4318,7 +4318,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4430,7 +4430,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4445,7 +4445,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4575,7 +4575,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4586,7 +4586,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4654,7 +4654,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4667,7 +4667,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4779,7 +4779,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4794,7 +4794,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4924,7 +4924,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4936,7 +4936,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5019,7 +5019,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5031,7 +5031,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5125,7 +5125,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5138,7 +5138,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5232,7 +5232,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5244,7 +5244,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5321,7 +5321,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5333,7 +5333,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5414,7 +5414,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5426,7 +5426,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5520,7 +5520,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5532,7 +5532,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5615,7 +5615,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5628,7 +5628,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5740,7 +5740,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5752,7 +5752,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5828,7 +5828,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5841,7 +5841,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5936,7 +5936,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5949,7 +5949,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6044,7 +6044,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6056,7 +6056,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6120,7 +6120,7 @@ describe('v1beta.DataStoreServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6131,7 +6131,7 @@ describe('v1beta.DataStoreServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts index d26ea28fa7a..780abf35ce7 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts @@ -292,7 +292,9 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDocumentRequest() ); @@ -382,7 +384,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDocumentRequest() ); @@ -429,7 +431,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDocumentRequest() ); @@ -460,7 +462,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetDocumentRequest() ); @@ -481,7 +483,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDocumentRequest() ); @@ -512,7 +514,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDocumentRequest() ); @@ -559,7 +561,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDocumentRequest() ); @@ -590,7 +592,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateDocumentRequest() ); @@ -611,7 +613,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDocumentRequest() ); @@ -643,7 +645,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDocumentRequest() ); @@ -691,7 +693,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDocumentRequest() ); @@ -723,7 +725,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateDocumentRequest() ); @@ -745,7 +747,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDocumentRequest() ); @@ -776,7 +778,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDocumentRequest() ); @@ -823,7 +825,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDocumentRequest() ); @@ -854,7 +856,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteDocumentRequest() ); @@ -875,7 +877,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchGetDocumentsMetadataRequest() ); @@ -907,7 +909,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchGetDocumentsMetadataRequest() ); @@ -954,7 +956,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchGetDocumentsMetadataRequest() ); @@ -988,7 +990,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchGetDocumentsMetadataRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportDocumentsRequest() ); @@ -1045,7 +1047,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportDocumentsRequest() ); @@ -1099,7 +1101,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportDocumentsRequest() ); @@ -1130,7 +1132,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportDocumentsRequest() ); @@ -1163,7 +1165,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1185,7 +1187,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1206,7 +1208,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeDocumentsRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeDocumentsRequest() ); @@ -1293,7 +1295,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeDocumentsRequest() ); @@ -1324,7 +1326,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeDocumentsRequest() ); @@ -1357,7 +1359,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1379,7 +1381,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1400,7 +1402,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDocumentsRequest() ); @@ -1439,7 +1441,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDocumentsRequest() ); @@ -1494,7 +1496,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDocumentsRequest() ); @@ -1525,7 +1527,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDocumentsRequest() ); @@ -1585,7 +1587,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDocumentsRequest() ); @@ -1634,7 +1636,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDocumentsRequest() ); @@ -1683,7 +1685,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListDocumentsRequest() ); @@ -1725,7 +1727,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1755,7 +1757,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1799,7 +1801,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1834,7 +1836,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1882,7 +1884,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1923,7 +1925,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2002,7 +2004,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2082,7 +2084,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2178,8 +2180,7 @@ describe('v1.DocumentServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2198,7 +2199,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2207,8 +2208,7 @@ describe('v1.DocumentServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2224,7 +2224,7 @@ describe('v1.DocumentServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2236,7 +2236,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2300,7 +2300,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2309,7 +2309,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2338,7 +2338,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2350,7 +2350,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2439,7 +2439,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranch', () => { + describe('projectLocationCollectionDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranch'; const expectedParameters = { @@ -2453,7 +2453,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match = @@ -2565,7 +2565,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2580,7 +2580,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2711,7 +2711,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2727,7 +2727,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2876,7 +2876,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2890,7 +2890,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3002,7 +3002,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3016,7 +3016,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3129,7 +3129,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3143,7 +3143,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3256,7 +3256,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3269,7 +3269,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3364,7 +3364,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3378,7 +3378,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3490,7 +3490,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3504,7 +3504,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3616,7 +3616,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3631,7 +3631,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3762,7 +3762,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3775,7 +3775,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3870,7 +3870,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3884,7 +3884,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3997,7 +3997,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4010,7 +4010,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4122,7 +4122,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4136,7 +4136,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4248,7 +4248,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4261,7 +4261,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4373,7 +4373,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4388,7 +4388,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4518,7 +4518,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4529,7 +4529,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4597,7 +4597,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranch', () => { + describe('projectLocationDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranch'; const expectedParameters = { project: 'projectValue', @@ -4609,7 +4609,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.match = @@ -4690,7 +4690,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4703,7 +4703,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4815,7 +4815,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4830,7 +4830,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4960,7 +4960,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4972,7 +4972,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5055,7 +5055,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5067,7 +5067,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5161,7 +5161,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5174,7 +5174,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5268,7 +5268,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5280,7 +5280,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5357,7 +5357,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5369,7 +5369,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5450,7 +5450,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5462,7 +5462,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5545,7 +5545,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5558,7 +5558,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5670,7 +5670,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5682,7 +5682,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5758,7 +5758,7 @@ describe('v1.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5771,7 +5771,7 @@ describe('v1.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1alpha.ts index ae1c26878a5..5bb87cfe1e9 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1alpha.ts @@ -294,7 +294,9 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentServiceStub); client.close().then(() => { done(); @@ -353,7 +355,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentRequest() ); @@ -384,7 +386,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentRequest() ); @@ -431,7 +433,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentRequest() ); @@ -462,7 +464,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetDocumentRequest() ); @@ -483,7 +485,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest() ); @@ -514,7 +516,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest() ); @@ -561,7 +563,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest() ); @@ -592,7 +594,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest() ); @@ -613,7 +615,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest() ); @@ -645,7 +647,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest() ); @@ -693,7 +695,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest() ); @@ -725,7 +727,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest() ); @@ -747,7 +749,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest() ); @@ -778,7 +780,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest() ); @@ -825,7 +827,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest() ); @@ -856,7 +858,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest() ); @@ -877,7 +879,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest() ); @@ -909,7 +911,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest() ); @@ -956,7 +958,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest() ); @@ -987,7 +989,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest() ); @@ -1008,7 +1010,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchGetDocumentsMetadataRequest() ); @@ -1040,7 +1042,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchGetDocumentsMetadataRequest() ); @@ -1087,7 +1089,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchGetDocumentsMetadataRequest() ); @@ -1121,7 +1123,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchGetDocumentsMetadataRequest() ); @@ -1145,7 +1147,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest() ); @@ -1178,7 +1180,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest() ); @@ -1232,7 +1234,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest() ); @@ -1263,7 +1265,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest() ); @@ -1296,7 +1298,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1318,7 +1320,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1339,7 +1341,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest() ); @@ -1372,7 +1374,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest() ); @@ -1426,7 +1428,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest() ); @@ -1457,7 +1459,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest() ); @@ -1490,7 +1492,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1512,7 +1514,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1533,7 +1535,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest() ); @@ -1572,7 +1574,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest() ); @@ -1629,7 +1631,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest() ); @@ -1660,7 +1662,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest() ); @@ -1721,7 +1723,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest() ); @@ -1771,7 +1773,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest() ); @@ -1821,7 +1823,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest() ); @@ -1863,7 +1865,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1893,7 +1895,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1937,7 +1939,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1972,7 +1974,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2020,7 +2022,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2061,7 +2063,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2140,7 +2142,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2220,7 +2222,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2316,8 +2318,7 @@ describe('v1alpha.DocumentServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2336,7 +2337,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2345,8 +2346,7 @@ describe('v1alpha.DocumentServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2362,7 +2362,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -2372,7 +2372,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2411,7 +2411,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2423,7 +2423,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2487,7 +2487,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2498,7 +2498,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2551,7 +2551,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2560,7 +2560,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2589,7 +2589,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2601,7 +2601,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2690,7 +2690,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranch', () => { + describe('projectLocationCollectionDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranch'; const expectedParameters = { @@ -2704,7 +2704,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match = @@ -2816,7 +2816,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2831,7 +2831,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2962,7 +2962,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2978,7 +2978,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -3127,7 +3127,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -3141,7 +3141,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3253,7 +3253,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3267,7 +3267,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3380,7 +3380,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3394,7 +3394,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3507,7 +3507,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3520,7 +3520,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3615,7 +3615,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3629,7 +3629,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3741,7 +3741,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3755,7 +3755,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3868,7 +3868,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3882,7 +3882,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3994,7 +3994,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -4009,7 +4009,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -4140,7 +4140,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4153,7 +4153,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4248,7 +4248,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4262,7 +4262,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4375,7 +4375,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4388,7 +4388,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4500,7 +4500,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4514,7 +4514,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4626,7 +4626,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4640,7 +4640,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4752,7 +4752,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4765,7 +4765,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4877,7 +4877,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4892,7 +4892,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -5022,7 +5022,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -5033,7 +5033,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5101,7 +5101,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranch', () => { + describe('projectLocationDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranch'; const expectedParameters = { project: 'projectValue', @@ -5113,7 +5113,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.match = @@ -5194,7 +5194,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5207,7 +5207,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5319,7 +5319,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5334,7 +5334,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5464,7 +5464,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5476,7 +5476,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5559,7 +5559,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5571,7 +5571,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5665,7 +5665,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5678,7 +5678,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5772,7 +5772,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5784,7 +5784,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5861,7 +5861,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5873,7 +5873,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5954,7 +5954,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5966,7 +5966,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -6060,7 +6060,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -6072,7 +6072,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6155,7 +6155,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6168,7 +6168,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6280,7 +6280,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6292,7 +6292,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6368,7 +6368,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6381,7 +6381,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6476,7 +6476,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6488,7 +6488,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6552,7 +6552,7 @@ describe('v1alpha.DocumentServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6563,7 +6563,7 @@ describe('v1alpha.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts index 9abafcfd8a0..ef7582a26c6 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts @@ -293,7 +293,9 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentServiceStub); client.close().then(() => { done(); @@ -352,7 +354,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDocumentRequest() ); @@ -383,7 +385,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDocumentRequest() ); @@ -430,7 +432,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDocumentRequest() ); @@ -461,7 +463,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetDocumentRequest() ); @@ -482,7 +484,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDocumentRequest() ); @@ -513,7 +515,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDocumentRequest() ); @@ -560,7 +562,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDocumentRequest() ); @@ -591,7 +593,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateDocumentRequest() ); @@ -612,7 +614,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest() ); @@ -644,7 +646,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest() ); @@ -692,7 +694,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest() ); @@ -724,7 +726,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest() ); @@ -746,7 +748,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest() ); @@ -777,7 +779,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest() ); @@ -824,7 +826,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest() ); @@ -855,7 +857,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest() ); @@ -876,7 +878,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest() ); @@ -908,7 +910,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest() ); @@ -955,7 +957,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest() ); @@ -989,7 +991,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest() ); @@ -1013,7 +1015,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest() ); @@ -1046,7 +1048,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest() ); @@ -1100,7 +1102,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest() ); @@ -1131,7 +1133,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest() ); @@ -1164,7 +1166,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1186,7 +1188,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1207,7 +1209,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() ); @@ -1240,7 +1242,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() ); @@ -1294,7 +1296,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() ); @@ -1325,7 +1327,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() ); @@ -1358,7 +1360,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1380,7 +1382,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1401,7 +1403,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDocumentsRequest() ); @@ -1440,7 +1442,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDocumentsRequest() ); @@ -1497,7 +1499,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDocumentsRequest() ); @@ -1528,7 +1530,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDocumentsRequest() ); @@ -1589,7 +1591,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDocumentsRequest() ); @@ -1639,7 +1641,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDocumentsRequest() ); @@ -1689,7 +1691,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListDocumentsRequest() ); @@ -1731,7 +1733,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1761,7 +1763,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1805,7 +1807,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1840,7 +1842,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1888,7 +1890,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1929,7 +1931,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2008,7 +2010,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2088,7 +2090,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2184,8 +2186,7 @@ describe('v1beta.DocumentServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2204,7 +2205,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2213,8 +2214,7 @@ describe('v1beta.DocumentServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2230,7 +2230,7 @@ describe('v1beta.DocumentServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2242,7 +2242,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2306,7 +2306,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2317,7 +2317,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2370,7 +2370,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2381,7 +2381,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2435,7 +2435,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2444,7 +2444,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2473,7 +2473,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2485,7 +2485,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2574,7 +2574,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranch', () => { + describe('projectLocationCollectionDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranch'; const expectedParameters = { @@ -2588,7 +2588,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match = @@ -2700,7 +2700,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2715,7 +2715,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2846,7 +2846,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2862,7 +2862,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -3011,7 +3011,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -3025,7 +3025,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3137,7 +3137,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3151,7 +3151,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3264,7 +3264,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3278,7 +3278,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3391,7 +3391,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3404,7 +3404,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3499,7 +3499,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3513,7 +3513,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3625,7 +3625,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3639,7 +3639,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3752,7 +3752,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3766,7 +3766,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3878,7 +3878,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3893,7 +3893,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -4024,7 +4024,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4037,7 +4037,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4132,7 +4132,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -4146,7 +4146,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -4259,7 +4259,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4273,7 +4273,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4386,7 +4386,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4399,7 +4399,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4511,7 +4511,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4525,7 +4525,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4637,7 +4637,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4651,7 +4651,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4763,7 +4763,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4776,7 +4776,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4888,7 +4888,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4903,7 +4903,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -5033,7 +5033,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -5044,7 +5044,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5112,7 +5112,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranch', () => { + describe('projectLocationDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranch'; const expectedParameters = { project: 'projectValue', @@ -5124,7 +5124,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.match = @@ -5205,7 +5205,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5218,7 +5218,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5330,7 +5330,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5345,7 +5345,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5475,7 +5475,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5487,7 +5487,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5570,7 +5570,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5582,7 +5582,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5676,7 +5676,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5689,7 +5689,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5783,7 +5783,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5795,7 +5795,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5872,7 +5872,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5884,7 +5884,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5965,7 +5965,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5977,7 +5977,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -6071,7 +6071,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -6083,7 +6083,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6166,7 +6166,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6179,7 +6179,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6291,7 +6291,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6303,7 +6303,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6379,7 +6379,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -6392,7 +6392,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -6487,7 +6487,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6500,7 +6500,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6595,7 +6595,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6607,7 +6607,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6671,7 +6671,7 @@ describe('v1beta.DocumentServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6682,7 +6682,7 @@ describe('v1beta.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts index dd6d5ed8835..f04b2457ff0 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts @@ -292,7 +292,9 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.engineServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateEngineRequest() ); @@ -383,7 +385,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateEngineRequest() ); @@ -431,7 +433,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateEngineRequest() ); @@ -463,7 +465,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateEngineRequest() ); @@ -485,7 +487,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetEngineRequest() ); @@ -516,7 +518,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetEngineRequest() ); @@ -563,7 +565,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetEngineRequest() ); @@ -591,7 +593,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetEngineRequest() ); @@ -612,7 +614,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateEngineRequest() ); @@ -644,7 +646,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateEngineRequest() ); @@ -698,7 +700,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateEngineRequest() ); @@ -729,7 +731,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateEngineRequest() ); @@ -762,7 +764,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -784,7 +786,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -802,7 +804,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteEngineRequest() ); @@ -834,7 +836,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteEngineRequest() ); @@ -888,7 +890,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteEngineRequest() ); @@ -919,7 +921,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteEngineRequest() ); @@ -952,7 +954,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -974,7 +976,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -992,7 +994,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListEnginesRequest() ); @@ -1031,7 +1033,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListEnginesRequest() ); @@ -1086,7 +1088,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListEnginesRequest() ); @@ -1117,7 +1119,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListEnginesRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListEnginesRequest() ); @@ -1228,7 +1230,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListEnginesRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListEnginesRequest() ); @@ -1320,7 +1322,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1394,7 +1396,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1429,7 +1431,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1477,7 +1479,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1518,7 +1520,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1597,7 +1599,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1677,7 +1679,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1773,8 +1775,7 @@ describe('v1.EngineServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1793,7 +1794,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1802,8 +1803,7 @@ describe('v1.EngineServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1819,7 +1819,7 @@ describe('v1.EngineServiceClient', () => { }); describe('Path templates', () => { - describe('collection', () => { + describe('collection', async () => { const fakePath = '/rendered/path/collection'; const expectedParameters = { project: 'projectValue', @@ -1830,7 +1830,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.collectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1883,7 +1883,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1895,7 +1895,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1959,7 +1959,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1968,7 +1968,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1997,7 +1997,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2009,7 +2009,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2098,7 +2098,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2113,7 +2113,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2244,7 +2244,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2260,7 +2260,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2409,7 +2409,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2423,7 +2423,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2535,7 +2535,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2549,7 +2549,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2662,7 +2662,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2676,7 +2676,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2789,7 +2789,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2802,7 +2802,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2897,7 +2897,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2911,7 +2911,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3023,7 +3023,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3037,7 +3037,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3149,7 +3149,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3164,7 +3164,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3295,7 +3295,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3308,7 +3308,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3403,7 +3403,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3417,7 +3417,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3530,7 +3530,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3543,7 +3543,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3655,7 +3655,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3669,7 +3669,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3781,7 +3781,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3794,7 +3794,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3906,7 +3906,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3921,7 +3921,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4051,7 +4051,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4062,7 +4062,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4130,7 +4130,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4143,7 +4143,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4255,7 +4255,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4270,7 +4270,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4400,7 +4400,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4412,7 +4412,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4495,7 +4495,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4507,7 +4507,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4601,7 +4601,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4614,7 +4614,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4708,7 +4708,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4720,7 +4720,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4797,7 +4797,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4809,7 +4809,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4890,7 +4890,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4902,7 +4902,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4985,7 +4985,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4998,7 +4998,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5110,7 +5110,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5122,7 +5122,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5198,7 +5198,7 @@ describe('v1.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5211,7 +5211,7 @@ describe('v1.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1alpha.ts index 4ed9ef4948d..b09f28d9e6b 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1alpha.ts @@ -292,7 +292,9 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.engineServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateEngineRequest() ); @@ -383,7 +385,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateEngineRequest() ); @@ -431,7 +433,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateEngineRequest() ); @@ -463,7 +465,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateEngineRequest() ); @@ -485,7 +487,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEngineRequest() ); @@ -516,7 +518,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEngineRequest() ); @@ -563,7 +565,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEngineRequest() ); @@ -591,7 +593,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEngineRequest() ); @@ -612,7 +614,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PauseEngineRequest() ); @@ -643,7 +645,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PauseEngineRequest() ); @@ -690,7 +692,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PauseEngineRequest() ); @@ -721,7 +723,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PauseEngineRequest() ); @@ -742,7 +744,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ResumeEngineRequest() ); @@ -773,7 +775,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ResumeEngineRequest() ); @@ -820,7 +822,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ResumeEngineRequest() ); @@ -851,7 +853,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ResumeEngineRequest() ); @@ -872,7 +874,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEngineRequest() ); @@ -904,7 +906,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEngineRequest() ); @@ -958,7 +960,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEngineRequest() ); @@ -989,7 +991,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEngineRequest() ); @@ -1022,7 +1024,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1044,7 +1046,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1062,7 +1064,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteEngineRequest() ); @@ -1094,7 +1096,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteEngineRequest() ); @@ -1148,7 +1150,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteEngineRequest() ); @@ -1179,7 +1181,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteEngineRequest() ); @@ -1212,7 +1214,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1234,7 +1236,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1252,7 +1254,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TuneEngineRequest() ); @@ -1284,7 +1286,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TuneEngineRequest() ); @@ -1338,7 +1340,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TuneEngineRequest() ); @@ -1369,7 +1371,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TuneEngineRequest() ); @@ -1402,7 +1404,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1424,7 +1426,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1442,7 +1444,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEnginesRequest() ); @@ -1481,7 +1483,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEnginesRequest() ); @@ -1538,7 +1540,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEnginesRequest() ); @@ -1569,7 +1571,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEnginesRequest() ); @@ -1630,7 +1632,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEnginesRequest() ); @@ -1682,7 +1684,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEnginesRequest() ); @@ -1732,7 +1734,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEnginesRequest() ); @@ -1776,7 +1778,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1806,7 +1808,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1850,7 +1852,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1885,7 +1887,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1933,7 +1935,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1974,7 +1976,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2053,7 +2055,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2133,7 +2135,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2229,8 +2231,7 @@ describe('v1alpha.EngineServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2249,7 +2250,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2258,8 +2259,7 @@ describe('v1alpha.EngineServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2275,7 +2275,7 @@ describe('v1alpha.EngineServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -2285,7 +2285,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2324,7 +2324,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('collection', () => { + describe('collection', async () => { const fakePath = '/rendered/path/collection'; const expectedParameters = { project: 'projectValue', @@ -2335,7 +2335,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.collectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2388,7 +2388,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2400,7 +2400,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2464,7 +2464,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2475,7 +2475,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2528,7 +2528,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2537,7 +2537,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2566,7 +2566,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2578,7 +2578,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2667,7 +2667,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2682,7 +2682,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2813,7 +2813,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2829,7 +2829,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2978,7 +2978,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2992,7 +2992,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3104,7 +3104,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3118,7 +3118,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3231,7 +3231,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3245,7 +3245,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3358,7 +3358,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3371,7 +3371,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3466,7 +3466,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3480,7 +3480,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3592,7 +3592,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3606,7 +3606,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3719,7 +3719,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3733,7 +3733,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3845,7 +3845,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3860,7 +3860,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3991,7 +3991,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4004,7 +4004,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4099,7 +4099,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4113,7 +4113,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4226,7 +4226,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4239,7 +4239,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4351,7 +4351,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4365,7 +4365,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4477,7 +4477,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4491,7 +4491,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4603,7 +4603,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4616,7 +4616,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4728,7 +4728,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4743,7 +4743,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4873,7 +4873,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4884,7 +4884,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4952,7 +4952,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4965,7 +4965,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5077,7 +5077,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5092,7 +5092,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5222,7 +5222,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5234,7 +5234,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5317,7 +5317,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5329,7 +5329,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5423,7 +5423,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5436,7 +5436,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5530,7 +5530,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5542,7 +5542,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5619,7 +5619,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5631,7 +5631,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5712,7 +5712,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5724,7 +5724,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5818,7 +5818,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5830,7 +5830,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5913,7 +5913,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5926,7 +5926,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6038,7 +6038,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6050,7 +6050,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6126,7 +6126,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6139,7 +6139,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6234,7 +6234,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6246,7 +6246,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6310,7 +6310,7 @@ describe('v1alpha.EngineServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6321,7 +6321,7 @@ describe('v1alpha.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1beta.ts index a6b8582eea7..76d84c048e0 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1beta.ts @@ -292,7 +292,9 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.engineServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateEngineRequest() ); @@ -383,7 +385,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateEngineRequest() ); @@ -431,7 +433,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateEngineRequest() ); @@ -463,7 +465,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateEngineRequest() ); @@ -485,7 +487,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEngineRequest() ); @@ -516,7 +518,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEngineRequest() ); @@ -563,7 +565,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEngineRequest() ); @@ -591,7 +593,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEngineRequest() ); @@ -612,7 +614,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PauseEngineRequest() ); @@ -643,7 +645,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PauseEngineRequest() ); @@ -690,7 +692,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PauseEngineRequest() ); @@ -721,7 +723,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PauseEngineRequest() ); @@ -742,7 +744,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ResumeEngineRequest() ); @@ -773,7 +775,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ResumeEngineRequest() ); @@ -820,7 +822,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ResumeEngineRequest() ); @@ -851,7 +853,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ResumeEngineRequest() ); @@ -872,7 +874,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEngineRequest() ); @@ -904,7 +906,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEngineRequest() ); @@ -958,7 +960,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEngineRequest() ); @@ -989,7 +991,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEngineRequest() ); @@ -1022,7 +1024,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1044,7 +1046,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1062,7 +1064,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteEngineRequest() ); @@ -1094,7 +1096,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteEngineRequest() ); @@ -1148,7 +1150,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteEngineRequest() ); @@ -1179,7 +1181,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteEngineRequest() ); @@ -1212,7 +1214,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1234,7 +1236,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1252,7 +1254,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TuneEngineRequest() ); @@ -1284,7 +1286,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TuneEngineRequest() ); @@ -1338,7 +1340,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TuneEngineRequest() ); @@ -1369,7 +1371,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TuneEngineRequest() ); @@ -1402,7 +1404,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1424,7 +1426,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1442,7 +1444,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEnginesRequest() ); @@ -1481,7 +1483,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEnginesRequest() ); @@ -1536,7 +1538,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEnginesRequest() ); @@ -1567,7 +1569,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEnginesRequest() ); @@ -1628,7 +1630,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEnginesRequest() ); @@ -1680,7 +1682,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEnginesRequest() ); @@ -1730,7 +1732,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEnginesRequest() ); @@ -1774,7 +1776,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1804,7 +1806,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1848,7 +1850,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1883,7 +1885,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1931,7 +1933,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1972,7 +1974,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2051,7 +2053,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2131,7 +2133,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2227,8 +2229,7 @@ describe('v1beta.EngineServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2247,7 +2248,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2256,8 +2257,7 @@ describe('v1beta.EngineServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2273,7 +2273,7 @@ describe('v1beta.EngineServiceClient', () => { }); describe('Path templates', () => { - describe('collection', () => { + describe('collection', async () => { const fakePath = '/rendered/path/collection'; const expectedParameters = { project: 'projectValue', @@ -2284,7 +2284,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.collectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2337,7 +2337,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2349,7 +2349,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2413,7 +2413,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2424,7 +2424,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2477,7 +2477,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2488,7 +2488,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2542,7 +2542,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2551,7 +2551,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2580,7 +2580,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2592,7 +2592,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2681,7 +2681,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2696,7 +2696,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2827,7 +2827,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2843,7 +2843,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2992,7 +2992,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -3006,7 +3006,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -3118,7 +3118,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -3132,7 +3132,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -3245,7 +3245,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -3259,7 +3259,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3372,7 +3372,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3385,7 +3385,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3480,7 +3480,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3494,7 +3494,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3606,7 +3606,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3620,7 +3620,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3733,7 +3733,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3747,7 +3747,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3859,7 +3859,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3874,7 +3874,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -4005,7 +4005,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4018,7 +4018,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4113,7 +4113,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -4127,7 +4127,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -4240,7 +4240,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4254,7 +4254,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4367,7 +4367,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4380,7 +4380,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4492,7 +4492,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4506,7 +4506,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4618,7 +4618,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4632,7 +4632,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4744,7 +4744,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4757,7 +4757,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4869,7 +4869,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4884,7 +4884,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -5014,7 +5014,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -5025,7 +5025,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5093,7 +5093,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5106,7 +5106,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5218,7 +5218,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5233,7 +5233,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5363,7 +5363,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5375,7 +5375,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5458,7 +5458,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5470,7 +5470,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5564,7 +5564,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5577,7 +5577,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5671,7 +5671,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5683,7 +5683,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5760,7 +5760,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5772,7 +5772,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5853,7 +5853,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5865,7 +5865,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5959,7 +5959,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5971,7 +5971,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6054,7 +6054,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6067,7 +6067,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6179,7 +6179,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6191,7 +6191,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6267,7 +6267,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -6280,7 +6280,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -6375,7 +6375,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6388,7 +6388,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6483,7 +6483,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6495,7 +6495,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6559,7 +6559,7 @@ describe('v1beta.EngineServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6570,7 +6570,7 @@ describe('v1beta.EngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_estimate_billing_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_estimate_billing_service_v1alpha.ts index f5a1e072418..15e31e0c88a 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_estimate_billing_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_estimate_billing_service_v1alpha.ts @@ -256,7 +256,9 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.estimateBillingServiceStub); client.close().then(() => { done(); @@ -319,7 +321,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EstimateDataSizeRequest() ); @@ -353,7 +355,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EstimateDataSizeRequest() ); @@ -408,7 +410,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EstimateDataSizeRequest() ); @@ -440,7 +442,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EstimateDataSizeRequest() ); @@ -474,7 +476,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -497,7 +499,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -518,7 +520,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -549,7 +551,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -594,7 +596,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -630,7 +632,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -679,7 +681,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -721,7 +723,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -803,7 +805,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -886,7 +888,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -985,8 +987,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1006,7 +1007,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1015,8 +1016,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1032,7 +1032,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1043,7 +1043,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1082,7 +1082,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1095,7 +1095,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1159,7 +1159,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1171,7 +1171,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1224,7 +1224,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1235,7 +1235,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1274,7 +1274,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1284,7 +1284,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1313,7 +1313,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1326,7 +1326,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1415,7 +1415,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1431,7 +1431,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1562,7 +1562,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1579,7 +1579,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1728,7 +1728,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1743,7 +1743,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1855,7 +1855,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1870,7 +1870,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1983,7 +1983,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1998,7 +1998,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2111,7 +2111,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2125,7 +2125,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2220,7 +2220,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2235,7 +2235,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2347,7 +2347,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2362,7 +2362,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2475,7 +2475,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2490,7 +2490,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2602,7 +2602,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2618,7 +2618,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2749,7 +2749,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2763,7 +2763,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2858,7 +2858,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2873,7 +2873,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2986,7 +2986,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3000,7 +3000,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3112,7 +3112,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3127,7 +3127,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3239,7 +3239,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3254,7 +3254,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3366,7 +3366,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3380,7 +3380,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3492,7 +3492,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3508,7 +3508,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3638,7 +3638,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3650,7 +3650,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3718,7 +3718,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3732,7 +3732,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3844,7 +3844,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3860,7 +3860,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3990,7 +3990,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4003,7 +4003,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4086,7 +4086,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4099,7 +4099,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4193,7 +4193,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4207,7 +4207,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4301,7 +4301,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4314,7 +4314,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4391,7 +4391,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4404,7 +4404,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4485,7 +4485,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4498,7 +4498,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4592,7 +4592,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4605,7 +4605,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4688,7 +4688,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4702,7 +4702,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4814,7 +4814,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4827,7 +4827,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4903,7 +4903,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4917,7 +4917,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5012,7 +5012,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5025,7 +5025,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5089,7 +5089,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5101,7 +5101,7 @@ describe('v1alpha.EstimateBillingServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1alpha.ts index b2596e5a666..998c9b09150 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1alpha.ts @@ -302,7 +302,9 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.evaluationServiceStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEvaluationRequest() ); @@ -397,7 +399,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEvaluationRequest() ); @@ -445,7 +447,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEvaluationRequest() ); @@ -477,7 +479,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetEvaluationRequest() ); @@ -499,7 +501,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEvaluationRequest() ); @@ -533,7 +535,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEvaluationRequest() ); @@ -588,7 +590,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEvaluationRequest() ); @@ -620,7 +622,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateEvaluationRequest() ); @@ -654,7 +656,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -677,7 +679,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -699,7 +701,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest() ); @@ -739,7 +741,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest() ); @@ -797,7 +799,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest() ); @@ -829,7 +831,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest() ); @@ -893,7 +895,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest() ); @@ -946,7 +948,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest() ); @@ -997,7 +999,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest() ); @@ -1041,7 +1043,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest() ); @@ -1082,7 +1084,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest() ); @@ -1140,7 +1142,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest() ); @@ -1175,7 +1177,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest() ); @@ -1245,7 +1247,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest() ); @@ -1304,7 +1306,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest() ); @@ -1359,7 +1361,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest() ); @@ -1406,7 +1408,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1437,7 +1439,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1482,7 +1484,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1518,7 +1520,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1567,7 +1569,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1609,7 +1611,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1691,7 +1693,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1774,7 +1776,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1873,8 +1875,7 @@ describe('v1alpha.EvaluationServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1894,7 +1895,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1903,8 +1904,7 @@ describe('v1alpha.EvaluationServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1920,7 +1920,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1931,7 +1931,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1970,7 +1970,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1983,7 +1983,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2047,7 +2047,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2059,7 +2059,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2112,7 +2112,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2123,7 +2123,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2162,7 +2162,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2172,7 +2172,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2201,7 +2201,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2214,7 +2214,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2303,7 +2303,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2319,7 +2319,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2450,7 +2450,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2467,7 +2467,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2616,7 +2616,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2631,7 +2631,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2743,7 +2743,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2758,7 +2758,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2871,7 +2871,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2886,7 +2886,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2999,7 +2999,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3013,7 +3013,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3108,7 +3108,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3123,7 +3123,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3235,7 +3235,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3250,7 +3250,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3363,7 +3363,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3378,7 +3378,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3490,7 +3490,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3506,7 +3506,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3637,7 +3637,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3651,7 +3651,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3746,7 +3746,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3761,7 +3761,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3874,7 +3874,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3888,7 +3888,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4000,7 +4000,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4015,7 +4015,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4127,7 +4127,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4142,7 +4142,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4254,7 +4254,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4268,7 +4268,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4380,7 +4380,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4396,7 +4396,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4526,7 +4526,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4538,7 +4538,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4606,7 +4606,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4620,7 +4620,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4732,7 +4732,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4748,7 +4748,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4878,7 +4878,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4891,7 +4891,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4974,7 +4974,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4987,7 +4987,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5081,7 +5081,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5095,7 +5095,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5189,7 +5189,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5202,7 +5202,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5279,7 +5279,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5292,7 +5292,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5373,7 +5373,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5386,7 +5386,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5480,7 +5480,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5493,7 +5493,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5576,7 +5576,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5590,7 +5590,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5702,7 +5702,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5715,7 +5715,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5791,7 +5791,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5805,7 +5805,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5900,7 +5900,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5913,7 +5913,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5977,7 +5977,7 @@ describe('v1alpha.EvaluationServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5989,7 +5989,7 @@ describe('v1alpha.EvaluationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1beta.ts index 64933f22c7d..497b0efc447 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_evaluation_service_v1beta.ts @@ -303,7 +303,9 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.evaluationServiceStub); client.close().then(() => { done(); @@ -370,7 +372,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEvaluationRequest() ); @@ -403,7 +405,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEvaluationRequest() ); @@ -452,7 +454,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEvaluationRequest() ); @@ -485,7 +487,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetEvaluationRequest() ); @@ -508,7 +510,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest() ); @@ -543,7 +545,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest() ); @@ -599,7 +601,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest() ); @@ -632,7 +634,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest() ); @@ -667,7 +669,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -691,7 +693,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -714,7 +716,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest() ); @@ -755,7 +757,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest() ); @@ -814,7 +816,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest() ); @@ -847,7 +849,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest() ); @@ -910,7 +912,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest() ); @@ -962,7 +964,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest() ); @@ -1014,7 +1016,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest() ); @@ -1059,7 +1061,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest() ); @@ -1101,7 +1103,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest() ); @@ -1160,7 +1162,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest() ); @@ -1196,7 +1198,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest() ); @@ -1267,7 +1269,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest() ); @@ -1327,7 +1329,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest() ); @@ -1383,7 +1385,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest() ); @@ -1431,7 +1433,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1463,7 +1465,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1509,7 +1511,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1546,7 +1548,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1596,7 +1598,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1639,7 +1641,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1724,7 +1726,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1810,7 +1812,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1912,8 +1914,7 @@ describe('v1beta.EvaluationServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1934,7 +1935,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1943,8 +1944,7 @@ describe('v1beta.EvaluationServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1960,7 +1960,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1974,7 +1974,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2038,7 +2038,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2051,7 +2051,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2104,7 +2104,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2117,7 +2117,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2171,7 +2171,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2183,7 +2183,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2222,7 +2222,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2233,7 +2233,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2262,7 +2262,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2276,7 +2276,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2365,7 +2365,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2382,7 +2382,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2513,7 +2513,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2531,7 +2531,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2680,7 +2680,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2696,7 +2696,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2808,7 +2808,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2824,7 +2824,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2937,7 +2937,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2953,7 +2953,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3066,7 +3066,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3081,7 +3081,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3176,7 +3176,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3192,7 +3192,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3304,7 +3304,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3320,7 +3320,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3433,7 +3433,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3449,7 +3449,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3561,7 +3561,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3578,7 +3578,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3709,7 +3709,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3724,7 +3724,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3819,7 +3819,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3835,7 +3835,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3948,7 +3948,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3964,7 +3964,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4077,7 +4077,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4092,7 +4092,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4204,7 +4204,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4220,7 +4220,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4332,7 +4332,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4348,7 +4348,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4460,7 +4460,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4475,7 +4475,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4587,7 +4587,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4604,7 +4604,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4734,7 +4734,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4747,7 +4747,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4815,7 +4815,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4830,7 +4830,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4942,7 +4942,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4959,7 +4959,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5089,7 +5089,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5103,7 +5103,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5186,7 +5186,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5200,7 +5200,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5294,7 +5294,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5309,7 +5309,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5403,7 +5403,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5417,7 +5417,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5494,7 +5494,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5508,7 +5508,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5589,7 +5589,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5603,7 +5603,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5697,7 +5697,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5711,7 +5711,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5794,7 +5794,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5809,7 +5809,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5921,7 +5921,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5935,7 +5935,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6011,7 +6011,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -6026,7 +6026,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -6121,7 +6121,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6136,7 +6136,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6231,7 +6231,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6245,7 +6245,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6309,7 +6309,7 @@ describe('v1beta.EvaluationServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6322,7 +6322,7 @@ describe('v1beta.EvaluationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts index 6a10c4a1b56..00eecbce84d 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts @@ -244,7 +244,9 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.groundedGenerationServiceStub); client.close().then(() => { done(); @@ -307,7 +309,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest() ); @@ -340,7 +342,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest() ); @@ -388,7 +390,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest() ); @@ -423,7 +425,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest() ); @@ -448,7 +450,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CheckGroundingRequest() ); @@ -480,7 +482,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CheckGroundingRequest() ); @@ -528,7 +530,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CheckGroundingRequest() ); @@ -560,7 +562,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CheckGroundingRequest() ); @@ -582,7 +584,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest() ); @@ -628,7 +630,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GenerateGroundedContentRequest() ); @@ -671,7 +673,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -702,7 +704,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -747,7 +749,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -783,7 +785,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -832,7 +834,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -869,7 +871,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -882,7 +884,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -946,7 +948,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -958,7 +960,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1012,7 +1014,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1023,7 +1025,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1062,7 +1064,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1072,7 +1074,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1101,7 +1103,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1114,7 +1116,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1203,7 +1205,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1219,7 +1221,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1350,7 +1352,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1367,7 +1369,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1516,7 +1518,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1531,7 +1533,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1643,7 +1645,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1658,7 +1660,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1771,7 +1773,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1786,7 +1788,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1899,7 +1901,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1913,7 +1915,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2008,7 +2010,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2023,7 +2025,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2135,7 +2137,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2150,7 +2152,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2262,7 +2264,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2278,7 +2280,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2409,7 +2411,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2423,7 +2425,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2518,7 +2520,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2533,7 +2535,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2646,7 +2648,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2660,7 +2662,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2772,7 +2774,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2787,7 +2789,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2899,7 +2901,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -2913,7 +2915,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3025,7 +3027,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3041,7 +3043,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3171,7 +3173,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3183,7 +3185,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3251,7 +3253,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3265,7 +3267,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3377,7 +3379,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3393,7 +3395,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3523,7 +3525,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3536,7 +3538,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3619,7 +3621,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3632,7 +3634,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3726,7 +3728,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3740,7 +3742,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3834,7 +3836,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3847,7 +3849,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3924,7 +3926,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -3937,7 +3939,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4018,7 +4020,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4031,7 +4033,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4114,7 +4116,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4128,7 +4130,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4240,7 +4242,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4253,7 +4255,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4329,7 +4331,7 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4343,7 +4345,7 @@ describe('v1.GroundedGenerationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1alpha.ts index ccb24472080..72d8cf2bc84 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1alpha.ts @@ -234,7 +234,9 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.groundedGenerationServiceStub); client.close().then(() => { done(); @@ -305,7 +307,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CheckGroundingRequest() ); @@ -339,7 +341,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CheckGroundingRequest() ); @@ -389,7 +391,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CheckGroundingRequest() ); @@ -423,7 +425,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CheckGroundingRequest() ); @@ -446,7 +448,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -479,7 +481,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -526,7 +528,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -564,7 +566,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -615,7 +617,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -652,7 +654,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -665,7 +667,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -704,7 +706,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -719,7 +721,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -783,7 +785,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -797,7 +799,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -850,7 +852,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -864,7 +866,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -918,7 +920,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -930,7 +932,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -959,7 +961,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -974,7 +976,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1063,7 +1065,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1081,7 +1083,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1212,7 +1214,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1231,7 +1233,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1380,7 +1382,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1397,7 +1399,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1509,7 +1511,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1526,7 +1528,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1639,7 +1641,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1656,7 +1658,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1769,7 +1771,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1785,7 +1787,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1880,7 +1882,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1897,7 +1899,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2009,7 +2011,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2026,7 +2028,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2139,7 +2141,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2156,7 +2158,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2268,7 +2270,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2286,7 +2288,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2417,7 +2419,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2433,7 +2435,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2528,7 +2530,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2545,7 +2547,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2658,7 +2660,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2674,7 +2676,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2786,7 +2788,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2803,7 +2805,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2915,7 +2917,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -2932,7 +2934,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3044,7 +3046,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3060,7 +3062,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3172,7 +3174,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3190,7 +3192,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3320,7 +3322,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3334,7 +3336,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3402,7 +3404,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3418,7 +3420,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3530,7 +3532,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3548,7 +3550,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3678,7 +3680,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3693,7 +3695,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3776,7 +3778,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3791,7 +3793,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3885,7 +3887,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3901,7 +3903,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3995,7 +3997,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4010,7 +4012,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4087,7 +4089,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4102,7 +4104,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4183,7 +4185,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4198,7 +4200,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4292,7 +4294,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4307,7 +4309,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4390,7 +4392,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4406,7 +4408,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4518,7 +4520,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4533,7 +4535,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4609,7 +4611,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4625,7 +4627,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4720,7 +4722,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4735,7 +4737,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4799,7 +4801,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -4813,7 +4815,7 @@ describe('v1alpha.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1beta.ts index 1cad7e7de34..b41881d72b5 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1beta.ts @@ -250,7 +250,9 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.groundedGenerationServiceStub); client.close().then(() => { done(); @@ -321,7 +323,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest() ); @@ -356,7 +358,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest() ); @@ -406,7 +408,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest() ); @@ -443,7 +445,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest() ); @@ -470,7 +472,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CheckGroundingRequest() ); @@ -504,7 +506,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CheckGroundingRequest() ); @@ -554,7 +556,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CheckGroundingRequest() ); @@ -588,7 +590,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CheckGroundingRequest() ); @@ -612,7 +614,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest() ); @@ -660,7 +662,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest() ); @@ -705,7 +707,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -738,7 +740,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -785,7 +787,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -823,7 +825,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -874,7 +876,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -911,7 +913,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -926,7 +928,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -990,7 +992,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1004,7 +1006,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1057,7 +1059,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1071,7 +1073,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1125,7 +1127,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1138,7 +1140,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1177,7 +1179,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1189,7 +1191,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1218,7 +1220,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1233,7 +1235,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1322,7 +1324,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1340,7 +1342,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1471,7 +1473,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1490,7 +1492,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1639,7 +1641,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1656,7 +1658,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1768,7 +1770,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1785,7 +1787,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1898,7 +1900,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1915,7 +1917,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2028,7 +2030,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2044,7 +2046,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2139,7 +2141,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2156,7 +2158,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2268,7 +2270,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2285,7 +2287,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2398,7 +2400,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2415,7 +2417,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2527,7 +2529,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2545,7 +2547,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2676,7 +2678,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2692,7 +2694,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2787,7 +2789,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -2804,7 +2806,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -2917,7 +2919,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2934,7 +2936,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3047,7 +3049,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3063,7 +3065,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3175,7 +3177,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3192,7 +3194,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3304,7 +3306,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3321,7 +3323,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3433,7 +3435,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3449,7 +3451,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3561,7 +3563,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3579,7 +3581,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3709,7 +3711,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3723,7 +3725,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3791,7 +3793,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3807,7 +3809,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3919,7 +3921,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3937,7 +3939,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4067,7 +4069,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4082,7 +4084,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4165,7 +4167,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4180,7 +4182,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4274,7 +4276,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4290,7 +4292,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4384,7 +4386,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4399,7 +4401,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4476,7 +4478,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4491,7 +4493,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4572,7 +4574,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4587,7 +4589,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4681,7 +4683,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4696,7 +4698,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4779,7 +4781,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4795,7 +4797,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4907,7 +4909,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4922,7 +4924,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4998,7 +5000,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5014,7 +5016,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5109,7 +5111,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5125,7 +5127,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5220,7 +5222,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5235,7 +5237,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5299,7 +5301,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5313,7 +5315,7 @@ describe('v1beta.GroundedGenerationServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts index 04ddb0260c8..3f3d6cec2a3 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts @@ -243,7 +243,9 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.projectServiceStub); client.close().then(() => { done(); @@ -302,7 +304,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ProvisionProjectRequest() ); @@ -335,7 +337,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ProvisionProjectRequest() ); @@ -389,7 +391,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ProvisionProjectRequest() ); @@ -420,7 +422,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ProvisionProjectRequest() ); @@ -453,7 +455,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -475,7 +477,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -495,7 +497,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -525,7 +527,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -569,7 +571,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -604,7 +606,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -652,7 +654,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -693,7 +695,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -772,7 +774,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -852,7 +854,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -948,8 +950,7 @@ describe('v1.ProjectServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -968,7 +969,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -977,8 +978,7 @@ describe('v1.ProjectServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -994,7 +994,7 @@ describe('v1.ProjectServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1006,7 +1006,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1070,7 +1070,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1079,7 +1079,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1108,7 +1108,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1120,7 +1120,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1209,7 +1209,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1224,7 +1224,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1355,7 +1355,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1371,7 +1371,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1520,7 +1520,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1534,7 +1534,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1646,7 +1646,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1660,7 +1660,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1773,7 +1773,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1787,7 +1787,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1900,7 +1900,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1913,7 +1913,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2008,7 +2008,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2022,7 +2022,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2134,7 +2134,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2148,7 +2148,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2260,7 +2260,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2275,7 +2275,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2406,7 +2406,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2419,7 +2419,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2514,7 +2514,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2528,7 +2528,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2641,7 +2641,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2654,7 +2654,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2766,7 +2766,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2780,7 +2780,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2892,7 +2892,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -2905,7 +2905,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3017,7 +3017,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3032,7 +3032,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3162,7 +3162,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3173,7 +3173,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3241,7 +3241,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3254,7 +3254,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3366,7 +3366,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3381,7 +3381,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3511,7 +3511,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3523,7 +3523,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3606,7 +3606,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3618,7 +3618,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3712,7 +3712,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3725,7 +3725,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3819,7 +3819,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3831,7 +3831,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3908,7 +3908,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -3920,7 +3920,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4001,7 +4001,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4013,7 +4013,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4096,7 +4096,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4109,7 +4109,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4221,7 +4221,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4233,7 +4233,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4309,7 +4309,7 @@ describe('v1.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4322,7 +4322,7 @@ describe('v1.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1alpha.ts index 04e5c3d85cb..55e7ea3f981 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1alpha.ts @@ -253,7 +253,9 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.projectServiceStub); client.close().then(() => { done(); @@ -312,7 +314,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProjectRequest() ); @@ -343,7 +345,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProjectRequest() ); @@ -390,7 +392,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProjectRequest() ); @@ -421,7 +423,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetProjectRequest() ); @@ -442,7 +444,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest() ); @@ -474,7 +476,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest() ); @@ -521,7 +523,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest() ); @@ -552,7 +554,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest() ); @@ -573,7 +575,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ProvisionProjectRequest() ); @@ -606,7 +608,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ProvisionProjectRequest() ); @@ -660,7 +662,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ProvisionProjectRequest() ); @@ -691,7 +693,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ProvisionProjectRequest() ); @@ -724,7 +726,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -746,7 +748,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -766,7 +768,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -796,7 +798,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -840,7 +842,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -875,7 +877,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -923,7 +925,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -964,7 +966,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1043,7 +1045,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1123,7 +1125,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1219,8 +1221,7 @@ describe('v1alpha.ProjectServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1239,7 +1240,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1248,8 +1249,7 @@ describe('v1alpha.ProjectServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1265,7 +1265,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1275,7 +1275,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1314,7 +1314,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1326,7 +1326,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1390,7 +1390,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1401,7 +1401,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1454,7 +1454,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1463,7 +1463,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1492,7 +1492,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1504,7 +1504,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1593,7 +1593,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1608,7 +1608,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1739,7 +1739,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1755,7 +1755,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1904,7 +1904,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1918,7 +1918,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2030,7 +2030,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2044,7 +2044,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2157,7 +2157,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2171,7 +2171,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2284,7 +2284,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2297,7 +2297,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2392,7 +2392,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2406,7 +2406,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2518,7 +2518,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2532,7 +2532,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2645,7 +2645,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2659,7 +2659,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2771,7 +2771,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2786,7 +2786,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2917,7 +2917,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2930,7 +2930,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3025,7 +3025,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3039,7 +3039,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3152,7 +3152,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3165,7 +3165,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3277,7 +3277,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3291,7 +3291,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3403,7 +3403,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3417,7 +3417,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3529,7 +3529,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3542,7 +3542,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3654,7 +3654,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3669,7 +3669,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3799,7 +3799,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3810,7 +3810,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3878,7 +3878,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3891,7 +3891,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4003,7 +4003,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4018,7 +4018,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4148,7 +4148,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4160,7 +4160,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4243,7 +4243,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4255,7 +4255,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4349,7 +4349,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4362,7 +4362,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4456,7 +4456,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4468,7 +4468,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4545,7 +4545,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4557,7 +4557,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4638,7 +4638,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4650,7 +4650,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4744,7 +4744,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4756,7 +4756,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4839,7 +4839,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4852,7 +4852,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4964,7 +4964,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4976,7 +4976,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5052,7 +5052,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5065,7 +5065,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5160,7 +5160,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5172,7 +5172,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5236,7 +5236,7 @@ describe('v1alpha.ProjectServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5247,7 +5247,7 @@ describe('v1alpha.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1beta.ts index a918a0ca245..b2c3b5e3e6e 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1beta.ts @@ -243,7 +243,9 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.projectServiceStub); client.close().then(() => { done(); @@ -302,7 +304,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest() ); @@ -335,7 +337,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest() ); @@ -389,7 +391,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest() ); @@ -420,7 +422,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest() ); @@ -453,7 +455,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -475,7 +477,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -495,7 +497,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -525,7 +527,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -569,7 +571,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -604,7 +606,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -652,7 +654,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -693,7 +695,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -772,7 +774,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -852,7 +854,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -948,8 +950,7 @@ describe('v1beta.ProjectServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -968,7 +969,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -977,8 +978,7 @@ describe('v1beta.ProjectServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -994,7 +994,7 @@ describe('v1beta.ProjectServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1006,7 +1006,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1070,7 +1070,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1081,7 +1081,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1134,7 +1134,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1145,7 +1145,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1199,7 +1199,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1208,7 +1208,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1237,7 +1237,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1249,7 +1249,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1338,7 +1338,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1353,7 +1353,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1484,7 +1484,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1500,7 +1500,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1649,7 +1649,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1663,7 +1663,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1775,7 +1775,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1789,7 +1789,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1902,7 +1902,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1916,7 +1916,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2029,7 +2029,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2042,7 +2042,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2137,7 +2137,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2151,7 +2151,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2263,7 +2263,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2277,7 +2277,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2390,7 +2390,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2404,7 +2404,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2516,7 +2516,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2531,7 +2531,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2662,7 +2662,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2675,7 +2675,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2770,7 +2770,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -2784,7 +2784,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -2897,7 +2897,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2911,7 +2911,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3024,7 +3024,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3037,7 +3037,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3149,7 +3149,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3163,7 +3163,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3275,7 +3275,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3289,7 +3289,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3401,7 +3401,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3414,7 +3414,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3526,7 +3526,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3541,7 +3541,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3671,7 +3671,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3682,7 +3682,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3750,7 +3750,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3763,7 +3763,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3875,7 +3875,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3890,7 +3890,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4020,7 +4020,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4032,7 +4032,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4115,7 +4115,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4127,7 +4127,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4221,7 +4221,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4234,7 +4234,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4328,7 +4328,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4340,7 +4340,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4417,7 +4417,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4429,7 +4429,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4510,7 +4510,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4522,7 +4522,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4616,7 +4616,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4628,7 +4628,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4711,7 +4711,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4724,7 +4724,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4836,7 +4836,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4848,7 +4848,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4924,7 +4924,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -4937,7 +4937,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5032,7 +5032,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5045,7 +5045,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5140,7 +5140,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5152,7 +5152,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5216,7 +5216,7 @@ describe('v1beta.ProjectServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5227,7 +5227,7 @@ describe('v1beta.ProjectServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts index d55dc082e75..93d61d96957 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts @@ -213,7 +213,9 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.rankServiceStub); client.close().then(() => { done(); @@ -272,7 +274,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RankRequest() ); @@ -302,7 +304,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RankRequest() ); @@ -347,7 +349,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RankRequest() ); @@ -374,7 +376,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RankRequest() ); @@ -394,7 +396,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -424,7 +426,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -468,7 +470,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -503,7 +505,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -551,7 +553,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -588,7 +590,7 @@ describe('v1.RankServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -600,7 +602,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -664,7 +666,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -673,7 +675,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -702,7 +704,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -714,7 +716,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -803,7 +805,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -818,7 +820,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -949,7 +951,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -965,7 +967,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1114,7 +1116,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1128,7 +1130,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1240,7 +1242,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1254,7 +1256,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1367,7 +1369,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1381,7 +1383,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1494,7 +1496,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1507,7 +1509,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1602,7 +1604,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1616,7 +1618,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -1728,7 +1730,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -1742,7 +1744,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -1854,7 +1856,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -1869,7 +1871,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2000,7 +2002,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2013,7 +2015,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2108,7 +2110,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2122,7 +2124,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2235,7 +2237,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2248,7 +2250,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2360,7 +2362,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2374,7 +2376,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2486,7 +2488,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -2499,7 +2501,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -2611,7 +2613,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -2626,7 +2628,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -2756,7 +2758,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -2767,7 +2769,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2835,7 +2837,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -2848,7 +2850,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -2960,7 +2962,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2975,7 +2977,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3105,7 +3107,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3117,7 +3119,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3200,7 +3202,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3212,7 +3214,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3306,7 +3308,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3319,7 +3321,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3413,7 +3415,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3425,7 +3427,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3502,7 +3504,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -3514,7 +3516,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -3595,7 +3597,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -3607,7 +3609,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -3690,7 +3692,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -3703,7 +3705,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -3815,7 +3817,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3827,7 +3829,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -3903,7 +3905,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3916,7 +3918,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4011,7 +4013,7 @@ describe('v1.RankServiceClient', () => { }); }); - describe('rankingConfig', () => { + describe('rankingConfig', async () => { const fakePath = '/rendered/path/rankingConfig'; const expectedParameters = { project: 'projectValue', @@ -4022,7 +4024,7 @@ describe('v1.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rankingConfigPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1alpha.ts index cdbb85dbe1b..431189c4941 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1alpha.ts @@ -215,7 +215,9 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.rankServiceStub); client.close().then(() => { done(); @@ -274,7 +276,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RankRequest() ); @@ -304,7 +306,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RankRequest() ); @@ -349,7 +351,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RankRequest() ); @@ -376,7 +378,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RankRequest() ); @@ -396,7 +398,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -426,7 +428,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -470,7 +472,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -505,7 +507,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -553,7 +555,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -590,7 +592,7 @@ describe('v1alpha.RankServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -600,7 +602,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -639,7 +641,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -651,7 +653,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -715,7 +717,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -726,7 +728,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -779,7 +781,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -788,7 +790,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -817,7 +819,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -829,7 +831,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -918,7 +920,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -933,7 +935,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1064,7 +1066,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1080,7 +1082,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1229,7 +1231,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1243,7 +1245,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1355,7 +1357,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1369,7 +1371,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1482,7 +1484,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1496,7 +1498,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1609,7 +1611,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1622,7 +1624,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1717,7 +1719,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1731,7 +1733,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -1843,7 +1845,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -1857,7 +1859,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -1970,7 +1972,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -1984,7 +1986,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2096,7 +2098,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2111,7 +2113,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2242,7 +2244,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2255,7 +2257,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2350,7 +2352,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2364,7 +2366,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2477,7 +2479,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2490,7 +2492,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2602,7 +2604,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2616,7 +2618,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2728,7 +2730,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -2742,7 +2744,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -2854,7 +2856,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -2867,7 +2869,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -2979,7 +2981,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -2994,7 +2996,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3124,7 +3126,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3135,7 +3137,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3203,7 +3205,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3216,7 +3218,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3328,7 +3330,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3343,7 +3345,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3473,7 +3475,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3485,7 +3487,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3568,7 +3570,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3580,7 +3582,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3674,7 +3676,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3687,7 +3689,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3781,7 +3783,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3793,7 +3795,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3870,7 +3872,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -3882,7 +3884,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -3963,7 +3965,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -3975,7 +3977,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4069,7 +4071,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4081,7 +4083,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4164,7 +4166,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4177,7 +4179,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4289,7 +4291,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4301,7 +4303,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4377,7 +4379,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4390,7 +4392,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4485,7 +4487,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('rankingConfig', () => { + describe('rankingConfig', async () => { const fakePath = '/rendered/path/rankingConfig'; const expectedParameters = { project: 'projectValue', @@ -4496,7 +4498,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rankingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4549,7 +4551,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4561,7 +4563,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4625,7 +4627,7 @@ describe('v1alpha.RankServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -4636,7 +4638,7 @@ describe('v1alpha.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1beta.ts index f432c815198..e8857aa93ef 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1beta.ts @@ -215,7 +215,9 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.rankServiceStub); client.close().then(() => { done(); @@ -274,7 +276,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RankRequest() ); @@ -304,7 +306,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RankRequest() ); @@ -349,7 +351,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RankRequest() ); @@ -376,7 +378,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RankRequest() ); @@ -396,7 +398,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -426,7 +428,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -470,7 +472,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -505,7 +507,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -553,7 +555,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -590,7 +592,7 @@ describe('v1beta.RankServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -602,7 +604,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -666,7 +668,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -677,7 +679,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -730,7 +732,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -741,7 +743,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -795,7 +797,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -804,7 +806,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -833,7 +835,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -845,7 +847,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -934,7 +936,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -949,7 +951,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1080,7 +1082,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1096,7 +1098,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1245,7 +1247,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1259,7 +1261,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1371,7 +1373,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1385,7 +1387,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1498,7 +1500,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1512,7 +1514,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1625,7 +1627,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1638,7 +1640,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1733,7 +1735,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1747,7 +1749,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -1859,7 +1861,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -1873,7 +1875,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -1986,7 +1988,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2000,7 +2002,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2112,7 +2114,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2127,7 +2129,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2258,7 +2260,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2271,7 +2273,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2366,7 +2368,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -2380,7 +2382,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -2493,7 +2495,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2507,7 +2509,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2620,7 +2622,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2633,7 +2635,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2745,7 +2747,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2759,7 +2761,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2871,7 +2873,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -2885,7 +2887,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -2997,7 +2999,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3010,7 +3012,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3122,7 +3124,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3137,7 +3139,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3267,7 +3269,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3278,7 +3280,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3346,7 +3348,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3359,7 +3361,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3471,7 +3473,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3486,7 +3488,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3616,7 +3618,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3628,7 +3630,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3711,7 +3713,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3723,7 +3725,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3817,7 +3819,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3830,7 +3832,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3924,7 +3926,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3936,7 +3938,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4013,7 +4015,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4025,7 +4027,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4106,7 +4108,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4118,7 +4120,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4212,7 +4214,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4224,7 +4226,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4307,7 +4309,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4320,7 +4322,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4432,7 +4434,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4444,7 +4446,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4520,7 +4522,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -4533,7 +4535,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -4628,7 +4630,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4641,7 +4643,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4736,7 +4738,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('rankingConfig', () => { + describe('rankingConfig', async () => { const fakePath = '/rendered/path/rankingConfig'; const expectedParameters = { project: 'projectValue', @@ -4747,7 +4749,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.rankingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4800,7 +4802,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4812,7 +4814,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4876,7 +4878,7 @@ describe('v1beta.RankServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -4887,7 +4889,7 @@ describe('v1beta.RankServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts index b3fab375729..8939339dd8b 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts @@ -228,7 +228,9 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.recommendationServiceStub); client.close().then(() => { done(); @@ -291,7 +293,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecommendRequest() ); @@ -323,7 +325,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecommendRequest() ); @@ -371,7 +373,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecommendRequest() ); @@ -400,7 +402,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecommendRequest() ); @@ -421,7 +423,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -452,7 +454,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -497,7 +499,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -533,7 +535,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -582,7 +584,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -619,7 +621,7 @@ describe('v1.RecommendationServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -632,7 +634,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -696,7 +698,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -706,7 +708,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -735,7 +737,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -748,7 +750,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -837,7 +839,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -853,7 +855,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -984,7 +986,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1001,7 +1003,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1150,7 +1152,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1165,7 +1167,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1277,7 +1279,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1292,7 +1294,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1405,7 +1407,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1420,7 +1422,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1533,7 +1535,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1547,7 +1549,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1642,7 +1644,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1657,7 +1659,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -1769,7 +1771,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -1784,7 +1786,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -1897,7 +1899,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -1912,7 +1914,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2024,7 +2026,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2040,7 +2042,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2171,7 +2173,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2185,7 +2187,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2280,7 +2282,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2295,7 +2297,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2408,7 +2410,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2422,7 +2424,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2534,7 +2536,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2549,7 +2551,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2661,7 +2663,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -2676,7 +2678,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -2788,7 +2790,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -2802,7 +2804,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -2914,7 +2916,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -2930,7 +2932,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3060,7 +3062,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3072,7 +3074,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3140,7 +3142,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3154,7 +3156,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3266,7 +3268,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3282,7 +3284,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3412,7 +3414,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3425,7 +3427,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3508,7 +3510,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3521,7 +3523,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3615,7 +3617,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3629,7 +3631,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3723,7 +3725,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3736,7 +3738,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3813,7 +3815,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -3826,7 +3828,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -3907,7 +3909,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -3920,7 +3922,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4014,7 +4016,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4027,7 +4029,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4110,7 +4112,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4124,7 +4126,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4236,7 +4238,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4249,7 +4251,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4325,7 +4327,7 @@ describe('v1.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4339,7 +4341,7 @@ describe('v1.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1alpha.ts index f4533977f0c..86e5ea311e2 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1alpha.ts @@ -228,7 +228,9 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.recommendationServiceStub); client.close().then(() => { done(); @@ -291,7 +293,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecommendRequest() ); @@ -323,7 +325,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecommendRequest() ); @@ -371,7 +373,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecommendRequest() ); @@ -400,7 +402,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecommendRequest() ); @@ -421,7 +423,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -452,7 +454,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -497,7 +499,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -533,7 +535,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -582,7 +584,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -619,7 +621,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -630,7 +632,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -669,7 +671,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -682,7 +684,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -746,7 +748,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -758,7 +760,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -811,7 +813,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -821,7 +823,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -850,7 +852,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -863,7 +865,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -952,7 +954,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -968,7 +970,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1099,7 +1101,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1116,7 +1118,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1265,7 +1267,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1280,7 +1282,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1392,7 +1394,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1407,7 +1409,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1520,7 +1522,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1535,7 +1537,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1648,7 +1650,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1662,7 +1664,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1757,7 +1759,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1772,7 +1774,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -1884,7 +1886,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -1899,7 +1901,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2012,7 +2014,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2027,7 +2029,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2139,7 +2141,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2155,7 +2157,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2286,7 +2288,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2300,7 +2302,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2395,7 +2397,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2410,7 +2412,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2523,7 +2525,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2537,7 +2539,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2649,7 +2651,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2664,7 +2666,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2776,7 +2778,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -2791,7 +2793,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -2903,7 +2905,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -2917,7 +2919,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3029,7 +3031,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3045,7 +3047,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3175,7 +3177,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3187,7 +3189,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3255,7 +3257,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3269,7 +3271,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3381,7 +3383,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3397,7 +3399,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3527,7 +3529,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3540,7 +3542,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3623,7 +3625,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3636,7 +3638,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3730,7 +3732,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3744,7 +3746,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3838,7 +3840,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3851,7 +3853,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3928,7 +3930,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -3941,7 +3943,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4022,7 +4024,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4035,7 +4037,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4129,7 +4131,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4142,7 +4144,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4225,7 +4227,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4239,7 +4241,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4351,7 +4353,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4364,7 +4366,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4440,7 +4442,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4454,7 +4456,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4549,7 +4551,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4562,7 +4564,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4626,7 +4628,7 @@ describe('v1alpha.RecommendationServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -4638,7 +4640,7 @@ describe('v1alpha.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts index 80816b961a7..db7181a1110 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts @@ -228,7 +228,9 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.recommendationServiceStub); client.close().then(() => { done(); @@ -291,7 +293,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecommendRequest() ); @@ -323,7 +325,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecommendRequest() ); @@ -371,7 +373,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecommendRequest() ); @@ -400,7 +402,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecommendRequest() ); @@ -421,7 +423,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -452,7 +454,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -497,7 +499,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -533,7 +535,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -582,7 +584,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -619,7 +621,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -632,7 +634,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -696,7 +698,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -708,7 +710,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -761,7 +763,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -773,7 +775,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -827,7 +829,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -837,7 +839,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -866,7 +868,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -879,7 +881,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -968,7 +970,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -984,7 +986,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1115,7 +1117,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1132,7 +1134,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1281,7 +1283,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1296,7 +1298,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1408,7 +1410,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1423,7 +1425,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1536,7 +1538,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1551,7 +1553,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1664,7 +1666,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1678,7 +1680,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -1773,7 +1775,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -1788,7 +1790,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -1900,7 +1902,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -1915,7 +1917,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2028,7 +2030,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2043,7 +2045,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2155,7 +2157,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2171,7 +2173,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2302,7 +2304,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2316,7 +2318,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2411,7 +2413,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -2426,7 +2428,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -2539,7 +2541,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2554,7 +2556,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2667,7 +2669,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2681,7 +2683,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2793,7 +2795,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2808,7 +2810,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -2920,7 +2922,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -2935,7 +2937,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3047,7 +3049,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3061,7 +3063,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3173,7 +3175,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3189,7 +3191,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3319,7 +3321,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3331,7 +3333,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3399,7 +3401,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3413,7 +3415,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3525,7 +3527,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3541,7 +3543,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3671,7 +3673,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3684,7 +3686,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3767,7 +3769,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3780,7 +3782,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3874,7 +3876,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3888,7 +3890,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -3982,7 +3984,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3995,7 +3997,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4072,7 +4074,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4085,7 +4087,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4166,7 +4168,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4179,7 +4181,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4273,7 +4275,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4286,7 +4288,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4369,7 +4371,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4383,7 +4385,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4495,7 +4497,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4508,7 +4510,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4584,7 +4586,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -4598,7 +4600,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -4693,7 +4695,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4707,7 +4709,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4802,7 +4804,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4815,7 +4817,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4879,7 +4881,7 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -4891,7 +4893,7 @@ describe('v1beta.RecommendationServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1alpha.ts index f534b625085..09b71a45ba8 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1alpha.ts @@ -303,7 +303,9 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sampleQueryServiceStub); client.close().then(() => { done(); @@ -366,7 +368,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQueryRequest() ); @@ -398,7 +400,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQueryRequest() ); @@ -446,7 +448,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQueryRequest() ); @@ -478,7 +480,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQueryRequest() ); @@ -500,7 +502,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest() ); @@ -532,7 +534,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest() ); @@ -580,7 +582,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest() ); @@ -612,7 +614,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQueryRequest() ); @@ -634,7 +636,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQueryRequest() ); @@ -667,7 +669,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQueryRequest() ); @@ -716,7 +718,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQueryRequest() ); @@ -749,7 +751,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQueryRequest() ); @@ -772,7 +774,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQueryRequest() ); @@ -804,7 +806,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQueryRequest() ); @@ -852,7 +854,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQueryRequest() ); @@ -884,7 +886,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQueryRequest() ); @@ -906,7 +908,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesRequest() ); @@ -940,7 +942,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesRequest() ); @@ -995,7 +997,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesRequest() ); @@ -1027,7 +1029,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesRequest() ); @@ -1061,7 +1063,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1084,7 +1086,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1106,7 +1108,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest() ); @@ -1146,7 +1148,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest() ); @@ -1204,7 +1206,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest() ); @@ -1236,7 +1238,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest() ); @@ -1300,7 +1302,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest() ); @@ -1353,7 +1355,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest() ); @@ -1404,7 +1406,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQueriesRequest() ); @@ -1447,7 +1449,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1478,7 +1480,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1523,7 +1525,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1559,7 +1561,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1608,7 +1610,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1650,7 +1652,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1732,7 +1734,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1815,7 +1817,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1914,8 +1916,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1935,7 +1936,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1944,8 +1945,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1961,7 +1961,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1972,7 +1972,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2011,7 +2011,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -2024,7 +2024,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2088,7 +2088,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2100,7 +2100,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2153,7 +2153,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2163,7 +2163,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2192,7 +2192,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2205,7 +2205,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2294,7 +2294,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2310,7 +2310,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2441,7 +2441,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2458,7 +2458,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2607,7 +2607,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2622,7 +2622,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2734,7 +2734,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2749,7 +2749,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2862,7 +2862,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2877,7 +2877,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2990,7 +2990,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3004,7 +3004,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3099,7 +3099,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3114,7 +3114,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3226,7 +3226,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3241,7 +3241,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3354,7 +3354,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3369,7 +3369,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3481,7 +3481,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3497,7 +3497,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3628,7 +3628,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3642,7 +3642,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3737,7 +3737,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3752,7 +3752,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3865,7 +3865,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3879,7 +3879,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3991,7 +3991,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4006,7 +4006,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4118,7 +4118,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4133,7 +4133,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4245,7 +4245,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4259,7 +4259,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4371,7 +4371,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4387,7 +4387,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4517,7 +4517,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4529,7 +4529,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4597,7 +4597,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4611,7 +4611,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4723,7 +4723,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4739,7 +4739,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4869,7 +4869,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4882,7 +4882,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4965,7 +4965,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4978,7 +4978,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5072,7 +5072,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5086,7 +5086,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5180,7 +5180,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5193,7 +5193,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5270,7 +5270,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5283,7 +5283,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5364,7 +5364,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5377,7 +5377,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5471,7 +5471,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5484,7 +5484,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5567,7 +5567,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5581,7 +5581,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5693,7 +5693,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5706,7 +5706,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5782,7 +5782,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5796,7 +5796,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5891,7 +5891,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5904,7 +5904,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5968,7 +5968,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5980,7 +5980,7 @@ describe('v1alpha.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1beta.ts index 3b3f2101d96..09f5e2c771c 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_sample_query_service_v1beta.ts @@ -303,7 +303,9 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sampleQueryServiceStub); client.close().then(() => { done(); @@ -366,7 +368,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest() ); @@ -398,7 +400,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest() ); @@ -446,7 +448,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest() ); @@ -478,7 +480,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest() ); @@ -500,7 +502,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest() ); @@ -532,7 +534,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest() ); @@ -580,7 +582,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest() ); @@ -612,7 +614,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest() ); @@ -634,7 +636,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest() ); @@ -667,7 +669,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest() ); @@ -716,7 +718,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest() ); @@ -749,7 +751,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest() ); @@ -772,7 +774,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest() ); @@ -804,7 +806,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest() ); @@ -852,7 +854,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest() ); @@ -884,7 +886,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest() ); @@ -906,7 +908,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest() ); @@ -940,7 +942,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest() ); @@ -995,7 +997,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest() ); @@ -1027,7 +1029,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest() ); @@ -1061,7 +1063,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1084,7 +1086,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1106,7 +1108,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest() ); @@ -1146,7 +1148,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest() ); @@ -1204,7 +1206,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest() ); @@ -1236,7 +1238,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest() ); @@ -1300,7 +1302,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest() ); @@ -1353,7 +1355,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest() ); @@ -1404,7 +1406,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest() ); @@ -1447,7 +1449,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1478,7 +1480,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1523,7 +1525,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1559,7 +1561,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1608,7 +1610,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1650,7 +1652,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1732,7 +1734,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1815,7 +1817,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1914,8 +1916,7 @@ describe('v1beta.SampleQueryServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1935,7 +1936,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1944,8 +1945,7 @@ describe('v1beta.SampleQueryServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1961,7 +1961,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1974,7 +1974,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2038,7 +2038,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2050,7 +2050,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2103,7 +2103,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2115,7 +2115,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2169,7 +2169,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2179,7 +2179,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2208,7 +2208,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2221,7 +2221,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2310,7 +2310,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2326,7 +2326,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2457,7 +2457,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2474,7 +2474,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2623,7 +2623,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2638,7 +2638,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2750,7 +2750,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2765,7 +2765,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2878,7 +2878,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2893,7 +2893,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -3006,7 +3006,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -3020,7 +3020,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3115,7 +3115,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3130,7 +3130,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3242,7 +3242,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3257,7 +3257,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3370,7 +3370,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3385,7 +3385,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3497,7 +3497,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3513,7 +3513,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3644,7 +3644,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3658,7 +3658,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3753,7 +3753,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3768,7 +3768,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3881,7 +3881,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3896,7 +3896,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4009,7 +4009,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -4023,7 +4023,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4135,7 +4135,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4150,7 +4150,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4262,7 +4262,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4277,7 +4277,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4389,7 +4389,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4403,7 +4403,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4515,7 +4515,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4531,7 +4531,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4661,7 +4661,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4673,7 +4673,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4741,7 +4741,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4755,7 +4755,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4867,7 +4867,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4883,7 +4883,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -5013,7 +5013,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -5026,7 +5026,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5109,7 +5109,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5122,7 +5122,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5216,7 +5216,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5230,7 +5230,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5324,7 +5324,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5337,7 +5337,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5414,7 +5414,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5427,7 +5427,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5508,7 +5508,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5521,7 +5521,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5615,7 +5615,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5628,7 +5628,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5711,7 +5711,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5725,7 +5725,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5837,7 +5837,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5850,7 +5850,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5926,7 +5926,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5940,7 +5940,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -6035,7 +6035,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6049,7 +6049,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6144,7 +6144,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6157,7 +6157,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6221,7 +6221,7 @@ describe('v1beta.SampleQueryServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6233,7 +6233,7 @@ describe('v1beta.SampleQueryServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1alpha.ts index b0b6add154f..30bd64e7e92 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1alpha.ts @@ -268,7 +268,9 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sampleQuerySetServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQuerySetRequest() ); @@ -363,7 +365,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQuerySetRequest() ); @@ -411,7 +413,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQuerySetRequest() ); @@ -443,7 +445,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSampleQuerySetRequest() ); @@ -465,7 +467,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQuerySetRequest() ); @@ -498,7 +500,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQuerySetRequest() ); @@ -546,7 +548,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQuerySetRequest() ); @@ -578,7 +580,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSampleQuerySetRequest() ); @@ -600,7 +602,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQuerySetRequest() ); @@ -634,7 +636,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQuerySetRequest() ); @@ -683,7 +685,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQuerySetRequest() ); @@ -716,7 +718,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSampleQuerySetRequest() ); @@ -739,7 +741,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQuerySetRequest() ); @@ -772,7 +774,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQuerySetRequest() ); @@ -820,7 +822,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQuerySetRequest() ); @@ -852,7 +854,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSampleQuerySetRequest() ); @@ -874,7 +876,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest() ); @@ -915,7 +917,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest() ); @@ -973,7 +975,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest() ); @@ -1005,7 +1007,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest() ); @@ -1069,7 +1071,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest() ); @@ -1122,7 +1124,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest() ); @@ -1173,7 +1175,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSampleQuerySetsRequest() ); @@ -1216,7 +1218,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1247,7 +1249,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1292,7 +1294,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1328,7 +1330,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1377,7 +1379,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1414,7 +1416,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1425,7 +1427,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1464,7 +1466,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1477,7 +1479,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1541,7 +1543,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1553,7 +1555,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1606,7 +1608,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1617,7 +1619,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1656,7 +1658,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1666,7 +1668,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1695,7 +1697,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1708,7 +1710,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1797,7 +1799,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1813,7 +1815,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1944,7 +1946,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1961,7 +1963,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2110,7 +2112,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2125,7 +2127,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2237,7 +2239,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2252,7 +2254,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2365,7 +2367,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2380,7 +2382,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2493,7 +2495,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2507,7 +2509,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2602,7 +2604,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2617,7 +2619,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2729,7 +2731,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2744,7 +2746,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2857,7 +2859,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2872,7 +2874,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2984,7 +2986,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3000,7 +3002,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3131,7 +3133,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3145,7 +3147,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3240,7 +3242,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3255,7 +3257,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3368,7 +3370,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3382,7 +3384,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3494,7 +3496,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3509,7 +3511,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3621,7 +3623,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3636,7 +3638,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3748,7 +3750,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3762,7 +3764,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3874,7 +3876,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3890,7 +3892,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4020,7 +4022,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4032,7 +4034,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4100,7 +4102,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4114,7 +4116,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4226,7 +4228,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4242,7 +4244,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4372,7 +4374,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4385,7 +4387,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4468,7 +4470,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4481,7 +4483,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4575,7 +4577,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4589,7 +4591,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4683,7 +4685,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4696,7 +4698,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4773,7 +4775,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4786,7 +4788,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4867,7 +4869,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4880,7 +4882,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4974,7 +4976,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4987,7 +4989,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5070,7 +5072,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5084,7 +5086,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5196,7 +5198,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5209,7 +5211,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5285,7 +5287,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5299,7 +5301,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5394,7 +5396,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5407,7 +5409,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5471,7 +5473,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5483,7 +5485,7 @@ describe('v1alpha.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1beta.ts index 818e4e34175..aa6ddcf949a 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_sample_query_set_service_v1beta.ts @@ -268,7 +268,9 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.sampleQuerySetServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest() ); @@ -363,7 +365,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest() ); @@ -411,7 +413,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest() ); @@ -443,7 +445,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest() ); @@ -465,7 +467,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest() ); @@ -498,7 +500,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest() ); @@ -546,7 +548,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest() ); @@ -578,7 +580,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest() ); @@ -600,7 +602,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest() ); @@ -634,7 +636,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest() ); @@ -683,7 +685,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest() ); @@ -716,7 +718,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest() ); @@ -739,7 +741,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest() ); @@ -772,7 +774,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest() ); @@ -820,7 +822,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest() ); @@ -852,7 +854,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest() ); @@ -874,7 +876,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest() ); @@ -915,7 +917,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest() ); @@ -973,7 +975,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest() ); @@ -1005,7 +1007,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest() ); @@ -1069,7 +1071,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest() ); @@ -1122,7 +1124,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest() ); @@ -1173,7 +1175,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest() ); @@ -1216,7 +1218,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1247,7 +1249,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1292,7 +1294,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1328,7 +1330,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1377,7 +1379,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1414,7 +1416,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1427,7 +1429,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1491,7 +1493,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1503,7 +1505,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1556,7 +1558,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1568,7 +1570,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1622,7 +1624,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1633,7 +1635,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1672,7 +1674,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1682,7 +1684,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1711,7 +1713,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1724,7 +1726,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1813,7 +1815,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1829,7 +1831,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1960,7 +1962,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1977,7 +1979,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2126,7 +2128,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2141,7 +2143,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2253,7 +2255,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2268,7 +2270,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2381,7 +2383,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2396,7 +2398,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2509,7 +2511,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2523,7 +2525,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2618,7 +2620,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2633,7 +2635,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2745,7 +2747,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2760,7 +2762,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2873,7 +2875,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2888,7 +2890,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3000,7 +3002,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3016,7 +3018,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3147,7 +3149,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3161,7 +3163,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3256,7 +3258,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3271,7 +3273,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3384,7 +3386,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3399,7 +3401,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3512,7 +3514,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3526,7 +3528,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3638,7 +3640,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3653,7 +3655,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3765,7 +3767,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3780,7 +3782,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3892,7 +3894,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3906,7 +3908,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4018,7 +4020,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4034,7 +4036,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4164,7 +4166,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4176,7 +4178,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4244,7 +4246,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4258,7 +4260,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4370,7 +4372,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4386,7 +4388,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4516,7 +4518,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4529,7 +4531,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4612,7 +4614,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4625,7 +4627,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4719,7 +4721,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4733,7 +4735,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4827,7 +4829,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4840,7 +4842,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4917,7 +4919,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4930,7 +4932,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5011,7 +5013,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5024,7 +5026,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5118,7 +5120,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5131,7 +5133,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5214,7 +5216,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5228,7 +5230,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5340,7 +5342,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5353,7 +5355,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5429,7 +5431,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5443,7 +5445,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5538,7 +5540,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5552,7 +5554,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5647,7 +5649,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5660,7 +5662,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5724,7 +5726,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5736,7 +5738,7 @@ describe('v1beta.SampleQuerySetServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts index 45dfea81647..1b817166778 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts @@ -292,7 +292,9 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.schemaServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSchemaRequest() ); @@ -382,7 +384,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSchemaRequest() ); @@ -429,7 +431,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSchemaRequest() ); @@ -457,7 +459,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSchemaRequest() ); @@ -478,7 +480,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSchemaRequest() ); @@ -510,7 +512,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSchemaRequest() ); @@ -564,7 +566,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSchemaRequest() ); @@ -595,7 +597,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateSchemaRequest() ); @@ -628,7 +630,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -650,7 +652,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -668,7 +670,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSchemaRequest() ); @@ -701,7 +703,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSchemaRequest() ); @@ -756,7 +758,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSchemaRequest() ); @@ -788,7 +790,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateSchemaRequest() ); @@ -822,7 +824,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -844,7 +846,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -862,7 +864,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSchemaRequest() ); @@ -894,7 +896,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSchemaRequest() ); @@ -948,7 +950,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSchemaRequest() ); @@ -979,7 +981,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteSchemaRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1034,7 +1036,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1052,7 +1054,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSchemasRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSchemasRequest() ); @@ -1146,7 +1148,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSchemasRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSchemasRequest() ); @@ -1237,7 +1239,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSchemasRequest() ); @@ -1288,7 +1290,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSchemasRequest() ); @@ -1337,7 +1339,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListSchemasRequest() ); @@ -1380,7 +1382,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1410,7 +1412,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1454,7 +1456,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1489,7 +1491,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1537,7 +1539,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1578,7 +1580,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1657,7 +1659,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1737,7 +1739,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1833,8 +1835,7 @@ describe('v1.SchemaServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1853,7 +1854,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1862,8 +1863,7 @@ describe('v1.SchemaServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1879,7 +1879,7 @@ describe('v1.SchemaServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1891,7 +1891,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1955,7 +1955,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1964,7 +1964,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1993,7 +1993,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2005,7 +2005,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2094,7 +2094,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2109,7 +2109,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2240,7 +2240,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2256,7 +2256,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2405,7 +2405,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2419,7 +2419,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2531,7 +2531,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2545,7 +2545,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2658,7 +2658,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2672,7 +2672,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2785,7 +2785,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2798,7 +2798,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2893,7 +2893,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2907,7 +2907,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3019,7 +3019,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3033,7 +3033,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3145,7 +3145,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3160,7 +3160,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3291,7 +3291,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3304,7 +3304,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3399,7 +3399,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3413,7 +3413,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3526,7 +3526,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3539,7 +3539,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3651,7 +3651,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3665,7 +3665,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3777,7 +3777,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3790,7 +3790,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3902,7 +3902,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3917,7 +3917,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4047,7 +4047,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4058,7 +4058,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4126,7 +4126,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4139,7 +4139,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4251,7 +4251,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4266,7 +4266,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4396,7 +4396,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4408,7 +4408,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4491,7 +4491,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4503,7 +4503,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4597,7 +4597,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4610,7 +4610,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4704,7 +4704,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4716,7 +4716,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4793,7 +4793,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4805,7 +4805,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4886,7 +4886,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4898,7 +4898,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4981,7 +4981,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4994,7 +4994,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5106,7 +5106,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5118,7 +5118,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5194,7 +5194,7 @@ describe('v1.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5207,7 +5207,7 @@ describe('v1.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1alpha.ts index ee975e0b337..9920b9bb6a2 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1alpha.ts @@ -292,7 +292,9 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.schemaServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSchemaRequest() ); @@ -382,7 +384,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSchemaRequest() ); @@ -429,7 +431,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSchemaRequest() ); @@ -457,7 +459,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSchemaRequest() ); @@ -478,7 +480,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest() ); @@ -510,7 +512,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest() ); @@ -564,7 +566,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest() ); @@ -595,7 +597,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest() ); @@ -628,7 +630,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -650,7 +652,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -668,7 +670,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest() ); @@ -701,7 +703,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest() ); @@ -756,7 +758,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest() ); @@ -788,7 +790,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest() ); @@ -822,7 +824,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -844,7 +846,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -862,7 +864,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest() ); @@ -894,7 +896,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest() ); @@ -948,7 +950,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest() ); @@ -979,7 +981,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest() ); @@ -1012,7 +1014,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1034,7 +1036,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1052,7 +1054,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSchemasRequest() ); @@ -1091,7 +1093,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSchemasRequest() ); @@ -1148,7 +1150,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSchemasRequest() ); @@ -1179,7 +1181,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSchemasRequest() ); @@ -1240,7 +1242,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSchemasRequest() ); @@ -1292,7 +1294,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSchemasRequest() ); @@ -1342,7 +1344,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListSchemasRequest() ); @@ -1386,7 +1388,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1416,7 +1418,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1460,7 +1462,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1495,7 +1497,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1543,7 +1545,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1584,7 +1586,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1663,7 +1665,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1743,7 +1745,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1839,8 +1841,7 @@ describe('v1alpha.SchemaServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1859,7 +1860,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1868,8 +1869,7 @@ describe('v1alpha.SchemaServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1885,7 +1885,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1895,7 +1895,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1934,7 +1934,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1946,7 +1946,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2010,7 +2010,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2021,7 +2021,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2074,7 +2074,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2083,7 +2083,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2112,7 +2112,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2124,7 +2124,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2213,7 +2213,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2228,7 +2228,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2359,7 +2359,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2375,7 +2375,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2524,7 +2524,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2538,7 +2538,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2650,7 +2650,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2664,7 +2664,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2777,7 +2777,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2791,7 +2791,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2904,7 +2904,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2917,7 +2917,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3012,7 +3012,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3026,7 +3026,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3138,7 +3138,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3152,7 +3152,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3265,7 +3265,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3279,7 +3279,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3391,7 +3391,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3406,7 +3406,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3537,7 +3537,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3550,7 +3550,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3645,7 +3645,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3659,7 +3659,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3772,7 +3772,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3785,7 +3785,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3897,7 +3897,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3911,7 +3911,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4023,7 +4023,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4037,7 +4037,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4149,7 +4149,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4162,7 +4162,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4274,7 +4274,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4289,7 +4289,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4419,7 +4419,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4430,7 +4430,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4498,7 +4498,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4511,7 +4511,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4623,7 +4623,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4638,7 +4638,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4768,7 +4768,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4780,7 +4780,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4863,7 +4863,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4875,7 +4875,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4969,7 +4969,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4982,7 +4982,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5076,7 +5076,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5088,7 +5088,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5165,7 +5165,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5177,7 +5177,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5258,7 +5258,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5270,7 +5270,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5364,7 +5364,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5376,7 +5376,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5459,7 +5459,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5472,7 +5472,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5584,7 +5584,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5596,7 +5596,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5672,7 +5672,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5685,7 +5685,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5780,7 +5780,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5792,7 +5792,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5856,7 +5856,7 @@ describe('v1alpha.SchemaServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5867,7 +5867,7 @@ describe('v1alpha.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1beta.ts index cc3fd40948e..f6d9ad0ea9b 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1beta.ts @@ -292,7 +292,9 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.schemaServiceStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() ); @@ -382,7 +384,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() ); @@ -429,7 +431,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() ); @@ -457,7 +459,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() ); @@ -478,7 +480,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() ); @@ -510,7 +512,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() ); @@ -564,7 +566,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() ); @@ -595,7 +597,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() ); @@ -628,7 +630,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -650,7 +652,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -668,7 +670,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() ); @@ -701,7 +703,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() ); @@ -756,7 +758,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() ); @@ -788,7 +790,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() ); @@ -822,7 +824,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -844,7 +846,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -862,7 +864,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() ); @@ -894,7 +896,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() ); @@ -948,7 +950,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() ); @@ -979,7 +981,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() ); @@ -1012,7 +1014,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1034,7 +1036,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1052,7 +1054,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() ); @@ -1091,7 +1093,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() ); @@ -1146,7 +1148,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() ); @@ -1177,7 +1179,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() ); @@ -1238,7 +1240,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() ); @@ -1290,7 +1292,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() ); @@ -1340,7 +1342,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() ); @@ -1384,7 +1386,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1414,7 +1416,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1458,7 +1460,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1493,7 +1495,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1541,7 +1543,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1582,7 +1584,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1661,7 +1663,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1741,7 +1743,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1837,8 +1839,7 @@ describe('v1beta.SchemaServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1857,7 +1858,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1866,8 +1867,7 @@ describe('v1beta.SchemaServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1883,7 +1883,7 @@ describe('v1beta.SchemaServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1895,7 +1895,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1959,7 +1959,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1970,7 +1970,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2023,7 +2023,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -2034,7 +2034,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2088,7 +2088,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2097,7 +2097,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2126,7 +2126,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -2138,7 +2138,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -2227,7 +2227,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -2242,7 +2242,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -2373,7 +2373,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -2389,7 +2389,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2538,7 +2538,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2552,7 +2552,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2664,7 +2664,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2678,7 +2678,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2791,7 +2791,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2805,7 +2805,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2918,7 +2918,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2931,7 +2931,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -3026,7 +3026,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -3040,7 +3040,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -3152,7 +3152,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -3166,7 +3166,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -3279,7 +3279,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -3293,7 +3293,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -3405,7 +3405,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -3420,7 +3420,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3551,7 +3551,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3564,7 +3564,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3659,7 +3659,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3673,7 +3673,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3786,7 +3786,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3800,7 +3800,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3913,7 +3913,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3926,7 +3926,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -4038,7 +4038,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -4052,7 +4052,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -4164,7 +4164,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -4178,7 +4178,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -4290,7 +4290,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -4303,7 +4303,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -4415,7 +4415,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4430,7 +4430,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4560,7 +4560,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4571,7 +4571,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4639,7 +4639,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4652,7 +4652,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4764,7 +4764,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4779,7 +4779,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4909,7 +4909,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4921,7 +4921,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -5004,7 +5004,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -5016,7 +5016,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -5110,7 +5110,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -5123,7 +5123,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -5217,7 +5217,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5229,7 +5229,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5306,7 +5306,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -5318,7 +5318,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -5399,7 +5399,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -5411,7 +5411,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5505,7 +5505,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5517,7 +5517,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5600,7 +5600,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5613,7 +5613,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5725,7 +5725,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5737,7 +5737,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5813,7 +5813,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5826,7 +5826,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5921,7 +5921,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5934,7 +5934,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6029,7 +6029,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -6041,7 +6041,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6105,7 +6105,7 @@ describe('v1beta.SchemaServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -6116,7 +6116,7 @@ describe('v1beta.SchemaServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts index d47279a2e8a..8f9ff3f06cb 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts @@ -255,7 +255,9 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -353,7 +355,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -410,7 +412,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -438,7 +440,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -501,7 +503,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -555,7 +557,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -604,7 +606,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -648,7 +650,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -687,7 +689,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -744,7 +746,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -775,7 +777,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -838,7 +840,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -892,7 +894,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -942,7 +944,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.SearchRequest() ); @@ -986,7 +988,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1016,7 +1018,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1060,7 +1062,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1095,7 +1097,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1143,7 +1145,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1180,7 +1182,7 @@ describe('v1.SearchServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1192,7 +1194,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1256,7 +1258,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1265,7 +1267,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1294,7 +1296,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1306,7 +1308,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1395,7 +1397,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranch', () => { + describe('projectLocationCollectionDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranch'; const expectedParameters = { @@ -1409,7 +1411,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match = @@ -1521,7 +1523,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1536,7 +1538,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1667,7 +1669,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1683,7 +1685,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1832,7 +1834,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1846,7 +1848,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1958,7 +1960,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1972,7 +1974,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2085,7 +2087,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2099,7 +2101,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2212,7 +2214,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2225,7 +2227,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2320,7 +2322,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2334,7 +2336,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2446,7 +2448,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2460,7 +2462,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2573,7 +2575,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2587,7 +2589,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2699,7 +2701,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2714,7 +2716,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2845,7 +2847,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2858,7 +2860,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2953,7 +2955,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2967,7 +2969,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3080,7 +3082,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3093,7 +3095,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3205,7 +3207,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3219,7 +3221,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3331,7 +3333,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3345,7 +3347,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3457,7 +3459,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3470,7 +3472,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3582,7 +3584,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3597,7 +3599,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3727,7 +3729,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3738,7 +3740,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3806,7 +3808,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranch', () => { + describe('projectLocationDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranch'; const expectedParameters = { project: 'projectValue', @@ -3818,7 +3820,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.match = @@ -3899,7 +3901,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3912,7 +3914,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4024,7 +4026,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4039,7 +4041,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4169,7 +4171,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4181,7 +4183,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4264,7 +4266,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4276,7 +4278,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4370,7 +4372,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4383,7 +4385,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4477,7 +4479,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4489,7 +4491,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4566,7 +4568,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4578,7 +4580,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4659,7 +4661,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4671,7 +4673,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4765,7 +4767,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4777,7 +4779,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4860,7 +4862,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4873,7 +4875,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4985,7 +4987,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4997,7 +4999,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5073,7 +5075,7 @@ describe('v1.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5086,7 +5088,7 @@ describe('v1.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1alpha.ts index 58062a0b588..7fa2f618d60 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1alpha.ts @@ -255,7 +255,9 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SearchRequest() ); @@ -353,7 +355,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SearchRequest() ); @@ -410,7 +412,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SearchRequest() ); @@ -438,7 +440,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SearchRequest() ); @@ -501,7 +503,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SearchRequest() ); @@ -555,7 +557,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SearchRequest() ); @@ -604,7 +606,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SearchRequest() ); @@ -647,7 +649,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -677,7 +679,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -721,7 +723,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -756,7 +758,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -804,7 +806,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -841,7 +843,7 @@ describe('v1alpha.SearchServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -851,7 +853,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -890,7 +892,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -902,7 +904,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -966,7 +968,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -977,7 +979,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1030,7 +1032,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1039,7 +1041,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1068,7 +1070,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1080,7 +1082,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1169,7 +1171,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranch', () => { + describe('projectLocationCollectionDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranch'; const expectedParameters = { @@ -1183,7 +1185,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match = @@ -1295,7 +1297,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1310,7 +1312,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1441,7 +1443,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1457,7 +1459,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1606,7 +1608,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1620,7 +1622,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1732,7 +1734,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1746,7 +1748,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1859,7 +1861,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -1873,7 +1875,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -1986,7 +1988,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -1999,7 +2001,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2094,7 +2096,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2108,7 +2110,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2220,7 +2222,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2234,7 +2236,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2347,7 +2349,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2361,7 +2363,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2473,7 +2475,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2488,7 +2490,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2619,7 +2621,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2632,7 +2634,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2727,7 +2729,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2741,7 +2743,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2854,7 +2856,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2867,7 +2869,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -2979,7 +2981,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -2993,7 +2995,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3105,7 +3107,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3119,7 +3121,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3231,7 +3233,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3244,7 +3246,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3356,7 +3358,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3371,7 +3373,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3501,7 +3503,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3512,7 +3514,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3580,7 +3582,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranch', () => { + describe('projectLocationDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranch'; const expectedParameters = { project: 'projectValue', @@ -3592,7 +3594,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.match = @@ -3673,7 +3675,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3686,7 +3688,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3798,7 +3800,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3813,7 +3815,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3943,7 +3945,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3955,7 +3957,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4038,7 +4040,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4050,7 +4052,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4144,7 +4146,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4157,7 +4159,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4251,7 +4253,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4263,7 +4265,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4340,7 +4342,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4352,7 +4354,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4433,7 +4435,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4445,7 +4447,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4539,7 +4541,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4551,7 +4553,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4634,7 +4636,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4647,7 +4649,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4759,7 +4761,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4771,7 +4773,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4847,7 +4849,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4860,7 +4862,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -4955,7 +4957,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -4967,7 +4969,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5031,7 +5033,7 @@ describe('v1alpha.SearchServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5042,7 +5044,7 @@ describe('v1alpha.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1beta.ts index 37626e95d53..867ae638e54 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1beta.ts @@ -255,7 +255,9 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchServiceStub); client.close().then(() => { done(); @@ -314,7 +316,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -353,7 +355,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -410,7 +412,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -438,7 +440,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -501,7 +503,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -555,7 +557,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -604,7 +606,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -648,7 +650,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -687,7 +689,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -744,7 +746,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -775,7 +777,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -838,7 +840,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -892,7 +894,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -942,7 +944,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.SearchRequest() ); @@ -986,7 +988,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1016,7 +1018,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1060,7 +1062,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1095,7 +1097,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1143,7 +1145,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1180,7 +1182,7 @@ describe('v1beta.SearchServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1192,7 +1194,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1256,7 +1258,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1267,7 +1269,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1320,7 +1322,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1331,7 +1333,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1385,7 +1387,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1394,7 +1396,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1423,7 +1425,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1435,7 +1437,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1524,7 +1526,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranch', () => { + describe('projectLocationCollectionDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranch'; const expectedParameters = { @@ -1538,7 +1540,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match = @@ -1650,7 +1652,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1665,7 +1667,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1796,7 +1798,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1812,7 +1814,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1961,7 +1963,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1975,7 +1977,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2087,7 +2089,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2101,7 +2103,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2214,7 +2216,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2228,7 +2230,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2341,7 +2343,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2354,7 +2356,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2449,7 +2451,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2463,7 +2465,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2575,7 +2577,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2589,7 +2591,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2702,7 +2704,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2716,7 +2718,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2828,7 +2830,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2843,7 +2845,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2974,7 +2976,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2987,7 +2989,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3082,7 +3084,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3096,7 +3098,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3209,7 +3211,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3223,7 +3225,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3336,7 +3338,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3349,7 +3351,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3461,7 +3463,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3475,7 +3477,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3587,7 +3589,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3601,7 +3603,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3713,7 +3715,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3726,7 +3728,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3838,7 +3840,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3853,7 +3855,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3983,7 +3985,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3994,7 +3996,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4062,7 +4064,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranch', () => { + describe('projectLocationDataStoreBranch', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranch'; const expectedParameters = { project: 'projectValue', @@ -4074,7 +4076,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchPathTemplate.match = @@ -4155,7 +4157,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4168,7 +4170,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4280,7 +4282,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4295,7 +4297,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4425,7 +4427,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4437,7 +4439,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4520,7 +4522,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4532,7 +4534,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4626,7 +4628,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4639,7 +4641,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4733,7 +4735,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4745,7 +4747,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4822,7 +4824,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4834,7 +4836,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4915,7 +4917,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4927,7 +4929,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5021,7 +5023,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5033,7 +5035,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5116,7 +5118,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5129,7 +5131,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5241,7 +5243,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5253,7 +5255,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5329,7 +5331,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5342,7 +5344,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5437,7 +5439,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5450,7 +5452,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5545,7 +5547,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5557,7 +5559,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5621,7 +5623,7 @@ describe('v1beta.SearchServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5632,7 +5634,7 @@ describe('v1beta.SearchServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1.ts index bf73ca77ae5..6fb0c9149c5 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1.ts @@ -263,7 +263,9 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchTuningServiceStub); client.close().then(() => { done(); @@ -330,7 +332,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListCustomModelsRequest() ); @@ -363,7 +365,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListCustomModelsRequest() ); @@ -412,7 +414,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListCustomModelsRequest() ); @@ -445,7 +447,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListCustomModelsRequest() ); @@ -468,7 +470,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.TrainCustomModelRequest() ); @@ -503,7 +505,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.TrainCustomModelRequest() ); @@ -559,7 +561,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.TrainCustomModelRequest() ); @@ -592,7 +594,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.TrainCustomModelRequest() ); @@ -627,7 +629,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -651,7 +653,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -673,7 +675,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -705,7 +707,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -751,7 +753,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -788,7 +790,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -838,7 +840,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -881,7 +883,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -966,7 +968,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1052,7 +1054,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1154,8 +1156,7 @@ describe('v1.SearchTuningServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1176,7 +1177,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1185,8 +1186,7 @@ describe('v1.SearchTuningServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1202,7 +1202,7 @@ describe('v1.SearchTuningServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1216,7 +1216,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1280,7 +1280,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1291,7 +1291,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1320,7 +1320,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1334,7 +1334,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1423,7 +1423,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1440,7 +1440,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1571,7 +1571,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1589,7 +1589,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1738,7 +1738,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1754,7 +1754,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1866,7 +1866,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1882,7 +1882,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -1995,7 +1995,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2011,7 +2011,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2124,7 +2124,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2139,7 +2139,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2234,7 +2234,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2250,7 +2250,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2362,7 +2362,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2378,7 +2378,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2490,7 +2490,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2507,7 +2507,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2638,7 +2638,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2653,7 +2653,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2748,7 +2748,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2764,7 +2764,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -2877,7 +2877,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -2892,7 +2892,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3004,7 +3004,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3020,7 +3020,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3132,7 +3132,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3147,7 +3147,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3259,7 +3259,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3276,7 +3276,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3406,7 +3406,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3419,7 +3419,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3487,7 +3487,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3502,7 +3502,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3614,7 +3614,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3631,7 +3631,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3761,7 +3761,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3775,7 +3775,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -3858,7 +3858,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -3872,7 +3872,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -3966,7 +3966,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -3981,7 +3981,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4075,7 +4075,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4089,7 +4089,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4166,7 +4166,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4180,7 +4180,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4261,7 +4261,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4275,7 +4275,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4358,7 +4358,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4373,7 +4373,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4485,7 +4485,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4499,7 +4499,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4575,7 +4575,7 @@ describe('v1.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4590,7 +4590,7 @@ describe('v1.SearchTuningServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1alpha.ts index a5ad63c16ce..2f911c0b34e 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1alpha.ts @@ -265,7 +265,9 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchTuningServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListCustomModelsRequest() ); @@ -360,7 +362,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListCustomModelsRequest() ); @@ -408,7 +410,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListCustomModelsRequest() ); @@ -440,7 +442,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListCustomModelsRequest() ); @@ -462,7 +464,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest() ); @@ -496,7 +498,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest() ); @@ -551,7 +553,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest() ); @@ -583,7 +585,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest() ); @@ -617,7 +619,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -640,7 +642,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -661,7 +663,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -692,7 +694,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -737,7 +739,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -773,7 +775,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -822,7 +824,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -864,7 +866,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -946,7 +948,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1029,7 +1031,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1128,8 +1130,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1149,7 +1150,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1158,8 +1159,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1175,7 +1175,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1186,7 +1186,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1225,7 +1225,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1238,7 +1238,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1302,7 +1302,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1314,7 +1314,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1367,7 +1367,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1377,7 +1377,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1406,7 +1406,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1419,7 +1419,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1508,7 +1508,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1524,7 +1524,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1655,7 +1655,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1672,7 +1672,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1821,7 +1821,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1836,7 +1836,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1948,7 +1948,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1963,7 +1963,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2076,7 +2076,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2091,7 +2091,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2204,7 +2204,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2218,7 +2218,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2313,7 +2313,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2328,7 +2328,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2440,7 +2440,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2455,7 +2455,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2568,7 +2568,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2583,7 +2583,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2695,7 +2695,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2711,7 +2711,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2842,7 +2842,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2856,7 +2856,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2951,7 +2951,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2966,7 +2966,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3079,7 +3079,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3093,7 +3093,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3205,7 +3205,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3220,7 +3220,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3332,7 +3332,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3347,7 +3347,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3459,7 +3459,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3473,7 +3473,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3585,7 +3585,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3601,7 +3601,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3731,7 +3731,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3743,7 +3743,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3811,7 +3811,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3825,7 +3825,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3937,7 +3937,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3953,7 +3953,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4083,7 +4083,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4096,7 +4096,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4179,7 +4179,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4192,7 +4192,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4286,7 +4286,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4300,7 +4300,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4394,7 +4394,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4407,7 +4407,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4484,7 +4484,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4497,7 +4497,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4578,7 +4578,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4591,7 +4591,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4685,7 +4685,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4698,7 +4698,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4781,7 +4781,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4795,7 +4795,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4907,7 +4907,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4920,7 +4920,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4996,7 +4996,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5010,7 +5010,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5105,7 +5105,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5118,7 +5118,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5182,7 +5182,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5194,7 +5194,7 @@ describe('v1alpha.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1beta.ts index fdb8b11ec00..89bede10edb 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_tuning_service_v1beta.ts @@ -265,7 +265,9 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.searchTuningServiceStub); client.close().then(() => { done(); @@ -328,7 +330,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest() ); @@ -360,7 +362,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest() ); @@ -408,7 +410,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest() ); @@ -440,7 +442,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest() ); @@ -462,7 +464,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest() ); @@ -496,7 +498,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest() ); @@ -551,7 +553,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest() ); @@ -583,7 +585,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest() ); @@ -617,7 +619,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -640,7 +642,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -661,7 +663,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -692,7 +694,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -737,7 +739,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -773,7 +775,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -822,7 +824,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -864,7 +866,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -946,7 +948,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1029,7 +1031,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1128,8 +1130,7 @@ describe('v1beta.SearchTuningServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1149,7 +1150,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1158,8 +1159,7 @@ describe('v1beta.SearchTuningServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1175,7 +1175,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1188,7 +1188,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1252,7 +1252,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1264,7 +1264,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1317,7 +1317,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1329,7 +1329,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1383,7 +1383,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1393,7 +1393,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1422,7 +1422,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1435,7 +1435,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1524,7 +1524,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1540,7 +1540,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1671,7 +1671,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1688,7 +1688,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1837,7 +1837,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1852,7 +1852,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1964,7 +1964,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1979,7 +1979,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2092,7 +2092,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2107,7 +2107,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2220,7 +2220,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2234,7 +2234,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2329,7 +2329,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2344,7 +2344,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2456,7 +2456,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2471,7 +2471,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2584,7 +2584,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2599,7 +2599,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2711,7 +2711,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2727,7 +2727,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2858,7 +2858,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2872,7 +2872,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2967,7 +2967,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -2982,7 +2982,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3095,7 +3095,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3110,7 +3110,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3223,7 +3223,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3237,7 +3237,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3349,7 +3349,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3364,7 +3364,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3476,7 +3476,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3491,7 +3491,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3603,7 +3603,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3617,7 +3617,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3729,7 +3729,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3745,7 +3745,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3875,7 +3875,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3887,7 +3887,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3955,7 +3955,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3969,7 +3969,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4081,7 +4081,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4097,7 +4097,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4227,7 +4227,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4240,7 +4240,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4323,7 +4323,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4336,7 +4336,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4430,7 +4430,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4444,7 +4444,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4538,7 +4538,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4551,7 +4551,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4628,7 +4628,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4641,7 +4641,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4722,7 +4722,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4735,7 +4735,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4829,7 +4829,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4842,7 +4842,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4925,7 +4925,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4939,7 +4939,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5051,7 +5051,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5064,7 +5064,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5140,7 +5140,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5154,7 +5154,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5249,7 +5249,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5263,7 +5263,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5358,7 +5358,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5371,7 +5371,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5435,7 +5435,7 @@ describe('v1beta.SearchTuningServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5447,7 +5447,7 @@ describe('v1beta.SearchTuningServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1alpha.ts index bc8a4544017..b67e4a86e06 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1alpha.ts @@ -268,7 +268,9 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.servingConfigServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateServingConfigRequest() ); @@ -365,7 +367,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateServingConfigRequest() ); @@ -414,7 +416,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateServingConfigRequest() ); @@ -447,7 +449,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateServingConfigRequest() ); @@ -470,7 +472,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetServingConfigRequest() ); @@ -502,7 +504,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetServingConfigRequest() ); @@ -550,7 +552,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetServingConfigRequest() ); @@ -582,7 +584,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetServingConfigRequest() ); @@ -604,7 +606,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListServingConfigsRequest() ); @@ -645,7 +647,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListServingConfigsRequest() ); @@ -703,7 +705,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListServingConfigsRequest() ); @@ -735,7 +737,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListServingConfigsRequest() ); @@ -799,7 +801,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListServingConfigsRequest() ); @@ -852,7 +854,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListServingConfigsRequest() ); @@ -903,7 +905,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListServingConfigsRequest() ); @@ -946,7 +948,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -977,7 +979,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1022,7 +1024,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1058,7 +1060,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1107,7 +1109,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1144,7 +1146,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1155,7 +1157,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1194,7 +1196,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1207,7 +1209,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1271,7 +1273,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1283,7 +1285,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1336,7 +1338,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1347,7 +1349,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1386,7 +1388,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1396,7 +1398,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1425,7 +1427,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1438,7 +1440,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1527,7 +1529,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1543,7 +1545,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1674,7 +1676,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1691,7 +1693,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1840,7 +1842,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1855,7 +1857,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1967,7 +1969,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1982,7 +1984,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2095,7 +2097,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2110,7 +2112,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2223,7 +2225,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2237,7 +2239,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2332,7 +2334,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2347,7 +2349,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2459,7 +2461,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2474,7 +2476,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2587,7 +2589,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2602,7 +2604,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2714,7 +2716,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2730,7 +2732,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2861,7 +2863,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2875,7 +2877,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2970,7 +2972,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2985,7 +2987,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3098,7 +3100,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3112,7 +3114,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3224,7 +3226,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3239,7 +3241,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3351,7 +3353,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3366,7 +3368,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3478,7 +3480,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3492,7 +3494,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3604,7 +3606,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3620,7 +3622,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3750,7 +3752,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3762,7 +3764,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3830,7 +3832,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3844,7 +3846,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3956,7 +3958,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3972,7 +3974,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4102,7 +4104,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4115,7 +4117,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4198,7 +4200,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4211,7 +4213,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4305,7 +4307,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4319,7 +4321,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4413,7 +4415,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4426,7 +4428,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4503,7 +4505,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4516,7 +4518,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4597,7 +4599,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4610,7 +4612,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4704,7 +4706,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4717,7 +4719,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4800,7 +4802,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4814,7 +4816,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4926,7 +4928,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4939,7 +4941,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5015,7 +5017,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5029,7 +5031,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5124,7 +5126,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5137,7 +5139,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5201,7 +5203,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5213,7 +5215,7 @@ describe('v1alpha.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1beta.ts index f6620cc8b55..3e36c8ec191 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_serving_config_service_v1beta.ts @@ -268,7 +268,9 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.servingConfigServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest() ); @@ -365,7 +367,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest() ); @@ -414,7 +416,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest() ); @@ -447,7 +449,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest() ); @@ -470,7 +472,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetServingConfigRequest() ); @@ -502,7 +504,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetServingConfigRequest() ); @@ -550,7 +552,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetServingConfigRequest() ); @@ -582,7 +584,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetServingConfigRequest() ); @@ -604,7 +606,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest() ); @@ -645,7 +647,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest() ); @@ -703,7 +705,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest() ); @@ -735,7 +737,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest() ); @@ -799,7 +801,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest() ); @@ -852,7 +854,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest() ); @@ -903,7 +905,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest() ); @@ -946,7 +948,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -977,7 +979,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1022,7 +1024,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1058,7 +1060,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1107,7 +1109,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1144,7 +1146,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1157,7 +1159,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1221,7 +1223,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1233,7 +1235,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1286,7 +1288,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1298,7 +1300,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1352,7 +1354,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -1363,7 +1365,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1402,7 +1404,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1412,7 +1414,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1441,7 +1443,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1454,7 +1456,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1543,7 +1545,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1559,7 +1561,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1690,7 +1692,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1707,7 +1709,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1856,7 +1858,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1871,7 +1873,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -1983,7 +1985,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -1998,7 +2000,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2111,7 +2113,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2126,7 +2128,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2239,7 +2241,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2253,7 +2255,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2348,7 +2350,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2363,7 +2365,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2475,7 +2477,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2490,7 +2492,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2603,7 +2605,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2618,7 +2620,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2730,7 +2732,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2746,7 +2748,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2877,7 +2879,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2891,7 +2893,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2986,7 +2988,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3001,7 +3003,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3114,7 +3116,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3129,7 +3131,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3242,7 +3244,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3256,7 +3258,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3368,7 +3370,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3383,7 +3385,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3495,7 +3497,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3510,7 +3512,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3622,7 +3624,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3636,7 +3638,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3748,7 +3750,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3764,7 +3766,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3894,7 +3896,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3906,7 +3908,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3974,7 +3976,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3988,7 +3990,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4100,7 +4102,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4116,7 +4118,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4246,7 +4248,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4259,7 +4261,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4342,7 +4344,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4355,7 +4357,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4449,7 +4451,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4463,7 +4465,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4557,7 +4559,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4570,7 +4572,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4647,7 +4649,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4660,7 +4662,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4741,7 +4743,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4754,7 +4756,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4848,7 +4850,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4861,7 +4863,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4944,7 +4946,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4958,7 +4960,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5070,7 +5072,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5083,7 +5085,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5159,7 +5161,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5173,7 +5175,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5268,7 +5270,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5282,7 +5284,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5377,7 +5379,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5390,7 +5392,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5454,7 +5456,7 @@ describe('v1beta.ServingConfigServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5466,7 +5468,7 @@ describe('v1beta.ServingConfigServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts index 84a90514500..dcc2c0fabde 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts @@ -305,7 +305,9 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.siteSearchEngineServiceStub); client.close().then(() => { done(); @@ -368,7 +370,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSiteSearchEngineRequest() ); @@ -401,7 +403,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSiteSearchEngineRequest() ); @@ -449,7 +451,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSiteSearchEngineRequest() ); @@ -481,7 +483,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetSiteSearchEngineRequest() ); @@ -503,7 +505,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetTargetSiteRequest() ); @@ -535,7 +537,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetTargetSiteRequest() ); @@ -583,7 +585,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetTargetSiteRequest() ); @@ -615,7 +617,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.GetTargetSiteRequest() ); @@ -637,7 +639,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateTargetSiteRequest() ); @@ -671,7 +673,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateTargetSiteRequest() ); @@ -726,7 +728,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateTargetSiteRequest() ); @@ -758,7 +760,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CreateTargetSiteRequest() ); @@ -792,7 +794,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -815,7 +817,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -837,7 +839,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchCreateTargetSitesRequest() ); @@ -871,7 +873,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchCreateTargetSitesRequest() ); @@ -926,7 +928,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchCreateTargetSitesRequest() ); @@ -961,7 +963,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchCreateTargetSitesRequest() ); @@ -995,7 +997,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1018,7 +1020,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1040,7 +1042,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateTargetSiteRequest() ); @@ -1075,7 +1077,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateTargetSiteRequest() ); @@ -1131,7 +1133,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateTargetSiteRequest() ); @@ -1164,7 +1166,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.UpdateTargetSiteRequest() ); @@ -1199,7 +1201,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1222,7 +1224,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1244,7 +1246,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteTargetSiteRequest() ); @@ -1278,7 +1280,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteTargetSiteRequest() ); @@ -1333,7 +1335,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteTargetSiteRequest() ); @@ -1365,7 +1367,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DeleteTargetSiteRequest() ); @@ -1399,7 +1401,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1422,7 +1424,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1444,7 +1446,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.EnableAdvancedSiteSearchRequest() ); @@ -1478,7 +1480,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.EnableAdvancedSiteSearchRequest() ); @@ -1533,7 +1535,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.EnableAdvancedSiteSearchRequest() ); @@ -1568,7 +1570,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.EnableAdvancedSiteSearchRequest() ); @@ -1602,7 +1604,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1626,7 +1628,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1648,7 +1650,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DisableAdvancedSiteSearchRequest() ); @@ -1682,7 +1684,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DisableAdvancedSiteSearchRequest() ); @@ -1737,7 +1739,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DisableAdvancedSiteSearchRequest() ); @@ -1772,7 +1774,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.DisableAdvancedSiteSearchRequest() ); @@ -1806,7 +1808,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1830,7 +1832,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1852,7 +1854,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecrawlUrisRequest() ); @@ -1885,7 +1887,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecrawlUrisRequest() ); @@ -1940,7 +1942,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecrawlUrisRequest() ); @@ -1972,7 +1974,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.RecrawlUrisRequest() ); @@ -2006,7 +2008,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2029,7 +2031,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2048,7 +2050,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchVerifyTargetSitesRequest() ); @@ -2082,7 +2084,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchVerifyTargetSitesRequest() ); @@ -2137,7 +2139,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchVerifyTargetSitesRequest() ); @@ -2172,7 +2174,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.BatchVerifyTargetSitesRequest() ); @@ -2206,7 +2208,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2229,7 +2231,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2251,7 +2253,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListTargetSitesRequest() ); @@ -2291,7 +2293,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListTargetSitesRequest() ); @@ -2347,7 +2349,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListTargetSitesRequest() ); @@ -2379,7 +2381,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListTargetSitesRequest() ); @@ -2441,7 +2443,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListTargetSitesRequest() ); @@ -2492,7 +2494,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListTargetSitesRequest() ); @@ -2543,7 +2545,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ListTargetSitesRequest() ); @@ -2587,7 +2589,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.FetchDomainVerificationStatusRequest() ); @@ -2628,7 +2630,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.FetchDomainVerificationStatusRequest() ); @@ -2684,7 +2686,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.FetchDomainVerificationStatusRequest() ); @@ -2719,7 +2721,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.FetchDomainVerificationStatusRequest() ); @@ -2790,7 +2792,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.FetchDomainVerificationStatusRequest() ); @@ -2850,7 +2852,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.FetchDomainVerificationStatusRequest() ); @@ -2905,7 +2907,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.FetchDomainVerificationStatusRequest() ); @@ -2952,7 +2954,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2983,7 +2985,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3028,7 +3030,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3064,7 +3066,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3113,7 +3115,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3155,7 +3157,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3237,7 +3239,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3320,7 +3322,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3419,8 +3421,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3440,7 +3441,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3449,8 +3450,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3466,7 +3466,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -3479,7 +3479,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3543,7 +3543,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -3553,7 +3553,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3582,7 +3582,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -3595,7 +3595,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -3684,7 +3684,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -3700,7 +3700,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -3831,7 +3831,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3848,7 +3848,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -3997,7 +3997,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -4012,7 +4012,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -4124,7 +4124,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -4139,7 +4139,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -4252,7 +4252,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -4267,7 +4267,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -4380,7 +4380,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4394,7 +4394,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4489,7 +4489,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -4504,7 +4504,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -4616,7 +4616,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -4631,7 +4631,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -4743,7 +4743,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -4759,7 +4759,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -4890,7 +4890,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4904,7 +4904,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -4999,7 +4999,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5014,7 +5014,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5127,7 +5127,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -5141,7 +5141,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -5253,7 +5253,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -5268,7 +5268,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -5380,7 +5380,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -5394,7 +5394,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -5506,7 +5506,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -5522,7 +5522,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -5652,7 +5652,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -5664,7 +5664,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5732,7 +5732,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -5746,7 +5746,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -5858,7 +5858,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -5874,7 +5874,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -6004,7 +6004,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -6017,7 +6017,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -6100,7 +6100,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -6113,7 +6113,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -6207,7 +6207,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -6221,7 +6221,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -6315,7 +6315,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -6328,7 +6328,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -6405,7 +6405,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -6418,7 +6418,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -6499,7 +6499,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -6512,7 +6512,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -6595,7 +6595,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -6609,7 +6609,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -6721,7 +6721,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -6734,7 +6734,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -6810,7 +6810,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -6824,7 +6824,7 @@ describe('v1.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1alpha.ts index 4ef53a1da91..6ecd0e77a2a 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1alpha.ts @@ -311,7 +311,9 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.siteSearchEngineServiceStub); client.close().then(() => { done(); @@ -382,7 +384,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSiteSearchEngineRequest() ); @@ -417,7 +419,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSiteSearchEngineRequest() ); @@ -467,7 +469,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSiteSearchEngineRequest() ); @@ -501,7 +503,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetSiteSearchEngineRequest() ); @@ -525,7 +527,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetTargetSiteRequest() ); @@ -559,7 +561,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetTargetSiteRequest() ); @@ -609,7 +611,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetTargetSiteRequest() ); @@ -643,7 +645,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetTargetSiteRequest() ); @@ -667,7 +669,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetUriPatternDocumentDataRequest() ); @@ -702,7 +704,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetUriPatternDocumentDataRequest() ); @@ -752,7 +754,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetUriPatternDocumentDataRequest() ); @@ -789,7 +791,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.GetUriPatternDocumentDataRequest() ); @@ -816,7 +818,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateTargetSiteRequest() ); @@ -852,7 +854,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateTargetSiteRequest() ); @@ -909,7 +911,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateTargetSiteRequest() ); @@ -943,7 +945,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CreateTargetSiteRequest() ); @@ -979,7 +981,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1004,7 +1006,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1028,7 +1030,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchCreateTargetSitesRequest() ); @@ -1064,7 +1066,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchCreateTargetSitesRequest() ); @@ -1121,7 +1123,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchCreateTargetSitesRequest() ); @@ -1158,7 +1160,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchCreateTargetSitesRequest() ); @@ -1194,7 +1196,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1219,7 +1221,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1243,7 +1245,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateTargetSiteRequest() ); @@ -1280,7 +1282,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateTargetSiteRequest() ); @@ -1338,7 +1340,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateTargetSiteRequest() ); @@ -1373,7 +1375,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.UpdateTargetSiteRequest() ); @@ -1410,7 +1412,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1435,7 +1437,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1459,7 +1461,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteTargetSiteRequest() ); @@ -1495,7 +1497,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteTargetSiteRequest() ); @@ -1552,7 +1554,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteTargetSiteRequest() ); @@ -1586,7 +1588,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DeleteTargetSiteRequest() ); @@ -1622,7 +1624,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1647,7 +1649,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1671,7 +1673,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EnableAdvancedSiteSearchRequest() ); @@ -1707,7 +1709,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EnableAdvancedSiteSearchRequest() ); @@ -1764,7 +1766,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EnableAdvancedSiteSearchRequest() ); @@ -1801,7 +1803,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.EnableAdvancedSiteSearchRequest() ); @@ -1837,7 +1839,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1863,7 +1865,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1887,7 +1889,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DisableAdvancedSiteSearchRequest() ); @@ -1923,7 +1925,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DisableAdvancedSiteSearchRequest() ); @@ -1980,7 +1982,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DisableAdvancedSiteSearchRequest() ); @@ -2017,7 +2019,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.DisableAdvancedSiteSearchRequest() ); @@ -2053,7 +2055,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2079,7 +2081,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2103,7 +2105,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest() ); @@ -2138,7 +2140,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest() ); @@ -2195,7 +2197,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest() ); @@ -2229,7 +2231,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest() ); @@ -2265,7 +2267,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2290,7 +2292,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2311,7 +2313,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesRequest() ); @@ -2347,7 +2349,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesRequest() ); @@ -2404,7 +2406,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesRequest() ); @@ -2441,7 +2443,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesRequest() ); @@ -2477,7 +2479,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2502,7 +2504,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2526,7 +2528,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataRequest() ); @@ -2562,7 +2564,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataRequest() ); @@ -2619,7 +2621,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataRequest() ); @@ -2656,7 +2658,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataRequest() ); @@ -2692,7 +2694,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2718,7 +2720,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2742,7 +2744,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListTargetSitesRequest() ); @@ -2784,7 +2786,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListTargetSitesRequest() ); @@ -2844,7 +2846,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListTargetSitesRequest() ); @@ -2878,7 +2880,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListTargetSitesRequest() ); @@ -2944,7 +2946,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListTargetSitesRequest() ); @@ -2999,7 +3001,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListTargetSitesRequest() ); @@ -3052,7 +3054,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ListTargetSitesRequest() ); @@ -3098,7 +3100,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.FetchDomainVerificationStatusRequest() ); @@ -3141,7 +3143,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.FetchDomainVerificationStatusRequest() ); @@ -3201,7 +3203,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.FetchDomainVerificationStatusRequest() ); @@ -3238,7 +3240,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.FetchDomainVerificationStatusRequest() ); @@ -3313,7 +3315,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.FetchDomainVerificationStatusRequest() ); @@ -3377,7 +3379,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.FetchDomainVerificationStatusRequest() ); @@ -3434,7 +3436,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.FetchDomainVerificationStatusRequest() ); @@ -3483,7 +3485,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3516,7 +3518,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3563,7 +3565,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3601,7 +3603,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3652,7 +3654,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3696,7 +3698,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3784,7 +3786,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3873,7 +3875,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3978,8 +3980,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4001,7 +4002,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4010,8 +4011,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4027,7 +4027,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -4040,7 +4040,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4079,7 +4079,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -4094,7 +4094,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4158,7 +4158,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -4172,7 +4172,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4225,7 +4225,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4237,7 +4237,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4266,7 +4266,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -4281,7 +4281,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -4370,7 +4370,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -4388,7 +4388,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -4519,7 +4519,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4538,7 +4538,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -4687,7 +4687,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -4704,7 +4704,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -4816,7 +4816,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -4833,7 +4833,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -4946,7 +4946,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -4963,7 +4963,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -5076,7 +5076,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5092,7 +5092,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5187,7 +5187,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -5204,7 +5204,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -5316,7 +5316,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -5333,7 +5333,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -5446,7 +5446,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -5463,7 +5463,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -5575,7 +5575,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -5593,7 +5593,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -5724,7 +5724,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5740,7 +5740,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -5835,7 +5835,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5852,7 +5852,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5965,7 +5965,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -5981,7 +5981,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -6093,7 +6093,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -6110,7 +6110,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -6222,7 +6222,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -6239,7 +6239,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -6351,7 +6351,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -6367,7 +6367,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -6479,7 +6479,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -6497,7 +6497,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -6627,7 +6627,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -6641,7 +6641,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6709,7 +6709,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -6725,7 +6725,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -6837,7 +6837,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -6855,7 +6855,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -6985,7 +6985,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -7000,7 +7000,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -7083,7 +7083,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -7098,7 +7098,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -7192,7 +7192,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -7208,7 +7208,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -7302,7 +7302,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -7317,7 +7317,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -7394,7 +7394,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -7409,7 +7409,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -7490,7 +7490,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -7505,7 +7505,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -7599,7 +7599,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -7614,7 +7614,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -7697,7 +7697,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -7713,7 +7713,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -7825,7 +7825,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -7840,7 +7840,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -7916,7 +7916,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -7932,7 +7932,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -8027,7 +8027,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -8042,7 +8042,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8106,7 +8106,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -8120,7 +8120,7 @@ describe('v1alpha.SiteSearchEngineServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1beta.ts index fca1447955e..36318422926 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1beta.ts @@ -305,7 +305,9 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.siteSearchEngineServiceStub); client.close().then(() => { done(); @@ -368,7 +370,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest() ); @@ -401,7 +403,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest() ); @@ -449,7 +451,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest() ); @@ -481,7 +483,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest() ); @@ -503,7 +505,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest() ); @@ -535,7 +537,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest() ); @@ -583,7 +585,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest() ); @@ -615,7 +617,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest() ); @@ -637,7 +639,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest() ); @@ -669,7 +671,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest() ); @@ -717,7 +719,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest() ); @@ -749,7 +751,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest() ); @@ -771,7 +773,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest() ); @@ -805,7 +807,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest() ); @@ -860,7 +862,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest() ); @@ -892,7 +894,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest() ); @@ -926,7 +928,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -949,7 +951,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -971,7 +973,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest() ); @@ -1005,7 +1007,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest() ); @@ -1060,7 +1062,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest() ); @@ -1095,7 +1097,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest() ); @@ -1129,7 +1131,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1152,7 +1154,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1174,7 +1176,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest() ); @@ -1209,7 +1211,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest() ); @@ -1265,7 +1267,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest() ); @@ -1298,7 +1300,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest() ); @@ -1333,7 +1335,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1356,7 +1358,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1378,7 +1380,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest() ); @@ -1412,7 +1414,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest() ); @@ -1467,7 +1469,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest() ); @@ -1499,7 +1501,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest() ); @@ -1533,7 +1535,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1556,7 +1558,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1578,7 +1580,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSitemapRequest() ); @@ -1612,7 +1614,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSitemapRequest() ); @@ -1667,7 +1669,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSitemapRequest() ); @@ -1699,7 +1701,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CreateSitemapRequest() ); @@ -1733,7 +1735,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1756,7 +1758,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1778,7 +1780,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest() ); @@ -1812,7 +1814,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest() ); @@ -1867,7 +1869,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest() ); @@ -1899,7 +1901,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest() ); @@ -1933,7 +1935,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1956,7 +1958,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1978,7 +1980,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest() ); @@ -2012,7 +2014,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest() ); @@ -2067,7 +2069,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest() ); @@ -2102,7 +2104,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest() ); @@ -2136,7 +2138,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2160,7 +2162,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2182,7 +2184,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest() ); @@ -2216,7 +2218,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest() ); @@ -2271,7 +2273,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest() ); @@ -2306,7 +2308,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest() ); @@ -2340,7 +2342,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2364,7 +2366,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2386,7 +2388,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest() ); @@ -2419,7 +2421,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest() ); @@ -2474,7 +2476,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest() ); @@ -2506,7 +2508,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest() ); @@ -2540,7 +2542,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2563,7 +2565,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2582,7 +2584,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest() ); @@ -2616,7 +2618,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest() ); @@ -2671,7 +2673,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest() ); @@ -2706,7 +2708,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest() ); @@ -2740,7 +2742,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2763,7 +2765,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2785,7 +2787,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest() ); @@ -2825,7 +2827,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest() ); @@ -2883,7 +2885,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest() ); @@ -2915,7 +2917,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest() ); @@ -2977,7 +2979,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest() ); @@ -3028,7 +3030,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest() ); @@ -3079,7 +3081,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest() ); @@ -3123,7 +3125,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest() ); @@ -3164,7 +3166,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest() ); @@ -3222,7 +3224,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest() ); @@ -3257,7 +3259,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest() ); @@ -3328,7 +3330,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest() ); @@ -3388,7 +3390,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest() ); @@ -3443,7 +3445,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest() ); @@ -3490,7 +3492,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3521,7 +3523,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3566,7 +3568,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -3602,7 +3604,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3651,7 +3653,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -3693,7 +3695,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3775,7 +3777,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3858,7 +3860,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3957,8 +3959,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3978,7 +3979,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3987,8 +3988,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4004,7 +4004,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -4017,7 +4017,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4081,7 +4081,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -4093,7 +4093,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4146,7 +4146,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -4158,7 +4158,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4212,7 +4212,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4222,7 +4222,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4251,7 +4251,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -4264,7 +4264,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -4353,7 +4353,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -4369,7 +4369,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -4500,7 +4500,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4517,7 +4517,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -4666,7 +4666,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -4681,7 +4681,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -4793,7 +4793,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -4808,7 +4808,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -4921,7 +4921,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -4936,7 +4936,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -5049,7 +5049,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -5063,7 +5063,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -5158,7 +5158,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -5173,7 +5173,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -5285,7 +5285,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -5300,7 +5300,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -5413,7 +5413,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -5428,7 +5428,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -5540,7 +5540,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -5556,7 +5556,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -5687,7 +5687,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5701,7 +5701,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -5796,7 +5796,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5811,7 +5811,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5924,7 +5924,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5939,7 +5939,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -6052,7 +6052,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -6066,7 +6066,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -6178,7 +6178,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -6193,7 +6193,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -6305,7 +6305,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -6320,7 +6320,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -6432,7 +6432,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -6446,7 +6446,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -6558,7 +6558,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -6574,7 +6574,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -6704,7 +6704,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -6716,7 +6716,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6784,7 +6784,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -6798,7 +6798,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -6910,7 +6910,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -6926,7 +6926,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -7056,7 +7056,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -7069,7 +7069,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -7152,7 +7152,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -7165,7 +7165,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -7259,7 +7259,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -7273,7 +7273,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -7367,7 +7367,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -7380,7 +7380,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -7457,7 +7457,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -7470,7 +7470,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -7551,7 +7551,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -7564,7 +7564,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -7658,7 +7658,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -7671,7 +7671,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -7754,7 +7754,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -7768,7 +7768,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -7880,7 +7880,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -7893,7 +7893,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -7969,7 +7969,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -7983,7 +7983,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -8078,7 +8078,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -8092,7 +8092,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -8187,7 +8187,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -8200,7 +8200,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8264,7 +8264,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -8276,7 +8276,7 @@ describe('v1beta.SiteSearchEngineServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts index 8ae3a3c25c9..d48d81eee28 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts @@ -252,7 +252,9 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userEventServiceStub); client.close().then(() => { done(); @@ -311,7 +313,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.WriteUserEventRequest() ); @@ -342,7 +344,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.WriteUserEventRequest() ); @@ -389,7 +391,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.WriteUserEventRequest() ); @@ -420,7 +422,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.WriteUserEventRequest() ); @@ -441,7 +443,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CollectUserEventRequest() ); @@ -472,7 +474,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CollectUserEventRequest() ); @@ -516,7 +518,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CollectUserEventRequest() ); @@ -547,7 +549,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.CollectUserEventRequest() ); @@ -568,7 +570,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeUserEventsRequest() ); @@ -601,7 +603,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeUserEventsRequest() ); @@ -655,7 +657,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeUserEventsRequest() ); @@ -686,7 +688,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.PurgeUserEventsRequest() ); @@ -719,7 +721,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -741,7 +743,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -762,7 +764,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportUserEventsRequest() ); @@ -795,7 +797,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportUserEventsRequest() ); @@ -849,7 +851,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportUserEventsRequest() ); @@ -880,7 +882,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1.ImportUserEventsRequest() ); @@ -913,7 +915,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -935,7 +937,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -955,7 +957,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -985,7 +987,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1064,7 +1066,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1112,7 +1114,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1153,7 +1155,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1232,7 +1234,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1312,7 +1314,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1408,8 +1410,7 @@ describe('v1.UserEventServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1428,7 +1429,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1437,8 +1438,7 @@ describe('v1.UserEventServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1454,7 +1454,7 @@ describe('v1.UserEventServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1466,7 +1466,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1530,7 +1530,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1539,7 +1539,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1568,7 +1568,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1580,7 +1580,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1669,7 +1669,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1684,7 +1684,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1815,7 +1815,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1831,7 +1831,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -1980,7 +1980,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -1994,7 +1994,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2106,7 +2106,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2120,7 +2120,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2233,7 +2233,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2247,7 +2247,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2360,7 +2360,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2373,7 +2373,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2468,7 +2468,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2482,7 +2482,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2594,7 +2594,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2608,7 +2608,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2720,7 +2720,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2735,7 +2735,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -2866,7 +2866,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -2879,7 +2879,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -2974,7 +2974,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -2988,7 +2988,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3101,7 +3101,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3114,7 +3114,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3226,7 +3226,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3240,7 +3240,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3352,7 +3352,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3365,7 +3365,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3477,7 +3477,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3492,7 +3492,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3622,7 +3622,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -3633,7 +3633,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3701,7 +3701,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -3714,7 +3714,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -3826,7 +3826,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -3841,7 +3841,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -3971,7 +3971,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -3983,7 +3983,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4066,7 +4066,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4078,7 +4078,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4172,7 +4172,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4185,7 +4185,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4279,7 +4279,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4291,7 +4291,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4368,7 +4368,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4380,7 +4380,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4461,7 +4461,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4473,7 +4473,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -4556,7 +4556,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -4569,7 +4569,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -4681,7 +4681,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -4693,7 +4693,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -4769,7 +4769,7 @@ describe('v1.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -4782,7 +4782,7 @@ describe('v1.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = diff --git a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1alpha.ts b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1alpha.ts index 4b46a27ceb9..b49285979e4 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1alpha.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1alpha.ts @@ -257,7 +257,9 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userEventServiceStub); client.close().then(() => { done(); @@ -316,7 +318,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest() ); @@ -347,7 +349,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest() ); @@ -394,7 +396,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest() ); @@ -425,7 +427,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest() ); @@ -446,7 +448,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest() ); @@ -477,7 +479,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest() ); @@ -521,7 +523,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest() ); @@ -552,7 +554,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest() ); @@ -573,7 +575,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest() ); @@ -606,7 +608,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest() ); @@ -660,7 +662,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest() ); @@ -691,7 +693,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest() ); @@ -724,7 +726,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -746,7 +748,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -767,7 +769,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest() ); @@ -800,7 +802,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest() ); @@ -854,7 +856,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest() ); @@ -885,7 +887,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest() ); @@ -918,7 +920,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -940,7 +942,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -960,7 +962,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -990,7 +992,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1034,7 +1036,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1069,7 +1071,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1117,7 +1119,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1158,7 +1160,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1237,7 +1239,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1317,7 +1319,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1413,8 +1415,7 @@ describe('v1alpha.UserEventServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1433,7 +1434,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1442,8 +1443,7 @@ describe('v1alpha.UserEventServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1459,7 +1459,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); describe('Path templates', () => { - describe('aclConfig', () => { + describe('aclConfig', async () => { const fakePath = '/rendered/path/aclConfig'; const expectedParameters = { project: 'projectValue', @@ -1469,7 +1469,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.aclConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1508,7 +1508,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1520,7 +1520,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1584,7 +1584,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1595,7 +1595,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1648,7 +1648,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1657,7 +1657,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1686,7 +1686,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1698,7 +1698,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1787,7 +1787,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1802,7 +1802,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1933,7 +1933,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1949,7 +1949,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2098,7 +2098,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2112,7 +2112,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2224,7 +2224,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2238,7 +2238,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2351,7 +2351,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2365,7 +2365,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2478,7 +2478,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2491,7 +2491,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2586,7 +2586,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2600,7 +2600,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2712,7 +2712,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2726,7 +2726,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2839,7 +2839,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2853,7 +2853,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2965,7 +2965,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2980,7 +2980,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3111,7 +3111,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3124,7 +3124,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3219,7 +3219,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3233,7 +3233,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3346,7 +3346,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3359,7 +3359,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3471,7 +3471,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3485,7 +3485,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3597,7 +3597,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3611,7 +3611,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3723,7 +3723,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3736,7 +3736,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3848,7 +3848,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -3863,7 +3863,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -3993,7 +3993,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4004,7 +4004,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4072,7 +4072,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4085,7 +4085,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4197,7 +4197,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4212,7 +4212,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4342,7 +4342,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4354,7 +4354,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4437,7 +4437,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4449,7 +4449,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4543,7 +4543,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4556,7 +4556,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4650,7 +4650,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4662,7 +4662,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4739,7 +4739,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4751,7 +4751,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4832,7 +4832,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4844,7 +4844,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -4938,7 +4938,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -4950,7 +4950,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5033,7 +5033,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5046,7 +5046,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5158,7 +5158,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5170,7 +5170,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5246,7 +5246,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5259,7 +5259,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5354,7 +5354,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5366,7 +5366,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5430,7 +5430,7 @@ describe('v1alpha.UserEventServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5441,7 +5441,7 @@ describe('v1alpha.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts index 983114eabaf..4fba6ec83b0 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts @@ -254,7 +254,9 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.userEventServiceStub); client.close().then(() => { done(); @@ -313,7 +315,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.WriteUserEventRequest() ); @@ -344,7 +346,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.WriteUserEventRequest() ); @@ -391,7 +393,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.WriteUserEventRequest() ); @@ -422,7 +424,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.WriteUserEventRequest() ); @@ -443,7 +445,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CollectUserEventRequest() ); @@ -474,7 +476,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CollectUserEventRequest() ); @@ -518,7 +520,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CollectUserEventRequest() ); @@ -549,7 +551,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.CollectUserEventRequest() ); @@ -570,7 +572,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest() ); @@ -603,7 +605,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest() ); @@ -657,7 +659,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest() ); @@ -688,7 +690,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest() ); @@ -721,7 +723,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -743,7 +745,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -764,7 +766,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest() ); @@ -797,7 +799,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest() ); @@ -851,7 +853,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest() ); @@ -882,7 +884,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest() ); @@ -915,7 +917,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -937,7 +939,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -957,7 +959,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -987,7 +989,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1031,7 +1033,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1066,7 +1068,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1114,7 +1116,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1155,7 +1157,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1234,7 +1236,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -1314,7 +1316,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -1410,8 +1412,7 @@ describe('v1beta.UserEventServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1430,7 +1431,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -1439,8 +1440,7 @@ describe('v1beta.UserEventServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -1456,7 +1456,7 @@ describe('v1beta.UserEventServiceClient', () => { }); describe('Path templates', () => { - describe('engine', () => { + describe('engine', async () => { const fakePath = '/rendered/path/engine'; const expectedParameters = { project: 'projectValue', @@ -1468,7 +1468,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enginePathTemplate.render = sinon .stub() .returns(fakePath); @@ -1532,7 +1532,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -1543,7 +1543,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1596,7 +1596,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('groundingConfig', () => { + describe('groundingConfig', async () => { const fakePath = '/rendered/path/groundingConfig'; const expectedParameters = { project: 'projectValue', @@ -1607,7 +1607,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.groundingConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1661,7 +1661,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1670,7 +1670,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1699,7 +1699,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStore', () => { + describe('projectLocationCollectionDataStore', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStore'; const expectedParameters = { project: 'projectValue', @@ -1711,7 +1711,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = @@ -1800,7 +1800,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocument', () => { + describe('projectLocationCollectionDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; const expectedParameters = { @@ -1815,7 +1815,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = @@ -1946,7 +1946,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + describe('projectLocationCollectionDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -1962,7 +1962,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = @@ -2111,7 +2111,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreControl', () => { + describe('projectLocationCollectionDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; const expectedParameters = { @@ -2125,7 +2125,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreControlPathTemplate.match = @@ -2237,7 +2237,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreConversation', () => { + describe('projectLocationCollectionDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreConversation'; const expectedParameters = { @@ -2251,7 +2251,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match = @@ -2364,7 +2364,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreCustomTuningModel', () => { + describe('projectLocationCollectionDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreCustomTuningModel'; const expectedParameters = { @@ -2378,7 +2378,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreCustomTuningModelPathTemplate.match = @@ -2491,7 +2491,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreDocumentProcessingConfig', () => { + describe('projectLocationCollectionDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -2504,7 +2504,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreDocumentProcessingConfigPathTemplate.match = @@ -2599,7 +2599,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSchema', () => { + describe('projectLocationCollectionDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSchema'; const expectedParameters = { @@ -2613,7 +2613,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = @@ -2725,7 +2725,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreServingConfig', () => { + describe('projectLocationCollectionDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; const expectedParameters = { @@ -2739,7 +2739,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = @@ -2852,7 +2852,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSession', () => { + describe('projectLocationCollectionDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSession'; const expectedParameters = { @@ -2866,7 +2866,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionPathTemplate.match = @@ -2978,7 +2978,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSessionAnswer', () => { + describe('projectLocationCollectionDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSessionAnswer'; const expectedParameters = { @@ -2993,7 +2993,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSessionAnswerPathTemplate.match = @@ -3124,7 +3124,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngine', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngine'; const expectedParameters = { @@ -3137,7 +3137,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match = @@ -3232,7 +3232,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -3246,7 +3246,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -3359,7 +3359,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationCollectionDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -3373,7 +3373,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -3486,7 +3486,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineControl', () => { + describe('projectLocationCollectionEngineControl', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineControl'; const expectedParameters = { project: 'projectValue', @@ -3499,7 +3499,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineControlPathTemplate.match = @@ -3611,7 +3611,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineConversation', () => { + describe('projectLocationCollectionEngineConversation', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineConversation'; const expectedParameters = { @@ -3625,7 +3625,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match = @@ -3737,7 +3737,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineServingConfig', () => { + describe('projectLocationCollectionEngineServingConfig', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineServingConfig'; const expectedParameters = { @@ -3751,7 +3751,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match = @@ -3863,7 +3863,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSession', () => { + describe('projectLocationCollectionEngineSession', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSession'; const expectedParameters = { project: 'projectValue', @@ -3876,7 +3876,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionPathTemplate.match = @@ -3988,7 +3988,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationCollectionEngineSessionAnswer', () => { + describe('projectLocationCollectionEngineSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationCollectionEngineSessionAnswer'; const expectedParameters = { @@ -4003,7 +4003,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationCollectionEngineSessionAnswerPathTemplate.match = @@ -4133,7 +4133,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStore', () => { + describe('projectLocationDataStore', async () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { project: 'projectValue', @@ -4144,7 +4144,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4212,7 +4212,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocument', () => { + describe('projectLocationDataStoreBranchDocument', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; const expectedParameters = { project: 'projectValue', @@ -4225,7 +4225,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = @@ -4337,7 +4337,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreBranchDocumentChunk', () => { + describe('projectLocationDataStoreBranchDocumentChunk', async () => { const fakePath = '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; const expectedParameters = { @@ -4352,7 +4352,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = @@ -4482,7 +4482,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreControl', () => { + describe('projectLocationDataStoreControl', async () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { project: 'projectValue', @@ -4494,7 +4494,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreControlPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreControlPathTemplate.match = @@ -4577,7 +4577,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreConversation', () => { + describe('projectLocationDataStoreConversation', async () => { const fakePath = '/rendered/path/projectLocationDataStoreConversation'; const expectedParameters = { project: 'projectValue', @@ -4589,7 +4589,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreConversationPathTemplate.match = @@ -4683,7 +4683,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreCustomTuningModel', () => { + describe('projectLocationDataStoreCustomTuningModel', async () => { const fakePath = '/rendered/path/projectLocationDataStoreCustomTuningModel'; const expectedParameters = { @@ -4696,7 +4696,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreCustomTuningModelPathTemplate.match = @@ -4790,7 +4790,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreDocumentProcessingConfig', () => { + describe('projectLocationDataStoreDocumentProcessingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreDocumentProcessingConfig'; const expectedParameters = { @@ -4802,7 +4802,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreDocumentProcessingConfigPathTemplate.match = @@ -4879,7 +4879,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSchema', () => { + describe('projectLocationDataStoreSchema', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSchema'; const expectedParameters = { project: 'projectValue', @@ -4891,7 +4891,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = @@ -4972,7 +4972,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreServingConfig', () => { + describe('projectLocationDataStoreServingConfig', async () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { project: 'projectValue', @@ -4984,7 +4984,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = @@ -5078,7 +5078,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSession', () => { + describe('projectLocationDataStoreSession', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSession'; const expectedParameters = { project: 'projectValue', @@ -5090,7 +5090,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionPathTemplate.match = @@ -5173,7 +5173,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSessionAnswer', () => { + describe('projectLocationDataStoreSessionAnswer', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSessionAnswer'; const expectedParameters = { project: 'projectValue', @@ -5186,7 +5186,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSessionAnswerPathTemplate.match = @@ -5298,7 +5298,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngine', () => { + describe('projectLocationDataStoreSiteSearchEngine', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngine'; const expectedParameters = { @@ -5310,7 +5310,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match = @@ -5386,7 +5386,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineSitemap', () => { + describe('projectLocationDataStoreSiteSearchEngineSitemap', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineSitemap'; const expectedParameters = { @@ -5399,7 +5399,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match = @@ -5494,7 +5494,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('projectLocationDataStoreSiteSearchEngineTargetSite', () => { + describe('projectLocationDataStoreSiteSearchEngineTargetSite', async () => { const fakePath = '/rendered/path/projectLocationDataStoreSiteSearchEngineTargetSite'; const expectedParameters = { @@ -5507,7 +5507,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render = sinon.stub().returns(fakePath); client.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match = @@ -5602,7 +5602,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('sampleQuery', () => { + describe('sampleQuery', async () => { const fakePath = '/rendered/path/sampleQuery'; const expectedParameters = { project: 'projectValue', @@ -5614,7 +5614,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQueryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5678,7 +5678,7 @@ describe('v1beta.UserEventServiceClient', () => { }); }); - describe('sampleQuerySet', () => { + describe('sampleQuerySet', async () => { const fakePath = '/rendered/path/sampleQuerySet'; const expectedParameters = { project: 'projectValue', @@ -5689,7 +5689,7 @@ describe('v1beta.UserEventServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sampleQuerySetPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-documentai/package.json b/packages/google-cloud-documentai/package.json index 4baa2f420d6..68762788634 100644 --- a/packages/google-cloud-documentai/package.json +++ b/packages/google-cloud-documentai/package.json @@ -32,7 +32,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts b/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts index 6c11bf2b49b..bfef07226dc 100644 --- a/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts +++ b/packages/google-cloud-documentai/src/v1/document_processor_service_client.ts @@ -771,7 +771,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('processDocument request %j', request); const wrappedCallback: | Callback< @@ -888,7 +890,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchProcessorTypes request %j', request); const wrappedCallback: | Callback< @@ -1007,7 +1011,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcessorType request %j', request); const wrappedCallback: | Callback< @@ -1120,7 +1126,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcessor request %j', request); const wrappedCallback: | Callback< @@ -1236,7 +1244,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcessorVersion request %j', request); const wrappedCallback: | Callback< @@ -1369,7 +1379,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProcessor request %j', request); const wrappedCallback: | Callback< @@ -1487,7 +1499,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvaluation request %j', request); const wrappedCallback: | Callback< @@ -1642,7 +1656,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1828,7 +1844,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1996,7 +2014,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2163,7 +2183,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2330,7 +2352,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2498,7 +2522,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2665,7 +2691,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2832,7 +2860,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3010,7 +3040,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ processor: request.processor ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3188,7 +3220,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ human_review_config: request.humanReviewConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3362,7 +3396,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ processor_version: request.processorVersion ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3527,7 +3563,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1.IListProcessorTypesRequest, @@ -3595,7 +3633,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorTypes stream %j', request); return this.descriptors.page.listProcessorTypes.createStream( this.innerApiCalls.listProcessorTypes as GaxCall, @@ -3645,7 +3685,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorTypes iterate %j', request); return this.descriptors.page.listProcessorTypes.asyncIterate( this.innerApiCalls['listProcessorTypes'] as GaxCall, @@ -3751,7 +3793,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1.IListProcessorsRequest, @@ -3820,7 +3864,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessors stream %j', request); return this.descriptors.page.listProcessors.createStream( this.innerApiCalls.listProcessors as GaxCall, @@ -3871,7 +3917,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessors iterate %j', request); return this.descriptors.page.listProcessors.asyncIterate( this.innerApiCalls['listProcessors'] as GaxCall, @@ -3978,7 +4026,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1.IListProcessorVersionsRequest, @@ -4048,7 +4098,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorVersions stream %j', request); return this.descriptors.page.listProcessorVersions.createStream( this.innerApiCalls.listProcessorVersions as GaxCall, @@ -4100,7 +4152,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorVersions iterate %j', request); return this.descriptors.page.listProcessorVersions.asyncIterate( this.innerApiCalls['listProcessorVersions'] as GaxCall, @@ -4208,7 +4262,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1.IListEvaluationsRequest, @@ -4279,7 +4335,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations stream %j', request); return this.descriptors.page.listEvaluations.createStream( this.innerApiCalls.listEvaluations as GaxCall, @@ -4332,7 +4390,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations iterate %j', request); return this.descriptors.page.listEvaluations.asyncIterate( this.innerApiCalls['listEvaluations'] as GaxCall, @@ -4512,7 +4572,7 @@ export class DocumentProcessorServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-documentai/src/v1beta2/document_understanding_service_client.ts b/packages/google-cloud-documentai/src/v1beta2/document_understanding_service_client.ts index 12f75a51d6d..c55c5777e38 100644 --- a/packages/google-cloud-documentai/src/v1beta2/document_understanding_service_client.ts +++ b/packages/google-cloud-documentai/src/v1beta2/document_understanding_service_client.ts @@ -856,7 +856,7 @@ export class DocumentUnderstandingServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { return this.operationsClient.listOperationsAsync(request, options); } /** diff --git a/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts b/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts index 4c18e82cb36..df5da45f171 100644 --- a/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts +++ b/packages/google-cloud-documentai/src/v1beta3/document_processor_service_client.ts @@ -799,7 +799,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('processDocument request %j', request); const wrappedCallback: | Callback< @@ -924,7 +926,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('fetchProcessorTypes request %j', request); const wrappedCallback: | Callback< @@ -1049,7 +1053,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcessorType request %j', request); const wrappedCallback: | Callback< @@ -1168,7 +1174,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcessor request %j', request); const wrappedCallback: | Callback< @@ -1293,7 +1301,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProcessorVersion request %j', request); const wrappedCallback: | Callback< @@ -1432,7 +1442,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createProcessor request %j', request); const wrappedCallback: | Callback< @@ -1553,7 +1565,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEvaluation request %j', request); const wrappedCallback: | Callback< @@ -1715,7 +1729,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1901,7 +1917,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2069,7 +2087,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2236,7 +2256,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2403,7 +2425,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2571,7 +2595,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2738,7 +2764,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2905,7 +2933,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3083,7 +3113,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ processor: request.processor ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3263,7 +3295,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ human_review_config: request.humanReviewConfig ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3437,7 +3471,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ processor_version: request.processorVersion ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3614,7 +3650,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3779,7 +3817,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1beta3.IListProcessorTypesRequest, @@ -3847,7 +3887,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorTypes stream %j', request); return this.descriptors.page.listProcessorTypes.createStream( this.innerApiCalls.listProcessorTypes as GaxCall, @@ -3897,7 +3939,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorTypes']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorTypes iterate %j', request); return this.descriptors.page.listProcessorTypes.asyncIterate( this.innerApiCalls['listProcessorTypes'] as GaxCall, @@ -4003,7 +4047,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1beta3.IListProcessorsRequest, @@ -4072,7 +4118,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessors stream %j', request); return this.descriptors.page.listProcessors.createStream( this.innerApiCalls.listProcessors as GaxCall, @@ -4123,7 +4171,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessors']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessors iterate %j', request); return this.descriptors.page.listProcessors.asyncIterate( this.innerApiCalls['listProcessors'] as GaxCall, @@ -4230,7 +4280,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1beta3.IListProcessorVersionsRequest, @@ -4300,7 +4352,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorVersions stream %j', request); return this.descriptors.page.listProcessorVersions.createStream( this.innerApiCalls.listProcessorVersions as GaxCall, @@ -4352,7 +4406,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listProcessorVersions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProcessorVersions iterate %j', request); return this.descriptors.page.listProcessorVersions.asyncIterate( this.innerApiCalls['listProcessorVersions'] as GaxCall, @@ -4460,7 +4516,9 @@ export class DocumentProcessorServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1beta3.IListEvaluationsRequest, @@ -4531,7 +4589,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations stream %j', request); return this.descriptors.page.listEvaluations.createStream( this.innerApiCalls.listEvaluations as GaxCall, @@ -4584,7 +4644,9 @@ export class DocumentProcessorServiceClient { }); const defaultCallSettings = this._defaults['listEvaluations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEvaluations iterate %j', request); return this.descriptors.page.listEvaluations.asyncIterate( this.innerApiCalls['listEvaluations'] as GaxCall, @@ -4764,7 +4826,7 @@ export class DocumentProcessorServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-documentai/src/v1beta3/document_service_client.ts b/packages/google-cloud-documentai/src/v1beta3/document_service_client.ts index 865c306a74a..45be2ba19a9 100644 --- a/packages/google-cloud-documentai/src/v1beta3/document_service_client.ts +++ b/packages/google-cloud-documentai/src/v1beta3/document_service_client.ts @@ -604,7 +604,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ dataset: request.dataset ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDocument request %j', request); const wrappedCallback: | Callback< @@ -733,7 +735,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getDatasetSchema request %j', request); const wrappedCallback: | Callback< @@ -861,7 +865,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ 'dataset_schema.name': request.datasetSchema!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateDatasetSchema request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1007,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ 'dataset.name': request.dataset!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1173,7 +1181,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ dataset: request.dataset ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1347,7 +1357,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ dataset: request.dataset ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1554,7 +1566,9 @@ export class DocumentServiceClient { this._gaxModule.routingHeader.fromParams({ dataset: request.dataset ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.documentai.v1beta3.IListDocumentsRequest, @@ -1664,7 +1678,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments stream %j', request); return this.descriptors.page.listDocuments.createStream( this.innerApiCalls.listDocuments as GaxCall, @@ -1756,7 +1772,9 @@ export class DocumentServiceClient { }); const defaultCallSettings = this._defaults['listDocuments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listDocuments iterate %j', request); return this.descriptors.page.listDocuments.asyncIterate( this.innerApiCalls['listDocuments'] as GaxCall, @@ -1936,7 +1954,7 @@ export class DocumentServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts index 9edae9e038c..c85b59429a1 100644 --- a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts +++ b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1.ts @@ -302,7 +302,9 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentProcessorServiceStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ProcessRequest() ); @@ -397,7 +399,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ProcessRequest() ); @@ -445,7 +447,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ProcessRequest() ); @@ -477,7 +479,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ProcessRequest() ); @@ -499,7 +501,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.FetchProcessorTypesRequest() ); @@ -532,7 +534,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.FetchProcessorTypesRequest() ); @@ -580,7 +582,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.FetchProcessorTypesRequest() ); @@ -612,7 +614,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.FetchProcessorTypesRequest() ); @@ -634,7 +636,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorTypeRequest() ); @@ -666,7 +668,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorTypeRequest() ); @@ -714,7 +716,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorTypeRequest() ); @@ -746,7 +748,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorTypeRequest() ); @@ -768,7 +770,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorRequest() ); @@ -800,7 +802,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorRequest() ); @@ -848,7 +850,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorRequest() ); @@ -880,7 +882,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorRequest() ); @@ -902,7 +904,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorVersionRequest() ); @@ -935,7 +937,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorVersionRequest() ); @@ -983,7 +985,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorVersionRequest() ); @@ -1015,7 +1017,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetProcessorVersionRequest() ); @@ -1037,7 +1039,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.CreateProcessorRequest() ); @@ -1069,7 +1071,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.CreateProcessorRequest() ); @@ -1117,7 +1119,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.CreateProcessorRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.CreateProcessorRequest() ); @@ -1171,7 +1173,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetEvaluationRequest() ); @@ -1203,7 +1205,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetEvaluationRequest() ); @@ -1251,7 +1253,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetEvaluationRequest() ); @@ -1283,7 +1285,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.GetEvaluationRequest() ); @@ -1305,7 +1307,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.BatchProcessRequest() ); @@ -1339,7 +1341,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.BatchProcessRequest() ); @@ -1394,7 +1396,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.BatchProcessRequest() ); @@ -1429,7 +1431,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.BatchProcessRequest() ); @@ -1463,7 +1465,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1486,7 +1488,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1508,7 +1510,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); @@ -1542,7 +1544,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); @@ -1597,7 +1599,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.TrainProcessorVersionRequest() ); @@ -1666,7 +1668,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1689,7 +1691,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1711,7 +1713,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); @@ -1745,7 +1747,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); @@ -1800,7 +1802,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); @@ -1835,7 +1837,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorVersionRequest() ); @@ -1869,7 +1871,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1892,7 +1894,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1914,7 +1916,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() ); @@ -1948,7 +1950,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() ); @@ -2003,7 +2005,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() ); @@ -2038,7 +2040,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeployProcessorVersionRequest() ); @@ -2072,7 +2074,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2095,7 +2097,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2117,7 +2119,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.UndeployProcessorVersionRequest() ); @@ -2151,7 +2153,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.UndeployProcessorVersionRequest() ); @@ -2206,7 +2208,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.UndeployProcessorVersionRequest() ); @@ -2241,7 +2243,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.UndeployProcessorVersionRequest() ); @@ -2275,7 +2277,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2299,7 +2301,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2321,7 +2323,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorRequest() ); @@ -2355,7 +2357,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorRequest() ); @@ -2410,7 +2412,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorRequest() ); @@ -2442,7 +2444,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DeleteProcessorRequest() ); @@ -2476,7 +2478,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2499,7 +2501,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2521,7 +2523,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EnableProcessorRequest() ); @@ -2555,7 +2557,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EnableProcessorRequest() ); @@ -2610,7 +2612,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EnableProcessorRequest() ); @@ -2642,7 +2644,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EnableProcessorRequest() ); @@ -2676,7 +2678,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2699,7 +2701,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2721,7 +2723,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DisableProcessorRequest() ); @@ -2755,7 +2757,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DisableProcessorRequest() ); @@ -2810,7 +2812,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DisableProcessorRequest() ); @@ -2842,7 +2844,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.DisableProcessorRequest() ); @@ -2876,7 +2878,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2899,7 +2901,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2921,7 +2923,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest() ); @@ -2955,7 +2957,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest() ); @@ -3010,7 +3012,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest() ); @@ -3045,7 +3047,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.SetDefaultProcessorVersionRequest() ); @@ -3079,7 +3081,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3103,7 +3105,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3125,7 +3127,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ReviewDocumentRequest() ); @@ -3159,7 +3161,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ReviewDocumentRequest() ); @@ -3214,7 +3216,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ReviewDocumentRequest() ); @@ -3246,7 +3248,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ReviewDocumentRequest() ); @@ -3280,7 +3282,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3303,7 +3305,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3325,7 +3327,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() ); @@ -3359,7 +3361,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() ); @@ -3414,7 +3416,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() ); @@ -3449,7 +3451,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.EvaluateProcessorVersionRequest() ); @@ -3483,7 +3485,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3507,7 +3509,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3529,7 +3531,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() ); @@ -3570,7 +3572,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() ); @@ -3626,7 +3628,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() ); @@ -3658,7 +3660,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() ); @@ -3719,7 +3721,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() ); @@ -3769,7 +3771,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() ); @@ -3819,7 +3821,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorTypesRequest() ); @@ -3863,7 +3865,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorsRequest() ); @@ -3903,7 +3905,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorsRequest() ); @@ -3959,7 +3961,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorsRequest() ); @@ -3991,7 +3993,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorsRequest() ); @@ -4052,7 +4054,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorsRequest() ); @@ -4102,7 +4104,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorsRequest() ); @@ -4152,7 +4154,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorsRequest() ); @@ -4195,7 +4197,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); @@ -4236,7 +4238,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); @@ -4294,7 +4296,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); @@ -4329,7 +4331,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); @@ -4397,7 +4399,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); @@ -4454,7 +4456,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); @@ -4509,7 +4511,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListProcessorVersionsRequest() ); @@ -4557,7 +4559,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); @@ -4597,7 +4599,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); @@ -4653,7 +4655,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); @@ -4685,7 +4687,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); @@ -4746,7 +4748,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); @@ -4796,7 +4798,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); @@ -4846,7 +4848,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1.ListEvaluationsRequest() ); @@ -4888,7 +4890,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4919,7 +4921,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4964,7 +4966,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5000,7 +5002,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5049,7 +5051,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5091,7 +5093,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5173,7 +5175,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5256,7 +5258,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5355,8 +5357,7 @@ describe('v1.DocumentProcessorServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5376,7 +5377,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5385,8 +5386,7 @@ describe('v1.DocumentProcessorServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5402,7 +5402,7 @@ describe('v1.DocumentProcessorServiceClient', () => { }); describe('Path templates', () => { - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -5416,7 +5416,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5491,7 +5491,7 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('humanReviewConfig', () => { + describe('humanReviewConfig', async () => { const fakePath = '/rendered/path/humanReviewConfig'; const expectedParameters = { project: 'projectValue', @@ -5503,7 +5503,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.humanReviewConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5568,7 +5568,7 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5579,7 +5579,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5618,7 +5618,7 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('processor', () => { + describe('processor', async () => { const fakePath = '/rendered/path/processor'; const expectedParameters = { project: 'projectValue', @@ -5630,7 +5630,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.processorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5683,7 +5683,7 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('processorType', () => { + describe('processorType', async () => { const fakePath = '/rendered/path/processorType'; const expectedParameters = { project: 'projectValue', @@ -5695,7 +5695,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.processorTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5748,7 +5748,7 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('processorVersion', () => { + describe('processorVersion', async () => { const fakePath = '/rendered/path/processorVersion'; const expectedParameters = { project: 'projectValue', @@ -5761,7 +5761,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.processorVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5829,7 +5829,7 @@ describe('v1.DocumentProcessorServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5839,7 +5839,7 @@ describe('v1.DocumentProcessorServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts index d4293aa076e..4da8f71655f 100644 --- a/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts +++ b/packages/google-cloud-documentai/test/gapic_document_processor_service_v1beta3.ts @@ -308,7 +308,9 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentProcessorServiceStub); client.close().then(() => { done(); @@ -379,7 +381,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ProcessRequest() ); @@ -413,7 +415,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ProcessRequest() ); @@ -463,7 +465,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ProcessRequest() ); @@ -497,7 +499,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ProcessRequest() ); @@ -521,7 +523,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest() ); @@ -556,7 +558,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest() ); @@ -606,7 +608,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest() ); @@ -640,7 +642,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.FetchProcessorTypesRequest() ); @@ -664,7 +666,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorTypeRequest() ); @@ -698,7 +700,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorTypeRequest() ); @@ -748,7 +750,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorTypeRequest() ); @@ -782,7 +784,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorTypeRequest() ); @@ -806,7 +808,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorRequest() ); @@ -840,7 +842,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorRequest() ); @@ -890,7 +892,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorRequest() ); @@ -924,7 +926,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorRequest() ); @@ -948,7 +950,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorVersionRequest() ); @@ -983,7 +985,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorVersionRequest() ); @@ -1033,7 +1035,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorVersionRequest() ); @@ -1067,7 +1069,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetProcessorVersionRequest() ); @@ -1091,7 +1093,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.CreateProcessorRequest() ); @@ -1125,7 +1127,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.CreateProcessorRequest() ); @@ -1175,7 +1177,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.CreateProcessorRequest() ); @@ -1209,7 +1211,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.CreateProcessorRequest() ); @@ -1233,7 +1235,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetEvaluationRequest() ); @@ -1267,7 +1269,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetEvaluationRequest() ); @@ -1317,7 +1319,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetEvaluationRequest() ); @@ -1351,7 +1353,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetEvaluationRequest() ); @@ -1375,7 +1377,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchProcessRequest() ); @@ -1411,7 +1413,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchProcessRequest() ); @@ -1468,7 +1470,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchProcessRequest() ); @@ -1505,7 +1507,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchProcessRequest() ); @@ -1541,7 +1543,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1566,7 +1568,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1590,7 +1592,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest() ); @@ -1626,7 +1628,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest() ); @@ -1683,7 +1685,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest() ); @@ -1720,7 +1722,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.TrainProcessorVersionRequest() ); @@ -1756,7 +1758,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1781,7 +1783,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1805,7 +1807,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorVersionRequest() ); @@ -1841,7 +1843,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorVersionRequest() ); @@ -1898,7 +1900,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorVersionRequest() ); @@ -1935,7 +1937,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorVersionRequest() ); @@ -1971,7 +1973,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1996,7 +1998,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2020,7 +2022,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeployProcessorVersionRequest() ); @@ -2056,7 +2058,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeployProcessorVersionRequest() ); @@ -2113,7 +2115,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeployProcessorVersionRequest() ); @@ -2150,7 +2152,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeployProcessorVersionRequest() ); @@ -2186,7 +2188,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2211,7 +2213,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2235,7 +2237,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest() ); @@ -2271,7 +2273,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest() ); @@ -2328,7 +2330,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest() ); @@ -2365,7 +2367,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UndeployProcessorVersionRequest() ); @@ -2401,7 +2403,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2427,7 +2429,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2451,7 +2453,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorRequest() ); @@ -2487,7 +2489,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorRequest() ); @@ -2544,7 +2546,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorRequest() ); @@ -2578,7 +2580,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DeleteProcessorRequest() ); @@ -2614,7 +2616,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2639,7 +2641,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2663,7 +2665,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EnableProcessorRequest() ); @@ -2699,7 +2701,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EnableProcessorRequest() ); @@ -2756,7 +2758,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EnableProcessorRequest() ); @@ -2790,7 +2792,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EnableProcessorRequest() ); @@ -2826,7 +2828,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2851,7 +2853,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2875,7 +2877,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DisableProcessorRequest() ); @@ -2911,7 +2913,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DisableProcessorRequest() ); @@ -2968,7 +2970,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DisableProcessorRequest() ); @@ -3002,7 +3004,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.DisableProcessorRequest() ); @@ -3038,7 +3040,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3063,7 +3065,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3087,7 +3089,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest() ); @@ -3123,7 +3125,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest() ); @@ -3180,7 +3182,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest() ); @@ -3217,7 +3219,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.SetDefaultProcessorVersionRequest() ); @@ -3253,7 +3255,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3279,7 +3281,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3303,7 +3305,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() ); @@ -3339,7 +3341,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() ); @@ -3396,7 +3398,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() ); @@ -3430,7 +3432,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ReviewDocumentRequest() ); @@ -3466,7 +3468,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3491,7 +3493,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3515,7 +3517,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest() ); @@ -3551,7 +3553,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest() ); @@ -3608,7 +3610,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest() ); @@ -3645,7 +3647,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.EvaluateProcessorVersionRequest() ); @@ -3681,7 +3683,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3707,7 +3709,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3731,7 +3733,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportProcessorVersionRequest() ); @@ -3767,7 +3769,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportProcessorVersionRequest() ); @@ -3824,7 +3826,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportProcessorVersionRequest() ); @@ -3861,7 +3863,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportProcessorVersionRequest() ); @@ -3897,7 +3899,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3922,7 +3924,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3946,7 +3948,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorTypesRequest() ); @@ -3989,7 +3991,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorTypesRequest() ); @@ -4049,7 +4051,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorTypesRequest() ); @@ -4083,7 +4085,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorTypesRequest() ); @@ -4147,7 +4149,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorTypesRequest() ); @@ -4200,7 +4202,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorTypesRequest() ); @@ -4253,7 +4255,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorTypesRequest() ); @@ -4299,7 +4301,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorsRequest() ); @@ -4341,7 +4343,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorsRequest() ); @@ -4399,7 +4401,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorsRequest() ); @@ -4433,7 +4435,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorsRequest() ); @@ -4497,7 +4499,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorsRequest() ); @@ -4550,7 +4552,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorsRequest() ); @@ -4602,7 +4604,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorsRequest() ); @@ -4648,7 +4650,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest() ); @@ -4691,7 +4693,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest() ); @@ -4751,7 +4753,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest() ); @@ -4788,7 +4790,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest() ); @@ -4860,7 +4862,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest() ); @@ -4921,7 +4923,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest() ); @@ -4978,7 +4980,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListProcessorVersionsRequest() ); @@ -5028,7 +5030,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListEvaluationsRequest() ); @@ -5070,7 +5072,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListEvaluationsRequest() ); @@ -5128,7 +5130,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListEvaluationsRequest() ); @@ -5162,7 +5164,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListEvaluationsRequest() ); @@ -5226,7 +5228,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListEvaluationsRequest() ); @@ -5279,7 +5281,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListEvaluationsRequest() ); @@ -5332,7 +5334,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListEvaluationsRequest() ); @@ -5377,7 +5379,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5410,7 +5412,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5457,7 +5459,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5495,7 +5497,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5546,7 +5548,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5590,7 +5592,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5678,7 +5680,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5767,7 +5769,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5872,8 +5874,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5895,7 +5896,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5904,8 +5905,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5921,7 +5921,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); describe('Path templates', () => { - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -5935,7 +5935,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5988,7 +5988,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('datasetSchema', () => { + describe('datasetSchema', async () => { const fakePath = '/rendered/path/datasetSchema'; const expectedParameters = { project: 'projectValue', @@ -6002,7 +6002,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6055,7 +6055,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -6071,7 +6071,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6146,7 +6146,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('humanReviewConfig', () => { + describe('humanReviewConfig', async () => { const fakePath = '/rendered/path/humanReviewConfig'; const expectedParameters = { project: 'projectValue', @@ -6160,7 +6160,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.humanReviewConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6225,7 +6225,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -6238,7 +6238,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6277,7 +6277,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('processor', () => { + describe('processor', async () => { const fakePath = '/rendered/path/processor'; const expectedParameters = { project: 'projectValue', @@ -6291,7 +6291,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.processorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6344,7 +6344,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('processorType', () => { + describe('processorType', async () => { const fakePath = '/rendered/path/processorType'; const expectedParameters = { project: 'projectValue', @@ -6358,7 +6358,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.processorTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6411,7 +6411,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('processorVersion', () => { + describe('processorVersion', async () => { const fakePath = '/rendered/path/processorVersion'; const expectedParameters = { project: 'projectValue', @@ -6426,7 +6426,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.processorVersionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6494,7 +6494,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -6506,7 +6506,7 @@ describe('v1beta3.DocumentProcessorServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-documentai/test/gapic_document_service_v1beta3.ts b/packages/google-cloud-documentai/test/gapic_document_service_v1beta3.ts index eb4832241ae..248daf4d800 100644 --- a/packages/google-cloud-documentai/test/gapic_document_service_v1beta3.ts +++ b/packages/google-cloud-documentai/test/gapic_document_service_v1beta3.ts @@ -291,7 +291,9 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.documentServiceStub); client.close().then(() => { done(); @@ -350,7 +352,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDocumentRequest() ); @@ -381,7 +383,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDocumentRequest() ); @@ -428,7 +430,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDocumentRequest() ); @@ -459,7 +461,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDocumentRequest() ); @@ -480,7 +482,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest() ); @@ -511,7 +513,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest() ); @@ -558,7 +560,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest() ); @@ -589,7 +591,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.GetDatasetSchemaRequest() ); @@ -610,7 +612,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest() ); @@ -643,7 +645,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest() ); @@ -691,7 +693,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest() ); @@ -723,7 +725,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetSchemaRequest() ); @@ -745,7 +747,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetRequest() ); @@ -779,7 +781,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetRequest() ); @@ -834,7 +836,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetRequest() ); @@ -866,7 +868,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.UpdateDatasetRequest() ); @@ -900,7 +902,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -922,7 +924,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -943,7 +945,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportDocumentsRequest() ); @@ -976,7 +978,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportDocumentsRequest() ); @@ -1030,7 +1032,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportDocumentsRequest() ); @@ -1061,7 +1063,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ImportDocumentsRequest() ); @@ -1094,7 +1096,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1116,7 +1118,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1137,7 +1139,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest() ); @@ -1170,7 +1172,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest() ); @@ -1224,7 +1226,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest() ); @@ -1255,7 +1257,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.BatchDeleteDocumentsRequest() ); @@ -1288,7 +1290,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1310,7 +1312,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1331,7 +1333,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListDocumentsRequest() ); @@ -1370,7 +1372,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListDocumentsRequest() ); @@ -1427,7 +1429,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListDocumentsRequest() ); @@ -1458,7 +1460,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListDocumentsRequest() ); @@ -1521,7 +1523,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListDocumentsRequest() ); @@ -1573,7 +1575,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListDocumentsRequest() ); @@ -1623,7 +1625,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.documentai.v1beta3.ListDocumentsRequest() ); @@ -1665,7 +1667,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1695,7 +1697,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1739,7 +1741,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -1774,7 +1776,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1822,7 +1824,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -1863,7 +1865,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -1942,7 +1944,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2022,7 +2024,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2118,8 +2120,7 @@ describe('v1beta3.DocumentServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2138,7 +2139,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2147,8 +2148,7 @@ describe('v1beta3.DocumentServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2164,7 +2164,7 @@ describe('v1beta3.DocumentServiceClient', () => { }); describe('Path templates', () => { - describe('dataset', () => { + describe('dataset', async () => { const fakePath = '/rendered/path/dataset'; const expectedParameters = { project: 'projectValue', @@ -2175,7 +2175,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2228,7 +2228,7 @@ describe('v1beta3.DocumentServiceClient', () => { }); }); - describe('datasetSchema', () => { + describe('datasetSchema', async () => { const fakePath = '/rendered/path/datasetSchema'; const expectedParameters = { project: 'projectValue', @@ -2239,7 +2239,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.datasetSchemaPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2292,7 +2292,7 @@ describe('v1beta3.DocumentServiceClient', () => { }); }); - describe('evaluation', () => { + describe('evaluation', async () => { const fakePath = '/rendered/path/evaluation'; const expectedParameters = { project: 'projectValue', @@ -2305,7 +2305,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.evaluationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2380,7 +2380,7 @@ describe('v1beta3.DocumentServiceClient', () => { }); }); - describe('processor', () => { + describe('processor', async () => { const fakePath = '/rendered/path/processor'; const expectedParameters = { project: 'projectValue', @@ -2391,7 +2391,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.processorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2444,7 +2444,7 @@ describe('v1beta3.DocumentServiceClient', () => { }); }); - describe('processorType', () => { + describe('processorType', async () => { const fakePath = '/rendered/path/processorType'; const expectedParameters = { project: 'projectValue', @@ -2455,7 +2455,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.processorTypePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2508,7 +2508,7 @@ describe('v1beta3.DocumentServiceClient', () => { }); }); - describe('processorVersion', () => { + describe('processorVersion', async () => { const fakePath = '/rendered/path/processorVersion'; const expectedParameters = { project: 'projectValue', @@ -2520,7 +2520,7 @@ describe('v1beta3.DocumentServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.processorVersionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-documentai/test/gapic_document_understanding_service_v1beta2.ts b/packages/google-cloud-documentai/test/gapic_document_understanding_service_v1beta2.ts index 5be7d2f770c..341b47c503d 100644 --- a/packages/google-cloud-documentai/test/gapic_document_understanding_service_v1beta2.ts +++ b/packages/google-cloud-documentai/test/gapic_document_understanding_service_v1beta2.ts @@ -1190,8 +1190,7 @@ describe('v1beta2.DocumentUnderstandingServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -1222,8 +1221,7 @@ describe('v1beta2.DocumentUnderstandingServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } diff --git a/packages/google-cloud-domains/package.json b/packages/google-cloud-domains/package.json index ce7b6b865bd..e4663726e68 100644 --- a/packages/google-cloud-domains/package.json +++ b/packages/google-cloud-domains/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-domains/samples/generated/v1/snippet_metadata.google.cloud.domains.v1.json b/packages/google-cloud-domains/samples/generated/v1/snippet_metadata.google.cloud.domains.v1.json index 519239da4ae..b78dd7ec40f 100644 --- a/packages/google-cloud-domains/samples/generated/v1/snippet_metadata.google.cloud.domains.v1.json +++ b/packages/google-cloud-domains/samples/generated/v1/snippet_metadata.google.cloud.domains.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-domains", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-domains/samples/generated/v1/snippet_metadata_google.cloud.domains.v1.json b/packages/google-cloud-domains/samples/generated/v1/snippet_metadata_google.cloud.domains.v1.json index 519239da4ae..b78dd7ec40f 100644 --- a/packages/google-cloud-domains/samples/generated/v1/snippet_metadata_google.cloud.domains.v1.json +++ b/packages/google-cloud-domains/samples/generated/v1/snippet_metadata_google.cloud.domains.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-domains", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata.google.cloud.domains.v1alpha2.json b/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata.google.cloud.domains.v1alpha2.json index da8b4d4f68a..cf40e2b6ff3 100644 --- a/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata.google.cloud.domains.v1alpha2.json +++ b/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata.google.cloud.domains.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-domains", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata_google.cloud.domains.v1alpha2.json b/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata_google.cloud.domains.v1alpha2.json index da8b4d4f68a..cf40e2b6ff3 100644 --- a/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata_google.cloud.domains.v1alpha2.json +++ b/packages/google-cloud-domains/samples/generated/v1alpha2/snippet_metadata_google.cloud.domains.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-domains", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata.google.cloud.domains.v1beta1.json b/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata.google.cloud.domains.v1beta1.json index b54018a1dcc..7f50242d8ea 100644 --- a/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata.google.cloud.domains.v1beta1.json +++ b/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata.google.cloud.domains.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-domains", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata_google.cloud.domains.v1beta1.json b/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata_google.cloud.domains.v1beta1.json index b54018a1dcc..7f50242d8ea 100644 --- a/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata_google.cloud.domains.v1beta1.json +++ b/packages/google-cloud-domains/samples/generated/v1beta1/snippet_metadata_google.cloud.domains.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-domains", - "version": "3.2.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-domains/src/v1/domains_client.ts b/packages/google-cloud-domains/src/v1/domains_client.ts index bfd6c39029c..6d78acef660 100644 --- a/packages/google-cloud-domains/src/v1/domains_client.ts +++ b/packages/google-cloud-domains/src/v1/domains_client.ts @@ -639,7 +639,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDomains request %j', request); const wrappedCallback: | Callback< @@ -764,7 +766,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveRegisterParameters request %j', request); const wrappedCallback: | Callback< @@ -896,7 +900,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveTransferParameters request %j', request); const wrappedCallback: | Callback< @@ -1010,7 +1016,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRegistration request %j', request); const wrappedCallback: | Callback< @@ -1137,7 +1145,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveAuthorizationCode request %j', request); const wrappedCallback: | Callback< @@ -1260,7 +1270,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetAuthorizationCode request %j', request); const wrappedCallback: | Callback< @@ -1422,7 +1434,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1631,7 +1645,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1807,7 +1823,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ 'registration.name': request.registration!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1981,7 +1999,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2169,7 +2189,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2349,7 +2371,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2525,7 +2549,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2711,7 +2737,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2892,7 +2920,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.domains.v1.IListRegistrationsRequest, @@ -2976,7 +3006,9 @@ export class DomainsClient { }); const defaultCallSettings = this._defaults['listRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegistrations stream %j', request); return this.descriptors.page.listRegistrations.createStream( this.innerApiCalls.listRegistrations as GaxCall, @@ -3042,7 +3074,9 @@ export class DomainsClient { }); const defaultCallSettings = this._defaults['listRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegistrations iterate %j', request); return this.descriptors.page.listRegistrations.asyncIterate( this.innerApiCalls['listRegistrations'] as GaxCall, diff --git a/packages/google-cloud-domains/src/v1alpha2/domains_client.ts b/packages/google-cloud-domains/src/v1alpha2/domains_client.ts index 1f9bcb620e4..83dfd10e5e1 100644 --- a/packages/google-cloud-domains/src/v1alpha2/domains_client.ts +++ b/packages/google-cloud-domains/src/v1alpha2/domains_client.ts @@ -645,7 +645,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDomains request %j', request); const wrappedCallback: | Callback< @@ -773,7 +775,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveRegisterParameters request %j', request); const wrappedCallback: | Callback< @@ -905,7 +909,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveTransferParameters request %j', request); const wrappedCallback: | Callback< @@ -1025,7 +1031,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRegistration request %j', request); const wrappedCallback: | Callback< @@ -1155,7 +1163,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveAuthorizationCode request %j', request); const wrappedCallback: | Callback< @@ -1284,7 +1294,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetAuthorizationCode request %j', request); const wrappedCallback: | Callback< @@ -1446,7 +1458,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1655,7 +1669,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1831,7 +1847,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ 'registration.name': request.registration!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2005,7 +2023,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2193,7 +2213,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2373,7 +2395,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2549,7 +2573,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2735,7 +2761,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2916,7 +2944,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, @@ -3000,7 +3030,9 @@ export class DomainsClient { }); const defaultCallSettings = this._defaults['listRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegistrations stream %j', request); return this.descriptors.page.listRegistrations.createStream( this.innerApiCalls.listRegistrations as GaxCall, @@ -3066,7 +3098,9 @@ export class DomainsClient { }); const defaultCallSettings = this._defaults['listRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegistrations iterate %j', request); return this.descriptors.page.listRegistrations.asyncIterate( this.innerApiCalls['listRegistrations'] as GaxCall, diff --git a/packages/google-cloud-domains/src/v1beta1/domains_client.ts b/packages/google-cloud-domains/src/v1beta1/domains_client.ts index 33139e84f55..809b129ebe4 100644 --- a/packages/google-cloud-domains/src/v1beta1/domains_client.ts +++ b/packages/google-cloud-domains/src/v1beta1/domains_client.ts @@ -645,7 +645,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('searchDomains request %j', request); const wrappedCallback: | Callback< @@ -770,7 +772,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveRegisterParameters request %j', request); const wrappedCallback: | Callback< @@ -902,7 +906,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveTransferParameters request %j', request); const wrappedCallback: | Callback< @@ -1022,7 +1028,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRegistration request %j', request); const wrappedCallback: | Callback< @@ -1152,7 +1160,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('retrieveAuthorizationCode request %j', request); const wrappedCallback: | Callback< @@ -1281,7 +1291,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('resetAuthorizationCode request %j', request); const wrappedCallback: | Callback< @@ -1443,7 +1455,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1652,7 +1666,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1828,7 +1844,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ 'registration.name': request.registration!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2002,7 +2020,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2190,7 +2210,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2370,7 +2392,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ registration: request.registration ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2546,7 +2570,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2732,7 +2758,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2913,7 +2941,9 @@ export class DomainsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.domains.v1beta1.IListRegistrationsRequest, @@ -2997,7 +3027,9 @@ export class DomainsClient { }); const defaultCallSettings = this._defaults['listRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegistrations stream %j', request); return this.descriptors.page.listRegistrations.createStream( this.innerApiCalls.listRegistrations as GaxCall, @@ -3063,7 +3095,9 @@ export class DomainsClient { }); const defaultCallSettings = this._defaults['listRegistrations']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRegistrations iterate %j', request); return this.descriptors.page.listRegistrations.asyncIterate( this.innerApiCalls['listRegistrations'] as GaxCall, diff --git a/packages/google-cloud-domains/test/gapic_domains_v1.ts b/packages/google-cloud-domains/test/gapic_domains_v1.ts index 2bef5bda14b..a0d08b84794 100644 --- a/packages/google-cloud-domains/test/gapic_domains_v1.ts +++ b/packages/google-cloud-domains/test/gapic_domains_v1.ts @@ -282,7 +282,9 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.domainsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.SearchDomainsRequest() ); @@ -372,7 +374,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.SearchDomainsRequest() ); @@ -419,7 +421,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.SearchDomainsRequest() ); @@ -450,7 +452,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.SearchDomainsRequest() ); @@ -471,7 +473,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveRegisterParametersRequest() ); @@ -503,7 +505,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveRegisterParametersRequest() ); @@ -550,7 +552,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveRegisterParametersRequest() ); @@ -584,7 +586,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveRegisterParametersRequest() ); @@ -608,7 +610,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveTransferParametersRequest() ); @@ -640,7 +642,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveTransferParametersRequest() ); @@ -687,7 +689,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveTransferParametersRequest() ); @@ -721,7 +723,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveTransferParametersRequest() ); @@ -745,7 +747,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.GetRegistrationRequest() ); @@ -776,7 +778,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.GetRegistrationRequest() ); @@ -823,7 +825,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.GetRegistrationRequest() ); @@ -854,7 +856,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.GetRegistrationRequest() ); @@ -875,7 +877,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveAuthorizationCodeRequest() ); @@ -907,7 +909,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveAuthorizationCodeRequest() ); @@ -954,7 +956,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveAuthorizationCodeRequest() ); @@ -988,7 +990,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RetrieveAuthorizationCodeRequest() ); @@ -1012,7 +1014,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ResetAuthorizationCodeRequest() ); @@ -1044,7 +1046,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ResetAuthorizationCodeRequest() ); @@ -1091,7 +1093,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ResetAuthorizationCodeRequest() ); @@ -1125,7 +1127,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ResetAuthorizationCodeRequest() ); @@ -1149,7 +1151,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RegisterDomainRequest() ); @@ -1182,7 +1184,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RegisterDomainRequest() ); @@ -1236,7 +1238,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RegisterDomainRequest() ); @@ -1267,7 +1269,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.RegisterDomainRequest() ); @@ -1300,7 +1302,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1322,7 +1324,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1343,7 +1345,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.TransferDomainRequest() ); @@ -1376,7 +1378,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.TransferDomainRequest() ); @@ -1430,7 +1432,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.TransferDomainRequest() ); @@ -1461,7 +1463,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.TransferDomainRequest() ); @@ -1494,7 +1496,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1516,7 +1518,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1537,7 +1539,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.UpdateRegistrationRequest() ); @@ -1571,7 +1573,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.UpdateRegistrationRequest() ); @@ -1626,7 +1628,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.UpdateRegistrationRequest() ); @@ -1658,7 +1660,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.UpdateRegistrationRequest() ); @@ -1692,7 +1694,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1714,7 +1716,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1735,7 +1737,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureManagementSettingsRequest() ); @@ -1768,7 +1770,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureManagementSettingsRequest() ); @@ -1822,7 +1824,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureManagementSettingsRequest() ); @@ -1856,7 +1858,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureManagementSettingsRequest() ); @@ -1889,7 +1891,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1912,7 +1914,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1933,7 +1935,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureDnsSettingsRequest() ); @@ -1966,7 +1968,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureDnsSettingsRequest() ); @@ -2020,7 +2022,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureDnsSettingsRequest() ); @@ -2051,7 +2053,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureDnsSettingsRequest() ); @@ -2084,7 +2086,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2106,7 +2108,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2127,7 +2129,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureContactSettingsRequest() ); @@ -2160,7 +2162,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureContactSettingsRequest() ); @@ -2214,7 +2216,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureContactSettingsRequest() ); @@ -2248,7 +2250,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ConfigureContactSettingsRequest() ); @@ -2281,7 +2283,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2304,7 +2306,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2325,7 +2327,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ExportRegistrationRequest() ); @@ -2358,7 +2360,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ExportRegistrationRequest() ); @@ -2412,7 +2414,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ExportRegistrationRequest() ); @@ -2443,7 +2445,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ExportRegistrationRequest() ); @@ -2476,7 +2478,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2498,7 +2500,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2519,7 +2521,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.DeleteRegistrationRequest() ); @@ -2552,7 +2554,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.DeleteRegistrationRequest() ); @@ -2606,7 +2608,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.DeleteRegistrationRequest() ); @@ -2637,7 +2639,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.DeleteRegistrationRequest() ); @@ -2670,7 +2672,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2692,7 +2694,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2713,7 +2715,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ListRegistrationsRequest() ); @@ -2752,7 +2754,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ListRegistrationsRequest() ); @@ -2807,7 +2809,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ListRegistrationsRequest() ); @@ -2838,7 +2840,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ListRegistrationsRequest() ); @@ -2898,7 +2900,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ListRegistrationsRequest() ); @@ -2947,7 +2949,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ListRegistrationsRequest() ); @@ -2996,7 +2998,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1.ListRegistrationsRequest() ); @@ -3033,7 +3035,7 @@ describe('v1.DomainsClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3043,7 +3045,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3082,7 +3084,7 @@ describe('v1.DomainsClient', () => { }); }); - describe('registration', () => { + describe('registration', async () => { const fakePath = '/rendered/path/registration'; const expectedParameters = { project: 'projectValue', @@ -3093,7 +3095,7 @@ describe('v1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.registrationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-domains/test/gapic_domains_v1alpha2.ts b/packages/google-cloud-domains/test/gapic_domains_v1alpha2.ts index 20a8d27d71c..3c5d3a30f07 100644 --- a/packages/google-cloud-domains/test/gapic_domains_v1alpha2.ts +++ b/packages/google-cloud-domains/test/gapic_domains_v1alpha2.ts @@ -282,7 +282,9 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.domainsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.SearchDomainsRequest() ); @@ -372,7 +374,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.SearchDomainsRequest() ); @@ -419,7 +421,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.SearchDomainsRequest() ); @@ -450,7 +452,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.SearchDomainsRequest() ); @@ -471,7 +473,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveRegisterParametersRequest() ); @@ -503,7 +505,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveRegisterParametersRequest() ); @@ -550,7 +552,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveRegisterParametersRequest() ); @@ -584,7 +586,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveRegisterParametersRequest() ); @@ -608,7 +610,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveTransferParametersRequest() ); @@ -640,7 +642,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveTransferParametersRequest() ); @@ -687,7 +689,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveTransferParametersRequest() ); @@ -721,7 +723,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveTransferParametersRequest() ); @@ -745,7 +747,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.GetRegistrationRequest() ); @@ -776,7 +778,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.GetRegistrationRequest() ); @@ -823,7 +825,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.GetRegistrationRequest() ); @@ -854,7 +856,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.GetRegistrationRequest() ); @@ -875,7 +877,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveAuthorizationCodeRequest() ); @@ -907,7 +909,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveAuthorizationCodeRequest() ); @@ -954,7 +956,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveAuthorizationCodeRequest() ); @@ -988,7 +990,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RetrieveAuthorizationCodeRequest() ); @@ -1012,7 +1014,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ResetAuthorizationCodeRequest() ); @@ -1044,7 +1046,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ResetAuthorizationCodeRequest() ); @@ -1091,7 +1093,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ResetAuthorizationCodeRequest() ); @@ -1125,7 +1127,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ResetAuthorizationCodeRequest() ); @@ -1149,7 +1151,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RegisterDomainRequest() ); @@ -1182,7 +1184,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RegisterDomainRequest() ); @@ -1236,7 +1238,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RegisterDomainRequest() ); @@ -1267,7 +1269,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.RegisterDomainRequest() ); @@ -1300,7 +1302,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1322,7 +1324,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1343,7 +1345,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.TransferDomainRequest() ); @@ -1376,7 +1378,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.TransferDomainRequest() ); @@ -1430,7 +1432,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.TransferDomainRequest() ); @@ -1461,7 +1463,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.TransferDomainRequest() ); @@ -1494,7 +1496,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1516,7 +1518,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1537,7 +1539,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.UpdateRegistrationRequest() ); @@ -1571,7 +1573,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.UpdateRegistrationRequest() ); @@ -1626,7 +1628,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.UpdateRegistrationRequest() ); @@ -1658,7 +1660,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.UpdateRegistrationRequest() ); @@ -1692,7 +1694,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1714,7 +1716,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1735,7 +1737,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureManagementSettingsRequest() ); @@ -1768,7 +1770,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureManagementSettingsRequest() ); @@ -1822,7 +1824,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureManagementSettingsRequest() ); @@ -1856,7 +1858,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureManagementSettingsRequest() ); @@ -1889,7 +1891,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1912,7 +1914,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1933,7 +1935,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureDnsSettingsRequest() ); @@ -1966,7 +1968,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureDnsSettingsRequest() ); @@ -2020,7 +2022,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureDnsSettingsRequest() ); @@ -2051,7 +2053,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureDnsSettingsRequest() ); @@ -2084,7 +2086,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2106,7 +2108,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2127,7 +2129,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureContactSettingsRequest() ); @@ -2160,7 +2162,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureContactSettingsRequest() ); @@ -2214,7 +2216,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureContactSettingsRequest() ); @@ -2248,7 +2250,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ConfigureContactSettingsRequest() ); @@ -2281,7 +2283,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2304,7 +2306,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2325,7 +2327,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ExportRegistrationRequest() ); @@ -2358,7 +2360,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ExportRegistrationRequest() ); @@ -2412,7 +2414,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ExportRegistrationRequest() ); @@ -2443,7 +2445,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ExportRegistrationRequest() ); @@ -2476,7 +2478,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2498,7 +2500,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2519,7 +2521,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.DeleteRegistrationRequest() ); @@ -2552,7 +2554,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.DeleteRegistrationRequest() ); @@ -2606,7 +2608,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.DeleteRegistrationRequest() ); @@ -2637,7 +2639,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.DeleteRegistrationRequest() ); @@ -2670,7 +2672,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2692,7 +2694,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2713,7 +2715,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ListRegistrationsRequest() ); @@ -2752,7 +2754,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ListRegistrationsRequest() ); @@ -2807,7 +2809,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ListRegistrationsRequest() ); @@ -2838,7 +2840,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ListRegistrationsRequest() ); @@ -2899,7 +2901,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ListRegistrationsRequest() ); @@ -2949,7 +2951,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ListRegistrationsRequest() ); @@ -2999,7 +3001,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1alpha2.ListRegistrationsRequest() ); @@ -3037,7 +3039,7 @@ describe('v1alpha2.DomainsClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3047,7 +3049,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3086,7 +3088,7 @@ describe('v1alpha2.DomainsClient', () => { }); }); - describe('registration', () => { + describe('registration', async () => { const fakePath = '/rendered/path/registration'; const expectedParameters = { project: 'projectValue', @@ -3097,7 +3099,7 @@ describe('v1alpha2.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.registrationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-domains/test/gapic_domains_v1beta1.ts b/packages/google-cloud-domains/test/gapic_domains_v1beta1.ts index c7fab484171..17b04484ded 100644 --- a/packages/google-cloud-domains/test/gapic_domains_v1beta1.ts +++ b/packages/google-cloud-domains/test/gapic_domains_v1beta1.ts @@ -282,7 +282,9 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.domainsStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.SearchDomainsRequest() ); @@ -372,7 +374,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.SearchDomainsRequest() ); @@ -419,7 +421,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.SearchDomainsRequest() ); @@ -450,7 +452,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.SearchDomainsRequest() ); @@ -471,7 +473,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveRegisterParametersRequest() ); @@ -503,7 +505,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveRegisterParametersRequest() ); @@ -550,7 +552,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveRegisterParametersRequest() ); @@ -584,7 +586,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveRegisterParametersRequest() ); @@ -608,7 +610,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveTransferParametersRequest() ); @@ -640,7 +642,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveTransferParametersRequest() ); @@ -687,7 +689,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveTransferParametersRequest() ); @@ -721,7 +723,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveTransferParametersRequest() ); @@ -745,7 +747,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.GetRegistrationRequest() ); @@ -776,7 +778,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.GetRegistrationRequest() ); @@ -823,7 +825,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.GetRegistrationRequest() ); @@ -854,7 +856,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.GetRegistrationRequest() ); @@ -875,7 +877,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveAuthorizationCodeRequest() ); @@ -907,7 +909,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveAuthorizationCodeRequest() ); @@ -954,7 +956,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveAuthorizationCodeRequest() ); @@ -988,7 +990,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RetrieveAuthorizationCodeRequest() ); @@ -1012,7 +1014,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ResetAuthorizationCodeRequest() ); @@ -1044,7 +1046,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ResetAuthorizationCodeRequest() ); @@ -1091,7 +1093,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ResetAuthorizationCodeRequest() ); @@ -1125,7 +1127,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ResetAuthorizationCodeRequest() ); @@ -1149,7 +1151,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RegisterDomainRequest() ); @@ -1182,7 +1184,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RegisterDomainRequest() ); @@ -1236,7 +1238,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RegisterDomainRequest() ); @@ -1267,7 +1269,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.RegisterDomainRequest() ); @@ -1300,7 +1302,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1322,7 +1324,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1343,7 +1345,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.TransferDomainRequest() ); @@ -1376,7 +1378,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.TransferDomainRequest() ); @@ -1430,7 +1432,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.TransferDomainRequest() ); @@ -1461,7 +1463,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.TransferDomainRequest() ); @@ -1494,7 +1496,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1516,7 +1518,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1537,7 +1539,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.UpdateRegistrationRequest() ); @@ -1571,7 +1573,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.UpdateRegistrationRequest() ); @@ -1626,7 +1628,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.UpdateRegistrationRequest() ); @@ -1658,7 +1660,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.UpdateRegistrationRequest() ); @@ -1692,7 +1694,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1714,7 +1716,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1735,7 +1737,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureManagementSettingsRequest() ); @@ -1768,7 +1770,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureManagementSettingsRequest() ); @@ -1822,7 +1824,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureManagementSettingsRequest() ); @@ -1856,7 +1858,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureManagementSettingsRequest() ); @@ -1889,7 +1891,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1912,7 +1914,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1933,7 +1935,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureDnsSettingsRequest() ); @@ -1966,7 +1968,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureDnsSettingsRequest() ); @@ -2020,7 +2022,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureDnsSettingsRequest() ); @@ -2051,7 +2053,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureDnsSettingsRequest() ); @@ -2084,7 +2086,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2106,7 +2108,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2127,7 +2129,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureContactSettingsRequest() ); @@ -2160,7 +2162,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureContactSettingsRequest() ); @@ -2214,7 +2216,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureContactSettingsRequest() ); @@ -2248,7 +2250,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ConfigureContactSettingsRequest() ); @@ -2281,7 +2283,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2304,7 +2306,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2325,7 +2327,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ExportRegistrationRequest() ); @@ -2358,7 +2360,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ExportRegistrationRequest() ); @@ -2412,7 +2414,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ExportRegistrationRequest() ); @@ -2443,7 +2445,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ExportRegistrationRequest() ); @@ -2476,7 +2478,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2498,7 +2500,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2519,7 +2521,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.DeleteRegistrationRequest() ); @@ -2552,7 +2554,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.DeleteRegistrationRequest() ); @@ -2606,7 +2608,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.DeleteRegistrationRequest() ); @@ -2637,7 +2639,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.DeleteRegistrationRequest() ); @@ -2670,7 +2672,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2692,7 +2694,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2713,7 +2715,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ListRegistrationsRequest() ); @@ -2752,7 +2754,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ListRegistrationsRequest() ); @@ -2807,7 +2809,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ListRegistrationsRequest() ); @@ -2838,7 +2840,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ListRegistrationsRequest() ); @@ -2899,7 +2901,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ListRegistrationsRequest() ); @@ -2949,7 +2951,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ListRegistrationsRequest() ); @@ -2998,7 +3000,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.domains.v1beta1.ListRegistrationsRequest() ); @@ -3036,7 +3038,7 @@ describe('v1beta1.DomainsClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -3046,7 +3048,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3085,7 +3087,7 @@ describe('v1beta1.DomainsClient', () => { }); }); - describe('registration', () => { + describe('registration', async () => { const fakePath = '/rendered/path/registration'; const expectedParameters = { project: 'projectValue', @@ -3096,7 +3098,7 @@ describe('v1beta1.DomainsClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.registrationPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-edgecontainer/package.json b/packages/google-cloud-edgecontainer/package.json index e40d052e54e..87eb9f7cb1e 100644 --- a/packages/google-cloud-edgecontainer/package.json +++ b/packages/google-cloud-edgecontainer/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-edgecontainer/samples/generated/v1/snippet_metadata_google.cloud.edgecontainer.v1.json b/packages/google-cloud-edgecontainer/samples/generated/v1/snippet_metadata_google.cloud.edgecontainer.v1.json index b7dde759d29..3e9d03ee975 100644 --- a/packages/google-cloud-edgecontainer/samples/generated/v1/snippet_metadata_google.cloud.edgecontainer.v1.json +++ b/packages/google-cloud-edgecontainer/samples/generated/v1/snippet_metadata_google.cloud.edgecontainer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-edgecontainer", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-edgecontainer/src/v1/edge_container_client.ts b/packages/google-cloud-edgecontainer/src/v1/edge_container_client.ts index ecb036e16fb..c202caef280 100644 --- a/packages/google-cloud-edgecontainer/src/v1/edge_container_client.ts +++ b/packages/google-cloud-edgecontainer/src/v1/edge_container_client.ts @@ -677,7 +677,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getCluster request %j', request); const wrappedCallback: | Callback< @@ -799,7 +801,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ cluster: request.cluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAccessToken request %j', request); const wrappedCallback: | Callback< @@ -924,7 +928,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ cluster: request.cluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateOfflineCredential request %j', request); const wrappedCallback: | Callback< @@ -1043,7 +1049,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNodePool request %j', request); const wrappedCallback: | Callback< @@ -1159,7 +1167,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMachine request %j', request); const wrappedCallback: | Callback< @@ -1275,7 +1285,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVpnConnection request %j', request); const wrappedCallback: | Callback< @@ -1395,7 +1407,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getServerConfig request %j', request); const wrappedCallback: | Callback< @@ -1535,7 +1549,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1712,7 +1728,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ 'cluster.name': request.cluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1887,7 +1905,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2058,7 +2078,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2233,7 +2255,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2410,7 +2434,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ 'node_pool.name': request.nodePool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2581,7 +2607,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2756,7 +2784,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2927,7 +2957,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3094,7 +3126,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgecontainer.v1.IListClustersRequest, @@ -3164,7 +3198,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters stream %j', request); return this.descriptors.page.listClusters.createStream( this.innerApiCalls.listClusters as GaxCall, @@ -3216,7 +3252,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listClusters iterate %j', request); return this.descriptors.page.listClusters.asyncIterate( this.innerApiCalls['listClusters'] as GaxCall, @@ -3322,7 +3360,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgecontainer.v1.IListNodePoolsRequest, @@ -3391,7 +3431,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listNodePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodePools stream %j', request); return this.descriptors.page.listNodePools.createStream( this.innerApiCalls.listNodePools as GaxCall, @@ -3442,7 +3484,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listNodePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNodePools iterate %j', request); return this.descriptors.page.listNodePools.asyncIterate( this.innerApiCalls['listNodePools'] as GaxCall, @@ -3548,7 +3592,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgecontainer.v1.IListMachinesRequest, @@ -3617,7 +3663,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listMachines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMachines stream %j', request); return this.descriptors.page.listMachines.createStream( this.innerApiCalls.listMachines as GaxCall, @@ -3668,7 +3716,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listMachines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMachines iterate %j', request); return this.descriptors.page.listMachines.asyncIterate( this.innerApiCalls['listMachines'] as GaxCall, @@ -3775,7 +3825,9 @@ export class EdgeContainerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgecontainer.v1.IListVpnConnectionsRequest, @@ -3845,7 +3897,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listVpnConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVpnConnections stream %j', request); return this.descriptors.page.listVpnConnections.createStream( this.innerApiCalls.listVpnConnections as GaxCall, @@ -3897,7 +3951,9 @@ export class EdgeContainerClient { }); const defaultCallSettings = this._defaults['listVpnConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVpnConnections iterate %j', request); return this.descriptors.page.listVpnConnections.asyncIterate( this.innerApiCalls['listVpnConnections'] as GaxCall, @@ -4077,7 +4133,7 @@ export class EdgeContainerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-edgecontainer/test/gapic_edge_container_v1.ts b/packages/google-cloud-edgecontainer/test/gapic_edge_container_v1.ts index 75420200daa..aebd4b7cda2 100644 --- a/packages/google-cloud-edgecontainer/test/gapic_edge_container_v1.ts +++ b/packages/google-cloud-edgecontainer/test/gapic_edge_container_v1.ts @@ -292,7 +292,9 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.edgeContainerStub); client.close().then(() => { done(); @@ -351,7 +353,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetClusterRequest() ); @@ -382,7 +384,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetClusterRequest() ); @@ -429,7 +431,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetClusterRequest() ); @@ -460,7 +462,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetClusterRequest() ); @@ -481,7 +483,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateAccessTokenRequest() ); @@ -513,7 +515,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateAccessTokenRequest() ); @@ -560,7 +562,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateAccessTokenRequest() ); @@ -591,7 +593,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateAccessTokenRequest() ); @@ -612,7 +614,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateOfflineCredentialRequest() ); @@ -644,7 +646,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateOfflineCredentialRequest() ); @@ -691,7 +693,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateOfflineCredentialRequest() ); @@ -725,7 +727,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GenerateOfflineCredentialRequest() ); @@ -749,7 +751,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetNodePoolRequest() ); @@ -780,7 +782,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetNodePoolRequest() ); @@ -827,7 +829,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetNodePoolRequest() ); @@ -858,7 +860,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetNodePoolRequest() ); @@ -879,7 +881,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetMachineRequest() ); @@ -910,7 +912,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetMachineRequest() ); @@ -957,7 +959,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetMachineRequest() ); @@ -988,7 +990,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetMachineRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetVpnConnectionRequest() ); @@ -1040,7 +1042,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetVpnConnectionRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetVpnConnectionRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetVpnConnectionRequest() ); @@ -1139,7 +1141,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetServerConfigRequest() ); @@ -1170,7 +1172,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetServerConfigRequest() ); @@ -1217,7 +1219,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetServerConfigRequest() ); @@ -1248,7 +1250,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.GetServerConfigRequest() ); @@ -1269,7 +1271,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateClusterRequest() ); @@ -1302,7 +1304,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateClusterRequest() ); @@ -1356,7 +1358,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateClusterRequest() ); @@ -1387,7 +1389,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateClusterRequest() ); @@ -1420,7 +1422,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1442,7 +1444,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1463,7 +1465,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateClusterRequest() ); @@ -1497,7 +1499,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateClusterRequest() ); @@ -1552,7 +1554,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateClusterRequest() ); @@ -1584,7 +1586,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateClusterRequest() ); @@ -1618,7 +1620,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1640,7 +1642,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1661,7 +1663,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpgradeClusterRequest() ); @@ -1694,7 +1696,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpgradeClusterRequest() ); @@ -1748,7 +1750,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpgradeClusterRequest() ); @@ -1779,7 +1781,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpgradeClusterRequest() ); @@ -1812,7 +1814,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1834,7 +1836,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1855,7 +1857,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteClusterRequest() ); @@ -1888,7 +1890,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteClusterRequest() ); @@ -1942,7 +1944,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteClusterRequest() ); @@ -1973,7 +1975,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteClusterRequest() ); @@ -2006,7 +2008,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2028,7 +2030,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2049,7 +2051,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateNodePoolRequest() ); @@ -2082,7 +2084,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateNodePoolRequest() ); @@ -2136,7 +2138,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateNodePoolRequest() ); @@ -2167,7 +2169,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateNodePoolRequest() ); @@ -2200,7 +2202,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2222,7 +2224,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2243,7 +2245,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateNodePoolRequest() ); @@ -2277,7 +2279,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateNodePoolRequest() ); @@ -2332,7 +2334,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateNodePoolRequest() ); @@ -2364,7 +2366,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.UpdateNodePoolRequest() ); @@ -2398,7 +2400,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2420,7 +2422,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2441,7 +2443,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteNodePoolRequest() ); @@ -2474,7 +2476,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteNodePoolRequest() ); @@ -2528,7 +2530,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteNodePoolRequest() ); @@ -2559,7 +2561,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteNodePoolRequest() ); @@ -2592,7 +2594,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2614,7 +2616,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2635,7 +2637,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateVpnConnectionRequest() ); @@ -2668,7 +2670,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateVpnConnectionRequest() ); @@ -2722,7 +2724,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateVpnConnectionRequest() ); @@ -2753,7 +2755,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.CreateVpnConnectionRequest() ); @@ -2786,7 +2788,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2808,7 +2810,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2829,7 +2831,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteVpnConnectionRequest() ); @@ -2862,7 +2864,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteVpnConnectionRequest() ); @@ -2916,7 +2918,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteVpnConnectionRequest() ); @@ -2947,7 +2949,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.DeleteVpnConnectionRequest() ); @@ -2980,7 +2982,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3002,7 +3004,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3023,7 +3025,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListClustersRequest() ); @@ -3062,7 +3064,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListClustersRequest() ); @@ -3117,7 +3119,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListClustersRequest() ); @@ -3148,7 +3150,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListClustersRequest() ); @@ -3208,7 +3210,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListClustersRequest() ); @@ -3259,7 +3261,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListClustersRequest() ); @@ -3308,7 +3310,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListClustersRequest() ); @@ -3350,7 +3352,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListNodePoolsRequest() ); @@ -3389,7 +3391,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListNodePoolsRequest() ); @@ -3444,7 +3446,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListNodePoolsRequest() ); @@ -3475,7 +3477,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListNodePoolsRequest() ); @@ -3535,7 +3537,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListNodePoolsRequest() ); @@ -3584,7 +3586,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListNodePoolsRequest() ); @@ -3633,7 +3635,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListNodePoolsRequest() ); @@ -3675,7 +3677,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListMachinesRequest() ); @@ -3714,7 +3716,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListMachinesRequest() ); @@ -3769,7 +3771,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListMachinesRequest() ); @@ -3800,7 +3802,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListMachinesRequest() ); @@ -3860,7 +3862,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListMachinesRequest() ); @@ -3911,7 +3913,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListMachinesRequest() ); @@ -3960,7 +3962,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListMachinesRequest() ); @@ -4002,7 +4004,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListVpnConnectionsRequest() ); @@ -4042,7 +4044,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListVpnConnectionsRequest() ); @@ -4099,7 +4101,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListVpnConnectionsRequest() ); @@ -4130,7 +4132,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListVpnConnectionsRequest() ); @@ -4191,7 +4193,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListVpnConnectionsRequest() ); @@ -4241,7 +4243,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListVpnConnectionsRequest() ); @@ -4291,7 +4293,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgecontainer.v1.ListVpnConnectionsRequest() ); @@ -4333,7 +4335,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4363,7 +4365,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4407,7 +4409,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4442,7 +4444,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4490,7 +4492,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4531,7 +4533,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4610,7 +4612,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4690,7 +4692,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4786,8 +4788,7 @@ describe('v1.EdgeContainerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4806,7 +4807,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4815,8 +4816,7 @@ describe('v1.EdgeContainerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4832,7 +4832,7 @@ describe('v1.EdgeContainerClient', () => { }); describe('Path templates', () => { - describe('cluster', () => { + describe('cluster', async () => { const fakePath = '/rendered/path/cluster'; const expectedParameters = { project: 'projectValue', @@ -4843,7 +4843,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4896,7 +4896,7 @@ describe('v1.EdgeContainerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4906,7 +4906,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4945,7 +4945,7 @@ describe('v1.EdgeContainerClient', () => { }); }); - describe('machine', () => { + describe('machine', async () => { const fakePath = '/rendered/path/machine'; const expectedParameters = { project: 'projectValue', @@ -4956,7 +4956,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.machinePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5009,7 +5009,7 @@ describe('v1.EdgeContainerClient', () => { }); }); - describe('nodePool', () => { + describe('nodePool', async () => { const fakePath = '/rendered/path/nodePool'; const expectedParameters = { project: 'projectValue', @@ -5021,7 +5021,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.nodePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5085,7 +5085,7 @@ describe('v1.EdgeContainerClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -5094,7 +5094,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5123,7 +5123,7 @@ describe('v1.EdgeContainerClient', () => { }); }); - describe('vpnConnection', () => { + describe('vpnConnection', async () => { const fakePath = '/rendered/path/vpnConnection'; const expectedParameters = { project: 'projectValue', @@ -5134,7 +5134,7 @@ describe('v1.EdgeContainerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.vpnConnectionPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-edgenetwork/package.json b/packages/google-cloud-edgenetwork/package.json index b57ae50c875..8b19eaf2786 100644 --- a/packages/google-cloud-edgenetwork/package.json +++ b/packages/google-cloud-edgenetwork/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-edgenetwork/samples/generated/v1/snippet_metadata_google.cloud.edgenetwork.v1.json b/packages/google-cloud-edgenetwork/samples/generated/v1/snippet_metadata_google.cloud.edgenetwork.v1.json index 354ad7a41d0..afa966da4bf 100644 --- a/packages/google-cloud-edgenetwork/samples/generated/v1/snippet_metadata_google.cloud.edgenetwork.v1.json +++ b/packages/google-cloud-edgenetwork/samples/generated/v1/snippet_metadata_google.cloud.edgenetwork.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-edgenetwork", - "version": "0.6.0", + "version": "0.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-edgenetwork/src/v1/edge_network_client.ts b/packages/google-cloud-edgenetwork/src/v1/edge_network_client.ts index 596701ea8c5..49a3fe020df 100644 --- a/packages/google-cloud-edgenetwork/src/v1/edge_network_client.ts +++ b/packages/google-cloud-edgenetwork/src/v1/edge_network_client.ts @@ -720,7 +720,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('initializeZone request %j', request); const wrappedCallback: | Callback< @@ -830,7 +832,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$EdgeNetwork-$GetZone', 'GetZone is deprecated and may be removed in a future version.', @@ -943,7 +947,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getNetwork request %j', request); const wrappedCallback: | Callback< @@ -1059,7 +1065,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('diagnoseNetwork request %j', request); const wrappedCallback: | Callback< @@ -1172,7 +1180,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSubnet request %j', request); const wrappedCallback: | Callback< @@ -1288,7 +1298,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInterconnect request %j', request); const wrappedCallback: | Callback< @@ -1413,7 +1425,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('diagnoseInterconnect request %j', request); const wrappedCallback: | Callback< @@ -1538,7 +1552,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInterconnectAttachment request %j', request); const wrappedCallback: | Callback< @@ -1651,7 +1667,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRouter request %j', request); const wrappedCallback: | Callback< @@ -1767,7 +1785,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('diagnoseRouter request %j', request); const wrappedCallback: | Callback< @@ -1916,7 +1936,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2097,7 +2119,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2284,7 +2308,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2471,7 +2497,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ 'subnet.name': request.subnet!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2652,7 +2680,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2839,7 +2869,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3026,7 +3058,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3219,7 +3253,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3406,7 +3442,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ 'router.name': request.router!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3587,7 +3625,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3750,7 +3790,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$EdgeNetwork-$ListZones', 'ListZones is deprecated and may be removed in a future version.', @@ -3826,7 +3868,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$EdgeNetwork-$ListZones', 'ListZones is deprecated and may be removed in a future version.', @@ -3884,7 +3928,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this.warn( 'DEP$EdgeNetwork-$ListZones', 'ListZones is deprecated and may be removed in a future version.', @@ -3996,7 +4042,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgenetwork.v1.IListNetworksRequest, @@ -4066,7 +4114,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listNetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworks stream %j', request); return this.descriptors.page.listNetworks.createStream( this.innerApiCalls.listNetworks as GaxCall, @@ -4118,7 +4168,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listNetworks']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listNetworks iterate %j', request); return this.descriptors.page.listNetworks.asyncIterate( this.innerApiCalls['listNetworks'] as GaxCall, @@ -4225,7 +4277,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgenetwork.v1.IListSubnetsRequest, @@ -4295,7 +4349,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listSubnets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubnets stream %j', request); return this.descriptors.page.listSubnets.createStream( this.innerApiCalls.listSubnets as GaxCall, @@ -4347,7 +4403,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listSubnets']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSubnets iterate %j', request); return this.descriptors.page.listSubnets.asyncIterate( this.innerApiCalls['listSubnets'] as GaxCall, @@ -4454,7 +4512,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgenetwork.v1.IListInterconnectsRequest, @@ -4524,7 +4584,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listInterconnects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInterconnects stream %j', request); return this.descriptors.page.listInterconnects.createStream( this.innerApiCalls.listInterconnects as GaxCall, @@ -4576,7 +4638,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listInterconnects']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInterconnects iterate %j', request); return this.descriptors.page.listInterconnects.asyncIterate( this.innerApiCalls['listInterconnects'] as GaxCall, @@ -4683,7 +4747,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgenetwork.v1.IListInterconnectAttachmentsRequest, @@ -4753,7 +4819,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listInterconnectAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInterconnectAttachments stream %j', request); return this.descriptors.page.listInterconnectAttachments.createStream( this.innerApiCalls.listInterconnectAttachments as GaxCall, @@ -4805,7 +4873,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listInterconnectAttachments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInterconnectAttachments iterate %j', request); return this.descriptors.page.listInterconnectAttachments.asyncIterate( this.innerApiCalls['listInterconnectAttachments'] as GaxCall, @@ -4912,7 +4982,9 @@ export class EdgeNetworkClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.edgenetwork.v1.IListRoutersRequest, @@ -4982,7 +5054,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listRouters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRouters stream %j', request); return this.descriptors.page.listRouters.createStream( this.innerApiCalls.listRouters as GaxCall, @@ -5034,7 +5108,9 @@ export class EdgeNetworkClient { }); const defaultCallSettings = this._defaults['listRouters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRouters iterate %j', request); return this.descriptors.page.listRouters.asyncIterate( this.innerApiCalls['listRouters'] as GaxCall, @@ -5214,7 +5290,7 @@ export class EdgeNetworkClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-edgenetwork/test/gapic_edge_network_v1.ts b/packages/google-cloud-edgenetwork/test/gapic_edge_network_v1.ts index e079b2d0773..7f8f5c71840 100644 --- a/packages/google-cloud-edgenetwork/test/gapic_edge_network_v1.ts +++ b/packages/google-cloud-edgenetwork/test/gapic_edge_network_v1.ts @@ -287,7 +287,9 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.edgeNetworkStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.InitializeZoneRequest() ); @@ -377,7 +379,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.InitializeZoneRequest() ); @@ -424,7 +426,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.InitializeZoneRequest() ); @@ -455,7 +457,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.InitializeZoneRequest() ); @@ -477,7 +479,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetZoneRequest() ); @@ -510,7 +512,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetZoneRequest() ); @@ -559,7 +561,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetZoneRequest() ); @@ -589,7 +591,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetZoneRequest() ); @@ -611,7 +613,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetNetworkRequest() ); @@ -642,7 +644,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetNetworkRequest() ); @@ -689,7 +691,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetNetworkRequest() ); @@ -720,7 +722,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetNetworkRequest() ); @@ -741,7 +743,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest() ); @@ -772,7 +774,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest() ); @@ -819,7 +821,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest() ); @@ -850,7 +852,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest() ); @@ -871,7 +873,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetSubnetRequest() ); @@ -902,7 +904,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetSubnetRequest() ); @@ -949,7 +951,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetSubnetRequest() ); @@ -977,7 +979,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetSubnetRequest() ); @@ -998,7 +1000,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectRequest() ); @@ -1029,7 +1031,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectRequest() ); @@ -1076,7 +1078,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectRequest() ); @@ -1107,7 +1109,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectRequest() ); @@ -1128,7 +1130,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest() ); @@ -1160,7 +1162,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest() ); @@ -1207,7 +1209,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest() ); @@ -1238,7 +1240,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest() ); @@ -1259,7 +1261,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest() ); @@ -1291,7 +1293,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest() ); @@ -1338,7 +1340,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest() ); @@ -1372,7 +1374,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest() ); @@ -1396,7 +1398,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetRouterRequest() ); @@ -1427,7 +1429,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetRouterRequest() ); @@ -1474,7 +1476,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetRouterRequest() ); @@ -1502,7 +1504,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.GetRouterRequest() ); @@ -1523,7 +1525,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseRouterRequest() ); @@ -1554,7 +1556,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseRouterRequest() ); @@ -1601,7 +1603,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseRouterRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DiagnoseRouterRequest() ); @@ -1653,7 +1655,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateNetworkRequest() ); @@ -1686,7 +1688,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateNetworkRequest() ); @@ -1740,7 +1742,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateNetworkRequest() ); @@ -1771,7 +1773,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateNetworkRequest() ); @@ -1804,7 +1806,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1826,7 +1828,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1847,7 +1849,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteNetworkRequest() ); @@ -1880,7 +1882,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteNetworkRequest() ); @@ -1934,7 +1936,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteNetworkRequest() ); @@ -1965,7 +1967,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteNetworkRequest() ); @@ -1998,7 +2000,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2020,7 +2022,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2041,7 +2043,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateSubnetRequest() ); @@ -2073,7 +2075,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateSubnetRequest() ); @@ -2127,7 +2129,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateSubnetRequest() ); @@ -2158,7 +2160,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateSubnetRequest() ); @@ -2191,7 +2193,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2213,7 +2215,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2231,7 +2233,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateSubnetRequest() ); @@ -2264,7 +2266,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateSubnetRequest() ); @@ -2319,7 +2321,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateSubnetRequest() ); @@ -2351,7 +2353,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateSubnetRequest() ); @@ -2385,7 +2387,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2407,7 +2409,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2425,7 +2427,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteSubnetRequest() ); @@ -2457,7 +2459,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteSubnetRequest() ); @@ -2511,7 +2513,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteSubnetRequest() ); @@ -2542,7 +2544,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteSubnetRequest() ); @@ -2575,7 +2577,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2597,7 +2599,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2615,7 +2617,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest() ); @@ -2648,7 +2650,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest() ); @@ -2702,7 +2704,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest() ); @@ -2736,7 +2738,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest() ); @@ -2769,7 +2771,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2792,7 +2794,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2813,7 +2815,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest() ); @@ -2846,7 +2848,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest() ); @@ -2900,7 +2902,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest() ); @@ -2934,7 +2936,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest() ); @@ -2967,7 +2969,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2990,7 +2992,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3011,7 +3013,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateRouterRequest() ); @@ -3043,7 +3045,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateRouterRequest() ); @@ -3097,7 +3099,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateRouterRequest() ); @@ -3128,7 +3130,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.CreateRouterRequest() ); @@ -3161,7 +3163,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3183,7 +3185,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3201,7 +3203,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateRouterRequest() ); @@ -3234,7 +3236,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateRouterRequest() ); @@ -3289,7 +3291,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateRouterRequest() ); @@ -3321,7 +3323,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.UpdateRouterRequest() ); @@ -3355,7 +3357,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3377,7 +3379,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3395,7 +3397,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteRouterRequest() ); @@ -3427,7 +3429,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteRouterRequest() ); @@ -3481,7 +3483,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteRouterRequest() ); @@ -3512,7 +3514,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.DeleteRouterRequest() ); @@ -3545,7 +3547,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3567,7 +3569,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3586,7 +3588,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListZonesRequest() ); @@ -3621,7 +3623,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListZonesRequest() ); @@ -3672,7 +3674,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListZonesRequest() ); @@ -3702,7 +3704,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListZonesRequest() ); @@ -3758,7 +3760,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListZonesRequest() ); @@ -3811,7 +3813,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListZonesRequest() ); @@ -3855,7 +3857,7 @@ describe('v1.EdgeNetworkClient', () => { projectId: 'bogus', }); const stub = sinon.stub(client, 'warn'); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListZonesRequest() ); @@ -3899,7 +3901,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListNetworksRequest() ); @@ -3932,7 +3934,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListNetworksRequest() ); @@ -3981,7 +3983,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListNetworksRequest() ); @@ -4012,7 +4014,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListNetworksRequest() ); @@ -4066,7 +4068,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListNetworksRequest() ); @@ -4117,7 +4119,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListNetworksRequest() ); @@ -4160,7 +4162,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListNetworksRequest() ); @@ -4202,7 +4204,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListSubnetsRequest() ); @@ -4235,7 +4237,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListSubnetsRequest() ); @@ -4284,7 +4286,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListSubnetsRequest() ); @@ -4315,7 +4317,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListSubnetsRequest() ); @@ -4369,7 +4371,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListSubnetsRequest() ); @@ -4420,7 +4422,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListSubnetsRequest() ); @@ -4463,7 +4465,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListSubnetsRequest() ); @@ -4507,7 +4509,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectsRequest() ); @@ -4546,7 +4548,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectsRequest() ); @@ -4601,7 +4603,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectsRequest() ); @@ -4632,7 +4634,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectsRequest() ); @@ -4692,7 +4694,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectsRequest() ); @@ -4741,7 +4743,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectsRequest() ); @@ -4790,7 +4792,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectsRequest() ); @@ -4833,7 +4835,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest() ); @@ -4873,7 +4875,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest() ); @@ -4930,7 +4932,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest() ); @@ -4964,7 +4966,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest() ); @@ -5033,7 +5035,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest() ); @@ -5091,7 +5093,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest() ); @@ -5145,7 +5147,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest() ); @@ -5192,7 +5194,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListRoutersRequest() ); @@ -5225,7 +5227,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListRoutersRequest() ); @@ -5274,7 +5276,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListRoutersRequest() ); @@ -5305,7 +5307,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListRoutersRequest() ); @@ -5359,7 +5361,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListRoutersRequest() ); @@ -5410,7 +5412,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListRoutersRequest() ); @@ -5453,7 +5455,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.edgenetwork.v1.ListRoutersRequest() ); @@ -5496,7 +5498,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5526,7 +5528,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5570,7 +5572,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5605,7 +5607,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5653,7 +5655,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5694,7 +5696,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5773,7 +5775,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5853,7 +5855,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5949,8 +5951,7 @@ describe('v1.EdgeNetworkClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5969,7 +5970,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5978,8 +5979,7 @@ describe('v1.EdgeNetworkClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5995,7 +5995,7 @@ describe('v1.EdgeNetworkClient', () => { }); describe('Path templates', () => { - describe('interconnect', () => { + describe('interconnect', async () => { const fakePath = '/rendered/path/interconnect'; const expectedParameters = { project: 'projectValue', @@ -6007,7 +6007,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.interconnectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6071,7 +6071,7 @@ describe('v1.EdgeNetworkClient', () => { }); }); - describe('interconnectAttachment', () => { + describe('interconnectAttachment', async () => { const fakePath = '/rendered/path/interconnectAttachment'; const expectedParameters = { project: 'projectValue', @@ -6083,7 +6083,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.interconnectAttachmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6167,7 +6167,7 @@ describe('v1.EdgeNetworkClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -6177,7 +6177,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6216,7 +6216,7 @@ describe('v1.EdgeNetworkClient', () => { }); }); - describe('network', () => { + describe('network', async () => { const fakePath = '/rendered/path/network'; const expectedParameters = { project: 'projectValue', @@ -6228,7 +6228,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.networkPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6292,7 +6292,7 @@ describe('v1.EdgeNetworkClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -6301,7 +6301,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6330,7 +6330,7 @@ describe('v1.EdgeNetworkClient', () => { }); }); - describe('router', () => { + describe('router', async () => { const fakePath = '/rendered/path/router'; const expectedParameters = { project: 'projectValue', @@ -6342,7 +6342,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.routerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6406,7 +6406,7 @@ describe('v1.EdgeNetworkClient', () => { }); }); - describe('subnet', () => { + describe('subnet', async () => { const fakePath = '/rendered/path/subnet'; const expectedParameters = { project: 'projectValue', @@ -6418,7 +6418,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.subnetPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6482,7 +6482,7 @@ describe('v1.EdgeNetworkClient', () => { }); }); - describe('zone', () => { + describe('zone', async () => { const fakePath = '/rendered/path/zone'; const expectedParameters = { project: 'projectValue', @@ -6493,7 +6493,7 @@ describe('v1.EdgeNetworkClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.zonePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-essentialcontacts/package.json b/packages/google-cloud-essentialcontacts/package.json index e79e86c3427..1ebb09f386f 100644 --- a/packages/google-cloud-essentialcontacts/package.json +++ b/packages/google-cloud-essentialcontacts/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata.google.cloud.essentialcontacts.v1.json b/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata.google.cloud.essentialcontacts.v1.json index 22035cc8043..0e22dab1ea4 100644 --- a/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata.google.cloud.essentialcontacts.v1.json +++ b/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata.google.cloud.essentialcontacts.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-essentialcontacts", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata_google.cloud.essentialcontacts.v1.json b/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata_google.cloud.essentialcontacts.v1.json index 22035cc8043..0e22dab1ea4 100644 --- a/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata_google.cloud.essentialcontacts.v1.json +++ b/packages/google-cloud-essentialcontacts/samples/generated/v1/snippet_metadata_google.cloud.essentialcontacts.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-essentialcontacts", - "version": "3.3.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-essentialcontacts/src/v1/essential_contacts_service_client.ts b/packages/google-cloud-essentialcontacts/src/v1/essential_contacts_service_client.ts index f967a27673f..75d1d70f494 100644 --- a/packages/google-cloud-essentialcontacts/src/v1/essential_contacts_service_client.ts +++ b/packages/google-cloud-essentialcontacts/src/v1/essential_contacts_service_client.ts @@ -503,7 +503,9 @@ export class EssentialContactsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('createContact request %j', request); const wrappedCallback: | Callback< @@ -634,7 +636,9 @@ export class EssentialContactsServiceClient { this._gaxModule.routingHeader.fromParams({ 'contact.name': request.contact!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateContact request %j', request); const wrappedCallback: | Callback< @@ -756,7 +760,9 @@ export class EssentialContactsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getContact request %j', request); const wrappedCallback: | Callback< @@ -884,7 +890,9 @@ export class EssentialContactsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('deleteContact request %j', request); const wrappedCallback: | Callback< @@ -1022,7 +1030,9 @@ export class EssentialContactsServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('sendTestMessage request %j', request); const wrappedCallback: | Callback< @@ -1157,7 +1167,9 @@ export class EssentialContactsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.essentialcontacts.v1.IListContactsRequest, @@ -1230,7 +1242,9 @@ export class EssentialContactsServiceClient { }); const defaultCallSettings = this._defaults['listContacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContacts stream %j', request); return this.descriptors.page.listContacts.createStream( this.innerApiCalls.listContacts as GaxCall, @@ -1285,7 +1299,9 @@ export class EssentialContactsServiceClient { }); const defaultCallSettings = this._defaults['listContacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listContacts iterate %j', request); return this.descriptors.page.listContacts.asyncIterate( this.innerApiCalls['listContacts'] as GaxCall, @@ -1401,7 +1417,9 @@ export class EssentialContactsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.essentialcontacts.v1.IComputeContactsRequest, @@ -1478,7 +1496,9 @@ export class EssentialContactsServiceClient { }); const defaultCallSettings = this._defaults['computeContacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeContacts stream %j', request); return this.descriptors.page.computeContacts.createStream( this.innerApiCalls.computeContacts as GaxCall, @@ -1537,7 +1557,9 @@ export class EssentialContactsServiceClient { }); const defaultCallSettings = this._defaults['computeContacts']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('computeContacts iterate %j', request); return this.descriptors.page.computeContacts.asyncIterate( this.innerApiCalls['computeContacts'] as GaxCall, diff --git a/packages/google-cloud-essentialcontacts/test/gapic_essential_contacts_service_v1.ts b/packages/google-cloud-essentialcontacts/test/gapic_essential_contacts_service_v1.ts index 5756cc08fe2..f1ca4e6163e 100644 --- a/packages/google-cloud-essentialcontacts/test/gapic_essential_contacts_service_v1.ts +++ b/packages/google-cloud-essentialcontacts/test/gapic_essential_contacts_service_v1.ts @@ -268,7 +268,9 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.essentialContactsServiceStub); client.close().then(() => { done(); @@ -331,7 +333,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.CreateContactRequest() ); @@ -363,7 +365,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.CreateContactRequest() ); @@ -411,7 +413,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.CreateContactRequest() ); @@ -443,7 +445,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.CreateContactRequest() ); @@ -465,7 +467,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.UpdateContactRequest() ); @@ -498,7 +500,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.UpdateContactRequest() ); @@ -547,7 +549,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.UpdateContactRequest() ); @@ -580,7 +582,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.UpdateContactRequest() ); @@ -603,7 +605,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.GetContactRequest() ); @@ -635,7 +637,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.GetContactRequest() ); @@ -683,7 +685,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.GetContactRequest() ); @@ -715,7 +717,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.GetContactRequest() ); @@ -737,7 +739,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.DeleteContactRequest() ); @@ -769,7 +771,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.DeleteContactRequest() ); @@ -817,7 +819,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.DeleteContactRequest() ); @@ -849,7 +851,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.DeleteContactRequest() ); @@ -871,7 +873,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.SendTestMessageRequest() ); @@ -903,7 +905,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.SendTestMessageRequest() ); @@ -951,7 +953,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.SendTestMessageRequest() ); @@ -983,7 +985,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.SendTestMessageRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ListContactsRequest() ); @@ -1045,7 +1047,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ListContactsRequest() ); @@ -1101,7 +1103,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ListContactsRequest() ); @@ -1133,7 +1135,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ListContactsRequest() ); @@ -1195,7 +1197,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ListContactsRequest() ); @@ -1248,7 +1250,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ListContactsRequest() ); @@ -1298,7 +1300,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ListContactsRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ComputeContactsRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ComputeContactsRequest() ); @@ -1438,7 +1440,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ComputeContactsRequest() ); @@ -1470,7 +1472,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ComputeContactsRequest() ); @@ -1532,7 +1534,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ComputeContactsRequest() ); @@ -1583,7 +1585,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ComputeContactsRequest() ); @@ -1633,7 +1635,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.essentialcontacts.v1.ComputeContactsRequest() ); @@ -1671,7 +1673,7 @@ describe('v1.EssentialContactsServiceClient', () => { }); describe('Path templates', () => { - describe('folderContact', () => { + describe('folderContact', async () => { const fakePath = '/rendered/path/folderContact'; const expectedParameters = { folder: 'folderValue', @@ -1682,7 +1684,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.folderContactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1721,7 +1723,7 @@ describe('v1.EssentialContactsServiceClient', () => { }); }); - describe('organizationContact', () => { + describe('organizationContact', async () => { const fakePath = '/rendered/path/organizationContact'; const expectedParameters = { organization: 'organizationValue', @@ -1732,7 +1734,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.organizationContactPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1784,7 +1786,7 @@ describe('v1.EssentialContactsServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -1794,7 +1796,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -1823,7 +1825,7 @@ describe('v1.EssentialContactsServiceClient', () => { }); }); - describe('projectContact', () => { + describe('projectContact', async () => { const fakePath = '/rendered/path/projectContact'; const expectedParameters = { project: 'projectValue', @@ -1834,7 +1836,7 @@ describe('v1.EssentialContactsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectContactPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-eventarc-publishing/package.json b/packages/google-cloud-eventarc-publishing/package.json index adb6a560def..0f1b09e7808 100644 --- a/packages/google-cloud-eventarc-publishing/package.json +++ b/packages/google-cloud-eventarc-publishing/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata.google.cloud.eventarc.publishing.v1.json b/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata.google.cloud.eventarc.publishing.v1.json index 3e61182bf6e..740b6f35f29 100644 --- a/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata.google.cloud.eventarc.publishing.v1.json +++ b/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata.google.cloud.eventarc.publishing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publishing", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json index c1583f53255..3d6882648b8 100644 --- a/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json +++ b/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publishing", - "version": "3.4.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts b/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts index a6d1a7a324b..a2538967558 100644 --- a/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts +++ b/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts @@ -493,7 +493,9 @@ export class PublisherClient { this._gaxModule.routingHeader.fromParams({ channel_connection: request.channelConnection ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('publishChannelConnectionEvents request %j', request); const wrappedCallback: | Callback< @@ -634,7 +636,9 @@ export class PublisherClient { this._gaxModule.routingHeader.fromParams({ channel: request.channel ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('publishEvents request %j', request); const wrappedCallback: | Callback< @@ -766,7 +770,9 @@ export class PublisherClient { this._gaxModule.routingHeader.fromParams({ message_bus: request.messageBus ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('publish request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts b/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts index 31d55c57d69..b0adbd592b8 100644 --- a/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts +++ b/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts @@ -190,7 +190,9 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.publisherStub); client.close().then(() => { done(); @@ -249,7 +251,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() ); @@ -281,7 +283,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() ); @@ -328,7 +330,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() ); @@ -362,7 +364,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() ); @@ -386,7 +388,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() ); @@ -417,7 +419,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() ); @@ -464,7 +466,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() ); @@ -495,7 +497,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() ); @@ -516,7 +518,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishRequest() ); @@ -547,7 +549,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishRequest() ); @@ -594,7 +596,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishRequest() ); @@ -622,7 +624,7 @@ describe('v1.PublisherClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.publishing.v1.PublishRequest() ); diff --git a/packages/google-cloud-eventarc/package.json b/packages/google-cloud-eventarc/package.json index 38f3f05949c..760c2db0aa2 100644 --- a/packages/google-cloud-eventarc/package.json +++ b/packages/google-cloud-eventarc/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata.google.cloud.eventarc.v1.json b/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata.google.cloud.eventarc.v1.json index 2929e9d67a5..769708383b1 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata.google.cloud.eventarc.v1.json +++ b/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata.google.cloud.eventarc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-eventarc", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json b/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json index f2620b6129e..5f443dd7ea6 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json +++ b/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-eventarc", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-eventarc/src/v1/eventarc_client.ts b/packages/google-cloud-eventarc/src/v1/eventarc_client.ts index 5fb065cfd48..f9abca731f7 100644 --- a/packages/google-cloud-eventarc/src/v1/eventarc_client.ts +++ b/packages/google-cloud-eventarc/src/v1/eventarc_client.ts @@ -954,7 +954,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getTrigger request %j', request); const wrappedCallback: | Callback< @@ -1060,7 +1062,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChannel request %j', request); const wrappedCallback: | Callback< @@ -1168,7 +1172,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getProvider request %j', request); const wrappedCallback: | Callback< @@ -1284,7 +1290,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChannelConnection request %j', request); const wrappedCallback: | Callback< @@ -1409,7 +1417,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGoogleChannelConfig request %j', request); const wrappedCallback: | Callback< @@ -1538,7 +1548,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ 'google_channel_config.name': request.googleChannelConfig!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('updateGoogleChannelConfig request %j', request); const wrappedCallback: | Callback< @@ -1651,7 +1663,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMessageBus request %j', request); const wrappedCallback: | Callback< @@ -1761,7 +1775,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getEnrollment request %j', request); const wrappedCallback: | Callback< @@ -1871,7 +1887,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getPipeline request %j', request); const wrappedCallback: | Callback< @@ -1987,7 +2005,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getGoogleApiSource request %j', request); const wrappedCallback: | Callback< @@ -2126,7 +2146,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2303,7 +2325,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ 'trigger.name': request.trigger!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2479,7 +2503,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2653,7 +2679,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2827,7 +2855,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ 'channel.name': request.channel!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2997,7 +3027,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3168,7 +3200,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3335,7 +3369,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3510,7 +3546,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3687,7 +3725,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ 'message_bus.name': request.messageBus!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3863,7 +3903,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4038,7 +4080,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4215,7 +4259,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ 'enrollment.name': request.enrollment!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4391,7 +4437,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4565,7 +4613,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4742,7 +4792,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ 'pipeline.name': request.pipeline!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4918,7 +4970,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5093,7 +5147,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5271,7 +5327,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ 'google_api_source.name': request.googleApiSource!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5447,7 +5505,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5618,7 +5678,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListTriggersRequest, @@ -5698,7 +5760,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listTriggers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTriggers stream %j', request); return this.descriptors.page.listTriggers.createStream( this.innerApiCalls.listTriggers as GaxCall, @@ -5760,7 +5824,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listTriggers']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listTriggers iterate %j', request); return this.descriptors.page.listTriggers.asyncIterate( this.innerApiCalls['listTriggers'] as GaxCall, @@ -5867,7 +5933,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListChannelsRequest, @@ -5943,7 +6011,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listChannels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannels stream %j', request); return this.descriptors.page.listChannels.createStream( this.innerApiCalls.listChannels as GaxCall, @@ -6001,7 +6071,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listChannels']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannels iterate %j', request); return this.descriptors.page.listChannels.asyncIterate( this.innerApiCalls['listChannels'] as GaxCall, @@ -6108,7 +6180,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListProvidersRequest, @@ -6184,7 +6258,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listProviders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProviders stream %j', request); return this.descriptors.page.listProviders.createStream( this.innerApiCalls.listProviders as GaxCall, @@ -6242,7 +6318,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listProviders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listProviders iterate %j', request); return this.descriptors.page.listProviders.asyncIterate( this.innerApiCalls['listProviders'] as GaxCall, @@ -6350,7 +6428,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, @@ -6421,7 +6501,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listChannelConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelConnections stream %j', request); return this.descriptors.page.listChannelConnections.createStream( this.innerApiCalls.listChannelConnections as GaxCall, @@ -6474,7 +6556,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listChannelConnections']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChannelConnections iterate %j', request); return this.descriptors.page.listChannelConnections.asyncIterate( this.innerApiCalls['listChannelConnections'] as GaxCall, @@ -6590,7 +6674,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListMessageBusesRequest, @@ -6669,7 +6755,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listMessageBuses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessageBuses stream %j', request); return this.descriptors.page.listMessageBuses.createStream( this.innerApiCalls.listMessageBuses as GaxCall, @@ -6730,7 +6818,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listMessageBuses']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessageBuses iterate %j', request); return this.descriptors.page.listMessageBuses.asyncIterate( this.innerApiCalls['listMessageBuses'] as GaxCall, @@ -6838,7 +6928,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, @@ -6909,7 +7001,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listMessageBusEnrollments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessageBusEnrollments stream %j', request); return this.descriptors.page.listMessageBusEnrollments.createStream( this.innerApiCalls.listMessageBusEnrollments as GaxCall, @@ -6962,7 +7056,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listMessageBusEnrollments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMessageBusEnrollments iterate %j', request); return this.descriptors.page.listMessageBusEnrollments.asyncIterate( this.innerApiCalls['listMessageBusEnrollments'] as GaxCall, @@ -7078,7 +7174,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, @@ -7157,7 +7255,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listEnrollments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnrollments stream %j', request); return this.descriptors.page.listEnrollments.createStream( this.innerApiCalls.listEnrollments as GaxCall, @@ -7218,7 +7318,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listEnrollments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listEnrollments iterate %j', request); return this.descriptors.page.listEnrollments.asyncIterate( this.innerApiCalls['listEnrollments'] as GaxCall, @@ -7328,7 +7430,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListPipelinesRequest, @@ -7407,7 +7511,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listPipelines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPipelines stream %j', request); return this.descriptors.page.listPipelines.createStream( this.innerApiCalls.listPipelines as GaxCall, @@ -7468,7 +7574,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listPipelines']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listPipelines iterate %j', request); return this.descriptors.page.listPipelines.asyncIterate( this.innerApiCalls['listPipelines'] as GaxCall, @@ -7584,7 +7692,9 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, @@ -7663,7 +7773,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listGoogleApiSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGoogleApiSources stream %j', request); return this.descriptors.page.listGoogleApiSources.createStream( this.innerApiCalls.listGoogleApiSources as GaxCall, @@ -7724,7 +7836,9 @@ export class EventarcClient { }); const defaultCallSettings = this._defaults['listGoogleApiSources']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listGoogleApiSources iterate %j', request); return this.descriptors.page.listGoogleApiSources.asyncIterate( this.innerApiCalls['listGoogleApiSources'] as GaxCall, @@ -8042,7 +8156,7 @@ export class EventarcClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts b/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts index e8218ce068c..6a2bcd0b2b7 100644 --- a/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts +++ b/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts @@ -288,7 +288,9 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.eventarcStub); client.close().then(() => { done(); @@ -347,7 +349,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetTriggerRequest() ); @@ -378,7 +380,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetTriggerRequest() ); @@ -425,7 +427,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetTriggerRequest() ); @@ -456,7 +458,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetTriggerRequest() ); @@ -477,7 +479,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelRequest() ); @@ -508,7 +510,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelRequest() ); @@ -555,7 +557,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelRequest() ); @@ -586,7 +588,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelRequest() ); @@ -607,7 +609,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetProviderRequest() ); @@ -638,7 +640,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetProviderRequest() ); @@ -685,7 +687,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetProviderRequest() ); @@ -716,7 +718,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetProviderRequest() ); @@ -737,7 +739,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelConnectionRequest() ); @@ -769,7 +771,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelConnectionRequest() ); @@ -816,7 +818,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelConnectionRequest() ); @@ -847,7 +849,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetChannelConnectionRequest() ); @@ -868,7 +870,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest() ); @@ -900,7 +902,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest() ); @@ -947,7 +949,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest() ); @@ -981,7 +983,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest() ); @@ -1005,7 +1007,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest() ); @@ -1038,7 +1040,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest() ); @@ -1086,7 +1088,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest() ); @@ -1121,7 +1123,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest() ); @@ -1146,7 +1148,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); @@ -1177,7 +1179,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); @@ -1224,7 +1226,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); @@ -1255,7 +1257,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); @@ -1276,7 +1278,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() ); @@ -1307,7 +1309,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() ); @@ -1354,7 +1356,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() ); @@ -1385,7 +1387,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() ); @@ -1406,7 +1408,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); @@ -1437,7 +1439,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); @@ -1484,7 +1486,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); @@ -1515,7 +1517,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); @@ -1536,7 +1538,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); @@ -1568,7 +1570,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); @@ -1615,7 +1617,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); @@ -1646,7 +1648,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); @@ -1667,7 +1669,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); @@ -1700,7 +1702,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); @@ -1754,7 +1756,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); @@ -1785,7 +1787,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); @@ -1818,7 +1820,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1840,7 +1842,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1861,7 +1863,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); @@ -1895,7 +1897,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); @@ -1950,7 +1952,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); @@ -1982,7 +1984,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); @@ -2016,7 +2018,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2038,7 +2040,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2059,7 +2061,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); @@ -2092,7 +2094,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); @@ -2146,7 +2148,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); @@ -2177,7 +2179,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); @@ -2210,7 +2212,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2232,7 +2234,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2253,7 +2255,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); @@ -2286,7 +2288,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); @@ -2340,7 +2342,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); @@ -2371,7 +2373,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); @@ -2404,7 +2406,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2426,7 +2428,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2447,7 +2449,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); @@ -2481,7 +2483,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); @@ -2536,7 +2538,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); @@ -2568,7 +2570,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); @@ -2602,7 +2604,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2624,7 +2626,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2645,7 +2647,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); @@ -2678,7 +2680,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); @@ -2732,7 +2734,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); @@ -2763,7 +2765,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); @@ -2796,7 +2798,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2818,7 +2820,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2839,7 +2841,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() ); @@ -2872,7 +2874,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() ); @@ -2926,7 +2928,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() ); @@ -2960,7 +2962,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() ); @@ -2993,7 +2995,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3016,7 +3018,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3037,7 +3039,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() ); @@ -3070,7 +3072,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() ); @@ -3124,7 +3126,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() ); @@ -3158,7 +3160,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() ); @@ -3191,7 +3193,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3214,7 +3216,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3235,7 +3237,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() ); @@ -3268,7 +3270,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() ); @@ -3322,7 +3324,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() ); @@ -3353,7 +3355,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() ); @@ -3386,7 +3388,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3408,7 +3410,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3429,7 +3431,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() ); @@ -3463,7 +3465,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() ); @@ -3518,7 +3520,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() ); @@ -3550,7 +3552,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() ); @@ -3584,7 +3586,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3606,7 +3608,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3627,7 +3629,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() ); @@ -3660,7 +3662,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() ); @@ -3714,7 +3716,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() ); @@ -3745,7 +3747,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() ); @@ -3778,7 +3780,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3800,7 +3802,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3821,7 +3823,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() ); @@ -3854,7 +3856,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() ); @@ -3908,7 +3910,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() ); @@ -3939,7 +3941,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() ); @@ -3972,7 +3974,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3994,7 +3996,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4015,7 +4017,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() ); @@ -4049,7 +4051,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() ); @@ -4104,7 +4106,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() ); @@ -4136,7 +4138,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() ); @@ -4170,7 +4172,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4192,7 +4194,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4213,7 +4215,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() ); @@ -4246,7 +4248,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() ); @@ -4300,7 +4302,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() ); @@ -4331,7 +4333,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() ); @@ -4364,7 +4366,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4386,7 +4388,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4407,7 +4409,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreatePipelineRequest() ); @@ -4440,7 +4442,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreatePipelineRequest() ); @@ -4494,7 +4496,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreatePipelineRequest() ); @@ -4525,7 +4527,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreatePipelineRequest() ); @@ -4558,7 +4560,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4580,7 +4582,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4601,7 +4603,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() ); @@ -4635,7 +4637,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() ); @@ -4690,7 +4692,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() ); @@ -4722,7 +4724,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() ); @@ -4756,7 +4758,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4778,7 +4780,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4799,7 +4801,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeletePipelineRequest() ); @@ -4832,7 +4834,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeletePipelineRequest() ); @@ -4886,7 +4888,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeletePipelineRequest() ); @@ -4917,7 +4919,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeletePipelineRequest() ); @@ -4950,7 +4952,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4972,7 +4974,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4993,7 +4995,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() ); @@ -5026,7 +5028,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() ); @@ -5080,7 +5082,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() ); @@ -5114,7 +5116,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() ); @@ -5147,7 +5149,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5169,7 +5171,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5190,7 +5192,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() ); @@ -5224,7 +5226,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() ); @@ -5279,7 +5281,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() ); @@ -5314,7 +5316,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() ); @@ -5348,7 +5350,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5370,7 +5372,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5391,7 +5393,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() ); @@ -5424,7 +5426,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() ); @@ -5478,7 +5480,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() ); @@ -5512,7 +5514,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() ); @@ -5545,7 +5547,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5567,7 +5569,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5588,7 +5590,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListTriggersRequest() ); @@ -5621,7 +5623,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListTriggersRequest() ); @@ -5670,7 +5672,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListTriggersRequest() ); @@ -5701,7 +5703,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListTriggersRequest() ); @@ -5755,7 +5757,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListTriggersRequest() ); @@ -5806,7 +5808,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListTriggersRequest() ); @@ -5849,7 +5851,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListTriggersRequest() ); @@ -5891,7 +5893,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelsRequest() ); @@ -5924,7 +5926,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelsRequest() ); @@ -5973,7 +5975,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelsRequest() ); @@ -6004,7 +6006,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelsRequest() ); @@ -6058,7 +6060,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelsRequest() ); @@ -6109,7 +6111,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelsRequest() ); @@ -6152,7 +6154,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelsRequest() ); @@ -6194,7 +6196,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListProvidersRequest() ); @@ -6227,7 +6229,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListProvidersRequest() ); @@ -6276,7 +6278,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListProvidersRequest() ); @@ -6307,7 +6309,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListProvidersRequest() ); @@ -6361,7 +6363,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListProvidersRequest() ); @@ -6410,7 +6412,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListProvidersRequest() ); @@ -6453,7 +6455,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListProvidersRequest() ); @@ -6495,7 +6497,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() ); @@ -6535,7 +6537,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() ); @@ -6590,7 +6592,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() ); @@ -6624,7 +6626,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() ); @@ -6691,7 +6693,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() ); @@ -6747,7 +6749,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() ); @@ -6801,7 +6803,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() ); @@ -6848,7 +6850,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() ); @@ -6881,7 +6883,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() ); @@ -6930,7 +6932,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() ); @@ -6961,7 +6963,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() ); @@ -7015,7 +7017,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() ); @@ -7064,7 +7066,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() ); @@ -7107,7 +7109,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() ); @@ -7149,7 +7151,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); @@ -7179,7 +7181,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); @@ -7221,7 +7223,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); @@ -7255,7 +7257,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); @@ -7308,7 +7310,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); @@ -7360,7 +7362,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); @@ -7403,7 +7405,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); @@ -7449,7 +7451,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); @@ -7482,7 +7484,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); @@ -7531,7 +7533,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); @@ -7562,7 +7564,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); @@ -7616,7 +7618,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); @@ -7665,7 +7667,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); @@ -7708,7 +7710,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); @@ -7750,7 +7752,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); @@ -7783,7 +7785,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); @@ -7832,7 +7834,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); @@ -7863,7 +7865,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); @@ -7917,7 +7919,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); @@ -7966,7 +7968,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); @@ -8009,7 +8011,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); @@ -8051,7 +8053,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); @@ -8091,7 +8093,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); @@ -8146,7 +8148,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); @@ -8177,7 +8179,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); @@ -8237,7 +8239,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); @@ -8286,7 +8288,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); @@ -8335,7 +8337,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); @@ -8377,7 +8379,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8407,7 +8409,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8451,7 +8453,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -8483,7 +8485,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -8513,7 +8515,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -8557,7 +8559,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -8589,7 +8591,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -8622,7 +8624,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -8666,7 +8668,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -8701,7 +8703,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -8731,7 +8733,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -8775,7 +8777,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -8810,7 +8812,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -8858,7 +8860,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -8899,7 +8901,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -8978,7 +8980,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -9058,7 +9060,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -9154,8 +9156,7 @@ describe('v1.EventarcClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -9174,7 +9175,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -9183,8 +9184,7 @@ describe('v1.EventarcClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -9200,7 +9200,7 @@ describe('v1.EventarcClient', () => { }); describe('Path templates', () => { - describe('channel', () => { + describe('channel', async () => { const fakePath = '/rendered/path/channel'; const expectedParameters = { project: 'projectValue', @@ -9211,7 +9211,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.channelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9264,7 +9264,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('channelConnection', () => { + describe('channelConnection', async () => { const fakePath = '/rendered/path/channelConnection'; const expectedParameters = { project: 'projectValue', @@ -9275,7 +9275,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.channelConnectionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9341,7 +9341,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('enrollment', () => { + describe('enrollment', async () => { const fakePath = '/rendered/path/enrollment'; const expectedParameters = { project: 'projectValue', @@ -9352,7 +9352,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.enrollmentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9405,7 +9405,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('googleApiSource', () => { + describe('googleApiSource', async () => { const fakePath = '/rendered/path/googleApiSource'; const expectedParameters = { project: 'projectValue', @@ -9416,7 +9416,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.googleApiSourcePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9470,7 +9470,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('googleChannelConfig', () => { + describe('googleChannelConfig', async () => { const fakePath = '/rendered/path/googleChannelConfig'; const expectedParameters = { project: 'projectValue', @@ -9480,7 +9480,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.googleChannelConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9532,7 +9532,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -9542,7 +9542,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9581,7 +9581,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('messageBus', () => { + describe('messageBus', async () => { const fakePath = '/rendered/path/messageBus'; const expectedParameters = { project: 'projectValue', @@ -9592,7 +9592,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.messageBusPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9645,7 +9645,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('pipeline', () => { + describe('pipeline', async () => { const fakePath = '/rendered/path/pipeline'; const expectedParameters = { project: 'projectValue', @@ -9656,7 +9656,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.pipelinePathTemplate.render = sinon .stub() .returns(fakePath); @@ -9709,7 +9709,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -9718,7 +9718,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9747,7 +9747,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('provider', () => { + describe('provider', async () => { const fakePath = '/rendered/path/provider'; const expectedParameters = { project: 'projectValue', @@ -9758,7 +9758,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.providerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -9811,7 +9811,7 @@ describe('v1.EventarcClient', () => { }); }); - describe('trigger', () => { + describe('trigger', async () => { const fakePath = '/rendered/path/trigger'; const expectedParameters = { project: 'projectValue', @@ -9822,7 +9822,7 @@ describe('v1.EventarcClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.triggerPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-filestore/package.json b/packages/google-cloud-filestore/package.json index 08262f8249f..5d4727ffda5 100644 --- a/packages/google-cloud-filestore/package.json +++ b/packages/google-cloud-filestore/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json b/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json index 455fef1cbc5..db62e4132ad 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json +++ b/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata.google.cloud.filestore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-filestore", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata_google.cloud.filestore.v1.json b/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata_google.cloud.filestore.v1.json index bc5502aab0f..ac426096fe7 100644 --- a/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata_google.cloud.filestore.v1.json +++ b/packages/google-cloud-filestore/samples/generated/v1/snippet_metadata_google.cloud.filestore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-filestore", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json b/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json index 62121f14201..b8a83b8ee09 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata.google.cloud.filestore.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-filestore", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata_google.cloud.filestore.v1beta1.json b/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata_google.cloud.filestore.v1beta1.json index 007335dc00f..d4caa3a7b2f 100644 --- a/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata_google.cloud.filestore.v1beta1.json +++ b/packages/google-cloud-filestore/samples/generated/v1beta1/snippet_metadata_google.cloud.filestore.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-filestore", - "version": "3.4.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts b/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts index 4be40aaf9a1..48651a44ba5 100644 --- a/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts +++ b/packages/google-cloud-filestore/src/v1/cloud_filestore_manager_client.ts @@ -710,7 +710,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -821,7 +823,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSnapshot request %j', request); const wrappedCallback: | Callback< @@ -930,7 +934,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1067,7 +1073,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1245,7 +1253,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1423,7 +1433,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1595,7 +1607,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1766,7 +1780,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1942,7 +1958,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2110,7 +2128,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2280,7 +2300,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ 'snapshot.name': request.snapshot!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2459,7 +2481,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2627,7 +2651,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2797,7 +2823,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2970,7 +2998,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3143,7 +3173,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.filestore.v1.IListInstancesRequest, @@ -3218,7 +3250,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -3275,7 +3309,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -3388,7 +3424,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.filestore.v1.IListSnapshotsRequest, @@ -3463,7 +3501,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSnapshots stream %j', request); return this.descriptors.page.listSnapshots.createStream( this.innerApiCalls.listSnapshots as GaxCall, @@ -3520,7 +3560,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSnapshots iterate %j', request); return this.descriptors.page.listSnapshots.asyncIterate( this.innerApiCalls['listSnapshots'] as GaxCall, @@ -3627,7 +3669,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.filestore.v1.IListBackupsRequest, @@ -3702,7 +3746,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -3759,7 +3805,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -3939,7 +3987,7 @@ export class CloudFilestoreManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts b/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts index 991bcfc96c0..ce0f78ff989 100644 --- a/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts +++ b/packages/google-cloud-filestore/src/v1beta1/cloud_filestore_manager_client.ts @@ -767,7 +767,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getInstance request %j', request); const wrappedCallback: | Callback< @@ -884,7 +886,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSnapshot request %j', request); const wrappedCallback: | Callback< @@ -1001,7 +1005,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1112,7 +1118,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getShare request %j', request); const wrappedCallback: | Callback< @@ -1254,7 +1262,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1433,7 +1443,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ 'instance.name': request.instance!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1614,7 +1626,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1786,7 +1800,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1959,7 +1975,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2130,7 +2148,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2306,7 +2326,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2474,7 +2496,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2644,7 +2668,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ 'snapshot.name': request.snapshot!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2821,7 +2847,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2989,7 +3017,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3159,7 +3189,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3335,7 +3367,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3503,7 +3537,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3680,7 +3716,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ 'share.name': request.share!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3853,7 +3891,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.filestore.v1beta1.IListInstancesRequest, @@ -3928,7 +3968,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -3985,7 +4027,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -4098,7 +4142,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, @@ -4173,7 +4219,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSnapshots stream %j', request); return this.descriptors.page.listSnapshots.createStream( this.innerApiCalls.listSnapshots as GaxCall, @@ -4230,7 +4278,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listSnapshots']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSnapshots iterate %j', request); return this.descriptors.page.listSnapshots.asyncIterate( this.innerApiCalls['listSnapshots'] as GaxCall, @@ -4343,7 +4393,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.filestore.v1beta1.IListBackupsRequest, @@ -4418,7 +4470,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -4475,7 +4529,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -4584,7 +4640,9 @@ export class CloudFilestoreManagerClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.filestore.v1beta1.IListSharesRequest, @@ -4656,7 +4714,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listShares']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listShares stream %j', request); return this.descriptors.page.listShares.createStream( this.innerApiCalls.listShares as GaxCall, @@ -4710,7 +4770,9 @@ export class CloudFilestoreManagerClient { }); const defaultCallSettings = this._defaults['listShares']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listShares iterate %j', request); return this.descriptors.page.listShares.asyncIterate( this.innerApiCalls['listShares'] as GaxCall, @@ -4890,7 +4952,7 @@ export class CloudFilestoreManagerClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1.ts b/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1.ts index 7ad23646d9a..22e634f9670 100644 --- a/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1.ts +++ b/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1.ts @@ -302,7 +302,9 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudFilestoreManagerStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetInstanceRequest() ); @@ -397,7 +399,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetInstanceRequest() ); @@ -445,7 +447,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetInstanceRequest() ); @@ -477,7 +479,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetInstanceRequest() ); @@ -499,7 +501,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetSnapshotRequest() ); @@ -531,7 +533,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetSnapshotRequest() ); @@ -579,7 +581,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetSnapshotRequest() ); @@ -611,7 +613,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetSnapshotRequest() ); @@ -633,7 +635,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetBackupRequest() ); @@ -665,7 +667,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetBackupRequest() ); @@ -713,7 +715,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetBackupRequest() ); @@ -742,7 +744,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.GetBackupRequest() ); @@ -764,7 +766,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateInstanceRequest() ); @@ -798,7 +800,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateInstanceRequest() ); @@ -853,7 +855,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateInstanceRequest() ); @@ -885,7 +887,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateInstanceRequest() ); @@ -919,7 +921,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -942,7 +944,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -964,7 +966,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateInstanceRequest() ); @@ -999,7 +1001,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateInstanceRequest() ); @@ -1055,7 +1057,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateInstanceRequest() ); @@ -1088,7 +1090,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateInstanceRequest() ); @@ -1123,7 +1125,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1146,7 +1148,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1168,7 +1170,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RestoreInstanceRequest() ); @@ -1202,7 +1204,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RestoreInstanceRequest() ); @@ -1257,7 +1259,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RestoreInstanceRequest() ); @@ -1289,7 +1291,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RestoreInstanceRequest() ); @@ -1323,7 +1325,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1346,7 +1348,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1368,7 +1370,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RevertInstanceRequest() ); @@ -1402,7 +1404,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RevertInstanceRequest() ); @@ -1457,7 +1459,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RevertInstanceRequest() ); @@ -1489,7 +1491,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.RevertInstanceRequest() ); @@ -1523,7 +1525,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1546,7 +1548,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1568,7 +1570,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteInstanceRequest() ); @@ -1602,7 +1604,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteInstanceRequest() ); @@ -1657,7 +1659,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteInstanceRequest() ); @@ -1689,7 +1691,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteInstanceRequest() ); @@ -1723,7 +1725,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1746,7 +1748,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1768,7 +1770,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateSnapshotRequest() ); @@ -1802,7 +1804,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateSnapshotRequest() ); @@ -1857,7 +1859,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateSnapshotRequest() ); @@ -1889,7 +1891,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateSnapshotRequest() ); @@ -1923,7 +1925,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1946,7 +1948,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1968,7 +1970,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteSnapshotRequest() ); @@ -2002,7 +2004,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteSnapshotRequest() ); @@ -2057,7 +2059,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteSnapshotRequest() ); @@ -2089,7 +2091,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteSnapshotRequest() ); @@ -2123,7 +2125,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2146,7 +2148,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2168,7 +2170,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateSnapshotRequest() ); @@ -2203,7 +2205,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateSnapshotRequest() ); @@ -2259,7 +2261,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateSnapshotRequest() ); @@ -2292,7 +2294,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateSnapshotRequest() ); @@ -2327,7 +2329,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2350,7 +2352,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2372,7 +2374,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateBackupRequest() ); @@ -2405,7 +2407,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateBackupRequest() ); @@ -2460,7 +2462,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateBackupRequest() ); @@ -2492,7 +2494,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.CreateBackupRequest() ); @@ -2526,7 +2528,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2549,7 +2551,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2568,7 +2570,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteBackupRequest() ); @@ -2601,7 +2603,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteBackupRequest() ); @@ -2656,7 +2658,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteBackupRequest() ); @@ -2688,7 +2690,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.DeleteBackupRequest() ); @@ -2722,7 +2724,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2745,7 +2747,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2764,7 +2766,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateBackupRequest() ); @@ -2798,7 +2800,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateBackupRequest() ); @@ -2854,7 +2856,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateBackupRequest() ); @@ -2887,7 +2889,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.UpdateBackupRequest() ); @@ -2922,7 +2924,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2945,7 +2947,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2964,7 +2966,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.PromoteReplicaRequest() ); @@ -2998,7 +3000,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.PromoteReplicaRequest() ); @@ -3053,7 +3055,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.PromoteReplicaRequest() ); @@ -3085,7 +3087,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.PromoteReplicaRequest() ); @@ -3119,7 +3121,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3142,7 +3144,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3164,7 +3166,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListInstancesRequest() ); @@ -3198,7 +3200,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListInstancesRequest() ); @@ -3248,7 +3250,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListInstancesRequest() ); @@ -3280,7 +3282,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListInstancesRequest() ); @@ -3335,7 +3337,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListInstancesRequest() ); @@ -3385,7 +3387,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListInstancesRequest() ); @@ -3429,7 +3431,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListInstancesRequest() ); @@ -3472,7 +3474,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListSnapshotsRequest() ); @@ -3506,7 +3508,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListSnapshotsRequest() ); @@ -3556,7 +3558,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListSnapshotsRequest() ); @@ -3588,7 +3590,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListSnapshotsRequest() ); @@ -3643,7 +3645,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListSnapshotsRequest() ); @@ -3693,7 +3695,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListSnapshotsRequest() ); @@ -3737,7 +3739,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListSnapshotsRequest() ); @@ -3780,7 +3782,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListBackupsRequest() ); @@ -3814,7 +3816,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListBackupsRequest() ); @@ -3864,7 +3866,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListBackupsRequest() ); @@ -3896,7 +3898,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListBackupsRequest() ); @@ -3951,7 +3953,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListBackupsRequest() ); @@ -4003,7 +4005,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListBackupsRequest() ); @@ -4047,7 +4049,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1.ListBackupsRequest() ); @@ -4091,7 +4093,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4122,7 +4124,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4167,7 +4169,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -4203,7 +4205,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4252,7 +4254,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -4294,7 +4296,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4376,7 +4378,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4459,7 +4461,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4558,8 +4560,7 @@ describe('v1.CloudFilestoreManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4579,7 +4580,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4588,8 +4589,7 @@ describe('v1.CloudFilestoreManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4605,7 +4605,7 @@ describe('v1.CloudFilestoreManagerClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -4617,7 +4617,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4670,7 +4670,7 @@ describe('v1.CloudFilestoreManagerClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -4682,7 +4682,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -4735,7 +4735,7 @@ describe('v1.CloudFilestoreManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4746,7 +4746,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4785,7 +4785,7 @@ describe('v1.CloudFilestoreManagerClient', () => { }); }); - describe('snapshot', () => { + describe('snapshot', async () => { const fakePath = '/rendered/path/snapshot'; const expectedParameters = { project: 'projectValue', @@ -4798,7 +4798,7 @@ describe('v1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.snapshotPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1beta1.ts b/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1beta1.ts index 6e4de15c71b..8c0b7155e3a 100644 --- a/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1beta1.ts +++ b/packages/google-cloud-filestore/test/gapic_cloud_filestore_manager_v1beta1.ts @@ -302,7 +302,9 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudFilestoreManagerStub); client.close().then(() => { done(); @@ -365,7 +367,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetInstanceRequest() ); @@ -397,7 +399,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetInstanceRequest() ); @@ -445,7 +447,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetInstanceRequest() ); @@ -477,7 +479,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetInstanceRequest() ); @@ -499,7 +501,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetSnapshotRequest() ); @@ -531,7 +533,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetSnapshotRequest() ); @@ -579,7 +581,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetSnapshotRequest() ); @@ -611,7 +613,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetSnapshotRequest() ); @@ -633,7 +635,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetBackupRequest() ); @@ -665,7 +667,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetBackupRequest() ); @@ -713,7 +715,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetBackupRequest() ); @@ -742,7 +744,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetBackupRequest() ); @@ -764,7 +766,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetShareRequest() ); @@ -796,7 +798,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetShareRequest() ); @@ -844,7 +846,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetShareRequest() ); @@ -873,7 +875,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.GetShareRequest() ); @@ -895,7 +897,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateInstanceRequest() ); @@ -929,7 +931,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateInstanceRequest() ); @@ -984,7 +986,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateInstanceRequest() ); @@ -1016,7 +1018,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateInstanceRequest() ); @@ -1050,7 +1052,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1073,7 +1075,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1095,7 +1097,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateInstanceRequest() ); @@ -1130,7 +1132,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateInstanceRequest() ); @@ -1186,7 +1188,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateInstanceRequest() ); @@ -1219,7 +1221,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateInstanceRequest() ); @@ -1254,7 +1256,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1277,7 +1279,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1299,7 +1301,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RestoreInstanceRequest() ); @@ -1333,7 +1335,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RestoreInstanceRequest() ); @@ -1388,7 +1390,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RestoreInstanceRequest() ); @@ -1420,7 +1422,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RestoreInstanceRequest() ); @@ -1454,7 +1456,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1477,7 +1479,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1499,7 +1501,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RevertInstanceRequest() ); @@ -1533,7 +1535,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RevertInstanceRequest() ); @@ -1588,7 +1590,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RevertInstanceRequest() ); @@ -1620,7 +1622,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.RevertInstanceRequest() ); @@ -1654,7 +1656,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1677,7 +1679,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1699,7 +1701,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.PromoteReplicaRequest() ); @@ -1733,7 +1735,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.PromoteReplicaRequest() ); @@ -1788,7 +1790,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.PromoteReplicaRequest() ); @@ -1820,7 +1822,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.PromoteReplicaRequest() ); @@ -1854,7 +1856,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1877,7 +1879,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1899,7 +1901,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteInstanceRequest() ); @@ -1933,7 +1935,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteInstanceRequest() ); @@ -1988,7 +1990,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteInstanceRequest() ); @@ -2020,7 +2022,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteInstanceRequest() ); @@ -2054,7 +2056,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2077,7 +2079,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2099,7 +2101,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateSnapshotRequest() ); @@ -2133,7 +2135,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateSnapshotRequest() ); @@ -2188,7 +2190,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateSnapshotRequest() ); @@ -2220,7 +2222,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateSnapshotRequest() ); @@ -2254,7 +2256,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2277,7 +2279,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2299,7 +2301,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteSnapshotRequest() ); @@ -2333,7 +2335,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteSnapshotRequest() ); @@ -2388,7 +2390,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteSnapshotRequest() ); @@ -2420,7 +2422,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteSnapshotRequest() ); @@ -2454,7 +2456,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2477,7 +2479,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2499,7 +2501,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateSnapshotRequest() ); @@ -2534,7 +2536,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateSnapshotRequest() ); @@ -2590,7 +2592,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateSnapshotRequest() ); @@ -2623,7 +2625,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateSnapshotRequest() ); @@ -2658,7 +2660,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2681,7 +2683,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2703,7 +2705,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateBackupRequest() ); @@ -2736,7 +2738,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateBackupRequest() ); @@ -2791,7 +2793,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateBackupRequest() ); @@ -2823,7 +2825,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateBackupRequest() ); @@ -2857,7 +2859,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2880,7 +2882,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2899,7 +2901,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteBackupRequest() ); @@ -2932,7 +2934,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteBackupRequest() ); @@ -2987,7 +2989,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteBackupRequest() ); @@ -3019,7 +3021,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteBackupRequest() ); @@ -3053,7 +3055,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3076,7 +3078,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3095,7 +3097,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateBackupRequest() ); @@ -3129,7 +3131,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateBackupRequest() ); @@ -3185,7 +3187,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateBackupRequest() ); @@ -3218,7 +3220,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateBackupRequest() ); @@ -3253,7 +3255,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3276,7 +3278,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3295,7 +3297,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateShareRequest() ); @@ -3328,7 +3330,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateShareRequest() ); @@ -3383,7 +3385,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateShareRequest() ); @@ -3415,7 +3417,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.CreateShareRequest() ); @@ -3449,7 +3451,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3472,7 +3474,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3491,7 +3493,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteShareRequest() ); @@ -3524,7 +3526,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteShareRequest() ); @@ -3579,7 +3581,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteShareRequest() ); @@ -3611,7 +3613,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.DeleteShareRequest() ); @@ -3645,7 +3647,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3668,7 +3670,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3687,7 +3689,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateShareRequest() ); @@ -3721,7 +3723,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateShareRequest() ); @@ -3777,7 +3779,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateShareRequest() ); @@ -3810,7 +3812,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.UpdateShareRequest() ); @@ -3845,7 +3847,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3868,7 +3870,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3887,7 +3889,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListInstancesRequest() ); @@ -3927,7 +3929,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListInstancesRequest() ); @@ -3983,7 +3985,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListInstancesRequest() ); @@ -4015,7 +4017,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListInstancesRequest() ); @@ -4076,7 +4078,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListInstancesRequest() ); @@ -4126,7 +4128,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListInstancesRequest() ); @@ -4176,7 +4178,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListInstancesRequest() ); @@ -4219,7 +4221,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSnapshotsRequest() ); @@ -4259,7 +4261,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSnapshotsRequest() ); @@ -4315,7 +4317,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSnapshotsRequest() ); @@ -4347,7 +4349,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSnapshotsRequest() ); @@ -4408,7 +4410,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSnapshotsRequest() ); @@ -4458,7 +4460,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSnapshotsRequest() ); @@ -4508,7 +4510,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSnapshotsRequest() ); @@ -4551,7 +4553,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListBackupsRequest() ); @@ -4591,7 +4593,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListBackupsRequest() ); @@ -4647,7 +4649,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListBackupsRequest() ); @@ -4679,7 +4681,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListBackupsRequest() ); @@ -4740,7 +4742,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListBackupsRequest() ); @@ -4792,7 +4794,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListBackupsRequest() ); @@ -4842,7 +4844,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListBackupsRequest() ); @@ -4887,7 +4889,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSharesRequest() ); @@ -4927,7 +4929,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSharesRequest() ); @@ -4983,7 +4985,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSharesRequest() ); @@ -5015,7 +5017,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSharesRequest() ); @@ -5076,7 +5078,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSharesRequest() ); @@ -5128,7 +5130,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSharesRequest() ); @@ -5178,7 +5180,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.filestore.v1beta1.ListSharesRequest() ); @@ -5222,7 +5224,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5253,7 +5255,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5298,7 +5300,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5334,7 +5336,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5383,7 +5385,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5425,7 +5427,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -5507,7 +5509,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -5590,7 +5592,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -5689,8 +5691,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -5710,7 +5711,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -5719,8 +5720,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -5736,7 +5736,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -5748,7 +5748,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5801,7 +5801,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { }); }); - describe('domain', () => { + describe('domain', async () => { const fakePath = '/rendered/path/domain'; const expectedParameters = { project: 'projectValue', @@ -5813,7 +5813,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.domainPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5866,7 +5866,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { }); }); - describe('instance', () => { + describe('instance', async () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { project: 'projectValue', @@ -5878,7 +5878,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() .returns(fakePath); @@ -5931,7 +5931,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -5942,7 +5942,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -5981,7 +5981,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { }); }); - describe('share', () => { + describe('share', async () => { const fakePath = '/rendered/path/share'; const expectedParameters = { project: 'projectValue', @@ -5994,7 +5994,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sharePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6058,7 +6058,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { }); }); - describe('snapshot', () => { + describe('snapshot', async () => { const fakePath = '/rendered/path/snapshot'; const expectedParameters = { project: 'projectValue', @@ -6071,7 +6071,7 @@ describe('v1beta1.CloudFilestoreManagerClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.snapshotPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-functions/package.json b/packages/google-cloud-functions/package.json index df3634814c5..af2fb8191e0 100644 --- a/packages/google-cloud-functions/package.json +++ b/packages/google-cloud-functions/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-functions/samples/generated/v1/snippet_metadata.google.cloud.functions.v1.json b/packages/google-cloud-functions/samples/generated/v1/snippet_metadata.google.cloud.functions.v1.json index 55759c84ce6..6b73dcee0df 100644 --- a/packages/google-cloud-functions/samples/generated/v1/snippet_metadata.google.cloud.functions.v1.json +++ b/packages/google-cloud-functions/samples/generated/v1/snippet_metadata.google.cloud.functions.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/samples/generated/v1/snippet_metadata_google.cloud.functions.v1.json b/packages/google-cloud-functions/samples/generated/v1/snippet_metadata_google.cloud.functions.v1.json index e823eeade00..62e3124782c 100644 --- a/packages/google-cloud-functions/samples/generated/v1/snippet_metadata_google.cloud.functions.v1.json +++ b/packages/google-cloud-functions/samples/generated/v1/snippet_metadata_google.cloud.functions.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/samples/generated/v2/snippet_metadata.google.cloud.functions.v2.json b/packages/google-cloud-functions/samples/generated/v2/snippet_metadata.google.cloud.functions.v2.json index e60eb0576cc..0c4e8db492e 100644 --- a/packages/google-cloud-functions/samples/generated/v2/snippet_metadata.google.cloud.functions.v2.json +++ b/packages/google-cloud-functions/samples/generated/v2/snippet_metadata.google.cloud.functions.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/samples/generated/v2/snippet_metadata_google.cloud.functions.v2.json b/packages/google-cloud-functions/samples/generated/v2/snippet_metadata_google.cloud.functions.v2.json index cb60bc83ba7..3e3f9e37bf4 100644 --- a/packages/google-cloud-functions/samples/generated/v2/snippet_metadata_google.cloud.functions.v2.json +++ b/packages/google-cloud-functions/samples/generated/v2/snippet_metadata_google.cloud.functions.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata.google.cloud.functions.v2alpha.json b/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata.google.cloud.functions.v2alpha.json index fa660220473..da768bf2589 100644 --- a/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata.google.cloud.functions.v2alpha.json +++ b/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata.google.cloud.functions.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata_google.cloud.functions.v2alpha.json b/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata_google.cloud.functions.v2alpha.json index 6b67bb7a3b2..3b92a97edfd 100644 --- a/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata_google.cloud.functions.v2alpha.json +++ b/packages/google-cloud-functions/samples/generated/v2alpha/snippet_metadata_google.cloud.functions.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata.google.cloud.functions.v2beta.json b/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata.google.cloud.functions.v2beta.json index 202dccdd890..066eec838b1 100644 --- a/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata.google.cloud.functions.v2beta.json +++ b/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata.google.cloud.functions.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata_google.cloud.functions.v2beta.json b/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata_google.cloud.functions.v2beta.json index e2e043d1400..ca2b8c895fc 100644 --- a/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata_google.cloud.functions.v2beta.json +++ b/packages/google-cloud-functions/samples/generated/v2beta/snippet_metadata_google.cloud.functions.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-functions", - "version": "3.6.1", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-functions/src/v1/cloud_functions_service_client.ts b/packages/google-cloud-functions/src/v1/cloud_functions_service_client.ts index b51eba88dd1..f0ded0961e8 100644 --- a/packages/google-cloud-functions/src/v1/cloud_functions_service_client.ts +++ b/packages/google-cloud-functions/src/v1/cloud_functions_service_client.ts @@ -569,7 +569,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFunction request %j', request); const wrappedCallback: | Callback< @@ -684,7 +686,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('callFunction request %j', request); const wrappedCallback: | Callback< @@ -843,7 +847,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateUploadUrl request %j', request); const wrappedCallback: | Callback< @@ -970,7 +976,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateDownloadUrl request %j', request); const wrappedCallback: | Callback< @@ -1094,7 +1102,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('setIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1206,7 +1216,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getIamPolicy request %j', request); const wrappedCallback: | Callback< @@ -1321,7 +1333,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ resource: request.resource ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('testIamPermissions request %j', request); const wrappedCallback: | Callback< @@ -1453,7 +1467,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ location: request.location ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1622,7 +1638,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ 'function.name': request.function!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1791,7 +1809,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1961,7 +1981,9 @@ export class CloudFunctionsServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.functions.v1.IListFunctionsRequest, @@ -2034,7 +2056,9 @@ export class CloudFunctionsServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions stream %j', request); return this.descriptors.page.listFunctions.createStream( this.innerApiCalls.listFunctions as GaxCall, @@ -2089,7 +2113,9 @@ export class CloudFunctionsServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions iterate %j', request); return this.descriptors.page.listFunctions.asyncIterate( this.innerApiCalls['listFunctions'] as GaxCall, @@ -2269,7 +2295,7 @@ export class CloudFunctionsServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-functions/src/v2/function_service_client.ts b/packages/google-cloud-functions/src/v2/function_service_client.ts index f42d8afb320..0c1b82619b2 100644 --- a/packages/google-cloud-functions/src/v2/function_service_client.ts +++ b/packages/google-cloud-functions/src/v2/function_service_client.ts @@ -613,7 +613,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFunction request %j', request); const wrappedCallback: | Callback< @@ -773,7 +775,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateUploadUrl request %j', request); const wrappedCallback: | Callback< @@ -897,7 +901,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateDownloadUrl request %j', request); const wrappedCallback: | Callback< @@ -1014,7 +1020,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimes request %j', request); const wrappedCallback: | Callback< @@ -1154,7 +1162,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1324,7 +1334,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ 'function.name': request.function!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1493,7 +1505,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1673,7 +1687,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.functions.v2.IListFunctionsRequest, @@ -1756,7 +1772,9 @@ export class FunctionServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions stream %j', request); return this.descriptors.page.listFunctions.createStream( this.innerApiCalls.listFunctions as GaxCall, @@ -1821,7 +1839,9 @@ export class FunctionServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions iterate %j', request); return this.descriptors.page.listFunctions.asyncIterate( this.innerApiCalls['listFunctions'] as GaxCall, @@ -2139,7 +2159,7 @@ export class FunctionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-functions/src/v2alpha/function_service_client.ts b/packages/google-cloud-functions/src/v2alpha/function_service_client.ts index bd0363638fd..921e67f39d7 100644 --- a/packages/google-cloud-functions/src/v2alpha/function_service_client.ts +++ b/packages/google-cloud-functions/src/v2alpha/function_service_client.ts @@ -619,7 +619,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFunction request %j', request); const wrappedCallback: | Callback< @@ -785,7 +787,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateUploadUrl request %j', request); const wrappedCallback: | Callback< @@ -915,7 +919,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateDownloadUrl request %j', request); const wrappedCallback: | Callback< @@ -1038,7 +1044,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimes request %j', request); const wrappedCallback: | Callback< @@ -1181,7 +1189,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1351,7 +1361,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ 'function.name': request.function!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1520,7 +1532,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1700,7 +1714,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.functions.v2alpha.IListFunctionsRequest, @@ -1783,7 +1799,9 @@ export class FunctionServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions stream %j', request); return this.descriptors.page.listFunctions.createStream( this.innerApiCalls.listFunctions as GaxCall, @@ -1848,7 +1866,9 @@ export class FunctionServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions iterate %j', request); return this.descriptors.page.listFunctions.asyncIterate( this.innerApiCalls['listFunctions'] as GaxCall, @@ -2166,7 +2186,7 @@ export class FunctionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-functions/src/v2beta/function_service_client.ts b/packages/google-cloud-functions/src/v2beta/function_service_client.ts index 8628248d5df..40b96ebac57 100644 --- a/packages/google-cloud-functions/src/v2beta/function_service_client.ts +++ b/packages/google-cloud-functions/src/v2beta/function_service_client.ts @@ -619,7 +619,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFunction request %j', request); const wrappedCallback: | Callback< @@ -785,7 +787,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateUploadUrl request %j', request); const wrappedCallback: | Callback< @@ -915,7 +919,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateDownloadUrl request %j', request); const wrappedCallback: | Callback< @@ -1038,7 +1044,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRuntimes request %j', request); const wrappedCallback: | Callback< @@ -1178,7 +1186,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1348,7 +1358,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ 'function.name': request.function!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1517,7 +1529,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1697,7 +1711,9 @@ export class FunctionServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.functions.v2beta.IListFunctionsRequest, @@ -1780,7 +1796,9 @@ export class FunctionServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions stream %j', request); return this.descriptors.page.listFunctions.createStream( this.innerApiCalls.listFunctions as GaxCall, @@ -1845,7 +1863,9 @@ export class FunctionServiceClient { }); const defaultCallSettings = this._defaults['listFunctions']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFunctions iterate %j', request); return this.descriptors.page.listFunctions.asyncIterate( this.innerApiCalls['listFunctions'] as GaxCall, @@ -2163,7 +2183,7 @@ export class FunctionServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-functions/test/gapic_cloud_functions_service_v1.ts b/packages/google-cloud-functions/test/gapic_cloud_functions_service_v1.ts index d7f4c1ac074..e8c713915dc 100644 --- a/packages/google-cloud-functions/test/gapic_cloud_functions_service_v1.ts +++ b/packages/google-cloud-functions/test/gapic_cloud_functions_service_v1.ts @@ -305,7 +305,9 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.cloudFunctionsServiceStub); client.close().then(() => { done(); @@ -368,7 +370,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GetFunctionRequest() ); @@ -400,7 +402,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GetFunctionRequest() ); @@ -448,7 +450,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GetFunctionRequest() ); @@ -480,7 +482,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GetFunctionRequest() ); @@ -502,7 +504,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CallFunctionRequest() ); @@ -534,7 +536,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CallFunctionRequest() ); @@ -582,7 +584,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CallFunctionRequest() ); @@ -614,7 +616,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CallFunctionRequest() ); @@ -636,7 +638,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateUploadUrlRequest() ); @@ -668,7 +670,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateUploadUrlRequest() ); @@ -716,7 +718,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateUploadUrlRequest() ); @@ -748,7 +750,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateUploadUrlRequest() ); @@ -770,7 +772,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateDownloadUrlRequest() ); @@ -803,7 +805,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateDownloadUrlRequest() ); @@ -851,7 +853,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateDownloadUrlRequest() ); @@ -883,7 +885,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.GenerateDownloadUrlRequest() ); @@ -905,7 +907,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -937,7 +939,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -985,7 +987,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1017,7 +1019,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest() ); @@ -1039,7 +1041,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1071,7 +1073,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1151,7 +1153,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest() ); @@ -1173,7 +1175,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1206,7 +1208,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1254,7 +1256,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1286,7 +1288,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest() ); @@ -1308,7 +1310,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CreateFunctionRequest() ); @@ -1342,7 +1344,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CreateFunctionRequest() ); @@ -1397,7 +1399,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CreateFunctionRequest() ); @@ -1429,7 +1431,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.CreateFunctionRequest() ); @@ -1463,7 +1465,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1486,7 +1488,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1508,7 +1510,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.UpdateFunctionRequest() ); @@ -1543,7 +1545,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.UpdateFunctionRequest() ); @@ -1599,7 +1601,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.UpdateFunctionRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.UpdateFunctionRequest() ); @@ -1667,7 +1669,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1690,7 +1692,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1712,7 +1714,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.DeleteFunctionRequest() ); @@ -1746,7 +1748,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.DeleteFunctionRequest() ); @@ -1801,7 +1803,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.DeleteFunctionRequest() ); @@ -1833,7 +1835,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.DeleteFunctionRequest() ); @@ -1867,7 +1869,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1890,7 +1892,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1912,7 +1914,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.ListFunctionsRequest() ); @@ -1952,7 +1954,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.ListFunctionsRequest() ); @@ -2008,7 +2010,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.ListFunctionsRequest() ); @@ -2040,7 +2042,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.ListFunctionsRequest() ); @@ -2101,7 +2103,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.ListFunctionsRequest() ); @@ -2151,7 +2153,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.ListFunctionsRequest() ); @@ -2201,7 +2203,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v1.ListFunctionsRequest() ); @@ -2243,7 +2245,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2274,7 +2276,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2319,7 +2321,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2355,7 +2357,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2404,7 +2406,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2446,7 +2448,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2528,7 +2530,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2611,7 +2613,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2710,8 +2712,7 @@ describe('v1.CloudFunctionsServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2731,7 +2732,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2740,8 +2741,7 @@ describe('v1.CloudFunctionsServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2757,7 +2757,7 @@ describe('v1.CloudFunctionsServiceClient', () => { }); describe('Path templates', () => { - describe('cloudFunction', () => { + describe('cloudFunction', async () => { const fakePath = '/rendered/path/cloudFunction'; const expectedParameters = { project: 'projectValue', @@ -2769,7 +2769,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cloudFunctionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2822,7 +2822,7 @@ describe('v1.CloudFunctionsServiceClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -2835,7 +2835,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2899,7 +2899,7 @@ describe('v1.CloudFunctionsServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2910,7 +2910,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2949,7 +2949,7 @@ describe('v1.CloudFunctionsServiceClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -2961,7 +2961,7 @@ describe('v1.CloudFunctionsServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-functions/test/gapic_function_service_v2.ts b/packages/google-cloud-functions/test/gapic_function_service_v2.ts index 4a1b5bea282..ef51b573915 100644 --- a/packages/google-cloud-functions/test/gapic_function_service_v2.ts +++ b/packages/google-cloud-functions/test/gapic_function_service_v2.ts @@ -293,7 +293,9 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.functionServiceStub); client.close().then(() => { done(); @@ -352,7 +354,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GetFunctionRequest() ); @@ -383,7 +385,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GetFunctionRequest() ); @@ -430,7 +432,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GetFunctionRequest() ); @@ -461,7 +463,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GetFunctionRequest() ); @@ -482,7 +484,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateUploadUrlRequest() ); @@ -513,7 +515,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateUploadUrlRequest() ); @@ -560,7 +562,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateUploadUrlRequest() ); @@ -591,7 +593,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateUploadUrlRequest() ); @@ -612,7 +614,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateDownloadUrlRequest() ); @@ -644,7 +646,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateDownloadUrlRequest() ); @@ -691,7 +693,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateDownloadUrlRequest() ); @@ -722,7 +724,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.GenerateDownloadUrlRequest() ); @@ -743,7 +745,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListRuntimesRequest() ); @@ -774,7 +776,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListRuntimesRequest() ); @@ -821,7 +823,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListRuntimesRequest() ); @@ -852,7 +854,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListRuntimesRequest() ); @@ -873,7 +875,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.CreateFunctionRequest() ); @@ -906,7 +908,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.CreateFunctionRequest() ); @@ -960,7 +962,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.CreateFunctionRequest() ); @@ -991,7 +993,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.CreateFunctionRequest() ); @@ -1024,7 +1026,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1046,7 +1048,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1067,7 +1069,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.UpdateFunctionRequest() ); @@ -1101,7 +1103,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.UpdateFunctionRequest() ); @@ -1156,7 +1158,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.UpdateFunctionRequest() ); @@ -1188,7 +1190,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.UpdateFunctionRequest() ); @@ -1222,7 +1224,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1244,7 +1246,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1265,7 +1267,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.DeleteFunctionRequest() ); @@ -1298,7 +1300,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.DeleteFunctionRequest() ); @@ -1352,7 +1354,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.DeleteFunctionRequest() ); @@ -1383,7 +1385,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.DeleteFunctionRequest() ); @@ -1416,7 +1418,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1438,7 +1440,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1459,7 +1461,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListFunctionsRequest() ); @@ -1492,7 +1494,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListFunctionsRequest() ); @@ -1541,7 +1543,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListFunctionsRequest() ); @@ -1572,7 +1574,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListFunctionsRequest() ); @@ -1626,7 +1628,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListFunctionsRequest() ); @@ -1675,7 +1677,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListFunctionsRequest() ); @@ -1718,7 +1720,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2.ListFunctionsRequest() ); @@ -1759,7 +1761,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1789,7 +1791,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1833,7 +1835,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1865,7 +1867,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1895,7 +1897,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1939,7 +1941,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1971,7 +1973,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2004,7 +2006,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2048,7 +2050,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2083,7 +2085,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2113,7 +2115,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2157,7 +2159,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2192,7 +2194,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2240,7 +2242,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2281,7 +2283,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2360,7 +2362,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2440,7 +2442,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2536,8 +2538,7 @@ describe('v2.FunctionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2556,7 +2557,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2565,8 +2566,7 @@ describe('v2.FunctionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2582,7 +2582,7 @@ describe('v2.FunctionServiceClient', () => { }); describe('Path templates', () => { - describe('build', () => { + describe('build', async () => { const fakePath = '/rendered/path/build'; const expectedParameters = { project: 'projectValue', @@ -2593,7 +2593,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.buildPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2646,7 +2646,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('channel', () => { + describe('channel', async () => { const fakePath = '/rendered/path/channel'; const expectedParameters = { project: 'projectValue', @@ -2657,7 +2657,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.channelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2710,7 +2710,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('connector', () => { + describe('connector', async () => { const fakePath = '/rendered/path/connector'; const expectedParameters = { project: 'projectValue', @@ -2721,7 +2721,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2774,7 +2774,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -2786,7 +2786,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2850,7 +2850,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('function', () => { + describe('function', async () => { const fakePath = '/rendered/path/function'; const expectedParameters = { project: 'projectValue', @@ -2861,7 +2861,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.functionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2914,7 +2914,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2924,7 +2924,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2963,7 +2963,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2972,7 +2972,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3001,7 +3001,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -3012,7 +3012,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3065,7 +3065,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -3076,7 +3076,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3129,7 +3129,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -3139,7 +3139,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3178,7 +3178,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('trigger', () => { + describe('trigger', async () => { const fakePath = '/rendered/path/trigger'; const expectedParameters = { project: 'projectValue', @@ -3189,7 +3189,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.triggerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3242,7 +3242,7 @@ describe('v2.FunctionServiceClient', () => { }); }); - describe('workerPool', () => { + describe('workerPool', async () => { const fakePath = '/rendered/path/workerPool'; const expectedParameters = { project: 'projectValue', @@ -3253,7 +3253,7 @@ describe('v2.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workerPoolPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-functions/test/gapic_function_service_v2alpha.ts b/packages/google-cloud-functions/test/gapic_function_service_v2alpha.ts index d3b4bb2da80..7bf471cefa3 100644 --- a/packages/google-cloud-functions/test/gapic_function_service_v2alpha.ts +++ b/packages/google-cloud-functions/test/gapic_function_service_v2alpha.ts @@ -295,7 +295,9 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.functionServiceStub); client.close().then(() => { done(); @@ -354,7 +356,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GetFunctionRequest() ); @@ -385,7 +387,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GetFunctionRequest() ); @@ -432,7 +434,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GetFunctionRequest() ); @@ -463,7 +465,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GetFunctionRequest() ); @@ -484,7 +486,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateUploadUrlRequest() ); @@ -515,7 +517,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateUploadUrlRequest() ); @@ -562,7 +564,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateUploadUrlRequest() ); @@ -593,7 +595,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateUploadUrlRequest() ); @@ -614,7 +616,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest() ); @@ -646,7 +648,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest() ); @@ -693,7 +695,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest() ); @@ -724,7 +726,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.GenerateDownloadUrlRequest() ); @@ -745,7 +747,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListRuntimesRequest() ); @@ -776,7 +778,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListRuntimesRequest() ); @@ -823,7 +825,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListRuntimesRequest() ); @@ -854,7 +856,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListRuntimesRequest() ); @@ -875,7 +877,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.CreateFunctionRequest() ); @@ -908,7 +910,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.CreateFunctionRequest() ); @@ -962,7 +964,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.CreateFunctionRequest() ); @@ -993,7 +995,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.CreateFunctionRequest() ); @@ -1026,7 +1028,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1048,7 +1050,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1069,7 +1071,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.UpdateFunctionRequest() ); @@ -1103,7 +1105,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.UpdateFunctionRequest() ); @@ -1158,7 +1160,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.UpdateFunctionRequest() ); @@ -1190,7 +1192,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.UpdateFunctionRequest() ); @@ -1224,7 +1226,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1246,7 +1248,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1267,7 +1269,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.DeleteFunctionRequest() ); @@ -1300,7 +1302,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.DeleteFunctionRequest() ); @@ -1354,7 +1356,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.DeleteFunctionRequest() ); @@ -1385,7 +1387,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.DeleteFunctionRequest() ); @@ -1418,7 +1420,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1440,7 +1442,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1461,7 +1463,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListFunctionsRequest() ); @@ -1500,7 +1502,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListFunctionsRequest() ); @@ -1555,7 +1557,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListFunctionsRequest() ); @@ -1586,7 +1588,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListFunctionsRequest() ); @@ -1646,7 +1648,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListFunctionsRequest() ); @@ -1695,7 +1697,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListFunctionsRequest() ); @@ -1744,7 +1746,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2alpha.ListFunctionsRequest() ); @@ -1785,7 +1787,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1815,7 +1817,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1859,7 +1861,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1891,7 +1893,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1921,7 +1923,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1965,7 +1967,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1997,7 +1999,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2030,7 +2032,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2074,7 +2076,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2109,7 +2111,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2139,7 +2141,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2183,7 +2185,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2218,7 +2220,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2266,7 +2268,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2307,7 +2309,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2386,7 +2388,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2466,7 +2468,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2562,8 +2564,7 @@ describe('v2alpha.FunctionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2582,7 +2583,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2591,8 +2592,7 @@ describe('v2alpha.FunctionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2608,7 +2608,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); describe('Path templates', () => { - describe('build', () => { + describe('build', async () => { const fakePath = '/rendered/path/build'; const expectedParameters = { project: 'projectValue', @@ -2619,7 +2619,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.buildPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2672,7 +2672,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('channel', () => { + describe('channel', async () => { const fakePath = '/rendered/path/channel'; const expectedParameters = { project: 'projectValue', @@ -2683,7 +2683,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.channelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2736,7 +2736,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('connector', () => { + describe('connector', async () => { const fakePath = '/rendered/path/connector'; const expectedParameters = { project: 'projectValue', @@ -2747,7 +2747,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2800,7 +2800,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -2812,7 +2812,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2876,7 +2876,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('function', () => { + describe('function', async () => { const fakePath = '/rendered/path/function'; const expectedParameters = { project: 'projectValue', @@ -2887,7 +2887,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.functionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2940,7 +2940,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2950,7 +2950,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2989,7 +2989,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2998,7 +2998,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3027,7 +3027,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -3038,7 +3038,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3091,7 +3091,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -3102,7 +3102,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3155,7 +3155,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -3165,7 +3165,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3204,7 +3204,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('trigger', () => { + describe('trigger', async () => { const fakePath = '/rendered/path/trigger'; const expectedParameters = { project: 'projectValue', @@ -3215,7 +3215,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.triggerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3268,7 +3268,7 @@ describe('v2alpha.FunctionServiceClient', () => { }); }); - describe('workerPool', () => { + describe('workerPool', async () => { const fakePath = '/rendered/path/workerPool'; const expectedParameters = { project: 'projectValue', @@ -3279,7 +3279,7 @@ describe('v2alpha.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workerPoolPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-functions/test/gapic_function_service_v2beta.ts b/packages/google-cloud-functions/test/gapic_function_service_v2beta.ts index f1f15777de1..73aca30fdef 100644 --- a/packages/google-cloud-functions/test/gapic_function_service_v2beta.ts +++ b/packages/google-cloud-functions/test/gapic_function_service_v2beta.ts @@ -294,7 +294,9 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.functionServiceStub); client.close().then(() => { done(); @@ -353,7 +355,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GetFunctionRequest() ); @@ -384,7 +386,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GetFunctionRequest() ); @@ -431,7 +433,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GetFunctionRequest() ); @@ -462,7 +464,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GetFunctionRequest() ); @@ -483,7 +485,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateUploadUrlRequest() ); @@ -514,7 +516,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateUploadUrlRequest() ); @@ -561,7 +563,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateUploadUrlRequest() ); @@ -592,7 +594,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateUploadUrlRequest() ); @@ -613,7 +615,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateDownloadUrlRequest() ); @@ -645,7 +647,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateDownloadUrlRequest() ); @@ -692,7 +694,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateDownloadUrlRequest() ); @@ -723,7 +725,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.GenerateDownloadUrlRequest() ); @@ -744,7 +746,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListRuntimesRequest() ); @@ -775,7 +777,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListRuntimesRequest() ); @@ -822,7 +824,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListRuntimesRequest() ); @@ -853,7 +855,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListRuntimesRequest() ); @@ -874,7 +876,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.CreateFunctionRequest() ); @@ -907,7 +909,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.CreateFunctionRequest() ); @@ -961,7 +963,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.CreateFunctionRequest() ); @@ -992,7 +994,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.CreateFunctionRequest() ); @@ -1025,7 +1027,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1047,7 +1049,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1068,7 +1070,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.UpdateFunctionRequest() ); @@ -1102,7 +1104,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.UpdateFunctionRequest() ); @@ -1157,7 +1159,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.UpdateFunctionRequest() ); @@ -1189,7 +1191,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.UpdateFunctionRequest() ); @@ -1223,7 +1225,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1245,7 +1247,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1266,7 +1268,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.DeleteFunctionRequest() ); @@ -1299,7 +1301,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.DeleteFunctionRequest() ); @@ -1353,7 +1355,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.DeleteFunctionRequest() ); @@ -1384,7 +1386,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.DeleteFunctionRequest() ); @@ -1417,7 +1419,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1439,7 +1441,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1460,7 +1462,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListFunctionsRequest() ); @@ -1499,7 +1501,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListFunctionsRequest() ); @@ -1554,7 +1556,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListFunctionsRequest() ); @@ -1585,7 +1587,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListFunctionsRequest() ); @@ -1645,7 +1647,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListFunctionsRequest() ); @@ -1694,7 +1696,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListFunctionsRequest() ); @@ -1743,7 +1745,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.functions.v2beta.ListFunctionsRequest() ); @@ -1784,7 +1786,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1814,7 +1816,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1858,7 +1860,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1890,7 +1892,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1920,7 +1922,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1964,7 +1966,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -1996,7 +1998,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2029,7 +2031,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2073,7 +2075,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2108,7 +2110,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2138,7 +2140,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2182,7 +2184,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2217,7 +2219,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2265,7 +2267,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2306,7 +2308,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2385,7 +2387,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2465,7 +2467,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2561,8 +2563,7 @@ describe('v2beta.FunctionServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2581,7 +2582,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2590,8 +2591,7 @@ describe('v2beta.FunctionServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2607,7 +2607,7 @@ describe('v2beta.FunctionServiceClient', () => { }); describe('Path templates', () => { - describe('build', () => { + describe('build', async () => { const fakePath = '/rendered/path/build'; const expectedParameters = { project: 'projectValue', @@ -2618,7 +2618,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.buildPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2671,7 +2671,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('channel', () => { + describe('channel', async () => { const fakePath = '/rendered/path/channel'; const expectedParameters = { project: 'projectValue', @@ -2682,7 +2682,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.channelPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2735,7 +2735,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('connector', () => { + describe('connector', async () => { const fakePath = '/rendered/path/connector'; const expectedParameters = { project: 'projectValue', @@ -2746,7 +2746,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.connectorPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2799,7 +2799,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('cryptoKey', () => { + describe('cryptoKey', async () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { project: 'projectValue', @@ -2811,7 +2811,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.cryptoKeyPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2875,7 +2875,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('function', () => { + describe('function', async () => { const fakePath = '/rendered/path/function'; const expectedParameters = { project: 'projectValue', @@ -2886,7 +2886,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.functionPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2939,7 +2939,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2949,7 +2949,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2988,7 +2988,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2997,7 +2997,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3026,7 +3026,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('repository', () => { + describe('repository', async () => { const fakePath = '/rendered/path/repository'; const expectedParameters = { project: 'projectValue', @@ -3037,7 +3037,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.repositoryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3090,7 +3090,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('service', () => { + describe('service', async () => { const fakePath = '/rendered/path/service'; const expectedParameters = { project: 'projectValue', @@ -3101,7 +3101,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.servicePathTemplate.render = sinon .stub() .returns(fakePath); @@ -3154,7 +3154,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('topic', () => { + describe('topic', async () => { const fakePath = '/rendered/path/topic'; const expectedParameters = { project: 'projectValue', @@ -3164,7 +3164,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.topicPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3203,7 +3203,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('trigger', () => { + describe('trigger', async () => { const fakePath = '/rendered/path/trigger'; const expectedParameters = { project: 'projectValue', @@ -3214,7 +3214,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.triggerPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3267,7 +3267,7 @@ describe('v2beta.FunctionServiceClient', () => { }); }); - describe('workerPool', () => { + describe('workerPool', async () => { const fakePath = '/rendered/path/workerPool'; const expectedParameters = { project: 'projectValue', @@ -3278,7 +3278,7 @@ describe('v2beta.FunctionServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.workerPoolPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gdchardwaremanagement/package.json b/packages/google-cloud-gdchardwaremanagement/package.json index 6f5f7bbd20a..7072ff2ac34 100644 --- a/packages/google-cloud-gdchardwaremanagement/package.json +++ b/packages/google-cloud-gdchardwaremanagement/package.json @@ -45,7 +45,7 @@ "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json b/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json index 9a961553b22..e89f89f4b69 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gdchardwaremanagement", - "version": "0.4.1", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gdchardwaremanagement/src/v1alpha/g_d_c_hardware_management_client.ts b/packages/google-cloud-gdchardwaremanagement/src/v1alpha/g_d_c_hardware_management_client.ts index 1b7a0fe7d2d..85b4cc85b23 100644 --- a/packages/google-cloud-gdchardwaremanagement/src/v1alpha/g_d_c_hardware_management_client.ts +++ b/packages/google-cloud-gdchardwaremanagement/src/v1alpha/g_d_c_hardware_management_client.ts @@ -830,7 +830,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getOrder request %j', request); const wrappedCallback: | Callback< @@ -956,7 +958,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSite request %j', request); const wrappedCallback: | Callback< @@ -1083,7 +1087,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHardwareGroup request %j', request); const wrappedCallback: | Callback< @@ -1209,7 +1215,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getHardware request %j', request); const wrappedCallback: | Callback< @@ -1336,7 +1344,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getComment request %j', request); const wrappedCallback: | Callback< @@ -1468,7 +1478,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('recordActionOnComment request %j', request); const wrappedCallback: | Callback< @@ -1595,7 +1607,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getChangeLogEntry request %j', request); const wrappedCallback: | Callback< @@ -1721,7 +1735,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getSku request %j', request); const wrappedCallback: | Callback< @@ -1847,7 +1863,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getZone request %j', request); const wrappedCallback: | Callback< @@ -1994,7 +2012,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2169,7 +2189,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ 'order.name': request.order!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2345,7 +2367,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2519,7 +2543,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2701,7 +2727,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2876,7 +2904,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ 'site.name': request.site!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3047,7 +3077,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3229,7 +3261,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3405,7 +3439,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ 'hardware_group.name': request.hardwareGroup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3577,7 +3613,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3756,7 +3794,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3931,7 +3971,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ 'hardware.name': request.hardware!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4102,7 +4144,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4284,7 +4328,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4466,7 +4512,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4641,7 +4689,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ 'zone.name': request.zone!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4812,7 +4862,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -4989,7 +5041,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -5161,7 +5215,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListOrdersRequest, @@ -5236,7 +5292,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders stream %j', request); return this.descriptors.page.listOrders.createStream( this.innerApiCalls.listOrders as GaxCall, @@ -5293,7 +5351,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listOrders']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listOrders iterate %j', request); return this.descriptors.page.listOrders.asyncIterate( this.innerApiCalls['listOrders'] as GaxCall, @@ -5405,7 +5465,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListSitesRequest, @@ -5480,7 +5542,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSites stream %j', request); return this.descriptors.page.listSites.createStream( this.innerApiCalls.listSites as GaxCall, @@ -5537,7 +5601,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listSites']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSites iterate %j', request); return this.descriptors.page.listSites.asyncIterate( this.innerApiCalls['listSites'] as GaxCall, @@ -5645,7 +5711,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListHardwareGroupsRequest, @@ -5716,7 +5784,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listHardwareGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHardwareGroups stream %j', request); return this.descriptors.page.listHardwareGroups.createStream( this.innerApiCalls.listHardwareGroups as GaxCall, @@ -5769,7 +5839,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listHardwareGroups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHardwareGroups iterate %j', request); return this.descriptors.page.listHardwareGroups.asyncIterate( this.innerApiCalls['listHardwareGroups'] as GaxCall, @@ -5881,7 +5953,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListHardwareRequest, @@ -5956,7 +6030,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listHardware']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHardware stream %j', request); return this.descriptors.page.listHardware.createStream( this.innerApiCalls.listHardware as GaxCall, @@ -6013,7 +6089,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listHardware']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listHardware iterate %j', request); return this.descriptors.page.listHardware.asyncIterate( this.innerApiCalls['listHardware'] as GaxCall, @@ -6121,7 +6199,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListCommentsRequest, @@ -6192,7 +6272,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listComments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listComments stream %j', request); return this.descriptors.page.listComments.createStream( this.innerApiCalls.listComments as GaxCall, @@ -6245,7 +6327,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listComments']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listComments iterate %j', request); return this.descriptors.page.listComments.asyncIterate( this.innerApiCalls['listComments'] as GaxCall, @@ -6353,7 +6437,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListChangeLogEntriesRequest, @@ -6424,7 +6510,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listChangeLogEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChangeLogEntries stream %j', request); return this.descriptors.page.listChangeLogEntries.createStream( this.innerApiCalls.listChangeLogEntries as GaxCall, @@ -6477,7 +6565,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listChangeLogEntries']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listChangeLogEntries iterate %j', request); return this.descriptors.page.listChangeLogEntries.asyncIterate( this.innerApiCalls['listChangeLogEntries'] as GaxCall, @@ -6589,7 +6679,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListSkusRequest, @@ -6664,7 +6756,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkus stream %j', request); return this.descriptors.page.listSkus.createStream( this.innerApiCalls.listSkus as GaxCall, @@ -6721,7 +6815,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listSkus']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listSkus iterate %j', request); return this.descriptors.page.listSkus.asyncIterate( this.innerApiCalls['listSkus'] as GaxCall, @@ -6833,7 +6929,9 @@ export class GDCHardwareManagementClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gdchardwaremanagement.v1alpha.IListZonesRequest, @@ -6908,7 +7006,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listZones stream %j', request); return this.descriptors.page.listZones.createStream( this.innerApiCalls.listZones as GaxCall, @@ -6965,7 +7065,9 @@ export class GDCHardwareManagementClient { }); const defaultCallSettings = this._defaults['listZones']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listZones iterate %j', request); return this.descriptors.page.listZones.asyncIterate( this.innerApiCalls['listZones'] as GaxCall, @@ -7145,7 +7247,7 @@ export class GDCHardwareManagementClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-gdchardwaremanagement/test/gapic_g_d_c_hardware_management_v1alpha.ts b/packages/google-cloud-gdchardwaremanagement/test/gapic_g_d_c_hardware_management_v1alpha.ts index fe59563816e..b48ef9b2575 100644 --- a/packages/google-cloud-gdchardwaremanagement/test/gapic_g_d_c_hardware_management_v1alpha.ts +++ b/packages/google-cloud-gdchardwaremanagement/test/gapic_g_d_c_hardware_management_v1alpha.ts @@ -305,7 +305,9 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gDCHardwareManagementStub); client.close().then(() => { done(); @@ -368,7 +370,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest() ); @@ -400,7 +402,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest() ); @@ -448,7 +450,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest() ); @@ -477,7 +479,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest() ); @@ -499,7 +501,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest() ); @@ -531,7 +533,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest() ); @@ -579,7 +581,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest() ); @@ -608,7 +610,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest() ); @@ -630,7 +632,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest() ); @@ -662,7 +664,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest() ); @@ -710,7 +712,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest() ); @@ -742,7 +744,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest() ); @@ -764,7 +766,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest() ); @@ -796,7 +798,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest() ); @@ -844,7 +846,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest() ); @@ -876,7 +878,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest() ); @@ -898,7 +900,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest() ); @@ -930,7 +932,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest() ); @@ -978,7 +980,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest() ); @@ -1010,7 +1012,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest() ); @@ -1032,7 +1034,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest() ); @@ -1065,7 +1067,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest() ); @@ -1113,7 +1115,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest() ); @@ -1148,7 +1150,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest() ); @@ -1173,7 +1175,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest() ); @@ -1205,7 +1207,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest() ); @@ -1253,7 +1255,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest() ); @@ -1285,7 +1287,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest() ); @@ -1307,7 +1309,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest() ); @@ -1339,7 +1341,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest() ); @@ -1387,7 +1389,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest() ); @@ -1416,7 +1418,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest() ); @@ -1438,7 +1440,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest() ); @@ -1470,7 +1472,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest() ); @@ -1518,7 +1520,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest() ); @@ -1547,7 +1549,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest() ); @@ -1569,7 +1571,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest() ); @@ -1602,7 +1604,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest() ); @@ -1657,7 +1659,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest() ); @@ -1689,7 +1691,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest() ); @@ -1723,7 +1725,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1746,7 +1748,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1765,7 +1767,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest() ); @@ -1799,7 +1801,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest() ); @@ -1855,7 +1857,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest() ); @@ -1888,7 +1890,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest() ); @@ -1923,7 +1925,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1946,7 +1948,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1965,7 +1967,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest() ); @@ -1998,7 +2000,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest() ); @@ -2053,7 +2055,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest() ); @@ -2085,7 +2087,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest() ); @@ -2119,7 +2121,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2142,7 +2144,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2161,7 +2163,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest() ); @@ -2194,7 +2196,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest() ); @@ -2249,7 +2251,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest() ); @@ -2281,7 +2283,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest() ); @@ -2315,7 +2317,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2338,7 +2340,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2357,7 +2359,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest() ); @@ -2390,7 +2392,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest() ); @@ -2445,7 +2447,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest() ); @@ -2477,7 +2479,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest() ); @@ -2511,7 +2513,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2534,7 +2536,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2553,7 +2555,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest() ); @@ -2587,7 +2589,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest() ); @@ -2643,7 +2645,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest() ); @@ -2676,7 +2678,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest() ); @@ -2711,7 +2713,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2734,7 +2736,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2753,7 +2755,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest() ); @@ -2786,7 +2788,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest() ); @@ -2841,7 +2843,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest() ); @@ -2873,7 +2875,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest() ); @@ -2907,7 +2909,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2930,7 +2932,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2949,7 +2951,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest() ); @@ -2983,7 +2985,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest() ); @@ -3038,7 +3040,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest() ); @@ -3070,7 +3072,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest() ); @@ -3104,7 +3106,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3127,7 +3129,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3149,7 +3151,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest() ); @@ -3184,7 +3186,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest() ); @@ -3240,7 +3242,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest() ); @@ -3273,7 +3275,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest() ); @@ -3308,7 +3310,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3331,7 +3333,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3353,7 +3355,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest() ); @@ -3387,7 +3389,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest() ); @@ -3442,7 +3444,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest() ); @@ -3474,7 +3476,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest() ); @@ -3508,7 +3510,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3531,7 +3533,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3553,7 +3555,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest() ); @@ -3587,7 +3589,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest() ); @@ -3642,7 +3644,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest() ); @@ -3674,7 +3676,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest() ); @@ -3708,7 +3710,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3731,7 +3733,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3753,7 +3755,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest() ); @@ -3788,7 +3790,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest() ); @@ -3844,7 +3846,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest() ); @@ -3877,7 +3879,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest() ); @@ -3912,7 +3914,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3935,7 +3937,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3957,7 +3959,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest() ); @@ -3991,7 +3993,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest() ); @@ -4046,7 +4048,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest() ); @@ -4078,7 +4080,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest() ); @@ -4112,7 +4114,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4135,7 +4137,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4157,7 +4159,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest() ); @@ -4191,7 +4193,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest() ); @@ -4246,7 +4248,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest() ); @@ -4278,7 +4280,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest() ); @@ -4312,7 +4314,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4335,7 +4337,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4357,7 +4359,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest() ); @@ -4390,7 +4392,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest() ); @@ -4445,7 +4447,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest() ); @@ -4477,7 +4479,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest() ); @@ -4511,7 +4513,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4534,7 +4536,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4553,7 +4555,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest() ); @@ -4587,7 +4589,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest() ); @@ -4643,7 +4645,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest() ); @@ -4676,7 +4678,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest() ); @@ -4711,7 +4713,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4734,7 +4736,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4753,7 +4755,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest() ); @@ -4786,7 +4788,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest() ); @@ -4841,7 +4843,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest() ); @@ -4873,7 +4875,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest() ); @@ -4907,7 +4909,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -4930,7 +4932,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -4949,7 +4951,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest() ); @@ -4983,7 +4985,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest() ); @@ -5038,7 +5040,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest() ); @@ -5070,7 +5072,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest() ); @@ -5104,7 +5106,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -5127,7 +5129,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -5149,7 +5151,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest() ); @@ -5189,7 +5191,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest() ); @@ -5247,7 +5249,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest() ); @@ -5279,7 +5281,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest() ); @@ -5343,7 +5345,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest() ); @@ -5398,7 +5400,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest() ); @@ -5449,7 +5451,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest() ); @@ -5495,7 +5497,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest() ); @@ -5535,7 +5537,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest() ); @@ -5593,7 +5595,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest() ); @@ -5622,7 +5624,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest() ); @@ -5686,7 +5688,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest() ); @@ -5741,7 +5743,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest() ); @@ -5791,7 +5793,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest() ); @@ -5836,7 +5838,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest() ); @@ -5877,7 +5879,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest() ); @@ -5935,7 +5937,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest() ); @@ -5967,7 +5969,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest() ); @@ -6031,7 +6033,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest() ); @@ -6084,7 +6086,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest() ); @@ -6135,7 +6137,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest() ); @@ -6179,7 +6181,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest() ); @@ -6219,7 +6221,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest() ); @@ -6277,7 +6279,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest() ); @@ -6309,7 +6311,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest() ); @@ -6373,7 +6375,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest() ); @@ -6428,7 +6430,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest() ); @@ -6479,7 +6481,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest() ); @@ -6523,7 +6525,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest() ); @@ -6563,7 +6565,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest() ); @@ -6621,7 +6623,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest() ); @@ -6653,7 +6655,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest() ); @@ -6717,7 +6719,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest() ); @@ -6772,7 +6774,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest() ); @@ -6823,7 +6825,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest() ); @@ -6867,7 +6869,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest() ); @@ -6908,7 +6910,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest() ); @@ -6966,7 +6968,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest() ); @@ -6998,7 +7000,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest() ); @@ -7062,7 +7064,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest() ); @@ -7115,7 +7117,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest() ); @@ -7166,7 +7168,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest() ); @@ -7210,7 +7212,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest() ); @@ -7250,7 +7252,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest() ); @@ -7308,7 +7310,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest() ); @@ -7337,7 +7339,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest() ); @@ -7399,7 +7401,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest() ); @@ -7452,7 +7454,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest() ); @@ -7502,7 +7504,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest() ); @@ -7547,7 +7549,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest() ); @@ -7587,7 +7589,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest() ); @@ -7645,7 +7647,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest() ); @@ -7674,7 +7676,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest() ); @@ -7738,7 +7740,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest() ); @@ -7793,7 +7795,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest() ); @@ -7843,7 +7845,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest() ); @@ -7887,7 +7889,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7918,7 +7920,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7963,7 +7965,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -7999,7 +8001,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -8048,7 +8050,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -8090,7 +8092,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -8172,7 +8174,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -8255,7 +8257,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -8354,8 +8356,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -8375,7 +8376,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -8384,8 +8385,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -8401,7 +8401,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); describe('Path templates', () => { - describe('changeLogEntry', () => { + describe('changeLogEntry', async () => { const fakePath = '/rendered/path/changeLogEntry'; const expectedParameters = { project: 'projectValue', @@ -8414,7 +8414,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.changeLogEntryPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8479,7 +8479,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('comment', () => { + describe('comment', async () => { const fakePath = '/rendered/path/comment'; const expectedParameters = { project: 'projectValue', @@ -8492,7 +8492,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.commentPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8556,7 +8556,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('hardware', () => { + describe('hardware', async () => { const fakePath = '/rendered/path/hardware'; const expectedParameters = { project: 'projectValue', @@ -8568,7 +8568,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hardwarePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8621,7 +8621,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('hardwareGroup', () => { + describe('hardwareGroup', async () => { const fakePath = '/rendered/path/hardwareGroup'; const expectedParameters = { project: 'projectValue', @@ -8634,7 +8634,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.hardwareGroupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8698,7 +8698,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -8709,7 +8709,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8748,7 +8748,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('order', () => { + describe('order', async () => { const fakePath = '/rendered/path/order'; const expectedParameters = { project: 'projectValue', @@ -8760,7 +8760,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.orderPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8813,7 +8813,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -8823,7 +8823,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8852,7 +8852,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('site', () => { + describe('site', async () => { const fakePath = '/rendered/path/site'; const expectedParameters = { project: 'projectValue', @@ -8864,7 +8864,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.sitePathTemplate.render = sinon .stub() .returns(fakePath); @@ -8917,7 +8917,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('sku', () => { + describe('sku', async () => { const fakePath = '/rendered/path/sku'; const expectedParameters = { project: 'projectValue', @@ -8929,7 +8929,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.skuPathTemplate.render = sinon .stub() .returns(fakePath); @@ -8982,7 +8982,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { }); }); - describe('zone', () => { + describe('zone', async () => { const fakePath = '/rendered/path/zone'; const expectedParameters = { project: 'projectValue', @@ -8994,7 +8994,7 @@ describe('v1alpha.GDCHardwareManagementClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.zonePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkebackup/package.json b/packages/google-cloud-gkebackup/package.json index e15d1089ac7..8d8d2811988 100644 --- a/packages/google-cloud-gkebackup/package.json +++ b/packages/google-cloud-gkebackup/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata.google.cloud.gkebackup.v1.json b/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata.google.cloud.gkebackup.v1.json index fbfe2253bf0..9cff47af464 100644 --- a/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata.google.cloud.gkebackup.v1.json +++ b/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata.google.cloud.gkebackup.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkebackup", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata_google.cloud.gkebackup.v1.json b/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata_google.cloud.gkebackup.v1.json index fcaba790e90..39af8645306 100644 --- a/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata_google.cloud.gkebackup.v1.json +++ b/packages/google-cloud-gkebackup/samples/generated/v1/snippet_metadata_google.cloud.gkebackup.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkebackup", - "version": "1.4.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkebackup/src/v1/backup_for_g_k_e_client.ts b/packages/google-cloud-gkebackup/src/v1/backup_for_g_k_e_client.ts index 9134c31628c..3f290a6ea5d 100644 --- a/packages/google-cloud-gkebackup/src/v1/backup_for_g_k_e_client.ts +++ b/packages/google-cloud-gkebackup/src/v1/backup_for_g_k_e_client.ts @@ -803,7 +803,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupPlan request %j', request); const wrappedCallback: | Callback< @@ -912,7 +914,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackup request %j', request); const wrappedCallback: | Callback< @@ -1027,7 +1031,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVolumeBackup request %j', request); const wrappedCallback: | Callback< @@ -1144,7 +1150,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRestorePlan request %j', request); const wrappedCallback: | Callback< @@ -1255,7 +1263,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getRestore request %j', request); const wrappedCallback: | Callback< @@ -1372,7 +1382,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getVolumeRestore request %j', request); const wrappedCallback: | Callback< @@ -1496,7 +1508,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ backup: request.backup ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getBackupIndexDownloadUrl request %j', request); const wrappedCallback: | Callback< @@ -1640,7 +1654,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1818,7 +1834,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ 'backup_plan.name': request.backupPlan!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1990,7 +2008,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2169,7 +2189,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2346,7 +2368,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ 'backup.name': request.backup!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2522,7 +2546,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2701,7 +2727,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2878,7 +2906,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ 'restore_plan.name': request.restorePlan!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3054,7 +3084,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3233,7 +3265,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3410,7 +3444,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ 'restore.name': request.restore!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3586,7 +3622,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3763,7 +3801,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkebackup.v1.IListBackupPlansRequest, @@ -3843,7 +3883,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listBackupPlans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPlans stream %j', request); return this.descriptors.page.listBackupPlans.createStream( this.innerApiCalls.listBackupPlans as GaxCall, @@ -3905,7 +3947,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listBackupPlans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackupPlans iterate %j', request); return this.descriptors.page.listBackupPlans.asyncIterate( this.innerApiCalls['listBackupPlans'] as GaxCall, @@ -4016,7 +4060,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkebackup.v1.IListBackupsRequest, @@ -4096,7 +4142,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups stream %j', request); return this.descriptors.page.listBackups.createStream( this.innerApiCalls.listBackups as GaxCall, @@ -4158,7 +4206,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listBackups iterate %j', request); return this.descriptors.page.listBackups.asyncIterate( this.innerApiCalls['listBackups'] as GaxCall, @@ -4275,7 +4325,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkebackup.v1.IListVolumeBackupsRequest, @@ -4355,7 +4407,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listVolumeBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumeBackups stream %j', request); return this.descriptors.page.listVolumeBackups.createStream( this.innerApiCalls.listVolumeBackups as GaxCall, @@ -4417,7 +4471,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listVolumeBackups']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumeBackups iterate %j', request); return this.descriptors.page.listVolumeBackups.asyncIterate( this.innerApiCalls['listVolumeBackups'] as GaxCall, @@ -4534,7 +4590,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkebackup.v1.IListRestorePlansRequest, @@ -4614,7 +4672,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listRestorePlans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRestorePlans stream %j', request); return this.descriptors.page.listRestorePlans.createStream( this.innerApiCalls.listRestorePlans as GaxCall, @@ -4676,7 +4736,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listRestorePlans']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRestorePlans iterate %j', request); return this.descriptors.page.listRestorePlans.asyncIterate( this.innerApiCalls['listRestorePlans'] as GaxCall, @@ -4787,7 +4849,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkebackup.v1.IListRestoresRequest, @@ -4867,7 +4931,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listRestores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRestores stream %j', request); return this.descriptors.page.listRestores.createStream( this.innerApiCalls.listRestores as GaxCall, @@ -4929,7 +4995,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listRestores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listRestores iterate %j', request); return this.descriptors.page.listRestores.asyncIterate( this.innerApiCalls['listRestores'] as GaxCall, @@ -5046,7 +5114,9 @@ export class BackupForGKEClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkebackup.v1.IListVolumeRestoresRequest, @@ -5126,7 +5196,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listVolumeRestores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumeRestores stream %j', request); return this.descriptors.page.listVolumeRestores.createStream( this.innerApiCalls.listVolumeRestores as GaxCall, @@ -5188,7 +5260,9 @@ export class BackupForGKEClient { }); const defaultCallSettings = this._defaults['listVolumeRestores']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listVolumeRestores iterate %j', request); return this.descriptors.page.listVolumeRestores.asyncIterate( this.innerApiCalls['listVolumeRestores'] as GaxCall, @@ -5506,7 +5580,7 @@ export class BackupForGKEClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-gkebackup/test/gapic_backup_for_g_k_e_v1.ts b/packages/google-cloud-gkebackup/test/gapic_backup_for_g_k_e_v1.ts index 32fdacfb120..8c9f0fd90eb 100644 --- a/packages/google-cloud-gkebackup/test/gapic_backup_for_g_k_e_v1.ts +++ b/packages/google-cloud-gkebackup/test/gapic_backup_for_g_k_e_v1.ts @@ -290,7 +290,9 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.backupForGKEStub); client.close().then(() => { done(); @@ -349,7 +351,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupPlanRequest() ); @@ -380,7 +382,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupPlanRequest() ); @@ -427,7 +429,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupPlanRequest() ); @@ -458,7 +460,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupPlanRequest() ); @@ -479,7 +481,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupRequest() ); @@ -510,7 +512,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupRequest() ); @@ -557,7 +559,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupRequest() ); @@ -585,7 +587,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupRequest() ); @@ -606,7 +608,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeBackupRequest() ); @@ -637,7 +639,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeBackupRequest() ); @@ -684,7 +686,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeBackupRequest() ); @@ -715,7 +717,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeBackupRequest() ); @@ -736,7 +738,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestorePlanRequest() ); @@ -767,7 +769,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestorePlanRequest() ); @@ -814,7 +816,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestorePlanRequest() ); @@ -845,7 +847,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestorePlanRequest() ); @@ -866,7 +868,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestoreRequest() ); @@ -897,7 +899,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestoreRequest() ); @@ -944,7 +946,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestoreRequest() ); @@ -975,7 +977,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetRestoreRequest() ); @@ -996,7 +998,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeRestoreRequest() ); @@ -1027,7 +1029,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeRestoreRequest() ); @@ -1074,7 +1076,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeRestoreRequest() ); @@ -1105,7 +1107,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetVolumeRestoreRequest() ); @@ -1126,7 +1128,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest() ); @@ -1158,7 +1160,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest() ); @@ -1205,7 +1207,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest() ); @@ -1239,7 +1241,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest() ); @@ -1263,7 +1265,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupPlanRequest() ); @@ -1296,7 +1298,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupPlanRequest() ); @@ -1350,7 +1352,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupPlanRequest() ); @@ -1381,7 +1383,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupPlanRequest() ); @@ -1414,7 +1416,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1436,7 +1438,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1457,7 +1459,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupPlanRequest() ); @@ -1491,7 +1493,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupPlanRequest() ); @@ -1546,7 +1548,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupPlanRequest() ); @@ -1578,7 +1580,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupPlanRequest() ); @@ -1612,7 +1614,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1634,7 +1636,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1655,7 +1657,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupPlanRequest() ); @@ -1688,7 +1690,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupPlanRequest() ); @@ -1742,7 +1744,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupPlanRequest() ); @@ -1773,7 +1775,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupPlanRequest() ); @@ -1806,7 +1808,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1828,7 +1830,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1849,7 +1851,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupRequest() ); @@ -1881,7 +1883,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupRequest() ); @@ -1935,7 +1937,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupRequest() ); @@ -1966,7 +1968,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateBackupRequest() ); @@ -1999,7 +2001,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2021,7 +2023,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2039,7 +2041,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupRequest() ); @@ -2072,7 +2074,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupRequest() ); @@ -2127,7 +2129,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupRequest() ); @@ -2159,7 +2161,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateBackupRequest() ); @@ -2193,7 +2195,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2215,7 +2217,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2233,7 +2235,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupRequest() ); @@ -2265,7 +2267,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupRequest() ); @@ -2319,7 +2321,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupRequest() ); @@ -2350,7 +2352,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteBackupRequest() ); @@ -2383,7 +2385,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2405,7 +2407,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2423,7 +2425,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestorePlanRequest() ); @@ -2456,7 +2458,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestorePlanRequest() ); @@ -2510,7 +2512,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestorePlanRequest() ); @@ -2541,7 +2543,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestorePlanRequest() ); @@ -2574,7 +2576,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2596,7 +2598,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2617,7 +2619,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestorePlanRequest() ); @@ -2651,7 +2653,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestorePlanRequest() ); @@ -2706,7 +2708,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestorePlanRequest() ); @@ -2738,7 +2740,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestorePlanRequest() ); @@ -2772,7 +2774,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2794,7 +2796,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2815,7 +2817,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestorePlanRequest() ); @@ -2848,7 +2850,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestorePlanRequest() ); @@ -2902,7 +2904,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestorePlanRequest() ); @@ -2933,7 +2935,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestorePlanRequest() ); @@ -2966,7 +2968,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2988,7 +2990,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3009,7 +3011,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestoreRequest() ); @@ -3042,7 +3044,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestoreRequest() ); @@ -3096,7 +3098,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestoreRequest() ); @@ -3127,7 +3129,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.CreateRestoreRequest() ); @@ -3160,7 +3162,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3182,7 +3184,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3203,7 +3205,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestoreRequest() ); @@ -3237,7 +3239,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestoreRequest() ); @@ -3292,7 +3294,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestoreRequest() ); @@ -3324,7 +3326,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.UpdateRestoreRequest() ); @@ -3358,7 +3360,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3380,7 +3382,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3401,7 +3403,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestoreRequest() ); @@ -3434,7 +3436,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestoreRequest() ); @@ -3488,7 +3490,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestoreRequest() ); @@ -3519,7 +3521,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.DeleteRestoreRequest() ); @@ -3552,7 +3554,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -3574,7 +3576,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -3595,7 +3597,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupPlansRequest() ); @@ -3634,7 +3636,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupPlansRequest() ); @@ -3689,7 +3691,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupPlansRequest() ); @@ -3720,7 +3722,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupPlansRequest() ); @@ -3780,7 +3782,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupPlansRequest() ); @@ -3829,7 +3831,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupPlansRequest() ); @@ -3878,7 +3880,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupPlansRequest() ); @@ -3920,7 +3922,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupsRequest() ); @@ -3953,7 +3955,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupsRequest() ); @@ -4002,7 +4004,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupsRequest() ); @@ -4033,7 +4035,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupsRequest() ); @@ -4087,7 +4089,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupsRequest() ); @@ -4138,7 +4140,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupsRequest() ); @@ -4181,7 +4183,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListBackupsRequest() ); @@ -4225,7 +4227,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeBackupsRequest() ); @@ -4264,7 +4266,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeBackupsRequest() ); @@ -4319,7 +4321,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeBackupsRequest() ); @@ -4350,7 +4352,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeBackupsRequest() ); @@ -4410,7 +4412,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeBackupsRequest() ); @@ -4459,7 +4461,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeBackupsRequest() ); @@ -4508,7 +4510,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeBackupsRequest() ); @@ -4550,7 +4552,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestorePlansRequest() ); @@ -4589,7 +4591,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestorePlansRequest() ); @@ -4644,7 +4646,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestorePlansRequest() ); @@ -4675,7 +4677,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestorePlansRequest() ); @@ -4735,7 +4737,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestorePlansRequest() ); @@ -4784,7 +4786,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestorePlansRequest() ); @@ -4833,7 +4835,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestorePlansRequest() ); @@ -4875,7 +4877,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestoresRequest() ); @@ -4908,7 +4910,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestoresRequest() ); @@ -4957,7 +4959,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestoresRequest() ); @@ -4988,7 +4990,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestoresRequest() ); @@ -5042,7 +5044,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestoresRequest() ); @@ -5093,7 +5095,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestoresRequest() ); @@ -5136,7 +5138,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListRestoresRequest() ); @@ -5178,7 +5180,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeRestoresRequest() ); @@ -5218,7 +5220,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeRestoresRequest() ); @@ -5273,7 +5275,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeRestoresRequest() ); @@ -5304,7 +5306,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeRestoresRequest() ); @@ -5364,7 +5366,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeRestoresRequest() ); @@ -5413,7 +5415,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeRestoresRequest() ); @@ -5462,7 +5464,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkebackup.v1.ListVolumeRestoresRequest() ); @@ -5503,7 +5505,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5533,7 +5535,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5577,7 +5579,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -5609,7 +5611,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5639,7 +5641,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5683,7 +5685,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -5715,7 +5717,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5748,7 +5750,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5792,7 +5794,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -5827,7 +5829,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5857,7 +5859,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5901,7 +5903,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -5936,7 +5938,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -5984,7 +5986,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -6025,7 +6027,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -6104,7 +6106,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -6184,7 +6186,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -6280,8 +6282,7 @@ describe('v1.BackupForGKEClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -6300,7 +6301,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -6309,8 +6310,7 @@ describe('v1.BackupForGKEClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -6326,7 +6326,7 @@ describe('v1.BackupForGKEClient', () => { }); describe('Path templates', () => { - describe('backup', () => { + describe('backup', async () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { project: 'projectValue', @@ -6338,7 +6338,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6402,7 +6402,7 @@ describe('v1.BackupForGKEClient', () => { }); }); - describe('backupPlan', () => { + describe('backupPlan', async () => { const fakePath = '/rendered/path/backupPlan'; const expectedParameters = { project: 'projectValue', @@ -6413,7 +6413,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.backupPlanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6466,7 +6466,7 @@ describe('v1.BackupForGKEClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -6476,7 +6476,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6515,7 +6515,7 @@ describe('v1.BackupForGKEClient', () => { }); }); - describe('restore', () => { + describe('restore', async () => { const fakePath = '/rendered/path/restore'; const expectedParameters = { project: 'projectValue', @@ -6527,7 +6527,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.restorePathTemplate.render = sinon .stub() .returns(fakePath); @@ -6591,7 +6591,7 @@ describe('v1.BackupForGKEClient', () => { }); }); - describe('restorePlan', () => { + describe('restorePlan', async () => { const fakePath = '/rendered/path/restorePlan'; const expectedParameters = { project: 'projectValue', @@ -6602,7 +6602,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.restorePlanPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6655,7 +6655,7 @@ describe('v1.BackupForGKEClient', () => { }); }); - describe('volumeBackup', () => { + describe('volumeBackup', async () => { const fakePath = '/rendered/path/volumeBackup'; const expectedParameters = { project: 'projectValue', @@ -6668,7 +6668,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.volumeBackupPathTemplate.render = sinon .stub() .returns(fakePath); @@ -6743,7 +6743,7 @@ describe('v1.BackupForGKEClient', () => { }); }); - describe('volumeRestore', () => { + describe('volumeRestore', async () => { const fakePath = '/rendered/path/volumeRestore'; const expectedParameters = { project: 'projectValue', @@ -6756,7 +6756,7 @@ describe('v1.BackupForGKEClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.volumeRestorePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index b175aed1456..9264556a99a 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1/snippet_metadata_google.cloud.gkeconnect.gateway.v1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1/snippet_metadata_google.cloud.gkeconnect.gateway.v1.json index e94fda2adc2..a20c66f4724 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1/snippet_metadata_google.cloud.gkeconnect.gateway.v1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1/snippet_metadata_google.cloud.gkeconnect.gateway.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gateway", - "version": "4.0.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json index a098eaeaa81..31d0c8f34a5 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata.google.cloud.gkeconnect.gateway.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gateway", - "version": "4.0.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata_google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata_google.cloud.gkeconnect.gateway.v1beta1.json index 5b33047b5e1..2e4d20e3112 100644 --- a/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata_google.cloud.gkeconnect.gateway.v1beta1.json +++ b/packages/google-cloud-gkeconnect-gateway/samples/generated/v1beta1/snippet_metadata_google.cloud.gkeconnect.gateway.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gateway", - "version": "4.0.0", + "version": "5.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1/gateway_control_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1/gateway_control_client.ts index 6aadf9d5bc4..d11483b78bd 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1/gateway_control_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1/gateway_control_client.ts @@ -478,7 +478,9 @@ export class GatewayControlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateCredentials request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_control_client.ts b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_control_client.ts index 7e21fe4325f..6e4eb8610c8 100644 --- a/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_control_client.ts +++ b/packages/google-cloud-gkeconnect-gateway/src/v1beta1/gateway_control_client.ts @@ -475,7 +475,9 @@ export class GatewayControlClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateCredentials request %j', request); const wrappedCallback: | Callback< diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1.ts index 284d3e93f97..061f447ef54 100644 --- a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1.ts +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1.ts @@ -205,7 +205,9 @@ describe('v1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gatewayControlStub); client.close().then(() => { done(); @@ -264,7 +266,7 @@ describe('v1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest() ); @@ -296,7 +298,7 @@ describe('v1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest() ); @@ -343,7 +345,7 @@ describe('v1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest() ); @@ -374,7 +376,7 @@ describe('v1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1.GenerateCredentialsRequest() ); diff --git a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1beta1.ts b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1beta1.ts index fe28230c451..b705206bd8b 100644 --- a/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1beta1.ts +++ b/packages/google-cloud-gkeconnect-gateway/test/gapic_gateway_control_v1beta1.ts @@ -206,7 +206,9 @@ describe('v1beta1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gatewayControlStub); client.close().then(() => { done(); @@ -265,7 +267,7 @@ describe('v1beta1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest() ); @@ -297,7 +299,7 @@ describe('v1beta1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest() ); @@ -344,7 +346,7 @@ describe('v1beta1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest() ); @@ -375,7 +377,7 @@ describe('v1beta1.GatewayControlClient', () => { auth: googleAuth, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest() ); diff --git a/packages/google-cloud-gkehub/package.json b/packages/google-cloud-gkehub/package.json index 1145609955b..2d50cedcca6 100644 --- a/packages/google-cloud-gkehub/package.json +++ b/packages/google-cloud-gkehub/package.json @@ -45,7 +45,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json index 492766e44ae..5337a01dc90 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json index 492766e44ae..5337a01dc90 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json index 981d4b090ff..be088a834dc 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata_google.cloud.gkehub.v1alpha.json b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata_google.cloud.gkehub.v1alpha.json index 981d4b090ff..be088a834dc 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata_google.cloud.gkehub.v1alpha.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata_google.cloud.gkehub.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json index 9c44fd8a830..b0f1c64fbad 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata_google.cloud.gkehub.v1alpha2.json b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata_google.cloud.gkehub.v1alpha2.json index 9c44fd8a830..b0f1c64fbad 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata_google.cloud.gkehub.v1alpha2.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata_google.cloud.gkehub.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json index cb2570b0bef..2ad02c5c9eb 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata_google.cloud.gkehub.v1beta.json b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata_google.cloud.gkehub.v1beta.json index cb2570b0bef..2ad02c5c9eb 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata_google.cloud.gkehub.v1beta.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata_google.cloud.gkehub.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json index c4f6c24b4e9..4679d18e15d 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata_google.cloud.gkehub.v1beta1.json b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata_google.cloud.gkehub.v1beta1.json index c4f6c24b4e9..4679d18e15d 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata_google.cloud.gkehub.v1beta1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata_google.cloud.gkehub.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "5.0.1", + "version": "6.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts b/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts index 20398c8870a..46f1165a8db 100644 --- a/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts +++ b/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts @@ -653,7 +653,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMembership request %j', request); const wrappedCallback: | Callback< @@ -762,7 +764,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFeature request %j', request); const wrappedCallback: | Callback< @@ -904,7 +908,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateConnectManifest request %j', request); const wrappedCallback: | Callback< @@ -1067,7 +1073,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1253,7 +1261,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1443,7 +1453,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1629,7 +1641,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1822,7 +1836,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2015,7 +2031,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2201,7 +2219,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkehub.v1.IListMembershipsRequest, @@ -2296,7 +2316,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMemberships stream %j', request); return this.descriptors.page.listMemberships.createStream( this.innerApiCalls.listMemberships as GaxCall, @@ -2373,7 +2395,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMemberships iterate %j', request); return this.descriptors.page.listMemberships.asyncIterate( this.innerApiCalls['listMemberships'] as GaxCall, @@ -2494,7 +2518,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkehub.v1.IListFeaturesRequest, @@ -2584,7 +2610,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listFeatures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeatures stream %j', request); return this.descriptors.page.listFeatures.createStream( this.innerApiCalls.listFeatures as GaxCall, @@ -2656,7 +2684,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listFeatures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeatures iterate %j', request); return this.descriptors.page.listFeatures.asyncIterate( this.innerApiCalls['listFeatures'] as GaxCall, diff --git a/packages/google-cloud-gkehub/src/v1alpha/gke_hub_client.ts b/packages/google-cloud-gkehub/src/v1alpha/gke_hub_client.ts index b978759369a..b6a8f3cc966 100644 --- a/packages/google-cloud-gkehub/src/v1alpha/gke_hub_client.ts +++ b/packages/google-cloud-gkehub/src/v1alpha/gke_hub_client.ts @@ -597,7 +597,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFeature request %j', request); const wrappedCallback: | Callback< @@ -745,7 +747,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -931,7 +935,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1124,7 +1130,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1311,7 +1319,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkehub.v1alpha.IListFeaturesRequest, @@ -1401,7 +1411,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listFeatures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeatures stream %j', request); return this.descriptors.page.listFeatures.createStream( this.innerApiCalls.listFeatures as GaxCall, @@ -1473,7 +1485,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listFeatures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeatures iterate %j', request); return this.descriptors.page.listFeatures.asyncIterate( this.innerApiCalls['listFeatures'] as GaxCall, diff --git a/packages/google-cloud-gkehub/src/v1beta/gke_hub_client.ts b/packages/google-cloud-gkehub/src/v1beta/gke_hub_client.ts index a879b1a6a8d..b5a0e10ca13 100644 --- a/packages/google-cloud-gkehub/src/v1beta/gke_hub_client.ts +++ b/packages/google-cloud-gkehub/src/v1beta/gke_hub_client.ts @@ -597,7 +597,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getFeature request %j', request); const wrappedCallback: | Callback< @@ -745,7 +747,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -931,7 +935,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1124,7 +1130,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1311,7 +1319,9 @@ export class GkeHubClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkehub.v1beta.IListFeaturesRequest, @@ -1401,7 +1411,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listFeatures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeatures stream %j', request); return this.descriptors.page.listFeatures.createStream( this.innerApiCalls.listFeatures as GaxCall, @@ -1473,7 +1485,9 @@ export class GkeHubClient { }); const defaultCallSettings = this._defaults['listFeatures']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listFeatures iterate %j', request); return this.descriptors.page.listFeatures.asyncIterate( this.innerApiCalls['listFeatures'] as GaxCall, diff --git a/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts b/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts index 0702ebdbf13..43e81643a75 100644 --- a/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts +++ b/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts @@ -605,7 +605,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getMembership request %j', request); const wrappedCallback: | Callback< @@ -744,7 +746,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateConnectManifest request %j', request); const wrappedCallback: | Callback< @@ -878,7 +882,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('validateExclusivity request %j', request); const wrappedCallback: | Callback< @@ -1023,7 +1029,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateExclusivityManifest request %j', request); const wrappedCallback: | Callback< @@ -1186,7 +1194,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1376,7 +1386,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1570,7 +1582,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1762,7 +1776,9 @@ export class GkeHubMembershipServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkehub.v1beta1.IListMembershipsRequest, @@ -1857,7 +1873,9 @@ export class GkeHubMembershipServiceClient { }); const defaultCallSettings = this._defaults['listMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMemberships stream %j', request); return this.descriptors.page.listMemberships.createStream( this.innerApiCalls.listMemberships as GaxCall, @@ -1934,7 +1952,9 @@ export class GkeHubMembershipServiceClient { }); const defaultCallSettings = this._defaults['listMemberships']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listMemberships iterate %j', request); return this.descriptors.page.listMemberships.asyncIterate( this.innerApiCalls['listMemberships'] as GaxCall, @@ -2252,7 +2272,7 @@ export class GkeHubMembershipServiceClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-gkehub/test/gapic_gke_hub_membership_service_v1beta1.ts b/packages/google-cloud-gkehub/test/gapic_gke_hub_membership_service_v1beta1.ts index e57617f9db9..292dc6a8cbf 100644 --- a/packages/google-cloud-gkehub/test/gapic_gke_hub_membership_service_v1beta1.ts +++ b/packages/google-cloud-gkehub/test/gapic_gke_hub_membership_service_v1beta1.ts @@ -309,7 +309,9 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gkeHubMembershipServiceStub); client.close().then(() => { done(); @@ -380,7 +382,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GetMembershipRequest() ); @@ -414,7 +416,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GetMembershipRequest() ); @@ -464,7 +466,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GetMembershipRequest() ); @@ -498,7 +500,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GetMembershipRequest() ); @@ -522,7 +524,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest() ); @@ -557,7 +559,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest() ); @@ -607,7 +609,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest() ); @@ -644,7 +646,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest() ); @@ -671,7 +673,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ValidateExclusivityRequest() ); @@ -706,7 +708,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ValidateExclusivityRequest() ); @@ -756,7 +758,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ValidateExclusivityRequest() ); @@ -790,7 +792,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ValidateExclusivityRequest() ); @@ -814,7 +816,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateExclusivityManifestRequest() ); @@ -849,7 +851,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateExclusivityManifestRequest() ); @@ -899,7 +901,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateExclusivityManifestRequest() ); @@ -936,7 +938,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.GenerateExclusivityManifestRequest() ); @@ -963,7 +965,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.CreateMembershipRequest() ); @@ -999,7 +1001,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.CreateMembershipRequest() ); @@ -1056,7 +1058,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.CreateMembershipRequest() ); @@ -1090,7 +1092,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.CreateMembershipRequest() ); @@ -1126,7 +1128,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1151,7 +1153,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1175,7 +1177,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.DeleteMembershipRequest() ); @@ -1211,7 +1213,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.DeleteMembershipRequest() ); @@ -1268,7 +1270,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.DeleteMembershipRequest() ); @@ -1302,7 +1304,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.DeleteMembershipRequest() ); @@ -1338,7 +1340,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1363,7 +1365,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1387,7 +1389,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.UpdateMembershipRequest() ); @@ -1423,7 +1425,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.UpdateMembershipRequest() ); @@ -1480,7 +1482,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.UpdateMembershipRequest() ); @@ -1514,7 +1516,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.UpdateMembershipRequest() ); @@ -1550,7 +1552,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1575,7 +1577,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1599,7 +1601,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ListMembershipsRequest() ); @@ -1641,7 +1643,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ListMembershipsRequest() ); @@ -1699,7 +1701,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ListMembershipsRequest() ); @@ -1733,7 +1735,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ListMembershipsRequest() ); @@ -1796,7 +1798,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ListMembershipsRequest() ); @@ -1848,7 +1850,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ListMembershipsRequest() ); @@ -1900,7 +1902,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta1.ListMembershipsRequest() ); @@ -1944,7 +1946,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -1977,7 +1979,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2024,7 +2026,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.GetIamPolicyRequest() ); @@ -2059,7 +2061,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2092,7 +2094,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2139,7 +2141,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.SetIamPolicyRequest() ); @@ -2174,7 +2176,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2210,7 +2212,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2257,7 +2259,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); @@ -2295,7 +2297,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2328,7 +2330,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2375,7 +2377,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.GetLocationRequest() ); @@ -2413,7 +2415,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2464,7 +2466,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new LocationProtos.google.cloud.location.ListLocationsRequest() ); @@ -2508,7 +2510,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2596,7 +2598,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2685,7 +2687,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2790,8 +2792,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2813,7 +2814,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2822,8 +2823,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2839,7 +2839,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { }); describe('Path templates', () => { - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2852,7 +2852,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2891,7 +2891,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { }); }); - describe('membership', () => { + describe('membership', async () => { const fakePath = '/rendered/path/membership'; const expectedParameters = { project: 'projectValue', @@ -2905,7 +2905,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.membershipPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2958,7 +2958,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2970,7 +2970,7 @@ describe('v1beta1.GkeHubMembershipServiceClient', () => { projectId: 'bogus', } ); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts index 559822b0123..92f45703efc 100644 --- a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts +++ b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts @@ -282,7 +282,9 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gkeHubStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetMembershipRequest() ); @@ -372,7 +374,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetMembershipRequest() ); @@ -419,7 +421,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetMembershipRequest() ); @@ -450,7 +452,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetMembershipRequest() ); @@ -471,7 +473,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetFeatureRequest() ); @@ -502,7 +504,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetFeatureRequest() ); @@ -549,7 +551,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetFeatureRequest() ); @@ -580,7 +582,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GetFeatureRequest() ); @@ -601,7 +603,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GenerateConnectManifestRequest() ); @@ -633,7 +635,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GenerateConnectManifestRequest() ); @@ -680,7 +682,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GenerateConnectManifestRequest() ); @@ -714,7 +716,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.GenerateConnectManifestRequest() ); @@ -738,7 +740,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateMembershipRequest() ); @@ -771,7 +773,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateMembershipRequest() ); @@ -825,7 +827,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateMembershipRequest() ); @@ -856,7 +858,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateMembershipRequest() ); @@ -889,7 +891,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -911,7 +913,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -932,7 +934,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateFeatureRequest() ); @@ -965,7 +967,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateFeatureRequest() ); @@ -1019,7 +1021,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateFeatureRequest() ); @@ -1050,7 +1052,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.CreateFeatureRequest() ); @@ -1083,7 +1085,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1105,7 +1107,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1126,7 +1128,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() ); @@ -1159,7 +1161,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() ); @@ -1213,7 +1215,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() ); @@ -1244,7 +1246,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() ); @@ -1277,7 +1279,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1299,7 +1301,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1320,7 +1322,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() ); @@ -1353,7 +1355,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() ); @@ -1438,7 +1440,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() ); @@ -1471,7 +1473,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1493,7 +1495,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1514,7 +1516,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() ); @@ -1547,7 +1549,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() ); @@ -1601,7 +1603,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() ); @@ -1632,7 +1634,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() ); @@ -1665,7 +1667,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1687,7 +1689,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1708,7 +1710,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() ); @@ -1741,7 +1743,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() ); @@ -1795,7 +1797,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() ); @@ -1826,7 +1828,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() ); @@ -1859,7 +1861,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1881,7 +1883,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1902,7 +1904,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListMembershipsRequest() ); @@ -1935,7 +1937,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListMembershipsRequest() ); @@ -1984,7 +1986,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListMembershipsRequest() ); @@ -2015,7 +2017,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListMembershipsRequest() ); @@ -2069,7 +2071,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListMembershipsRequest() ); @@ -2118,7 +2120,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListMembershipsRequest() ); @@ -2161,7 +2163,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListMembershipsRequest() ); @@ -2203,7 +2205,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListFeaturesRequest() ); @@ -2236,7 +2238,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListFeaturesRequest() ); @@ -2285,7 +2287,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListFeaturesRequest() ); @@ -2316,7 +2318,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListFeaturesRequest() ); @@ -2367,7 +2369,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListFeaturesRequest() ); @@ -2415,7 +2417,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListFeaturesRequest() ); @@ -2458,7 +2460,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1.ListFeaturesRequest() ); @@ -2495,7 +2497,7 @@ describe('v1.GkeHubClient', () => { }); describe('Path templates', () => { - describe('feature', () => { + describe('feature', async () => { const fakePath = '/rendered/path/feature'; const expectedParameters = { project: 'projectValue', @@ -2506,7 +2508,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.featurePathTemplate.render = sinon .stub() .returns(fakePath); @@ -2559,7 +2561,7 @@ describe('v1.GkeHubClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2569,7 +2571,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2608,7 +2610,7 @@ describe('v1.GkeHubClient', () => { }); }); - describe('membership', () => { + describe('membership', async () => { const fakePath = '/rendered/path/membership'; const expectedParameters = { project: 'projectValue', @@ -2619,7 +2621,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.membershipPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2672,7 +2674,7 @@ describe('v1.GkeHubClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2681,7 +2683,7 @@ describe('v1.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1alpha.ts b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1alpha.ts index 91bad9b786d..7df7739fdc3 100644 --- a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1alpha.ts +++ b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1alpha.ts @@ -282,7 +282,9 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gkeHubStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.GetFeatureRequest() ); @@ -372,7 +374,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.GetFeatureRequest() ); @@ -419,7 +421,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.GetFeatureRequest() ); @@ -450,7 +452,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.GetFeatureRequest() ); @@ -471,7 +473,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.CreateFeatureRequest() ); @@ -504,7 +506,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.CreateFeatureRequest() ); @@ -558,7 +560,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.CreateFeatureRequest() ); @@ -589,7 +591,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.CreateFeatureRequest() ); @@ -622,7 +624,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.DeleteFeatureRequest() ); @@ -698,7 +700,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.DeleteFeatureRequest() ); @@ -752,7 +754,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.DeleteFeatureRequest() ); @@ -783,7 +785,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.DeleteFeatureRequest() ); @@ -816,7 +818,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.UpdateFeatureRequest() ); @@ -892,7 +894,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.UpdateFeatureRequest() ); @@ -946,7 +948,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.UpdateFeatureRequest() ); @@ -977,7 +979,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.UpdateFeatureRequest() ); @@ -1010,7 +1012,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1032,7 +1034,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1053,7 +1055,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.ListFeaturesRequest() ); @@ -1086,7 +1088,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.ListFeaturesRequest() ); @@ -1135,7 +1137,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.ListFeaturesRequest() ); @@ -1166,7 +1168,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.ListFeaturesRequest() ); @@ -1220,7 +1222,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.ListFeaturesRequest() ); @@ -1271,7 +1273,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.ListFeaturesRequest() ); @@ -1314,7 +1316,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1alpha.ListFeaturesRequest() ); @@ -1351,7 +1353,7 @@ describe('v1alpha.GkeHubClient', () => { }); describe('Path templates', () => { - describe('feature', () => { + describe('feature', async () => { const fakePath = '/rendered/path/feature'; const expectedParameters = { project: 'projectValue', @@ -1362,7 +1364,7 @@ describe('v1alpha.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.featurePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1beta.ts b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1beta.ts index 8d6acac8610..6781593e8a8 100644 --- a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1beta.ts +++ b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1beta.ts @@ -282,7 +282,9 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.gkeHubStub); client.close().then(() => { done(); @@ -341,7 +343,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.GetFeatureRequest() ); @@ -372,7 +374,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.GetFeatureRequest() ); @@ -419,7 +421,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.GetFeatureRequest() ); @@ -450,7 +452,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.GetFeatureRequest() ); @@ -471,7 +473,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.CreateFeatureRequest() ); @@ -504,7 +506,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.CreateFeatureRequest() ); @@ -558,7 +560,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.CreateFeatureRequest() ); @@ -589,7 +591,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.CreateFeatureRequest() ); @@ -622,7 +624,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -644,7 +646,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -665,7 +667,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.DeleteFeatureRequest() ); @@ -698,7 +700,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.DeleteFeatureRequest() ); @@ -752,7 +754,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.DeleteFeatureRequest() ); @@ -783,7 +785,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.DeleteFeatureRequest() ); @@ -816,7 +818,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -838,7 +840,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -859,7 +861,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.UpdateFeatureRequest() ); @@ -892,7 +894,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.UpdateFeatureRequest() ); @@ -946,7 +948,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.UpdateFeatureRequest() ); @@ -977,7 +979,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.UpdateFeatureRequest() ); @@ -1010,7 +1012,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1032,7 +1034,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1053,7 +1055,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.ListFeaturesRequest() ); @@ -1086,7 +1088,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.ListFeaturesRequest() ); @@ -1135,7 +1137,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.ListFeaturesRequest() ); @@ -1166,7 +1168,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.ListFeaturesRequest() ); @@ -1220,7 +1222,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.ListFeaturesRequest() ); @@ -1271,7 +1273,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.ListFeaturesRequest() ); @@ -1314,7 +1316,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkehub.v1beta.ListFeaturesRequest() ); @@ -1351,7 +1353,7 @@ describe('v1beta.GkeHubClient', () => { }); describe('Path templates', () => { - describe('feature', () => { + describe('feature', async () => { const fakePath = '/rendered/path/feature'; const expectedParameters = { project: 'projectValue', @@ -1362,7 +1364,7 @@ describe('v1beta.GkeHubClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.featurePathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkemulticloud/package.json b/packages/google-cloud-gkemulticloud/package.json index f81fe5647ea..f2d210bab1f 100644 --- a/packages/google-cloud-gkemulticloud/package.json +++ b/packages/google-cloud-gkemulticloud/package.json @@ -46,7 +46,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^5.0.0-rc.0" + "google-gax": "^5.0.1-rc.0" }, "devDependencies": { "@types/mocha": "^10.0.10", diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json index 438f4c98f2b..cc92fc7205f 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkemulticloud", - "version": "1.5.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata_google.cloud.gkemulticloud.v1.json b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata_google.cloud.gkemulticloud.v1.json index 4f32253c209..28f83aa0cce 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata_google.cloud.gkemulticloud.v1.json +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata_google.cloud.gkemulticloud.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkemulticloud", - "version": "1.5.1", + "version": "2.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts b/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts index 6fa299bb8a0..f56442b8b4c 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts +++ b/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts @@ -617,7 +617,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttachedCluster request %j', request); const wrappedCallback: | Callback< @@ -751,7 +753,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAttachedServerConfig request %j', request); const wrappedCallback: | Callback< @@ -907,7 +911,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info( 'generateAttachedClusterInstallManifest request %j', request @@ -1057,7 +1063,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ attached_cluster: request.attachedCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAttachedClusterAgentToken request %j', request); const wrappedCallback: | Callback< @@ -1223,7 +1231,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1413,7 +1423,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ 'attached_cluster.name': request.attachedCluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1612,7 +1624,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1814,7 +1828,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1991,7 +2007,9 @@ export class AttachedClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, @@ -2070,7 +2088,9 @@ export class AttachedClustersClient { }); const defaultCallSettings = this._defaults['listAttachedClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttachedClusters stream %j', request); return this.descriptors.page.listAttachedClusters.createStream( this.innerApiCalls.listAttachedClusters as GaxCall, @@ -2131,7 +2151,9 @@ export class AttachedClustersClient { }); const defaultCallSettings = this._defaults['listAttachedClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAttachedClusters iterate %j', request); return this.descriptors.page.listAttachedClusters.asyncIterate( this.innerApiCalls['listAttachedClusters'] as GaxCall, @@ -2233,7 +2255,7 @@ export class AttachedClustersClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts b/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts index 73ba77ab3c7..526b3ee8952 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts +++ b/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts @@ -651,7 +651,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAwsCluster request %j', request); const wrappedCallback: | Callback< @@ -794,7 +796,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ aws_cluster: request.awsCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAwsClusterAgentToken request %j', request); const wrappedCallback: | Callback< @@ -928,7 +932,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ aws_cluster: request.awsCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAwsAccessToken request %j', request); const wrappedCallback: | Callback< @@ -1056,7 +1062,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAwsNodePool request %j', request); const wrappedCallback: | Callback< @@ -1187,7 +1195,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ aws_cluster: request.awsCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAwsOpenIdConfig request %j', request); const wrappedCallback: | Callback< @@ -1315,7 +1325,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ aws_cluster: request.awsCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAwsJsonWebKeys request %j', request); const wrappedCallback: | Callback< @@ -1449,7 +1461,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAwsServerConfig request %j', request); const wrappedCallback: | Callback< @@ -1608,7 +1622,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1810,7 +1826,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ 'aws_cluster.name': request.awsCluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2014,7 +2032,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2209,7 +2229,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2414,7 +2436,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ 'aws_node_pool.name': request.awsNodePool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2597,7 +2621,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2799,7 +2825,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2976,7 +3004,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, @@ -3055,7 +3085,9 @@ export class AwsClustersClient { }); const defaultCallSettings = this._defaults['listAwsClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAwsClusters stream %j', request); return this.descriptors.page.listAwsClusters.createStream( this.innerApiCalls.listAwsClusters as GaxCall, @@ -3116,7 +3148,9 @@ export class AwsClustersClient { }); const defaultCallSettings = this._defaults['listAwsClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAwsClusters iterate %j', request); return this.descriptors.page.listAwsClusters.asyncIterate( this.innerApiCalls['listAwsClusters'] as GaxCall, @@ -3235,7 +3269,9 @@ export class AwsClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, @@ -3315,7 +3351,9 @@ export class AwsClustersClient { }); const defaultCallSettings = this._defaults['listAwsNodePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAwsNodePools stream %j', request); return this.descriptors.page.listAwsNodePools.createStream( this.innerApiCalls.listAwsNodePools as GaxCall, @@ -3377,7 +3415,9 @@ export class AwsClustersClient { }); const defaultCallSettings = this._defaults['listAwsNodePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAwsNodePools iterate %j', request); return this.descriptors.page.listAwsNodePools.asyncIterate( this.innerApiCalls['listAwsNodePools'] as GaxCall, @@ -3479,7 +3519,7 @@ export class AwsClustersClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts b/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts index e5d95a956f9..cc63f172b52 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts +++ b/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts @@ -667,7 +667,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAzureClient request %j', request); const wrappedCallback: | Callback< @@ -795,7 +797,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAzureCluster request %j', request); const wrappedCallback: | Callback< @@ -938,7 +942,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ azure_cluster: request.azureCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAzureClusterAgentToken request %j', request); const wrappedCallback: | Callback< @@ -1078,7 +1084,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ azure_cluster: request.azureCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('generateAzureAccessToken request %j', request); const wrappedCallback: | Callback< @@ -1206,7 +1214,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAzureNodePool request %j', request); const wrappedCallback: | Callback< @@ -1337,7 +1347,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ azure_cluster: request.azureCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAzureOpenIdConfig request %j', request); const wrappedCallback: | Callback< @@ -1465,7 +1477,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ azure_cluster: request.azureCluster ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAzureJsonWebKeys request %j', request); const wrappedCallback: | Callback< @@ -1599,7 +1613,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('getAzureServerConfig request %j', request); const wrappedCallback: | Callback< @@ -1762,7 +1778,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -1954,7 +1972,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2148,7 +2168,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2340,7 +2362,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ 'azure_cluster.name': request.azureCluster!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2544,7 +2568,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2740,7 +2766,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -2922,7 +2950,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ 'azure_node_pool.name': request.azureNodePool!.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3125,7 +3155,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ name: request.name ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | Callback< LROperation< @@ -3302,7 +3334,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, @@ -3381,7 +3415,9 @@ export class AzureClustersClient { }); const defaultCallSettings = this._defaults['listAzureClients']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAzureClients stream %j', request); return this.descriptors.page.listAzureClients.createStream( this.innerApiCalls.listAzureClients as GaxCall, @@ -3442,7 +3478,9 @@ export class AzureClustersClient { }); const defaultCallSettings = this._defaults['listAzureClients']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAzureClients iterate %j', request); return this.descriptors.page.listAzureClients.asyncIterate( this.innerApiCalls['listAzureClients'] as GaxCall, @@ -3559,7 +3597,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, @@ -3638,7 +3678,9 @@ export class AzureClustersClient { }); const defaultCallSettings = this._defaults['listAzureClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAzureClusters stream %j', request); return this.descriptors.page.listAzureClusters.createStream( this.innerApiCalls.listAzureClusters as GaxCall, @@ -3699,7 +3741,9 @@ export class AzureClustersClient { }); const defaultCallSettings = this._defaults['listAzureClusters']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAzureClusters iterate %j', request); return this.descriptors.page.listAzureClusters.asyncIterate( this.innerApiCalls['listAzureClusters'] as GaxCall, @@ -3818,7 +3862,9 @@ export class AzureClustersClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); const wrappedCallback: | PaginationCallback< protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, @@ -3898,7 +3944,9 @@ export class AzureClustersClient { }); const defaultCallSettings = this._defaults['listAzureNodePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAzureNodePools stream %j', request); return this.descriptors.page.listAzureNodePools.createStream( this.innerApiCalls.listAzureNodePools as GaxCall, @@ -3960,7 +4008,9 @@ export class AzureClustersClient { }); const defaultCallSettings = this._defaults['listAzureNodePools']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); + this.initialize().catch(err => { + throw err; + }); this._log.info('listAzureNodePools iterate %j', request); return this.descriptors.page.listAzureNodePools.asyncIterate( this.innerApiCalls['listAzureNodePools'] as GaxCall, @@ -4062,7 +4112,7 @@ export class AzureClustersClient { listOperationsAsync( request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions - ): AsyncIterable { + ): AsyncIterable { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts b/packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts index 330531c106e..69f8ceeaee4 100644 --- a/packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts +++ b/packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts @@ -287,7 +287,9 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.attachedClustersStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() ); @@ -378,7 +380,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() ); @@ -425,7 +427,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() ); @@ -456,7 +458,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() ); @@ -477,7 +479,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() ); @@ -509,7 +511,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() ); @@ -556,7 +558,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() ); @@ -590,7 +592,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() ); @@ -614,7 +616,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() ); @@ -647,7 +649,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() ); @@ -694,7 +696,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() ); @@ -726,7 +728,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() ); @@ -750,7 +752,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequest() ); @@ -783,7 +785,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequest() ); @@ -830,7 +832,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequest() ); @@ -864,7 +866,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterAgentTokenRequest() ); @@ -888,7 +890,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() ); @@ -921,7 +923,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() ); @@ -975,7 +977,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1064,7 +1066,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1085,7 +1087,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() ); @@ -1119,7 +1121,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() ); @@ -1174,7 +1176,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() ); @@ -1209,7 +1211,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() ); @@ -1243,7 +1245,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1265,7 +1267,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1286,7 +1288,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() ); @@ -1319,7 +1321,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() ); @@ -1373,7 +1375,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() ); @@ -1407,7 +1409,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() ); @@ -1440,7 +1442,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1462,7 +1464,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1483,7 +1485,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() ); @@ -1516,7 +1518,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() ); @@ -1570,7 +1572,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() ); @@ -1604,7 +1606,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() ); @@ -1637,7 +1639,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1659,7 +1661,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1680,7 +1682,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() ); @@ -1720,7 +1722,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() ); @@ -1777,7 +1779,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() ); @@ -1808,7 +1810,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() ); @@ -1869,7 +1871,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() ); @@ -1919,7 +1921,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() ); @@ -1969,7 +1971,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() ); @@ -2011,7 +2013,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -2090,7 +2092,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -2170,7 +2172,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -2266,8 +2268,7 @@ describe('v1.AttachedClustersClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -2286,7 +2287,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -2295,8 +2296,7 @@ describe('v1.AttachedClustersClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -2312,7 +2312,7 @@ describe('v1.AttachedClustersClient', () => { }); describe('Path templates', () => { - describe('attachedCluster', () => { + describe('attachedCluster', async () => { const fakePath = '/rendered/path/attachedCluster'; const expectedParameters = { project: 'projectValue', @@ -2323,7 +2323,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachedClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2377,7 +2377,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('attachedServerConfig', () => { + describe('attachedServerConfig', async () => { const fakePath = '/rendered/path/attachedServerConfig'; const expectedParameters = { project: 'projectValue', @@ -2387,7 +2387,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachedServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2440,7 +2440,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('awsCluster', () => { + describe('awsCluster', async () => { const fakePath = '/rendered/path/awsCluster'; const expectedParameters = { project: 'projectValue', @@ -2451,7 +2451,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2504,7 +2504,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('awsNodePool', () => { + describe('awsNodePool', async () => { const fakePath = '/rendered/path/awsNodePool'; const expectedParameters = { project: 'projectValue', @@ -2516,7 +2516,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsNodePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2580,7 +2580,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('awsServerConfig', () => { + describe('awsServerConfig', async () => { const fakePath = '/rendered/path/awsServerConfig'; const expectedParameters = { project: 'projectValue', @@ -2590,7 +2590,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2632,7 +2632,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('azureClient', () => { + describe('azureClient', async () => { const fakePath = '/rendered/path/azureClient'; const expectedParameters = { project: 'projectValue', @@ -2643,7 +2643,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureClientPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2696,7 +2696,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('azureCluster', () => { + describe('azureCluster', async () => { const fakePath = '/rendered/path/azureCluster'; const expectedParameters = { project: 'projectValue', @@ -2707,7 +2707,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2760,7 +2760,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('azureNodePool', () => { + describe('azureNodePool', async () => { const fakePath = '/rendered/path/azureNodePool'; const expectedParameters = { project: 'projectValue', @@ -2772,7 +2772,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureNodePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2836,7 +2836,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('azureServerConfig', () => { + describe('azureServerConfig', async () => { const fakePath = '/rendered/path/azureServerConfig'; const expectedParameters = { project: 'projectValue', @@ -2846,7 +2846,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2897,7 +2897,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -2907,7 +2907,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -2946,7 +2946,7 @@ describe('v1.AttachedClustersClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -2955,7 +2955,7 @@ describe('v1.AttachedClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts b/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts index be3aef699e5..8be7d240853 100644 --- a/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts +++ b/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts @@ -285,7 +285,9 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.awsClustersStub); client.close().then(() => { done(); @@ -344,7 +346,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() ); @@ -375,7 +377,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() ); @@ -422,7 +424,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() ); @@ -453,7 +455,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() ); @@ -474,7 +476,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequest() ); @@ -506,7 +508,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequest() ); @@ -553,7 +555,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequest() ); @@ -587,7 +589,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsClusterAgentTokenRequest() ); @@ -611,7 +613,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() ); @@ -643,7 +645,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() ); @@ -690,7 +692,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() ); @@ -724,7 +726,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() ); @@ -748,7 +750,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() ); @@ -779,7 +781,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() ); @@ -826,7 +828,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() ); @@ -857,7 +859,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() ); @@ -878,7 +880,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest() ); @@ -910,7 +912,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest() ); @@ -957,7 +959,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest() ); @@ -988,7 +990,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsOpenIdConfigRequest() ); @@ -1009,7 +1011,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest() ); @@ -1040,7 +1042,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest() ); @@ -1087,7 +1089,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest() ); @@ -1118,7 +1120,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsJsonWebKeysRequest() ); @@ -1139,7 +1141,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() ); @@ -1171,7 +1173,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() ); @@ -1218,7 +1220,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() ); @@ -1249,7 +1251,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() ); @@ -1270,7 +1272,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() ); @@ -1303,7 +1305,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() ); @@ -1357,7 +1359,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() ); @@ -1388,7 +1390,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() ); @@ -1421,7 +1423,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1443,7 +1445,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1464,7 +1466,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() ); @@ -1498,7 +1500,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() ); @@ -1553,7 +1555,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() ); @@ -1585,7 +1587,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() ); @@ -1619,7 +1621,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1641,7 +1643,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1662,7 +1664,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() ); @@ -1695,7 +1697,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() ); @@ -1749,7 +1751,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() ); @@ -1780,7 +1782,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() ); @@ -1813,7 +1815,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1835,7 +1837,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1856,7 +1858,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() ); @@ -1889,7 +1891,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() ); @@ -1943,7 +1945,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() ); @@ -1974,7 +1976,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() ); @@ -2007,7 +2009,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2029,7 +2031,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2050,7 +2052,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() ); @@ -2084,7 +2086,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() ); @@ -2139,7 +2141,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() ); @@ -2171,7 +2173,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() ); @@ -2205,7 +2207,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2227,7 +2229,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2248,7 +2250,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest() ); @@ -2281,7 +2283,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest() ); @@ -2335,7 +2337,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest() ); @@ -2369,7 +2371,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.RollbackAwsNodePoolUpdateRequest() ); @@ -2402,7 +2404,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2425,7 +2427,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2446,7 +2448,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() ); @@ -2479,7 +2481,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() ); @@ -2533,7 +2535,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() ); @@ -2564,7 +2566,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() ); @@ -2597,7 +2599,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2619,7 +2621,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2640,7 +2642,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() ); @@ -2679,7 +2681,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() ); @@ -2734,7 +2736,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() ); @@ -2765,7 +2767,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() ); @@ -2825,7 +2827,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() ); @@ -2874,7 +2876,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() ); @@ -2923,7 +2925,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() ); @@ -2966,7 +2968,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() ); @@ -3005,7 +3007,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() ); @@ -3060,7 +3062,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() ); @@ -3091,7 +3093,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() ); @@ -3152,7 +3154,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() ); @@ -3202,7 +3204,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() ); @@ -3251,7 +3253,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() ); @@ -3293,7 +3295,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -3372,7 +3374,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -3452,7 +3454,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -3548,8 +3550,7 @@ describe('v1.AwsClustersClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -3568,7 +3569,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -3577,8 +3578,7 @@ describe('v1.AwsClustersClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -3594,7 +3594,7 @@ describe('v1.AwsClustersClient', () => { }); describe('Path templates', () => { - describe('attachedCluster', () => { + describe('attachedCluster', async () => { const fakePath = '/rendered/path/attachedCluster'; const expectedParameters = { project: 'projectValue', @@ -3605,7 +3605,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachedClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3659,7 +3659,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('attachedServerConfig', () => { + describe('attachedServerConfig', async () => { const fakePath = '/rendered/path/attachedServerConfig'; const expectedParameters = { project: 'projectValue', @@ -3669,7 +3669,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachedServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3722,7 +3722,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('awsCluster', () => { + describe('awsCluster', async () => { const fakePath = '/rendered/path/awsCluster'; const expectedParameters = { project: 'projectValue', @@ -3733,7 +3733,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3786,7 +3786,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('awsNodePool', () => { + describe('awsNodePool', async () => { const fakePath = '/rendered/path/awsNodePool'; const expectedParameters = { project: 'projectValue', @@ -3798,7 +3798,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsNodePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3862,7 +3862,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('awsServerConfig', () => { + describe('awsServerConfig', async () => { const fakePath = '/rendered/path/awsServerConfig'; const expectedParameters = { project: 'projectValue', @@ -3872,7 +3872,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3914,7 +3914,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('azureClient', () => { + describe('azureClient', async () => { const fakePath = '/rendered/path/azureClient'; const expectedParameters = { project: 'projectValue', @@ -3925,7 +3925,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureClientPathTemplate.render = sinon .stub() .returns(fakePath); @@ -3978,7 +3978,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('azureCluster', () => { + describe('azureCluster', async () => { const fakePath = '/rendered/path/azureCluster'; const expectedParameters = { project: 'projectValue', @@ -3989,7 +3989,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4042,7 +4042,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('azureNodePool', () => { + describe('azureNodePool', async () => { const fakePath = '/rendered/path/azureNodePool'; const expectedParameters = { project: 'projectValue', @@ -4054,7 +4054,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureNodePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4118,7 +4118,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('azureServerConfig', () => { + describe('azureServerConfig', async () => { const fakePath = '/rendered/path/azureServerConfig'; const expectedParameters = { project: 'projectValue', @@ -4128,7 +4128,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4179,7 +4179,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4189,7 +4189,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4228,7 +4228,7 @@ describe('v1.AwsClustersClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4237,7 +4237,7 @@ describe('v1.AwsClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); diff --git a/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts b/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts index 47b30e316d5..a2616b987f2 100644 --- a/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts +++ b/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts @@ -287,7 +287,9 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + client.initialize().catch(err => { + throw err; + }); assert(client.azureClustersStub); client.close().then(() => { done(); @@ -346,7 +348,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() ); @@ -377,7 +379,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() ); @@ -424,7 +426,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() ); @@ -455,7 +457,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() ); @@ -476,7 +478,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() ); @@ -507,7 +509,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() ); @@ -554,7 +556,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() ); @@ -585,7 +587,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() ); @@ -606,7 +608,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequest() ); @@ -638,7 +640,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequest() ); @@ -685,7 +687,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequest() ); @@ -719,7 +721,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureClusterAgentTokenRequest() ); @@ -743,7 +745,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() ); @@ -775,7 +777,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() ); @@ -822,7 +824,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() ); @@ -856,7 +858,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() ); @@ -880,7 +882,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() ); @@ -911,7 +913,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() ); @@ -958,7 +960,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() ); @@ -989,7 +991,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() ); @@ -1010,7 +1012,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest() ); @@ -1042,7 +1044,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest() ); @@ -1089,7 +1091,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest() ); @@ -1120,7 +1122,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureOpenIdConfigRequest() ); @@ -1141,7 +1143,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest() ); @@ -1173,7 +1175,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest() ); @@ -1220,7 +1222,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest() ); @@ -1251,7 +1253,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureJsonWebKeysRequest() ); @@ -1272,7 +1274,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() ); @@ -1304,7 +1306,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() ); @@ -1351,7 +1353,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() ); @@ -1382,7 +1384,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() ); @@ -1403,7 +1405,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() ); @@ -1436,7 +1438,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() ); @@ -1490,7 +1492,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() ); @@ -1521,7 +1523,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() ); @@ -1554,7 +1556,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1576,7 +1578,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1597,7 +1599,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() ); @@ -1630,7 +1632,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() ); @@ -1684,7 +1686,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() ); @@ -1715,7 +1717,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() ); @@ -1748,7 +1750,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1770,7 +1772,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1791,7 +1793,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() ); @@ -1824,7 +1826,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() ); @@ -1878,7 +1880,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() ); @@ -1909,7 +1911,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() ); @@ -1942,7 +1944,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -1964,7 +1966,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1985,7 +1987,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() ); @@ -2019,7 +2021,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() ); @@ -2074,7 +2076,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() ); @@ -2106,7 +2108,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() ); @@ -2140,7 +2142,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2162,7 +2164,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2183,7 +2185,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() ); @@ -2216,7 +2218,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() ); @@ -2270,7 +2272,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() ); @@ -2301,7 +2303,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() ); @@ -2334,7 +2336,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2356,7 +2358,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2377,7 +2379,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() ); @@ -2410,7 +2412,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() ); @@ -2464,7 +2466,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() ); @@ -2495,7 +2497,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() ); @@ -2528,7 +2530,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2550,7 +2552,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2571,7 +2573,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() ); @@ -2605,7 +2607,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() ); @@ -2660,7 +2662,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() ); @@ -2692,7 +2694,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() ); @@ -2726,7 +2728,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2748,7 +2750,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2769,7 +2771,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() ); @@ -2802,7 +2804,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() ); @@ -2856,7 +2858,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() ); @@ -2887,7 +2889,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() ); @@ -2920,7 +2922,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() ); @@ -2942,7 +2944,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -2963,7 +2965,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() ); @@ -3002,7 +3004,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() ); @@ -3057,7 +3059,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() ); @@ -3088,7 +3090,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() ); @@ -3149,7 +3151,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() ); @@ -3199,7 +3201,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() ); @@ -3248,7 +3250,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() ); @@ -3291,7 +3293,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() ); @@ -3330,7 +3332,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() ); @@ -3385,7 +3387,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() ); @@ -3416,7 +3418,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() ); @@ -3477,7 +3479,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() ); @@ -3527,7 +3529,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() ); @@ -3577,7 +3579,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() ); @@ -3620,7 +3622,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() ); @@ -3660,7 +3662,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() ); @@ -3717,7 +3719,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() ); @@ -3748,7 +3750,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() ); @@ -3809,7 +3811,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() ); @@ -3859,7 +3861,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() ); @@ -3909,7 +3911,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() ); @@ -3951,7 +3953,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.GetOperationRequest() ); @@ -4030,7 +4032,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.CancelOperationRequest() ); @@ -4110,7 +4112,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.DeleteOperationRequest() ); @@ -4206,8 +4208,7 @@ describe('v1.AzureClustersClient', () => { ]; client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); @@ -4226,7 +4227,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); const request = generateSampleMessage( new operationsProtos.google.longrunning.ListOperationsRequest() ); @@ -4235,8 +4236,7 @@ describe('v1.AzureClustersClient', () => { stubAsyncIterationCall(undefined, expectedError); const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = - []; + const responses: operationsProtos.google.longrunning.IOperation[] = []; for await (const resource of iterable) { responses.push(resource!); } @@ -4252,7 +4252,7 @@ describe('v1.AzureClustersClient', () => { }); describe('Path templates', () => { - describe('attachedCluster', () => { + describe('attachedCluster', async () => { const fakePath = '/rendered/path/attachedCluster'; const expectedParameters = { project: 'projectValue', @@ -4263,7 +4263,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachedClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4317,7 +4317,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('attachedServerConfig', () => { + describe('attachedServerConfig', async () => { const fakePath = '/rendered/path/attachedServerConfig'; const expectedParameters = { project: 'projectValue', @@ -4327,7 +4327,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.attachedServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4380,7 +4380,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('awsCluster', () => { + describe('awsCluster', async () => { const fakePath = '/rendered/path/awsCluster'; const expectedParameters = { project: 'projectValue', @@ -4391,7 +4391,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4444,7 +4444,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('awsNodePool', () => { + describe('awsNodePool', async () => { const fakePath = '/rendered/path/awsNodePool'; const expectedParameters = { project: 'projectValue', @@ -4456,7 +4456,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsNodePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4520,7 +4520,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('awsServerConfig', () => { + describe('awsServerConfig', async () => { const fakePath = '/rendered/path/awsServerConfig'; const expectedParameters = { project: 'projectValue', @@ -4530,7 +4530,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.awsServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4572,7 +4572,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('azureClient', () => { + describe('azureClient', async () => { const fakePath = '/rendered/path/azureClient'; const expectedParameters = { project: 'projectValue', @@ -4583,7 +4583,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureClientPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4636,7 +4636,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('azureCluster', () => { + describe('azureCluster', async () => { const fakePath = '/rendered/path/azureCluster'; const expectedParameters = { project: 'projectValue', @@ -4647,7 +4647,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureClusterPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4700,7 +4700,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('azureNodePool', () => { + describe('azureNodePool', async () => { const fakePath = '/rendered/path/azureNodePool'; const expectedParameters = { project: 'projectValue', @@ -4712,7 +4712,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureNodePoolPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4776,7 +4776,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('azureServerConfig', () => { + describe('azureServerConfig', async () => { const fakePath = '/rendered/path/azureServerConfig'; const expectedParameters = { project: 'projectValue', @@ -4786,7 +4786,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.azureServerConfigPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4837,7 +4837,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('location', () => { + describe('location', async () => { const fakePath = '/rendered/path/location'; const expectedParameters = { project: 'projectValue', @@ -4847,7 +4847,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() .returns(fakePath); @@ -4886,7 +4886,7 @@ describe('v1.AzureClustersClient', () => { }); }); - describe('project', () => { + describe('project', async () => { const fakePath = '/rendered/path/project'; const expectedParameters = { project: 'projectValue', @@ -4895,7 +4895,7 @@ describe('v1.AzureClustersClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); + await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() .returns(fakePath); From d11d8e96f03f87ce03bfd5a7a0e908c83cdc9819 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 15:38:26 -0700 Subject: [PATCH 34/34] chore: release main (#6177) --- .release-please-manifest.json | 296 +- changelog.json | 2685 ++++++++++++++++- packages/google-ads-admanager/CHANGELOG.md | 7 + packages/google-ads-admanager/package.json | 2 +- ...ppet_metadata_google.ads.admanager.v1.json | 2 +- .../google-ads-admanager/samples/package.json | 2 +- .../google-ai-generativelanguage/CHANGELOG.md | 7 + .../google-ai-generativelanguage/package.json | 2 +- ...adata_google.ai.generativelanguage.v1.json | 2 +- ..._google.ai.generativelanguage.v1alpha.json | 2 +- ...a_google.ai.generativelanguage.v1beta.json | 2 +- ....google.ai.generativelanguage.v1beta2.json | 2 +- ..._google.ai.generativelanguage.v1beta2.json | 2 +- ..._google.ai.generativelanguage.v1beta3.json | 2 +- .../samples/package.json | 2 +- packages/google-analytics-admin/CHANGELOG.md | 7 + packages/google-analytics-admin/package.json | 2 +- ...tadata.google.analytics.admin.v1alpha.json | 2 +- ...tadata_google.analytics.admin.v1alpha.json | 2 +- ...etadata.google.analytics.admin.v1beta.json | 2 +- ...etadata_google.analytics.admin.v1beta.json | 2 +- .../samples/package.json | 2 +- packages/google-analytics-data/CHANGELOG.md | 7 + packages/google-analytics-data/package.json | 2 +- ...etadata.google.analytics.data.v1alpha.json | 2 +- ...etadata_google.analytics.data.v1alpha.json | 2 +- ...metadata.google.analytics.data.v1beta.json | 2 +- ...metadata_google.analytics.data.v1beta.json | 2 +- .../samples/package.json | 2 +- packages/google-api-apikeys/CHANGELOG.md | 7 + packages/google-api-apikeys/package.json | 2 +- ...nippet_metadata.google.api.apikeys.v2.json | 2 +- ...nippet_metadata_google.api.apikeys.v2.json | 2 +- .../google-api-apikeys/samples/package.json | 2 +- packages/google-api-cloudquotas/CHANGELOG.md | 7 + packages/google-api-cloudquotas/package.json | 2 +- ...et_metadata_google.api.cloudquotas.v1.json | 2 +- ...etadata_google.api.cloudquotas.v1beta.json | 2 +- .../samples/package.json | 2 +- .../google-api-servicecontrol/CHANGELOG.md | 7 + .../google-api-servicecontrol/package.json | 2 +- ...metadata.google.api.servicecontrol.v1.json | 2 +- ...metadata_google.api.servicecontrol.v1.json | 2 +- ...metadata.google.api.servicecontrol.v2.json | 2 +- ...metadata_google.api.servicecontrol.v2.json | 2 +- .../samples/package.json | 2 +- .../google-api-servicemanagement/CHANGELOG.md | 7 + .../google-api-servicemanagement/package.json | 2 +- ...adata.google.api.servicemanagement.v1.json | 2 +- ...adata_google.api.servicemanagement.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-api-serviceusage/CHANGELOG.md | 7 + packages/google-api-serviceusage/package.json | 2 +- ...t_metadata.google.api.serviceusage.v1.json | 2 +- ...t_metadata_google.api.serviceusage.v1.json | 2 +- ...adata.google.api.serviceusage.v1beta1.json | 2 +- ...adata_google.api.serviceusage.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-appengine/CHANGELOG.md | 7 + packages/google-appengine/package.json | 2 +- .../snippet_metadata.google.appengine.v1.json | 2 +- .../snippet_metadata_google.appengine.v1.json | 2 +- .../google-appengine/samples/package.json | 2 +- packages/google-apps-meet/CHANGELOG.md | 7 + packages/google-apps-meet/package.json | 2 +- .../snippet_metadata_google.apps.meet.v2.json | 2 +- ...ppet_metadata_google.apps.meet.v2beta.json | 2 +- .../google-apps-meet/samples/package.json | 2 +- packages/google-area120-tables/CHANGELOG.md | 7 + packages/google-area120-tables/package.json | 2 +- ...tadata.google.area120.tables.v1alpha1.json | 2 +- ...tadata_google.area120.tables.v1alpha1.json | 2 +- .../samples/package.json | 2 +- packages/google-chat/CHANGELOG.md | 7 + packages/google-chat/package.json | 2 +- .../v1/snippet_metadata_google.chat.v1.json | 2 +- packages/google-chat/samples/package.json | 2 +- .../google-cloud-accessapproval/CHANGELOG.md | 7 + .../google-cloud-accessapproval/package.json | 2 +- ...tadata.google.cloud.accessapproval.v1.json | 2 +- ...tadata_google.cloud.accessapproval.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.advisorynotifications.v1.json | 2 +- ...google.cloud.advisorynotifications.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-aiplatform/CHANGELOG.md | 7 + packages/google-cloud-aiplatform/package.json | 2 +- ...t_metadata.google.cloud.aiplatform.v1.json | 2 +- ...t_metadata_google.cloud.aiplatform.v1.json | 2 +- ...adata.google.cloud.aiplatform.v1beta1.json | 2 +- ...adata_google.cloud.aiplatform.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-alloydb/CHANGELOG.md | 8 + packages/google-cloud-alloydb/package.json | 2 +- ...ppet_metadata.google.cloud.alloydb.v1.json | 2 +- ...ppet_metadata_google.cloud.alloydb.v1.json | 2 +- ...metadata.google.cloud.alloydb.v1alpha.json | 2 +- ...metadata_google.cloud.alloydb.v1alpha.json | 2 +- ..._metadata.google.cloud.alloydb.v1beta.json | 2 +- ..._metadata_google.cloud.alloydb.v1beta.json | 2 +- .../google-cloud-alloydb/samples/package.json | 2 +- packages/google-cloud-apigateway/CHANGELOG.md | 7 + packages/google-cloud-apigateway/package.json | 2 +- ...t_metadata.google.cloud.apigateway.v1.json | 2 +- ...t_metadata_google.cloud.apigateway.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-apigeeconnect/CHANGELOG.md | 7 + .../google-cloud-apigeeconnect/package.json | 2 +- ...etadata.google.cloud.apigeeconnect.v1.json | 2 +- ...etadata_google.cloud.apigeeconnect.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-apigeeregistry/CHANGELOG.md | 7 + .../google-cloud-apigeeregistry/package.json | 2 +- ...tadata.google.cloud.apigeeregistry.v1.json | 2 +- ...tadata_google.cloud.apigeeregistry.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-apihub/CHANGELOG.md | 7 + packages/google-cloud-apihub/package.json | 2 +- ...ippet_metadata_google.cloud.apihub.v1.json | 2 +- .../google-cloud-apihub/samples/package.json | 2 +- packages/google-cloud-apphub/CHANGELOG.md | 7 + packages/google-cloud-apphub/package.json | 2 +- ...ippet_metadata_google.cloud.apphub.v1.json | 2 +- .../google-cloud-apphub/samples/package.json | 2 +- packages/google-cloud-asset/CHANGELOG.md | 13 + packages/google-cloud-asset/package.json | 2 +- ...nippet_metadata.google.cloud.asset.v1.json | 2 +- ...nippet_metadata_google.cloud.asset.v1.json | 2 +- ...metadata.google.cloud.asset.v1p1beta1.json | 2 +- ...metadata_google.cloud.asset.v1p1beta1.json | 2 +- ...metadata.google.cloud.asset.v1p2beta1.json | 2 +- ...metadata_google.cloud.asset.v1p2beta1.json | 2 +- ...metadata.google.cloud.asset.v1p4beta1.json | 2 +- ...metadata.google.cloud.asset.v1p5beta1.json | 2 +- ...metadata_google.cloud.asset.v1p5beta1.json | 2 +- ...metadata.google.cloud.asset.v1p7beta1.json | 2 +- ...metadata_google.cloud.asset.v1p7beta1.json | 2 +- .../google-cloud-asset/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data.google.cloud.assuredworkloads.v1.json | 2 +- ...data_google.cloud.assuredworkloads.v1.json | 2 +- ...google.cloud.assuredworkloads.v1beta1.json | 2 +- ...google.cloud.assuredworkloads.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-automl/CHANGELOG.md | 8 + packages/google-cloud-automl/package.json | 2 +- ...ippet_metadata.google.cloud.automl.v1.json | 2 +- ...ippet_metadata_google.cloud.automl.v1.json | 2 +- ..._metadata.google.cloud.automl.v1beta1.json | 2 +- ..._metadata_google.cloud.automl.v1beta1.json | 2 +- .../google-cloud-automl/samples/package.json | 2 +- packages/google-cloud-backupdr/CHANGELOG.md | 7 + packages/google-cloud-backupdr/package.json | 2 +- ...pet_metadata_google.cloud.backupdr.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ata.google.cloud.baremetalsolution.v2.json | 2 +- ...ata_google.cloud.baremetalsolution.v2.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-batch/CHANGELOG.md | 7 + packages/google-cloud-batch/package.json | 2 +- ...nippet_metadata.google.cloud.batch.v1.json | 2 +- ...nippet_metadata_google.cloud.batch.v1.json | 2 +- ...t_metadata.google.cloud.batch.v1alpha.json | 2 +- ...t_metadata_google.cloud.batch.v1alpha.json | 2 +- .../google-cloud-batch/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...le.cloud.beyondcorp.appconnections.v1.json | 2 +- ...le.cloud.beyondcorp.appconnections.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...gle.cloud.beyondcorp.appconnectors.v1.json | 2 +- ...gle.cloud.beyondcorp.appconnectors.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...oogle.cloud.beyondcorp.appgateways.v1.json | 2 +- ...oogle.cloud.beyondcorp.appgateways.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...beyondcorp.clientconnectorservices.v1.json | 2 +- ...beyondcorp.clientconnectorservices.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...le.cloud.beyondcorp.clientgateways.v1.json | 2 +- ...le.cloud.beyondcorp.clientgateways.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.bigquery.analyticshub.v1.json | 2 +- ...google.cloud.bigquery.analyticshub.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a.google.cloud.bigquery.connection.v1.json | 2 +- ...a_google.cloud.bigquery.connection.v1.json | 2 +- ...gle.cloud.bigquery.connection.v1beta1.json | 2 +- ...gle.cloud.bigquery.connection.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...e.cloud.bigquery.dataexchange.v1beta1.json | 2 +- ...e.cloud.bigquery.dataexchange.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.bigquery.datapolicies.v1.json | 2 +- ...google.cloud.bigquery.datapolicies.v1.json | 2 +- ...e.cloud.bigquery.datapolicies.v1beta1.json | 2 +- ...e.cloud.bigquery.datapolicies.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ta.google.cloud.bigquery.migration.v2.json | 2 +- ...ta_google.cloud.bigquery.migration.v2.json | 2 +- ...ogle.cloud.bigquery.migration.v2alpha.json | 2 +- ...ogle.cloud.bigquery.migration.v2alpha.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ....google.cloud.bigquery.reservation.v1.json | 2 +- ..._google.cloud.bigquery.reservation.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-billing-budgets/CHANGELOG.md | 8 + .../google-cloud-billing-budgets/package.json | 2 +- ...adata.google.cloud.billing.budgets.v1.json | 2 +- ...adata_google.cloud.billing.budgets.v1.json | 2 +- ....google.cloud.billing.budgets.v1beta1.json | 2 +- ..._google.cloud.billing.budgets.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-billing/CHANGELOG.md | 8 + packages/google-cloud-billing/package.json | 2 +- ...ppet_metadata.google.cloud.billing.v1.json | 2 +- ...ppet_metadata_google.cloud.billing.v1.json | 2 +- .../google-cloud-billing/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a.google.cloud.binaryauthorization.v1.json | 2 +- ...a_google.cloud.binaryauthorization.v1.json | 2 +- ...gle.cloud.binaryauthorization.v1beta1.json | 2 +- ...gle.cloud.binaryauthorization.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ta.google.cloud.certificatemanager.v1.json | 2 +- ...ta_google.cloud.certificatemanager.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-channel/CHANGELOG.md | 7 + packages/google-cloud-channel/package.json | 2 +- ...ppet_metadata.google.cloud.channel.v1.json | 2 +- ...ppet_metadata_google.cloud.channel.v1.json | 2 +- .../google-cloud-channel/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ..._google.cloud.cloudcontrolspartner.v1.json | 2 +- ...gle.cloud.cloudcontrolspartner.v1beta.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-clouddms/CHANGELOG.md | 7 + packages/google-cloud-clouddms/package.json | 2 +- ...pet_metadata.google.cloud.clouddms.v1.json | 2 +- ...pet_metadata_google.cloud.clouddms.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...loud.commerce.consumer.procurement.v1.json | 2 +- ...ommerce.consumer.procurement.v1alpha1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-compute/CHANGELOG.md | 13 + packages/google-cloud-compute/package.json | 2 +- ...ppet_metadata.google.cloud.compute.v1.json | 2 +- ...ppet_metadata_google.cloud.compute.v1.json | 2 +- ...metadata.google.cloud.compute.v1small.json | 2 +- ...metadata_google.cloud.compute.v1small.json | 2 +- .../google-cloud-compute/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.confidentialcomputing.v1.json | 2 +- ...google.cloud.confidentialcomputing.v1.json | 2 +- ....cloud.confidentialcomputing.v1alpha1.json | 2 +- ....cloud.confidentialcomputing.v1alpha1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-config/CHANGELOG.md | 7 + packages/google-cloud-config/package.json | 2 +- ...ippet_metadata_google.cloud.config.v1.json | 2 +- .../google-cloud-config/samples/package.json | 2 +- packages/google-cloud-connectors/CHANGELOG.md | 7 + packages/google-cloud-connectors/package.json | 2 +- ...t_metadata_google.cloud.connectors.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.contactcenterinsights.v1.json | 2 +- ...google.cloud.contactcenterinsights.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data.google.cloud.contentwarehouse.v1.json | 2 +- ...data_google.cloud.contentwarehouse.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a.google.cloud.datacatalog.lineage.v1.json | 2 +- ...a_google.cloud.datacatalog.lineage.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-datacatalog/CHANGELOG.md | 12 + .../google-cloud-datacatalog/package.json | 2 +- ..._metadata.google.cloud.datacatalog.v1.json | 2 +- ..._metadata_google.cloud.datacatalog.v1.json | 2 +- ...data.google.cloud.datacatalog.v1beta1.json | 2 +- ...data_google.cloud.datacatalog.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dataform/CHANGELOG.md | 7 + packages/google-cloud-dataform/package.json | 2 +- ...etadata.google.cloud.dataform.v1beta1.json | 2 +- ...etadata_google.cloud.dataform.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-datafusion/CHANGELOG.md | 7 + packages/google-cloud-datafusion/package.json | 2 +- ...t_metadata.google.cloud.datafusion.v1.json | 2 +- ...t_metadata_google.cloud.datafusion.v1.json | 2 +- ...adata.google.cloud.datafusion.v1beta1.json | 2 +- ...adata_google.cloud.datafusion.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-datalabeling/CHANGELOG.md | 7 + .../google-cloud-datalabeling/package.json | 2 +- ...ata.google.cloud.datalabeling.v1beta1.json | 2 +- ...ata_google.cloud.datalabeling.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dataplex/CHANGELOG.md | 7 + packages/google-cloud-dataplex/package.json | 2 +- ...pet_metadata.google.cloud.dataplex.v1.json | 2 +- ...pet_metadata_google.cloud.dataplex.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dataproc/CHANGELOG.md | 7 + packages/google-cloud-dataproc/package.json | 2 +- ...pet_metadata.google.cloud.dataproc.v1.json | 2 +- ...pet_metadata_google.cloud.dataproc.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dataqna/CHANGELOG.md | 7 + packages/google-cloud-dataqna/package.json | 2 +- ...metadata.google.cloud.dataqna.v1alpha.json | 2 +- ...metadata_google.cloud.dataqna.v1alpha.json | 2 +- .../google-cloud-dataqna/samples/package.json | 2 +- packages/google-cloud-dns/CHANGELOG.md | 12 + packages/google-cloud-dns/package.json | 2 +- .../google-cloud-dns/samples/package.json | 2 +- packages/google-cloud-documentai/CHANGELOG.md | 7 + packages/google-cloud-documentai/package.json | 2 +- ...t_metadata.google.cloud.documentai.v1.json | 2 +- ...t_metadata_google.cloud.documentai.v1.json | 2 +- ...adata.google.cloud.documentai.v1beta1.json | 2 +- ...adata_google.cloud.documentai.v1beta1.json | 2 +- ...adata.google.cloud.documentai.v1beta2.json | 2 +- ...adata_google.cloud.documentai.v1beta2.json | 2 +- ...adata.google.cloud.documentai.v1beta3.json | 2 +- ...adata_google.cloud.documentai.v1beta3.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-gsuiteaddons/CHANGELOG.md | 7 + .../google-cloud-gsuiteaddons/package.json | 2 +- ...metadata.google.cloud.gsuiteaddons.v1.json | 2 +- ...metadata_google.cloud.gsuiteaddons.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-iap/CHANGELOG.md | 7 + packages/google-cloud-iap/package.json | 2 +- .../snippet_metadata.google.cloud.iap.v1.json | 2 +- .../snippet_metadata_google.cloud.iap.v1.json | 2 +- ...pet_metadata.google.cloud.iap.v1beta1.json | 2 +- ...pet_metadata_google.cloud.iap.v1beta1.json | 2 +- .../google-cloud-iap/samples/package.json | 2 +- packages/google-cloud-ids/CHANGELOG.md | 7 + packages/google-cloud-ids/package.json | 2 +- .../snippet_metadata.google.cloud.ids.v1.json | 2 +- .../snippet_metadata_google.cloud.ids.v1.json | 2 +- .../google-cloud-ids/samples/package.json | 2 +- packages/google-cloud-iot/CHANGELOG.md | 7 + packages/google-cloud-iot/package.json | 2 +- .../snippet_metadata.google.cloud.iot.v1.json | 2 +- .../snippet_metadata_google.cloud.iot.v1.json | 2 +- .../google-cloud-iot/samples/package.json | 2 +- .../google-cloud-kms-inventory/CHANGELOG.md | 7 + .../google-cloud-kms-inventory/package.json | 2 +- ...etadata.google.cloud.kms.inventory.v1.json | 2 +- ...etadata_google.cloud.kms.inventory.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-kms/CHANGELOG.md | 7 + packages/google-cloud-kms/package.json | 2 +- .../snippet_metadata.google.cloud.kms.v1.json | 2 +- .../snippet_metadata_google.cloud.kms.v1.json | 2 +- .../google-cloud-kms/samples/package.json | 2 +- packages/google-cloud-language/CHANGELOG.md | 8 + packages/google-cloud-language/package.json | 2 +- ...pet_metadata.google.cloud.language.v1.json | 2 +- ...pet_metadata_google.cloud.language.v1.json | 2 +- ...etadata.google.cloud.language.v1beta2.json | 2 +- ...etadata_google.cloud.language.v1beta2.json | 2 +- ...pet_metadata_google.cloud.language.v2.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-lifesciences/CHANGELOG.md | 7 + .../google-cloud-lifesciences/package.json | 2 +- ...data.google.cloud.lifesciences.v2beta.json | 2 +- ...data_google.cloud.lifesciences.v2beta.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ata.google.cloud.managedidentities.v1.json | 2 +- ...ata_google.cloud.managedidentities.v1.json | 2 +- ...oogle.cloud.managedidentities.v1beta1.json | 2 +- ...oogle.cloud.managedidentities.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-managedkafka/CHANGELOG.md | 12 + .../google-cloud-managedkafka/package.json | 2 +- ...metadata_google.cloud.managedkafka.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.mediatranslation.v1beta1.json | 2 +- ...google.cloud.mediatranslation.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-memcache/CHANGELOG.md | 7 + packages/google-cloud-memcache/package.json | 2 +- ...pet_metadata.google.cloud.memcache.v1.json | 2 +- ...pet_metadata_google.cloud.memcache.v1.json | 2 +- ...etadata.google.cloud.memcache.v1beta2.json | 2 +- ...etadata_google.cloud.memcache.v1beta2.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-memorystore/CHANGELOG.md | 7 + .../google-cloud-memorystore/package.json | 2 +- ..._metadata_google.cloud.memorystore.v1.json | 2 +- ...adata_google.cloud.memorystore.v1beta.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-metastore/CHANGELOG.md | 7 + packages/google-cloud-metastore/package.json | 2 +- ...et_metadata.google.cloud.metastore.v1.json | 2 +- ...et_metadata_google.cloud.metastore.v1.json | 2 +- ...tadata.google.cloud.metastore.v1alpha.json | 2 +- ...tadata_google.cloud.metastore.v1alpha.json | 2 +- ...etadata.google.cloud.metastore.v1beta.json | 2 +- ...etadata_google.cloud.metastore.v1beta.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-migrationcenter/CHANGELOG.md | 7 + .../google-cloud-migrationcenter/package.json | 2 +- ...adata.google.cloud.migrationcenter.v1.json | 2 +- ...adata_google.cloud.migrationcenter.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-modelarmor/CHANGELOG.md | 7 + packages/google-cloud-modelarmor/package.json | 2 +- ...t_metadata_google.cloud.modelarmor.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-monitoring/CHANGELOG.md | 7 + packages/google-cloud-monitoring/package.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-netapp/CHANGELOG.md | 7 + packages/google-cloud-netapp/package.json | 2 +- ...ippet_metadata_google.cloud.netapp.v1.json | 2 +- .../google-cloud-netapp/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a.google.cloud.networkconnectivity.v1.json | 2 +- ...a_google.cloud.networkconnectivity.v1.json | 2 +- ...le.cloud.networkconnectivity.v1alpha1.json | 2 +- ...le.cloud.networkconnectivity.v1alpha1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ata.google.cloud.networkmanagement.v1.json | 2 +- ...ata_google.cloud.networkmanagement.v1.json | 2 +- ...oogle.cloud.networkmanagement.v1beta1.json | 2 +- ...oogle.cloud.networkmanagement.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-networksecurity/CHANGELOG.md | 7 + .../google-cloud-networksecurity/package.json | 2 +- ...adata.google.cloud.networksecurity.v1.json | 2 +- ...adata_google.cloud.networksecurity.v1.json | 2 +- ....google.cloud.networksecurity.v1beta1.json | 2 +- ..._google.cloud.networksecurity.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-oracledatabase/CHANGELOG.md | 7 + .../google-cloud-oracledatabase/package.json | 2 +- ...tadata_google.cloud.oracledatabase.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-resourcemanager/CHANGELOG.md | 7 + .../google-cloud-resourcemanager/package.json | 2 +- ...adata.google.cloud.resourcemanager.v3.json | 2 +- ...adata_google.cloud.resourcemanager.v3.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-retail/CHANGELOG.md | 7 + packages/google-cloud-retail/package.json | 2 +- ...ippet_metadata.google.cloud.retail.v2.json | 2 +- ...ippet_metadata_google.cloud.retail.v2.json | 2 +- ..._metadata.google.cloud.retail.v2alpha.json | 2 +- ..._metadata_google.cloud.retail.v2alpha.json | 2 +- ...t_metadata.google.cloud.retail.v2beta.json | 2 +- ...t_metadata_google.cloud.retail.v2beta.json | 2 +- .../google-cloud-retail/samples/package.json | 2 +- packages/google-cloud-run/CHANGELOG.md | 7 + packages/google-cloud-run/package.json | 2 +- .../snippet_metadata.google.cloud.run.v2.json | 2 +- .../snippet_metadata_google.cloud.run.v2.json | 2 +- .../google-cloud-run/samples/package.json | 2 +- packages/google-cloud-scheduler/CHANGELOG.md | 7 + packages/google-cloud-scheduler/package.json | 2 +- ...et_metadata.google.cloud.scheduler.v1.json | 2 +- ...et_metadata_google.cloud.scheduler.v1.json | 2 +- ...tadata.google.cloud.scheduler.v1beta1.json | 2 +- ...tadata_google.cloud.scheduler.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-secretmanager/CHANGELOG.md | 7 + .../google-cloud-secretmanager/package.json | 2 +- ...etadata.google.cloud.secretmanager.v1.json | 2 +- ...etadata_google.cloud.secretmanager.v1.json | 2 +- ...ta_google.cloud.secretmanager.v1beta2.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a_google.cloud.securesourcemanager.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ta.google.cloud.security.privateca.v1.json | 2 +- ...ta_google.cloud.security.privateca.v1.json | 2 +- ...ogle.cloud.security.privateca.v1beta1.json | 2 +- ...ogle.cloud.security.privateca.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ata_google.cloud.security.publicca.v1.json | 2 +- ...oogle.cloud.security.publicca.v1beta1.json | 2 +- ...oogle.cloud.security.publicca.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-securitycenter/CHANGELOG.md | 7 + .../google-cloud-securitycenter/package.json | 2 +- ...tadata.google.cloud.securitycenter.v1.json | 2 +- ...tadata_google.cloud.securitycenter.v1.json | 2 +- ...a.google.cloud.securitycenter.v1beta1.json | 2 +- ...a_google.cloud.securitycenter.v1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...tadata_google.cloud.securitycenter.v2.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...gle.cloud.securitycentermanagement.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data.google.cloud.servicedirectory.v1.json | 2 +- ...data_google.cloud.servicedirectory.v1.json | 2 +- ...google.cloud.servicedirectory.v1beta1.json | 2 +- ...google.cloud.servicedirectory.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-servicehealth/CHANGELOG.md | 7 + .../google-cloud-servicehealth/package.json | 2 +- ...etadata_google.cloud.servicehealth.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-shell/CHANGELOG.md | 7 + packages/google-cloud-shell/package.json | 2 +- ...nippet_metadata.google.cloud.shell.v1.json | 2 +- ...nippet_metadata_google.cloud.shell.v1.json | 2 +- .../google-cloud-shell/samples/package.json | 2 +- packages/google-cloud-speech/CHANGELOG.md | 8 + packages/google-cloud-speech/package.json | 2 +- ...ippet_metadata.google.cloud.speech.v1.json | 2 +- ...ippet_metadata_google.cloud.speech.v1.json | 2 +- ...etadata.google.cloud.speech.v1p1beta1.json | 2 +- ...etadata_google.cloud.speech.v1p1beta1.json | 2 +- ...ippet_metadata.google.cloud.speech.v2.json | 2 +- ...ippet_metadata_google.cloud.speech.v2.json | 2 +- .../google-cloud-speech/samples/package.json | 2 +- packages/google-cloud-sql/CHANGELOG.md | 7 + packages/google-cloud-sql/package.json | 2 +- .../snippet_metadata_google.cloud.sql.v1.json | 2 +- ...pet_metadata_google.cloud.sql.v1beta4.json | 2 +- .../google-cloud-sql/samples/package.json | 2 +- .../google-cloud-storageinsights/CHANGELOG.md | 7 + .../google-cloud-storageinsights/package.json | 2 +- ...adata.google.cloud.storageinsights.v1.json | 2 +- ...adata_google.cloud.storageinsights.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-support/CHANGELOG.md | 7 + packages/google-cloud-support/package.json | 2 +- ...ppet_metadata.google.cloud.support.v2.json | 2 +- ...ppet_metadata_google.cloud.support.v2.json | 2 +- .../google-cloud-support/samples/package.json | 2 +- packages/google-cloud-talent/CHANGELOG.md | 7 + packages/google-cloud-talent/package.json | 2 +- ...ippet_metadata.google.cloud.talent.v4.json | 2 +- ...ippet_metadata_google.cloud.talent.v4.json | 2 +- ..._metadata.google.cloud.talent.v4beta1.json | 2 +- ..._metadata_google.cloud.talent.v4beta1.json | 2 +- .../google-cloud-talent/samples/package.json | 2 +- packages/google-cloud-tasks/CHANGELOG.md | 7 + packages/google-cloud-tasks/package.json | 2 +- ...nippet_metadata.google.cloud.tasks.v2.json | 2 +- ...nippet_metadata_google.cloud.tasks.v2.json | 2 +- ...t_metadata.google.cloud.tasks.v2beta2.json | 2 +- ...t_metadata_google.cloud.tasks.v2beta2.json | 2 +- ...t_metadata.google.cloud.tasks.v2beta3.json | 2 +- ...t_metadata_google.cloud.tasks.v2beta3.json | 2 +- .../google-cloud-tasks/samples/package.json | 2 +- .../google-cloud-telcoautomation/CHANGELOG.md | 7 + .../google-cloud-telcoautomation/package.json | 2 +- ...adata_google.cloud.telcoautomation.v1.json | 2 +- ...google.cloud.telcoautomation.v1alpha1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-texttospeech/CHANGELOG.md | 7 + .../google-cloud-texttospeech/package.json | 2 +- ...metadata.google.cloud.texttospeech.v1.json | 2 +- ...metadata_google.cloud.texttospeech.v1.json | 2 +- ...ata.google.cloud.texttospeech.v1beta1.json | 2 +- ...ata_google.cloud.texttospeech.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-tpu/CHANGELOG.md | 7 + packages/google-cloud-tpu/package.json | 2 +- .../snippet_metadata.google.cloud.tpu.v1.json | 2 +- .../snippet_metadata_google.cloud.tpu.v1.json | 2 +- .../snippet_metadata.google.cloud.tpu.v2.json | 2 +- .../snippet_metadata_google.cloud.tpu.v2.json | 2 +- ...et_metadata.google.cloud.tpu.v2alpha1.json | 2 +- ...et_metadata_google.cloud.tpu.v2alpha1.json | 2 +- .../google-cloud-tpu/samples/package.json | 2 +- packages/google-cloud-translate/CHANGELOG.md | 7 + packages/google-cloud-translate/package.json | 2 +- ..._metadata.google.cloud.translation.v3.json | 2 +- ..._metadata_google.cloud.translation.v3.json | 2 +- ...data.google.cloud.translation.v3beta1.json | 2 +- ...data_google.cloud.translation.v3beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data.google.cloud.video.livestream.v1.json | 2 +- ...data_google.cloud.video.livestream.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-video-stitcher/CHANGELOG.md | 7 + .../google-cloud-video-stitcher/package.json | 2 +- ...tadata.google.cloud.video.stitcher.v1.json | 2 +- ...tadata_google.cloud.video.stitcher.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data.google.cloud.video.transcoder.v1.json | 2 +- ...data_google.cloud.video.transcoder.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ata.google.cloud.videointelligence.v1.json | 2 +- ...ata_google.cloud.videointelligence.v1.json | 2 +- ...oogle.cloud.videointelligence.v1beta2.json | 2 +- ...oogle.cloud.videointelligence.v1beta2.json | 2 +- ...gle.cloud.videointelligence.v1p1beta1.json | 2 +- ...gle.cloud.videointelligence.v1p1beta1.json | 2 +- ...gle.cloud.videointelligence.v1p2beta1.json | 2 +- ...gle.cloud.videointelligence.v1p2beta1.json | 2 +- ...gle.cloud.videointelligence.v1p3beta1.json | 2 +- ...gle.cloud.videointelligence.v1p3beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-vision/CHANGELOG.md | 13 + packages/google-cloud-vision/package.json | 2 +- ...ippet_metadata.google.cloud.vision.v1.json | 2 +- ...ippet_metadata_google.cloud.vision.v1.json | 2 +- ...etadata.google.cloud.vision.v1p1beta1.json | 2 +- ...etadata_google.cloud.vision.v1p1beta1.json | 2 +- ...etadata.google.cloud.vision.v1p2beta1.json | 2 +- ...etadata_google.cloud.vision.v1p2beta1.json | 2 +- ...etadata.google.cloud.vision.v1p3beta1.json | 2 +- ...etadata_google.cloud.vision.v1p3beta1.json | 2 +- ...etadata.google.cloud.vision.v1p4beta1.json | 2 +- ...etadata_google.cloud.vision.v1p4beta1.json | 2 +- .../google-cloud-vision/samples/package.json | 2 +- .../google-cloud-vmmigration/CHANGELOG.md | 7 + .../google-cloud-vmmigration/package.json | 2 +- ..._metadata.google.cloud.vmmigration.v1.json | 2 +- ..._metadata_google.cloud.vmmigration.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-vmwareengine/CHANGELOG.md | 7 + .../google-cloud-vmwareengine/package.json | 2 +- ...metadata.google.cloud.vmwareengine.v1.json | 2 +- ...metadata_google.cloud.vmwareengine.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-vpcaccess/CHANGELOG.md | 7 + packages/google-cloud-vpcaccess/package.json | 2 +- ...et_metadata.google.cloud.vpcaccess.v1.json | 2 +- ...et_metadata_google.cloud.vpcaccess.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-webrisk/CHANGELOG.md | 7 + packages/google-cloud-webrisk/package.json | 2 +- ...ppet_metadata.google.cloud.webrisk.v1.json | 2 +- ...ppet_metadata_google.cloud.webrisk.v1.json | 2 +- ...metadata.google.cloud.webrisk.v1beta1.json | 2 +- ...metadata_google.cloud.webrisk.v1beta1.json | 2 +- .../google-cloud-webrisk/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ta.google.cloud.websecurityscanner.v1.json | 2 +- ...ta_google.cloud.websecurityscanner.v1.json | 2 +- ...ogle.cloud.websecurityscanner.v1alpha.json | 2 +- ...ogle.cloud.websecurityscanner.v1alpha.json | 2 +- ...oogle.cloud.websecurityscanner.v1beta.json | 2 +- ...oogle.cloud.websecurityscanner.v1beta.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- ....google.cloud.workflows.executions.v1.json | 2 +- ...et_metadata.google.cloud.workflows.v1.json | 2 +- ..._google.cloud.workflows.executions.v1.json | 2 +- ...et_metadata_google.cloud.workflows.v1.json | 2 +- ...gle.cloud.workflows.executions.v1beta.json | 2 +- ...etadata.google.cloud.workflows.v1beta.json | 2 +- ...gle.cloud.workflows.executions.v1beta.json | 2 +- ...etadata_google.cloud.workflows.v1beta.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-workstations/CHANGELOG.md | 7 + .../google-cloud-workstations/package.json | 2 +- ...metadata.google.cloud.workstations.v1.json | 2 +- ...metadata_google.cloud.workstations.v1.json | 2 +- ...data.google.cloud.workstations.v1beta.json | 2 +- ...data_google.cloud.workstations.v1beta.json | 2 +- .../samples/package.json | 2 +- packages/google-container/CHANGELOG.md | 7 + packages/google-container/package.json | 2 +- .../snippet_metadata.google.container.v1.json | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata.google.container.v1beta1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- .../google-container/samples/package.json | 2 +- packages/google-dataflow/CHANGELOG.md | 7 + packages/google-dataflow/package.json | 2 +- ...ppet_metadata.google.dataflow.v1beta3.json | 2 +- ...ppet_metadata_google.dataflow.v1beta3.json | 2 +- packages/google-dataflow/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a.google.devtools.artifactregistry.v1.json | 2 +- ...a_google.devtools.artifactregistry.v1.json | 2 +- ...gle.devtools.artifactregistry.v1beta2.json | 2 +- ...gle.devtools.artifactregistry.v1beta2.json | 2 +- .../samples/package.json | 2 +- .../google-devtools-cloudbuild/CHANGELOG.md | 7 + .../google-devtools-cloudbuild/package.json | 2 +- ...etadata.google.devtools.cloudbuild.v1.json | 2 +- ...etadata_google.devtools.cloudbuild.v1.json | 2 +- ...etadata.google.devtools.cloudbuild.v2.json | 2 +- ...etadata_google.devtools.cloudbuild.v2.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data_google.devtools.cloudprofiler.v2.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 13 + .../package.json | 2 +- ....google.devtools.containeranalysis.v1.json | 2 +- ..._google.devtools.containeranalysis.v1.json | 2 +- ...le.devtools.containeranalysis.v1beta1.json | 2 +- ...le.devtools.containeranalysis.v1beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-iam-credentials/CHANGELOG.md | 7 + packages/google-iam-credentials/package.json | 2 +- ...et_metadata.google.iam.credentials.v1.json | 2 +- ...et_metadata_google.iam.credentials.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-iam/CHANGELOG.md | 7 + packages/google-iam/package.json | 2 +- .../v2/snippet_metadata.google.iam.v2.json | 2 +- .../v2/snippet_metadata_google.iam.v2.json | 2 +- .../v3/snippet_metadata_google.iam.v3.json | 2 +- packages/google-iam/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...ogle.identity.accesscontextmanager.v1.json | 2 +- ...ogle.identity.accesscontextmanager.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data.google.maps.addressvalidation.v1.json | 2 +- ...data_google.maps.addressvalidation.v1.json | 2 +- .../samples/package.json | 2 +- .../google-maps-areainsights/CHANGELOG.md | 7 + .../google-maps-areainsights/package.json | 2 +- ..._metadata_google.maps.areainsights.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...metadata_maps.fleetengine.delivery.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-maps-fleetengine/CHANGELOG.md | 7 + packages/google-maps-fleetengine/package.json | 2 +- .../snippet_metadata_maps.fleetengine.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...a.google.maps.mapsplatformdatasets.v1.json | 2 +- ...a_google.maps.mapsplatformdatasets.v1.json | 2 +- ...gle.maps.mapsplatformdatasets.v1alpha.json | 2 +- ...gle.maps.mapsplatformdatasets.v1alpha.json | 2 +- .../samples/package.json | 2 +- packages/google-maps-places/CHANGELOG.md | 7 + packages/google-maps-places/package.json | 2 +- ...nippet_metadata.google.maps.places.v1.json | 2 +- ...nippet_metadata_google.maps.places.v1.json | 2 +- .../google-maps-places/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...data_google.maps.routeoptimization.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-maps-routing/CHANGELOG.md | 7 + packages/google-maps-routing/package.json | 2 +- ...ippet_metadata.google.maps.routing.v2.json | 2 +- ...ippet_metadata_google.maps.routing.v2.json | 2 +- .../google-maps-routing/samples/package.json | 2 +- packages/google-maps-solar/CHANGELOG.md | 7 + packages/google-maps-solar/package.json | 2 +- ...snippet_metadata_google.maps.solar.v1.json | 2 +- .../google-maps-solar/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...oogle.marketingplatform.admin.v1alpha.json | 2 +- .../samples/package.json | 2 +- .../google-monitoring-dashboard/CHANGELOG.md | 7 + .../google-monitoring-dashboard/package.json | 2 +- ...tadata.google.monitoring.dashboard.v1.json | 2 +- ...tadata_google.monitoring.dashboard.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-privacy-dlp/CHANGELOG.md | 7 + packages/google-privacy-dlp/package.json | 2 +- ...nippet_metadata.google.privacy.dlp.v2.json | 2 +- ...nippet_metadata_google.privacy.dlp.v2.json | 2 +- .../google-privacy-dlp/samples/package.json | 2 +- packages/google-shopping-css/CHANGELOG.md | 7 + packages/google-shopping-css/package.json | 2 +- ...ippet_metadata_google.shopping.css.v1.json | 2 +- .../google-shopping-css/samples/package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- ...gle.shopping.merchant.accounts.v1beta.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ....shopping.merchant.conversions.v1beta.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- ....shopping.merchant.datasources.v1beta.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...gle.shopping.merchant.products.v1beta.json | 2 +- .../samples/package.json | 2 +- packages/google-storage-control/CHANGELOG.md | 7 + packages/google-storage-control/package.json | 2 +- ...et_metadata_google.storage.control.v2.json | 2 +- .../samples/package.json | 2 +- 863 files changed, 4641 insertions(+), 862 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b37d978d6ca..47b18a3d7d9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,66 +1,66 @@ { "packages/gapic-node-templating": "0.0.0", - "packages/google-ai-generativelanguage": "3.0.0", - "packages/google-analytics-admin": "8.0.0", - "packages/google-analytics-data": "5.0.0", - "packages/google-api-apikeys": "2.0.0", - "packages/google-api-servicecontrol": "4.0.0", - "packages/google-api-servicemanagement": "3.0.0", - "packages/google-api-serviceusage": "4.0.0", - "packages/google-appengine": "4.0.0", - "packages/google-area120-tables": "4.0.0", - "packages/google-cloud-accessapproval": "4.0.0", - "packages/google-cloud-advisorynotifications": "2.0.0", - "packages/google-cloud-aiplatform": "4.0.0", - "packages/google-cloud-alloydb": "2.0.0", - "packages/google-cloud-apigateway": "4.0.0", - "packages/google-cloud-apigeeconnect": "4.0.0", - "packages/google-cloud-apigeeregistry": "2.0.0", - "packages/google-cloud-asset": "6.0.0", - "packages/google-cloud-assuredworkloads": "5.0.0", - "packages/google-cloud-automl": "5.0.0", - "packages/google-cloud-baremetalsolution": "2.0.0", - "packages/google-cloud-batch": "2.0.0", - "packages/google-cloud-beyondcorp-appconnections": "2.0.0", - "packages/google-cloud-beyondcorp-appconnectors": "2.0.0", - "packages/google-cloud-beyondcorp-appgateways": "2.0.0", - "packages/google-cloud-beyondcorp-clientconnectorservices": "3.0.0", - "packages/google-cloud-beyondcorp-clientgateways": "2.0.0", - "packages/google-cloud-bigquery-analyticshub": "2.0.0", - "packages/google-cloud-bigquery-connection": "4.0.0", - "packages/google-cloud-bigquery-dataexchange": "2.0.0", - "packages/google-cloud-bigquery-datapolicies": "2.0.0", - "packages/google-cloud-bigquery-datatransfer": "5.0.0", - "packages/google-cloud-bigquery-migration": "2.0.0", - "packages/google-cloud-bigquery-reservation": "4.0.0", - "packages/google-cloud-billing": "5.0.0", - "packages/google-cloud-billing-budgets": "6.0.0", - "packages/google-cloud-binaryauthorization": "4.0.0", - "packages/google-cloud-certificatemanager": "2.0.0", - "packages/google-cloud-channel": "4.0.0", - "packages/google-cloud-clouddms": "4.0.0", - "packages/google-cloud-commerce-consumer-procurement": "0.6.0", - "packages/google-cloud-compute": "5.0.0", - "packages/google-cloud-confidentialcomputing": "2.0.0", - "packages/google-cloud-config": "0.8.0", - "packages/google-cloud-connectors": "0.4.0", - "packages/google-cloud-contactcenterinsights": "4.0.0", - "packages/google-cloud-contentwarehouse": "2.0.0", - "packages/google-cloud-datacatalog": "5.0.0", - "packages/google-cloud-datacatalog-lineage": "2.0.0", - "packages/google-cloud-dataform": "2.0.0", - "packages/google-cloud-datafusion": "4.0.0", - "packages/google-cloud-datalabeling": "5.0.0", - "packages/google-cloud-dataplex": "4.0.0", - "packages/google-cloud-dataproc": "6.0.0", - "packages/google-cloud-dataqna": "4.0.0", + "packages/google-ai-generativelanguage": "3.1.0", + "packages/google-analytics-admin": "8.1.0", + "packages/google-analytics-data": "5.1.0", + "packages/google-api-apikeys": "2.1.0", + "packages/google-api-servicecontrol": "4.1.0", + "packages/google-api-servicemanagement": "3.1.0", + "packages/google-api-serviceusage": "4.1.0", + "packages/google-appengine": "4.1.0", + "packages/google-area120-tables": "4.1.0", + "packages/google-cloud-accessapproval": "4.1.0", + "packages/google-cloud-advisorynotifications": "2.1.0", + "packages/google-cloud-aiplatform": "4.1.0", + "packages/google-cloud-alloydb": "2.1.0", + "packages/google-cloud-apigateway": "4.1.0", + "packages/google-cloud-apigeeconnect": "4.1.0", + "packages/google-cloud-apigeeregistry": "2.1.0", + "packages/google-cloud-asset": "6.1.0", + "packages/google-cloud-assuredworkloads": "5.0.1", + "packages/google-cloud-automl": "5.0.1", + "packages/google-cloud-baremetalsolution": "2.0.1", + "packages/google-cloud-batch": "2.0.1", + "packages/google-cloud-beyondcorp-appconnections": "2.0.1", + "packages/google-cloud-beyondcorp-appconnectors": "2.0.1", + "packages/google-cloud-beyondcorp-appgateways": "2.0.1", + "packages/google-cloud-beyondcorp-clientconnectorservices": "3.0.1", + "packages/google-cloud-beyondcorp-clientgateways": "2.0.1", + "packages/google-cloud-bigquery-analyticshub": "2.0.1", + "packages/google-cloud-bigquery-connection": "4.0.1", + "packages/google-cloud-bigquery-dataexchange": "2.0.1", + "packages/google-cloud-bigquery-datapolicies": "2.0.1", + "packages/google-cloud-bigquery-datatransfer": "5.0.1", + "packages/google-cloud-bigquery-migration": "2.0.1", + "packages/google-cloud-bigquery-reservation": "4.0.1", + "packages/google-cloud-billing": "5.0.1", + "packages/google-cloud-billing-budgets": "6.0.1", + "packages/google-cloud-binaryauthorization": "4.0.1", + "packages/google-cloud-certificatemanager": "2.0.1", + "packages/google-cloud-channel": "4.0.1", + "packages/google-cloud-clouddms": "4.0.1", + "packages/google-cloud-commerce-consumer-procurement": "0.6.1", + "packages/google-cloud-compute": "5.1.0", + "packages/google-cloud-confidentialcomputing": "2.0.1", + "packages/google-cloud-config": "0.8.1", + "packages/google-cloud-connectors": "0.4.1", + "packages/google-cloud-contactcenterinsights": "4.0.1", + "packages/google-cloud-contentwarehouse": "2.0.1", + "packages/google-cloud-datacatalog": "5.1.0", + "packages/google-cloud-datacatalog-lineage": "2.0.1", + "packages/google-cloud-dataform": "2.0.1", + "packages/google-cloud-datafusion": "4.0.1", + "packages/google-cloud-datalabeling": "5.0.1", + "packages/google-cloud-dataplex": "4.0.1", + "packages/google-cloud-dataproc": "6.0.1", + "packages/google-cloud-dataqna": "4.0.1", "packages/google-cloud-datastream": "4.0.0", "packages/google-cloud-deploy": "5.0.0", "packages/google-cloud-dialogflow": "7.0.0", "packages/google-cloud-dialogflow-cx": "5.0.0", "packages/google-cloud-discoveryengine": "2.0.0", - "packages/google-cloud-dns": "5.0.0", - "packages/google-cloud-documentai": "9.0.0", + "packages/google-cloud-dns": "5.1.0", + "packages/google-cloud-documentai": "9.1.0", "packages/google-cloud-domains": "4.0.0", "packages/google-cloud-edgecontainer": "0.6.0", "packages/google-cloud-essentialcontacts": "4.0.0", @@ -72,24 +72,24 @@ "packages/google-cloud-gkeconnect-gateway": "5.0.0", "packages/google-cloud-gkehub": "6.0.0", "packages/google-cloud-gkemulticloud": "2.0.0", - "packages/google-cloud-gsuiteaddons": "2.0.0", - "packages/google-cloud-iap": "4.0.0", - "packages/google-cloud-ids": "4.0.0", - "packages/google-cloud-iot": "5.0.0", - "packages/google-cloud-kms": "5.0.0", - "packages/google-cloud-kms-inventory": "2.0.0", - "packages/google-cloud-language": "7.0.0", - "packages/google-cloud-lifesciences": "4.0.0", - "packages/google-cloud-managedidentities": "4.0.0", - "packages/google-cloud-mediatranslation": "5.0.0", - "packages/google-cloud-memcache": "4.0.0", - "packages/google-cloud-metastore": "5.0.0", - "packages/google-cloud-migrationcenter": "2.0.0", - "packages/google-cloud-monitoring": "5.0.0", - "packages/google-cloud-netapp": "0.10.0", - "packages/google-cloud-networkconnectivity": "4.0.0", - "packages/google-cloud-networkmanagement": "4.0.0", - "packages/google-cloud-networksecurity": "3.0.0", + "packages/google-cloud-gsuiteaddons": "2.0.1", + "packages/google-cloud-iap": "4.0.1", + "packages/google-cloud-ids": "4.0.1", + "packages/google-cloud-iot": "5.0.1", + "packages/google-cloud-kms": "5.0.1", + "packages/google-cloud-kms-inventory": "2.0.1", + "packages/google-cloud-language": "7.0.1", + "packages/google-cloud-lifesciences": "4.0.1", + "packages/google-cloud-managedidentities": "4.0.1", + "packages/google-cloud-mediatranslation": "5.0.1", + "packages/google-cloud-memcache": "4.0.1", + "packages/google-cloud-metastore": "5.0.1", + "packages/google-cloud-migrationcenter": "2.0.1", + "packages/google-cloud-monitoring": "5.0.1", + "packages/google-cloud-netapp": "0.10.1", + "packages/google-cloud-networkconnectivity": "4.0.1", + "packages/google-cloud-networkmanagement": "4.0.1", + "packages/google-cloud-networksecurity": "3.0.1", "packages/google-cloud-networkservices": "0.8.0", "packages/google-cloud-notebooks": "4.0.0", "packages/google-cloud-orchestration-airflow-service": "4.0.0", @@ -105,96 +105,96 @@ "packages/google-cloud-recaptchaenterprise": "6.0.0", "packages/google-cloud-recommender": "7.0.0", "packages/google-cloud-redis": "5.0.0", - "packages/google-cloud-resourcemanager": "6.0.0", - "packages/google-cloud-retail": "4.0.0", - "packages/google-cloud-run": "2.0.0", - "packages/google-cloud-scheduler": "5.0.0", - "packages/google-cloud-secretmanager": "6.0.0", - "packages/google-cloud-security-privateca": "6.0.0", - "packages/google-cloud-security-publicca": "2.0.0", - "packages/google-cloud-securitycenter": "9.0.0", - "packages/google-cloud-servicedirectory": "6.0.0", - "packages/google-cloud-shell": "4.0.0", - "packages/google-cloud-speech": "7.0.0", - "packages/google-cloud-sql": "0.20.0", - "packages/google-cloud-storageinsights": "2.0.0", - "packages/google-cloud-support": "2.0.0", - "packages/google-cloud-talent": "7.0.0", - "packages/google-cloud-tasks": "6.0.0", - "packages/google-cloud-texttospeech": "6.0.0", - "packages/google-cloud-tpu": "4.0.0", - "packages/google-cloud-translate": "9.0.0", - "packages/google-cloud-video-livestream": "2.0.0", - "packages/google-cloud-video-stitcher": "3.0.0", - "packages/google-cloud-video-transcoder": "4.0.0", - "packages/google-cloud-videointelligence": "6.0.0", - "packages/google-cloud-vision": "5.0.0", - "packages/google-cloud-vmmigration": "4.0.0", - "packages/google-cloud-vmwareengine": "2.0.0", - "packages/google-cloud-vpcaccess": "4.0.0", - "packages/google-cloud-webrisk": "5.0.0", - "packages/google-cloud-websecurityscanner": "4.0.0", - "packages/google-cloud-workflows-executions": "4.0.0", - "packages/google-cloud-workstations": "2.0.0", - "packages/google-container": "6.0.0", - "packages/google-dataflow": "4.0.0", - "packages/google-devtools-artifactregistry": "4.0.0", - "packages/google-devtools-cloudbuild": "5.0.0", - "packages/google-devtools-cloudprofiler": "0.7.0", - "packages/google-devtools-containeranalysis": "6.0.0", - "packages/google-iam": "2.0.0", - "packages/google-iam-credentials": "4.0.0", - "packages/google-identity-accesscontextmanager": "4.0.0", - "packages/google-maps-addressvalidation": "3.0.0", - "packages/google-maps-mapsplatformdatasets": "3.0.0", - "packages/google-maps-places": "2.0.0", - "packages/google-maps-routing": "2.0.0", - "packages/google-monitoring-dashboard": "4.0.0", - "packages/google-privacy-dlp": "6.0.0", + "packages/google-cloud-resourcemanager": "6.0.1", + "packages/google-cloud-retail": "4.0.1", + "packages/google-cloud-run": "2.0.1", + "packages/google-cloud-scheduler": "5.0.1", + "packages/google-cloud-secretmanager": "6.0.1", + "packages/google-cloud-security-privateca": "6.0.1", + "packages/google-cloud-security-publicca": "2.0.1", + "packages/google-cloud-securitycenter": "9.0.1", + "packages/google-cloud-servicedirectory": "6.0.1", + "packages/google-cloud-shell": "4.0.1", + "packages/google-cloud-speech": "7.0.1", + "packages/google-cloud-sql": "0.20.1", + "packages/google-cloud-storageinsights": "2.0.1", + "packages/google-cloud-support": "2.0.1", + "packages/google-cloud-talent": "7.0.1", + "packages/google-cloud-tasks": "6.0.1", + "packages/google-cloud-texttospeech": "6.0.1", + "packages/google-cloud-tpu": "4.0.1", + "packages/google-cloud-translate": "9.0.1", + "packages/google-cloud-video-livestream": "2.0.1", + "packages/google-cloud-video-stitcher": "3.0.1", + "packages/google-cloud-video-transcoder": "4.0.1", + "packages/google-cloud-videointelligence": "6.0.1", + "packages/google-cloud-vision": "5.1.0", + "packages/google-cloud-vmmigration": "4.0.1", + "packages/google-cloud-vmwareengine": "2.0.1", + "packages/google-cloud-vpcaccess": "4.0.1", + "packages/google-cloud-webrisk": "5.0.1", + "packages/google-cloud-websecurityscanner": "4.0.1", + "packages/google-cloud-workflows-executions": "4.1.0", + "packages/google-cloud-workstations": "2.0.1", + "packages/google-container": "6.0.1", + "packages/google-dataflow": "4.0.1", + "packages/google-devtools-artifactregistry": "4.0.1", + "packages/google-devtools-cloudbuild": "5.0.1", + "packages/google-devtools-cloudprofiler": "0.7.1", + "packages/google-devtools-containeranalysis": "6.1.0", + "packages/google-iam": "2.0.1", + "packages/google-iam-credentials": "4.0.1", + "packages/google-identity-accesscontextmanager": "4.0.1", + "packages/google-maps-addressvalidation": "3.0.1", + "packages/google-maps-mapsplatformdatasets": "3.0.1", + "packages/google-maps-places": "2.0.1", + "packages/google-maps-routing": "2.0.1", + "packages/google-monitoring-dashboard": "4.0.1", + "packages/google-privacy-dlp": "6.0.1", "packages/google-storagetransfer": "4.0.0", "packages/grafeas": "6.0.0", "packages/typeless-sample-bot": "3.0.0", "packages/google-cloud-edgenetwork": "0.7.0", "packages/google-shopping-merchant-reports": "0.8.0", "packages/google-shopping-merchant-inventories": "0.7.0", - "packages/google-shopping-css": "0.8.0", - "packages/google-api-cloudquotas": "2.0.0", + "packages/google-shopping-css": "0.8.1", + "packages/google-api-cloudquotas": "2.1.0", "packages/google-cloud-redis-cluster": "0.7.0", - "packages/google-cloud-servicehealth": "0.6.0", - "packages/google-apps-meet": "0.5.0", + "packages/google-cloud-servicehealth": "0.6.1", + "packages/google-apps-meet": "0.6.0", "packages/google-cloud-parallelstore": "0.8.0", - "packages/google-cloud-cloudcontrolspartner": "0.5.0", - "packages/google-cloud-telcoautomation": "0.4.0", - "packages/google-cloud-apphub": "0.4.0", - "packages/google-chat": "0.14.0", + "packages/google-cloud-cloudcontrolspartner": "0.5.1", + "packages/google-cloud-telcoautomation": "0.4.1", + "packages/google-cloud-apphub": "0.4.1", + "packages/google-chat": "0.15.0", "packages/google-shopping-merchant-quota": "0.3.0", - "packages/google-storage-control": "0.3.0", - "packages/google-cloud-backupdr": "0.3.0", - "packages/google-cloud-securesourcemanager": "0.5.0", + "packages/google-storage-control": "0.4.0", + "packages/google-cloud-backupdr": "0.3.1", + "packages/google-cloud-securesourcemanager": "0.5.1", "packages/google-shopping-merchant-notifications": "0.4.0", "packages/google-shopping-merchant-lfp": "0.4.0", - "packages/google-cloud-securitycentermanagement": "0.6.0", - "packages/google-shopping-merchant-conversions": "0.3.0", - "packages/google-maps-solar": "0.3.0", - "packages/google-maps-routeoptimization": "0.4.0", - "packages/google-maps-fleetengine-delivery": "0.4.0", + "packages/google-cloud-securitycentermanagement": "0.6.1", + "packages/google-shopping-merchant-conversions": "0.3.1", + "packages/google-maps-solar": "0.3.1", + "packages/google-maps-routeoptimization": "0.4.1", + "packages/google-maps-fleetengine-delivery": "0.4.1", "packages/google-streetview-publish": "0.2.0", - "packages/google-maps-fleetengine": "0.6.0", + "packages/google-maps-fleetengine": "0.6.1", "packages/google-shopping-merchant-promotions": "0.2.0", - "packages/google-shopping-merchant-datasources": "0.4.0", - "packages/google-cloud-managedkafka": "0.4.0", + "packages/google-shopping-merchant-datasources": "0.5.0", + "packages/google-cloud-managedkafka": "0.5.0", "packages/google-cloud-developerconnect": "0.3.0", "packages/google-cloud-privilegedaccessmanager": "0.3.0", - "packages/google-shopping-merchant-products": "0.2.0", - "packages/google-shopping-merchant-accounts": "2.0.0", + "packages/google-shopping-merchant-products": "0.3.0", + "packages/google-shopping-merchant-accounts": "2.1.0", "packages/google-cloud-gdchardwaremanagement": "0.5.0", - "packages/google-cloud-apihub": "0.2.0", - "packages/google-marketingplatform-admin": "0.2.0", - "packages/google-cloud-oracledatabase": "0.3.0", - "packages/google-ads-admanager": "0.2.0", + "packages/google-cloud-apihub": "0.3.0", + "packages/google-marketingplatform-admin": "0.2.1", + "packages/google-cloud-oracledatabase": "0.4.0", + "packages/google-ads-admanager": "0.3.0", "packages/google-shopping-merchant-reviews": "0.2.0", - "packages/google-cloud-memorystore": "0.2.0", + "packages/google-cloud-memorystore": "0.2.1", "packages/google-cloud-parametermanager": "0.2.0", - "packages/google-maps-areainsights": "0.2.0", - "packages/google-cloud-modelarmor": "0.1.0" + "packages/google-maps-areainsights": "0.2.1", + "packages/google-cloud-modelarmor": "0.1.1" } diff --git a/changelog.json b/changelog.json index 712742da5dd..75700756a67 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,2689 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.2.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/areainsights", + "id": "10543f76-5d4f-47aa-adb6-37cc5002c064", + "createTime": "2025-03-19T07:41:02.263Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "0.1.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/modelarmor", + "id": "7ca5d2c5-46a0-49c1-b332-5dafcc9c35ea", + "createTime": "2025-03-19T07:41:02.244Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "0.2.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/memorystore", + "id": "d6eaa02e-7318-470c-92cd-478c7dd711d3", + "createTime": "2025-03-19T07:41:02.220Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "0.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ads/admanager", + "id": "9441b60d-e9aa-4705-bf04-7130d0d03de5", + "createTime": "2025-03-19T07:41:02.200Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "336ec3119f2c1964b3d43ed23fba880ab4658b20", + "message": "[oracledatabase] add enum value `State::NOT_APPROVED_IN_PRIVATE_MARKETPLACE`", + "issues": [ + "6162" + ] + } + ], + "version": "0.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/oracledatabase", + "id": "a9a6b816-07a7-4e6e-aae8-b4802ccb76b3", + "createTime": "2025-03-19T07:41:02.181Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.2.1", + "language": "JAVASCRIPT", + "artifactName": "@google-ads/marketing-platform-admin", + "id": "cbc79976-2382-4553-a9be-a4512514c7ac", + "createTime": "2025-03-19T07:41:02.159Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "0.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/apihub", + "id": "8b7e24c3-d352-4b61-b802-ca7db73a9c18", + "createTime": "2025-03-19T07:41:02.138Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + }, + { + "type": "feat", + "sha": "cf561061ead8557fe41b6458ddf2778ced92b36d", + "message": "[merchantapi] Add AutomaticImprovements service", + "issues": [ + "6153" + ] + } + ], + "version": "2.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/accounts", + "id": "741baf4f-313c-43b8-8c90-40d1fc4c2823", + "createTime": "2025-03-19T07:41:02.118Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "99028ab3ca6487acf9df82e4d013ffa40d0aebf6", + "message": "[merchantapi] add an update method", + "issues": [ + "6163" + ] + } + ], + "version": "0.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/products", + "id": "d6d6361b-06e7-4615-a3ff-9e49df631b88", + "createTime": "2025-03-19T07:41:02.095Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + }, + { + "type": "feat", + "sha": "153866c5ec36b7c7740b77d6a1a18b89afccb9f8", + "message": "[merchantapi] Add a new destinations field", + "issues": [ + "6154" + ] + } + ], + "version": "0.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/datasources", + "id": "11bd13d1-6c0a-4f26-92ed-ec28d29e53ee", + "createTime": "2025-03-19T07:41:02.076Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.6.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/fleetengine", + "id": "fb8ac6d6-3056-4a3a-b055-7d80ae7a7df2", + "createTime": "2025-03-19T07:41:02.058Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + }, + { + "type": "feat", + "sha": "63b6187b833648213cff66adc29bebb6e3beb1e5", + "message": "[managedkafka] add Managed Kafka Connect API", + "issues": [ + "6176" + ] + } + ], + "version": "0.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/managedkafka", + "id": "d7475e8f-ce79-4592-9f48-e60d6bbfab8a", + "createTime": "2025-03-19T07:41:02.036Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.4.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/routeoptimization", + "id": "d31db27a-f4d8-4566-968f-6386d321163f", + "createTime": "2025-03-19T07:41:02.018Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.3.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/solar", + "id": "db756493-9d4f-4d6a-8eea-39b035314331", + "createTime": "2025-03-19T07:41:01.999Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.3.1", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/conversions", + "id": "fc38fe2e-b6cd-4d2e-8745-a298c0bde767", + "createTime": "2025-03-19T07:41:01.978Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "0.6.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/securitycentermanagement", + "id": "4999258d-67d9-45c9-9017-cc21ba4988e5", + "createTime": "2025-03-19T07:41:01.960Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "0.5.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/securesourcemanager", + "id": "62340794-2a71-4244-a4d2-728531e3f504", + "createTime": "2025-03-19T07:41:01.941Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "0.3.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/backupdr", + "id": "cc3b439a-1dcd-4246-98dc-eaf024ce580f", + "createTime": "2025-03-19T07:41:01.920Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.4.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/fleetengine-delivery", + "id": "7fb5320e-83bd-4fe3-983a-1ea38432468e", + "createTime": "2025-03-19T07:41:01.902Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "6f0340dc21027b6c66bcf77e8cb1cd30fc7d4ea3", + "message": "[storage] Add Anywhere cache control APIs", + "issues": [ + "6151" + ] + } + ], + "version": "0.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/storage-control", + "id": "a268c1cf-4cc7-4656-9a0b-e6cf3fb2a488", + "createTime": "2025-03-19T07:41:01.878Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "0.4.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/apphub", + "id": "b7829cee-d52a-4336-9a60-7d2c7e31bee0", + "createTime": "2025-03-19T07:41:01.857Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "0.15.0", + "language": "JAVASCRIPT", + "artifactName": "@google-apps/chat", + "id": "f02c5aeb-1cd0-4208-b08d-30521ad505f0", + "createTime": "2025-03-19T07:41:01.838Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "0.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-apps/meet", + "id": "b1ab4036-9ce7-4b9f-9f0a-ce0df97bfc43", + "createTime": "2025-03-19T07:41:01.820Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "0.5.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudcontrolspartner", + "id": "4022845a-a355-4845-a047-8eee4d3f275c", + "createTime": "2025-03-19T07:41:01.798Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "0.4.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/telcoautomation", + "id": "83e72fca-ce2a-4186-b4d2-fa0bc80149cb", + "createTime": "2025-03-19T07:41:01.780Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "0.6.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/servicehealth", + "id": "e3ef6320-aab2-4a6d-aa40-816901768d7b", + "createTime": "2025-03-19T07:41:01.761Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "2.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudquotas", + "id": "5ebfef9e-5f80-45ee-9d7d-fa07a94601fe", + "createTime": "2025-03-19T07:41:01.740Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "0.8.1", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/css", + "id": "f84fc6fa-04d7-43dc-87ad-5e6a64a51a22", + "createTime": "2025-03-19T07:41:01.721Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dlp", + "id": "194d3205-8ea9-49e3-a216-f3e78ee50c79", + "createTime": "2025-03-19T07:41:01.702Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/monitoring-dashboards", + "id": "45ef6688-9ad2-4e49-9a66-d844571580fa", + "createTime": "2025-03-19T07:41:01.678Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/routing", + "id": "1784d82f-9a81-47bf-b2f3-0c3c05206476", + "createTime": "2025-03-19T07:41:01.659Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/places", + "id": "c62859a0-ed33-4a7e-8ecd-1f7b257041d0", + "createTime": "2025-03-19T07:41:01.641Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "3.0.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/maps-platform-datasets", + "id": "fd39266b-7ef0-4eba-8bcc-4ff7db18b07c", + "createTime": "2025-03-19T07:41:01.619Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "3.0.1", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/addressvalidation", + "id": "782b1ec3-d1fa-49cd-b793-697170340aee", + "createTime": "2025-03-19T07:41:01.600Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/access-context-manager", + "id": "0c229fc0-862b-4005-86aa-b6e91ea41a71", + "createTime": "2025-03-19T07:41:01.582Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/iam-credentials", + "id": "00238bdb-fcf7-4517-8fa4-9c35c6679dc1", + "createTime": "2025-03-19T07:41:01.561Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/iam", + "id": "3d32cb08-d598-450a-9ddb-5309f7786e44", + "createTime": "2025-03-19T07:41:01.543Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f4866dfa6ab481163150f54928a9857d2dfef948", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6190" + ] + }, + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + }, + { + "type": "fix", + "sha": "f91a34f796895397c51e02f87197b601214d82f9", + "message": "Update dependency @google-cloud/grafeas to v6", + "issues": [ + "6172" + ], + "scope": "deps" + } + ], + "version": "6.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/containeranalysis", + "id": "a86bdb5e-c794-49b7-8e8c-5077ad1b5f6e", + "createTime": "2025-03-19T07:41:01.524Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "0.7.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudprofiler", + "id": "d74b9f3e-4757-407d-967e-6d1bda00ca71", + "createTime": "2025-03-19T07:41:01.503Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudbuild", + "id": "2b5a898c-011e-48c2-8720-f9657c5a6016", + "createTime": "2025-03-19T07:41:01.484Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/artifact-registry", + "id": "636fec0f-e85e-40f7-9818-2c0715231a6c", + "createTime": "2025-03-19T07:41:01.465Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataflow", + "id": "1274b9e1-8fc8-42e5-aa6e-cb775c88a91c", + "createTime": "2025-03-19T07:41:01.444Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "f20f4ab1-10b9-4261-9445-5ec80bbd5166", + "createTime": "2025-03-19T07:41:01.426Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/workstations", + "id": "6387c924-be44-441f-8eca-ba082be56153", + "createTime": "2025-03-19T07:41:01.407Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + }, + { + "type": "feat", + "sha": "9930467ade72fb91b7933b8fb343131009e40d84", + "message": "[workflows] add ListWorkflowRevisions method", + "issues": [ + "6165" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/workflows", + "id": "5a0575e2-deca-48ca-aa06-0a0534fa86fd", + "createTime": "2025-03-19T07:41:01.386Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/web-security-scanner", + "id": "5d249f1b-f882-468d-8bda-248d348996e3", + "createTime": "2025-03-19T07:41:01.367Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/web-risk", + "id": "7c313c54-eaba-45ae-b8db-37b47c854501", + "createTime": "2025-03-19T07:41:01.348Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/vpc-access", + "id": "cdad35db-92e2-4035-87b8-e181a9c58417", + "createTime": "2025-03-19T07:41:01.325Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/vmwareengine", + "id": "1c753e96-f3c9-469c-9b1e-4d54562f34ba", + "createTime": "2025-03-19T07:41:01.306Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/vmmigration", + "id": "a96a45a3-b7aa-461a-b967-c25f29dd7e25", + "createTime": "2025-03-19T07:41:01.287Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + }, + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + }, + { + "type": "fix", + "sha": "1135b8610b2471249dc3aec47eb0f985ded13f93", + "message": "Update dependency @google-cloud/promisify to v5", + "issues": [ + "6150" + ], + "scope": "deps" + } + ], + "version": "5.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/vision", + "id": "fdcacb82-bf87-4f75-aeaa-51ba36795c2c", + "createTime": "2025-03-19T07:41:01.268Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/video-intelligence", + "id": "26c3bc15-f92c-4ef1-9542-1bc208a5ca3b", + "createTime": "2025-03-19T07:41:01.246Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/video-transcoder", + "id": "d57c8a1e-0ba4-4c83-b05a-0f6d6e4324dc", + "createTime": "2025-03-19T07:41:01.227Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "3.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/video-stitcher", + "id": "8105f6fc-f2da-4d5a-ad02-d52543bbb172", + "createTime": "2025-03-19T07:41:01.209Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/livestream", + "id": "f4f18ed1-4cb8-40a0-9299-caa740aa6a5f", + "createTime": "2025-03-19T07:41:01.135Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "9.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/translate", + "id": "795fa0a3-edf6-4d8d-bad4-e2d21d57607d", + "createTime": "2025-03-19T07:41:01.100Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/tpu", + "id": "aad2772e-779d-4756-9f3a-2016a1119fad", + "createTime": "2025-03-19T07:41:01.081Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "0eab6d40a12aa7f387a4621c6611aa4cbc86e178", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6189" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/text-to-speech", + "id": "d0a3fbbc-b862-4dd6-b485-12ecb7a64685", + "createTime": "2025-03-19T07:41:01.062Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/tasks", + "id": "8ba38ba8-5313-447b-ae6d-87fa91a9e4eb", + "createTime": "2025-03-19T07:41:01.040Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "7.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/talent", + "id": "14513972-a81f-4751-9fbc-c05b8da8fe26", + "createTime": "2025-03-19T07:41:01.021Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/support", + "id": "086e54f5-7c67-4041-a0f8-db4c96d40cc6", + "createTime": "2025-03-19T07:41:01.001Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/storageinsights", + "id": "b83a31ce-4dd7-4b2b-a645-8785bac753c3", + "createTime": "2025-03-19T07:41:00.978Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "0.20.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/sql", + "id": "4845d6b1-3e24-4a18-8135-a06d4e6b6853", + "createTime": "2025-03-19T07:41:00.959Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + }, + { + "type": "fix", + "sha": "73110e21283ed2e54ae2ae721497a98caa9b8df0", + "message": "Update dependency proto3-json-serializer to v3", + "issues": [ + "6131" + ], + "scope": "deps" + } + ], + "version": "7.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/speech", + "id": "2616f763-ec41-49bd-bbf8-d9f2092068ea", + "createTime": "2025-03-19T07:41:00.941Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/shell", + "id": "19f5be8f-9b0e-469c-9242-745e0b5ca5ab", + "createTime": "2025-03-19T07:41:00.921Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/service-directory", + "id": "4e7351f5-dc61-42fd-b596-a2f7df4ea42e", + "createTime": "2025-03-19T07:41:00.903Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "9.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/security-center", + "id": "282d16d4-c696-4403-9695-11d2316df370", + "createTime": "2025-03-19T07:41:00.884Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/publicca", + "id": "c2d3e438-fadb-42c2-a880-32b93f685daa", + "createTime": "2025-03-19T07:41:00.863Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/security-private-ca", + "id": "b7713cf3-4e59-45e0-9e30-cfc59047749e", + "createTime": "2025-03-19T07:41:00.845Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/secret-manager", + "id": "cc6c1bc0-33f0-4e60-a53c-907b50fae170", + "createTime": "2025-03-19T07:41:00.827Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/scheduler", + "id": "3f4c468f-d1fe-451d-a4ca-c003779de9b5", + "createTime": "2025-03-19T07:41:00.806Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/run", + "id": "3b7fbdc6-f8ab-4b60-88ca-4d51863f4016", + "createTime": "2025-03-19T07:41:00.788Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/retail", + "id": "9b4b093d-26bb-458e-9af2-983afd697a78", + "createTime": "2025-03-19T07:41:00.769Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6188" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/resource-manager", + "id": "ea1b5052-94c3-4bbe-a398-5526957b82f1", + "createTime": "2025-03-19T07:41:00.749Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "3.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/network-security", + "id": "2e6bb84e-2891-4c32-b6c1-bf2bb5103d82", + "createTime": "2025-03-19T07:41:00.731Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/network-management", + "id": "d42bf15f-e46b-4d08-a92d-e7198125cb5a", + "createTime": "2025-03-19T07:41:00.713Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/network-connectivity", + "id": "ec579b2a-099e-4d3f-8dcd-73ff9d5eb0a4", + "createTime": "2025-03-19T07:41:00.693Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "0.10.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/netapp", + "id": "4de4f03e-7c97-4b42-bce9-54ec66402369", + "createTime": "2025-03-19T07:41:00.674Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/monitoring", + "id": "906aaf63-e7bc-44e2-b256-d1f2f5086504", + "createTime": "2025-03-19T07:41:00.656Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/migrationcenter", + "id": "34ab983f-261c-4253-b268-ee836fa43288", + "createTime": "2025-03-19T07:41:00.635Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataproc-metastore", + "id": "e76bb635-364c-4996-b55b-815537c502c6", + "createTime": "2025-03-19T07:41:00.596Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/memcache", + "id": "44948707-67c3-4090-afc2-49120bc0ac0f", + "createTime": "2025-03-19T07:41:00.555Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/media-translation", + "id": "d6e1f27c-d766-4364-9758-c6e57788e077", + "createTime": "2025-03-19T07:41:00.514Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/managed-identities", + "id": "220ecfb6-aa16-4019-ac74-436c5df5da6e", + "createTime": "2025-03-19T07:41:00.496Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/life-sciences", + "id": "1e678ea0-3ff7-4ab5-b4b6-bfcbd3ceaa35", + "createTime": "2025-03-19T07:41:00.478Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + }, + { + "type": "fix", + "sha": "24d9d0e4372c1bd2bbc4815bcc2fe60f74b93c71", + "message": "Update dependency mathjs to v14", + "issues": [ + "6130" + ], + "scope": "deps" + } + ], + "version": "7.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/language", + "id": "135de2ba-cf73-4419-97a8-f1ec2e27d906", + "createTime": "2025-03-19T07:41:00.458Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/kms-inventory", + "id": "05607969-fc25-4a5f-a51f-e747b8ed6e82", + "createTime": "2025-03-19T07:41:00.440Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/kms", + "id": "73b3dd00-b577-4f3e-85b7-e3e086261bca", + "createTime": "2025-03-19T07:41:00.422Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/iot", + "id": "e4517c7c-5465-4dd9-903d-6e9465cec9cc", + "createTime": "2025-03-19T07:41:00.402Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/ids", + "id": "ad013a09-8331-4bde-9a5c-ec5de66907a9", + "createTime": "2025-03-19T07:41:00.384Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/iap", + "id": "26adfaae-5231-45dd-a5b0-fc310d384892", + "createTime": "2025-03-19T07:41:00.366Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "dcfc7b492a2ac3fb86b93ae1375bac1c5153d049", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6186" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/gsuiteaddons", + "id": "545f8520-4f8b-4c90-a6fb-7cc1a7f3e4e9", + "createTime": "2025-03-19T07:41:00.346Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f0f3e3a7956143160cb36d8cba96e669c76e3c2e", + "message": "[documentai] Added config options to enable LLM layout parsing", + "issues": [ + "6180" + ] + } + ], + "version": "9.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/documentai", + "id": "d9de1c7e-f189-4d81-ad68-37c69f30c784", + "createTime": "2025-03-19T07:41:00.328Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + }, + { + "type": "fix", + "sha": "1135b8610b2471249dc3aec47eb0f985ded13f93", + "message": "Update dependency @google-cloud/promisify to v5", + "issues": [ + "6150" + ], + "scope": "deps" + } + ], + "version": "5.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dns", + "id": "8caa5440-4df6-4b3f-ac2f-09ec05692eb7", + "createTime": "2025-03-19T07:41:00.309Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/data-qna", + "id": "bf6b5d6e-a547-4e85-be5b-9a4f6e0bbbd9", + "createTime": "2025-03-19T07:41:00.289Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataproc", + "id": "1807bead-2416-41d7-a69d-2079f1206d52", + "createTime": "2025-03-19T07:41:00.271Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataplex", + "id": "250f34aa-7a6d-4aea-a105-6e211b09b777", + "createTime": "2025-03-19T07:41:00.252Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/datalabeling", + "id": "91328561-271d-4f05-a33e-09d710ce918e", + "createTime": "2025-03-19T07:41:00.231Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/data-fusion", + "id": "11079fd0-c4de-4142-ab3e-6cd0d53e2cdf", + "createTime": "2025-03-19T07:41:00.214Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataform", + "id": "f3606399-45aa-4301-bbe2-444675fcd7b4", + "createTime": "2025-03-19T07:41:00.196Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/lineage", + "id": "ef9ae14c-ba02-44a8-acfd-d267dd3e0e98", + "createTime": "2025-03-19T07:41:00.175Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + }, + { + "type": "feat", + "sha": "f79da88b29303a18c00e8081434af4859ad91225", + "message": "[datacatalog] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6156" + ] + } + ], + "version": "5.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/datacatalog", + "id": "59c4c76d-9f7e-44d5-a4c5-dedee3dca681", + "createTime": "2025-03-19T07:41:00.157Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/contentwarehouse", + "id": "b00d5b6a-9619-4a7e-a327-cfa95ac1d12d", + "createTime": "2025-03-19T07:41:00.139Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/contact-center-insights", + "id": "77010d51-da10-49f0-9f75-267517bafd58", + "createTime": "2025-03-19T07:41:00.119Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "0.4.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/connectors", + "id": "372e05d0-de95-41a9-9264-c81d81e41025", + "createTime": "2025-03-19T07:41:00.101Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "0.8.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/config", + "id": "dec655d8-3f66-4c56-95d1-279a7e7544bf", + "createTime": "2025-03-19T07:41:00.083Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/confidentialcomputing", + "id": "03c972cc-7ef6-4aed-9811-6f895d9d3d05", + "createTime": "2025-03-19T07:41:00.062Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + }, + { + "type": "feat", + "sha": "2be675d236ff0fa1bdf634f6959b1f260d66f77c", + "message": "[compute] Update Compute Engine API to revision 20250302 (#995)", + "issues": [ + "6178" + ] + }, + { + "type": "feat", + "sha": "dfab9f0902564fee15fdcff914851ebab07c4c9d", + "message": "[compute] Update Compute Engine API to revision 20250302 (#987)", + "issues": [ + "6155" + ] + } + ], + "version": "5.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/compute", + "id": "d6f84d5f-2379-43ba-855a-0e0f1c64c4a6", + "createTime": "2025-03-19T07:41:00.044Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "0.6.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/procurement", + "id": "54436aac-a866-45de-9e17-9aa349d9d795", + "createTime": "2025-03-19T07:41:00.026Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dms", + "id": "cc5d7b4a-c0b6-4635-b093-a9f3a6feab3d", + "createTime": "2025-03-19T07:41:00.005Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/channel", + "id": "2c78e728-2a9f-4503-bc45-ce9e95647a9d", + "createTime": "2025-03-19T07:40:59.987Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/certificate-manager", + "id": "774f68f4-aceb-44ae-9fb9-18102ad31c89", + "createTime": "2025-03-19T07:40:59.969Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/binary-authorization", + "id": "4d5334d1-22b9-43ab-a101-cf1de0866e0e", + "createTime": "2025-03-19T07:40:59.948Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + }, + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "6.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/billing-budgets", + "id": "de066cef-b384-4019-b30b-0647414d369c", + "createTime": "2025-03-19T07:40:59.930Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6184" + ] + }, + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/billing", + "id": "868fdb09-ef62-4844-b765-e08c3f0590a7", + "createTime": "2025-03-19T07:40:59.912Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-reservation", + "id": "7f1454d8-19fb-4454-bb54-e46a8b651842", + "createTime": "2025-03-19T07:40:59.891Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-migration", + "id": "3fc28395-385d-47ee-b100-1e5d6a6ab519", + "createTime": "2025-03-19T07:40:59.874Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-data-transfer", + "id": "1fb41f82-c910-4239-9dd8-4536e9e2ed92", + "createTime": "2025-03-19T07:40:59.856Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-datapolicies", + "id": "3c1052cc-c64e-405b-98ce-5e0b2666255c", + "createTime": "2025-03-19T07:40:59.835Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-data-exchange", + "id": "85137e53-2516-484e-973d-178f4e41b8c1", + "createTime": "2025-03-19T07:40:59.813Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "4.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-connection", + "id": "c23b2119-ff33-487b-9f37-f23f49983005", + "createTime": "2025-03-19T07:40:59.795Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-analyticshub", + "id": "aa0e3474-e441-46f8-97eb-8f3404da4afa", + "createTime": "2025-03-19T07:40:59.777Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/clientgateways", + "id": "2b007062-ef89-406f-a3b3-1bbd19f6ff28", + "createTime": "2025-03-19T07:40:59.754Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "3.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/clientconnectorservices", + "id": "843d59f7-101a-4fac-8c21-b4b53364df6a", + "createTime": "2025-03-19T07:40:59.736Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/appgateways", + "id": "2447608e-b026-4e76-9aa2-669d20cd7fbe", + "createTime": "2025-03-19T07:40:59.718Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/appconnectors", + "id": "22063ec1-99cd-4c64-a4e4-d2b140a8e4fe", + "createTime": "2025-03-19T07:40:59.641Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/appconnections", + "id": "3a12d6a8-dece-41cb-a64e-5ab32c0079c6", + "createTime": "2025-03-19T07:40:59.602Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/batch", + "id": "dd3e624d-ea1e-48a9-bc67-8a4982817cdb", + "createTime": "2025-03-19T07:40:59.585Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "2.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bare-metal-solution", + "id": "85cd21ee-6bae-40e8-96f7-f05d2253e8a9", + "createTime": "2025-03-19T07:40:59.567Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + }, + { + "type": "fix", + "sha": "24d9d0e4372c1bd2bbc4815bcc2fe60f74b93c71", + "message": "Update dependency mathjs to v14", + "issues": [ + "6130" + ], + "scope": "deps" + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/automl", + "id": "21e29d03-57eb-40bb-88af-eebea28f6151", + "createTime": "2025-03-19T07:40:59.546Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + } + ], + "version": "5.0.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/assured-workloads", + "id": "41bedff3-7815-46f3-95ec-f16a1e9accf7", + "createTime": "2025-03-19T07:40:59.529Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f91c71f71c7a08ac17a15b7bb2233cbc041ee69b", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6183" + ] + }, + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + }, + { + "type": "fix", + "sha": "b3b30b8483e222116f488ed313c02901601b75f3", + "message": "Update dependency @google-cloud/compute to v5", + "issues": [ + "6171" + ], + "scope": "deps" + } + ], + "version": "6.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/asset", + "id": "19f39085-54c9-44af-bc27-19ff67e7aa15", + "createTime": "2025-03-19T07:40:59.511Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "2.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/apigee-registry", + "id": "1a5391f2-3847-422d-bf2a-fec0ac184350", + "createTime": "2025-03-19T07:40:59.491Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/apigee-connect", + "id": "bb5d390b-6bda-45fe-a44a-f19e4db32361", + "createTime": "2025-03-19T07:40:59.473Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/api-gateway", + "id": "bf93dc78-d7ea-43d9-8cbf-281f414fac97", + "createTime": "2025-03-19T07:40:59.456Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + }, + { + "type": "feat", + "sha": "4569e91b5f4c888cd52dd795dbe27cddf0801f51", + "message": "[alloydb] A new method `ExportCluster` is added to service `AlloyDBAdmin`", + "issues": [ + "6170" + ] + } + ], + "version": "2.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/alloydb", + "id": "4b069a2e-be13-4bae-9f85-4efc2b14a7e0", + "createTime": "2025-03-19T07:40:59.436Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "c9b84093-36f4-4f02-8ecc-3faffadf60e0", + "createTime": "2025-03-19T07:40:59.417Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "2.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/advisorynotifications", + "id": "087354ec-bf0a-4869-879c-976886246375", + "createTime": "2025-03-19T07:40:59.398Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/access-approval", + "id": "d5f36c67-2c46-455b-943e-e8a011f809ff", + "createTime": "2025-03-19T07:40:59.377Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google/area120-tables", + "id": "084e3237-5269-4677-b102-c22ab80276fd", + "createTime": "2025-03-19T07:40:59.359Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/appengine-admin", + "id": "21fea7c0-a80a-44c6-ab09-493756449074", + "createTime": "2025-03-19T07:40:59.341Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/service-usage", + "id": "0609cf27-7582-4c00-afb1-6c2dcbd0afa7", + "createTime": "2025-03-19T07:40:59.320Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "3.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/service-management", + "id": "c57c7159-a870-4314-b014-465307c0830c", + "createTime": "2025-03-19T07:40:59.302Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/service-control", + "id": "c9ce7620-227b-48a0-be6b-15ee6f9d122c", + "createTime": "2025-03-19T07:40:59.285Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "2.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/apikeys", + "id": "17867f3e-2c75-4792-a086-cff63199bb46", + "createTime": "2025-03-19T07:40:59.267Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "5.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-analytics/data", + "id": "0a56c965-61a3-4843-bb85-74018abb237a", + "createTime": "2025-03-19T07:40:59.245Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "8.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-analytics/admin", + "id": "c0cd1f84-1328-416d-a6d6-620fa571ce21", + "createTime": "2025-03-19T07:40:59.227Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c41ff0729b65a1207978b4029d6369cc0552e0bf", + "message": "[Many APIs] await/catch promises, and update listOperationsAsync return type", + "issues": [ + "6182" + ] + } + ], + "version": "3.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ai/generativelanguage", + "id": "a3482708-9d21-4800-b0d1-6cef8872a939", + "createTime": "2025-03-19T07:40:59.208Z" + }, { "changes": [ { @@ -46084,5 +48767,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2025-03-18T00:08:47.591Z" + "updateTime": "2025-03-19T07:41:02.263Z" } \ No newline at end of file diff --git a/packages/google-ads-admanager/CHANGELOG.md b/packages/google-ads-admanager/CHANGELOG.md index b3dc59b5144..6de1e53a9a7 100644 --- a/packages/google-ads-admanager/CHANGELOG.md +++ b/packages/google-ads-admanager/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/admanager-v0.2.0...admanager-v0.3.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/admanager-v0.1.1...admanager-v0.2.0) (2025-03-18) diff --git a/packages/google-ads-admanager/package.json b/packages/google-ads-admanager/package.json index 34b845896e8..8668847ae83 100644 --- a/packages/google-ads-admanager/package.json +++ b/packages/google-ads-admanager/package.json @@ -1,6 +1,6 @@ { "name": "@google-ads/admanager", - "version": "0.2.0", + "version": "0.3.0", "description": "Google Ad Manager API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json b/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json index 6476f8d525d..9ffb274cdc5 100644 --- a/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json +++ b/packages/google-ads-admanager/samples/generated/v1/snippet_metadata_google.ads.admanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admanager", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ads-admanager/samples/package.json b/packages/google-ads-admanager/samples/package.json index 29cc0568a1b..cbd41706c17 100644 --- a/packages/google-ads-admanager/samples/package.json +++ b/packages/google-ads-admanager/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-ads/admanager": "^0.2.0" + "@google-ads/admanager": "^0.3.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-ai-generativelanguage/CHANGELOG.md b/packages/google-ai-generativelanguage/CHANGELOG.md index dbdd16d50aa..a07ce92ba31 100644 --- a/packages/google-ai-generativelanguage/CHANGELOG.md +++ b/packages/google-ai-generativelanguage/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.1.0](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v3.0.0...generativelanguage-v3.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v2.9.1...generativelanguage-v3.0.0) (2025-03-18) diff --git a/packages/google-ai-generativelanguage/package.json b/packages/google-ai-generativelanguage/package.json index b9f91f321c5..bc6ace8e2fb 100644 --- a/packages/google-ai-generativelanguage/package.json +++ b/packages/google-ai-generativelanguage/package.json @@ -1,6 +1,6 @@ { "name": "@google-ai/generativelanguage", - "version": "3.0.0", + "version": "3.1.0", "description": "Generative Language API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json b/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json index 8de723f1f23..c4507f36663 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json b/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json index fc058c515ce..068ba3400ff 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1alpha/snippet_metadata_google.ai.generativelanguage.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json index 91c24746e83..acc7394d209 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json index 1cf1fd1728b..409521543d2 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json index 1cf1fd1728b..409521543d2 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json b/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json index a0ed4f7de16..c0ab8a145c8 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/package.json b/packages/google-ai-generativelanguage/samples/package.json index b9e963066db..d3e1137f115 100644 --- a/packages/google-ai-generativelanguage/samples/package.json +++ b/packages/google-ai-generativelanguage/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-ai/generativelanguage": "^3.0.0" + "@google-ai/generativelanguage": "^3.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-analytics-admin/CHANGELOG.md b/packages/google-analytics-admin/CHANGELOG.md index 22361080af2..2c9bbfcd8bb 100644 --- a/packages/google-analytics-admin/CHANGELOG.md +++ b/packages/google-analytics-admin/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [8.1.0](https://github.com/googleapis/google-cloud-node/compare/admin-v8.0.0...admin-v8.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [8.0.0](https://github.com/googleapis/google-cloud-node/compare/admin-v7.6.0...admin-v8.0.0) (2025-03-18) diff --git a/packages/google-analytics-admin/package.json b/packages/google-analytics-admin/package.json index 2f46a6d23af..a47f412f09a 100644 --- a/packages/google-analytics-admin/package.json +++ b/packages/google-analytics-admin/package.json @@ -1,6 +1,6 @@ { "name": "@google-analytics/admin", - "version": "8.0.0", + "version": "8.1.0", "description": "Admin client for Node.js", "repository": { "type": "git", diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json index 39c3a8581ef..6ee7291940b 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "8.0.0", + "version": "8.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json index c47c3008586..993da64cee2 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata_google.analytics.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "8.0.0", + "version": "8.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json index 611c6fdce9a..f49b77ef0f2 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "8.0.0", + "version": "8.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json index fe95bd196c3..ce356ea494f 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata_google.analytics.admin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "8.0.0", + "version": "8.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/package.json b/packages/google-analytics-admin/samples/package.json index ce55259700a..63f9415599c 100644 --- a/packages/google-analytics-admin/samples/package.json +++ b/packages/google-analytics-admin/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-analytics/admin": "^8.0.0", + "@google-analytics/admin": "^8.1.0", "google-auth-library": "^9.0.0", "google-gax": "^3.0.0", "http": "0.0.1-security", diff --git a/packages/google-analytics-data/CHANGELOG.md b/packages/google-analytics-data/CHANGELOG.md index f21dd3de694..b8ef6b1643a 100644 --- a/packages/google-analytics-data/CHANGELOG.md +++ b/packages/google-analytics-data/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.1.0](https://github.com/googleapis/google-cloud-node/compare/data-v5.0.0...data-v5.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.12.1...data-v5.0.0) (2025-03-18) diff --git a/packages/google-analytics-data/package.json b/packages/google-analytics-data/package.json index 85865ba62a1..5f602f922a6 100644 --- a/packages/google-analytics-data/package.json +++ b/packages/google-analytics-data/package.json @@ -1,6 +1,6 @@ { "name": "@google-analytics/data", - "version": "5.0.0", + "version": "5.1.0", "description": "Data client for Node.js", "repository": { "type": "git", diff --git a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json index 7a8ca36ff6c..f35f47c6cc4 100644 --- a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json +++ b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata.google.analytics.data.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json index cd9aa33284a..3e8acc3fd71 100644 --- a/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json +++ b/packages/google-analytics-data/samples/generated/v1alpha/snippet_metadata_google.analytics.data.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json index 9ff9402b78b..7ade8a89c62 100644 --- a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json +++ b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata.google.analytics.data.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json index 7ccb4eff9f6..adc6d651b1b 100644 --- a/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json +++ b/packages/google-analytics-data/samples/generated/v1beta/snippet_metadata_google.analytics.data.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-data", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-data/samples/package.json b/packages/google-analytics-data/samples/package.json index 2a4369989c6..c9fe699cc9e 100644 --- a/packages/google-analytics-data/samples/package.json +++ b/packages/google-analytics-data/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-analytics/data": "^5.0.0", + "@google-analytics/data": "^5.1.0", "google-auth-library": "^9.0.0", "google-gax": "^3.0.0", "http": "^0.0.1-security", diff --git a/packages/google-api-apikeys/CHANGELOG.md b/packages/google-api-apikeys/CHANGELOG.md index 483f8813cdc..6b26356d693 100644 --- a/packages/google-api-apikeys/CHANGELOG.md +++ b/packages/google-api-apikeys/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/apikeys-v2.0.0...apikeys-v2.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/apikeys-v1.3.1...apikeys-v2.0.0) (2025-03-18) diff --git a/packages/google-api-apikeys/package.json b/packages/google-api-apikeys/package.json index f3692027f1b..b8e1e57028c 100644 --- a/packages/google-api-apikeys/package.json +++ b/packages/google-api-apikeys/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apikeys", - "version": "2.0.0", + "version": "2.1.0", "description": "API Keys API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json index 5044faa8867..2a7466e3152 100644 --- a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json +++ b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata.google.api.apikeys.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apikeys", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json index 5044faa8867..2a7466e3152 100644 --- a/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json +++ b/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apikeys", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-apikeys/samples/package.json b/packages/google-api-apikeys/samples/package.json index ab84423776a..cdb1bb48e5b 100644 --- a/packages/google-api-apikeys/samples/package.json +++ b/packages/google-api-apikeys/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/apikeys": "^2.0.0" + "@google-cloud/apikeys": "^2.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-api-cloudquotas/CHANGELOG.md b/packages/google-api-cloudquotas/CHANGELOG.md index 3aed331b62a..984d9456422 100644 --- a/packages/google-api-cloudquotas/CHANGELOG.md +++ b/packages/google-api-cloudquotas/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/cloudquotas-v2.0.0...cloudquotas-v2.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/cloudquotas-v1.0.0...cloudquotas-v2.0.0) (2025-03-18) diff --git a/packages/google-api-cloudquotas/package.json b/packages/google-api-cloudquotas/package.json index 71a5bd3440e..052802737c3 100644 --- a/packages/google-api-cloudquotas/package.json +++ b/packages/google-api-cloudquotas/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloudquotas", - "version": "2.0.0", + "version": "2.1.0", "description": "Cloud Quotas API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json b/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json index 492f643146d..5d29f11c624 100644 --- a/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json +++ b/packages/google-api-cloudquotas/samples/generated/v1/snippet_metadata_google.api.cloudquotas.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudquotas", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json b/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json index 37ec5763da9..1c4e5695e84 100644 --- a/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json +++ b/packages/google-api-cloudquotas/samples/generated/v1beta/snippet_metadata_google.api.cloudquotas.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudquotas", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-cloudquotas/samples/package.json b/packages/google-api-cloudquotas/samples/package.json index c8aefcad21c..763f0da5da9 100644 --- a/packages/google-api-cloudquotas/samples/package.json +++ b/packages/google-api-cloudquotas/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/cloudquotas": "^2.0.0" + "@google-cloud/cloudquotas": "^2.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-api-servicecontrol/CHANGELOG.md b/packages/google-api-servicecontrol/CHANGELOG.md index 71596634b6d..4cfa27a6a46 100644 --- a/packages/google-api-servicecontrol/CHANGELOG.md +++ b/packages/google-api-servicecontrol/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/service-control-v4.0.0...service-control-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/service-control-v3.4.0...service-control-v4.0.0) (2025-03-18) diff --git a/packages/google-api-servicecontrol/package.json b/packages/google-api-servicecontrol/package.json index 821a7dd62c7..02d0d06db70 100644 --- a/packages/google-api-servicecontrol/package.json +++ b/packages/google-api-servicecontrol/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-control", - "version": "4.0.0", + "version": "4.1.0", "description": "Service control client for Node.js", "repository": { "type": "git", diff --git a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json index 278bfb5adab..a0dc63feda9 100644 --- a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json +++ b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json index 278bfb5adab..a0dc63feda9 100644 --- a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json +++ b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata_google.api.servicecontrol.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json index fd3652eb858..669771c4b0d 100644 --- a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json +++ b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json index fd3652eb858..669771c4b0d 100644 --- a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json +++ b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata_google.api.servicecontrol.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/package.json b/packages/google-api-servicecontrol/samples/package.json index 52c706b4e4e..c4bd80c8227 100644 --- a/packages/google-api-servicecontrol/samples/package.json +++ b/packages/google-api-servicecontrol/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-control": "^4.0.0" + "@google-cloud/service-control": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-api-servicemanagement/CHANGELOG.md b/packages/google-api-servicemanagement/CHANGELOG.md index 13ce0443ba1..3eb4d9c4d8f 100644 --- a/packages/google-api-servicemanagement/CHANGELOG.md +++ b/packages/google-api-servicemanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.1.0](https://github.com/googleapis/google-cloud-node/compare/service-management-v3.0.0...service-management-v3.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/service-management-v2.3.1...service-management-v3.0.0) (2025-03-18) diff --git a/packages/google-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index 9c606add6ae..3ae9ce4ff18 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-management", - "version": "3.0.0", + "version": "3.1.0", "description": "Service management client for Node.js", "repository": { "type": "git", diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json index 536c9e5e692..671667e1ead 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata.google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json index 536c9e5e692..671667e1ead 100644 --- a/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json +++ b/packages/google-api-servicemanagement/samples/generated/v1/snippet_metadata_google.api.servicemanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicemanagement", - "version": "3.0.0", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicemanagement/samples/package.json b/packages/google-api-servicemanagement/samples/package.json index 5a004940b87..21e4beb054d 100644 --- a/packages/google-api-servicemanagement/samples/package.json +++ b/packages/google-api-servicemanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-management": "^3.0.0" + "@google-cloud/service-management": "^3.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-api-serviceusage/CHANGELOG.md b/packages/google-api-serviceusage/CHANGELOG.md index df540f06712..52997493f0b 100644 --- a/packages/google-api-serviceusage/CHANGELOG.md +++ b/packages/google-api-serviceusage/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/service-usage-v4.0.0...service-usage-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/service-usage-v3.4.1...service-usage-v4.0.0) (2025-03-18) diff --git a/packages/google-api-serviceusage/package.json b/packages/google-api-serviceusage/package.json index 7ed5772faee..dd05095f38e 100644 --- a/packages/google-api-serviceusage/package.json +++ b/packages/google-api-serviceusage/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-usage", - "version": "4.0.0", + "version": "4.1.0", "description": "Serviceusage client for Node.js", "repository": { "type": "git", 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 c5773c522e9..5e85de79f40 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { 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 c5773c522e9..5e85de79f40 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { 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 7d623f54ed7..3de726d3e62 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { 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 3122de4d4d1..2cf4c342d5b 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-serviceusage", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-serviceusage/samples/package.json b/packages/google-api-serviceusage/samples/package.json index 9feb8542280..3d594806e1d 100644 --- a/packages/google-api-serviceusage/samples/package.json +++ b/packages/google-api-serviceusage/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-usage": "^4.0.0" + "@google-cloud/service-usage": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-appengine/CHANGELOG.md b/packages/google-appengine/CHANGELOG.md index 3ee102a12bc..8a75b312599 100644 --- a/packages/google-appengine/CHANGELOG.md +++ b/packages/google-appengine/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/appengine-admin-v4.0.0...appengine-admin-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/appengine-admin-v3.3.0...appengine-admin-v4.0.0) (2025-03-18) diff --git a/packages/google-appengine/package.json b/packages/google-appengine/package.json index 71009b405f0..a8fe7635984 100644 --- a/packages/google-appengine/package.json +++ b/packages/google-appengine/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/appengine-admin", - "version": "4.0.0", + "version": "4.1.0", "description": "Appengine client for Node.js", "repository": { "type": "git", 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 c32a43cb9cd..b0b939b8d63 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appengine", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { 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 c32a43cb9cd..b0b939b8d63 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appengine", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-appengine/samples/package.json b/packages/google-appengine/samples/package.json index 41085b84cde..be290ab6de9 100644 --- a/packages/google-appengine/samples/package.json +++ b/packages/google-appengine/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/appengine-admin": "^4.0.0" + "@google-cloud/appengine-admin": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-apps-meet/CHANGELOG.md b/packages/google-apps-meet/CHANGELOG.md index 6a0cd315c65..afc8df17a5d 100644 --- a/packages/google-apps-meet/CHANGELOG.md +++ b/packages/google-apps-meet/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/meet-v0.5.0...meet-v0.6.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/meet-v0.4.0...meet-v0.5.0) (2025-03-18) diff --git a/packages/google-apps-meet/package.json b/packages/google-apps-meet/package.json index 16e0f22857a..57b50e8802d 100644 --- a/packages/google-apps-meet/package.json +++ b/packages/google-apps-meet/package.json @@ -1,6 +1,6 @@ { "name": "@google-apps/meet", - "version": "0.5.0", + "version": "0.6.0", "description": "Google Meet API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json b/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json index 1483f180638..203ae017ba0 100644 --- a/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json +++ b/packages/google-apps-meet/samples/generated/v2/snippet_metadata_google.apps.meet.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-meet", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json b/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json index b1cc156ebff..751bd9d1811 100644 --- a/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json +++ b/packages/google-apps-meet/samples/generated/v2beta/snippet_metadata_google.apps.meet.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-meet", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-apps-meet/samples/package.json b/packages/google-apps-meet/samples/package.json index 4a8f3fc1b73..1f3505fe4e7 100644 --- a/packages/google-apps-meet/samples/package.json +++ b/packages/google-apps-meet/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-apps/meet": "^0.5.0" + "@google-apps/meet": "^0.6.0" }, "devDependencies": { "c8": "^8.0.0", diff --git a/packages/google-area120-tables/CHANGELOG.md b/packages/google-area120-tables/CHANGELOG.md index 2ec0c4fc064..1fcf97443ee 100644 --- a/packages/google-area120-tables/CHANGELOG.md +++ b/packages/google-area120-tables/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/area120-tables-v4.0.0...area120-tables-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/area120-tables-v3.3.0...area120-tables-v4.0.0) (2025-03-18) diff --git a/packages/google-area120-tables/package.json b/packages/google-area120-tables/package.json index 4e248bbe3ac..f39ced3163b 100644 --- a/packages/google-area120-tables/package.json +++ b/packages/google-area120-tables/package.json @@ -1,6 +1,6 @@ { "name": "@google/area120-tables", - "version": "4.0.0", + "version": "4.1.0", "description": "Tables client for Node.js", "repository": { "type": "git", diff --git a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json index 4d2b1e3d129..634043b3dad 100644 --- a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json +++ b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata.google.area120.tables.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tables", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json index 4d2b1e3d129..634043b3dad 100644 --- a/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json +++ b/packages/google-area120-tables/samples/generated/v1alpha1/snippet_metadata_google.area120.tables.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tables", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-area120-tables/samples/package.json b/packages/google-area120-tables/samples/package.json index 5c2785ba9d2..318fb4cb969 100644 --- a/packages/google-area120-tables/samples/package.json +++ b/packages/google-area120-tables/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google/area120-tables": "^4.0.0", + "@google/area120-tables": "^4.1.0", "google-auth-library": "^9.0.0", "google-gax": "^3.0.0", "open": "^8.4.0", diff --git a/packages/google-chat/CHANGELOG.md b/packages/google-chat/CHANGELOG.md index b1eaa67a79e..6b1ce026ccf 100644 --- a/packages/google-chat/CHANGELOG.md +++ b/packages/google-chat/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.15.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.14.0...chat-v0.15.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [0.14.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.13.0...chat-v0.14.0) (2025-03-18) diff --git a/packages/google-chat/package.json b/packages/google-chat/package.json index ca9ce3abce4..2f0f7dedc54 100644 --- a/packages/google-chat/package.json +++ b/packages/google-chat/package.json @@ -1,6 +1,6 @@ { "name": "@google-apps/chat", - "version": "0.14.0", + "version": "0.15.0", "description": "Google Chat API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json index 46c51924d1c..dce866d648a 100644 --- a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json +++ b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-chat", - "version": "0.14.0", + "version": "0.15.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-chat/samples/package.json b/packages/google-chat/samples/package.json index 09898cfa1b0..67a66eeb7cf 100644 --- a/packages/google-chat/samples/package.json +++ b/packages/google-chat/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-apps/chat": "^0.14.0" + "@google-apps/chat": "^0.15.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-accessapproval/CHANGELOG.md b/packages/google-cloud-accessapproval/CHANGELOG.md index 22a6b60f3e7..03eaec23e3a 100644 --- a/packages/google-cloud-accessapproval/CHANGELOG.md +++ b/packages/google-cloud-accessapproval/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/access-approval-v4.0.0...access-approval-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/access-approval-v3.3.0...access-approval-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-accessapproval/package.json b/packages/google-cloud-accessapproval/package.json index 482fdaaf65f..ec00ccc0616 100644 --- a/packages/google-cloud-accessapproval/package.json +++ b/packages/google-cloud-accessapproval/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/access-approval", - "version": "4.0.0", + "version": "4.1.0", "description": "Accessapproval client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json index b9714c6b9f1..8249c57e1f5 100644 --- a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json +++ b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata.google.cloud.accessapproval.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accessapproval", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json index b9714c6b9f1..8249c57e1f5 100644 --- a/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json +++ b/packages/google-cloud-accessapproval/samples/generated/v1/snippet_metadata_google.cloud.accessapproval.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accessapproval", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-accessapproval/samples/package.json b/packages/google-cloud-accessapproval/samples/package.json index 804927813ae..fb0eb267d5b 100644 --- a/packages/google-cloud-accessapproval/samples/package.json +++ b/packages/google-cloud-accessapproval/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/access-approval": "^4.0.0" + "@google-cloud/access-approval": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-advisorynotifications/CHANGELOG.md b/packages/google-cloud-advisorynotifications/CHANGELOG.md index ac3df28bd42..c105979d4ae 100644 --- a/packages/google-cloud-advisorynotifications/CHANGELOG.md +++ b/packages/google-cloud-advisorynotifications/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/advisorynotifications-v2.0.0...advisorynotifications-v2.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/advisorynotifications-v1.4.0...advisorynotifications-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-advisorynotifications/package.json b/packages/google-cloud-advisorynotifications/package.json index 582d1afec8a..03bd1ebc65e 100644 --- a/packages/google-cloud-advisorynotifications/package.json +++ b/packages/google-cloud-advisorynotifications/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/advisorynotifications", - "version": "2.0.0", + "version": "2.1.0", "description": "Advisory Notifications API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json index cdde39755e0..4875094260e 100644 --- a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata.google.cloud.advisorynotifications.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-advisorynotifications", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json index 0038818dfc6..f24df6ca2de 100644 --- a/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json +++ b/packages/google-cloud-advisorynotifications/samples/generated/v1/snippet_metadata_google.cloud.advisorynotifications.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-advisorynotifications", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-advisorynotifications/samples/package.json b/packages/google-cloud-advisorynotifications/samples/package.json index 5421a2c7c6d..d62a7dc5986 100644 --- a/packages/google-cloud-advisorynotifications/samples/package.json +++ b/packages/google-cloud-advisorynotifications/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/advisorynotifications": "^2.0.0" + "@google-cloud/advisorynotifications": "^2.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index 35f66b56b2c..b409e5831a8 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v4.0.0...aiplatform-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v3.35.0...aiplatform-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index 5fa0a1b0288..264acf2fb59 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "4.0.0", + "version": "4.1.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index 239f99f4f35..e1f2950e8b6 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json index 074f45f82f0..4f3b1435746 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index f746bf2568e..9be347ab6d3 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json index 012add4537d..6ebcc3eec08 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index c9c07cc49da..7e927d0b8d6 100644 --- a/packages/google-cloud-aiplatform/samples/package.json +++ b/packages/google-cloud-aiplatform/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 1200000 test/*.js" }, "dependencies": { - "@google-cloud/aiplatform": "^4.0.0" + "@google-cloud/aiplatform": "^4.1.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-alloydb/CHANGELOG.md b/packages/google-cloud-alloydb/CHANGELOG.md index 967a7d8efd4..a1af69d03cd 100644 --- a/packages/google-cloud-alloydb/CHANGELOG.md +++ b/packages/google-cloud-alloydb/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/alloydb-v2.0.0...alloydb-v2.1.0) (2025-03-19) + + +### Features + +* [alloydb] A new method `ExportCluster` is added to service `AlloyDBAdmin` ([#6170](https://github.com/googleapis/google-cloud-node/issues/6170)) ([4569e91](https://github.com/googleapis/google-cloud-node/commit/4569e91b5f4c888cd52dd795dbe27cddf0801f51)) +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/alloydb-v1.10.2...alloydb-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-alloydb/package.json b/packages/google-cloud-alloydb/package.json index 17ad58cec22..0eb0fe563e5 100644 --- a/packages/google-cloud-alloydb/package.json +++ b/packages/google-cloud-alloydb/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/alloydb", - "version": "2.0.0", + "version": "2.1.0", "description": "AlloyDB API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json index 3a159333fe0..f5d0936332a 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json +++ b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata.google.cloud.alloydb.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json index f1d8ffc7081..36eb1b3ea40 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json +++ b/packages/google-cloud-alloydb/samples/generated/v1/snippet_metadata_google.cloud.alloydb.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json index bf1abd7e6e7..de0ea42a74e 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json +++ b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata.google.cloud.alloydb.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json index 318e94d07a8..be958b1fbf4 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json +++ b/packages/google-cloud-alloydb/samples/generated/v1alpha/snippet_metadata_google.cloud.alloydb.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json index 17330f28de7..fc099e3f0fe 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json +++ b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata.google.cloud.alloydb.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json index c12e8fd22cb..30f31c280b6 100644 --- a/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json +++ b/packages/google-cloud-alloydb/samples/generated/v1beta/snippet_metadata_google.cloud.alloydb.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-alloydb", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-alloydb/samples/package.json b/packages/google-cloud-alloydb/samples/package.json index d31639f7f8c..34191cdb4b6 100644 --- a/packages/google-cloud-alloydb/samples/package.json +++ b/packages/google-cloud-alloydb/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/alloydb": "^2.0.0" + "@google-cloud/alloydb": "^2.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-apigateway/CHANGELOG.md b/packages/google-cloud-apigateway/CHANGELOG.md index 13e13aaaf8d..515c93c233b 100644 --- a/packages/google-cloud-apigateway/CHANGELOG.md +++ b/packages/google-cloud-apigateway/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/api-gateway-v4.0.0...api-gateway-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/api-gateway-v3.3.0...api-gateway-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-apigateway/package.json b/packages/google-cloud-apigateway/package.json index 490c2590db5..1db890440f0 100644 --- a/packages/google-cloud-apigateway/package.json +++ b/packages/google-cloud-apigateway/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/api-gateway", - "version": "4.0.0", + "version": "4.1.0", "description": "Apigateway client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json index af791b74f9f..f77abfb79e9 100644 --- a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json +++ b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata.google.cloud.apigateway.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigateway", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json index af791b74f9f..f77abfb79e9 100644 --- a/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json +++ b/packages/google-cloud-apigateway/samples/generated/v1/snippet_metadata_google.cloud.apigateway.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigateway", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigateway/samples/package.json b/packages/google-cloud-apigateway/samples/package.json index 631116eb9ac..aefcee2bfd7 100644 --- a/packages/google-cloud-apigateway/samples/package.json +++ b/packages/google-cloud-apigateway/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/api-gateway": "^4.0.0" + "@google-cloud/api-gateway": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-apigeeconnect/CHANGELOG.md b/packages/google-cloud-apigeeconnect/CHANGELOG.md index c3182ae277f..f73190e8a81 100644 --- a/packages/google-cloud-apigeeconnect/CHANGELOG.md +++ b/packages/google-cloud-apigeeconnect/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/apigee-connect-v4.0.0...apigee-connect-v4.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/apigee-connect-v3.3.0...apigee-connect-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-apigeeconnect/package.json b/packages/google-cloud-apigeeconnect/package.json index b9fd5c1aee6..0726d94f688 100644 --- a/packages/google-cloud-apigeeconnect/package.json +++ b/packages/google-cloud-apigeeconnect/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apigee-connect", - "version": "4.0.0", + "version": "4.1.0", "description": "apigeeconnect client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json index bacdbbfd086..f645809a436 100644 --- a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json +++ b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata.google.cloud.apigeeconnect.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeconnect", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json index bacdbbfd086..f645809a436 100644 --- a/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json +++ b/packages/google-cloud-apigeeconnect/samples/generated/v1/snippet_metadata_google.cloud.apigeeconnect.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeconnect", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeconnect/samples/package.json b/packages/google-cloud-apigeeconnect/samples/package.json index 3a4febeaf0f..0fc8c8d1f45 100644 --- a/packages/google-cloud-apigeeconnect/samples/package.json +++ b/packages/google-cloud-apigeeconnect/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/apigee-connect": "^4.0.0" + "@google-cloud/apigee-connect": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-apigeeregistry/CHANGELOG.md b/packages/google-cloud-apigeeregistry/CHANGELOG.md index a3acc663f43..83f3ce95596 100644 --- a/packages/google-cloud-apigeeregistry/CHANGELOG.md +++ b/packages/google-cloud-apigeeregistry/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/apigee-registry-v2.0.0...apigee-registry-v2.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/apigee-registry-v1.3.1...apigee-registry-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-apigeeregistry/package.json b/packages/google-cloud-apigeeregistry/package.json index 0db2745af6e..edf15063bb5 100644 --- a/packages/google-cloud-apigeeregistry/package.json +++ b/packages/google-cloud-apigeeregistry/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apigee-registry", - "version": "2.0.0", + "version": "2.1.0", "description": "apigeeregistry client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json index 08b54b47234..9b4f31ca3f7 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata.google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json index 08b54b47234..9b4f31ca3f7 100644 --- a/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json +++ b/packages/google-cloud-apigeeregistry/samples/generated/v1/snippet_metadata_google.cloud.apigeeregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apigeeregistry", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apigeeregistry/samples/package.json b/packages/google-cloud-apigeeregistry/samples/package.json index fd454f575e6..0b035c0a6d1 100644 --- a/packages/google-cloud-apigeeregistry/samples/package.json +++ b/packages/google-cloud-apigeeregistry/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/apigee-registry": "^2.0.0" + "@google-cloud/apigee-registry": "^2.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-apihub/CHANGELOG.md b/packages/google-cloud-apihub/CHANGELOG.md index 931d02db7dd..56215da7046 100644 --- a/packages/google-cloud-apihub/CHANGELOG.md +++ b/packages/google-cloud-apihub/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/apihub-v0.2.0...apihub-v0.3.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/apihub-v0.1.1...apihub-v0.2.0) (2025-03-18) diff --git a/packages/google-cloud-apihub/package.json b/packages/google-cloud-apihub/package.json index fbe4c79fe59..56e3fc856cb 100644 --- a/packages/google-cloud-apihub/package.json +++ b/packages/google-cloud-apihub/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apihub", - "version": "0.2.0", + "version": "0.3.0", "description": "API hub API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json b/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json index b35082f8e8e..541a7644b68 100644 --- a/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json +++ b/packages/google-cloud-apihub/samples/generated/v1/snippet_metadata_google.cloud.apihub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apihub", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apihub/samples/package.json b/packages/google-cloud-apihub/samples/package.json index 448426229ed..acd082b7970 100644 --- a/packages/google-cloud-apihub/samples/package.json +++ b/packages/google-cloud-apihub/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/apihub": "^0.2.0" + "@google-cloud/apihub": "^0.3.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-apphub/CHANGELOG.md b/packages/google-cloud-apphub/CHANGELOG.md index caf613501c2..c10e8559115 100644 --- a/packages/google-cloud-apphub/CHANGELOG.md +++ b/packages/google-cloud-apphub/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/apphub-v0.4.0...apphub-v0.4.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/apphub-v0.3.1...apphub-v0.4.0) (2025-03-18) diff --git a/packages/google-cloud-apphub/package.json b/packages/google-cloud-apphub/package.json index 857dc2564ce..4c51092d06c 100644 --- a/packages/google-cloud-apphub/package.json +++ b/packages/google-cloud-apphub/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/apphub", - "version": "0.4.0", + "version": "0.4.1", "description": "App Hub API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json b/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json index 990d09f08df..3d120eac747 100644 --- a/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json +++ b/packages/google-cloud-apphub/samples/generated/v1/snippet_metadata_google.cloud.apphub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-apphub", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-apphub/samples/package.json b/packages/google-cloud-apphub/samples/package.json index 1659bd14fbd..20b32103c80 100644 --- a/packages/google-cloud-apphub/samples/package.json +++ b/packages/google-cloud-apphub/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/apphub": "^0.4.0" + "@google-cloud/apphub": "^0.4.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-asset/CHANGELOG.md b/packages/google-cloud-asset/CHANGELOG.md index bfd343fd967..ee57f1520e7 100644 --- a/packages/google-cloud-asset/CHANGELOG.md +++ b/packages/google-cloud-asset/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/asset?activeTab=versions +## [6.1.0](https://github.com/googleapis/google-cloud-node/compare/asset-v6.0.0...asset-v6.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) +* **deps:** Update dependency @google-cloud/compute to v5 ([#6171](https://github.com/googleapis/google-cloud-node/issues/6171)) ([b3b30b8](https://github.com/googleapis/google-cloud-node/commit/b3b30b8483e222116f488ed313c02901601b75f3)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/asset-v5.7.1...asset-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-asset/package.json b/packages/google-cloud-asset/package.json index 308c7b1f87e..a6e7c861354 100644 --- a/packages/google-cloud-asset/package.json +++ b/packages/google-cloud-asset/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/asset", "description": "Cloud Asset API client for Node.js", - "version": "6.0.0", + "version": "6.1.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json index 2b96b95558c..92f1e257086 100644 --- a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json +++ b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata.google.cloud.asset.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json index 0facc058265..1f9825c48f0 100644 --- a/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json +++ b/packages/google-cloud-asset/samples/generated/v1/snippet_metadata_google.cloud.asset.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json index 7b8a7531374..84290e5ecf6 100644 --- a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata.google.cloud.asset.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json index f21da6bb38f..f4f50ed61d0 100644 --- a/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p1beta1/snippet_metadata_google.cloud.asset.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json index c5f47763042..8b2d9564da6 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata.google.cloud.asset.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json index 39dd4280cc7..373f5ee3fe9 100644 --- a/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p2beta1/snippet_metadata_google.cloud.asset.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json b/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json index 313d30061b5..ed0ce6e8421 100644 --- a/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p4beta1/snippet_metadata.google.cloud.asset.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json index 70806af09d9..403a4a9d9fe 100644 --- a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata.google.cloud.asset.v1p5beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json index 70806af09d9..403a4a9d9fe 100644 --- a/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p5beta1/snippet_metadata_google.cloud.asset.v1p5beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json index cadbc36001f..efe74b0a0d8 100644 --- a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata.google.cloud.asset.v1p7beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json index cadbc36001f..efe74b0a0d8 100644 --- a/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json +++ b/packages/google-cloud-asset/samples/generated/v1p7beta1/snippet_metadata_google.cloud.asset.v1p7beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-asset", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-asset/samples/package.json b/packages/google-cloud-asset/samples/package.json index 5085851531a..72f08f18f7f 100644 --- a/packages/google-cloud-asset/samples/package.json +++ b/packages/google-cloud-asset/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/asset": "^6.0.0", + "@google-cloud/asset": "^6.1.0", "@google-cloud/bigquery": "^7.0.0", "@google-cloud/compute": "^5.0.0", "@google-cloud/storage": "^7.0.0", diff --git a/packages/google-cloud-assuredworkloads/CHANGELOG.md b/packages/google-cloud-assuredworkloads/CHANGELOG.md index acefa35bd88..cf7d0ac7d5d 100644 --- a/packages/google-cloud-assuredworkloads/CHANGELOG.md +++ b/packages/google-cloud-assuredworkloads/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/assured-workloads-v5.0.0...assured-workloads-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/assured-workloads-v4.3.1...assured-workloads-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-assuredworkloads/package.json b/packages/google-cloud-assuredworkloads/package.json index e79f7f8ae14..6f9924588b3 100644 --- a/packages/google-cloud-assuredworkloads/package.json +++ b/packages/google-cloud-assuredworkloads/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/assured-workloads", - "version": "5.0.0", + "version": "5.0.1", "description": "Assured Workloads client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json index f93569c6a7e..952830871eb 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata.google.cloud.assuredworkloads.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json index f93569c6a7e..952830871eb 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1/snippet_metadata_google.cloud.assuredworkloads.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json index 650d2e29d4f..7fc694b0e7d 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json index 650d2e29d4f..7fc694b0e7d 100644 --- a/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json +++ b/packages/google-cloud-assuredworkloads/samples/generated/v1beta1/snippet_metadata_google.cloud.assuredworkloads.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-assuredworkloads", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-assuredworkloads/samples/package.json b/packages/google-cloud-assuredworkloads/samples/package.json index d9572e1e3c3..2708a3172d0 100644 --- a/packages/google-cloud-assuredworkloads/samples/package.json +++ b/packages/google-cloud-assuredworkloads/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/assured-workloads": "^5.0.0" + "@google-cloud/assured-workloads": "^5.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-automl/CHANGELOG.md b/packages/google-cloud-automl/CHANGELOG.md index 62606911a0e..2db993cae75 100644 --- a/packages/google-cloud-automl/CHANGELOG.md +++ b/packages/google-cloud-automl/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/automl?activeTab=versions +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/automl-v5.0.0...automl-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) +* **deps:** Update dependency mathjs to v14 ([#6130](https://github.com/googleapis/google-cloud-node/issues/6130)) ([24d9d0e](https://github.com/googleapis/google-cloud-node/commit/24d9d0e4372c1bd2bbc4815bcc2fe60f74b93c71)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/automl-v4.3.0...automl-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-automl/package.json b/packages/google-cloud-automl/package.json index 7b97e414ef3..0f64fb95a8b 100644 --- a/packages/google-cloud-automl/package.json +++ b/packages/google-cloud-automl/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/automl", "description": "Cloud AutoML API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json index 0475fa1a605..93aa2a61460 100644 --- a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json +++ b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata.google.cloud.automl.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json index 0475fa1a605..93aa2a61460 100644 --- a/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json +++ b/packages/google-cloud-automl/samples/generated/v1/snippet_metadata_google.cloud.automl.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json index 8befc84198e..4f9385772f4 100644 --- a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json +++ b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata.google.cloud.automl.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json index 8befc84198e..4f9385772f4 100644 --- a/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json +++ b/packages/google-cloud-automl/samples/generated/v1beta1/snippet_metadata_google.cloud.automl.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-automl", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-automl/samples/package.json b/packages/google-cloud-automl/samples/package.json index 203bc3f2d5a..db064b2f2c7 100644 --- a/packages/google-cloud-automl/samples/package.json +++ b/packages/google-cloud-automl/samples/package.json @@ -16,7 +16,7 @@ "!test/" ], "dependencies": { - "@google-cloud/automl": "^5.0.0", + "@google-cloud/automl": "^5.0.1", "csv": "^6.0.0", "mathjs": "^14.0.0", "yargs": "^17.0.0" diff --git a/packages/google-cloud-backupdr/CHANGELOG.md b/packages/google-cloud-backupdr/CHANGELOG.md index 0db1d844e6d..8c77ed6e4dc 100644 --- a/packages/google-cloud-backupdr/CHANGELOG.md +++ b/packages/google-cloud-backupdr/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.1](https://github.com/googleapis/google-cloud-node/compare/backupdr-v0.3.0...backupdr-v0.3.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/backupdr-v0.2.0...backupdr-v0.3.0) (2025-03-18) diff --git a/packages/google-cloud-backupdr/package.json b/packages/google-cloud-backupdr/package.json index f1a4b19b591..a5fe4bd5780 100644 --- a/packages/google-cloud-backupdr/package.json +++ b/packages/google-cloud-backupdr/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/backupdr", - "version": "0.3.0", + "version": "0.3.1", "description": "Backup and DR Service API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json index ddddc817bea..52653eb9d17 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-backupdr", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-backupdr/samples/package.json b/packages/google-cloud-backupdr/samples/package.json index c84a00f4b12..7a37d43a39f 100644 --- a/packages/google-cloud-backupdr/samples/package.json +++ b/packages/google-cloud-backupdr/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/backupdr": "^0.3.0" + "@google-cloud/backupdr": "^0.3.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-baremetalsolution/CHANGELOG.md b/packages/google-cloud-baremetalsolution/CHANGELOG.md index f00b33c9a89..93506597d6d 100644 --- a/packages/google-cloud-baremetalsolution/CHANGELOG.md +++ b/packages/google-cloud-baremetalsolution/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/bare-metal-solution-v2.0.0...bare-metal-solution-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/bare-metal-solution-v1.4.1...bare-metal-solution-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-baremetalsolution/package.json b/packages/google-cloud-baremetalsolution/package.json index 30c15d8ff71..bcb9532127c 100644 --- a/packages/google-cloud-baremetalsolution/package.json +++ b/packages/google-cloud-baremetalsolution/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bare-metal-solution", - "version": "2.0.0", + "version": "2.0.1", "description": "baremetalsolution client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json index 51aa3dc1c99..55dda474fee 100644 --- a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json +++ b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata.google.cloud.baremetalsolution.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-baremetalsolution", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json index 62fc102bf98..15f2e210089 100644 --- a/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json +++ b/packages/google-cloud-baremetalsolution/samples/generated/v2/snippet_metadata_google.cloud.baremetalsolution.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-baremetalsolution", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-baremetalsolution/samples/package.json b/packages/google-cloud-baremetalsolution/samples/package.json index be9ac105b34..9119465a921 100644 --- a/packages/google-cloud-baremetalsolution/samples/package.json +++ b/packages/google-cloud-baremetalsolution/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/bare-metal-solution": "^2.0.0" + "@google-cloud/bare-metal-solution": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-batch/CHANGELOG.md b/packages/google-cloud-batch/CHANGELOG.md index c8219d40150..114c01e3e07 100644 --- a/packages/google-cloud-batch/CHANGELOG.md +++ b/packages/google-cloud-batch/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/batch-v2.0.0...batch-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/batch-v1.16.1...batch-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-batch/package.json b/packages/google-cloud-batch/package.json index 3af7d70d498..256144c895d 100644 --- a/packages/google-cloud-batch/package.json +++ b/packages/google-cloud-batch/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/batch", - "version": "2.0.0", + "version": "2.0.1", "description": "Batch client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json index 7ac83526a08..b0f3137adb9 100644 --- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json +++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json index 2249e5b64cf..c66450d7d34 100644 --- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json +++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata_google.cloud.batch.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json index 30b03b6567b..bfa9aeab49b 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json +++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json index edfa4ad0438..0866c529809 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json +++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata_google.cloud.batch.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/package.json b/packages/google-cloud-batch/samples/package.json index f74adc0903b..b75bb49623b 100644 --- a/packages/google-cloud-batch/samples/package.json +++ b/packages/google-cloud-batch/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/batch": "^2.0.0" + "@google-cloud/batch": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-beyondcorp-appconnections/CHANGELOG.md b/packages/google-cloud-beyondcorp-appconnections/CHANGELOG.md index c2303bad338..767f1027ab0 100644 --- a/packages/google-cloud-beyondcorp-appconnections/CHANGELOG.md +++ b/packages/google-cloud-beyondcorp-appconnections/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/appconnections-v2.0.0...appconnections-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/appconnections-v1.3.1...appconnections-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-beyondcorp-appconnections/package.json b/packages/google-cloud-beyondcorp-appconnections/package.json index bca2e8dd10a..88b0af3f142 100644 --- a/packages/google-cloud-beyondcorp-appconnections/package.json +++ b/packages/google-cloud-beyondcorp-appconnections/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/appconnections", - "version": "2.0.0", + "version": "2.0.1", "description": "BeyondCorp API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json index 1f8edca6d76..3dc2b6ee5ad 100644 --- a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnections", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json index 1f8edca6d76..3dc2b6ee5ad 100644 --- a/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json +++ b/packages/google-cloud-beyondcorp-appconnections/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnections.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnections", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/package.json b/packages/google-cloud-beyondcorp-appconnections/samples/package.json index b1bbbd8de24..77697ce6b10 100644 --- a/packages/google-cloud-beyondcorp-appconnections/samples/package.json +++ b/packages/google-cloud-beyondcorp-appconnections/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/appconnections": "^2.0.0" + "@google-cloud/appconnections": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-beyondcorp-appconnectors/CHANGELOG.md b/packages/google-cloud-beyondcorp-appconnectors/CHANGELOG.md index daa1bda6bef..923954e4ce1 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/CHANGELOG.md +++ b/packages/google-cloud-beyondcorp-appconnectors/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/appconnectors-v2.0.0...appconnectors-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/appconnectors-v1.3.1...appconnectors-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-beyondcorp-appconnectors/package.json b/packages/google-cloud-beyondcorp-appconnectors/package.json index 956388b81a3..b7a71a2e953 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/package.json +++ b/packages/google-cloud-beyondcorp-appconnectors/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/appconnectors", - "version": "2.0.0", + "version": "2.0.1", "description": "BeyondCorp API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json index 6c9920be3b5..4fb366e40c2 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnectors", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json index 6c9920be3b5..4fb366e40c2 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appconnectors.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appconnectors", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/package.json b/packages/google-cloud-beyondcorp-appconnectors/samples/package.json index 9965eab6412..97a88bab655 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/package.json +++ b/packages/google-cloud-beyondcorp-appconnectors/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/appconnectors": "^2.0.0" + "@google-cloud/appconnectors": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-beyondcorp-appgateways/CHANGELOG.md b/packages/google-cloud-beyondcorp-appgateways/CHANGELOG.md index 303790e0769..edae9f29678 100644 --- a/packages/google-cloud-beyondcorp-appgateways/CHANGELOG.md +++ b/packages/google-cloud-beyondcorp-appgateways/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/appgateways-v2.0.0...appgateways-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/appgateways-v1.3.1...appgateways-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-beyondcorp-appgateways/package.json b/packages/google-cloud-beyondcorp-appgateways/package.json index 6d7d010dd6c..a298d401839 100644 --- a/packages/google-cloud-beyondcorp-appgateways/package.json +++ b/packages/google-cloud-beyondcorp-appgateways/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/appgateways", - "version": "2.0.0", + "version": "2.0.1", "description": "BeyondCorp API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json index d8773bb67e5..9d02a4100e5 100644 --- a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appgateways", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json index d8773bb67e5..9d02a4100e5 100644 --- a/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json +++ b/packages/google-cloud-beyondcorp-appgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.appgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-appgateways", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/package.json b/packages/google-cloud-beyondcorp-appgateways/samples/package.json index 72a45ca884d..a4e68701233 100644 --- a/packages/google-cloud-beyondcorp-appgateways/samples/package.json +++ b/packages/google-cloud-beyondcorp-appgateways/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/appgateways": "^2.0.0" + "@google-cloud/appgateways": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/CHANGELOG.md b/packages/google-cloud-beyondcorp-clientconnectorservices/CHANGELOG.md index 3099bbc4bba..ddbbdaea2b3 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/CHANGELOG.md +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.0.1](https://github.com/googleapis/google-cloud-node/compare/clientconnectorservices-v3.0.0...clientconnectorservices-v3.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/clientconnectorservices-v2.3.1...clientconnectorservices-v3.0.0) (2025-03-18) diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json index ed1b4bbfbb4..0b9e08bd572 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/clientconnectorservices", - "version": "3.0.0", + "version": "3.0.1", "description": "BeyondCorp API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json index 1d12a0b87e3..5701ad14f4e 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientconnectorservices", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json index 1d12a0b87e3..5701ad14f4e 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientconnectorservices", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/package.json b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/package.json index 86a0128f3ff..46eaac3b1c0 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/package.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/clientconnectorservices": "^3.0.0" + "@google-cloud/clientconnectorservices": "^3.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-beyondcorp-clientgateways/CHANGELOG.md b/packages/google-cloud-beyondcorp-clientgateways/CHANGELOG.md index 046855df5d1..332ba7fd459 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/CHANGELOG.md +++ b/packages/google-cloud-beyondcorp-clientgateways/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/clientgateways-v2.0.0...clientgateways-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/clientgateways-v1.3.1...clientgateways-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-beyondcorp-clientgateways/package.json b/packages/google-cloud-beyondcorp-clientgateways/package.json index ced14b4cf00..eda8a245e51 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/package.json +++ b/packages/google-cloud-beyondcorp-clientgateways/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/clientgateways", - "version": "2.0.0", + "version": "2.0.1", "description": "BeyondCorp API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json index efa88a1e7e0..7cbd56bca49 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientgateways", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json index efa88a1e7e0..7cbd56bca49 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/generated/v1/snippet_metadata_google.cloud.beyondcorp.clientgateways.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clientgateways", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/package.json b/packages/google-cloud-beyondcorp-clientgateways/samples/package.json index 6223c4e0572..0f56dc8e007 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/package.json +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/clientgateways": "^2.0.0" + "@google-cloud/clientgateways": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md b/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md index f4a6882e27b..5e9b0e857e6 100644 --- a/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md +++ b/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-analyticshub-v2.0.0...bigquery-analyticshub-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-analyticshub-v1.6.1...bigquery-analyticshub-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-bigquery-analyticshub/package.json b/packages/google-cloud-bigquery-analyticshub/package.json index a96f21c0acc..c6bcd23232c 100644 --- a/packages/google-cloud-bigquery-analyticshub/package.json +++ b/packages/google-cloud-bigquery-analyticshub/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-analyticshub", - "version": "2.0.0", + "version": "2.0.1", "description": "Analytics Hub API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json index 29af92f8340..2b7c77689df 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-analyticshub", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json index 39d782b0cf6..12b95ef5e82 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-analyticshub", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/samples/package.json b/packages/google-cloud-bigquery-analyticshub/samples/package.json index 8d0922155e2..74a6f5d4b7b 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/package.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/bigquery-analyticshub": "^2.0.0" + "@google-cloud/bigquery-analyticshub": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-connection/CHANGELOG.md b/packages/google-cloud-bigquery-connection/CHANGELOG.md index 201e5ad471c..b9224f050b4 100644 --- a/packages/google-cloud-bigquery-connection/CHANGELOG.md +++ b/packages/google-cloud-bigquery-connection/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-connection-v4.0.0...bigquery-connection-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-connection-v3.3.0...bigquery-connection-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-bigquery-connection/package.json b/packages/google-cloud-bigquery-connection/package.json index 3d5c6ddd5b8..8b1f4356469 100644 --- a/packages/google-cloud-bigquery-connection/package.json +++ b/packages/google-cloud-bigquery-connection/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-connection", - "version": "4.0.0", + "version": "4.0.1", "description": "BigQuery Connection client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json index b4a461bb55c..a7cb056dd2b 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata.google.cloud.bigquery.connection.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json index b4a461bb55c..a7cb056dd2b 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1/snippet_metadata_google.cloud.bigquery.connection.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json index d0fcd63585a..8e3ebe54af4 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json index d0fcd63585a..8e3ebe54af4 100644 --- a/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json +++ b/packages/google-cloud-bigquery-connection/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.connection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connection", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-connection/samples/package.json b/packages/google-cloud-bigquery-connection/samples/package.json index 4faa74b8509..37b661e3666 100644 --- a/packages/google-cloud-bigquery-connection/samples/package.json +++ b/packages/google-cloud-bigquery-connection/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/bigquery-connection": "^4.0.0" + "@google-cloud/bigquery-connection": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-dataexchange/CHANGELOG.md b/packages/google-cloud-bigquery-dataexchange/CHANGELOG.md index 919df015a22..6d9e56accf3 100644 --- a/packages/google-cloud-bigquery-dataexchange/CHANGELOG.md +++ b/packages/google-cloud-bigquery-dataexchange/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-data-exchange-v2.0.0...bigquery-data-exchange-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-data-exchange-v1.3.0...bigquery-data-exchange-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-bigquery-dataexchange/package.json b/packages/google-cloud-bigquery-dataexchange/package.json index ec3668a6afb..927928986ba 100644 --- a/packages/google-cloud-bigquery-dataexchange/package.json +++ b/packages/google-cloud-bigquery-dataexchange/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-data-exchange", - "version": "2.0.0", + "version": "2.0.1", "description": "analyticshub client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json index 39fb9439abe..4f24357d6b0 100644 --- a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json +++ b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataexchange", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json index 39fb9439abe..4f24357d6b0 100644 --- a/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json +++ b/packages/google-cloud-bigquery-dataexchange/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataexchange", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-dataexchange/samples/package.json b/packages/google-cloud-bigquery-dataexchange/samples/package.json index 33b01c402a3..a20bb6ca837 100644 --- a/packages/google-cloud-bigquery-dataexchange/samples/package.json +++ b/packages/google-cloud-bigquery-dataexchange/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/bigquery-data-exchange": "^2.0.0" + "@google-cloud/bigquery-data-exchange": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md b/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md index 8bfd3d19fc8..da402cfedef 100644 --- a/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md +++ b/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-datapolicies-v2.0.0...bigquery-datapolicies-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-datapolicies-v1.4.0...bigquery-datapolicies-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-bigquery-datapolicies/package.json b/packages/google-cloud-bigquery-datapolicies/package.json index 224e51847f0..928a92ce43b 100644 --- a/packages/google-cloud-bigquery-datapolicies/package.json +++ b/packages/google-cloud-bigquery-datapolicies/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-datapolicies", - "version": "2.0.0", + "version": "2.0.1", "description": " client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json index f218a307fe5..786149484ff 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json index c151d89340d..59c83328474 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json index 261865116b8..da85eea353b 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json index 261865116b8..da85eea353b 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/package.json b/packages/google-cloud-bigquery-datapolicies/samples/package.json index dda95cbd82b..9348bc8c201 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/package.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/bigquery-datapolicies": "^2.0.0" + "@google-cloud/bigquery-datapolicies": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md b/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md index 4c8cdb81b86..414470b40ac 100644 --- a/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md +++ b/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/bigquery-data-transfer?activeTab=versions +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-data-transfer-v5.0.0...bigquery-data-transfer-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-data-transfer-v4.4.0...bigquery-data-transfer-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-bigquery-datatransfer/package.json b/packages/google-cloud-bigquery-datatransfer/package.json index 8a2cee51ce5..11459b7476f 100644 --- a/packages/google-cloud-bigquery-datatransfer/package.json +++ b/packages/google-cloud-bigquery-datatransfer/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/bigquery-data-transfer", "description": "BigQuery Data Transfer API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json index 4c5daae8d6c..0c748c4a346 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datatransfer", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index b3196845065..e25e024dc50 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datatransfer", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/samples/package.json b/packages/google-cloud-bigquery-datatransfer/samples/package.json index efd8650c3d8..ebad4cf7d4e 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/package.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 60000" }, "dependencies": { - "@google-cloud/bigquery-data-transfer": "^5.0.0" + "@google-cloud/bigquery-data-transfer": "^5.0.1" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-bigquery-migration/CHANGELOG.md b/packages/google-cloud-bigquery-migration/CHANGELOG.md index 4704c540b06..de811ec3ec6 100644 --- a/packages/google-cloud-bigquery-migration/CHANGELOG.md +++ b/packages/google-cloud-bigquery-migration/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-migration-v2.0.0...bigquery-migration-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-migration-v1.4.0...bigquery-migration-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-bigquery-migration/package.json b/packages/google-cloud-bigquery-migration/package.json index c8878e54b35..f58a49378d0 100644 --- a/packages/google-cloud-bigquery-migration/package.json +++ b/packages/google-cloud-bigquery-migration/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-migration", - "version": "2.0.0", + "version": "2.0.1", "description": "bigquery-migration client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json index 614b64219d7..95952ec5486 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata.google.cloud.bigquery.migration.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json index 614b64219d7..95952ec5486 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json index b49ddab5e85..c626c2e5fae 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json index b49ddab5e85..c626c2e5fae 100644 --- a/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json +++ b/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migration", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-migration/samples/package.json b/packages/google-cloud-bigquery-migration/samples/package.json index d5e0561859c..7ed00297d66 100644 --- a/packages/google-cloud-bigquery-migration/samples/package.json +++ b/packages/google-cloud-bigquery-migration/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/bigquery-migration": "^2.0.0" + "@google-cloud/bigquery-migration": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-reservation/CHANGELOG.md b/packages/google-cloud-bigquery-reservation/CHANGELOG.md index d5a9cec3ea0..fdcbd1798a8 100644 --- a/packages/google-cloud-bigquery-reservation/CHANGELOG.md +++ b/packages/google-cloud-bigquery-reservation/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/bigquery-reservation-v4.0.0...bigquery-reservation-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-reservation-v3.5.0...bigquery-reservation-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-bigquery-reservation/package.json b/packages/google-cloud-bigquery-reservation/package.json index f23a7ec8fed..0b06bb0eadf 100644 --- a/packages/google-cloud-bigquery-reservation/package.json +++ b/packages/google-cloud-bigquery-reservation/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-reservation", - "version": "4.0.0", + "version": "4.0.1", "description": "BigQuery Reservation client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json index 0850517881a..92ef1528615 100644 --- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json +++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata.google.cloud.bigquery.reservation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-reservation", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json index be89853ce53..49b2d68679c 100644 --- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json +++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/snippet_metadata_google.cloud.bigquery.reservation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-reservation", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-reservation/samples/package.json b/packages/google-cloud-bigquery-reservation/samples/package.json index c1da6c8061c..894a349a7b1 100644 --- a/packages/google-cloud-bigquery-reservation/samples/package.json +++ b/packages/google-cloud-bigquery-reservation/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/bigquery-reservation": "^4.0.0" + "@google-cloud/bigquery-reservation": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-billing-budgets/CHANGELOG.md b/packages/google-cloud-billing-budgets/CHANGELOG.md index 8dff6af7385..fe7efb3ee19 100644 --- a/packages/google-cloud-billing-budgets/CHANGELOG.md +++ b/packages/google-cloud-billing-budgets/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/billing-budgets-v6.0.0...billing-budgets-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/billing-budgets-v5.4.0...billing-budgets-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-billing-budgets/package.json b/packages/google-cloud-billing-budgets/package.json index b30c1d6c62e..bd3cdaf0e71 100644 --- a/packages/google-cloud-billing-budgets/package.json +++ b/packages/google-cloud-billing-budgets/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/billing-budgets", - "version": "6.0.0", + "version": "6.0.1", "author": "Google LLC", "description": "Budgets client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json index e8f8d86abd2..53e43167800 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata.google.cloud.billing.budgets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json index e8ac1b629f1..e8ff6fc9cd5 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1/snippet_metadata_google.cloud.billing.budgets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json index fcfdc5db7e7..ea87f64bb94 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata.google.cloud.billing.budgets.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json index fa076e0f358..b8204eaec73 100644 --- a/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json +++ b/packages/google-cloud-billing-budgets/samples/generated/v1beta1/snippet_metadata_google.cloud.billing.budgets.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-budgets", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing-budgets/samples/package.json b/packages/google-cloud-billing-budgets/samples/package.json index fd063d53bac..95e240d64f8 100644 --- a/packages/google-cloud-billing-budgets/samples/package.json +++ b/packages/google-cloud-billing-budgets/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/billing-budgets": "^6.0.0" + "@google-cloud/billing-budgets": "^6.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-billing/CHANGELOG.md b/packages/google-cloud-billing/CHANGELOG.md index 8d8eaf8f6b0..2064a4c3dae 100644 --- a/packages/google-cloud-billing/CHANGELOG.md +++ b/packages/google-cloud-billing/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/billing-v5.0.0...billing-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6183](https://github.com/googleapis/google-cloud-node/issues/6183)) ([f91c71f](https://github.com/googleapis/google-cloud-node/commit/f91c71f71c7a08ac17a15b7bb2233cbc041ee69b)) +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/billing-v4.6.0...billing-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-billing/package.json b/packages/google-cloud-billing/package.json index 97b63e339c4..7a8a53e2ec7 100644 --- a/packages/google-cloud-billing/package.json +++ b/packages/google-cloud-billing/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/billing", - "version": "5.0.0", + "version": "5.0.1", "description": "Billing client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json index 5f204afec51..0de663e9a6c 100644 --- a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json +++ b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata.google.cloud.billing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-billing", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json index 98ab049d508..ccc3b21fdcc 100644 --- a/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json +++ b/packages/google-cloud-billing/samples/generated/v1/snippet_metadata_google.cloud.billing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-billing", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-billing/samples/package.json b/packages/google-cloud-billing/samples/package.json index 1629e524aeb..42d6f218d21 100644 --- a/packages/google-cloud-billing/samples/package.json +++ b/packages/google-cloud-billing/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/billing": "^5.0.0" + "@google-cloud/billing": "^5.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-binaryauthorization/CHANGELOG.md b/packages/google-cloud-binaryauthorization/CHANGELOG.md index 6e3956a4ed2..e3026330bc7 100644 --- a/packages/google-cloud-binaryauthorization/CHANGELOG.md +++ b/packages/google-cloud-binaryauthorization/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/binary-authorization-v4.0.0...binary-authorization-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/binary-authorization-v3.7.0...binary-authorization-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-binaryauthorization/package.json b/packages/google-cloud-binaryauthorization/package.json index 56ae3a3411c..1865c58397c 100644 --- a/packages/google-cloud-binaryauthorization/package.json +++ b/packages/google-cloud-binaryauthorization/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/binary-authorization", - "version": "4.0.0", + "version": "4.0.1", "description": "Binaryauthorization client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json index 3f7d4914be8..6d1a7465d35 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata.google.cloud.binaryauthorization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json index 3f7d4914be8..6d1a7465d35 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1/snippet_metadata_google.cloud.binaryauthorization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json index 5c8368e6f7e..f861205a9e1 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata.google.cloud.binaryauthorization.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json index 5c8368e6f7e..f861205a9e1 100644 --- a/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json +++ b/packages/google-cloud-binaryauthorization/samples/generated/v1beta1/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-binaryauthorization", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-binaryauthorization/samples/package.json b/packages/google-cloud-binaryauthorization/samples/package.json index ec316ad1c44..74e14680b57 100644 --- a/packages/google-cloud-binaryauthorization/samples/package.json +++ b/packages/google-cloud-binaryauthorization/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/binary-authorization": "^4.0.0" + "@google-cloud/binary-authorization": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-certificatemanager/CHANGELOG.md b/packages/google-cloud-certificatemanager/CHANGELOG.md index 68d49f0cd89..8a1c84fedc6 100644 --- a/packages/google-cloud-certificatemanager/CHANGELOG.md +++ b/packages/google-cloud-certificatemanager/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/certificate-manager-v2.0.0...certificate-manager-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/certificate-manager-v1.4.0...certificate-manager-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-certificatemanager/package.json b/packages/google-cloud-certificatemanager/package.json index 9814bdea5fe..eca6f9866b8 100644 --- a/packages/google-cloud-certificatemanager/package.json +++ b/packages/google-cloud-certificatemanager/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/certificate-manager", - "version": "2.0.0", + "version": "2.0.1", "description": "certificatemanager client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json index cd976c53557..913e1d2e8c6 100644 --- a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json +++ b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata.google.cloud.certificatemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-certificatemanager", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json index 6def6efca8e..c42a94f02b9 100644 --- a/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json +++ b/packages/google-cloud-certificatemanager/samples/generated/v1/snippet_metadata_google.cloud.certificatemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-certificatemanager", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-certificatemanager/samples/package.json b/packages/google-cloud-certificatemanager/samples/package.json index e8ebd982c6e..15bf53db847 100644 --- a/packages/google-cloud-certificatemanager/samples/package.json +++ b/packages/google-cloud-certificatemanager/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --recursive test/ --timeout=800000" }, "dependencies": { - "@google-cloud/certificate-manager": "^2.0.0" + "@google-cloud/certificate-manager": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-channel/CHANGELOG.md b/packages/google-cloud-channel/CHANGELOG.md index 2a0c938753f..d8d5ba0bb1d 100644 --- a/packages/google-cloud-channel/CHANGELOG.md +++ b/packages/google-cloud-channel/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/channel-v4.0.0...channel-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/channel-v3.6.0...channel-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-channel/package.json b/packages/google-cloud-channel/package.json index 0e4b16cc480..5cf4e0d9dfa 100644 --- a/packages/google-cloud-channel/package.json +++ b/packages/google-cloud-channel/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/channel", - "version": "4.0.0", + "version": "4.0.1", "description": "Channel client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json index 9ec24da8dd5..764727cd207 100644 --- a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-channel", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json index 2814c285b25..55ad751cde0 100644 --- a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-channel", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-channel/samples/package.json b/packages/google-cloud-channel/samples/package.json index 62d1ec8135b..f8a50bebf21 100644 --- a/packages/google-cloud-channel/samples/package.json +++ b/packages/google-cloud-channel/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/channel": "^4.0.0", + "@google-cloud/channel": "^4.0.1", "@google-cloud/local-auth": "^3.0.0", "google-auth-library": "^9.0.0", "google-gax": "^3.0.0", diff --git a/packages/google-cloud-cloudcontrolspartner/CHANGELOG.md b/packages/google-cloud-cloudcontrolspartner/CHANGELOG.md index 7c7220cd24e..5e3a9d33f9e 100644 --- a/packages/google-cloud-cloudcontrolspartner/CHANGELOG.md +++ b/packages/google-cloud-cloudcontrolspartner/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.5.1](https://github.com/googleapis/google-cloud-node/compare/cloudcontrolspartner-v0.5.0...cloudcontrolspartner-v0.5.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/cloudcontrolspartner-v0.4.0...cloudcontrolspartner-v0.5.0) (2025-03-18) diff --git a/packages/google-cloud-cloudcontrolspartner/package.json b/packages/google-cloud-cloudcontrolspartner/package.json index 4dabdb4d00d..87bc67a600b 100644 --- a/packages/google-cloud-cloudcontrolspartner/package.json +++ b/packages/google-cloud-cloudcontrolspartner/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloudcontrolspartner", - "version": "0.5.0", + "version": "0.5.1", "description": "Cloud Controls Partner API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json index f1da9d6b3ba..e3c487383d6 100644 --- a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json +++ b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudcontrolspartner", - "version": "0.5.0", + "version": "0.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json index 4731e4ca85d..87bd1c68863 100644 --- a/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json +++ b/packages/google-cloud-cloudcontrolspartner/samples/generated/v1beta/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudcontrolspartner", - "version": "0.5.0", + "version": "0.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-cloudcontrolspartner/samples/package.json b/packages/google-cloud-cloudcontrolspartner/samples/package.json index 38152b0525e..0b21b82f149 100644 --- a/packages/google-cloud-cloudcontrolspartner/samples/package.json +++ b/packages/google-cloud-cloudcontrolspartner/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/cloudcontrolspartner": "^0.5.0" + "@google-cloud/cloudcontrolspartner": "^0.5.1" }, "devDependencies": { "c8": "^8.0.0", diff --git a/packages/google-cloud-clouddms/CHANGELOG.md b/packages/google-cloud-clouddms/CHANGELOG.md index aee71ddb718..36417d7e8a2 100644 --- a/packages/google-cloud-clouddms/CHANGELOG.md +++ b/packages/google-cloud-clouddms/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/dms-v4.0.0...dms-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/dms-v3.4.0...dms-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-clouddms/package.json b/packages/google-cloud-clouddms/package.json index 0dd2e307b3b..fa10c400107 100644 --- a/packages/google-cloud-clouddms/package.json +++ b/packages/google-cloud-clouddms/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dms", "description": "Cloud Database Migration API client for Node.js", - "version": "4.0.0", + "version": "4.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json index 862c7057bc3..0afebf5f4ac 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json +++ b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clouddms", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json index b28f955f9eb..96ee34d8ac0 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json +++ b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata_google.cloud.clouddms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clouddms", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-clouddms/samples/package.json b/packages/google-cloud-clouddms/samples/package.json index c4d72c45055..ec16260bda5 100644 --- a/packages/google-cloud-clouddms/samples/package.json +++ b/packages/google-cloud-clouddms/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dms": "^4.0.0" + "@google-cloud/dms": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md b/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md index aa7d5d9ed26..b3565dc97af 100644 --- a/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md +++ b/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.1](https://github.com/googleapis/google-cloud-node/compare/procurement-v0.6.0...procurement-v0.6.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/procurement-v0.5.0...procurement-v0.6.0) (2025-03-18) diff --git a/packages/google-cloud-commerce-consumer-procurement/package.json b/packages/google-cloud-commerce-consumer-procurement/package.json index b80b15be7b9..77dd603b32b 100644 --- a/packages/google-cloud-commerce-consumer-procurement/package.json +++ b/packages/google-cloud-commerce-consumer-procurement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/procurement", - "version": "0.6.0", + "version": "0.6.1", "description": "Cloud Commerce Consumer Procurement API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json index dc672f54494..b71392ca5f4 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-procurement", - "version": "0.6.0", + "version": "0.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json index 1da79c7ee25..7e54e1e2327 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-procurement", - "version": "0.6.0", + "version": "0.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/package.json b/packages/google-cloud-commerce-consumer-procurement/samples/package.json index c02b37e205e..96e03ea67bf 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/package.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/procurement": "^0.6.0" + "@google-cloud/procurement": "^0.6.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-compute/CHANGELOG.md b/packages/google-cloud-compute/CHANGELOG.md index fc77899610a..9a0d0a663b7 100644 --- a/packages/google-cloud-compute/CHANGELOG.md +++ b/packages/google-cloud-compute/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/compute?activeTab=versions +## [5.1.0](https://github.com/googleapis/google-cloud-node/compare/compute-v5.0.0...compute-v5.1.0) (2025-03-19) + + +### Features + +* [compute] Update Compute Engine API to revision 20250302 ([#987](https://github.com/googleapis/google-cloud-node/issues/987)) ([#6155](https://github.com/googleapis/google-cloud-node/issues/6155)) ([dfab9f0](https://github.com/googleapis/google-cloud-node/commit/dfab9f0902564fee15fdcff914851ebab07c4c9d)) +* [compute] Update Compute Engine API to revision 20250302 ([#995](https://github.com/googleapis/google-cloud-node/issues/995)) ([#6178](https://github.com/googleapis/google-cloud-node/issues/6178)) ([2be675d](https://github.com/googleapis/google-cloud-node/commit/2be675d236ff0fa1bdf634f6959b1f260d66f77c)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/compute-v4.12.0...compute-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-compute/package.json b/packages/google-cloud-compute/package.json index b2aaee2b99b..6c0af99b8d5 100644 --- a/packages/google-cloud-compute/package.json +++ b/packages/google-cloud-compute/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/compute", "description": "Google Compute Engine Client Library for Node.js", - "version": "5.0.0", + "version": "5.1.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json index 042922679ff..8678fd76630 100644 --- a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json +++ b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata.google.cloud.compute.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json index 3cca2ee37e7..122a7b4a39d 100644 --- a/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json +++ b/packages/google-cloud-compute/samples/generated/v1/snippet_metadata_google.cloud.compute.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json index 317c60bab8b..ee0ce58eb63 100644 --- a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json +++ b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata.google.cloud.compute.v1small.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json index 317c60bab8b..ee0ce58eb63 100644 --- a/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json +++ b/packages/google-cloud-compute/samples/generated/v1small/snippet_metadata_google.cloud.compute.v1small.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-compute", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-compute/samples/package.json b/packages/google-cloud-compute/samples/package.json index a0380fdcb8e..16bf7eb674a 100644 --- a/packages/google-cloud-compute/samples/package.json +++ b/packages/google-cloud-compute/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 1200000" }, "dependencies": { - "@google-cloud/compute": "^5.0.0", + "@google-cloud/compute": "^5.1.0", "@sendgrid/mail": "^8.0.0", "nodemailer": "^6.0.0", "nodemailer-smtp-transport": "^2.7.4" diff --git a/packages/google-cloud-confidentialcomputing/CHANGELOG.md b/packages/google-cloud-confidentialcomputing/CHANGELOG.md index d946737211d..852607fea19 100644 --- a/packages/google-cloud-confidentialcomputing/CHANGELOG.md +++ b/packages/google-cloud-confidentialcomputing/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/confidentialcomputing-v2.0.0...confidentialcomputing-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/confidentialcomputing-v1.8.0...confidentialcomputing-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-confidentialcomputing/package.json b/packages/google-cloud-confidentialcomputing/package.json index 82148898755..b9d4c418bf4 100644 --- a/packages/google-cloud-confidentialcomputing/package.json +++ b/packages/google-cloud-confidentialcomputing/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/confidentialcomputing", - "version": "2.0.0", + "version": "2.0.1", "description": "Confidential Computing API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json index 3900da80b37..592dfa74f7f 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json index d05e68dcd49..9209ec12820 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata_google.cloud.confidentialcomputing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json index 1184850ec6d..6f614bc777d 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json index 1184850ec6d..6f614bc777d 100644 --- a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata_google.cloud.confidentialcomputing.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-confidentialcomputing", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-confidentialcomputing/samples/package.json b/packages/google-cloud-confidentialcomputing/samples/package.json index ee86a92eb7f..0a9e71c6df6 100644 --- a/packages/google-cloud-confidentialcomputing/samples/package.json +++ b/packages/google-cloud-confidentialcomputing/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/confidentialcomputing": "^2.0.0" + "@google-cloud/confidentialcomputing": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-config/CHANGELOG.md b/packages/google-cloud-config/CHANGELOG.md index 5cfd65bd23c..8f2b44a99c0 100644 --- a/packages/google-cloud-config/CHANGELOG.md +++ b/packages/google-cloud-config/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.8.1](https://github.com/googleapis/google-cloud-node/compare/config-v0.8.0...config-v0.8.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [0.8.0](https://github.com/googleapis/google-cloud-node/compare/config-v0.7.0...config-v0.8.0) (2025-03-18) diff --git a/packages/google-cloud-config/package.json b/packages/google-cloud-config/package.json index cbac90fdd4a..44c25cea3bc 100644 --- a/packages/google-cloud-config/package.json +++ b/packages/google-cloud-config/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/config", - "version": "0.8.0", + "version": "0.8.1", "description": "Infrastructure Manager API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json index 5ead9288d5f..9bde3d06442 100644 --- a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json +++ b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-config", - "version": "0.8.0", + "version": "0.8.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-config/samples/package.json b/packages/google-cloud-config/samples/package.json index 5087ee8f3ff..d70882095e2 100644 --- a/packages/google-cloud-config/samples/package.json +++ b/packages/google-cloud-config/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/config": "^0.8.0" + "@google-cloud/config": "^0.8.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-connectors/CHANGELOG.md b/packages/google-cloud-connectors/CHANGELOG.md index 1fbfe1cad63..40fadb37e71 100644 --- a/packages/google-cloud-connectors/CHANGELOG.md +++ b/packages/google-cloud-connectors/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/connectors-v0.4.0...connectors-v0.4.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/connectors-v0.3.0...connectors-v0.4.0) (2025-03-18) diff --git a/packages/google-cloud-connectors/package.json b/packages/google-cloud-connectors/package.json index 2eff8d5df60..43820475cae 100644 --- a/packages/google-cloud-connectors/package.json +++ b/packages/google-cloud-connectors/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/connectors", - "version": "0.4.0", + "version": "0.4.1", "description": "Connectors API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json b/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json index d6d01a1f01d..b3292f47f45 100644 --- a/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json +++ b/packages/google-cloud-connectors/samples/generated/v1/snippet_metadata_google.cloud.connectors.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-connectors", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-connectors/samples/package.json b/packages/google-cloud-connectors/samples/package.json index 4484ec939b4..2e9acdee17c 100644 --- a/packages/google-cloud-connectors/samples/package.json +++ b/packages/google-cloud-connectors/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/connectors": "^0.4.0" + "@google-cloud/connectors": "^0.4.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-contactcenterinsights/CHANGELOG.md b/packages/google-cloud-contactcenterinsights/CHANGELOG.md index 26452b397f0..505916b3755 100644 --- a/packages/google-cloud-contactcenterinsights/CHANGELOG.md +++ b/packages/google-cloud-contactcenterinsights/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v4.0.0...contact-center-insights-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v3.9.0...contact-center-insights-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-contactcenterinsights/package.json b/packages/google-cloud-contactcenterinsights/package.json index d1530037dbd..5bcba53e91c 100644 --- a/packages/google-cloud-contactcenterinsights/package.json +++ b/packages/google-cloud-contactcenterinsights/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/contact-center-insights", - "version": "4.0.0", + "version": "4.0.1", "description": "contactcenterinsights client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index 648b68a375f..a80e40cf0f6 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json index 3fda68f66c5..b229386044b 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/samples/package.json b/packages/google-cloud-contactcenterinsights/samples/package.json index d84577de127..b52dee7af85 100644 --- a/packages/google-cloud-contactcenterinsights/samples/package.json +++ b/packages/google-cloud-contactcenterinsights/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/bigquery": "^7.0.0", - "@google-cloud/contact-center-insights": "^4.0.0", + "@google-cloud/contact-center-insights": "^4.0.1", "@google-cloud/pubsub": "^4.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-contentwarehouse/CHANGELOG.md b/packages/google-cloud-contentwarehouse/CHANGELOG.md index 2144ed9e5c0..7d2dcaf3cea 100644 --- a/packages/google-cloud-contentwarehouse/CHANGELOG.md +++ b/packages/google-cloud-contentwarehouse/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/contentwarehouse-v2.0.0...contentwarehouse-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/contentwarehouse-v1.11.0...contentwarehouse-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-contentwarehouse/package.json b/packages/google-cloud-contentwarehouse/package.json index 60806fa4da6..a7ec833526e 100644 --- a/packages/google-cloud-contentwarehouse/package.json +++ b/packages/google-cloud-contentwarehouse/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/contentwarehouse", - "version": "2.0.0", + "version": "2.0.1", "description": "Document AI Warehouse client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json index 419cd524d44..a712d279614 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata.google.cloud.contentwarehouse.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contentwarehouse", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json index d2f598c2f47..3c3dc302b84 100644 --- a/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json +++ b/packages/google-cloud-contentwarehouse/samples/generated/v1/snippet_metadata_google.cloud.contentwarehouse.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contentwarehouse", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contentwarehouse/samples/package.json b/packages/google-cloud-contentwarehouse/samples/package.json index b5841fce11f..d52a74a3bad 100644 --- a/packages/google-cloud-contentwarehouse/samples/package.json +++ b/packages/google-cloud-contentwarehouse/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/contentwarehouse": "^2.0.0" + "@google-cloud/contentwarehouse": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-datacatalog-lineage/CHANGELOG.md b/packages/google-cloud-datacatalog-lineage/CHANGELOG.md index 97b1388d720..77e6be34b2a 100644 --- a/packages/google-cloud-datacatalog-lineage/CHANGELOG.md +++ b/packages/google-cloud-datacatalog-lineage/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/lineage-v2.0.0...lineage-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/lineage-v1.3.0...lineage-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-datacatalog-lineage/package.json b/packages/google-cloud-datacatalog-lineage/package.json index 8c49be8c0ad..72a17fe801c 100644 --- a/packages/google-cloud-datacatalog-lineage/package.json +++ b/packages/google-cloud-datacatalog-lineage/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/lineage", - "version": "2.0.0", + "version": "2.0.1", "description": "Data Lineage API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json index b49013a385c..3d5799d8f21 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.lineage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lineage", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json index 2dc9cb52f21..1628847d083 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lineage", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog-lineage/samples/package.json b/packages/google-cloud-datacatalog-lineage/samples/package.json index b148852fd18..110d54f3d25 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/package.json +++ b/packages/google-cloud-datacatalog-lineage/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/lineage": "^2.0.0" + "@google-cloud/lineage": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-datacatalog/CHANGELOG.md b/packages/google-cloud-datacatalog/CHANGELOG.md index c9c4516ac74..89d0e8a5dd8 100644 --- a/packages/google-cloud-datacatalog/CHANGELOG.md +++ b/packages/google-cloud-datacatalog/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/datacatalog?activeTab=versions +## [5.1.0](https://github.com/googleapis/google-cloud-node/compare/datacatalog-v5.0.0...datacatalog-v5.1.0) (2025-03-19) + + +### Features + +* [datacatalog] await/catch promises, and update listOperationsAsync return type ([#6156](https://github.com/googleapis/google-cloud-node/issues/6156)) ([f79da88](https://github.com/googleapis/google-cloud-node/commit/f79da88b29303a18c00e8081434af4859ad91225)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/datacatalog-v4.7.0...datacatalog-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-datacatalog/package.json b/packages/google-cloud-datacatalog/package.json index c93839c9de6..e00269ec5f4 100644 --- a/packages/google-cloud-datacatalog/package.json +++ b/packages/google-cloud-datacatalog/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/datacatalog", - "version": "5.0.0", + "version": "5.1.0", "author": "Google LLC", "description": "Google Cloud Data Catalog API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json index d00e8e56cbb..87973cb234e 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json index 0c4c4bacfc5..25bd8930352 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json index 12282db3d56..23e8c942801 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json index 5f035a95656..f89f7779025 100644 --- a/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json +++ b/packages/google-cloud-datacatalog/samples/generated/v1beta1/snippet_metadata_google.cloud.datacatalog.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datacatalog", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datacatalog/samples/package.json b/packages/google-cloud-datacatalog/samples/package.json index f87527fb22b..51bc9a840b7 100644 --- a/packages/google-cloud-datacatalog/samples/package.json +++ b/packages/google-cloud-datacatalog/samples/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@google-cloud/bigquery": "^7.0.0", - "@google-cloud/datacatalog": "^5.0.0", + "@google-cloud/datacatalog": "^5.1.0", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dataform/CHANGELOG.md b/packages/google-cloud-dataform/CHANGELOG.md index 0769109db13..769e3714061 100644 --- a/packages/google-cloud-dataform/CHANGELOG.md +++ b/packages/google-cloud-dataform/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/dataform-v2.0.0...dataform-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/dataform-v1.4.0...dataform-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index cd92e46a431..7152658701e 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataform", - "version": "2.0.0", + "version": "2.0.1", "description": "dataform client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json index 93192d8d4eb..5fb66280bf9 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata.google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json index 5faa0b04f89..39b6002586c 100644 --- a/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json +++ b/packages/google-cloud-dataform/samples/generated/v1beta1/snippet_metadata_google.cloud.dataform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataform", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataform/samples/package.json b/packages/google-cloud-dataform/samples/package.json index 8bd3fc5b0b5..f83388384f6 100644 --- a/packages/google-cloud-dataform/samples/package.json +++ b/packages/google-cloud-dataform/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataform": "^2.0.0" + "@google-cloud/dataform": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-datafusion/CHANGELOG.md b/packages/google-cloud-datafusion/CHANGELOG.md index 6fcbf1be85d..2c3c14aa04b 100644 --- a/packages/google-cloud-datafusion/CHANGELOG.md +++ b/packages/google-cloud-datafusion/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/data-fusion-v4.0.0...data-fusion-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/data-fusion-v3.2.0...data-fusion-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-datafusion/package.json b/packages/google-cloud-datafusion/package.json index 7bfdefa24c7..87d0c8fd8d5 100644 --- a/packages/google-cloud-datafusion/package.json +++ b/packages/google-cloud-datafusion/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/data-fusion", - "version": "4.0.0", + "version": "4.0.1", "description": "datafusion client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json index 0bac9200d7f..ce5ed40425a 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata.google.cloud.datafusion.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json index 0bac9200d7f..ce5ed40425a 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1/snippet_metadata_google.cloud.datafusion.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json index 81d0c4ccb3b..ae42e4989c7 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata.google.cloud.datafusion.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json index 81d0c4ccb3b..ae42e4989c7 100644 --- a/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json +++ b/packages/google-cloud-datafusion/samples/generated/v1beta1/snippet_metadata_google.cloud.datafusion.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datafusion", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datafusion/samples/package.json b/packages/google-cloud-datafusion/samples/package.json index 12f7c697ec5..25c182fde8a 100644 --- a/packages/google-cloud-datafusion/samples/package.json +++ b/packages/google-cloud-datafusion/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/data-fusion": "^4.0.0" + "@google-cloud/data-fusion": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-datalabeling/CHANGELOG.md b/packages/google-cloud-datalabeling/CHANGELOG.md index 2d2e7eba622..d0060477c4c 100644 --- a/packages/google-cloud-datalabeling/CHANGELOG.md +++ b/packages/google-cloud-datalabeling/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/datalabeling?activeTab=versions +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/datalabeling-v5.0.0...datalabeling-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/datalabeling-v4.2.0...datalabeling-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-datalabeling/package.json b/packages/google-cloud-datalabeling/package.json index fa5de69009d..9d8d7efb823 100644 --- a/packages/google-cloud-datalabeling/package.json +++ b/packages/google-cloud-datalabeling/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/datalabeling", "description": "Data Labeling API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json index a2bff2bbdf3..0a88761eab5 100644 --- a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json +++ b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata.google.cloud.datalabeling.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datalabeling", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json index a2bff2bbdf3..0a88761eab5 100644 --- a/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json +++ b/packages/google-cloud-datalabeling/samples/generated/v1beta1/snippet_metadata_google.cloud.datalabeling.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datalabeling", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datalabeling/samples/package.json b/packages/google-cloud-datalabeling/samples/package.json index 2a8b429f3a1..bc945efeca6 100644 --- a/packages/google-cloud-datalabeling/samples/package.json +++ b/packages/google-cloud-datalabeling/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/datalabeling": "^5.0.0" + "@google-cloud/datalabeling": "^5.0.1" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index 7894b914ce2..bf808d57cec 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/dataplex-v4.0.0...dataplex-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/dataplex-v3.14.0...dataplex-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index f3bf67046da..f22dff78205 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "4.0.0", + "version": "4.0.1", "description": "dataplex client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 4bb9a3af9e8..0631f7ec76e 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json index bd989afa889..79aa20ead7c 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index 44c7e806949..7354a1335f0 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^4.0.0" + "@google-cloud/dataplex": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-dataproc/CHANGELOG.md b/packages/google-cloud-dataproc/CHANGELOG.md index 0d98c43204a..df91a5c6c59 100644 --- a/packages/google-cloud-dataproc/CHANGELOG.md +++ b/packages/google-cloud-dataproc/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/dataproc?activeTab=versions +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/dataproc-v6.0.0...dataproc-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/dataproc-v5.13.0...dataproc-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-dataproc/package.json b/packages/google-cloud-dataproc/package.json index 4045920e97f..19907d7cdd6 100644 --- a/packages/google-cloud-dataproc/package.json +++ b/packages/google-cloud-dataproc/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dataproc", "description": "Google Cloud Dataproc API client for Node.js", - "version": "6.0.0", + "version": "6.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json index 06cc4ba4c48..065b7308472 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json index 93fd26db345..681ad0609a4 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/samples/package.json b/packages/google-cloud-dataproc/samples/package.json index 6bf888dc9cf..cfca8b136cb 100644 --- a/packages/google-cloud-dataproc/samples/package.json +++ b/packages/google-cloud-dataproc/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 600000" }, "dependencies": { - "@google-cloud/dataproc": "^6.0.0", + "@google-cloud/dataproc": "^6.0.1", "@google-cloud/storage": "^7.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dataqna/CHANGELOG.md b/packages/google-cloud-dataqna/CHANGELOG.md index 5bb7106bada..f9760b1df06 100644 --- a/packages/google-cloud-dataqna/CHANGELOG.md +++ b/packages/google-cloud-dataqna/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/data-qna-v4.0.0...data-qna-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6184](https://github.com/googleapis/google-cloud-node/issues/6184)) ([2fcd202](https://github.com/googleapis/google-cloud-node/commit/2fcd2029c35e8fb2199d03ac6e61e2d821ddf72e)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/data-qna-v3.2.0...data-qna-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-dataqna/package.json b/packages/google-cloud-dataqna/package.json index 9a9f3768685..4e21f1a7dd2 100644 --- a/packages/google-cloud-dataqna/package.json +++ b/packages/google-cloud-dataqna/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/data-qna", - "version": "4.0.0", + "version": "4.0.1", "description": "Dataqna client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json index 989d1439361..73f21b9193b 100644 --- a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json +++ b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata.google.cloud.dataqna.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataqna", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json index 989d1439361..73f21b9193b 100644 --- a/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json +++ b/packages/google-cloud-dataqna/samples/generated/v1alpha/snippet_metadata_google.cloud.dataqna.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataqna", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataqna/samples/package.json b/packages/google-cloud-dataqna/samples/package.json index e229ff6a643..7032e2e4c4b 100644 --- a/packages/google-cloud-dataqna/samples/package.json +++ b/packages/google-cloud-dataqna/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/data-qna": "^4.0.0" + "@google-cloud/data-qna": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-dns/CHANGELOG.md b/packages/google-cloud-dns/CHANGELOG.md index 8e17d60c000..5e4bb18b022 100644 --- a/packages/google-cloud-dns/CHANGELOG.md +++ b/packages/google-cloud-dns/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/dns?activeTab=versions +## [5.1.0](https://github.com/googleapis/google-cloud-node/compare/dns-v5.0.0...dns-v5.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + + +### Bug Fixes + +* **deps:** Update dependency @google-cloud/promisify to v5 ([#6150](https://github.com/googleapis/google-cloud-node/issues/6150)) ([1135b86](https://github.com/googleapis/google-cloud-node/commit/1135b8610b2471249dc3aec47eb0f985ded13f93)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/dns-v4.1.0...dns-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-dns/package.json b/packages/google-cloud-dns/package.json index 49f0af3ecd1..a66f3084398 100644 --- a/packages/google-cloud-dns/package.json +++ b/packages/google-cloud-dns/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dns", "description": "Cloud DNS Client Library for Node.js", - "version": "5.0.0", + "version": "5.1.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { diff --git a/packages/google-cloud-dns/samples/package.json b/packages/google-cloud-dns/samples/package.json index ee7ec07771d..223509f94b3 100644 --- a/packages/google-cloud-dns/samples/package.json +++ b/packages/google-cloud-dns/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/dns": "^5.0.0" + "@google-cloud/dns": "^5.1.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-documentai/CHANGELOG.md b/packages/google-cloud-documentai/CHANGELOG.md index 17522797460..150cbcc883a 100644 --- a/packages/google-cloud-documentai/CHANGELOG.md +++ b/packages/google-cloud-documentai/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [9.1.0](https://github.com/googleapis/google-cloud-node/compare/documentai-v9.0.0...documentai-v9.1.0) (2025-03-19) + + +### Features + +* [documentai] Added config options to enable LLM layout parsing ([#6180](https://github.com/googleapis/google-cloud-node/issues/6180)) ([f0f3e3a](https://github.com/googleapis/google-cloud-node/commit/f0f3e3a7956143160cb36d8cba96e669c76e3c2e)) + ## [9.0.0](https://github.com/googleapis/google-cloud-node/compare/documentai-v8.12.0...documentai-v9.0.0) (2025-03-18) diff --git a/packages/google-cloud-documentai/package.json b/packages/google-cloud-documentai/package.json index 68762788634..7f1c45e0bf6 100644 --- a/packages/google-cloud-documentai/package.json +++ b/packages/google-cloud-documentai/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/documentai", - "version": "9.0.0", + "version": "9.1.0", "description": "Document AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json index 844d5d3c78b..664fbc2bece 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json index 0d9ef9c3f07..1d31a0c34f7 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json index 5bd1a7f37b6..6bbce34dd6f 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json index 5bd1a7f37b6..6bbce34dd6f 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json index 8ed3beaf462..4db32b983be 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json index 8ed3beaf462..4db32b983be 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json index 16e88fd1514..1f91428b725 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json index 5d3df649b0d..5e04a5d9e59 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "9.0.0", + "version": "9.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/package.json b/packages/google-cloud-documentai/samples/package.json index b912d96749b..09126cc719c 100644 --- a/packages/google-cloud-documentai/samples/package.json +++ b/packages/google-cloud-documentai/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha test/*.js --timeout 600000" }, "dependencies": { - "@google-cloud/documentai": "^9.0.0", + "@google-cloud/documentai": "^9.1.0", "@google-cloud/storage": "^7.0.0", "p-queue": "^8.0.0", "uuid": "^9.0.0" diff --git a/packages/google-cloud-gsuiteaddons/CHANGELOG.md b/packages/google-cloud-gsuiteaddons/CHANGELOG.md index 435df71a16f..bfac4413bb9 100644 --- a/packages/google-cloud-gsuiteaddons/CHANGELOG.md +++ b/packages/google-cloud-gsuiteaddons/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/gsuiteaddons-v2.0.0...gsuiteaddons-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/gsuiteaddons-v1.3.0...gsuiteaddons-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-gsuiteaddons/package.json b/packages/google-cloud-gsuiteaddons/package.json index 7a95fd658ed..90de5dbc543 100644 --- a/packages/google-cloud-gsuiteaddons/package.json +++ b/packages/google-cloud-gsuiteaddons/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gsuiteaddons", - "version": "2.0.0", + "version": "2.0.1", "description": "Google Workspace Add-ons API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json index 478a28e3730..3873d0ecdff 100644 --- a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json +++ b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gsuiteaddons", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json index 478a28e3730..3873d0ecdff 100644 --- a/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json +++ b/packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gsuiteaddons", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gsuiteaddons/samples/package.json b/packages/google-cloud-gsuiteaddons/samples/package.json index 6d5d59b32b1..9a53b0d34e4 100644 --- a/packages/google-cloud-gsuiteaddons/samples/package.json +++ b/packages/google-cloud-gsuiteaddons/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/gsuiteaddons": "^2.0.0" + "@google-cloud/gsuiteaddons": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-iap/CHANGELOG.md b/packages/google-cloud-iap/CHANGELOG.md index d3cb74814ff..60a646cebe4 100644 --- a/packages/google-cloud-iap/CHANGELOG.md +++ b/packages/google-cloud-iap/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/iap-v4.0.0...iap-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/iap-v3.4.0...iap-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-iap/package.json b/packages/google-cloud-iap/package.json index 887e81a55ca..d4bfb6f95b0 100644 --- a/packages/google-cloud-iap/package.json +++ b/packages/google-cloud-iap/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/iap", - "version": "4.0.0", + "version": "4.0.1", "description": "iap client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json index 3a57e08efc0..65725a30d40 100644 --- a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json +++ b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json index 3a57e08efc0..65725a30d40 100644 --- a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json +++ b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata_google.cloud.iap.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json index 9ad5a8ef8c5..f98e5267d20 100644 --- a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json +++ b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json index 9ad5a8ef8c5..f98e5267d20 100644 --- a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json +++ b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata_google.cloud.iap.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/samples/package.json b/packages/google-cloud-iap/samples/package.json index afdcfa5156d..0244e5b7e22 100644 --- a/packages/google-cloud-iap/samples/package.json +++ b/packages/google-cloud-iap/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/iap": "^4.0.0" + "@google-cloud/iap": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-ids/CHANGELOG.md b/packages/google-cloud-ids/CHANGELOG.md index e120a39c318..7231f952d0a 100644 --- a/packages/google-cloud-ids/CHANGELOG.md +++ b/packages/google-cloud-ids/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/ids-v4.0.0...ids-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/ids-v3.3.0...ids-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-ids/package.json b/packages/google-cloud-ids/package.json index 1526527a332..f91fa5447fa 100644 --- a/packages/google-cloud-ids/package.json +++ b/packages/google-cloud-ids/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/ids", - "version": "4.0.0", + "version": "4.0.1", "description": "ids client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json index bfe74ae376a..e40ed90f917 100644 --- a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json +++ b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata.google.cloud.ids.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-ids", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json index bfe74ae376a..e40ed90f917 100644 --- a/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json +++ b/packages/google-cloud-ids/samples/generated/v1/snippet_metadata_google.cloud.ids.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-ids", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-ids/samples/package.json b/packages/google-cloud-ids/samples/package.json index 9961952453f..b1a3fc0240c 100644 --- a/packages/google-cloud-ids/samples/package.json +++ b/packages/google-cloud-ids/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/ids": "^4.0.0" + "@google-cloud/ids": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-iot/CHANGELOG.md b/packages/google-cloud-iot/CHANGELOG.md index 7f964c4254f..0f6390e42ed 100644 --- a/packages/google-cloud-iot/CHANGELOG.md +++ b/packages/google-cloud-iot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/iot-v5.0.0...iot-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/iot-v4.3.0...iot-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 2400f9005f9..9fd0726724c 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/iot", "description": "Cloud IoT API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json index 9040c5a69d3..fc9f2dbe6e8 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata.google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json index 9040c5a69d3..fc9f2dbe6e8 100644 --- a/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json +++ b/packages/google-cloud-iot/samples/generated/v1/snippet_metadata_google.cloud.iot.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iot", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iot/samples/package.json b/packages/google-cloud-iot/samples/package.json index c06eabe4bdd..b1732ce9950 100644 --- a/packages/google-cloud-iot/samples/package.json +++ b/packages/google-cloud-iot/samples/package.json @@ -15,7 +15,7 @@ "test": "echo tests deprecated" }, "dependencies": { - "@google-cloud/iot": "^5.0.0", + "@google-cloud/iot": "^5.0.1", "@google-cloud/pubsub": "^4.0.0", "@google-cloud/storage": "^7.0.0" }, diff --git a/packages/google-cloud-kms-inventory/CHANGELOG.md b/packages/google-cloud-kms-inventory/CHANGELOG.md index 8d547f89714..5029f85965e 100644 --- a/packages/google-cloud-kms-inventory/CHANGELOG.md +++ b/packages/google-cloud-kms-inventory/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/kms-inventory-v2.0.0...kms-inventory-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/kms-inventory-v1.5.0...kms-inventory-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-kms-inventory/package.json b/packages/google-cloud-kms-inventory/package.json index d9c711089d3..457841af370 100644 --- a/packages/google-cloud-kms-inventory/package.json +++ b/packages/google-cloud-kms-inventory/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/kms-inventory", - "version": "2.0.0", + "version": "2.0.1", "description": "Inventory client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json index 54075b40f4c..cd75fcba813 100644 --- a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata.google.cloud.kms.inventory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-inventory", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json index 54075b40f4c..cd75fcba813 100644 --- a/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json +++ b/packages/google-cloud-kms-inventory/samples/generated/v1/snippet_metadata_google.cloud.kms.inventory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-inventory", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms-inventory/samples/package.json b/packages/google-cloud-kms-inventory/samples/package.json index 04d4760cfe3..80e9a4b52ed 100644 --- a/packages/google-cloud-kms-inventory/samples/package.json +++ b/packages/google-cloud-kms-inventory/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/kms-inventory": "^2.0.0" + "@google-cloud/kms-inventory": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-kms/CHANGELOG.md b/packages/google-cloud-kms/CHANGELOG.md index 73a4bef296a..9837f4ba819 100644 --- a/packages/google-cloud-kms/CHANGELOG.md +++ b/packages/google-cloud-kms/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/kms?activeTab=versions +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/kms-v5.0.0...kms-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/kms-v4.5.0...kms-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-kms/package.json b/packages/google-cloud-kms/package.json index d3639ecd59b..ce2023a4d2d 100644 --- a/packages/google-cloud-kms/package.json +++ b/packages/google-cloud-kms/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/kms", "description": "Google Cloud Key Management Service (KMS) API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json index 9dad8422867..c8077e1c9c7 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-kms", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json index 4eeff8ff58e..bcfe1889d2e 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata_google.cloud.kms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-kms", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-kms/samples/package.json b/packages/google-cloud-kms/samples/package.json index b4780f92300..c75520a1f60 100644 --- a/packages/google-cloud-kms/samples/package.json +++ b/packages/google-cloud-kms/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --recursive test/ --timeout=800000" }, "dependencies": { - "@google-cloud/kms": "^5.0.0", + "@google-cloud/kms": "^5.0.1", "fast-crc32c": "^2.0.0", "jslint": "^0.12.1" }, diff --git a/packages/google-cloud-language/CHANGELOG.md b/packages/google-cloud-language/CHANGELOG.md index fac76096a84..aafbfd750c5 100644 --- a/packages/google-cloud-language/CHANGELOG.md +++ b/packages/google-cloud-language/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/language?activeTab=versions +## [7.0.1](https://github.com/googleapis/google-cloud-node/compare/language-v7.0.0...language-v7.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) +* **deps:** Update dependency mathjs to v14 ([#6130](https://github.com/googleapis/google-cloud-node/issues/6130)) ([24d9d0e](https://github.com/googleapis/google-cloud-node/commit/24d9d0e4372c1bd2bbc4815bcc2fe60f74b93c71)) + ## [7.0.0](https://github.com/googleapis/google-cloud-node/compare/language-v6.5.0...language-v7.0.0) (2025-03-18) diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 67468602b0f..5ba038fd236 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/language", "description": "Google Cloud Natural Language API client for Node.js", - "version": "7.0.0", + "version": "7.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 1be1f3113f1..1d3aeef534a 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json index 1be1f3113f1..1d3aeef534a 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata_google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index 6509339299e..0bc20a556e9 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json index 6509339299e..0bc20a556e9 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata_google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json b/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json index ce365aaf5a1..05a86fdf495 100644 --- a/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json +++ b/packages/google-cloud-language/samples/generated/v2/snippet_metadata_google.cloud.language.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/package.json b/packages/google-cloud-language/samples/package.json index 3955784d58c..7bb7ec230f8 100644 --- a/packages/google-cloud-language/samples/package.json +++ b/packages/google-cloud-language/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/automl": "^4.0.0", "mathjs": "^14.0.0", - "@google-cloud/language": "^7.0.0", + "@google-cloud/language": "^7.0.1", "@google-cloud/storage": "^7.0.0", "yargs": "^17.0.0" }, diff --git a/packages/google-cloud-lifesciences/CHANGELOG.md b/packages/google-cloud-lifesciences/CHANGELOG.md index 66fcce058d3..458543405ac 100644 --- a/packages/google-cloud-lifesciences/CHANGELOG.md +++ b/packages/google-cloud-lifesciences/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/life-sciences-v4.0.0...life-sciences-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/life-sciences-v3.3.1...life-sciences-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-lifesciences/package.json b/packages/google-cloud-lifesciences/package.json index f2c33c8111c..96e02ead75f 100644 --- a/packages/google-cloud-lifesciences/package.json +++ b/packages/google-cloud-lifesciences/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/life-sciences", - "version": "4.0.0", + "version": "4.0.1", "description": "lifesciences client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json index fc2570b1934..6654f1d4786 100644 --- a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json +++ b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata.google.cloud.lifesciences.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lifesciences", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json index fc2570b1934..6654f1d4786 100644 --- a/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json +++ b/packages/google-cloud-lifesciences/samples/generated/v2beta/snippet_metadata_google.cloud.lifesciences.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lifesciences", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-lifesciences/samples/package.json b/packages/google-cloud-lifesciences/samples/package.json index bfa41d7b1b7..e21b878ed4a 100644 --- a/packages/google-cloud-lifesciences/samples/package.json +++ b/packages/google-cloud-lifesciences/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/life-sciences": "^4.0.0" + "@google-cloud/life-sciences": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-managedidentities/CHANGELOG.md b/packages/google-cloud-managedidentities/CHANGELOG.md index 6c2a234ff77..958d60d1a49 100644 --- a/packages/google-cloud-managedidentities/CHANGELOG.md +++ b/packages/google-cloud-managedidentities/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/managed-identities-v4.0.0...managed-identities-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/managed-identities-v3.3.0...managed-identities-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-managedidentities/package.json b/packages/google-cloud-managedidentities/package.json index 6d54a121611..6e3c16932f2 100644 --- a/packages/google-cloud-managedidentities/package.json +++ b/packages/google-cloud-managedidentities/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/managed-identities", - "version": "4.0.0", + "version": "4.0.1", "description": "Managedidentities client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json index bf8661098fe..e17136738d2 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata.google.cloud.managedidentities.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json index bf8661098fe..e17136738d2 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1/snippet_metadata_google.cloud.managedidentities.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json index 1a48c109310..4e50ca5ceec 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata.google.cloud.managedidentities.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json index 1a48c109310..4e50ca5ceec 100644 --- a/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/snippet_metadata_google.cloud.managedidentities.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedidentities", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedidentities/samples/package.json b/packages/google-cloud-managedidentities/samples/package.json index f42840b6b70..17cb41d5537 100644 --- a/packages/google-cloud-managedidentities/samples/package.json +++ b/packages/google-cloud-managedidentities/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/managed-identities": "^4.0.0" + "@google-cloud/managed-identities": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-managedkafka/CHANGELOG.md b/packages/google-cloud-managedkafka/CHANGELOG.md index c2595f560de..5b769f693ec 100644 --- a/packages/google-cloud-managedkafka/CHANGELOG.md +++ b/packages/google-cloud-managedkafka/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/managedkafka-v0.4.0...managedkafka-v0.5.0) (2025-03-19) + + +### Features + +* [managedkafka] add Managed Kafka Connect API ([#6176](https://github.com/googleapis/google-cloud-node/issues/6176)) ([63b6187](https://github.com/googleapis/google-cloud-node/commit/63b6187b833648213cff66adc29bebb6e3beb1e5)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/managedkafka-v0.3.1...managedkafka-v0.4.0) (2025-03-18) diff --git a/packages/google-cloud-managedkafka/package.json b/packages/google-cloud-managedkafka/package.json index 6fd60ba2d24..1c4fb315295 100644 --- a/packages/google-cloud-managedkafka/package.json +++ b/packages/google-cloud-managedkafka/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/managedkafka", - "version": "0.4.0", + "version": "0.5.0", "description": "Apache Kafka for BigQuery API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json b/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json index 227da4fb7ee..4681920d3b9 100644 --- a/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json +++ b/packages/google-cloud-managedkafka/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-managedkafka", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-managedkafka/samples/package.json b/packages/google-cloud-managedkafka/samples/package.json index dc9bddedbff..3d4c4d7cf1e 100644 --- a/packages/google-cloud-managedkafka/samples/package.json +++ b/packages/google-cloud-managedkafka/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/managedkafka": "^0.4.0" + "@google-cloud/managedkafka": "^0.5.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-mediatranslation/CHANGELOG.md b/packages/google-cloud-mediatranslation/CHANGELOG.md index f7c0ffc51eb..b3e6dcff7da 100644 --- a/packages/google-cloud-mediatranslation/CHANGELOG.md +++ b/packages/google-cloud-mediatranslation/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/media-translation-v5.0.0...media-translation-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/media-translation-v4.3.0...media-translation-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-mediatranslation/package.json b/packages/google-cloud-mediatranslation/package.json index fb07dcbd71f..7bee02299d1 100644 --- a/packages/google-cloud-mediatranslation/package.json +++ b/packages/google-cloud-mediatranslation/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/media-translation", - "version": "5.0.0", + "version": "5.0.1", "description": "Mediatranslation client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json index 0f3b5949424..97ee61e9bae 100644 --- a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json +++ b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata.google.cloud.mediatranslation.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mediatranslation", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json index 0f3b5949424..97ee61e9bae 100644 --- a/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json +++ b/packages/google-cloud-mediatranslation/samples/generated/v1beta1/snippet_metadata_google.cloud.mediatranslation.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mediatranslation", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-mediatranslation/samples/package.json b/packages/google-cloud-mediatranslation/samples/package.json index dcaa3d58b48..80fdcfe402a 100644 --- a/packages/google-cloud-mediatranslation/samples/package.json +++ b/packages/google-cloud-mediatranslation/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/media-translation": "^5.0.0", + "@google-cloud/media-translation": "^5.0.1", "node-record-lpcm16": "1.0.1" }, "devDependencies": { diff --git a/packages/google-cloud-memcache/CHANGELOG.md b/packages/google-cloud-memcache/CHANGELOG.md index f99c5e283ea..21b1edc3178 100644 --- a/packages/google-cloud-memcache/CHANGELOG.md +++ b/packages/google-cloud-memcache/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/memcache-v4.0.0...memcache-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/memcache-v3.3.1...memcache-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-memcache/package.json b/packages/google-cloud-memcache/package.json index 7d6d0ea45e3..6724986cb59 100644 --- a/packages/google-cloud-memcache/package.json +++ b/packages/google-cloud-memcache/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/memcache", - "version": "4.0.0", + "version": "4.0.1", "description": "Memcache client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json index 7be272d41e7..411575ffa0e 100644 --- a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json +++ b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata.google.cloud.memcache.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json index 7be272d41e7..411575ffa0e 100644 --- a/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json +++ b/packages/google-cloud-memcache/samples/generated/v1/snippet_metadata_google.cloud.memcache.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json index b987b8a1c38..30231df73bb 100644 --- a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json +++ b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata.google.cloud.memcache.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json index b987b8a1c38..30231df73bb 100644 --- a/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json +++ b/packages/google-cloud-memcache/samples/generated/v1beta2/snippet_metadata_google.cloud.memcache.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memcache", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memcache/samples/package.json b/packages/google-cloud-memcache/samples/package.json index 8fc03a098de..9030d4fab8f 100644 --- a/packages/google-cloud-memcache/samples/package.json +++ b/packages/google-cloud-memcache/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/memcache": "^4.0.0" + "@google-cloud/memcache": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-memorystore/CHANGELOG.md b/packages/google-cloud-memorystore/CHANGELOG.md index 75cd3622cdc..cc82a857d0c 100644 --- a/packages/google-cloud-memorystore/CHANGELOG.md +++ b/packages/google-cloud-memorystore/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.1](https://github.com/googleapis/google-cloud-node/compare/memorystore-v0.2.0...memorystore-v0.2.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/memorystore-v0.1.1...memorystore-v0.2.0) (2025-03-18) diff --git a/packages/google-cloud-memorystore/package.json b/packages/google-cloud-memorystore/package.json index 32dbe6b0ba1..c7f78e67f3a 100644 --- a/packages/google-cloud-memorystore/package.json +++ b/packages/google-cloud-memorystore/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/memorystore", - "version": "0.2.0", + "version": "0.2.1", "description": "Memorystore API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json b/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json index d04cd332b7b..a76310faebb 100644 --- a/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json +++ b/packages/google-cloud-memorystore/samples/generated/v1/snippet_metadata_google.cloud.memorystore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memorystore", - "version": "0.2.0", + "version": "0.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json b/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json index ff054812155..5c8b1d7e69c 100644 --- a/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json +++ b/packages/google-cloud-memorystore/samples/generated/v1beta/snippet_metadata_google.cloud.memorystore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-memorystore", - "version": "0.2.0", + "version": "0.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-memorystore/samples/package.json b/packages/google-cloud-memorystore/samples/package.json index 72d3ed3b50f..dd7d8a6cb68 100644 --- a/packages/google-cloud-memorystore/samples/package.json +++ b/packages/google-cloud-memorystore/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/memorystore": "^0.2.0" + "@google-cloud/memorystore": "^0.2.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-metastore/CHANGELOG.md b/packages/google-cloud-metastore/CHANGELOG.md index f8fc1ad395a..c85e869eee3 100644 --- a/packages/google-cloud-metastore/CHANGELOG.md +++ b/packages/google-cloud-metastore/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/dataproc-metastore-v5.0.0...dataproc-metastore-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/dataproc-metastore-v4.4.1...dataproc-metastore-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-metastore/package.json b/packages/google-cloud-metastore/package.json index 66e48be6468..b138e4d04e6 100644 --- a/packages/google-cloud-metastore/package.json +++ b/packages/google-cloud-metastore/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataproc-metastore", - "version": "5.0.0", + "version": "5.0.1", "description": "Metastore client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json index b1ed718789b..a317a9add3b 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json +++ b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json index b1ed718789b..a317a9add3b 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json +++ b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata_google.cloud.metastore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json index 62eeffd17de..2ff2eb73a5a 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json index 62eeffd17de..2ff2eb73a5a 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata_google.cloud.metastore.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json index 11d75c7aabd..58aa74908e0 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json +++ b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json index 11d75c7aabd..58aa74908e0 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json +++ b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata_google.cloud.metastore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/package.json b/packages/google-cloud-metastore/samples/package.json index 1c4956ba747..e7fb6b1efe4 100644 --- a/packages/google-cloud-metastore/samples/package.json +++ b/packages/google-cloud-metastore/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataproc-metastore": "^5.0.0" + "@google-cloud/dataproc-metastore": "^5.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-migrationcenter/CHANGELOG.md b/packages/google-cloud-migrationcenter/CHANGELOG.md index f1417362dc3..98b11a02792 100644 --- a/packages/google-cloud-migrationcenter/CHANGELOG.md +++ b/packages/google-cloud-migrationcenter/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/migrationcenter-v2.0.0...migrationcenter-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/migrationcenter-v1.4.1...migrationcenter-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-migrationcenter/package.json b/packages/google-cloud-migrationcenter/package.json index 2530349ff8c..79fdf74d23a 100644 --- a/packages/google-cloud-migrationcenter/package.json +++ b/packages/google-cloud-migrationcenter/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/migrationcenter", - "version": "2.0.0", + "version": "2.0.1", "description": "Migration Center API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json index cc0d7d22b55..f406762311f 100644 --- a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json +++ b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata.google.cloud.migrationcenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migrationcenter", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json index cc0d7d22b55..f406762311f 100644 --- a/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json +++ b/packages/google-cloud-migrationcenter/samples/generated/v1/snippet_metadata_google.cloud.migrationcenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-migrationcenter", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-migrationcenter/samples/package.json b/packages/google-cloud-migrationcenter/samples/package.json index 201dd2dc6b8..74cfbf231ed 100644 --- a/packages/google-cloud-migrationcenter/samples/package.json +++ b/packages/google-cloud-migrationcenter/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/migrationcenter": "^2.0.0" + "@google-cloud/migrationcenter": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-modelarmor/CHANGELOG.md b/packages/google-cloud-modelarmor/CHANGELOG.md index 698e1cd2d34..f78a132b1cd 100644 --- a/packages/google-cloud-modelarmor/CHANGELOG.md +++ b/packages/google-cloud-modelarmor/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.1.1](https://github.com/googleapis/google-cloud-node/compare/modelarmor-v0.1.0...modelarmor-v0.1.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## 0.1.0 (2025-03-18) diff --git a/packages/google-cloud-modelarmor/package.json b/packages/google-cloud-modelarmor/package.json index 2bc2724134a..4789bd4cb25 100644 --- a/packages/google-cloud-modelarmor/package.json +++ b/packages/google-cloud-modelarmor/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/modelarmor", - "version": "0.1.0", + "version": "0.1.1", "description": "Model Armor API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json b/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json index 4a45efbb0b9..98c5da6479d 100644 --- a/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json +++ b/packages/google-cloud-modelarmor/samples/generated/v1/snippet_metadata_google.cloud.modelarmor.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-modelarmor", - "version": "0.1.0", + "version": "0.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-modelarmor/samples/package.json b/packages/google-cloud-modelarmor/samples/package.json index 91e3f9a7e29..b80e5eb9317 100644 --- a/packages/google-cloud-modelarmor/samples/package.json +++ b/packages/google-cloud-modelarmor/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/modelarmor": "^0.1.0" + "@google-cloud/modelarmor": "^0.1.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 7ad495f9e6a..841433f6f42 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/monitoring-v5.0.0...monitoring-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/monitoring-v4.1.0...monitoring-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index cb1caa6802d..371764ac752 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 85536d07213..d47621fde8a 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^5.0.0", + "@google-cloud/monitoring": "^5.0.1", "yargs": "^17.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-netapp/CHANGELOG.md b/packages/google-cloud-netapp/CHANGELOG.md index 37a2e327296..d74c317930a 100644 --- a/packages/google-cloud-netapp/CHANGELOG.md +++ b/packages/google-cloud-netapp/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.10.1](https://github.com/googleapis/google-cloud-node/compare/netapp-v0.10.0...netapp-v0.10.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [0.10.0](https://github.com/googleapis/google-cloud-node/compare/netapp-v0.9.0...netapp-v0.10.0) (2025-03-18) diff --git a/packages/google-cloud-netapp/package.json b/packages/google-cloud-netapp/package.json index a8b7c28a931..05181b93f0c 100644 --- a/packages/google-cloud-netapp/package.json +++ b/packages/google-cloud-netapp/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/netapp", - "version": "0.10.0", + "version": "0.10.1", "description": "NetApp API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json index e9c430befc1..f7308aedbfe 100644 --- a/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json +++ b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-netapp", - "version": "0.10.0", + "version": "0.10.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-netapp/samples/package.json b/packages/google-cloud-netapp/samples/package.json index 5c0e980c2ed..1ba05cf7723 100644 --- a/packages/google-cloud-netapp/samples/package.json +++ b/packages/google-cloud-netapp/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/netapp": "^0.10.0" + "@google-cloud/netapp": "^0.10.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-networkconnectivity/CHANGELOG.md b/packages/google-cloud-networkconnectivity/CHANGELOG.md index bdc5954f9cc..5f960b15cd0 100644 --- a/packages/google-cloud-networkconnectivity/CHANGELOG.md +++ b/packages/google-cloud-networkconnectivity/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/network-connectivity-v4.0.0...network-connectivity-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/network-connectivity-v3.6.1...network-connectivity-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-networkconnectivity/package.json b/packages/google-cloud-networkconnectivity/package.json index 414ad2e12f5..135c8c33b84 100644 --- a/packages/google-cloud-networkconnectivity/package.json +++ b/packages/google-cloud-networkconnectivity/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/network-connectivity", - "version": "4.0.0", + "version": "4.0.1", "description": "Networkconnectivity client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json index df25f9ac4b4..ec7f3638208 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata.google.cloud.networkconnectivity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json index c5d7adc21a0..0b9ec3cb9f9 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1/snippet_metadata_google.cloud.networkconnectivity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json index d4c5eaf9466..126bc4090d1 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata.google.cloud.networkconnectivity.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json index d4c5eaf9466..126bc4090d1 100644 --- a/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json +++ b/packages/google-cloud-networkconnectivity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networkconnectivity.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkconnectivity", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkconnectivity/samples/package.json b/packages/google-cloud-networkconnectivity/samples/package.json index 8e608be2ddd..58514c6ddb0 100644 --- a/packages/google-cloud-networkconnectivity/samples/package.json +++ b/packages/google-cloud-networkconnectivity/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/network-connectivity": "^4.0.0" + "@google-cloud/network-connectivity": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-networkmanagement/CHANGELOG.md b/packages/google-cloud-networkmanagement/CHANGELOG.md index 3705c980ffb..d525e57cc7f 100644 --- a/packages/google-cloud-networkmanagement/CHANGELOG.md +++ b/packages/google-cloud-networkmanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/network-management-v4.0.0...network-management-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/network-management-v3.11.1...network-management-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-networkmanagement/package.json b/packages/google-cloud-networkmanagement/package.json index b7d3d1b85a6..cb4446d5378 100644 --- a/packages/google-cloud-networkmanagement/package.json +++ b/packages/google-cloud-networkmanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/network-management", - "version": "4.0.0", + "version": "4.0.1", "description": "networkmanagement client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json index 290e64a0d4a..ed91892c729 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json index dc8bea74d87..ccb13d07602 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json index 2cd3b6e786a..99b58d34bc5 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json index b123048fc44..39c4b89f41f 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/package.json b/packages/google-cloud-networkmanagement/samples/package.json index d3fdd3525b1..04953c6daa3 100644 --- a/packages/google-cloud-networkmanagement/samples/package.json +++ b/packages/google-cloud-networkmanagement/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/network-management": "^4.0.0" + "@google-cloud/network-management": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-networksecurity/CHANGELOG.md b/packages/google-cloud-networksecurity/CHANGELOG.md index 14276599f62..ce9c46885cc 100644 --- a/packages/google-cloud-networksecurity/CHANGELOG.md +++ b/packages/google-cloud-networksecurity/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.0.1](https://github.com/googleapis/google-cloud-node/compare/network-security-v3.0.0...network-security-v3.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6186](https://github.com/googleapis/google-cloud-node/issues/6186)) ([dcfc7b4](https://github.com/googleapis/google-cloud-node/commit/dcfc7b492a2ac3fb86b93ae1375bac1c5153d049)) + ## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/network-security-v2.3.1...network-security-v3.0.0) (2025-03-18) diff --git a/packages/google-cloud-networksecurity/package.json b/packages/google-cloud-networksecurity/package.json index 989f574a8ac..e06284ee789 100644 --- a/packages/google-cloud-networksecurity/package.json +++ b/packages/google-cloud-networksecurity/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/network-security", - "version": "3.0.0", + "version": "3.0.1", "description": "networksecurity client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json index 9bb3950413c..e0ee93be3bb 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json index 9bb3950413c..e0ee93be3bb 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json index 402d2410d45..45469fc57e3 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json index 402d2410d45..45469fc57e3 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/package.json b/packages/google-cloud-networksecurity/samples/package.json index dbaec9e74bf..010e6c95892 100644 --- a/packages/google-cloud-networksecurity/samples/package.json +++ b/packages/google-cloud-networksecurity/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/network-security": "^3.0.0" + "@google-cloud/network-security": "^3.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-oracledatabase/CHANGELOG.md b/packages/google-cloud-oracledatabase/CHANGELOG.md index 6245d705742..e789599f0b8 100644 --- a/packages/google-cloud-oracledatabase/CHANGELOG.md +++ b/packages/google-cloud-oracledatabase/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/oracledatabase-v0.3.0...oracledatabase-v0.4.0) (2025-03-19) + + +### Features + +* [oracledatabase] add enum value `State::NOT_APPROVED_IN_PRIVATE_MARKETPLACE` ([#6162](https://github.com/googleapis/google-cloud-node/issues/6162)) ([336ec31](https://github.com/googleapis/google-cloud-node/commit/336ec3119f2c1964b3d43ed23fba880ab4658b20)) + ## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/oracledatabase-v0.2.1...oracledatabase-v0.3.0) (2025-03-18) diff --git a/packages/google-cloud-oracledatabase/package.json b/packages/google-cloud-oracledatabase/package.json index 52b1834e11a..c8ec84ee291 100644 --- a/packages/google-cloud-oracledatabase/package.json +++ b/packages/google-cloud-oracledatabase/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/oracledatabase", - "version": "0.3.0", + "version": "0.4.0", "description": "Oracle Database@Google Cloud API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json b/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json index 5d6a9b0aedc..2252ae4e63b 100644 --- a/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json +++ b/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-oracledatabase", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-oracledatabase/samples/package.json b/packages/google-cloud-oracledatabase/samples/package.json index 1ddd47d6c81..c9af3cf7152 100644 --- a/packages/google-cloud-oracledatabase/samples/package.json +++ b/packages/google-cloud-oracledatabase/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/oracledatabase": "^0.3.0" + "@google-cloud/oracledatabase": "^0.4.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-resourcemanager/CHANGELOG.md b/packages/google-cloud-resourcemanager/CHANGELOG.md index 7924fccfb54..febfbc7e1b8 100644 --- a/packages/google-cloud-resourcemanager/CHANGELOG.md +++ b/packages/google-cloud-resourcemanager/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/resource-manager?activeTab=versions +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/resource-manager-v6.0.0...resource-manager-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/resource-manager-v5.3.1...resource-manager-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-resourcemanager/package.json b/packages/google-cloud-resourcemanager/package.json index 819697cbe90..66dd5eea96f 100644 --- a/packages/google-cloud-resourcemanager/package.json +++ b/packages/google-cloud-resourcemanager/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/resource-manager", "description": "Cloud Resource Manager Client Library for Node.js", - "version": "6.0.0", + "version": "6.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json index f9f83357a4f..7fc4c7ae472 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-resourcemanager", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json index f9f83357a4f..7fc4c7ae472 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata_google.cloud.resourcemanager.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-resourcemanager", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-resourcemanager/samples/package.json b/packages/google-cloud-resourcemanager/samples/package.json index 198f444b326..fdde51d7cb7 100644 --- a/packages/google-cloud-resourcemanager/samples/package.json +++ b/packages/google-cloud-resourcemanager/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout=600000" }, "dependencies": { - "@google-cloud/resource-manager": "^6.0.0" + "@google-cloud/resource-manager": "^6.0.1" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-retail/CHANGELOG.md b/packages/google-cloud-retail/CHANGELOG.md index 61c9593e1e2..1671a880d0e 100644 --- a/packages/google-cloud-retail/CHANGELOG.md +++ b/packages/google-cloud-retail/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/retail-v4.0.0...retail-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/retail-v3.6.1...retail-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-retail/package.json b/packages/google-cloud-retail/package.json index 5bf50ce383d..73f30f0e2a1 100644 --- a/packages/google-cloud-retail/package.json +++ b/packages/google-cloud-retail/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/retail", - "version": "4.0.0", + "version": "4.0.1", "description": "Retail client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json index 6740b94d1da..5d0dd809c04 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json index eb684d04a3e..f2c2b32dbbb 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json index 40fc1082191..6cbf6291158 100644 --- a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json +++ b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json index a96c8cd91a0..9a61e64e34d 100644 --- a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json +++ b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json index 5727069462f..433834d8f21 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json index ca6fb4ec77b..c21b265012f 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/package.json b/packages/google-cloud-retail/samples/package.json index b1afae04409..13231beb952 100644 --- a/packages/google-cloud-retail/samples/package.json +++ b/packages/google-cloud-retail/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha" }, "dependencies": { - "@google-cloud/retail": "^4.0.0", + "@google-cloud/retail": "^4.0.1", "@google-cloud/bigquery": "^7.0.0", "@google-cloud/storage": "^7.0.0" }, diff --git a/packages/google-cloud-run/CHANGELOG.md b/packages/google-cloud-run/CHANGELOG.md index 87f836a46e3..5048849d53f 100644 --- a/packages/google-cloud-run/CHANGELOG.md +++ b/packages/google-cloud-run/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/run-v2.0.0...run-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/run-v1.5.1...run-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-run/package.json b/packages/google-cloud-run/package.json index f900caf08f8..c4bd772421f 100644 --- a/packages/google-cloud-run/package.json +++ b/packages/google-cloud-run/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/run", - "version": "2.0.0", + "version": "2.0.1", "description": "Cloud Run Admin API", "repository": { "type": "git", diff --git a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json index cb5632d6760..ef998948ba3 100644 --- a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json +++ b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-run", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json b/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json index 672fd5512c9..37421d4ec90 100644 --- a/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json +++ b/packages/google-cloud-run/samples/generated/v2/snippet_metadata_google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-run", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-run/samples/package.json b/packages/google-cloud-run/samples/package.json index 54d2806c4a6..2ef009bbf48 100644 --- a/packages/google-cloud-run/samples/package.json +++ b/packages/google-cloud-run/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/run": "^2.0.0" + "@google-cloud/run": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-scheduler/CHANGELOG.md b/packages/google-cloud-scheduler/CHANGELOG.md index 9a88733ba75..46b2db41dac 100644 --- a/packages/google-cloud-scheduler/CHANGELOG.md +++ b/packages/google-cloud-scheduler/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/scheduler?activeTab=versions +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/scheduler-v5.0.0...scheduler-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/scheduler-v4.3.0...scheduler-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-scheduler/package.json b/packages/google-cloud-scheduler/package.json index 1b151d76e9c..58724839ac0 100644 --- a/packages/google-cloud-scheduler/package.json +++ b/packages/google-cloud-scheduler/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/scheduler", "description": "Cloud Scheduler API client for Node.js", - "version": "5.0.0", + "version": "5.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json index 15df73b1bae..5d5ad1f1cc7 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata.google.cloud.scheduler.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json index 2a3b6194ae3..ff7748924cf 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1/snippet_metadata_google.cloud.scheduler.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json index b0e55669b61..2defa2e996e 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata.google.cloud.scheduler.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json index b0e55669b61..2defa2e996e 100644 --- a/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json +++ b/packages/google-cloud-scheduler/samples/generated/v1beta1/snippet_metadata_google.cloud.scheduler.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-scheduler", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-scheduler/samples/package.json b/packages/google-cloud-scheduler/samples/package.json index bae513abce2..1f727bd3d1b 100644 --- a/packages/google-cloud-scheduler/samples/package.json +++ b/packages/google-cloud-scheduler/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 10000 --exit" }, "dependencies": { - "@google-cloud/scheduler": "^5.0.0", + "@google-cloud/scheduler": "^5.0.1", "body-parser": "^1.18.3", "express": "^4.16.4" }, diff --git a/packages/google-cloud-secretmanager/CHANGELOG.md b/packages/google-cloud-secretmanager/CHANGELOG.md index 4fceba1ac4a..3de03226558 100644 --- a/packages/google-cloud-secretmanager/CHANGELOG.md +++ b/packages/google-cloud-secretmanager/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/secret-manager-v6.0.0...secret-manager-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/secret-manager-v5.6.0...secret-manager-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-secretmanager/package.json b/packages/google-cloud-secretmanager/package.json index 239ef2a5c72..37e2c21a8cf 100644 --- a/packages/google-cloud-secretmanager/package.json +++ b/packages/google-cloud-secretmanager/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/secret-manager", - "version": "6.0.0", + "version": "6.0.1", "description": "Secrets client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json index cac04cc27b6..1cbfd88989f 100644 --- a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json +++ b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata.google.cloud.secretmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-secretmanager", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json index b388ae5b6a1..aa1a8d3a6ca 100644 --- a/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json +++ b/packages/google-cloud-secretmanager/samples/generated/v1/snippet_metadata_google.cloud.secretmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-secretmanager", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json b/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json index 0cb862e353a..7e5ed28ee25 100644 --- a/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json +++ b/packages/google-cloud-secretmanager/samples/generated/v1beta2/snippet_metadata_google.cloud.secretmanager.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-secretmanager", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-secretmanager/samples/package.json b/packages/google-cloud-secretmanager/samples/package.json index 8af02c24665..ebce66571e0 100644 --- a/packages/google-cloud-secretmanager/samples/package.json +++ b/packages/google-cloud-secretmanager/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --recursive test/ --timeout=800000" }, "dependencies": { - "@google-cloud/secret-manager": "^6.0.0" + "@google-cloud/secret-manager": "^6.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-securesourcemanager/CHANGELOG.md b/packages/google-cloud-securesourcemanager/CHANGELOG.md index c6180c42510..bc3c543b872 100644 --- a/packages/google-cloud-securesourcemanager/CHANGELOG.md +++ b/packages/google-cloud-securesourcemanager/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.5.1](https://github.com/googleapis/google-cloud-node/compare/securesourcemanager-v0.5.0...securesourcemanager-v0.5.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/securesourcemanager-v0.4.1...securesourcemanager-v0.5.0) (2025-03-18) diff --git a/packages/google-cloud-securesourcemanager/package.json b/packages/google-cloud-securesourcemanager/package.json index 352f58dd2ca..ee4b5395aeb 100644 --- a/packages/google-cloud-securesourcemanager/package.json +++ b/packages/google-cloud-securesourcemanager/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/securesourcemanager", - "version": "0.5.0", + "version": "0.5.1", "description": "Secure Source Manager API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json b/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json index a069a791088..0a6ad9bc52c 100644 --- a/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json +++ b/packages/google-cloud-securesourcemanager/samples/generated/v1/snippet_metadata_google.cloud.securesourcemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securesourcemanager", - "version": "0.5.0", + "version": "0.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securesourcemanager/samples/package.json b/packages/google-cloud-securesourcemanager/samples/package.json index 1d39f194f78..a34166a6228 100644 --- a/packages/google-cloud-securesourcemanager/samples/package.json +++ b/packages/google-cloud-securesourcemanager/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/securesourcemanager": "^0.5.0" + "@google-cloud/securesourcemanager": "^0.5.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 1becf36e44c..2cd8a18c9a0 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/security-private-ca-v6.0.0...security-private-ca-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/security-private-ca-v5.4.1...security-private-ca-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 8480dbefab9..fb07d2b27e7 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "6.0.0", + "version": "6.0.1", "description": "Privateca client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index 08c681034d8..eb1ba61975a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json index d33e07f5660..a13f2b34b27 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata_google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index 6500438ad49..9725b39275a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json index 6500438ad49..9725b39275a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 2059537e458..8aa14f85238 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^6.0.0" + "@google-cloud/security-private-ca": "^6.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-security-publicca/CHANGELOG.md b/packages/google-cloud-security-publicca/CHANGELOG.md index b2025934e3f..7ec9352dcfc 100644 --- a/packages/google-cloud-security-publicca/CHANGELOG.md +++ b/packages/google-cloud-security-publicca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/publicca-v2.0.0...publicca-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/publicca-v1.3.0...publicca-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-security-publicca/package.json b/packages/google-cloud-security-publicca/package.json index 8744d63d772..cff9c0023c7 100644 --- a/packages/google-cloud-security-publicca/package.json +++ b/packages/google-cloud-security-publicca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/publicca", - "version": "2.0.0", + "version": "2.0.1", "description": "Public Certificate Authority client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json b/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json index 55a6cf9e925..855791e0dd8 100644 --- a/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json +++ b/packages/google-cloud-security-publicca/samples/generated/v1/snippet_metadata_google.cloud.security.publicca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publicca", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json index 9b6ecd554d8..3a7b7ccc50a 100644 --- a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json +++ b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.publicca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publicca", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json index 9b6ecd554d8..3a7b7ccc50a 100644 --- a/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json +++ b/packages/google-cloud-security-publicca/samples/generated/v1beta1/snippet_metadata_google.cloud.security.publicca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-publicca", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-publicca/samples/package.json b/packages/google-cloud-security-publicca/samples/package.json index ced175ddff0..7781d15f246 100644 --- a/packages/google-cloud-security-publicca/samples/package.json +++ b/packages/google-cloud-security-publicca/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/publicca": "^2.0.0" + "@google-cloud/publicca": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-securitycenter/CHANGELOG.md b/packages/google-cloud-securitycenter/CHANGELOG.md index 4c3d96caaa4..bdd2821dc10 100644 --- a/packages/google-cloud-securitycenter/CHANGELOG.md +++ b/packages/google-cloud-securitycenter/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/security-center?activeTab=versions +## [9.0.1](https://github.com/googleapis/google-cloud-node/compare/security-center-v9.0.0...security-center-v9.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [9.0.0](https://github.com/googleapis/google-cloud-node/compare/security-center-v8.12.1...security-center-v9.0.0) (2025-03-18) diff --git a/packages/google-cloud-securitycenter/package.json b/packages/google-cloud-securitycenter/package.json index 955e17c9a57..1cd2d113098 100644 --- a/packages/google-cloud-securitycenter/package.json +++ b/packages/google-cloud-securitycenter/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/security-center", "description": "Cloud Security Command Center API client for Node.js", - "version": "9.0.0", + "version": "9.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json index f9fee0f8b2c..e8e08f24187 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json index ac4a8d0c0ec..a7499150502 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json index 38f02e2817e..32f59cdfd55 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json index 38f02e2817e..32f59cdfd55 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json index c3253a9698b..0bb5b6e2393 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json index c3253a9698b..0bb5b6e2393 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json index 67f349c1e9e..f06c48a903e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json +++ b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/package.json b/packages/google-cloud-securitycenter/samples/package.json index 209608fa6fa..aeacd5c5e5c 100644 --- a/packages/google-cloud-securitycenter/samples/package.json +++ b/packages/google-cloud-securitycenter/samples/package.json @@ -14,7 +14,7 @@ "license": "Apache-2.0", "dependencies": { "@google-cloud/pubsub": "^4.0.0", - "@google-cloud/security-center": "^9.0.0" + "@google-cloud/security-center": "^9.0.1" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-securitycentermanagement/CHANGELOG.md b/packages/google-cloud-securitycentermanagement/CHANGELOG.md index 1cd4375878e..6262e5a1d25 100644 --- a/packages/google-cloud-securitycentermanagement/CHANGELOG.md +++ b/packages/google-cloud-securitycentermanagement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.1](https://github.com/googleapis/google-cloud-node/compare/securitycentermanagement-v0.6.0...securitycentermanagement-v0.6.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/securitycentermanagement-v0.5.0...securitycentermanagement-v0.6.0) (2025-03-18) diff --git a/packages/google-cloud-securitycentermanagement/package.json b/packages/google-cloud-securitycentermanagement/package.json index e21725048f6..adf7820ad68 100644 --- a/packages/google-cloud-securitycentermanagement/package.json +++ b/packages/google-cloud-securitycentermanagement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/securitycentermanagement", - "version": "0.6.0", + "version": "0.6.1", "description": "Security Center Management API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json b/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json index 8b479ccc5f8..cd7c411dbb9 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycentermanagement", - "version": "0.6.0", + "version": "0.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycentermanagement/samples/package.json b/packages/google-cloud-securitycentermanagement/samples/package.json index 626c420427c..932048e6c92 100644 --- a/packages/google-cloud-securitycentermanagement/samples/package.json +++ b/packages/google-cloud-securitycentermanagement/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/securitycentermanagement": "^0.6.0" + "@google-cloud/securitycentermanagement": "^0.6.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-servicedirectory/CHANGELOG.md b/packages/google-cloud-servicedirectory/CHANGELOG.md index f7aa5f951e3..defbcfc3d1e 100644 --- a/packages/google-cloud-servicedirectory/CHANGELOG.md +++ b/packages/google-cloud-servicedirectory/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/service-directory-v6.0.0...service-directory-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/service-directory-v5.3.0...service-directory-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-servicedirectory/package.json b/packages/google-cloud-servicedirectory/package.json index 262c8f18444..cf728241afc 100644 --- a/packages/google-cloud-servicedirectory/package.json +++ b/packages/google-cloud-servicedirectory/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-directory", - "version": "6.0.0", + "version": "6.0.1", "description": "Servicedirectory client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json index e46b22b3849..18533c04e7b 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata.google.cloud.servicedirectory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json index e46b22b3849..18533c04e7b 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1/snippet_metadata_google.cloud.servicedirectory.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json index 62d54fdb4be..73e8629e349 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata.google.cloud.servicedirectory.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json index 62d54fdb4be..73e8629e349 100644 --- a/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json +++ b/packages/google-cloud-servicedirectory/samples/generated/v1beta1/snippet_metadata_google.cloud.servicedirectory.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicedirectory", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicedirectory/samples/package.json b/packages/google-cloud-servicedirectory/samples/package.json index 90dd48a043b..72a1bfc6db0 100644 --- a/packages/google-cloud-servicedirectory/samples/package.json +++ b/packages/google-cloud-servicedirectory/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-directory": "^6.0.0", + "@google-cloud/service-directory": "^6.0.1", "eslint": "^8.0.0", "json-schema": "^0.4.0", "uuid": "^9.0.0" diff --git a/packages/google-cloud-servicehealth/CHANGELOG.md b/packages/google-cloud-servicehealth/CHANGELOG.md index 04209defb9e..25ad6fe2c5a 100644 --- a/packages/google-cloud-servicehealth/CHANGELOG.md +++ b/packages/google-cloud-servicehealth/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.1](https://github.com/googleapis/google-cloud-node/compare/servicehealth-v0.6.0...servicehealth-v0.6.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/servicehealth-v0.5.0...servicehealth-v0.6.0) (2025-03-18) diff --git a/packages/google-cloud-servicehealth/package.json b/packages/google-cloud-servicehealth/package.json index 70f87cd1437..277ac285c90 100644 --- a/packages/google-cloud-servicehealth/package.json +++ b/packages/google-cloud-servicehealth/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/servicehealth", - "version": "0.6.0", + "version": "0.6.1", "description": "Service Health API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json b/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json index fecdc17c918..16acbce184e 100644 --- a/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json +++ b/packages/google-cloud-servicehealth/samples/generated/v1/snippet_metadata_google.cloud.servicehealth.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicehealth", - "version": "0.6.0", + "version": "0.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-servicehealth/samples/package.json b/packages/google-cloud-servicehealth/samples/package.json index bbb3354812e..56fef59d28f 100644 --- a/packages/google-cloud-servicehealth/samples/package.json +++ b/packages/google-cloud-servicehealth/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/servicehealth": "^0.6.0" + "@google-cloud/servicehealth": "^0.6.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-shell/CHANGELOG.md b/packages/google-cloud-shell/CHANGELOG.md index 3a88759a55d..b526bb9c99d 100644 --- a/packages/google-cloud-shell/CHANGELOG.md +++ b/packages/google-cloud-shell/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/shell-v4.0.0...shell-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/shell-v3.3.1...shell-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index 5c5918ba7aa..093aa0f9ae8 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/shell", - "version": "4.0.0", + "version": "4.0.1", "description": "cloudshell client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json index 259ac2b978f..330102921d1 100644 --- a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json +++ b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata.google.cloud.shell.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-shell", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json index 259ac2b978f..330102921d1 100644 --- a/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json +++ b/packages/google-cloud-shell/samples/generated/v1/snippet_metadata_google.cloud.shell.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-shell", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-shell/samples/package.json b/packages/google-cloud-shell/samples/package.json index 0e71190d466..5088d12a763 100644 --- a/packages/google-cloud-shell/samples/package.json +++ b/packages/google-cloud-shell/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/shell": "^4.0.0" + "@google-cloud/shell": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-speech/CHANGELOG.md b/packages/google-cloud-speech/CHANGELOG.md index 5214b6416e1..e74ae39c2d0 100644 --- a/packages/google-cloud-speech/CHANGELOG.md +++ b/packages/google-cloud-speech/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/speech?activeTab=versions +## [7.0.1](https://github.com/googleapis/google-cloud-node/compare/speech-v7.0.0...speech-v7.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) +* **deps:** Update dependency proto3-json-serializer to v3 ([#6131](https://github.com/googleapis/google-cloud-node/issues/6131)) ([73110e2](https://github.com/googleapis/google-cloud-node/commit/73110e21283ed2e54ae2ae721497a98caa9b8df0)) + ## [7.0.0](https://github.com/googleapis/google-cloud-node/compare/speech-v6.7.1...speech-v7.0.0) (2025-03-18) diff --git a/packages/google-cloud-speech/package.json b/packages/google-cloud-speech/package.json index c72ea7ae694..75cc89af560 100644 --- a/packages/google-cloud-speech/package.json +++ b/packages/google-cloud-speech/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/speech", "description": "Cloud Speech Client Library for Node.js", - "version": "7.0.0", + "version": "7.0.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { diff --git a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json index c112115ef5b..5e776b55928 100644 --- a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json +++ b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json index c112115ef5b..5e776b55928 100644 --- a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json +++ b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata_google.cloud.speech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json index 6fd3cc0c8c0..d2724b1a736 100644 --- a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json +++ b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json index 6fd3cc0c8c0..d2724b1a736 100644 --- a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json +++ b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata_google.cloud.speech.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json index fb2ec2301ea..03a0e552a57 100644 --- a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json +++ b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json index fb2ec2301ea..03a0e552a57 100644 --- a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json +++ b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata_google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/package.json b/packages/google-cloud-speech/samples/package.json index 1a0a8422723..6b87e90ec8c 100644 --- a/packages/google-cloud-speech/samples/package.json +++ b/packages/google-cloud-speech/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout 600000" }, "dependencies": { - "@google-cloud/speech": "^7.0.0", + "@google-cloud/speech": "^7.0.1", "@google-cloud/storage": "^7.0.0", "chalk": "^5.0.0", "fs.promises": "^0.1.2", diff --git a/packages/google-cloud-sql/CHANGELOG.md b/packages/google-cloud-sql/CHANGELOG.md index c7f47a614d0..cbdbddfe7cf 100644 --- a/packages/google-cloud-sql/CHANGELOG.md +++ b/packages/google-cloud-sql/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.20.1](https://github.com/googleapis/google-cloud-node/compare/sql-v0.20.0...sql-v0.20.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [0.20.0](https://github.com/googleapis/google-cloud-node/compare/sql-v0.19.1...sql-v0.20.0) (2025-03-18) diff --git a/packages/google-cloud-sql/package.json b/packages/google-cloud-sql/package.json index cb10498eaaf..0d534f78732 100644 --- a/packages/google-cloud-sql/package.json +++ b/packages/google-cloud-sql/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/sql", - "version": "0.20.0", + "version": "0.20.1", "description": "Sql client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json b/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json index 53c2687a994..58a68a93fab 100644 --- a/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json +++ b/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-sql", - "version": "0.20.0", + "version": "0.20.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json b/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json index 9a77989b38c..2bbf1acadf3 100644 --- a/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json +++ b/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-sql", - "version": "0.20.0", + "version": "0.20.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-sql/samples/package.json b/packages/google-cloud-sql/samples/package.json index 448c8bd1442..1957d056145 100644 --- a/packages/google-cloud-sql/samples/package.json +++ b/packages/google-cloud-sql/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/sql": "^0.20.0" + "@google-cloud/sql": "^0.20.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-storageinsights/CHANGELOG.md b/packages/google-cloud-storageinsights/CHANGELOG.md index 40b2c80e5d0..62160f6eccf 100644 --- a/packages/google-cloud-storageinsights/CHANGELOG.md +++ b/packages/google-cloud-storageinsights/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/storageinsights-v2.0.0...storageinsights-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/storageinsights-v1.3.0...storageinsights-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-storageinsights/package.json b/packages/google-cloud-storageinsights/package.json index 1fb5e254862..2dafd8935aa 100644 --- a/packages/google-cloud-storageinsights/package.json +++ b/packages/google-cloud-storageinsights/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/storageinsights", - "version": "2.0.0", + "version": "2.0.1", "description": "Storage Insights API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json index 9a86d0ac9c9..8906d9c79ef 100644 --- a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json +++ b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-storageinsights", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json index 9a86d0ac9c9..8906d9c79ef 100644 --- a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json +++ b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata_google.cloud.storageinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-storageinsights", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-storageinsights/samples/package.json b/packages/google-cloud-storageinsights/samples/package.json index cddfabf945e..22ed47062d1 100644 --- a/packages/google-cloud-storageinsights/samples/package.json +++ b/packages/google-cloud-storageinsights/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/storageinsights": "^2.0.0" + "@google-cloud/storageinsights": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-support/CHANGELOG.md b/packages/google-cloud-support/CHANGELOG.md index 9e994cd916a..59a387a456e 100644 --- a/packages/google-cloud-support/CHANGELOG.md +++ b/packages/google-cloud-support/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/support-v2.0.0...support-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/support-v1.3.0...support-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-support/package.json b/packages/google-cloud-support/package.json index 58aac0710d8..a7857d14d3a 100644 --- a/packages/google-cloud-support/package.json +++ b/packages/google-cloud-support/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/support", - "version": "2.0.0", + "version": "2.0.1", "description": "Google Cloud Support API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json b/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json index d4a3d8aab32..c1eabb26806 100644 --- a/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json +++ b/packages/google-cloud-support/samples/generated/v2/snippet_metadata.google.cloud.support.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-support", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json b/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json index d4a3d8aab32..c1eabb26806 100644 --- a/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json +++ b/packages/google-cloud-support/samples/generated/v2/snippet_metadata_google.cloud.support.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-support", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-support/samples/package.json b/packages/google-cloud-support/samples/package.json index 64c9b4b9f0c..faa41820826 100644 --- a/packages/google-cloud-support/samples/package.json +++ b/packages/google-cloud-support/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/support": "^2.0.0" + "@google-cloud/support": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-talent/CHANGELOG.md b/packages/google-cloud-talent/CHANGELOG.md index 262fc1b6878..41a4ec0945a 100644 --- a/packages/google-cloud-talent/CHANGELOG.md +++ b/packages/google-cloud-talent/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/talent?activeTab=versions +## [7.0.1](https://github.com/googleapis/google-cloud-node/compare/talent-v7.0.0...talent-v7.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [7.0.0](https://github.com/googleapis/google-cloud-node/compare/talent-v6.4.1...talent-v7.0.0) (2025-03-18) diff --git a/packages/google-cloud-talent/package.json b/packages/google-cloud-talent/package.json index 2afd7163b26..c25971471c4 100644 --- a/packages/google-cloud-talent/package.json +++ b/packages/google-cloud-talent/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/talent", "description": "Cloud Talent Solution API client for Node.js", - "version": "7.0.0", + "version": "7.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json index 14ea331efc1..46a36dbaad3 100644 --- a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json +++ b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json index be282e3ceb2..6807a5328db 100644 --- a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json +++ b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata_google.cloud.talent.v4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json index 2cf2ad5cabf..49f14512720 100644 --- a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json +++ b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json index bca31bf5b0c..d6d7362dc42 100644 --- a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json +++ b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata_google.cloud.talent.v4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "7.0.0", + "version": "7.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/package.json b/packages/google-cloud-talent/samples/package.json index f5a3bdc6cf1..f33be3d9198 100644 --- a/packages/google-cloud-talent/samples/package.json +++ b/packages/google-cloud-talent/samples/package.json @@ -17,7 +17,7 @@ "lint:fix": "npm run lint -- --fix" }, "dependencies": { - "@google-cloud/talent": "^7.0.0", + "@google-cloud/talent": "^7.0.1", "uuid": "^9.0.0", "yargs": "^17.0.0" }, diff --git a/packages/google-cloud-tasks/CHANGELOG.md b/packages/google-cloud-tasks/CHANGELOG.md index a21dbddb4dd..13fcd8b359f 100644 --- a/packages/google-cloud-tasks/CHANGELOG.md +++ b/packages/google-cloud-tasks/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-tasks?activeTab=versions +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/tasks-v6.0.0...tasks-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/tasks-v5.5.2...tasks-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-tasks/package.json b/packages/google-cloud-tasks/package.json index aab29ba22b3..ece7526263e 100644 --- a/packages/google-cloud-tasks/package.json +++ b/packages/google-cloud-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/tasks", "description": "Cloud Tasks API client for Node.js", - "version": "6.0.0", + "version": "6.0.1", "license": "Apache-2.0", "author": "Google LLC", "repository": { diff --git a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json index d826ab0152f..fb39d229dc8 100644 --- a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json index d826ab0152f..fb39d229dc8 100644 --- a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json index 37ace2fb8cb..1755ecaff8d 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json index 7ad4252b809..d8958767d44 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json index 1e1966d4ac3..c202cfef950 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json index 3b66251395c..385188bfcb6 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/package.json b/packages/google-cloud-tasks/samples/package.json index 3259a3f066e..12db0e026f6 100644 --- a/packages/google-cloud-tasks/samples/package.json +++ b/packages/google-cloud-tasks/samples/package.json @@ -15,7 +15,7 @@ "start": "node server.js" }, "dependencies": { - "@google-cloud/tasks": "^6.0.0", + "@google-cloud/tasks": "^6.0.1", "body-parser": "^1.18.3", "express": "^4.16.3" }, diff --git a/packages/google-cloud-telcoautomation/CHANGELOG.md b/packages/google-cloud-telcoautomation/CHANGELOG.md index bfa9cc99ece..501a51efbca 100644 --- a/packages/google-cloud-telcoautomation/CHANGELOG.md +++ b/packages/google-cloud-telcoautomation/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/telcoautomation-v0.4.0...telcoautomation-v0.4.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6188](https://github.com/googleapis/google-cloud-node/issues/6188)) ([a73cdbf](https://github.com/googleapis/google-cloud-node/commit/a73cdbfe33d5ba9952f0c87cb9d5d12ee8753dd2)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/telcoautomation-v0.3.1...telcoautomation-v0.4.0) (2025-03-18) diff --git a/packages/google-cloud-telcoautomation/package.json b/packages/google-cloud-telcoautomation/package.json index 09428c6243d..4f6ac6cd1b9 100644 --- a/packages/google-cloud-telcoautomation/package.json +++ b/packages/google-cloud-telcoautomation/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/telcoautomation", - "version": "0.4.0", + "version": "0.4.1", "description": "Telco Automation API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json b/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json index 4f95fc228f7..4474f3bfffe 100644 --- a/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json +++ b/packages/google-cloud-telcoautomation/samples/generated/v1/snippet_metadata_google.cloud.telcoautomation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-telcoautomation", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json b/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json index 8f23e689ff9..4ffe2ce2004 100644 --- a/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json +++ b/packages/google-cloud-telcoautomation/samples/generated/v1alpha1/snippet_metadata_google.cloud.telcoautomation.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-telcoautomation", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-telcoautomation/samples/package.json b/packages/google-cloud-telcoautomation/samples/package.json index 01a90c6d9af..d34df01fcc3 100644 --- a/packages/google-cloud-telcoautomation/samples/package.json +++ b/packages/google-cloud-telcoautomation/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/telcoautomation": "^0.4.0" + "@google-cloud/telcoautomation": "^0.4.1" }, "devDependencies": { "c8": "^8.0.0", diff --git a/packages/google-cloud-texttospeech/CHANGELOG.md b/packages/google-cloud-texttospeech/CHANGELOG.md index 41427283faf..2ec37476718 100644 --- a/packages/google-cloud-texttospeech/CHANGELOG.md +++ b/packages/google-cloud-texttospeech/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/text-to-speech?activeTab=versions +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/text-to-speech-v6.0.0...text-to-speech-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/text-to-speech-v5.8.1...text-to-speech-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-texttospeech/package.json b/packages/google-cloud-texttospeech/package.json index ad5d36d729f..e89b9eb3b8f 100644 --- a/packages/google-cloud-texttospeech/package.json +++ b/packages/google-cloud-texttospeech/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/text-to-speech", "description": "Cloud Text-to-Speech API client for Node.js", - "version": "6.0.0", + "version": "6.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json index d895b3e116c..3fc7c6af285 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json index 2c29ef10a98..e6832b6611c 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata_google.cloud.texttospeech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json index 57d1e82a68a..a988973579b 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json index bcf8f5cc662..361be30a156 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata_google.cloud.texttospeech.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-texttospeech/samples/package.json b/packages/google-cloud-texttospeech/samples/package.json index 3844a56aa7b..fb3516d1ee5 100644 --- a/packages/google-cloud-texttospeech/samples/package.json +++ b/packages/google-cloud-texttospeech/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout=60000" }, "dependencies": { - "@google-cloud/text-to-speech": "^6.0.0", + "@google-cloud/text-to-speech": "^6.0.1", "yargs": "^17.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-tpu/CHANGELOG.md b/packages/google-cloud-tpu/CHANGELOG.md index 9b97a9feea6..dbdc19613e9 100644 --- a/packages/google-cloud-tpu/CHANGELOG.md +++ b/packages/google-cloud-tpu/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/tpu-v4.0.0...tpu-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/tpu-v3.8.1...tpu-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-tpu/package.json b/packages/google-cloud-tpu/package.json index 36400ff1586..1aee04fc463 100644 --- a/packages/google-cloud-tpu/package.json +++ b/packages/google-cloud-tpu/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/tpu", - "version": "4.0.0", + "version": "4.0.1", "description": "tpu client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json index 454b11ec4e4..494259cf9da 100644 --- a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json +++ b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json index 454b11ec4e4..494259cf9da 100644 --- a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json +++ b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata_google.cloud.tpu.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json index 9dbe65504dc..80ea985978e 100644 --- a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json +++ b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json index 7b318ad321e..3431ad89247 100644 --- a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json +++ b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata_google.cloud.tpu.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json index 22223d23921..7fc0beba0bc 100644 --- a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json index e4df154d12f..d91ff3d48d4 100644 --- a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata_google.cloud.tpu.v2alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/package.json b/packages/google-cloud-tpu/samples/package.json index ec1946ce2cd..3aa7de1861d 100644 --- a/packages/google-cloud-tpu/samples/package.json +++ b/packages/google-cloud-tpu/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/tpu": "^4.0.0" + "@google-cloud/tpu": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-translate/CHANGELOG.md b/packages/google-cloud-translate/CHANGELOG.md index 0627125149b..a04bbea41db 100644 --- a/packages/google-cloud-translate/CHANGELOG.md +++ b/packages/google-cloud-translate/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-translate?activeTab=versions +## [9.0.1](https://github.com/googleapis/google-cloud-node/compare/translate-v9.0.0...translate-v9.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [9.0.0](https://github.com/googleapis/google-cloud-node/compare/translate-v8.5.1...translate-v9.0.0) (2025-03-18) diff --git a/packages/google-cloud-translate/package.json b/packages/google-cloud-translate/package.json index 4d0e96fc377..113aa7d0094 100644 --- a/packages/google-cloud-translate/package.json +++ b/packages/google-cloud-translate/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/translate", "description": "Cloud Translation API Client Library for Node.js", - "version": "9.0.0", + "version": "9.0.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { diff --git a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json index 5ea49addbb0..c0a7871ffe7 100644 --- a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json index 4975ed9e795..627a02d252b 100644 --- a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json index 677f254185f..cd27abc6192 100644 --- a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json index 5403458f9a0..7d44411c534 100644 --- a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata_google.cloud.translation.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "9.0.0", + "version": "9.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/package.json b/packages/google-cloud-translate/samples/package.json index b734af3c6fe..b49639f6ccc 100644 --- a/packages/google-cloud-translate/samples/package.json +++ b/packages/google-cloud-translate/samples/package.json @@ -16,7 +16,7 @@ "dependencies": { "@google-cloud/automl": "^4.0.0", "@google-cloud/text-to-speech": "^5.0.0", - "@google-cloud/translate": "^9.0.0", + "@google-cloud/translate": "^9.0.1", "@google-cloud/vision": "^4.0.0", "yargs": "^17.0.0" }, diff --git a/packages/google-cloud-video-livestream/CHANGELOG.md b/packages/google-cloud-video-livestream/CHANGELOG.md index 2df8fb2786f..2adacf2e0c8 100644 --- a/packages/google-cloud-video-livestream/CHANGELOG.md +++ b/packages/google-cloud-video-livestream/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/livestream-v2.0.0...livestream-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/livestream-v1.4.1...livestream-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-video-livestream/package.json b/packages/google-cloud-video-livestream/package.json index 600b54f29cc..a2aa8029984 100644 --- a/packages/google-cloud-video-livestream/package.json +++ b/packages/google-cloud-video-livestream/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/livestream", - "version": "2.0.0", + "version": "2.0.1", "description": "livestream client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json index d427b1d1e12..f71faae6566 100644 --- a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json +++ b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata.google.cloud.video.livestream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-livestream", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json index 7a582047bf0..b2650b9decd 100644 --- a/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json +++ b/packages/google-cloud-video-livestream/samples/generated/v1/snippet_metadata_google.cloud.video.livestream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-livestream", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-livestream/samples/package.json b/packages/google-cloud-video-livestream/samples/package.json index eaa861e2fd3..e067528a565 100644 --- a/packages/google-cloud-video-livestream/samples/package.json +++ b/packages/google-cloud-video-livestream/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/livestream": "^2.0.0" + "@google-cloud/livestream": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-video-stitcher/CHANGELOG.md b/packages/google-cloud-video-stitcher/CHANGELOG.md index 3d58c0df659..2afaa4fe495 100644 --- a/packages/google-cloud-video-stitcher/CHANGELOG.md +++ b/packages/google-cloud-video-stitcher/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.0.1](https://github.com/googleapis/google-cloud-node/compare/video-stitcher-v3.0.0...video-stitcher-v3.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/video-stitcher-v2.4.1...video-stitcher-v3.0.0) (2025-03-18) diff --git a/packages/google-cloud-video-stitcher/package.json b/packages/google-cloud-video-stitcher/package.json index 14be01633b8..5e93f0704c3 100644 --- a/packages/google-cloud-video-stitcher/package.json +++ b/packages/google-cloud-video-stitcher/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-stitcher", - "version": "3.0.0", + "version": "3.0.1", "description": "stitcher client for Node.js", "repository": { "type": "git", 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 c97d396a38b..92349af4b4e 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-stitcher", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { 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 c0984804f48..b9822ee187e 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-stitcher", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-stitcher/samples/package.json b/packages/google-cloud-video-stitcher/samples/package.json index df24276335f..ad8728fcbf4 100644 --- a/packages/google-cloud-video-stitcher/samples/package.json +++ b/packages/google-cloud-video-stitcher/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-stitcher": "^3.0.0" + "@google-cloud/video-stitcher": "^3.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-video-transcoder/CHANGELOG.md b/packages/google-cloud-video-transcoder/CHANGELOG.md index 6ea9404356e..a4babe7dd11 100644 --- a/packages/google-cloud-video-transcoder/CHANGELOG.md +++ b/packages/google-cloud-video-transcoder/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/video-transcoder-v4.0.0...video-transcoder-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/video-transcoder-v3.3.0...video-transcoder-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index f63b7903f7a..f124041af67 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/video-transcoder", - "version": "4.0.0", + "version": "4.0.1", "description": "Transcoder client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json index ff901da29fc..42446a086fe 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata.google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json index ff901da29fc..42446a086fe 100644 --- a/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json +++ b/packages/google-cloud-video-transcoder/samples/generated/v1/snippet_metadata_google.cloud.video.transcoder.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-transcoder", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-transcoder/samples/package.json b/packages/google-cloud-video-transcoder/samples/package.json index e8e90070b63..1617bebf293 100644 --- a/packages/google-cloud-video-transcoder/samples/package.json +++ b/packages/google-cloud-video-transcoder/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/video-transcoder": "^4.0.0" + "@google-cloud/video-transcoder": "^4.0.1" }, "devDependencies": { "@google-cloud/storage": "^7.0.0", diff --git a/packages/google-cloud-videointelligence/CHANGELOG.md b/packages/google-cloud-videointelligence/CHANGELOG.md index 518cb092192..600f78fc195 100644 --- a/packages/google-cloud-videointelligence/CHANGELOG.md +++ b/packages/google-cloud-videointelligence/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/video-intelligence?activeTab=versions +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/video-intelligence-v6.0.0...video-intelligence-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/video-intelligence-v5.3.0...video-intelligence-v6.0.0) (2025-03-18) diff --git a/packages/google-cloud-videointelligence/package.json b/packages/google-cloud-videointelligence/package.json index fb19f29f686..3a03a0aebab 100644 --- a/packages/google-cloud-videointelligence/package.json +++ b/packages/google-cloud-videointelligence/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/video-intelligence", "description": "Google Cloud Video Intelligence API client for Node.js", - "version": "6.0.0", + "version": "6.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json index 2b8035e9ab4..b67b3839a55 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata.google.cloud.videointelligence.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json index 2b8035e9ab4..b67b3839a55 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1/snippet_metadata_google.cloud.videointelligence.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json index 91fad5bbf76..90adf2b0d42 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata.google.cloud.videointelligence.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json index 91fad5bbf76..90adf2b0d42 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1beta2/snippet_metadata_google.cloud.videointelligence.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json index 2ed66950120..1ecea4c8743 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata.google.cloud.videointelligence.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json index 2ed66950120..1ecea4c8743 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p1beta1/snippet_metadata_google.cloud.videointelligence.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json index d4228512c12..216b8b98f5b 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata.google.cloud.videointelligence.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json index d4228512c12..216b8b98f5b 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p2beta1/snippet_metadata_google.cloud.videointelligence.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json index a4302184a4f..71c7765d2c6 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata.google.cloud.videointelligence.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json index a4302184a4f..71c7765d2c6 100644 --- a/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json +++ b/packages/google-cloud-videointelligence/samples/generated/v1p3beta1/snippet_metadata_google.cloud.videointelligence.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-videointelligence", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-videointelligence/samples/package.json b/packages/google-cloud-videointelligence/samples/package.json index 71c64d7a9a0..ca872a9d938 100644 --- a/packages/google-cloud-videointelligence/samples/package.json +++ b/packages/google-cloud-videointelligence/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/video-intelligence": "^6.0.0", + "@google-cloud/video-intelligence": "^6.0.1", "yargs": "^17.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-vision/CHANGELOG.md b/packages/google-cloud-vision/CHANGELOG.md index f8e51e790bb..9fa10debc63 100644 --- a/packages/google-cloud-vision/CHANGELOG.md +++ b/packages/google-cloud-vision/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/nodejs-vision?activeTab=versions +## [5.1.0](https://github.com/googleapis/google-cloud-node/compare/vision-v5.0.0...vision-v5.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) +* **deps:** Update dependency @google-cloud/promisify to v5 ([#6150](https://github.com/googleapis/google-cloud-node/issues/6150)) ([1135b86](https://github.com/googleapis/google-cloud-node/commit/1135b8610b2471249dc3aec47eb0f985ded13f93)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/vision-v4.3.3...vision-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-vision/package.json b/packages/google-cloud-vision/package.json index 823ac6b37be..9f07c2559bd 100644 --- a/packages/google-cloud-vision/package.json +++ b/packages/google-cloud-vision/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/vision", "description": "Google Cloud Vision API client for Node.js", - "version": "5.0.0", + "version": "5.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json index b3a24c0f26d..737d6d24ca1 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json index c3b734fd845..2726dcc3f93 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json index 8b247b84060..e4686684e2a 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json index 8b247b84060..e4686684e2a 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json index 78308e6ce7e..8d8bb3ea378 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json index 78308e6ce7e..8d8bb3ea378 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json index 3f4257bbe21..c736ae711e3 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json index 3f4257bbe21..c736ae711e3 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json index 407bda4be0b..8dc94f099b0 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json index 407bda4be0b..8dc94f099b0 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.0.0", + "version": "5.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/package.json b/packages/google-cloud-vision/samples/package.json index b0308691cc9..7171b0e4e67 100644 --- a/packages/google-cloud-vision/samples/package.json +++ b/packages/google-cloud-vision/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/vision": "^5.0.0", + "@google-cloud/vision": "^5.1.0", "natural": "^8.0.0", "pureimage": "^0.4.0", "redis": "~4.7.0", diff --git a/packages/google-cloud-vmmigration/CHANGELOG.md b/packages/google-cloud-vmmigration/CHANGELOG.md index c42c3b5f764..75a07653e8f 100644 --- a/packages/google-cloud-vmmigration/CHANGELOG.md +++ b/packages/google-cloud-vmmigration/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/vmmigration-v4.0.0...vmmigration-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/vmmigration-v3.3.1...vmmigration-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-vmmigration/package.json b/packages/google-cloud-vmmigration/package.json index b37bf0d9e7e..7893369fda1 100644 --- a/packages/google-cloud-vmmigration/package.json +++ b/packages/google-cloud-vmmigration/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/vmmigration", - "version": "4.0.0", + "version": "4.0.1", "description": "vmmigration client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json index 70f2f0b270b..1bbfeffc0fc 100644 --- a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json +++ b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata.google.cloud.vmmigration.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmmigration", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json index 70f2f0b270b..1bbfeffc0fc 100644 --- a/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json +++ b/packages/google-cloud-vmmigration/samples/generated/v1/snippet_metadata_google.cloud.vmmigration.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmmigration", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmmigration/samples/package.json b/packages/google-cloud-vmmigration/samples/package.json index cc1e5f0b763..ec5a0546cff 100644 --- a/packages/google-cloud-vmmigration/samples/package.json +++ b/packages/google-cloud-vmmigration/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --recursive test/ --timeout=800000" }, "dependencies": { - "@google-cloud/vmmigration": "^4.0.0" + "@google-cloud/vmmigration": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-vmwareengine/CHANGELOG.md b/packages/google-cloud-vmwareengine/CHANGELOG.md index 62c0715fabd..58378872c43 100644 --- a/packages/google-cloud-vmwareengine/CHANGELOG.md +++ b/packages/google-cloud-vmwareengine/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/vmwareengine-v2.0.0...vmwareengine-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/vmwareengine-v1.4.1...vmwareengine-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-vmwareengine/package.json b/packages/google-cloud-vmwareengine/package.json index a748c7386a0..b216aec2412 100644 --- a/packages/google-cloud-vmwareengine/package.json +++ b/packages/google-cloud-vmwareengine/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/vmwareengine", - "version": "2.0.0", + "version": "2.0.1", "description": "VMware Engine API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json index 033ecc10bee..bd2fb912e0d 100644 --- a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json +++ b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata.google.cloud.vmwareengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmwareengine", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json index 4ec8d12e0c6..83d646f4f18 100644 --- a/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json +++ b/packages/google-cloud-vmwareengine/samples/generated/v1/snippet_metadata_google.cloud.vmwareengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vmwareengine", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmwareengine/samples/package.json b/packages/google-cloud-vmwareengine/samples/package.json index d9ad2c4dba1..903add483d7 100644 --- a/packages/google-cloud-vmwareengine/samples/package.json +++ b/packages/google-cloud-vmwareengine/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/vmwareengine": "^2.0.0" + "@google-cloud/vmwareengine": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-vpcaccess/CHANGELOG.md b/packages/google-cloud-vpcaccess/CHANGELOG.md index 439f9bb73e6..db9828829cc 100644 --- a/packages/google-cloud-vpcaccess/CHANGELOG.md +++ b/packages/google-cloud-vpcaccess/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/vpc-access-v4.0.0...vpc-access-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/vpc-access-v3.3.1...vpc-access-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-vpcaccess/package.json b/packages/google-cloud-vpcaccess/package.json index b9564420f67..cb9e805f049 100644 --- a/packages/google-cloud-vpcaccess/package.json +++ b/packages/google-cloud-vpcaccess/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/vpc-access", - "version": "4.0.0", + "version": "4.0.1", "description": "vpcaccess client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json index 2201ef5b478..566f975f085 100644 --- a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json +++ b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata.google.cloud.vpcaccess.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vpcaccess", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json index 2201ef5b478..566f975f085 100644 --- a/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json +++ b/packages/google-cloud-vpcaccess/samples/generated/v1/snippet_metadata_google.cloud.vpcaccess.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vpcaccess", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vpcaccess/samples/package.json b/packages/google-cloud-vpcaccess/samples/package.json index 51b825e9195..57be1d09538 100644 --- a/packages/google-cloud-vpcaccess/samples/package.json +++ b/packages/google-cloud-vpcaccess/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/vpc-access": "^4.0.0" + "@google-cloud/vpc-access": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-webrisk/CHANGELOG.md b/packages/google-cloud-webrisk/CHANGELOG.md index 69043971e49..c02e39c9291 100644 --- a/packages/google-cloud-webrisk/CHANGELOG.md +++ b/packages/google-cloud-webrisk/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/web-risk?activeTab=versions +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/web-risk-v5.0.0...web-risk-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/web-risk-v4.3.1...web-risk-v5.0.0) (2025-03-18) diff --git a/packages/google-cloud-webrisk/package.json b/packages/google-cloud-webrisk/package.json index 52c1faf38ce..db15832da4b 100644 --- a/packages/google-cloud-webrisk/package.json +++ b/packages/google-cloud-webrisk/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/web-risk", - "version": "5.0.0", + "version": "5.0.1", "author": "Google LLC", "description": "Web Risk API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json index fe52800cd2f..6a7f66a29ca 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json index fe52800cd2f..6a7f66a29ca 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata_google.cloud.webrisk.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json index 699e4226c3e..a7d4dc343e6 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json index 699e4226c3e..a7d4dc343e6 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata_google.cloud.webrisk.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/package.json b/packages/google-cloud-webrisk/samples/package.json index 076574c53e8..1a9f9867a13 100644 --- a/packages/google-cloud-webrisk/samples/package.json +++ b/packages/google-cloud-webrisk/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/web-risk": "^5.0.0" + "@google-cloud/web-risk": "^5.0.1" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-websecurityscanner/CHANGELOG.md b/packages/google-cloud-websecurityscanner/CHANGELOG.md index a0faf18154a..cd9bc0609fd 100644 --- a/packages/google-cloud-websecurityscanner/CHANGELOG.md +++ b/packages/google-cloud-websecurityscanner/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/web-security-scanner-v4.0.0...web-security-scanner-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/web-security-scanner-v3.3.0...web-security-scanner-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-websecurityscanner/package.json b/packages/google-cloud-websecurityscanner/package.json index 930d4cd88ce..f9915ec3767 100644 --- a/packages/google-cloud-websecurityscanner/package.json +++ b/packages/google-cloud-websecurityscanner/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/web-security-scanner", - "version": "4.0.0", + "version": "4.0.1", "description": "Websecurityscanner client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json index a62dfde3808..2457f6ff9e2 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata.google.cloud.websecurityscanner.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json index a62dfde3808..2457f6ff9e2 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1/snippet_metadata_google.cloud.websecurityscanner.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json index ae05cd17684..fd0101e699f 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata.google.cloud.websecurityscanner.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json index ae05cd17684..fd0101e699f 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1alpha/snippet_metadata_google.cloud.websecurityscanner.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json index de6839aea9d..4a6bac2e7ab 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata.google.cloud.websecurityscanner.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json index de6839aea9d..4a6bac2e7ab 100644 --- a/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json +++ b/packages/google-cloud-websecurityscanner/samples/generated/v1beta/snippet_metadata_google.cloud.websecurityscanner.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-websecurityscanner", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-websecurityscanner/samples/package.json b/packages/google-cloud-websecurityscanner/samples/package.json index ebb37f0e0e0..54e4a685885 100644 --- a/packages/google-cloud-websecurityscanner/samples/package.json +++ b/packages/google-cloud-websecurityscanner/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/web-security-scanner": "^4.0.0" + "@google-cloud/web-security-scanner": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-workflows-executions/CHANGELOG.md b/packages/google-cloud-workflows-executions/CHANGELOG.md index 064d26d0e56..13c3ce29eeb 100644 --- a/packages/google-cloud-workflows-executions/CHANGELOG.md +++ b/packages/google-cloud-workflows-executions/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/workflows-v4.0.0...workflows-v4.1.0) (2025-03-19) + + +### Features + +* [workflows] add ListWorkflowRevisions method ([#6165](https://github.com/googleapis/google-cloud-node/issues/6165)) ([9930467](https://github.com/googleapis/google-cloud-node/commit/9930467ade72fb91b7933b8fb343131009e40d84)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/workflows-v3.4.1...workflows-v4.0.0) (2025-03-18) diff --git a/packages/google-cloud-workflows-executions/package.json b/packages/google-cloud-workflows-executions/package.json index e3392d33dab..33d43f945ce 100644 --- a/packages/google-cloud-workflows-executions/package.json +++ b/packages/google-cloud-workflows-executions/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/workflows", - "version": "4.0.0", + "version": "4.1.0", "description": "Workflows client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json index 395339c28d8..58f64dc5223 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.executions.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json index d02876e5fab..d82375b240e 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata.google.cloud.workflows.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json index 488f7720de3..574f67abc88 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.executions.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json index 15908326c9f..0ae35e415d5 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1/snippet_metadata_google.cloud.workflows.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json index 8061537c5ab..9a81ac52966 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.executions.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json index d9dcebc3f48..027762ef3df 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata.google.cloud.workflows.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json index 8061537c5ab..9a81ac52966 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.executions.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-executions", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json index d9dcebc3f48..027762ef3df 100644 --- a/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json +++ b/packages/google-cloud-workflows-executions/samples/generated/v1beta/snippet_metadata_google.cloud.workflows.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workflows", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workflows-executions/samples/package.json b/packages/google-cloud-workflows-executions/samples/package.json index 9c9de7bc3b2..48c271e770c 100644 --- a/packages/google-cloud-workflows-executions/samples/package.json +++ b/packages/google-cloud-workflows-executions/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/workflows": "^4.0.0" + "@google-cloud/workflows": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-workstations/CHANGELOG.md b/packages/google-cloud-workstations/CHANGELOG.md index 5f076f1cc2f..d300e86e344 100644 --- a/packages/google-cloud-workstations/CHANGELOG.md +++ b/packages/google-cloud-workstations/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/workstations-v2.0.0...workstations-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/workstations-v1.4.1...workstations-v2.0.0) (2025-03-18) diff --git a/packages/google-cloud-workstations/package.json b/packages/google-cloud-workstations/package.json index 8aa1da21a36..ca9d0e63548 100644 --- a/packages/google-cloud-workstations/package.json +++ b/packages/google-cloud-workstations/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/workstations", - "version": "2.0.0", + "version": "2.0.1", "description": "Cloud Workstations API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json index 3d562c4ea93..7c7d4d36d38 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json +++ b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json index db646910f25..d7333c06d44 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json +++ b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata_google.cloud.workstations.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json index 473c12627fa..5700d56b395 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json +++ b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json index 733f5f5f2c3..296a9e10c79 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json +++ b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata_google.cloud.workstations.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-workstations/samples/package.json b/packages/google-cloud-workstations/samples/package.json index f4854f52981..17566f2ecfe 100644 --- a/packages/google-cloud-workstations/samples/package.json +++ b/packages/google-cloud-workstations/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/workstations": "^2.0.0" + "@google-cloud/workstations": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-container/CHANGELOG.md b/packages/google-container/CHANGELOG.md index 3973ba219e9..8a78abbc4e2 100644 --- a/packages/google-container/CHANGELOG.md +++ b/packages/google-container/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/container?activeTab=versions +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/container-v6.0.0...container-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/container-v5.19.0...container-v6.0.0) (2025-03-18) diff --git a/packages/google-container/package.json b/packages/google-container/package.json index 40e40751cf3..9f13b202570 100644 --- a/packages/google-container/package.json +++ b/packages/google-container/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/container", "description": "Google Container Engine API client for Node.js", - "version": "6.0.0", + "version": "6.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index bf3bca95b1e..3b532144995 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json index 1e5c58902c1..8df4d743bbe 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json index 23dd44d4231..ef6b41cd51e 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json index 1f6a62ff2fa..518271f6982 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/package.json b/packages/google-container/samples/package.json index 740ec52cc12..0ea0b8cdd6d 100644 --- a/packages/google-container/samples/package.json +++ b/packages/google-container/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 1000000" }, "dependencies": { - "@google-cloud/container": "^6.0.0", + "@google-cloud/container": "^6.0.1", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-dataflow/CHANGELOG.md b/packages/google-dataflow/CHANGELOG.md index 316d7531fe8..b46dfe74855 100644 --- a/packages/google-dataflow/CHANGELOG.md +++ b/packages/google-dataflow/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/dataflow-v4.0.0...dataflow-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/dataflow-v3.3.0...dataflow-v4.0.0) (2025-03-18) diff --git a/packages/google-dataflow/package.json b/packages/google-dataflow/package.json index bc1f4a046c2..8ddf96f99e6 100644 --- a/packages/google-dataflow/package.json +++ b/packages/google-dataflow/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataflow", - "version": "4.0.0", + "version": "4.0.1", "description": "dataflow client for Node.js", "repository": { "type": "git", diff --git a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json index a63c4903577..2598e67a16d 100644 --- a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json +++ b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata.google.dataflow.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataflow", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json index a63c4903577..2598e67a16d 100644 --- a/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json +++ b/packages/google-dataflow/samples/generated/v1beta3/snippet_metadata_google.dataflow.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataflow", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-dataflow/samples/package.json b/packages/google-dataflow/samples/package.json index 83ed9c9d570..6e87a4b6bac 100644 --- a/packages/google-dataflow/samples/package.json +++ b/packages/google-dataflow/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataflow": "^4.0.0" + "@google-cloud/dataflow": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-devtools-artifactregistry/CHANGELOG.md b/packages/google-devtools-artifactregistry/CHANGELOG.md index f7695d0310d..2c954e52ee1 100644 --- a/packages/google-devtools-artifactregistry/CHANGELOG.md +++ b/packages/google-devtools-artifactregistry/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/artifact-registry-v4.0.0...artifact-registry-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/artifact-registry-v3.5.1...artifact-registry-v4.0.0) (2025-03-18) diff --git a/packages/google-devtools-artifactregistry/package.json b/packages/google-devtools-artifactregistry/package.json index aa810a9bc52..315e42b81d3 100644 --- a/packages/google-devtools-artifactregistry/package.json +++ b/packages/google-devtools-artifactregistry/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/artifact-registry", - "version": "4.0.0", + "version": "4.0.1", "description": "Artifactregistry client for Node.js", "repository": { "type": "git", diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json index 6aff0be06a4..e53cb227bee 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata.google.devtools.artifactregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json index de90ac9b0c9..162567ec7b3 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json index d65dbf60e02..0a3fca259e5 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata.google.devtools.artifactregistry.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json index d65dbf60e02..0a3fca259e5 100644 --- a/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json +++ b/packages/google-devtools-artifactregistry/samples/generated/v1beta2/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-artifactregistry", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-artifactregistry/samples/package.json b/packages/google-devtools-artifactregistry/samples/package.json index 260861964be..5f73a1b8083 100644 --- a/packages/google-devtools-artifactregistry/samples/package.json +++ b/packages/google-devtools-artifactregistry/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/artifact-registry": "^4.0.0" + "@google-cloud/artifact-registry": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index a10f0fbf641..e2ae76028c1 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.0.1](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v5.0.0...cloudbuild-v5.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v4.8.1...cloudbuild-v5.0.0) (2025-03-18) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 56736f0ef60..6b9ed5cf976 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/cloudbuild", - "version": "5.0.0", + "version": "5.0.1", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 7b68dd36fec..3a70c7bf6a9 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json index 0e29335333e..65cb7acf13a 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json index db252b43a45..691910956b8 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json index db252b43a45..691910956b8 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "5.0.0", + "version": "5.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 7fc777d2519..379d2d47eac 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^5.0.0" + "@google-cloud/cloudbuild": "^5.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-devtools-cloudprofiler/CHANGELOG.md b/packages/google-devtools-cloudprofiler/CHANGELOG.md index 7ea0817bc9b..f620bd2e9aa 100644 --- a/packages/google-devtools-cloudprofiler/CHANGELOG.md +++ b/packages/google-devtools-cloudprofiler/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.7.1](https://github.com/googleapis/google-cloud-node/compare/cloudprofiler-v0.7.0...cloudprofiler-v0.7.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6189](https://github.com/googleapis/google-cloud-node/issues/6189)) ([0eab6d4](https://github.com/googleapis/google-cloud-node/commit/0eab6d40a12aa7f387a4621c6611aa4cbc86e178)) + ## [0.7.0](https://github.com/googleapis/google-cloud-node/compare/cloudprofiler-v0.6.0...cloudprofiler-v0.7.0) (2025-03-18) diff --git a/packages/google-devtools-cloudprofiler/package.json b/packages/google-devtools-cloudprofiler/package.json index 0518ee720a8..ced1d52e64b 100644 --- a/packages/google-devtools-cloudprofiler/package.json +++ b/packages/google-devtools-cloudprofiler/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/cloudprofiler", - "version": "0.7.0", + "version": "0.7.1", "description": "Cloud Profiler API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json b/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json index 9884c75f91c..595733e67bf 100644 --- a/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json +++ b/packages/google-devtools-cloudprofiler/samples/generated/v2/snippet_metadata_google.devtools.cloudprofiler.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudprofiler", - "version": "0.7.0", + "version": "0.7.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudprofiler/samples/package.json b/packages/google-devtools-cloudprofiler/samples/package.json index 288af73e368..46f73af05f3 100644 --- a/packages/google-devtools-cloudprofiler/samples/package.json +++ b/packages/google-devtools-cloudprofiler/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/cloudprofiler": "^0.7.0" + "@google-cloud/cloudprofiler": "^0.7.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-devtools-containeranalysis/CHANGELOG.md b/packages/google-devtools-containeranalysis/CHANGELOG.md index 0a5abdc61bc..a957fe5f07a 100644 --- a/packages/google-devtools-containeranalysis/CHANGELOG.md +++ b/packages/google-devtools-containeranalysis/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/containeranalysis?activeTab=versions +## [6.1.0](https://github.com/googleapis/google-cloud-node/compare/containeranalysis-v6.0.0...containeranalysis-v6.1.0) (2025-03-19) + + +### Features + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6182](https://github.com/googleapis/google-cloud-node/issues/6182)) ([c41ff07](https://github.com/googleapis/google-cloud-node/commit/c41ff0729b65a1207978b4029d6369cc0552e0bf)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) +* **deps:** Update dependency @google-cloud/grafeas to v6 ([#6172](https://github.com/googleapis/google-cloud-node/issues/6172)) ([f91a34f](https://github.com/googleapis/google-cloud-node/commit/f91a34f796895397c51e02f87197b601214d82f9)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/containeranalysis-v5.6.0...containeranalysis-v6.0.0) (2025-03-18) diff --git a/packages/google-devtools-containeranalysis/package.json b/packages/google-devtools-containeranalysis/package.json index f1210298dff..987a55de663 100644 --- a/packages/google-devtools-containeranalysis/package.json +++ b/packages/google-devtools-containeranalysis/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/containeranalysis", - "version": "6.0.0", + "version": "6.1.0", "description": "Containeranalysis client for Node.js", "repository": { "type": "git", diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json index 150db45913c..001a207967d 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json index 150db45913c..001a207967d 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata_google.devtools.containeranalysis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json index 813b819564a..6ca276b3a34 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json index c9827de79a1..565654f1151 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata_google.devtools.containeranalysis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "6.0.0", + "version": "6.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/package.json b/packages/google-devtools-containeranalysis/samples/package.json index 18ed6634003..93fa8d9387d 100644 --- a/packages/google-devtools-containeranalysis/samples/package.json +++ b/packages/google-devtools-containeranalysis/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 100000 test/**.test.js" }, "dependencies": { - "@google-cloud/containeranalysis": "^6.0.0" + "@google-cloud/containeranalysis": "^6.1.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-iam-credentials/CHANGELOG.md b/packages/google-iam-credentials/CHANGELOG.md index 831c8ba5518..397733e7c1a 100644 --- a/packages/google-iam-credentials/CHANGELOG.md +++ b/packages/google-iam-credentials/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/iam-credentials-v4.0.0...iam-credentials-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/iam-credentials-v3.3.0...iam-credentials-v4.0.0) (2025-03-18) diff --git a/packages/google-iam-credentials/package.json b/packages/google-iam-credentials/package.json index 65d5621a00e..5c7a45d11a6 100644 --- a/packages/google-iam-credentials/package.json +++ b/packages/google-iam-credentials/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/iam-credentials", - "version": "4.0.0", + "version": "4.0.1", "description": "Credentials client for Node.js", "repository": { "type": "git", diff --git a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json index b68fd59340a..a14f880cf07 100644 --- a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json +++ b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata.google.iam.credentials.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-credentials", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json index b68fd59340a..a14f880cf07 100644 --- a/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json +++ b/packages/google-iam-credentials/samples/generated/v1/snippet_metadata_google.iam.credentials.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-credentials", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam-credentials/samples/package.json b/packages/google-iam-credentials/samples/package.json index 9de17dac970..02a75d97259 100644 --- a/packages/google-iam-credentials/samples/package.json +++ b/packages/google-iam-credentials/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/iam-credentials": "^4.0.0" + "@google-cloud/iam-credentials": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-iam/CHANGELOG.md b/packages/google-iam/CHANGELOG.md index c9da89ac7dc..7b7a7a755ec 100644 --- a/packages/google-iam/CHANGELOG.md +++ b/packages/google-iam/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/iam-v2.0.0...iam-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/iam-v1.3.1...iam-v2.0.0) (2025-03-18) diff --git a/packages/google-iam/package.json b/packages/google-iam/package.json index eec611e982c..fccbeccd8bd 100644 --- a/packages/google-iam/package.json +++ b/packages/google-iam/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/iam", - "version": "2.0.0", + "version": "2.0.1", "description": "Identity and Access Management client for Node.js", "repository": { "type": "git", diff --git a/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json b/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json index 133368eb60b..dbfc45c37a3 100644 --- a/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json +++ b/packages/google-iam/samples/generated/v2/snippet_metadata.google.iam.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json b/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json index 133368eb60b..dbfc45c37a3 100644 --- a/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json +++ b/packages/google-iam/samples/generated/v2/snippet_metadata_google.iam.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json b/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json index 349a2928c30..35549927b78 100644 --- a/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json +++ b/packages/google-iam/samples/generated/v3/snippet_metadata_google.iam.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iam", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-iam/samples/package.json b/packages/google-iam/samples/package.json index 6e68d938c12..5130c41862a 100644 --- a/packages/google-iam/samples/package.json +++ b/packages/google-iam/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/iam": "^2.0.0" + "@google-cloud/iam": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-identity-accesscontextmanager/CHANGELOG.md b/packages/google-identity-accesscontextmanager/CHANGELOG.md index aa9f9c207ec..4eb40a1944e 100644 --- a/packages/google-identity-accesscontextmanager/CHANGELOG.md +++ b/packages/google-identity-accesscontextmanager/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/access-context-manager-v4.0.0...access-context-manager-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/access-context-manager-v3.3.1...access-context-manager-v4.0.0) (2025-03-18) diff --git a/packages/google-identity-accesscontextmanager/package.json b/packages/google-identity-accesscontextmanager/package.json index c482b01fc40..729064fab48 100644 --- a/packages/google-identity-accesscontextmanager/package.json +++ b/packages/google-identity-accesscontextmanager/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/access-context-manager", - "version": "4.0.0", + "version": "4.0.1", "description": "accesscontextmanager client for Node.js", "repository": { "type": "git", diff --git a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json index 02ace60019f..bf1d8fd47f9 100644 --- a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json +++ b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata.google.identity.accesscontextmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accesscontextmanager", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json index 02ace60019f..bf1d8fd47f9 100644 --- a/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json +++ b/packages/google-identity-accesscontextmanager/samples/generated/v1/snippet_metadata_google.identity.accesscontextmanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accesscontextmanager", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-identity-accesscontextmanager/samples/package.json b/packages/google-identity-accesscontextmanager/samples/package.json index 978a25e7e2a..f406459733e 100644 --- a/packages/google-identity-accesscontextmanager/samples/package.json +++ b/packages/google-identity-accesscontextmanager/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/access-context-manager": "^4.0.0" + "@google-cloud/access-context-manager": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-addressvalidation/CHANGELOG.md b/packages/google-maps-addressvalidation/CHANGELOG.md index 9af5828ab86..5b482f685dd 100644 --- a/packages/google-maps-addressvalidation/CHANGELOG.md +++ b/packages/google-maps-addressvalidation/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.0.1](https://github.com/googleapis/google-cloud-node/compare/addressvalidation-v3.0.0...addressvalidation-v3.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/addressvalidation-v2.4.0...addressvalidation-v3.0.0) (2025-03-18) diff --git a/packages/google-maps-addressvalidation/package.json b/packages/google-maps-addressvalidation/package.json index 8e6307ed8d5..cb379d4dbf8 100644 --- a/packages/google-maps-addressvalidation/package.json +++ b/packages/google-maps-addressvalidation/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/addressvalidation", - "version": "3.0.0", + "version": "3.0.1", "description": " client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json index 60f5947058f..656d9859162 100644 --- a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json +++ b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-addressvalidation", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json index 5b56725e840..82a0e931804 100644 --- a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json +++ b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata_google.maps.addressvalidation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-addressvalidation", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-addressvalidation/samples/package.json b/packages/google-maps-addressvalidation/samples/package.json index f1e4c2f4950..666b1ecb34f 100644 --- a/packages/google-maps-addressvalidation/samples/package.json +++ b/packages/google-maps-addressvalidation/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/addressvalidation": "^3.0.0" + "@googlemaps/addressvalidation": "^3.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-areainsights/CHANGELOG.md b/packages/google-maps-areainsights/CHANGELOG.md index 4707f30d35d..0e17aeb83d5 100644 --- a/packages/google-maps-areainsights/CHANGELOG.md +++ b/packages/google-maps-areainsights/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.1](https://github.com/googleapis/google-cloud-node/compare/areainsights-v0.2.0...areainsights-v0.2.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/areainsights-v0.1.0...areainsights-v0.2.0) (2025-03-18) diff --git a/packages/google-maps-areainsights/package.json b/packages/google-maps-areainsights/package.json index 89b2bfc0a1b..4b1b2754732 100644 --- a/packages/google-maps-areainsights/package.json +++ b/packages/google-maps-areainsights/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/areainsights", - "version": "0.2.0", + "version": "0.2.1", "description": "Places Insights API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json b/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json index 9736822fd6d..84a7fb9bb59 100644 --- a/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json +++ b/packages/google-maps-areainsights/samples/generated/v1/snippet_metadata_google.maps.areainsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-areainsights", - "version": "0.2.0", + "version": "0.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-areainsights/samples/package.json b/packages/google-maps-areainsights/samples/package.json index a579f18d886..eb42f6b2ce8 100644 --- a/packages/google-maps-areainsights/samples/package.json +++ b/packages/google-maps-areainsights/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/areainsights": "^0.2.0" + "@googlemaps/areainsights": "^0.2.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-fleetengine-delivery/CHANGELOG.md b/packages/google-maps-fleetengine-delivery/CHANGELOG.md index 8d84cbbab69..63fda544686 100644 --- a/packages/google-maps-fleetengine-delivery/CHANGELOG.md +++ b/packages/google-maps-fleetengine-delivery/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/fleetengine-delivery-v0.4.0...fleetengine-delivery-v0.4.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/fleetengine-delivery-v0.3.0...fleetengine-delivery-v0.4.0) (2025-03-18) diff --git a/packages/google-maps-fleetengine-delivery/package.json b/packages/google-maps-fleetengine-delivery/package.json index 10295259582..28ff22181a8 100644 --- a/packages/google-maps-fleetengine-delivery/package.json +++ b/packages/google-maps-fleetengine-delivery/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/fleetengine-delivery", - "version": "0.4.0", + "version": "0.4.1", "description": "Last Mile Fleet Solution Delivery API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json b/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json index ec86f259087..2b1cd035046 100644 --- a/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json +++ b/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-delivery", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-fleetengine-delivery/samples/package.json b/packages/google-maps-fleetengine-delivery/samples/package.json index 060b3255eab..6c8137625a1 100644 --- a/packages/google-maps-fleetengine-delivery/samples/package.json +++ b/packages/google-maps-fleetengine-delivery/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/fleetengine-delivery": "^0.4.0" + "@googlemaps/fleetengine-delivery": "^0.4.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-fleetengine/CHANGELOG.md b/packages/google-maps-fleetengine/CHANGELOG.md index c94d6a97b0d..a752fd93d49 100644 --- a/packages/google-maps-fleetengine/CHANGELOG.md +++ b/packages/google-maps-fleetengine/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.1](https://github.com/googleapis/google-cloud-node/compare/fleetengine-v0.6.0...fleetengine-v0.6.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/fleetengine-v0.5.0...fleetengine-v0.6.0) (2025-03-18) diff --git a/packages/google-maps-fleetengine/package.json b/packages/google-maps-fleetengine/package.json index aa79797dac9..40b3a2bc92b 100644 --- a/packages/google-maps-fleetengine/package.json +++ b/packages/google-maps-fleetengine/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/fleetengine", - "version": "0.6.0", + "version": "0.6.1", "description": "Local Rides and Deliveries API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json b/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json index 394bd169385..a21e3bc5295 100644 --- a/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json +++ b/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-fleetengine", - "version": "0.6.0", + "version": "0.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-fleetengine/samples/package.json b/packages/google-maps-fleetengine/samples/package.json index 99843b38342..2778124b73b 100644 --- a/packages/google-maps-fleetengine/samples/package.json +++ b/packages/google-maps-fleetengine/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/fleetengine": "^0.6.0" + "@googlemaps/fleetengine": "^0.6.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-mapsplatformdatasets/CHANGELOG.md b/packages/google-maps-mapsplatformdatasets/CHANGELOG.md index 4ca953f96fd..243a85fe0d1 100644 --- a/packages/google-maps-mapsplatformdatasets/CHANGELOG.md +++ b/packages/google-maps-mapsplatformdatasets/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.0.1](https://github.com/googleapis/google-cloud-node/compare/maps-platform-datasets-v3.0.0...maps-platform-datasets-v3.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/maps-platform-datasets-v2.1.0...maps-platform-datasets-v3.0.0) (2025-03-18) diff --git a/packages/google-maps-mapsplatformdatasets/package.json b/packages/google-maps-mapsplatformdatasets/package.json index 72f3c2b043f..956df86ff71 100644 --- a/packages/google-maps-mapsplatformdatasets/package.json +++ b/packages/google-maps-mapsplatformdatasets/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/maps-platform-datasets", - "version": "3.0.0", + "version": "3.0.1", "description": "Maps Platform Datasets API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json index 082e5e4fc80..7da35eeaa6a 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata.google.maps.mapsplatformdatasets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json index e61785729e9..56040d9b7bd 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1/snippet_metadata_google.maps.mapsplatformdatasets.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json index 6fb56a5ebf9..ca4b0e84822 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata.google.maps.mapsplatformdatasets.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json index 6fb56a5ebf9..ca4b0e84822 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json +++ b/packages/google-maps-mapsplatformdatasets/samples/generated/v1alpha/snippet_metadata_google.maps.mapsplatformdatasets.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-mapsplatformdatasets", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-mapsplatformdatasets/samples/package.json b/packages/google-maps-mapsplatformdatasets/samples/package.json index 0ffb674b73c..fd6bf0d4a26 100644 --- a/packages/google-maps-mapsplatformdatasets/samples/package.json +++ b/packages/google-maps-mapsplatformdatasets/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/maps-platform-datasets": "^3.0.0" + "@googlemaps/maps-platform-datasets": "^3.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-places/CHANGELOG.md b/packages/google-maps-places/CHANGELOG.md index cdb845b4b35..8b7f164ef82 100644 --- a/packages/google-maps-places/CHANGELOG.md +++ b/packages/google-maps-places/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/places-v2.0.0...places-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/places-v1.10.0...places-v2.0.0) (2025-03-18) diff --git a/packages/google-maps-places/package.json b/packages/google-maps-places/package.json index 0975abd0f69..86d70ad8bcc 100644 --- a/packages/google-maps-places/package.json +++ b/packages/google-maps-places/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/places", - "version": "2.0.0", + "version": "2.0.1", "description": "Places API (New) client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json b/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json index fb340643348..363a461f02e 100644 --- a/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json +++ b/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-places", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json b/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json index 6b0e6671bbb..78e09d0e941 100644 --- a/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json +++ b/packages/google-maps-places/samples/generated/v1/snippet_metadata_google.maps.places.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-places", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-places/samples/package.json b/packages/google-maps-places/samples/package.json index 25f8abf139b..ed0faa0c0bc 100644 --- a/packages/google-maps-places/samples/package.json +++ b/packages/google-maps-places/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/places": "^2.0.0" + "@googlemaps/places": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-routeoptimization/CHANGELOG.md b/packages/google-maps-routeoptimization/CHANGELOG.md index 8454c20d099..4f9d48824ee 100644 --- a/packages/google-maps-routeoptimization/CHANGELOG.md +++ b/packages/google-maps-routeoptimization/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/routeoptimization-v0.4.0...routeoptimization-v0.4.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/routeoptimization-v0.3.1...routeoptimization-v0.4.0) (2025-03-18) diff --git a/packages/google-maps-routeoptimization/package.json b/packages/google-maps-routeoptimization/package.json index 77b0ae6cbd2..bd77998e44b 100644 --- a/packages/google-maps-routeoptimization/package.json +++ b/packages/google-maps-routeoptimization/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/routeoptimization", - "version": "0.4.0", + "version": "0.4.1", "description": "Route Optimization API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json b/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json index 9a6b160f1fe..24b17066bf2 100644 --- a/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json +++ b/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routeoptimization", - "version": "0.4.0", + "version": "0.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routeoptimization/samples/package.json b/packages/google-maps-routeoptimization/samples/package.json index 9c33cfef274..81b84c80ff7 100644 --- a/packages/google-maps-routeoptimization/samples/package.json +++ b/packages/google-maps-routeoptimization/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/routeoptimization": "^0.4.0" + "@googlemaps/routeoptimization": "^0.4.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-routing/CHANGELOG.md b/packages/google-maps-routing/CHANGELOG.md index e6f2995e9fa..0b56ccafd28 100644 --- a/packages/google-maps-routing/CHANGELOG.md +++ b/packages/google-maps-routing/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/routing-v2.0.0...routing-v2.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/routing-v1.4.0...routing-v2.0.0) (2025-03-18) diff --git a/packages/google-maps-routing/package.json b/packages/google-maps-routing/package.json index 413a6d0ac9a..ea6b1fb15b7 100644 --- a/packages/google-maps-routing/package.json +++ b/packages/google-maps-routing/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/routing", - "version": "2.0.0", + "version": "2.0.1", "description": " client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json b/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json index 55c28287fa4..72b9228a1e9 100644 --- a/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json +++ b/packages/google-maps-routing/samples/generated/v2/snippet_metadata.google.maps.routing.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routing", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json b/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json index 5139965b56f..26488beef84 100644 --- a/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json +++ b/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routing", - "version": "2.0.0", + "version": "2.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routing/samples/package.json b/packages/google-maps-routing/samples/package.json index 72c8497b930..a86325743f7 100644 --- a/packages/google-maps-routing/samples/package.json +++ b/packages/google-maps-routing/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/routing": "^2.0.0" + "@googlemaps/routing": "^2.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-solar/CHANGELOG.md b/packages/google-maps-solar/CHANGELOG.md index 789bada6b37..cb07781ae87 100644 --- a/packages/google-maps-solar/CHANGELOG.md +++ b/packages/google-maps-solar/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.1](https://github.com/googleapis/google-cloud-node/compare/solar-v0.3.0...solar-v0.3.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/solar-v0.2.0...solar-v0.3.0) (2025-03-18) diff --git a/packages/google-maps-solar/package.json b/packages/google-maps-solar/package.json index 490e1f03e1b..e39aefee42d 100644 --- a/packages/google-maps-solar/package.json +++ b/packages/google-maps-solar/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/solar", - "version": "0.3.0", + "version": "0.3.1", "description": "Solar API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json b/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json index c12a6aaf472..97650a68029 100644 --- a/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json +++ b/packages/google-maps-solar/samples/generated/v1/snippet_metadata_google.maps.solar.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-solar", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-solar/samples/package.json b/packages/google-maps-solar/samples/package.json index 0c626d96c0e..72fcdf01bdc 100644 --- a/packages/google-maps-solar/samples/package.json +++ b/packages/google-maps-solar/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/solar": "^0.3.0" + "@googlemaps/solar": "^0.3.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-marketingplatform-admin/CHANGELOG.md b/packages/google-marketingplatform-admin/CHANGELOG.md index 776b1f5b9e3..2a7ab9b0c09 100644 --- a/packages/google-marketingplatform-admin/CHANGELOG.md +++ b/packages/google-marketingplatform-admin/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.1](https://github.com/googleapis/google-cloud-node/compare/marketing-platform-admin-v0.2.0...marketing-platform-admin-v0.2.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/marketing-platform-admin-v0.1.0...marketing-platform-admin-v0.2.0) (2025-03-18) diff --git a/packages/google-marketingplatform-admin/package.json b/packages/google-marketingplatform-admin/package.json index b6292c57530..bc4409bb204 100644 --- a/packages/google-marketingplatform-admin/package.json +++ b/packages/google-marketingplatform-admin/package.json @@ -1,6 +1,6 @@ { "name": "@google-ads/marketing-platform-admin", - "version": "0.2.0", + "version": "0.2.1", "description": "Google Marketing Platform Admin API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json index 8de0fc6ab23..c585a4cd8d4 100644 --- a/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "0.2.0", + "version": "0.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-marketingplatform-admin/samples/package.json b/packages/google-marketingplatform-admin/samples/package.json index 77c58727005..182d63399c3 100644 --- a/packages/google-marketingplatform-admin/samples/package.json +++ b/packages/google-marketingplatform-admin/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-ads/marketing-platform-admin": "^0.2.0" + "@google-ads/marketing-platform-admin": "^0.2.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-monitoring-dashboard/CHANGELOG.md b/packages/google-monitoring-dashboard/CHANGELOG.md index 28adc755f4b..69bec4d4e3c 100644 --- a/packages/google-monitoring-dashboard/CHANGELOG.md +++ b/packages/google-monitoring-dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.0.1](https://github.com/googleapis/google-cloud-node/compare/monitoring-dashboards-v4.0.0...monitoring-dashboards-v4.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/monitoring-dashboards-v3.3.0...monitoring-dashboards-v4.0.0) (2025-03-18) diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 6c1282bde65..25feae95018 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring-dashboards", - "version": "4.0.0", + "version": "4.0.1", "description": "interact with dashboards for viewing and analyzing metric data", "repository": { "type": "git", diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json index b3f3aa8fcd4..14014719a50 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json +++ b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata.google.monitoring.dashboard.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dashboard", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json index 6d4c85db476..e100296b7aa 100644 --- a/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json +++ b/packages/google-monitoring-dashboard/samples/generated/v1/snippet_metadata_google.monitoring.dashboard.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dashboard", - "version": "4.0.0", + "version": "4.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-monitoring-dashboard/samples/package.json b/packages/google-monitoring-dashboard/samples/package.json index 6ec87d1a681..387a644cb16 100644 --- a/packages/google-monitoring-dashboard/samples/package.json +++ b/packages/google-monitoring-dashboard/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/monitoring-dashboards": "^4.0.0" + "@google-cloud/monitoring-dashboards": "^4.0.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-privacy-dlp/CHANGELOG.md b/packages/google-privacy-dlp/CHANGELOG.md index 1d233f57eb9..1f792205e1c 100644 --- a/packages/google-privacy-dlp/CHANGELOG.md +++ b/packages/google-privacy-dlp/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/PACKAGE NAME?activeTab=versions +## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/dlp-v6.0.0...dlp-v6.0.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [6.0.0](https://github.com/googleapis/google-cloud-node/compare/dlp-v5.13.0...dlp-v6.0.0) (2025-03-18) diff --git a/packages/google-privacy-dlp/package.json b/packages/google-privacy-dlp/package.json index 027f60bdace..1c3f5d098dc 100644 --- a/packages/google-privacy-dlp/package.json +++ b/packages/google-privacy-dlp/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dlp", "description": "DLP API client for Node.js", - "version": "6.0.0", + "version": "6.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json index 66a673a8b74..92195d2f89e 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json +++ b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dlp", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json index 414d45efb5c..a846c4b6bbc 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json +++ b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dlp", - "version": "6.0.0", + "version": "6.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-privacy-dlp/samples/package.json b/packages/google-privacy-dlp/samples/package.json index 9a7bd27d278..8a80d572629 100644 --- a/packages/google-privacy-dlp/samples/package.json +++ b/packages/google-privacy-dlp/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha test/*.test.js --timeout=600000" }, "dependencies": { - "@google-cloud/dlp": "^6.0.0", + "@google-cloud/dlp": "^6.0.1", "@google-cloud/pubsub": "^4.0.0", "mime": "^4.0.0", "yargs": "^17.0.0" diff --git a/packages/google-shopping-css/CHANGELOG.md b/packages/google-shopping-css/CHANGELOG.md index dd1c22897e2..91c9733a526 100644 --- a/packages/google-shopping-css/CHANGELOG.md +++ b/packages/google-shopping-css/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.8.1](https://github.com/googleapis/google-cloud-node/compare/css-v0.8.0...css-v0.8.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.8.0](https://github.com/googleapis/google-cloud-node/compare/css-v0.7.0...css-v0.8.0) (2025-03-18) diff --git a/packages/google-shopping-css/package.json b/packages/google-shopping-css/package.json index a7edbfc2e5f..75975b937d0 100644 --- a/packages/google-shopping-css/package.json +++ b/packages/google-shopping-css/package.json @@ -1,6 +1,6 @@ { "name": "@google-shopping/css", - "version": "0.8.0", + "version": "0.8.1", "description": "CSS API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json b/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json index 82e8e7e3a4b..b884d48a7d4 100644 --- a/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json +++ b/packages/google-shopping-css/samples/generated/v1/snippet_metadata_google.shopping.css.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-css", - "version": "0.8.0", + "version": "0.8.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-css/samples/package.json b/packages/google-shopping-css/samples/package.json index 64afcd15a5c..049abdd0d74 100644 --- a/packages/google-shopping-css/samples/package.json +++ b/packages/google-shopping-css/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-shopping/css": "^0.8.0" + "@google-shopping/css": "^0.8.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-shopping-merchant-accounts/CHANGELOG.md b/packages/google-shopping-merchant-accounts/CHANGELOG.md index bf5bbe75fec..cfc47c81b6a 100644 --- a/packages/google-shopping-merchant-accounts/CHANGELOG.md +++ b/packages/google-shopping-merchant-accounts/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/accounts-v2.0.0...accounts-v2.1.0) (2025-03-19) + + +### Features + +* [merchantapi] Add AutomaticImprovements service ([#6153](https://github.com/googleapis/google-cloud-node/issues/6153)) ([cf56106](https://github.com/googleapis/google-cloud-node/commit/cf561061ead8557fe41b6458ddf2778ced92b36d)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [2.0.0](https://github.com/googleapis/google-cloud-node/compare/accounts-v1.0.0...accounts-v2.0.0) (2025-03-18) diff --git a/packages/google-shopping-merchant-accounts/package.json b/packages/google-shopping-merchant-accounts/package.json index 1eb7468daf6..30cdaab6d8f 100644 --- a/packages/google-shopping-merchant-accounts/package.json +++ b/packages/google-shopping-merchant-accounts/package.json @@ -1,6 +1,6 @@ { "name": "@google-shopping/accounts", - "version": "2.0.0", + "version": "2.1.0", "description": "Merchant API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json index 7e5c32ff582..17baae45701 100644 --- a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accounts", - "version": "2.0.0", + "version": "2.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-accounts/samples/package.json b/packages/google-shopping-merchant-accounts/samples/package.json index 1d8eaca0374..4d9efc54234 100644 --- a/packages/google-shopping-merchant-accounts/samples/package.json +++ b/packages/google-shopping-merchant-accounts/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-shopping/accounts": "^2.0.0" + "@google-shopping/accounts": "^2.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-shopping-merchant-conversions/CHANGELOG.md b/packages/google-shopping-merchant-conversions/CHANGELOG.md index 9657f71311a..71b9e67f2ca 100644 --- a/packages/google-shopping-merchant-conversions/CHANGELOG.md +++ b/packages/google-shopping-merchant-conversions/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.1](https://github.com/googleapis/google-cloud-node/compare/conversions-v0.3.0...conversions-v0.3.1) (2025-03-19) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/conversions-v0.2.0...conversions-v0.3.0) (2025-03-18) diff --git a/packages/google-shopping-merchant-conversions/package.json b/packages/google-shopping-merchant-conversions/package.json index fdd4808fbb3..7d94c63ef68 100644 --- a/packages/google-shopping-merchant-conversions/package.json +++ b/packages/google-shopping-merchant-conversions/package.json @@ -1,6 +1,6 @@ { "name": "@google-shopping/conversions", - "version": "0.3.0", + "version": "0.3.1", "description": "Merchant API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json b/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json index 7ad42e92684..bc7293423e4 100644 --- a/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json +++ b/packages/google-shopping-merchant-conversions/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.conversions.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-conversions", - "version": "0.3.0", + "version": "0.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-conversions/samples/package.json b/packages/google-shopping-merchant-conversions/samples/package.json index 7904b8ad0fa..ae99628390d 100644 --- a/packages/google-shopping-merchant-conversions/samples/package.json +++ b/packages/google-shopping-merchant-conversions/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-shopping/conversions": "^0.3.0" + "@google-shopping/conversions": "^0.3.1" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-shopping-merchant-datasources/CHANGELOG.md b/packages/google-shopping-merchant-datasources/CHANGELOG.md index 8fac45fa29c..7f7db6a2061 100644 --- a/packages/google-shopping-merchant-datasources/CHANGELOG.md +++ b/packages/google-shopping-merchant-datasources/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/datasources-v0.4.0...datasources-v0.5.0) (2025-03-19) + + +### Features + +* [merchantapi] Add a new destinations field ([#6154](https://github.com/googleapis/google-cloud-node/issues/6154)) ([153866c](https://github.com/googleapis/google-cloud-node/commit/153866c5ec36b7c7740b77d6a1a18b89afccb9f8)) + + +### Bug Fixes + +* [Many APIs] await/catch promises, and update listOperationsAsync return type ([#6190](https://github.com/googleapis/google-cloud-node/issues/6190)) ([f4866df](https://github.com/googleapis/google-cloud-node/commit/f4866dfa6ab481163150f54928a9857d2dfef948)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/datasources-v0.3.0...datasources-v0.4.0) (2025-03-18) diff --git a/packages/google-shopping-merchant-datasources/package.json b/packages/google-shopping-merchant-datasources/package.json index 639e78a496f..42377b961a2 100644 --- a/packages/google-shopping-merchant-datasources/package.json +++ b/packages/google-shopping-merchant-datasources/package.json @@ -1,6 +1,6 @@ { "name": "@google-shopping/datasources", - "version": "0.4.0", + "version": "0.5.0", "description": "Merchant API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json b/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json index 7b111304523..508cd14fed2 100644 --- a/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json +++ b/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datasources", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-datasources/samples/package.json b/packages/google-shopping-merchant-datasources/samples/package.json index a3fcfe1e202..4e314dcc7f4 100644 --- a/packages/google-shopping-merchant-datasources/samples/package.json +++ b/packages/google-shopping-merchant-datasources/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-shopping/datasources": "^0.4.0" + "@google-shopping/datasources": "^0.5.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-shopping-merchant-products/CHANGELOG.md b/packages/google-shopping-merchant-products/CHANGELOG.md index f946ba7e6bc..9a44214b37f 100644 --- a/packages/google-shopping-merchant-products/CHANGELOG.md +++ b/packages/google-shopping-merchant-products/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/products-v0.2.0...products-v0.3.0) (2025-03-19) + + +### Features + +* [merchantapi] add an update method ([#6163](https://github.com/googleapis/google-cloud-node/issues/6163)) ([99028ab](https://github.com/googleapis/google-cloud-node/commit/99028ab3ca6487acf9df82e4d013ffa40d0aebf6)) + ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/products-v0.1.1...products-v0.2.0) (2025-03-18) diff --git a/packages/google-shopping-merchant-products/package.json b/packages/google-shopping-merchant-products/package.json index f2f4ba552ab..1c30e9c2fb3 100644 --- a/packages/google-shopping-merchant-products/package.json +++ b/packages/google-shopping-merchant-products/package.json @@ -1,6 +1,6 @@ { "name": "@google-shopping/products", - "version": "0.2.0", + "version": "0.3.0", "description": "Merchant API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json b/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json index 1381680f4ff..262886a9389 100644 --- a/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json +++ b/packages/google-shopping-merchant-products/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.products.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-products", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-products/samples/package.json b/packages/google-shopping-merchant-products/samples/package.json index 75370c51fa2..778a5acfa7e 100644 --- a/packages/google-shopping-merchant-products/samples/package.json +++ b/packages/google-shopping-merchant-products/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-shopping/products": "^0.2.0" + "@google-shopping/products": "^0.3.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-storage-control/CHANGELOG.md b/packages/google-storage-control/CHANGELOG.md index 33a95915e75..d39d6d6ca5b 100644 --- a/packages/google-storage-control/CHANGELOG.md +++ b/packages/google-storage-control/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/storage-control-v0.3.0...storage-control-v0.4.0) (2025-03-19) + + +### Features + +* [storage] Add Anywhere cache control APIs ([#6151](https://github.com/googleapis/google-cloud-node/issues/6151)) ([6f0340d](https://github.com/googleapis/google-cloud-node/commit/6f0340dc21027b6c66bcf77e8cb1cd30fc7d4ea3)) + ## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/storage-control-v0.2.1...storage-control-v0.3.0) (2025-03-18) diff --git a/packages/google-storage-control/package.json b/packages/google-storage-control/package.json index 26c9831d335..be6d931fb9d 100644 --- a/packages/google-storage-control/package.json +++ b/packages/google-storage-control/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/storage-control", - "version": "0.3.0", + "version": "0.4.0", "description": "Cloud Storage API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json b/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json index bb7bc766a07..144341c0001 100644 --- a/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json +++ b/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-control", - "version": "0.3.0", + "version": "0.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-storage-control/samples/package.json b/packages/google-storage-control/samples/package.json index 8db897f50fb..6c2ec926d77 100644 --- a/packages/google-storage-control/samples/package.json +++ b/packages/google-storage-control/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/storage-control": "^0.3.0" + "@google-cloud/storage-control": "^0.4.0" }, "devDependencies": { "c8": "^9.0.0",